@knkcs/importhub-ui 0.2.0 → 0.3.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,42 +1,44 @@
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 we, fromJson as Tt, create as Qe } from "@bufbuild/protobuf";
2
+ import { file_google_protobuf_timestamp as Ue, file_google_protobuf_struct as qe, timestampDate as Dt } from "@bufbuild/protobuf/wkt";
3
+ import { createClient as Ve, ConnectError as $e, Code as Fe } from "@connectrpc/connect";
4
+ import { createConnectTransport as jt } from "@connectrpc/connect-web";
5
+ import { messageDesc as ce, fileDesc as he, serviceDesc as ke } from "@bufbuild/protobuf/codegenv2";
6
+ import { R as Wt, C as Bt, N as Oe } from "./importhub-client-CrS-3Zuu.js";
7
+ import { jsx as t, jsxs as g, Fragment as D } from "react/jsx-runtime";
8
+ import { Link as be, Box as k, Spinner as Ct, Tabs as Ee, Stack as Z, Text as E, Alert as J, List as H, HStack as L, Center as Ot, Table as T, Code as me, Grid as _t, MenuRoot as qt, MenuTrigger as $t, MenuContent as en, MenuItem as tn } from "@knkcs/anker/primitives";
9
+ import { ExternalLink as nn, Blocks as ln, Ampersand as sn, Waypoints as on, FileCog as rn, FileUp as an, CircleAlert as cn, Tag as dn, RotateCcw as un, History as pn, Trash2 as ge, Plus as ye, ArrowRightLeft as mn, ArrowUp as gn, ArrowDown as hn, Settings2 as bn } from "lucide-react";
10
+ import { useTranslation as v } from "react-i18next";
11
+ import { createContext as yn, useContext as fn, useEffect as j, useState as P, useMemo as x, useRef as Rn } from "react";
12
+ import { EmptyState as et, Button as B, StatusBadge as ne, IconButton as Ne } from "@knkcs/anker/atoms";
13
+ import { useHostIdentity as w } from "@knkcs/anker/host";
14
+ import { IndexPageTemplate as fe, DetailPageTemplate as le, usePageRail as tt } from "@knkcs/anker/templates";
15
+ import { useQuery as C, useMutation as ee, useQueryClient as te, useQueries as Sn, useInfiniteQuery as vn } from "@tanstack/react-query";
16
+ import { Modal as de, StatusBadgeCell as wt, ContextRail as K, Card as O, TruncatedTextCell as $, IdentityCell as In, DateCell as Vn, ActionCell as En, DataTable as Re, LinkCell as nt, CountCell as Gn, CodeCell as mt, SlugCell as An } from "@knkcs/anker/components";
17
+ import { InputField as Q, TextareaField as ze, BaseSelectField as Ye, SwitchField as gt } from "@knkcs/anker/forms";
18
+ import { useForm as ue, useFieldArray as Zn, FormProvider as pe, useWatch as Se, useFormContext as Nt } from "react-hook-form";
19
+ import { useSearchParams as Xn, Link as Ke } from "react-router";
20
+ import { zodResolver as Wn } from "@hookform/resolvers/zod";
21
+ import { FieldKitProvider as Bn, SpecForm as ht } from "@knkcs/fieldkit/renderer";
22
+ import { specToZodSchema as Cn, builtInFieldTypes as bt } from "@knkcs/fieldkit/schema";
23
+ const ve = /* @__PURE__ */ he("CiBpbXBvcnRodWIvdjEvY29uZmlndXJhdGlvbi5wcm90bxIMaW1wb3J0aHViLnYxIkgKCFZhbGlkaXR5Eg0KBXZhbGlkGAEgASgIEi0KB3JlYXNvbnMYAiADKAsyHC5pbXBvcnRodWIudjEuVmFsaWRpdHlSZWFzb24iPQoOVmFsaWRpdHlSZWFzb24SDAoEcGF0aBgBIAEoCRIMCgRjb2RlGAIgASgJEg8KB21lc3NhZ2UYAyABKAkisAEKFUNvbmZpZ3VyYXRpb25SZXZpc2lvbhIKCgJpZBgBIAEoCRIQCghzYXZlZF9ieRgCIAEoCRIsCghzYXZlZF9hdBgDIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASKAoIdmFsaWRpdHkYBCABKAsyFi5pbXBvcnRodWIudjEuVmFsaWRpdHkSIQoZcmVzdG9yZWRfZnJ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2ltcG9ydGh1Yi9nZW4vaW1wb3J0aHViL3YxO2ltcG9ydGh1YnYxYgZwcm90bzM", [Ue]), wn = /* @__PURE__ */ ce(ve, 0), Nn = /* @__PURE__ */ ce(ve, 7);
24
+ var ae = /* @__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))(ae || {});
25
+ const Jt = /* @__PURE__ */ he("Ch1pbXBvcnRodWIvdjEvZW50aXR5X3NldC5wcm90bxIMaW1wb3J0aHViLnYxIugBCglFbnRpdHlTZXQSCgoCaWQYASABKAkSEwoLcmV2aXNpb25faWQYAiABKAkSLwoHY29udGVudBgDIAEoCzIeLmltcG9ydGh1Yi52MS5FbnRpdHlTZXRDb250ZW50EigKCHZhbGlkaXR5GAQgASgLMhYuaW1wb3J0aHViLnYxLlZhbGlkaXR5Ei8KBXN0YXRlGAUgASgLMiAuaW1wb3J0aHViLnYxLkNvbmZpZ3VyYXRpb25TdGF0ZRIuCgpjcmVhdGVkX2F0GAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCKmAQoQRW50aXR5U2V0Q29udGVudBIMCgRuYW1lGAEgASgJEhMKC2Rlc2NyaXB0aW9uGAIgASgJEj4KCGVudGl0aWVzGAMgAygLMiwuaW1wb3J0aHViLnYxLkVudGl0eVNldENvbnRlbnQuRW50aXRpZXNFbnRyeRovCg1FbnRpdGllc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAEiFwoVTGlzdEVudGl0eVNldHNSZXF1ZXN0IkYKFkxpc3RFbnRpdHlTZXRzUmVzcG9uc2USLAoLZW50aXR5X3NldHMYASADKAsyFy5pbXBvcnRodWIudjEuRW50aXR5U2V0IjYKE0dldEVudGl0eVNldFJlcXVlc3QSCgoCaWQYASABKAkSEwoLcmV2aXNp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TT1JfS0lORF9QUkVQUk9DRVNTT1IQARIhCh1QUk9DRVNTT1JfS0lORF9QT1NUX1BST0NFU1NPUhACKnsKD1Byb2Nlc3NvclRhcmdldBIgChxQUk9DRVNTT1JfVEFSR0VUX1VOU1BFQ0lGSUVEEAASIAocUFJPQ0VTU09SX1RBUkdFVF9TT1VSQ0VfRklMRRABEiQKIFBST0NFU1NPUl9UQVJHRVRfUklDSF9URVhUX0ZJRUxEEAIybwoQUHJvY2Vzc29yU2VydmljZRJbCg5MaXN0UHJvY2Vzc29ycxIjLmltcG9ydGh1Yi52MS5MaXN0UHJvY2Vzc29yc1JlcXVlc3QaJC5pbXBvcnRodWIudjEuTGlzdFByb2Nlc3NvcnNSZXNwb25zZUI5WjdnaXRodWIuY29tL2tua2NzL2ltcG9ydGh1Yi9nZW4vaW1wb3J0aHViL3YxO2ltcG9ydGh1YnYxYgZwcm90bzM", [qe]);
26
+ var Ut = /* @__PURE__ */ ((e) => (e[e.UNSPECIFIED = 0] = "UNSPECIFIED", e[e.PREPROCESSOR = 1] = "PREPROCESSOR", e[e.POST_PROCESSOR = 2] = "POST_PROCESSOR", e))(Ut || {}), kt = /* @__PURE__ */ ((e) => (e[e.UNSPECIFIED = 0] = "UNSPECIFIED", e[e.SOURCE_FILE = 1] = "SOURCE_FILE", e[e.RICH_TEXT_FIELD = 2] = "RICH_TEXT_FIELD", e))(kt || {});
27
+ const zn = /* @__PURE__ */ ke(kn, 0), Ie = (e) => ({
26
28
  valid: e?.valid ?? !1,
27
29
  reasons: (e?.reasons ?? []).map((n) => ({ path: n.path, code: n.code, message: n.message }))
28
- }), ke = (e) => ({
30
+ }), st = (e) => ({
29
31
  draftRevisionId: e?.draftRevisionId ?? "",
30
32
  draftDiffersFromRelease: e?.draftDiffersFromRelease ?? !0,
31
33
  ...e?.latestRelease ? { latestRelease: { id: e.latestRelease.id, number: e.latestRelease.number } } : {}
32
- }), De = (e) => ({
34
+ }), ft = (e) => ({
33
35
  processor: e.processor,
34
36
  settings: { ...e.settings ?? {} }
35
- }), je = (e) => ({
37
+ }), Rt = (e) => ({
36
38
  processor: e.processor,
37
39
  settings: e.settings
38
40
  });
39
- function ae(e) {
41
+ function Ge(e) {
40
42
  const n = e.content;
41
43
  return {
42
44
  id: e.id,
@@ -44,25 +46,25 @@ function ae(e) {
44
46
  name: n?.name ?? "",
45
47
  description: n?.description ?? "",
46
48
  entitySetId: n?.entitySetId ?? "",
47
- preprocessors: (n?.preprocessors ?? []).map(De),
49
+ preprocessors: (n?.preprocessors ?? []).map(ft),
48
50
  mappingIds: [...n?.mappingIds ?? []],
49
- postProcessors: (n?.postProcessors ?? []).map(De),
51
+ postProcessors: (n?.postProcessors ?? []).map(ft),
50
52
  autoPublish: n?.autoPublish ?? !1,
51
53
  deleteSourceFileOnSuccess: n?.deleteSourceFileOnSuccess ?? !1
52
54
  },
53
55
  // What an Import would meet now, not only what was decided at the save
54
56
  // (manage-import-profiles:AC6).
55
- validity: Ue(e.currentValidity ?? e.validity),
56
- state: ke(e.state)
57
+ validity: Ie(e.currentValidity ?? e.validity),
58
+ state: st(e.state)
57
59
  };
58
60
  }
59
- const Oe = (e) => Ze($t, {
61
+ const St = (e) => Qe(Ft, {
60
62
  ...e,
61
- preprocessors: e.preprocessors.map((n) => Ze(Te, je(n))),
62
- postProcessors: e.postProcessors.map((n) => Ze(Te, je(n)))
63
+ preprocessors: e.preprocessors.map((n) => Qe(yt, Rt(n))),
64
+ postProcessors: e.postProcessors.map((n) => Qe(yt, Rt(n)))
63
65
  });
64
- function re(e) {
65
- const n = e.content ? Vt(rt, e.content) : { name: "", blueprintId: "", blueprintReleaseId: "" };
66
+ function Ae(e) {
67
+ const n = e.content ? we(lt, e.content) : { name: "", blueprintId: "", blueprintReleaseId: "" };
66
68
  return {
67
69
  id: e.id,
68
70
  content: {
@@ -71,12 +73,12 @@ function re(e) {
71
73
  blueprintId: n.blueprintId ?? "",
72
74
  blueprintReleaseId: n.blueprintReleaseId ?? ""
73
75
  },
74
- validity: Ue(e.currentValidity ?? e.validity),
75
- state: ke(e.state)
76
+ validity: Ie(e.currentValidity ?? e.validity),
77
+ state: st(e.state)
76
78
  };
77
79
  }
78
- const _e = (e) => Rt(rt, e, { ignoreUnknownFields: !1 });
79
- function ce(e) {
80
+ const vt = (e) => Tt(lt, e, { ignoreUnknownFields: !1 });
81
+ function Ze(e) {
80
82
  return {
81
83
  id: e.id,
82
84
  content: {
@@ -84,195 +86,315 @@ function ce(e) {
84
86
  description: e.content?.description ?? "",
85
87
  entities: { ...e.content?.entities ?? {} }
86
88
  },
87
- validity: Ue(e.validity),
88
- state: ke(e.state)
89
+ validity: Ie(e.validity),
90
+ state: st(e.state)
89
91
  };
90
92
  }
91
- function on(e) {
92
- const n = nt.from(e);
93
- if (n.code === Ee.FailedPrecondition) {
94
- const [l] = n.findDetails(Ot);
93
+ const zt = (e) => e ? Dt(e).toISOString() : "", Je = (e) => ({
94
+ id: e?.id ?? "",
95
+ number: e?.number ?? 0,
96
+ revisionId: e?.revisionId ?? "",
97
+ releasedBy: e?.releasedBy ?? "",
98
+ releasedAt: zt(e?.releasedAt)
99
+ }), Kn = (e) => ({
100
+ id: e.id,
101
+ savedBy: e.savedBy,
102
+ savedAt: zt(e.savedAt),
103
+ validity: Ie(e.validity),
104
+ restoredFromRevisionId: e.restoredFromRevisionId
105
+ }), He = (e) => ({
106
+ revisions: e.revisions.map(Kn),
107
+ releases: e.releases.map(Je),
108
+ nextPageToken: e.nextPageToken
109
+ }), Pn = {
110
+ [ae.UNSPECIFIED]: "changed",
111
+ [ae.UNCHANGED]: "unchanged",
112
+ [ae.ADDED]: "added",
113
+ [ae.REMOVED]: "removed",
114
+ [ae.CHANGED]: "changed"
115
+ }, It = (e, n) => ({
116
+ revisionId: e?.revisionId ?? "",
117
+ content: e?.content ? n(e.content) : {}
118
+ }), Le = { useProtoFieldName: !0, alwaysEmitImplicit: !0 }, Te = (e, n) => ({
119
+ from: It(e.from, n),
120
+ to: It(e.to, n),
121
+ fields: e.fields.map((l) => ({ field: l.field, status: Pn[l.status] ?? "changed" }))
122
+ });
123
+ function Kt(e) {
124
+ const n = $e.from(e);
125
+ if (n.code === Fe.FailedPrecondition) {
126
+ const [l] = n.findDetails(Nn);
95
127
  if (l)
96
- throw new it(
128
+ throw new Bt(
97
129
  l.importProfiles.map((i) => ({ id: i.id, name: i.name })),
98
130
  n.rawMessage
99
131
  );
100
132
  }
101
- throw n.code === Ee.AlreadyExists ? new We(n.rawMessage) : n;
133
+ throw n.code === Fe.AlreadyExists ? new Oe(n.rawMessage) : n;
134
+ }
135
+ async function Mn(e) {
136
+ try {
137
+ return await e();
138
+ } catch (n) {
139
+ const l = $e.from(n);
140
+ if (l.code === Fe.FailedPrecondition) {
141
+ const [i] = l.findDetails(wn);
142
+ throw new Wt(l.rawMessage, i ? Ie(i) : void 0);
143
+ }
144
+ Kt(n);
145
+ }
102
146
  }
103
- async function f(e) {
147
+ async function W(e) {
104
148
  try {
105
149
  return await e();
106
150
  } catch (n) {
107
- on(n);
151
+ Kt(n);
108
152
  }
109
153
  }
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);
154
+ function Zl(e) {
155
+ const n = e.transport ?? jt({ baseUrl: e.baseUrl, fetch: e.fetch }), l = Ve(Yn, n), i = Ve(zn, n), a = Ve(Un, n), o = Ve(Fn, n);
112
156
  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))
157
+ listImportProfiles: () => W(async () => (await l.listImportProfiles({})).importProfiles.map(Ge)),
158
+ getImportProfile: (s) => W(
159
+ async () => Ge(q((await l.getImportProfile({ id: s })).importProfile))
116
160
  ),
117
- createImportProfile: (o) => f(
118
- async () => ae(
119
- k(
120
- (await l.createImportProfile({ content: Oe(o) })).importProfile
161
+ createImportProfile: (s) => W(
162
+ async () => Ge(
163
+ q(
164
+ (await l.createImportProfile({ content: St(s) })).importProfile
121
165
  )
122
166
  )
123
167
  ),
124
- updateImportProfile: (o, c, p) => f(
125
- async () => ae(
126
- k(
168
+ updateImportProfile: (s, c, p) => W(
169
+ async () => Ge(
170
+ q(
127
171
  (await l.updateImportProfile({
128
- id: o,
129
- content: Oe(c),
172
+ id: s,
173
+ content: St(c),
130
174
  draftRevisionId: p
131
175
  })).importProfile
132
176
  )
133
177
  )
134
178
  ),
135
- deleteImportProfile: (o) => f(async () => {
136
- await l.deleteImportProfile({ id: o });
179
+ deleteImportProfile: (s) => W(async () => {
180
+ await l.deleteImportProfile({ id: s });
137
181
  }),
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
182
+ listProcessors: () => W(
183
+ async () => (await i.listProcessors({})).processors.map((s) => ({
184
+ name: s.name,
185
+ kind: s.kind === Ut.POST_PROCESSOR ? "post_processor" : "preprocessor",
186
+ target: s.target === kt.RICH_TEXT_FIELD ? "rich_text_field" : "source_file",
187
+ description: s.description,
188
+ settingsSpec: s.settingsSpec
145
189
  }))
146
190
  ),
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
191
+ listMappings: () => W(async () => (await a.listMappings({})).mappings.map(Ae)),
192
+ getMapping: (s) => W(async () => Ae(q((await a.getMapping({ id: s })).mapping))),
193
+ createMapping: (s) => W(
194
+ async () => Ae(
195
+ q(
196
+ (await a.createMapping({ content: vt(s) })).mapping
153
197
  )
154
198
  )
155
199
  ),
156
- updateMapping: (o, c, p) => f(
157
- async () => re(
158
- k(
200
+ updateMapping: (s, c, p) => W(
201
+ async () => Ae(
202
+ q(
159
203
  (await a.updateMapping({
160
- id: o,
161
- content: _e(c),
204
+ id: s,
205
+ content: vt(c),
162
206
  draftRevisionId: p
163
207
  })).mapping
164
208
  )
165
209
  )
166
210
  ),
167
- deleteMapping: (o) => f(async () => {
168
- await a.deleteMapping({ id: o });
211
+ deleteMapping: (s) => W(async () => {
212
+ await a.deleteMapping({ id: s });
169
213
  }),
170
- listMappingImportProfiles: (o) => f(
171
- async () => (await a.listMappingImportProfiles({ id: o })).importProfiles.map((c) => ({
214
+ listMappingImportProfiles: (s) => W(
215
+ async () => (await a.listMappingImportProfiles({ id: s })).importProfiles.map((c) => ({
172
216
  id: c.id,
173
217
  name: c.name
174
218
  }))
175
219
  ),
176
- checkMappingBlueprintRelease: (o, c) => f(async () => {
177
- const p = await a.checkMappingBlueprintRelease({ id: o, blueprintReleaseId: c });
220
+ checkMappingBlueprintRelease: (s, c) => W(async () => {
221
+ const p = await a.checkMappingBlueprintRelease({ id: s, blueprintReleaseId: c });
178
222
  return {
179
223
  blueprintId: p.blueprintId,
180
224
  missingFieldPaths: [...p.missingFieldPaths],
181
225
  missingReleaseSpecFields: [...p.missingReleaseSpecFields]
182
226
  };
183
227
  }),
184
- listEntitySets: () => f(async () => (await s.listEntitySets({})).entitySets.map(ce)),
185
- getEntitySet: (o) => f(
186
- async () => ce(k((await s.getEntitySet({ id: o })).entitySet))
228
+ listEntitySets: () => W(async () => (await o.listEntitySets({})).entitySets.map(Ze)),
229
+ getEntitySet: (s) => W(
230
+ async () => Ze(q((await o.getEntitySet({ id: s })).entitySet))
187
231
  ),
188
- createEntitySet: (o) => f(
189
- async () => ce(k((await s.createEntitySet({ content: o })).entitySet))
232
+ createEntitySet: (s) => W(
233
+ async () => Ze(q((await o.createEntitySet({ content: s })).entitySet))
190
234
  ),
191
- updateEntitySet: (o, c, p) => f(
192
- async () => ce(
193
- k(
194
- (await s.updateEntitySet({ id: o, content: c, draftRevisionId: p })).entitySet
235
+ updateEntitySet: (s, c, p) => W(
236
+ async () => Ze(
237
+ q(
238
+ (await o.updateEntitySet({ id: s, content: c, draftRevisionId: p })).entitySet
195
239
  )
196
240
  )
197
241
  ),
198
- deleteEntitySet: (o) => f(async () => {
199
- await s.deleteEntitySet({ id: o });
242
+ deleteEntitySet: (s) => W(async () => {
243
+ await o.deleteEntitySet({ id: s });
244
+ }),
245
+ // One RPC per kind of configuration, each on its own service (the
246
+ // protos have no configuration service: a client always knows which
247
+ // kind it looks at); the screens ask by kind.
248
+ cutRelease: (s, c, p) => Mn(async () => {
249
+ const r = { id: c, draftRevisionId: p };
250
+ switch (s) {
251
+ case "importProfile":
252
+ return {
253
+ release: Je((await l.cutImportProfileRelease(r)).release),
254
+ importProfiles: []
255
+ };
256
+ case "mapping": {
257
+ const u = await a.cutMappingRelease(r);
258
+ return {
259
+ release: Je(u.release),
260
+ importProfiles: u.importProfiles.map((d) => ({ id: d.id, name: d.name }))
261
+ };
262
+ }
263
+ case "entitySet":
264
+ return {
265
+ release: Je((await o.cutEntitySetRelease(r)).release),
266
+ importProfiles: []
267
+ };
268
+ }
269
+ }),
270
+ listHistory: (s, c, p) => W(async () => {
271
+ const r = { id: c, pageToken: p };
272
+ switch (s) {
273
+ case "importProfile":
274
+ return He(await l.listImportProfileHistory(r));
275
+ case "mapping":
276
+ return He(await a.listMappingHistory(r));
277
+ case "entitySet":
278
+ return He(await o.listEntitySetHistory(r));
279
+ }
280
+ }),
281
+ compareRevisions: (s, c, p, r) => W(async () => {
282
+ const u = { id: c, fromRevisionId: p, toRevisionId: r };
283
+ switch (s) {
284
+ case "importProfile":
285
+ return Te(
286
+ await l.compareImportProfileRevisions(u),
287
+ (d) => we(Ft, d, Le)
288
+ );
289
+ case "mapping":
290
+ return Te(
291
+ await a.compareMappingRevisions(u),
292
+ (d) => we(lt, d, Le)
293
+ );
294
+ case "entitySet":
295
+ return Te(
296
+ await o.compareEntitySetRevisions(u),
297
+ (d) => we(Jn, d, Le)
298
+ );
299
+ }
300
+ }),
301
+ restoreRevision: (s, c, p, r) => W(async () => {
302
+ const u = { id: c, revisionId: p, draftRevisionId: r };
303
+ switch (s) {
304
+ case "importProfile":
305
+ await l.restoreImportProfileRevision(u);
306
+ return;
307
+ case "mapping":
308
+ await a.restoreMappingRevision(u);
309
+ return;
310
+ case "entitySet":
311
+ await o.restoreEntitySetRevision(u);
312
+ return;
313
+ }
200
314
  })
201
315
  };
202
316
  }
203
- function k(e) {
317
+ function q(e) {
204
318
  if (e === void 0)
205
- throw new nt("importhub answered without a message", Ee.Internal);
319
+ throw new $e("importhub answered without a message", Fe.Internal);
206
320
  return e;
207
321
  }
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,
322
+ const xn = { 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." } }, Qn = { loading: "Wird geladen…", error: "Das konnte nicht geladen werden. Versuchen Sie es gleich noch einmal." }, Hn = { open: "Change Set in contenthub öffnen" }, Ln = { cancel: "Abbrechen", delete: "Löschen", create: "Anlegen", save: "Speichern", apply: "Übernehmen", close: "Schließen" }, Tn = { name: "Name", description: "Beschreibung" }, Dn = { column: "Gültigkeit", valid: "Gültig", invalid: "Ungültig", invalidTitle: "Diese Konfiguration ist ungültig und kann nicht freigegeben werden:" }, jn = { column: "Letztes Release", number: "Release {{number}}", none: "Noch kein Release", state: { none: "Noch nicht freigegeben", differs: "Entwurf weicht von Release {{number}} ab", current: "Release {{number}} ist aktuell" } }, On = { nameTaken: "Dieser Name ist schon vergeben.", nameRequired: "Ein Name ist erforderlich.", failed: "Es konnte nicht angelegt werden. Versuchen Sie es gleich noch einmal." }, _n = { failed: "Die Änderungen konnten nicht gespeichert werden." }, qn = { title: "Details", actions: "Aktionen" }, $n = { moveUp: "{{name}} nach oben", moveDown: "{{name}} nach unten", remove: "{{name}} entfernen" }, ei = { 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." }, ti = { 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" }, ni = { 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." }, ii = { 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." }, li = { settings: "Einstellungen", history: "Verlauf" }, si = { action: "Release erstellen", title: "Release erstellen", confirm: "Release erstellen", message: "Der gespeicherte Entwurf wird als Release {{number}} freigegeben. Echte Importe verwenden ihn ab ihrem nächsten Start.", unchanged: "Der Entwurf entspricht Release {{number}}: Es gibt nichts freizugeben.", unsaved: "Nicht gespeicherte Änderungen auf dieser Seite gehören nicht zum Release. Speichern Sie sie zuerst, um sie freizugeben.", profilesIntro: "Diese Importprofile enthalten das Mapping und übernehmen das Release bei ihrem nächsten Import:", profiles: "Importprofile, die dieses Release übernehmen", noProfiles: "Noch kein Importprofil enthält das Mapping.", refused: "importhub hat das Release nicht erstellt:", failed: "Das Release konnte nicht erstellt werden. Versuchen Sie es gleich noch einmal.", done: "Release {{number}} ist erstellt.", doneBody: "Echte Importe verwenden es ab ihrem nächsten Start." }, oi = { hint: "Jedes Speichern ist eine Revision. Wählen Sie zwei aus, um sie nebeneinander zu vergleichen.", none: "Noch keine Revisionen.", loadMore: "Ältere Revisionen laden", columns: { revision: "Revision", release: "Release", savedBy: "Gespeichert von", savedAt: "Gespeichert" }, draft: "Entwurf", revision: "Früherer Entwurf", revisionOf: "Revision vom {{time}}", restoredFrom: "Wiederhergestellt aus {{revision}}", cutBy: "Erstellt von {{name}}, {{time}}.", unknownPerson: "Jemand, der nicht mehr im Workspace ist", restore: "Als Entwurf wiederherstellen", restoreTitle: "{{revision}} wiederherstellen?", restoreConfirm: "Wiederherstellen", restoreMessage: "Ihr Inhalt wird als neuer Entwurf gespeichert. Echte Importe verwenden weiter das neueste Release, bis Sie ein neues erstellen.", restoreFailed: "Sie konnte nicht wiederhergestellt werden.", olderRelease: "{{release}} wurde von {{name}} am {{time}} aus einer älteren Revision erstellt: Laden Sie ältere Revisionen, um sie zu sehen.", earlierRevision: "Eine frühere Revision" }, ri = { title: "Vergleich", between: "{{from}} verglichen mit {{to}}", field: "Feld", same: "Die beiden Revisionen sind gleich.", differing_one: "Ein Feld unterscheidet sich.", differing_other: "{{count}} Felder unterscheiden sich.", status: { unchanged: "Unverändert", added: "Hinzugefügt", removed: "Entfernt", changed: "Geändert" }, absent: "Nicht gesetzt", missingEntitySet: "Ein Entity Set, das nicht mehr existiert", yes: "Ja", no: "Nein" }, ai = {
323
+ section: xn,
324
+ startPage: Qn,
325
+ changeSet: Hn,
326
+ common: Ln,
327
+ fields: Tn,
328
+ validity: Dn,
329
+ release: jn,
216
330
  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,
331
+ create: On,
332
+ save: _n,
333
+ rail: qn,
334
+ order: $n,
335
+ profiles: ei,
336
+ processors: ti,
337
+ mappings: ni,
338
+ entitySets: ii,
339
+ tabs: li,
340
+ cut: si,
341
+ history: oi,
342
+ compare: ri
343
+ }, ci = { 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." } }, di = { loading: "Loading…", error: "This could not be loaded. Try again in a moment." }, ui = { open: "Open the Change Set in contenthub" }, pi = { cancel: "Cancel", delete: "Delete", create: "Create", save: "Save", apply: "Apply", close: "Close" }, mi = { name: "Name", description: "Description" }, gi = { column: "Validity", valid: "Valid", invalid: "Invalid", invalidTitle: "This configuration is invalid and cannot be released:" }, hi = { column: "Latest Release", number: "Release {{number}}", none: "No Release yet", state: { none: "Not released yet", differs: "Draft differs from Release {{number}}", current: "Release {{number}} is current" } }, bi = { nameTaken: "Another one already has this name.", nameRequired: "A name is required.", failed: "It could not be created. Try again in a moment." }, yi = { failed: "The changes could not be saved." }, fi = { title: "Details", actions: "Actions" }, Ri = { moveUp: "Move {{name}} up", moveDown: "Move {{name}} down", remove: "Remove {{name}}" }, Si = { 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." }, vi = { 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" }, Ii = { 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." }, Vi = { 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." }, Ei = { settings: "Settings", history: "History" }, Gi = { action: "Cut Release", title: "Cut a Release", confirm: "Cut Release", message: "The saved draft is released as Release {{number}}. Real Imports run it from their next Start.", unchanged: "The draft is the same as Release {{number}}: there is nothing to release.", unsaved: "Unsaved changes on this page are not part of the Release. Save them first to release them.", profilesIntro: "These Import Profiles include the Mapping and take the Release at their next Import:", profiles: "Import Profiles that take this Release", noProfiles: "No Import Profile includes the Mapping yet.", refused: "importhub did not cut the Release:", failed: "The Release could not be cut. Try again in a moment.", done: "Release {{number}} is cut.", doneBody: "Real Imports run it from their next Start." }, Ai = { hint: "Every save is a Revision. Choose two to compare them side by side.", none: "No Revisions yet.", loadMore: "Load older Revisions", columns: { revision: "Revision", release: "Release", savedBy: "Saved by", savedAt: "Saved" }, draft: "Draft", revision: "Earlier draft", revisionOf: "Revision of {{time}}", restoredFrom: "Restored from {{revision}}", cutBy: "Cut by {{name}}, {{time}}.", unknownPerson: "Someone no longer in the workspace", restore: "Restore as draft", restoreTitle: "Restore {{revision}}?", restoreConfirm: "Restore", restoreMessage: "Its content is saved as a new draft. Real Imports keep running the latest Release until you cut another.", restoreFailed: "It could not be restored.", olderRelease: "{{release}} was cut by {{name}}, {{time}}, from an older Revision: load older Revisions to see it.", earlierRevision: "An earlier Revision" }, Zi = { title: "Comparison", between: "{{from}} compared with {{to}}", field: "Field", same: "The two Revisions are the same.", differing_one: "One field differs.", differing_other: "{{count}} fields differ.", status: { unchanged: "Unchanged", added: "Added", removed: "Removed", changed: "Changed" }, absent: "Not set", missingEntitySet: "An Entity Set that no longer exists", yes: "Yes", no: "No" }, Xi = {
344
+ section: ci,
345
+ startPage: di,
346
+ changeSet: ui,
347
+ common: pi,
348
+ fields: mi,
349
+ validity: gi,
350
+ release: hi,
233
351
  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 = [
352
+ create: bi,
353
+ save: yi,
354
+ rail: fi,
355
+ order: Ri,
356
+ profiles: Si,
357
+ processors: vi,
358
+ mappings: Ii,
359
+ entitySets: Vi,
360
+ tabs: Ei,
361
+ cut: Gi,
362
+ history: Ai,
363
+ compare: Zi
364
+ }, S = "importhub-ui", Xl = {
365
+ en: { [S]: Xi },
366
+ de: { [S]: ai }
367
+ }, Wl = [
246
368
  "imports",
247
369
  "profiles",
248
370
  "mappings",
249
371
  "entitySets",
250
372
  "processors"
251
373
  ];
252
- function q(e, n, l) {
374
+ function se(e, n, l) {
253
375
  return `${e[n].replace(/\/$/, "")}/${encodeURIComponent(l)}`;
254
376
  }
255
- const kn = {
377
+ const Wi = {
256
378
  imports: "/imports",
257
379
  profiles: "/settings/import-profiles",
258
380
  mappings: "/settings/mappings",
259
381
  entitySets: "/settings/entity-sets",
260
382
  processors: "/settings/processors"
261
- }, zn = {
262
- paths: kn,
383
+ }, Bi = {
384
+ paths: Wi,
263
385
  changeSetHref: () => null
264
- }, pt = zt(zn);
265
- function Bi({ host: e, children: n }) {
266
- return /* @__PURE__ */ t(pt.Provider, { value: e, children: n });
386
+ }, Pt = yn(Bi);
387
+ function Bl({ host: e, children: n }) {
388
+ return /* @__PURE__ */ t(Pt.Provider, { value: e, children: n });
267
389
  }
268
- function J() {
269
- return Kt(pt);
390
+ function z() {
391
+ return fn(Pt);
270
392
  }
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: [
393
+ function Cl({ changeSetId: e }) {
394
+ const { t: n } = v(S), l = z().changeSetHref(e);
395
+ return l ? /* @__PURE__ */ g(be, { href: l, target: "_blank", rel: "noopener noreferrer", children: [
274
396
  n("changeSet.open"),
275
- /* @__PURE__ */ t(Et, { size: 14, "aria-hidden": !0 })
397
+ /* @__PURE__ */ t(nn, { size: 14, "aria-hidden": !0 })
276
398
  ] }) : null;
277
399
  }
278
400
  const h = {
@@ -286,30 +408,41 @@ const h = {
286
408
  entitySets: (e) => [...h.all(e), "entitySets"],
287
409
  entitySet: (e, n) => [...h.entitySets(e), n],
288
410
  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
411
+ blueprintReleases: (e, n) => [...h.blueprints(e), n, "releases"],
412
+ /** One configuration of a kind, as its page reads it. */
413
+ configuration: (e, n, l) => n === "importProfile" ? h.importProfile(e, l) : n === "mapping" ? h.mapping(e, l) : h.entitySet(e, l),
414
+ /** Every list of a kind, so one change refreshes them all. */
415
+ configurations: (e, n) => n === "importProfile" ? h.importProfiles(e) : n === "mapping" ? h.mappings(e) : h.entitySets(e),
416
+ history: (e, n, l) => [...h.configuration(e, n, l), "history"],
417
+ comparison: (e, n, l, i, a) => [
418
+ ...h.configuration(e, n, l),
419
+ "comparison",
420
+ i,
421
+ a
422
+ ]
423
+ }, Ci = {
424
+ imports: an,
425
+ profiles: rn,
426
+ mappings: on,
427
+ entitySets: sn,
428
+ processors: ln
296
429
  };
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,
430
+ function wl({ client: e, section: n }) {
431
+ const { t: l } = v(S), i = Ci[n];
432
+ return /* @__PURE__ */ t(fe, { title: l(`section.${n}.title`), children: /* @__PURE__ */ t(k, { px: "8", py: "6", children: /* @__PURE__ */ t(
433
+ et,
301
434
  {
302
435
  icon: /* @__PURE__ */ t(i, { size: 32, "aria-hidden": !0 }),
303
436
  header: l(`section.${n}.title`),
304
- description: /* @__PURE__ */ t(Mn, { client: e, section: n })
437
+ description: /* @__PURE__ */ t(wi, { client: e, section: n })
305
438
  }
306
439
  ) }) });
307
440
  }
308
- function Mn({ client: e, section: n }) {
441
+ function wi({ client: e, section: n }) {
309
442
  switch (n) {
310
443
  case "profiles":
311
444
  return /* @__PURE__ */ t(
312
- fe,
445
+ De,
313
446
  {
314
447
  section: n,
315
448
  queryKey: h.importProfiles,
@@ -318,7 +451,7 @@ function Mn({ client: e, section: n }) {
318
451
  );
319
452
  case "entitySets":
320
453
  return /* @__PURE__ */ t(
321
- fe,
454
+ De,
322
455
  {
323
456
  section: n,
324
457
  queryKey: h.entitySets,
@@ -327,7 +460,7 @@ function Mn({ client: e, section: n }) {
327
460
  );
328
461
  case "processors":
329
462
  return /* @__PURE__ */ t(
330
- fe,
463
+ De,
331
464
  {
332
465
  section: n,
333
466
  queryKey: h.processors,
@@ -335,238 +468,766 @@ function Mn({ client: e, section: n }) {
335
468
  }
336
469
  );
337
470
  default:
338
- return /* @__PURE__ */ t(xn, { section: n });
471
+ return /* @__PURE__ */ t(Ni, { section: n });
339
472
  }
340
473
  }
341
- function xn({ section: e }) {
342
- const { t: n } = V(S);
343
- return /* @__PURE__ */ t(x, { children: n(`section.${e}.empty`) });
474
+ function Ni({ section: e }) {
475
+ const { t: n } = v(S);
476
+ return /* @__PURE__ */ t(D, { children: n(`section.${e}.empty`) });
344
477
  }
345
- function fe({
478
+ function De({
346
479
  section: e,
347
480
  queryKey: n,
348
481
  read: l
349
482
  }) {
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 }) });
483
+ const { t: i } = v(S), { workspaceId: a } = w(), o = C({ queryKey: n(a), queryFn: l });
484
+ return o.isPending ? /* @__PURE__ */ t(Ct, { size: "sm", "aria-label": i("startPage.loading") }) : o.isError ? /* @__PURE__ */ t(D, { children: i("startPage.error") }) : /* @__PURE__ */ t(D, { children: i(`section.${e}.summary`, { count: o.data.length }) });
485
+ }
486
+ function ot() {
487
+ const { t: e } = v(S), [n, l] = Xn(), i = n.get("tab") === "history" ? "history" : "settings", a = (s) => {
488
+ const c = new URLSearchParams(n);
489
+ s === "history" ? c.set("tab", "history") : c.delete("tab"), l(c, { replace: !0 });
490
+ }, o = /* @__PURE__ */ t(Ee.Root, { value: i, onValueChange: (s) => a(s.value), children: /* @__PURE__ */ g(Ee.List, { children: [
491
+ /* @__PURE__ */ t(Ee.Trigger, { value: "settings", children: e("tabs.settings") }),
492
+ /* @__PURE__ */ t(Ee.Trigger, { value: "history", children: e("tabs.history") })
493
+ ] }) });
494
+ return [i, o];
352
495
  }
353
- function ze({
496
+ function rt({
354
497
  open: e,
355
498
  onClose: n,
356
499
  title: l,
357
500
  message: i,
358
501
  onDelete: a,
359
- onDeleted: s
502
+ onDeleted: o
360
503
  }) {
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;
504
+ const { t: s } = v(S), { paths: c } = z(), p = ee({ mutationFn: a, onSuccess: o }), { reset: r } = p;
505
+ j(() => {
506
+ e && r();
507
+ }, [e, r]);
508
+ const u = p.error instanceof Bt ? p.error : null;
366
509
  return /* @__PURE__ */ t(
367
- Se,
510
+ de,
368
511
  {
369
512
  open: e,
370
513
  onClose: n,
371
514
  header: l,
372
515
  lazyMount: !0,
373
516
  unmountOnExit: !0,
374
- footer: /* @__PURE__ */ b(U, { gap: "2", children: [
375
- /* @__PURE__ */ t(E, { variant: "outline", onClick: n, children: o("common.cancel") }),
517
+ footer: /* @__PURE__ */ g(L, { gap: "2", children: [
518
+ /* @__PURE__ */ t(B, { variant: "outline", onClick: n, children: s("common.cancel") }),
376
519
  /* @__PURE__ */ t(
377
- E,
520
+ B,
378
521
  {
379
522
  variant: "solid",
380
523
  colorPalette: "red",
381
524
  loading: p.isPending,
382
- disabled: m !== null,
525
+ disabled: u !== null,
383
526
  onClick: () => p.mutate(),
384
- children: o("common.delete")
527
+ children: s("common.delete")
385
528
  }
386
529
  )
387
530
  ] }),
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
531
+ children: /* @__PURE__ */ g(Z, { gap: "4", children: [
532
+ /* @__PURE__ */ t(E, { children: i }),
533
+ u ? /* @__PURE__ */ t(J, { status: "error", colorPalette: "danger", title: s("delete.inUse"), children: /* @__PURE__ */ t(H.Root, { ps: "4", children: u.importProfiles.map((d) => /* @__PURE__ */ t(H.Item, { children: /* @__PURE__ */ t(be, { asChild: !0, children: /* @__PURE__ */ t(Ke, { to: se(c, "profiles", d.id), children: d.name }) }) }, d.id)) }) }) : p.isError ? /* @__PURE__ */ t(J, { status: "error", colorPalette: "danger", title: s("delete.failed") }) : null
391
534
  ] })
392
535
  }
393
536
  );
394
537
  }
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") }) });
538
+ function Pe() {
539
+ const { t: e } = v(S);
540
+ return /* @__PURE__ */ t(Ot, { py: "12", children: /* @__PURE__ */ t(Ct, { "aria-label": e("startPage.loading") }) });
398
541
  }
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") }) });
542
+ function oe() {
543
+ const { t: e } = v(S);
544
+ return /* @__PURE__ */ t(k, { px: "8", py: "6", children: /* @__PURE__ */ t(et, { icon: /* @__PURE__ */ t(cn, { size: 32, "aria-hidden": !0 }), header: e("startPage.error") }) });
402
545
  }
403
- function $() {
404
- return J().canConfigure ?? !1;
546
+ function at({ state: e }) {
547
+ const { t: n } = v(S);
548
+ if (!e.latestRelease)
549
+ return /* @__PURE__ */ t(ne, { tone: "warning", label: n("release.state.none") });
550
+ const l = e.latestRelease.number;
551
+ return e.draftDiffersFromRelease ? /* @__PURE__ */ t(ne, { tone: "warning", label: n("release.state.differs", { number: l }) }) : /* @__PURE__ */ t(ne, { tone: "success", label: n("release.state.current", { number: l }) });
405
552
  }
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}`)) }) });
553
+ function re() {
554
+ return z().canConfigure ?? !1;
409
555
  }
410
- const Qn = (e) => ({
556
+ function Me({ validity: e }) {
557
+ const { t: n } = v(S);
558
+ return e.valid ? null : /* @__PURE__ */ t(J, { status: "error", colorPalette: "danger", title: n("validity.invalidTitle"), children: /* @__PURE__ */ t(H.Root, { ps: "4", children: e.reasons.map((l) => /* @__PURE__ */ t(H.Item, { children: l.message }, `${l.code}:${l.path}:${l.message}`)) }) });
559
+ }
560
+ const Ji = (e) => ({
411
561
  [e("validity.valid")]: "success",
412
562
  [e("validity.invalid")]: "danger"
413
563
  });
414
- function Me({ validity: e }) {
415
- const { t: n } = V(S);
564
+ function xe({ validity: e }) {
565
+ const { t: n } = v(S);
416
566
  return /* @__PURE__ */ t(
417
- Qt,
567
+ wt,
418
568
  {
419
569
  value: e.valid ? n("validity.valid") : n("validity.invalid"),
420
- toneMap: Qn(n),
570
+ toneMap: Ji(n),
421
571
  detail: e.valid ? null : e.reasons.map((l) => l.message).join(" ")
422
572
  }
423
573
  );
424
574
  }
425
- function oe(e, n) {
575
+ function Mt(e, n) {
426
576
  return e.latestRelease ? n("release.number", { number: e.latestRelease.number }) : n("release.none");
427
577
  }
428
- const Xe = (e) => ({
578
+ function Fi({
579
+ open: e,
580
+ onClose: n,
581
+ client: l,
582
+ kind: i,
583
+ id: a,
584
+ validity: o,
585
+ state: s,
586
+ unsaved: c,
587
+ onCut: p
588
+ }) {
589
+ const { t: r } = v(S), { workspaceId: u } = w(), d = te(), m = ee({
590
+ mutationFn: () => l.cutRelease(i, a, s.draftRevisionId),
591
+ onSuccess: p,
592
+ // A refusal means the page's draft is not importhub's (somebody saved
593
+ // in between, or its validity changed): read it again, so the next
594
+ // opening shows where it stands and cuts the draft that is there.
595
+ onError: () => {
596
+ d.invalidateQueries({
597
+ queryKey: h.configuration(u, i, a)
598
+ });
599
+ }
600
+ }), { reset: f } = m;
601
+ j(() => {
602
+ e && f();
603
+ }, [e, f]);
604
+ const b = C({
605
+ queryKey: h.mappingImportProfiles(u, a),
606
+ queryFn: () => l.listMappingImportProfiles(a),
607
+ enabled: e && i === "mapping"
608
+ }), y = (s.latestRelease?.number ?? 0) + 1, R = s.latestRelease !== void 0 && !s.draftDiffersFromRelease, N = o.valid && !R, F = m.error instanceof Wt ? m.error : null;
609
+ return /* @__PURE__ */ t(
610
+ de,
611
+ {
612
+ open: e,
613
+ onClose: n,
614
+ header: r("cut.title"),
615
+ lazyMount: !0,
616
+ unmountOnExit: !0,
617
+ footer: /* @__PURE__ */ g(L, { gap: "2", children: [
618
+ /* @__PURE__ */ t(B, { variant: "outline", onClick: n, children: r(N ? "common.cancel" : "common.close") }),
619
+ N ? /* @__PURE__ */ t(
620
+ B,
621
+ {
622
+ variant: "solid",
623
+ loading: m.isPending,
624
+ disabled: F !== null,
625
+ onClick: () => m.mutate(),
626
+ children: r("cut.confirm")
627
+ }
628
+ ) : null
629
+ ] }),
630
+ children: /* @__PURE__ */ g(Z, { gap: "4", children: [
631
+ o.valid ? R ? /* @__PURE__ */ t(
632
+ J,
633
+ {
634
+ status: "info",
635
+ colorPalette: "info",
636
+ title: r("cut.unchanged", { number: s.latestRelease?.number })
637
+ }
638
+ ) : /* @__PURE__ */ g(D, { children: [
639
+ /* @__PURE__ */ t(E, { children: r("cut.message", { number: y }) }),
640
+ c ? /* @__PURE__ */ t(J, { status: "warning", colorPalette: "warning", title: r("cut.unsaved") }) : null,
641
+ i === "mapping" ? /* @__PURE__ */ t(Yi, { query: b }) : null
642
+ ] }) : /* @__PURE__ */ t(Me, { validity: o }),
643
+ F && o.valid ? /* @__PURE__ */ t(J, { status: "error", colorPalette: "danger", title: r("cut.refused"), children: F.validity && !F.validity.valid ? /* @__PURE__ */ t(H.Root, { ps: "4", children: F.validity.reasons.map((Y) => /* @__PURE__ */ t(H.Item, { children: Y.message }, `${Y.code}:${Y.path}:${Y.message}`)) }) : F.message }) : m.isError && !F ? /* @__PURE__ */ t(J, { status: "error", colorPalette: "danger", title: r("cut.failed") }) : null
644
+ ] })
645
+ }
646
+ );
647
+ }
648
+ function Yi({
649
+ query: e
650
+ }) {
651
+ const { t: n } = v(S), { paths: l } = z();
652
+ return e.isError ? /* @__PURE__ */ t(E, { color: "fg.muted", children: n("startPage.error") }) : e.data ? e.data.length === 0 ? /* @__PURE__ */ t(E, { children: n("cut.noProfiles") }) : /* @__PURE__ */ g(Z, { gap: "2", children: [
653
+ /* @__PURE__ */ t(E, { children: n("cut.profilesIntro") }),
654
+ /* @__PURE__ */ t(H.Root, { ps: "4", "aria-label": n("cut.profiles"), children: e.data.map((i) => /* @__PURE__ */ t(H.Item, { children: /* @__PURE__ */ t(be, { asChild: !0, children: /* @__PURE__ */ t(Ke, { to: se(l, "profiles", i.id), children: i.name }) }) }, i.id)) })
655
+ ] }) : /* @__PURE__ */ t(E, { color: "fg.muted", children: n("startPage.loading") });
656
+ }
657
+ function ct({
658
+ client: e,
659
+ kind: n,
660
+ id: l,
661
+ validity: i,
662
+ state: a,
663
+ unsaved: o
664
+ }) {
665
+ const { t: s } = v(S), { workspaceId: c } = w(), p = te(), [r, u] = P(!1), [d, m] = P(null);
666
+ return {
667
+ railAction: /* @__PURE__ */ t(
668
+ K.IconButton,
669
+ {
670
+ label: s("cut.action"),
671
+ icon: /* @__PURE__ */ t(dn, { size: 16 }),
672
+ onClick: () => {
673
+ m(null), u(!0);
674
+ }
675
+ }
676
+ ),
677
+ dialog: /* @__PURE__ */ t(
678
+ Fi,
679
+ {
680
+ open: r,
681
+ onClose: () => u(!1),
682
+ client: e,
683
+ kind: n,
684
+ id: l,
685
+ validity: i,
686
+ state: a,
687
+ unsaved: o,
688
+ onCut: (f) => {
689
+ u(!1), m(f.release.number), p.invalidateQueries({
690
+ queryKey: h.configuration(c, n, l)
691
+ }), p.invalidateQueries({
692
+ queryKey: h.configurations(c, n)
693
+ }), n === "mapping" && p.invalidateQueries({
694
+ queryKey: h.importProfiles(c)
695
+ });
696
+ }
697
+ }
698
+ ),
699
+ notice: d === null ? null : /* @__PURE__ */ t(J, { status: "success", colorPalette: "success", title: s("cut.done", { number: d }), children: s("cut.doneBody") })
700
+ };
701
+ }
702
+ function dt(e) {
703
+ const { blueprints: n } = z(), { workspaceId: l } = w(), i = [...new Set(e.filter(Boolean))].sort(), a = C({
704
+ queryKey: h.blueprints(l),
705
+ queryFn: () => n?.listBlueprints() ?? Promise.resolve([]),
706
+ enabled: n !== void 0
707
+ }), o = Sn({
708
+ queries: i.map((r) => ({
709
+ queryKey: h.blueprintReleases(l, r),
710
+ queryFn: () => n?.listReleases(r) ?? Promise.resolve([]),
711
+ enabled: n !== void 0
712
+ }))
713
+ }), s = o.map((r) => r.data), c = o.map((r) => r.dataUpdatedAt).join(), p = i.join();
714
+ return x(
715
+ () => ({
716
+ available: n !== void 0,
717
+ blueprintName: (r) => a.data?.find((u) => u.id === r)?.name,
718
+ releaseLabel: (r, u) => s[i.indexOf(r)]?.find((d) => d.id === u)?.label
719
+ }),
720
+ [n, a.data, c, p]
721
+ );
722
+ }
723
+ const Ui = {
724
+ unchanged: "neutral",
725
+ added: "success",
726
+ removed: "danger",
727
+ changed: "warning"
728
+ }, ki = {
729
+ name: "fields.name",
730
+ description: "fields.description",
731
+ entities: "entitySets.entities",
732
+ entity_set_id: "profiles.entitySet",
733
+ preprocessors: "profiles.preprocessors",
734
+ mapping_ids: "profiles.mappings",
735
+ post_processors: "profiles.postProcessors",
736
+ auto_publish: "profiles.autoPublish",
737
+ delete_source_file_on_success: "profiles.deleteOnSuccess",
738
+ blueprint_id: "mappings.blueprint",
739
+ blueprint_release_id: "mappings.release",
740
+ element_selector: "mappings.elementSelector"
741
+ }, _e = {
742
+ blueprint_id: "mappings.blueprintId",
743
+ blueprint_release_id: "mappings.releaseId"
744
+ };
745
+ function zi({
746
+ client: e,
747
+ kind: n,
748
+ id: l,
749
+ fromRevisionId: i,
750
+ toRevisionId: a,
751
+ labelOf: o
752
+ }) {
753
+ const { t: s } = v(S), { workspaceId: c } = w(), p = C({
754
+ queryKey: h.comparison(c, n, l, i, a),
755
+ queryFn: () => e.compareRevisions(n, l, i, a)
756
+ }), { format: r, blueprintIdsOnly: u } = Ki(e, n, p.data), d = (R) => u && R in _e ? _e[R] : ki[R], m = [...p.data?.fields ?? []].sort(
757
+ (R, N) => +(R.status === "unchanged") - +(N.status === "unchanged")
758
+ ), f = m.filter((R) => R.status !== "unchanged").length, b = o(i), y = o(a);
759
+ return /* @__PURE__ */ t(k, { as: "section", "aria-label": s("compare.title"), children: /* @__PURE__ */ t(O, { title: s("compare.title"), children: /* @__PURE__ */ g(Z, { gap: "3", children: [
760
+ /* @__PURE__ */ t(E, { children: s("compare.between", { from: b, to: y }) }),
761
+ p.isError ? /* @__PURE__ */ t(J, { status: "error", colorPalette: "danger", title: s("startPage.error") }) : null,
762
+ p.data ? /* @__PURE__ */ g(D, { children: [
763
+ /* @__PURE__ */ t(E, { color: "fg.muted", children: f === 0 ? s("compare.same") : s("compare.differing", { count: f }) }),
764
+ /* @__PURE__ */ g(T.Root, { size: "sm", children: [
765
+ /* @__PURE__ */ t(T.Header, { children: /* @__PURE__ */ g(T.Row, { children: [
766
+ /* @__PURE__ */ t(T.ColumnHeader, { children: s("compare.field") }),
767
+ /* @__PURE__ */ t(T.ColumnHeader, { children: b }),
768
+ /* @__PURE__ */ t(T.ColumnHeader, { children: y })
769
+ ] }) }),
770
+ /* @__PURE__ */ t(T.Body, { children: m.map((R) => /* @__PURE__ */ g(T.Row, { verticalAlign: "top", children: [
771
+ /* @__PURE__ */ t(T.Cell, { as: "th", scope: "row", fontWeight: "normal", children: /* @__PURE__ */ g(Z, { gap: "1", align: "start", children: [
772
+ /* @__PURE__ */ t(E, { fontWeight: "medium", children: d(R.field) ? s(d(R.field)) : R.field }),
773
+ /* @__PURE__ */ t(
774
+ ne,
775
+ {
776
+ tone: Ui[R.status],
777
+ label: s(`compare.status.${R.status}`)
778
+ }
779
+ )
780
+ ] }) }),
781
+ /* @__PURE__ */ t(T.Cell, { children: /* @__PURE__ */ t(Vt, { text: r(R.field, "from") }) }),
782
+ /* @__PURE__ */ t(T.Cell, { children: /* @__PURE__ */ t(Vt, { text: r(R.field, "to") }) })
783
+ ] }, R.field)) })
784
+ ] })
785
+ ] }) : p.isError ? null : /* @__PURE__ */ t(E, { color: "fg.muted", children: s("startPage.loading") })
786
+ ] }) }) });
787
+ }
788
+ function Vt({ text: e }) {
789
+ const { t: n } = v(S);
790
+ return e === null ? /* @__PURE__ */ t(E, { color: "fg.muted", children: n("compare.absent") }) : "plain" in e ? /* @__PURE__ */ t(E, { whiteSpace: "pre-wrap", children: e.plain }) : "code" in e ? /* @__PURE__ */ t(me, { children: e.code }) : /* @__PURE__ */ t(me, { display: "block", whiteSpace: "pre-wrap", p: "2", children: e.json });
791
+ }
792
+ function Ki(e, n, l) {
793
+ const { t: i } = v(S), { workspaceId: a } = w(), o = n === "importProfile", s = C({
794
+ queryKey: h.mappings(a),
795
+ queryFn: () => e.listMappings(),
796
+ enabled: o
797
+ }), c = C({
798
+ queryKey: h.entitySets(a),
799
+ queryFn: () => e.listEntitySets(),
800
+ enabled: o
801
+ }), p = n === "mapping" && l ? [l.from.content.blueprint_id, l.to.content.blueprint_id].map((m) => String(m ?? "")) : [], r = dt(p), u = n === "mapping" && !r.available;
802
+ return { format: (m, f) => {
803
+ const b = l?.[f].content ?? {}, y = b[m];
804
+ if (y == null) return null;
805
+ if (o && m === "mapping_ids" && Array.isArray(y))
806
+ return y.length === 0 ? { plain: i("profiles.noMappings") } : {
807
+ plain: y.map(
808
+ (R) => s.data?.find((N) => N.id === R)?.content.name ?? i("profiles.missingMapping")
809
+ ).join(`
810
+ `)
811
+ };
812
+ if (o && m === "entity_set_id")
813
+ return y === "" ? { plain: i("profiles.noEntitySet") } : {
814
+ plain: c.data?.find((R) => R.id === y)?.content.name ?? i("compare.missingEntitySet")
815
+ };
816
+ if (u && m in _e)
817
+ return y === "" ? { plain: "—" } : { code: String(y) };
818
+ if (n === "mapping" && r.available && m === "blueprint_id")
819
+ return { plain: r.blueprintName(String(y)) ?? "…" };
820
+ if (n === "mapping" && r.available && m === "blueprint_release_id") {
821
+ const R = String(b.blueprint_id ?? "");
822
+ return { plain: r.releaseLabel(R, String(y)) ?? "…" };
823
+ }
824
+ return typeof y == "string" ? { plain: y === "" ? "—" : y } : typeof y == "boolean" ? { plain: i(y ? "compare.yes" : "compare.no") } : typeof y == "number" ? { plain: String(y) } : { json: JSON.stringify(y, null, 2) };
825
+ }, blueprintIdsOnly: u };
826
+ }
827
+ const Pi = "YYYY-MM-DD HH:mm", Xe = (e) => String(e).padStart(2, "0");
828
+ function Et(e) {
829
+ const n = new Date(e);
830
+ return Number.isNaN(n.getTime()) ? "" : `${n.getFullYear()}-${Xe(n.getMonth() + 1)}-${Xe(n.getDate())} ${Xe(n.getHours())}:${Xe(n.getMinutes())}`;
831
+ }
832
+ function Mi(e, n, l) {
833
+ const { t: i } = v(S);
834
+ return x(
835
+ () => ({
836
+ of: (a) => {
837
+ if (a === l) return i("history.draft");
838
+ const o = n.find((c) => c.revisionId === a);
839
+ if (o) return i("release.number", { number: o.number });
840
+ const s = e.find((c) => c.id === a);
841
+ return s ? i("history.revisionOf", { time: Et(s.savedAt) }) : i("history.earlierRevision");
842
+ },
843
+ time: Et
844
+ }),
845
+ [i, e, n, l]
846
+ );
847
+ }
848
+ function ut({
849
+ client: e,
850
+ kind: n,
851
+ id: l,
852
+ draftRevisionId: i,
853
+ onRestored: a
854
+ }) {
855
+ const { t: o } = v(S), { workspaceId: s, members: c } = w(), p = re(), r = vn({
856
+ queryKey: h.history(s, n, l),
857
+ queryFn: ({ pageParam: I }) => e.listHistory(n, l, I),
858
+ initialPageParam: "",
859
+ getNextPageParam: (I) => I.nextPageToken || void 0
860
+ }), u = x(
861
+ () => (r.data?.pages ?? []).flatMap((I) => I.revisions),
862
+ [r.data]
863
+ ), d = x(() => r.data?.pages[0]?.releases ?? [], [r.data]), m = Mi(u, d, i), [f, b] = P(null), [y, R] = P([]), N = x(
864
+ () => Object.fromEntries(y.map((I) => [I, !0])),
865
+ [y]
866
+ ), F = (I) => R((M) => {
867
+ const G = Object.fromEntries(M.map((ie) => [ie, !0])), A = typeof I == "function" ? I(G) : I, _ = Object.keys(A).filter((ie) => A[ie]), Ht = M.filter((ie) => _.includes(ie)), Lt = _.filter((ie) => !M.includes(ie));
868
+ return [...Ht, ...Lt].slice(-2);
869
+ }), Y = y.length === 2 ? [...y].sort(
870
+ (I, M) => u.findIndex((G) => G.id === M) - u.findIndex((G) => G.id === I)
871
+ ) : null, X = x(() => {
872
+ const I = (G) => d.filter((A) => A.revisionId === G), M = (G) => c.byId(G)?.displayName ?? o("history.unknownPerson");
873
+ return [
874
+ {
875
+ id: "revision",
876
+ header: o("history.columns.revision"),
877
+ enableSorting: !1,
878
+ cell: ({ row: G }) => /* @__PURE__ */ t(
879
+ $,
880
+ {
881
+ value: G.original.id === i ? o("history.draft") : o("history.revision"),
882
+ subText: G.original.restoredFromRevisionId ? o("history.restoredFrom", {
883
+ revision: m.of(G.original.restoredFromRevisionId)
884
+ }) : void 0
885
+ }
886
+ )
887
+ },
888
+ {
889
+ id: "release",
890
+ header: o("history.columns.release"),
891
+ enableSorting: !1,
892
+ cell: ({ row: G }) => {
893
+ const A = I(G.original.id);
894
+ return /* @__PURE__ */ t(
895
+ wt,
896
+ {
897
+ value: A.length > 0 ? A.map((_) => o("release.number", { number: _.number })).join(", ") : null,
898
+ fallbackTone: "success",
899
+ detailColor: "fg.muted",
900
+ detail: A.length > 0 ? A.map(
901
+ (_) => o("history.cutBy", {
902
+ name: M(_.releasedBy),
903
+ time: m.time(_.releasedAt)
904
+ })
905
+ ).join(" ") : null
906
+ }
907
+ );
908
+ }
909
+ },
910
+ {
911
+ id: "savedBy",
912
+ header: o("history.columns.savedBy"),
913
+ enableSorting: !1,
914
+ cell: ({ row: G }) => /* @__PURE__ */ t(In, { name: M(G.original.savedBy) })
915
+ },
916
+ {
917
+ id: "savedAt",
918
+ header: o("history.columns.savedAt"),
919
+ enableSorting: !1,
920
+ size: 140,
921
+ cell: ({ row: G }) => /* @__PURE__ */ t(Vn, { value: G.original.savedAt, format: Pi })
922
+ },
923
+ {
924
+ id: "validity",
925
+ header: o("validity.column"),
926
+ enableSorting: !1,
927
+ cell: ({ row: G }) => /* @__PURE__ */ t(xe, { validity: G.original.validity })
928
+ },
929
+ {
930
+ id: "actions",
931
+ header: "",
932
+ enableSorting: !1,
933
+ minSize: 60,
934
+ cell: ({ row: G }) => p && G.original.id !== i ? /* @__PURE__ */ t(
935
+ En,
936
+ {
937
+ actions: [
938
+ {
939
+ icon: un,
940
+ label: o("history.restore"),
941
+ onClick: () => b(G.original)
942
+ }
943
+ ]
944
+ }
945
+ ) : null
946
+ }
947
+ ];
948
+ }, [o, c, d, m, i, p]), U = (I) => c.byId(I)?.displayName ?? o("history.unknownPerson"), V = d.filter((I) => !u.some((M) => M.id === I.revisionId));
949
+ return /* @__PURE__ */ g(D, { children: [
950
+ /* @__PURE__ */ t(k, { px: "8", py: "4", children: /* @__PURE__ */ g(Z, { gap: "1", children: [
951
+ /* @__PURE__ */ t(E, { color: "fg.muted", children: o("history.hint") }),
952
+ r.hasNextPage ? V.map((I) => /* @__PURE__ */ t(E, { color: "fg.muted", children: o("history.olderRelease", {
953
+ release: o("release.number", { number: I.number }),
954
+ name: U(I.releasedBy),
955
+ time: m.time(I.releasedAt)
956
+ }) }, I.id)) : null
957
+ ] }) }),
958
+ r.isError ? /* @__PURE__ */ t(k, { px: "8", pb: "4", children: /* @__PURE__ */ t(J, { status: "error", colorPalette: "danger", title: o("startPage.error") }) }) : null,
959
+ /* @__PURE__ */ t(
960
+ Re,
961
+ {
962
+ columns: X,
963
+ data: u,
964
+ loading: r.isLoading,
965
+ selectable: !0,
966
+ rowSelection: N,
967
+ onRowSelectionChange: F,
968
+ getRowId: (I) => I.id,
969
+ emptyState: /* @__PURE__ */ t(et, { icon: /* @__PURE__ */ t(pn, { size: 32 }), header: o("history.none") })
970
+ }
971
+ ),
972
+ r.hasNextPage || Y ? /* @__PURE__ */ t(k, { px: "8", py: "6", children: /* @__PURE__ */ g(Z, { gap: "4", children: [
973
+ r.hasNextPage ? /* @__PURE__ */ t(
974
+ B,
975
+ {
976
+ size: "sm",
977
+ variant: "outline",
978
+ alignSelf: "center",
979
+ loading: r.isFetchingNextPage,
980
+ onClick: () => {
981
+ r.fetchNextPage();
982
+ },
983
+ children: o("history.loadMore")
984
+ }
985
+ ) : null,
986
+ Y ? /* @__PURE__ */ t(
987
+ zi,
988
+ {
989
+ client: e,
990
+ kind: n,
991
+ id: l,
992
+ fromRevisionId: Y[0],
993
+ toRevisionId: Y[1],
994
+ labelOf: m.of
995
+ }
996
+ ) : null
997
+ ] }) }) : null,
998
+ /* @__PURE__ */ t(
999
+ xi,
1000
+ {
1001
+ revision: f,
1002
+ label: f ? m.of(f.id) : "",
1003
+ onClose: () => b(null),
1004
+ onRestore: (I) => e.restoreRevision(n, l, I.id, i),
1005
+ onRestored: () => {
1006
+ R([]), Promise.resolve(a?.()).catch(() => {
1007
+ });
1008
+ },
1009
+ kind: n,
1010
+ id: l
1011
+ }
1012
+ )
1013
+ ] });
1014
+ }
1015
+ function xi({
1016
+ revision: e,
1017
+ label: n,
1018
+ onClose: l,
1019
+ onRestore: i,
1020
+ onRestored: a,
1021
+ kind: o,
1022
+ id: s
1023
+ }) {
1024
+ const { t: c } = v(S), { workspaceId: p } = w(), r = te(), u = e !== null, [d, m] = P({ revision: e, label: n });
1025
+ e && e !== d.revision && m({ revision: e, label: n });
1026
+ const f = ee({
1027
+ mutationFn: i,
1028
+ onSuccess: () => {
1029
+ a(), r.invalidateQueries({
1030
+ queryKey: h.configuration(p, o, s)
1031
+ }), r.invalidateQueries({
1032
+ queryKey: h.configurations(p, o)
1033
+ }), l();
1034
+ }
1035
+ }), { reset: b } = f;
1036
+ return j(() => {
1037
+ u && b();
1038
+ }, [u, b]), /* @__PURE__ */ t(
1039
+ de,
1040
+ {
1041
+ open: u,
1042
+ onClose: l,
1043
+ header: c("history.restoreTitle", { revision: d.label }),
1044
+ lazyMount: !0,
1045
+ unmountOnExit: !0,
1046
+ footer: /* @__PURE__ */ g(L, { gap: "2", children: [
1047
+ /* @__PURE__ */ t(B, { variant: "outline", onClick: l, children: c("common.cancel") }),
1048
+ /* @__PURE__ */ t(
1049
+ B,
1050
+ {
1051
+ variant: "solid",
1052
+ loading: f.isPending,
1053
+ onClick: () => d.revision && f.mutate(d.revision),
1054
+ children: c("history.restoreConfirm")
1055
+ }
1056
+ )
1057
+ ] }),
1058
+ children: /* @__PURE__ */ g(Z, { gap: "4", children: [
1059
+ /* @__PURE__ */ t(E, { children: c("history.restoreMessage") }),
1060
+ f.isError ? /* @__PURE__ */ t(J, { status: "error", colorPalette: "danger", title: c("history.restoreFailed"), children: f.error.message }) : null
1061
+ ] })
1062
+ }
1063
+ );
1064
+ }
1065
+ const We = (e) => ({
429
1066
  name: e.name,
430
1067
  description: e.description,
431
1068
  entities: Object.entries(e.entities).sort(([n], [l]) => n.localeCompare(l)).map(([n, l]) => ({ name: n, text: l }))
432
- }), Ln = (e) => ({
1069
+ }), Qi = (e) => ({
433
1070
  name: e.name,
434
1071
  description: e.description,
435
1072
  entities: Object.fromEntries(
436
1073
  e.entities.filter((n) => n.name.trim() !== "").map((n) => [n.name.trim(), n.text])
437
1074
  )
438
1075
  });
439
- function wi({ client: e, id: n, onDeleted: l }) {
440
- const { t: i } = V(S), { workspaceId: a } = W(), s = A({
1076
+ function Nl({ client: e, id: n, onDeleted: l }) {
1077
+ const { t: i } = v(S), { workspaceId: a } = w(), o = C({
441
1078
  queryKey: h.entitySet(a, n),
442
1079
  queryFn: () => e.getEntitySet(n)
443
1080
  });
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 });
1081
+ return o.isError || !o.data ? /* @__PURE__ */ t(le, { title: i("section.entitySets.title"), children: o.isError ? /* @__PURE__ */ t(oe, {}) : /* @__PURE__ */ t(Pe, {}) }) : /* @__PURE__ */ t(Hi, { client: e, entitySet: o.data, onDeleted: l });
445
1082
  }
446
- function Hn({
1083
+ function Hi({
447
1084
  client: e,
448
1085
  entitySet: n,
449
1086
  onDeleted: l
450
1087
  }) {
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) });
1088
+ const { t: i } = v(S), { workspaceId: a } = w(), { paths: o } = z(), s = re(), c = te(), [p, r] = P(!1), u = ue({ defaultValues: We(n.content) }), { reset: d, formState: m, control: f } = u, b = Zn({ control: f, name: "entities" });
1089
+ j(() => {
1090
+ m.isDirty || d(We(n.content));
1091
+ }, [n, d, m.isDirty]);
1092
+ const y = ee({
1093
+ mutationFn: (X) => e.updateEntitySet(n.id, Qi(X), n.state.draftRevisionId),
1094
+ onSuccess: (X) => {
1095
+ c.setQueryData(h.entitySet(a, X.id), X), d(We(X.content)), c.invalidateQueries({ queryKey: h.entitySets(a) });
459
1096
  }
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
- ) })
1097
+ }), R = u.handleSubmit((X) => y.mutate(X)), [N, F] = ot(), Y = ct({
1098
+ client: e,
1099
+ kind: "entitySet",
1100
+ id: n.id,
1101
+ validity: n.validity,
1102
+ state: n.state,
1103
+ unsaved: m.isDirty
1104
+ });
1105
+ return tt(
1106
+ s ? /* @__PURE__ */ g(K, { storageKey: "importhub.entitySet.rail", children: [
1107
+ /* @__PURE__ */ t(K.Header, { title: i("rail.title") }),
1108
+ /* @__PURE__ */ g(K.Section, { id: "actions", label: i("rail.actions"), children: [
1109
+ Y.railAction,
1110
+ /* @__PURE__ */ t(
1111
+ K.IconButton,
1112
+ {
1113
+ label: i("entitySets.delete"),
1114
+ icon: /* @__PURE__ */ t(ge, { size: 16 }),
1115
+ tone: "outline-red",
1116
+ onClick: () => r(!0)
1117
+ }
1118
+ )
1119
+ ] })
473
1120
  ] }) : null
474
- ), /* @__PURE__ */ b(
475
- H,
1121
+ ), /* @__PURE__ */ g(
1122
+ le,
476
1123
  {
477
1124
  title: n.content.name,
478
- breadcrumbs: [{ label: i("section.entitySets.title"), to: s.entitySets }],
479
- badges: /* @__PURE__ */ b(U, { gap: "2", children: [
1125
+ breadcrumbs: [{ label: i("section.entitySets.title"), to: o.entitySets }],
1126
+ badges: /* @__PURE__ */ g(L, { gap: "2", children: [
480
1127
  /* @__PURE__ */ t(
481
- ye,
1128
+ ne,
482
1129
  {
483
1130
  tone: n.validity.valid ? "success" : "danger",
484
1131
  label: n.validity.valid ? i("validity.valid") : i("validity.invalid")
485
1132
  }
486
1133
  ),
487
- /* @__PURE__ */ t(Je, { children: oe(n.state, i) })
1134
+ /* @__PURE__ */ t(at, { state: n.state })
488
1135
  ] }),
489
- actions: o ? /* @__PURE__ */ t(
490
- E,
1136
+ tabs: F,
1137
+ actions: s ? /* @__PURE__ */ t(
1138
+ B,
491
1139
  {
492
1140
  variant: "solid",
493
- disabled: !u.isDirty,
494
- loading: R.isPending,
1141
+ disabled: !m.isDirty,
1142
+ loading: y.isPending,
495
1143
  onClick: () => {
496
- G();
1144
+ R();
497
1145
  },
498
1146
  children: i("common.save")
499
1147
  }
500
1148
  ) : void 0,
501
1149
  children: [
502
- /* @__PURE__ */ t(F, { px: "8", py: "6", children: /* @__PURE__ */ t(_, { ...m, children: /* @__PURE__ */ t(
1150
+ N === "history" ? /* @__PURE__ */ t(
1151
+ ut,
1152
+ {
1153
+ client: e,
1154
+ kind: "entitySet",
1155
+ id: n.id,
1156
+ draftRevisionId: n.state.draftRevisionId,
1157
+ onRestored: async () => {
1158
+ const X = await e.getEntitySet(n.id);
1159
+ c.setQueryData(h.entitySet(a, X.id), X), d(We(X.content));
1160
+ }
1161
+ }
1162
+ ) : /* @__PURE__ */ t(k, { px: "8", py: "6", children: /* @__PURE__ */ t(pe, { ...u, children: /* @__PURE__ */ t(
503
1163
  "form",
504
1164
  {
505
- onSubmit: (Z) => {
506
- Z.preventDefault(), o && G();
1165
+ onSubmit: (X) => {
1166
+ X.preventDefault(), s && R();
507
1167
  },
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: [
1168
+ children: /* @__PURE__ */ g(Z, { gap: "4", children: [
1169
+ Y.notice,
1170
+ /* @__PURE__ */ t(Me, { validity: n.validity }),
1171
+ y.isError ? /* @__PURE__ */ t(J, { status: "error", colorPalette: "danger", title: i("save.failed"), children: y.error.message }) : null,
1172
+ /* @__PURE__ */ t(O, { title: i("entitySets.general"), children: /* @__PURE__ */ g(Z, { gap: "4", children: [
512
1173
  /* @__PURE__ */ t(
513
- N,
1174
+ Q,
514
1175
  {
515
1176
  name: "name",
516
1177
  label: i("fields.name"),
517
1178
  required: !0,
518
- disabled: !o
1179
+ disabled: !s
519
1180
  }
520
1181
  ),
521
1182
  /* @__PURE__ */ t(
522
- Re,
1183
+ ze,
523
1184
  {
524
1185
  name: "description",
525
1186
  label: i("fields.description"),
526
- disabled: !o
1187
+ disabled: !s
527
1188
  }
528
1189
  )
529
1190
  ] }) }),
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: [
1191
+ /* @__PURE__ */ t(O, { title: i("entitySets.entities"), children: /* @__PURE__ */ g(Z, { gap: "3", children: [
1192
+ b.fields.length === 0 ? /* @__PURE__ */ t(E, { color: "fg.muted", children: i("entitySets.noEntities") }) : null,
1193
+ b.fields.map((X, U) => /* @__PURE__ */ g(_t, { templateColumns: "1fr 1fr auto", gap: "3", alignItems: "end", children: [
533
1194
  /* @__PURE__ */ t(
534
- N,
1195
+ Q,
535
1196
  {
536
- name: `entities.${B}.name`,
537
- label: i("entitySets.entityName", { index: B + 1 }),
1197
+ name: `entities.${U}.name`,
1198
+ label: i("entitySets.entityName", { index: U + 1 }),
538
1199
  prepend: "&",
539
1200
  append: ";",
540
- disabled: !o
1201
+ disabled: !s
541
1202
  }
542
1203
  ),
543
1204
  /* @__PURE__ */ t(
544
- N,
1205
+ Q,
545
1206
  {
546
- name: `entities.${B}.text`,
547
- label: i("entitySets.entityText", { index: B + 1 }),
548
- disabled: !o
1207
+ name: `entities.${U}.text`,
1208
+ label: i("entitySets.entityText", { index: U + 1 }),
1209
+ disabled: !s
549
1210
  }
550
1211
  ),
551
- o ? /* @__PURE__ */ t(
552
- pe,
1212
+ s ? /* @__PURE__ */ t(
1213
+ Ne,
553
1214
  {
554
- "aria-label": i("entitySets.removeEntity", { index: B + 1 }),
1215
+ "aria-label": i("entitySets.removeEntity", { index: U + 1 }),
555
1216
  variant: "ghost",
556
1217
  colorPalette: "red",
557
- onClick: () => g.remove(B),
558
- children: /* @__PURE__ */ t(ee, { size: 16 })
1218
+ onClick: () => b.remove(U),
1219
+ children: /* @__PURE__ */ t(ge, { size: 16 })
559
1220
  }
560
1221
  ) : /* @__PURE__ */ t("span", {})
561
- ] }, Z.id)),
562
- o ? /* @__PURE__ */ t(F, { children: /* @__PURE__ */ b(
563
- E,
1222
+ ] }, X.id)),
1223
+ s ? /* @__PURE__ */ t(k, { children: /* @__PURE__ */ g(
1224
+ B,
564
1225
  {
565
1226
  variant: "outline",
566
1227
  size: "sm",
567
- onClick: () => g.append({ name: "", text: "" }),
1228
+ onClick: () => b.append({ name: "", text: "" }),
568
1229
  children: [
569
- /* @__PURE__ */ t(ne, { size: 14, "aria-hidden": !0 }),
1230
+ /* @__PURE__ */ t(ye, { size: 14, "aria-hidden": !0 }),
570
1231
  i("entitySets.addEntity")
571
1232
  ]
572
1233
  }
@@ -575,16 +1236,17 @@ function Hn({
575
1236
  ] })
576
1237
  }
577
1238
  ) }) }),
1239
+ Y.dialog,
578
1240
  /* @__PURE__ */ t(
579
- ze,
1241
+ rt,
580
1242
  {
581
1243
  open: p,
582
- onClose: () => d(!1),
1244
+ onClose: () => r(!1),
583
1245
  title: i("entitySets.deleteTitle", { name: n.content.name }),
584
1246
  message: i("entitySets.deleteMessage"),
585
1247
  onDelete: () => e.deleteEntitySet(n.id),
586
1248
  onDeleted: () => {
587
- d(!1), c.removeQueries({
1249
+ r(!1), c.removeQueries({
588
1250
  queryKey: h.entitySet(a, n.id)
589
1251
  }), c.invalidateQueries({ queryKey: h.entitySets(a) }), l();
590
1252
  }
@@ -594,34 +1256,34 @@ function Hn({
594
1256
  }
595
1257
  );
596
1258
  }
597
- function xe({
1259
+ function pt({
598
1260
  open: e,
599
1261
  onClose: n,
600
1262
  title: l,
601
1263
  children: i,
602
1264
  defaultValues: a,
603
- onCreate: s,
604
- onCreated: o
1265
+ onCreate: o,
1266
+ onCreated: s
605
1267
  }) {
606
- const { t: c } = V(S), p = O({
1268
+ const { t: c } = v(S), p = ue({
607
1269
  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()) {
1270
+ }), r = ee({ mutationFn: o, onSuccess: s }), { reset: u } = p, { reset: d } = r;
1271
+ j(() => {
1272
+ e && (u({ name: "", description: "", ...a }), d());
1273
+ }, [e, u, d, a]);
1274
+ const m = p.handleSubmit((f) => {
1275
+ if (!f.name.trim()) {
614
1276
  p.setError("name", { message: c("create.nameRequired") });
615
1277
  return;
616
1278
  }
617
- d.mutate(y, {
618
- onError: (g) => {
619
- g instanceof We && p.setError("name", { message: c("create.nameTaken") });
1279
+ r.mutate(f, {
1280
+ onError: (b) => {
1281
+ b instanceof Oe && p.setError("name", { message: c("create.nameTaken") });
620
1282
  }
621
1283
  });
622
1284
  });
623
1285
  return /* @__PURE__ */ t(
624
- Se,
1286
+ de,
625
1287
  {
626
1288
  open: e,
627
1289
  onClose: n,
@@ -631,40 +1293,40 @@ function xe({
631
1293
  saveLabel: c("common.create"),
632
1294
  cancelLabel: c("common.cancel"),
633
1295
  onSave: () => {
634
- u();
1296
+ m();
635
1297
  },
636
- loading: d.isPending,
637
- children: /* @__PURE__ */ t(_, { ...p, children: /* @__PURE__ */ t(
1298
+ loading: r.isPending,
1299
+ children: /* @__PURE__ */ t(pe, { ...p, children: /* @__PURE__ */ t(
638
1300
  "form",
639
1301
  {
640
- onSubmit: (y) => {
641
- y.preventDefault(), u();
1302
+ onSubmit: (f) => {
1303
+ f.preventDefault(), m();
642
1304
  },
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") }),
1305
+ children: /* @__PURE__ */ g(Z, { gap: "4", children: [
1306
+ /* @__PURE__ */ t(Q, { name: "name", label: c("fields.name"), required: !0 }),
1307
+ /* @__PURE__ */ t(ze, { name: "description", label: c("fields.description") }),
646
1308
  i,
647
- d.isError && !(d.error instanceof We) ? /* @__PURE__ */ t(Y, { status: "error", colorPalette: "danger", title: c("create.failed") }) : null
1309
+ r.isError && !(r.error instanceof Oe) ? /* @__PURE__ */ t(J, { status: "error", colorPalette: "danger", title: c("create.failed") }) : null
648
1310
  ] })
649
1311
  }
650
1312
  ) })
651
1313
  }
652
1314
  );
653
1315
  }
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({
1316
+ function Jl({ client: e, onOpen: n }) {
1317
+ const { t: l } = v(S), { workspaceId: i } = w(), { paths: a } = z(), o = re(), s = te(), [c, p] = P(!1), r = C({
656
1318
  queryKey: h.entitySets(i),
657
1319
  queryFn: () => e.listEntitySets()
658
- }), m = T(
1320
+ }), u = x(
659
1321
  () => [
660
1322
  {
661
1323
  id: "name",
662
1324
  header: l("fields.name"),
663
- cell: (r) => /* @__PURE__ */ t(
664
- Ne,
1325
+ cell: (d) => /* @__PURE__ */ t(
1326
+ nt,
665
1327
  {
666
- to: q(a, "entitySets", r.row.original.id),
667
- label: r.row.original.content.name
1328
+ to: se(a, "entitySets", d.row.original.id),
1329
+ label: d.row.original.content.name
668
1330
  }
669
1331
  )
670
1332
  },
@@ -672,10 +1334,10 @@ function Ni({ client: e, onOpen: n }) {
672
1334
  id: "entities",
673
1335
  header: l("entitySets.entities"),
674
1336
  size: 120,
675
- cell: (r) => /* @__PURE__ */ t(
676
- Lt,
1337
+ cell: (d) => /* @__PURE__ */ t(
1338
+ Gn,
677
1339
  {
678
- value: r.row.original.content.entities,
1340
+ value: d.row.original.content.entities,
679
1341
  singular: l("entitySets.entity"),
680
1342
  plural: l("entitySets.entities")
681
1343
  }
@@ -684,48 +1346,48 @@ function Ni({ client: e, onOpen: n }) {
684
1346
  {
685
1347
  id: "validity",
686
1348
  header: l("validity.column"),
687
- cell: (r) => /* @__PURE__ */ t(Me, { validity: r.row.original.validity })
1349
+ cell: (d) => /* @__PURE__ */ t(xe, { validity: d.row.original.validity })
688
1350
  },
689
1351
  {
690
1352
  id: "release",
691
1353
  header: l("release.column"),
692
1354
  size: 140,
693
- cell: (r) => /* @__PURE__ */ t(M, { value: oe(r.row.original.state, l) })
1355
+ cell: (d) => /* @__PURE__ */ t($, { value: Mt(d.row.original.state, l) })
694
1356
  }
695
1357
  ],
696
1358
  [l, a]
697
1359
  );
698
- return /* @__PURE__ */ b(
699
- ie,
1360
+ return /* @__PURE__ */ g(
1361
+ fe,
700
1362
  {
701
1363
  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 }),
1364
+ actions: o ? /* @__PURE__ */ g(B, { variant: "solid", onClick: () => p(!0), children: [
1365
+ /* @__PURE__ */ t(ye, { size: 16, "aria-hidden": !0 }),
704
1366
  l("entitySets.new")
705
1367
  ] }) : void 0,
706
1368
  children: [
707
- d.isError ? /* @__PURE__ */ t(D, {}) : /* @__PURE__ */ t(
708
- Ve,
1369
+ r.isError ? /* @__PURE__ */ t(oe, {}) : /* @__PURE__ */ t(
1370
+ Re,
709
1371
  {
710
- columns: m,
711
- data: d.data ?? [],
712
- loading: d.isPending,
713
- getRowId: (r) => r.id,
1372
+ columns: u,
1373
+ data: r.data ?? [],
1374
+ loading: r.isPending,
1375
+ getRowId: (d) => d.id,
714
1376
  emptyState: l("entitySets.empty")
715
1377
  }
716
1378
  ),
717
1379
  /* @__PURE__ */ t(
718
- xe,
1380
+ pt,
719
1381
  {
720
1382
  open: c,
721
1383
  onClose: () => p(!1),
722
1384
  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;
1385
+ onCreate: async ({ name: d, description: m }) => {
1386
+ const f = await e.createEntitySet({ name: d, description: m, entities: {} });
1387
+ return await s.invalidateQueries({ queryKey: h.entitySets(i) }), f.id;
726
1388
  },
727
- onCreated: (r) => {
728
- p(!1), n(r);
1389
+ onCreated: (d) => {
1390
+ p(!1), n(d);
729
1391
  }
730
1392
  }
731
1393
  )
@@ -733,294 +1395,297 @@ function Ni({ client: e, onOpen: n }) {
733
1395
  }
734
1396
  );
735
1397
  }
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({
1398
+ function Li({
758
1399
  open: e,
759
1400
  onClose: n,
760
1401
  client: l,
761
1402
  mapping: i,
762
1403
  onMove: a
763
1404
  }) {
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,
1405
+ const { t: o } = v(S), s = ue({ defaultValues: { blueprintReleaseId: null } }), c = Se({ control: s.control, name: "blueprintReleaseId" }) ?? "", p = ee({
1406
+ mutationFn: (y) => l.checkMappingBlueprintRelease(i.id, y)
1407
+ }), r = ee({ mutationFn: a, onSuccess: n }), { reset: u } = s, { reset: d } = p, { reset: m } = r;
1408
+ j(() => {
1409
+ e && (u({ blueprintReleaseId: null }), d(), m());
1410
+ }, [e, u, d, m]);
1411
+ const f = p.variables, b = p.data && f === c ? p.data : null;
1412
+ return j(() => {
1413
+ f !== void 0 && f !== c && d();
1414
+ }, [f, c, d]), /* @__PURE__ */ t(
1415
+ de,
775
1416
  {
776
1417
  open: e,
777
1418
  onClose: n,
778
- header: s("mappings.moveTitle"),
1419
+ header: o("mappings.moveTitle"),
779
1420
  lazyMount: !0,
780
1421
  unmountOnExit: !0,
781
- footer: /* @__PURE__ */ b(U, { gap: "2", children: [
782
- /* @__PURE__ */ t(E, { variant: "outline", onClick: n, children: s("common.cancel") }),
1422
+ footer: /* @__PURE__ */ g(L, { gap: "2", children: [
1423
+ /* @__PURE__ */ t(B, { variant: "outline", onClick: n, children: o("common.cancel") }),
783
1424
  /* @__PURE__ */ t(
784
- E,
1425
+ B,
785
1426
  {
786
1427
  variant: "outline",
787
1428
  disabled: !c || c === i.content.blueprintReleaseId,
788
1429
  loading: p.isPending,
789
1430
  onClick: () => p.mutate(c),
790
- children: s("mappings.check")
1431
+ children: o("mappings.check")
791
1432
  }
792
1433
  ),
793
1434
  /* @__PURE__ */ t(
794
- E,
1435
+ B,
795
1436
  {
796
1437
  variant: "solid",
797
- disabled: !g,
798
- loading: d.isPending,
799
- onClick: () => d.mutate(c),
800
- children: s("mappings.moveConfirm")
1438
+ disabled: !b,
1439
+ loading: r.isPending,
1440
+ onClick: () => r.mutate(c),
1441
+ children: o("mappings.moveConfirm")
801
1442
  }
802
1443
  )
803
1444
  ] }),
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
1445
+ children: /* @__PURE__ */ t(pe, { ...s, children: /* @__PURE__ */ g(Z, { gap: "4", children: [
1446
+ /* @__PURE__ */ t(Ti, { mapping: i }),
1447
+ p.isError ? /* @__PURE__ */ t(J, { status: "error", colorPalette: "danger", title: o("mappings.checkFailed"), children: p.error.message }) : null,
1448
+ b ? /* @__PURE__ */ t(Di, { report: b }) : null,
1449
+ r.isError ? /* @__PURE__ */ t(J, { status: "error", colorPalette: "danger", title: o("save.failed"), children: r.error.message }) : null
809
1450
  ] }) })
810
1451
  }
811
1452
  );
812
1453
  }
813
- function Tn({ mapping: e }) {
814
- const { t: n } = V(S), { blueprints: l } = J(), { workspaceId: i } = W(), a = A({
1454
+ function Ti({ mapping: e }) {
1455
+ const { t: n } = v(S), { blueprints: l } = z(), { workspaceId: i } = w(), a = C({
815
1456
  queryKey: h.blueprintReleases(i, e.content.blueprintId),
816
1457
  queryFn: () => l?.listReleases(e.content.blueprintId) ?? Promise.resolve([]),
817
1458
  enabled: l !== void 0
818
1459
  });
819
1460
  return l ? /* @__PURE__ */ t(
820
- me,
1461
+ Ye,
821
1462
  {
822
1463
  name: "blueprintReleaseId",
823
1464
  label: n("mappings.newRelease"),
824
1465
  required: !0,
825
- options: (a.data ?? []).filter((s) => s.id !== e.content.blueprintReleaseId).map((s) => ({ id: s.id, label: s.label }))
1466
+ options: (a.data ?? []).filter((o) => o.id !== e.content.blueprintReleaseId).map((o) => ({ id: o.id, label: o.label }))
826
1467
  }
827
- ) : /* @__PURE__ */ t(N, { name: "blueprintReleaseId", label: n("mappings.newReleaseId"), required: !0 });
1468
+ ) : /* @__PURE__ */ t(Q, { name: "blueprintReleaseId", label: n("mappings.newReleaseId"), required: !0 });
828
1469
  }
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
1470
+ function Di({ report: e }) {
1471
+ const { t: n } = v(S), l = e.missingFieldPaths.length + e.missingReleaseSpecFields.length;
1472
+ return l === 0 ? /* @__PURE__ */ t(J, { status: "success", colorPalette: "success", title: n("mappings.nothingLost") }) : /* @__PURE__ */ t(J, { status: "warning", colorPalette: "warning", title: n("mappings.lost", { count: l }), children: /* @__PURE__ */ g(Z, { gap: "2", children: [
1473
+ e.missingFieldPaths.length > 0 ? /* @__PURE__ */ t(Gt, { label: n("mappings.lostFields"), paths: e.missingFieldPaths }) : null,
1474
+ e.missingReleaseSpecFields.length > 0 ? /* @__PURE__ */ t(Gt, { label: n("mappings.lostReleaseSpec"), paths: e.missingReleaseSpecFields }) : null
834
1475
  ] }) });
835
1476
  }
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)) })
1477
+ function Gt({ label: e, paths: n }) {
1478
+ return /* @__PURE__ */ g(Z, { gap: "1", children: [
1479
+ /* @__PURE__ */ t(E, { fontWeight: "medium", children: e }),
1480
+ /* @__PURE__ */ t(H.Root, { ps: "4", "aria-label": e, children: n.map((l) => /* @__PURE__ */ t(H.Item, { children: /* @__PURE__ */ t(me, { children: l }) }, l)) })
840
1481
  ] });
841
1482
  }
842
- const Ae = (e) => ({
1483
+ const je = (e) => ({
843
1484
  name: e.name,
844
1485
  description: e.description ?? "",
845
1486
  elementSelector: e.elementSelector ?? "",
846
1487
  sourceKeySelector: e.sourceKey?.selector ?? "",
847
1488
  sourceKeyTemplate: e.sourceKey?.template ?? ""
848
- }), $e = (e, n) => ({
1489
+ }), At = (e, n) => ({
849
1490
  ...e,
850
1491
  name: n.name,
851
1492
  description: n.description,
852
1493
  elementSelector: n.elementSelector,
853
1494
  sourceKey: { ...e.sourceKey, selector: n.sourceKeySelector, template: n.sourceKeyTemplate }
854
1495
  });
855
- function Yi({ client: e, id: n, onDeleted: l }) {
856
- const { t: i } = V(S), { workspaceId: a } = W(), s = A({
1496
+ function Fl({ client: e, id: n, onDeleted: l }) {
1497
+ const { t: i } = v(S), { workspaceId: a } = w(), o = C({
857
1498
  queryKey: h.mapping(a, n),
858
1499
  queryFn: () => e.getMapping(n)
859
1500
  });
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 });
1501
+ return o.isError || !o.data ? /* @__PURE__ */ t(le, { title: i("section.mappings.title"), children: o.isError ? /* @__PURE__ */ t(oe, {}) : /* @__PURE__ */ t(Pe, {}) }) : /* @__PURE__ */ t(ji, { client: e, mapping: o.data, onDeleted: l });
861
1502
  }
862
- function jn({
1503
+ function ji({
863
1504
  client: e,
864
1505
  mapping: n,
865
1506
  onDeleted: l
866
1507
  }) {
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({
1508
+ const { t: i } = v(S), { workspaceId: a } = w(), { paths: o } = z(), s = re(), c = te(), [p, r] = P(!1), [u, d] = P(!1), m = dt([n.content.blueprintId]), f = C({
868
1509
  queryKey: h.mappingImportProfiles(a, n.id),
869
1510
  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
- ) })
1511
+ }), b = ue({ defaultValues: je(n.content) }), { reset: y, formState: R } = b;
1512
+ j(() => {
1513
+ R.isDirty || y(je(n.content));
1514
+ }, [n, y, R.isDirty]);
1515
+ const N = (A) => {
1516
+ c.setQueryData(h.mapping(a, A.id), A), y(je(A.content)), c.invalidateQueries({ queryKey: h.mappings(a) }), c.invalidateQueries({ queryKey: h.importProfiles(a) });
1517
+ }, F = ee({
1518
+ mutationFn: (A) => e.updateMapping(n.id, A, n.state.draftRevisionId),
1519
+ onSuccess: N
1520
+ }), Y = b.handleSubmit((A) => F.mutate(At(n.content, A))), [X, U] = ot(), V = ct({
1521
+ client: e,
1522
+ kind: "mapping",
1523
+ id: n.id,
1524
+ validity: n.validity,
1525
+ state: n.state,
1526
+ unsaved: R.isDirty
1527
+ });
1528
+ tt(
1529
+ s ? /* @__PURE__ */ g(K, { storageKey: "importhub.mapping.rail", children: [
1530
+ /* @__PURE__ */ t(K.Header, { title: i("rail.title") }),
1531
+ /* @__PURE__ */ g(K.Section, { id: "actions", label: i("rail.actions"), children: [
1532
+ V.railAction,
1533
+ /* @__PURE__ */ t(
1534
+ K.IconButton,
1535
+ {
1536
+ label: i("mappings.delete"),
1537
+ icon: /* @__PURE__ */ t(ge, { size: 16 }),
1538
+ tone: "outline-red",
1539
+ onClick: () => r(!0)
1540
+ }
1541
+ )
1542
+ ] })
892
1543
  ] }) : null
893
1544
  );
894
- const gt = u.blueprintName(n.content.blueprintId), ht = u.releaseLabel(
1545
+ const I = m.blueprintName(n.content.blueprintId), M = m.releaseLabel(
895
1546
  n.content.blueprintId,
896
1547
  n.content.blueprintReleaseId
897
- ), yt = n.content.fields?.length ?? 0;
898
- return /* @__PURE__ */ b(
899
- H,
1548
+ ), G = n.content.fields?.length ?? 0;
1549
+ return /* @__PURE__ */ g(
1550
+ le,
900
1551
  {
901
1552
  title: n.content.name,
902
- breadcrumbs: [{ label: i("section.mappings.title"), to: s.mappings }],
903
- badges: /* @__PURE__ */ b(U, { gap: "2", children: [
1553
+ breadcrumbs: [{ label: i("section.mappings.title"), to: o.mappings }],
1554
+ badges: /* @__PURE__ */ g(L, { gap: "2", children: [
904
1555
  /* @__PURE__ */ t(
905
- ye,
1556
+ ne,
906
1557
  {
907
1558
  tone: n.validity.valid ? "success" : "danger",
908
1559
  label: n.validity.valid ? i("validity.valid") : i("validity.invalid")
909
1560
  }
910
1561
  ),
911
- /* @__PURE__ */ t(Je, { children: oe(n.state, i) })
1562
+ /* @__PURE__ */ t(at, { state: n.state })
912
1563
  ] }),
913
- actions: o ? /* @__PURE__ */ t(
914
- E,
1564
+ tabs: U,
1565
+ actions: s ? /* @__PURE__ */ t(
1566
+ B,
915
1567
  {
916
1568
  variant: "solid",
917
- disabled: !G.isDirty,
918
- loading: B.isPending,
1569
+ disabled: !R.isDirty,
1570
+ loading: F.isPending,
919
1571
  onClick: () => {
920
- I();
1572
+ Y();
921
1573
  },
922
1574
  children: i("common.save")
923
1575
  }
924
1576
  ) : void 0,
925
1577
  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(
1578
+ X === "history" ? /* @__PURE__ */ t(
1579
+ ut,
1580
+ {
1581
+ client: e,
1582
+ kind: "mapping",
1583
+ id: n.id,
1584
+ draftRevisionId: n.state.draftRevisionId,
1585
+ onRestored: async () => {
1586
+ N(await e.getMapping(n.id));
1587
+ }
1588
+ }
1589
+ ) : /* @__PURE__ */ t(k, { px: "8", py: "6", children: /* @__PURE__ */ g(Z, { gap: "4", children: [
1590
+ V.notice,
1591
+ /* @__PURE__ */ t(Me, { validity: n.validity }),
1592
+ F.isError ? /* @__PURE__ */ t(J, { status: "error", colorPalette: "danger", title: i("save.failed"), children: F.error.message }) : null,
1593
+ /* @__PURE__ */ t(pe, { ...b, children: /* @__PURE__ */ t(
930
1594
  "form",
931
1595
  {
932
- onSubmit: (v) => {
933
- v.preventDefault(), o && I();
1596
+ onSubmit: (A) => {
1597
+ A.preventDefault(), s && Y();
934
1598
  },
935
- children: /* @__PURE__ */ t(z, { title: i("mappings.general"), children: /* @__PURE__ */ b(X, { gap: "4", children: [
1599
+ children: /* @__PURE__ */ t(O, { title: i("mappings.general"), children: /* @__PURE__ */ g(Z, { gap: "4", children: [
936
1600
  /* @__PURE__ */ t(
937
- N,
1601
+ Q,
938
1602
  {
939
1603
  name: "name",
940
1604
  label: i("fields.name"),
941
1605
  required: !0,
942
- disabled: !o
1606
+ disabled: !s
943
1607
  }
944
1608
  ),
945
1609
  /* @__PURE__ */ t(
946
- Re,
1610
+ ze,
947
1611
  {
948
1612
  name: "description",
949
1613
  label: i("fields.description"),
950
- disabled: !o
1614
+ disabled: !s
951
1615
  }
952
1616
  ),
953
1617
  /* @__PURE__ */ t(
954
- N,
1618
+ Q,
955
1619
  {
956
1620
  name: "elementSelector",
957
1621
  label: i("mappings.elementSelector"),
958
1622
  helperText: i("mappings.elementSelectorHelp"),
959
- disabled: !o
1623
+ disabled: !s
960
1624
  }
961
1625
  ),
962
1626
  /* @__PURE__ */ t(
963
- N,
1627
+ Q,
964
1628
  {
965
1629
  name: "sourceKeySelector",
966
1630
  label: i("mappings.sourceKeySelector"),
967
- disabled: !o
1631
+ disabled: !s
968
1632
  }
969
1633
  ),
970
1634
  /* @__PURE__ */ t(
971
- N,
1635
+ Q,
972
1636
  {
973
1637
  name: "sourceKeyTemplate",
974
1638
  label: i("mappings.sourceKeyTemplate"),
975
1639
  helperText: i("mappings.sourceKeyTemplateHelp"),
976
- disabled: !o
1640
+ disabled: !s
977
1641
  }
978
1642
  ),
979
- /* @__PURE__ */ t(C, { color: "fg.muted", fontSize: "sm", children: i("mappings.fieldCount", { count: yt }) })
1643
+ /* @__PURE__ */ t(E, { color: "fg.muted", fontSize: "sm", children: i("mappings.fieldCount", { count: G }) })
980
1644
  ] }) })
981
1645
  }
982
1646
  ) }),
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 }) })
1647
+ /* @__PURE__ */ t(O, { title: i("mappings.target"), children: /* @__PURE__ */ g(Z, { gap: "3", children: [
1648
+ m.available ? /* @__PURE__ */ g(D, { children: [
1649
+ /* @__PURE__ */ t(Be, { label: i("mappings.blueprint"), children: I ?? "…" }),
1650
+ /* @__PURE__ */ t(Be, { label: i("mappings.release"), children: M ?? "…" })
1651
+ ] }) : /* @__PURE__ */ g(D, { children: [
1652
+ /* @__PURE__ */ t(Be, { label: i("mappings.blueprintId"), children: /* @__PURE__ */ t(me, { children: n.content.blueprintId }) }),
1653
+ /* @__PURE__ */ t(Be, { label: i("mappings.releaseId"), children: /* @__PURE__ */ t(me, { children: n.content.blueprintReleaseId }) })
990
1654
  ] }),
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 }),
1655
+ s ? /* @__PURE__ */ t(k, { children: /* @__PURE__ */ g(B, { variant: "outline", size: "sm", onClick: () => d(!0), children: [
1656
+ /* @__PURE__ */ t(mn, { size: 14, "aria-hidden": !0 }),
993
1657
  i("mappings.move")
994
1658
  ] }) }) : null
995
1659
  ] }) }),
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") }) })
1660
+ /* @__PURE__ */ t(O, { title: i("mappings.includedBy"), children: f.isError ? /* @__PURE__ */ t(E, { color: "fg.muted", children: i("startPage.error") }) : f.data ? f.data.length === 0 ? /* @__PURE__ */ t(E, { color: "fg.muted", children: i("mappings.noProfiles") }) : /* @__PURE__ */ t(H.Root, { ps: "4", "aria-label": i("mappings.includedBy"), children: f.data.map((A) => /* @__PURE__ */ t(H.Item, { children: /* @__PURE__ */ t(be, { asChild: !0, children: /* @__PURE__ */ t(Ke, { to: se(o, "profiles", A.id), children: A.name }) }) }, A.id)) }) : /* @__PURE__ */ t(E, { color: "fg.muted", children: i("startPage.loading") }) })
997
1661
  ] }) }),
1662
+ V.dialog,
998
1663
  /* @__PURE__ */ t(
999
- Pn,
1664
+ Li,
1000
1665
  {
1001
- open: m,
1002
- onClose: () => r(!1),
1666
+ open: u,
1667
+ onClose: () => d(!1),
1003
1668
  client: e,
1004
1669
  mapping: n,
1005
- onMove: async (v) => {
1006
- const St = {
1007
- ...$e(n.content, g.getValues()),
1008
- blueprintReleaseId: v
1670
+ onMove: async (A) => {
1671
+ const _ = {
1672
+ ...At(n.content, b.getValues()),
1673
+ blueprintReleaseId: A
1009
1674
  };
1010
- Z(await e.updateMapping(n.id, St, n.state.draftRevisionId));
1675
+ N(await e.updateMapping(n.id, _, n.state.draftRevisionId));
1011
1676
  }
1012
1677
  }
1013
1678
  ),
1014
1679
  /* @__PURE__ */ t(
1015
- ze,
1680
+ rt,
1016
1681
  {
1017
1682
  open: p,
1018
- onClose: () => d(!1),
1683
+ onClose: () => r(!1),
1019
1684
  title: i("mappings.deleteTitle", { name: n.content.name }),
1020
1685
  message: i("mappings.deleteMessage"),
1021
1686
  onDelete: () => e.deleteMapping(n.id),
1022
1687
  onDeleted: () => {
1023
- d(!1), c.removeQueries({ queryKey: h.mapping(a, n.id) }), c.invalidateQueries({ queryKey: h.mappings(a) }), l();
1688
+ r(!1), c.removeQueries({ queryKey: h.mapping(a, n.id) }), c.invalidateQueries({ queryKey: h.mappings(a) }), l();
1024
1689
  }
1025
1690
  }
1026
1691
  )
@@ -1028,18 +1693,18 @@ function jn({
1028
1693
  }
1029
1694
  );
1030
1695
  }
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 })
1696
+ function Be({ label: e, children: n }) {
1697
+ return /* @__PURE__ */ g(L, { gap: "4", align: "baseline", children: [
1698
+ /* @__PURE__ */ t(E, { color: "fg.muted", minW: "40", children: e }),
1699
+ /* @__PURE__ */ t(k, { children: n })
1035
1700
  ] });
1036
1701
  }
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 }),
1702
+ function Oi() {
1703
+ const { t: e } = v(S), { blueprints: n } = z();
1704
+ return n ? /* @__PURE__ */ t(_i, {}) : /* @__PURE__ */ g(D, { children: [
1705
+ /* @__PURE__ */ t(Q, { name: "blueprintId", label: e("mappings.blueprintId"), required: !0 }),
1041
1706
  /* @__PURE__ */ t(
1042
- N,
1707
+ Q,
1043
1708
  {
1044
1709
  name: "blueprintReleaseId",
1045
1710
  label: e("mappings.releaseId"),
@@ -1049,217 +1714,217 @@ function On() {
1049
1714
  )
1050
1715
  ] });
1051
1716
  }
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({
1717
+ function _i() {
1718
+ const { t: e } = v(S), { blueprints: n } = z(), { workspaceId: l } = w(), { control: i, setValue: a } = Nt(), o = Se({ control: i, name: "blueprintId" }), s = Rn(o);
1719
+ j(() => {
1720
+ s.current !== o && a("blueprintReleaseId", ""), s.current = o;
1721
+ }, [o, a]);
1722
+ const c = C({
1058
1723
  queryKey: h.blueprints(l),
1059
1724
  queryFn: () => n?.listBlueprints() ?? Promise.resolve([])
1060
- }), p = A({
1061
- queryKey: h.blueprintReleases(l, s ?? ""),
1062
- queryFn: () => n?.listReleases(s) ?? Promise.resolve([]),
1063
- enabled: !!s
1725
+ }), p = C({
1726
+ queryKey: h.blueprintReleases(l, o ?? ""),
1727
+ queryFn: () => n?.listReleases(o) ?? Promise.resolve([]),
1728
+ enabled: !!o
1064
1729
  });
1065
- return /* @__PURE__ */ b(x, { children: [
1730
+ return /* @__PURE__ */ g(D, { children: [
1066
1731
  /* @__PURE__ */ t(
1067
- me,
1732
+ Ye,
1068
1733
  {
1069
1734
  name: "blueprintId",
1070
1735
  label: e("mappings.blueprint"),
1071
1736
  required: !0,
1072
- options: (c.data ?? []).map((d) => ({ id: d.id, label: d.name }))
1737
+ options: (c.data ?? []).map((r) => ({ id: r.id, label: r.name }))
1073
1738
  }
1074
1739
  ),
1075
1740
  /* @__PURE__ */ t(
1076
- me,
1741
+ Ye,
1077
1742
  {
1078
1743
  name: "blueprintReleaseId",
1079
1744
  label: e("mappings.release"),
1080
1745
  required: !0,
1081
- disabled: !s,
1082
- options: (p.data ?? []).map((d) => ({ id: d.id, label: d.label }))
1746
+ disabled: !o,
1747
+ options: (p.data ?? []).map((r) => ({ id: r.id, label: r.label }))
1083
1748
  }
1084
1749
  )
1085
1750
  ] });
1086
1751
  }
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({
1752
+ const qi = { blueprintId: "", blueprintReleaseId: "" };
1753
+ function Yl({ client: e, onOpen: n }) {
1754
+ const { t: l } = v(S), { workspaceId: i } = w(), { paths: a } = z(), o = re(), s = te(), [c, p] = P(!1), r = C({
1090
1755
  queryKey: h.mappings(i),
1091
1756
  queryFn: () => e.listMappings()
1092
- }), m = mt((d.data ?? []).map((u) => u.content.blueprintId)), r = T(
1757
+ }), u = dt((r.data ?? []).map((m) => m.content.blueprintId)), d = x(
1093
1758
  () => [
1094
1759
  {
1095
1760
  id: "name",
1096
1761
  header: l("fields.name"),
1097
- cell: (u) => /* @__PURE__ */ t(
1098
- Ne,
1762
+ cell: (m) => /* @__PURE__ */ t(
1763
+ nt,
1099
1764
  {
1100
- to: q(a, "mappings", u.row.original.id),
1101
- label: u.row.original.content.name
1765
+ to: se(a, "mappings", m.row.original.id),
1766
+ label: m.row.original.content.name
1102
1767
  }
1103
1768
  )
1104
1769
  },
1105
- m.available ? {
1770
+ u.available ? {
1106
1771
  id: "blueprint",
1107
1772
  header: l("mappings.blueprint"),
1108
- cell: (u) => /* @__PURE__ */ t(
1109
- M,
1773
+ cell: (m) => /* @__PURE__ */ t(
1774
+ $,
1110
1775
  {
1111
- value: m.blueprintName(u.row.original.content.blueprintId) ?? ""
1776
+ value: u.blueprintName(m.row.original.content.blueprintId) ?? ""
1112
1777
  }
1113
1778
  )
1114
1779
  } : {
1115
1780
  id: "blueprint",
1116
1781
  header: l("mappings.blueprintId"),
1117
- cell: (u) => /* @__PURE__ */ t(Qe, { value: u.row.original.content.blueprintId })
1782
+ cell: (m) => /* @__PURE__ */ t(mt, { value: m.row.original.content.blueprintId })
1118
1783
  },
1119
- m.available ? {
1784
+ u.available ? {
1120
1785
  id: "release",
1121
1786
  header: l("mappings.release"),
1122
- cell: (u) => /* @__PURE__ */ t(
1123
- M,
1787
+ cell: (m) => /* @__PURE__ */ t(
1788
+ $,
1124
1789
  {
1125
- value: m.releaseLabel(
1126
- u.row.original.content.blueprintId,
1127
- u.row.original.content.blueprintReleaseId
1790
+ value: u.releaseLabel(
1791
+ m.row.original.content.blueprintId,
1792
+ m.row.original.content.blueprintReleaseId
1128
1793
  ) ?? ""
1129
1794
  }
1130
1795
  )
1131
1796
  } : {
1132
1797
  id: "release",
1133
1798
  header: l("mappings.releaseId"),
1134
- cell: (u) => /* @__PURE__ */ t(Qe, { value: u.row.original.content.blueprintReleaseId })
1799
+ cell: (m) => /* @__PURE__ */ t(mt, { value: m.row.original.content.blueprintReleaseId })
1135
1800
  },
1136
1801
  {
1137
1802
  id: "validity",
1138
1803
  header: l("validity.column"),
1139
- cell: (u) => /* @__PURE__ */ t(Me, { validity: u.row.original.validity })
1804
+ cell: (m) => /* @__PURE__ */ t(xe, { validity: m.row.original.validity })
1140
1805
  }
1141
1806
  ],
1142
- [l, a, m]
1807
+ [l, a, u]
1143
1808
  );
1144
- return /* @__PURE__ */ b(
1145
- ie,
1809
+ return /* @__PURE__ */ g(
1810
+ fe,
1146
1811
  {
1147
1812
  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 }),
1813
+ actions: o ? /* @__PURE__ */ g(B, { variant: "solid", onClick: () => p(!0), children: [
1814
+ /* @__PURE__ */ t(ye, { size: 16, "aria-hidden": !0 }),
1150
1815
  l("mappings.new")
1151
1816
  ] }) : void 0,
1152
1817
  children: [
1153
- d.isError ? /* @__PURE__ */ t(D, {}) : /* @__PURE__ */ t(
1154
- Ve,
1818
+ r.isError ? /* @__PURE__ */ t(oe, {}) : /* @__PURE__ */ t(
1819
+ Re,
1155
1820
  {
1156
- columns: r,
1157
- data: d.data ?? [],
1158
- loading: d.isPending,
1159
- getRowId: (u) => u.id,
1821
+ columns: d,
1822
+ data: r.data ?? [],
1823
+ loading: r.isPending,
1824
+ getRowId: (m) => m.id,
1160
1825
  emptyState: l("mappings.empty")
1161
1826
  }
1162
1827
  ),
1163
1828
  /* @__PURE__ */ t(
1164
- xe,
1829
+ pt,
1165
1830
  {
1166
1831
  open: c,
1167
1832
  onClose: () => p(!1),
1168
1833
  title: l("mappings.new"),
1169
- defaultValues: qn,
1170
- onCreate: async ({ name: u, description: y, blueprintId: g, blueprintReleaseId: R }) => {
1171
- const G = await e.createMapping({
1172
- name: u,
1173
- description: y,
1174
- blueprintId: g ?? "",
1175
- blueprintReleaseId: R ?? ""
1834
+ defaultValues: qi,
1835
+ onCreate: async ({ name: m, description: f, blueprintId: b, blueprintReleaseId: y }) => {
1836
+ const R = await e.createMapping({
1837
+ name: m,
1838
+ description: f,
1839
+ blueprintId: b ?? "",
1840
+ blueprintReleaseId: y ?? ""
1176
1841
  });
1177
- return await o.invalidateQueries({ queryKey: h.mappings(i) }), G.id;
1842
+ return await s.invalidateQueries({ queryKey: h.mappings(i) }), R.id;
1178
1843
  },
1179
- onCreated: (u) => {
1180
- p(!1), n(u);
1844
+ onCreated: (m) => {
1845
+ p(!1), n(m);
1181
1846
  },
1182
- children: /* @__PURE__ */ t(On, {})
1847
+ children: /* @__PURE__ */ t(Oi, {})
1183
1848
  }
1184
1849
  )
1185
1850
  ]
1186
1851
  }
1187
1852
  );
1188
1853
  }
1189
- function Ui({ client: e }) {
1190
- const { t: n } = V(S), { workspaceId: l } = W(), i = A({
1854
+ function Ul({ client: e }) {
1855
+ const { t: n } = v(S), { workspaceId: l } = w(), i = C({
1191
1856
  queryKey: h.processors(l),
1192
1857
  queryFn: () => e.listProcessors()
1193
- }), a = T(
1858
+ }), a = x(
1194
1859
  () => [
1195
1860
  {
1196
1861
  id: "name",
1197
1862
  header: n("fields.name"),
1198
1863
  size: 180,
1199
- cell: (s) => /* @__PURE__ */ t(Ht, { value: s.row.original.name })
1864
+ cell: (o) => /* @__PURE__ */ t(An, { value: o.row.original.name })
1200
1865
  },
1201
1866
  {
1202
1867
  id: "kind",
1203
1868
  header: n("processors.kindColumn"),
1204
1869
  size: 140,
1205
- cell: (s) => /* @__PURE__ */ t(M, { value: n(`processors.kind.${s.row.original.kind}`) })
1870
+ cell: (o) => /* @__PURE__ */ t($, { value: n(`processors.kind.${o.row.original.kind}`) })
1206
1871
  },
1207
1872
  {
1208
1873
  id: "target",
1209
1874
  header: n("processors.targetColumn"),
1210
1875
  size: 160,
1211
- cell: (s) => /* @__PURE__ */ t(M, { value: n(`processors.target.${s.row.original.target}`) })
1876
+ cell: (o) => /* @__PURE__ */ t($, { value: n(`processors.target.${o.row.original.target}`) })
1212
1877
  },
1213
1878
  {
1214
1879
  id: "description",
1215
1880
  header: n("fields.description"),
1216
- cell: (s) => /* @__PURE__ */ t(M, { value: s.row.original.description })
1881
+ cell: (o) => /* @__PURE__ */ t($, { value: o.row.original.description })
1217
1882
  },
1218
1883
  {
1219
1884
  id: "settings",
1220
1885
  header: n("processors.settingsColumn"),
1221
- cell: (s) => /* @__PURE__ */ t(
1222
- M,
1886
+ cell: (o) => /* @__PURE__ */ t(
1887
+ $,
1223
1888
  {
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(", ")
1889
+ value: o.row.original.settingsSpec.length === 0 ? n("processors.noSettings") : o.row.original.settingsSpec.map((s) => s.config.name || s.config.api_accessor).join(", ")
1225
1890
  }
1226
1891
  )
1227
1892
  }
1228
1893
  ],
1229
1894
  [n]
1230
1895
  );
1231
- return /* @__PURE__ */ t(ie, { title: n("section.processors.title"), children: i.isError ? /* @__PURE__ */ t(D, {}) : /* @__PURE__ */ t(
1232
- Ve,
1896
+ return /* @__PURE__ */ t(fe, { title: n("section.processors.title"), children: i.isError ? /* @__PURE__ */ t(oe, {}) : /* @__PURE__ */ t(
1897
+ Re,
1233
1898
  {
1234
1899
  columns: a,
1235
1900
  data: i.data ?? [],
1236
1901
  loading: i.isPending,
1237
- getRowId: (s) => s.name,
1902
+ getRowId: (o) => o.name,
1238
1903
  emptyState: n("processors.empty")
1239
1904
  }
1240
1905
  ) });
1241
1906
  }
1242
- function et(e, n, l) {
1907
+ function Zt(e, n, l) {
1243
1908
  const i = [...e], [a] = i.splice(n, 1);
1244
1909
  return i.splice(l, 0, a), i;
1245
1910
  }
1246
- function ut({
1911
+ function xt({
1247
1912
  items: e,
1248
1913
  renderItem: n,
1249
1914
  nameOf: l,
1250
1915
  editable: i,
1251
1916
  onChange: a,
1252
- emptyLabel: s,
1253
- addLabel: o,
1917
+ emptyLabel: o,
1918
+ addLabel: s,
1254
1919
  addOptions: c,
1255
1920
  onAdd: p
1256
1921
  }) {
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,
1922
+ const { t: r } = v(S);
1923
+ return /* @__PURE__ */ g(Z, { gap: "2", children: [
1924
+ e.length === 0 ? /* @__PURE__ */ t(E, { color: "fg.muted", children: o }) : /* @__PURE__ */ t(Z, { as: "ol", gap: "0", listStyleType: "none", ms: "0", children: e.map((u, d) => {
1925
+ const m = l(u);
1926
+ return /* @__PURE__ */ g(
1927
+ L,
1263
1928
  {
1264
1929
  as: "li",
1265
1930
  gap: "3",
@@ -1268,281 +1933,306 @@ function ut({
1268
1933
  borderColor: "border",
1269
1934
  align: "start",
1270
1935
  children: [
1271
- /* @__PURE__ */ b(C, { color: "fg.muted", minW: "6", textAlign: "end", children: [
1272
- r + 1,
1936
+ /* @__PURE__ */ g(E, { color: "fg.muted", minW: "6", textAlign: "end", children: [
1937
+ d + 1,
1273
1938
  "."
1274
1939
  ] }),
1275
- /* @__PURE__ */ t(F, { flex: "1", minW: "0", children: n(m, r) }),
1276
- i ? /* @__PURE__ */ b(U, { gap: "1", children: [
1940
+ /* @__PURE__ */ t(k, { flex: "1", minW: "0", children: n(u, d) }),
1941
+ i ? /* @__PURE__ */ g(L, { gap: "1", children: [
1277
1942
  /* @__PURE__ */ t(
1278
- pe,
1943
+ Ne,
1279
1944
  {
1280
- "aria-label": d("order.moveUp", { name: u }),
1945
+ "aria-label": r("order.moveUp", { name: m }),
1281
1946
  size: "xs",
1282
1947
  variant: "ghost",
1283
- disabled: r === 0,
1284
- onClick: () => a(et(e, r, r - 1)),
1285
- children: /* @__PURE__ */ t(Ft, { size: 14 })
1948
+ disabled: d === 0,
1949
+ onClick: () => a(Zt(e, d, d - 1)),
1950
+ children: /* @__PURE__ */ t(gn, { size: 14 })
1286
1951
  }
1287
1952
  ),
1288
1953
  /* @__PURE__ */ t(
1289
- pe,
1954
+ Ne,
1290
1955
  {
1291
- "aria-label": d("order.moveDown", { name: u }),
1956
+ "aria-label": r("order.moveDown", { name: m }),
1292
1957
  size: "xs",
1293
1958
  variant: "ghost",
1294
- disabled: r === e.length - 1,
1295
- onClick: () => a(et(e, r, r + 1)),
1296
- children: /* @__PURE__ */ t(Ut, { size: 14 })
1959
+ disabled: d === e.length - 1,
1960
+ onClick: () => a(Zt(e, d, d + 1)),
1961
+ children: /* @__PURE__ */ t(hn, { size: 14 })
1297
1962
  }
1298
1963
  ),
1299
1964
  /* @__PURE__ */ t(
1300
- pe,
1965
+ Ne,
1301
1966
  {
1302
- "aria-label": d("order.remove", { name: u }),
1967
+ "aria-label": r("order.remove", { name: m }),
1303
1968
  size: "xs",
1304
1969
  variant: "ghost",
1305
1970
  colorPalette: "red",
1306
- onClick: () => a(e.filter((y, g) => g !== r)),
1307
- children: /* @__PURE__ */ t(ee, { size: 14 })
1971
+ onClick: () => a(e.filter((f, b) => b !== d)),
1972
+ children: /* @__PURE__ */ t(ge, { size: 14 })
1308
1973
  }
1309
1974
  )
1310
1975
  ] }) : null
1311
1976
  ]
1312
1977
  },
1313
- r
1978
+ d
1314
1979
  );
1315
1980
  }) }),
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
1981
+ i ? /* @__PURE__ */ t(k, { children: /* @__PURE__ */ g(qt, { onSelect: (u) => p(u.value), children: [
1982
+ /* @__PURE__ */ t($t, { asChild: !0, children: /* @__PURE__ */ g(B, { variant: "outline", size: "sm", disabled: c.length === 0, children: [
1983
+ /* @__PURE__ */ t(ye, { size: 14, "aria-hidden": !0 }),
1984
+ s
1320
1985
  ] }) }),
1321
- /* @__PURE__ */ t(At, { children: c.map((m) => /* @__PURE__ */ t(vt, { value: m.value, children: m.label }, m.value)) })
1986
+ /* @__PURE__ */ t(en, { children: c.map((u) => /* @__PURE__ */ t(tn, { value: u.value, children: u.label }, u.value)) })
1322
1987
  ] }) }) : null
1323
1988
  ] });
1324
1989
  }
1325
- const $n = {};
1326
- function ei({
1990
+ const $i = {};
1991
+ function el({
1327
1992
  open: e,
1328
1993
  onClose: n,
1329
1994
  processor: l,
1330
1995
  settings: i,
1331
1996
  readOnly: a,
1332
- onApply: s
1997
+ onApply: o
1333
1998
  }) {
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));
1999
+ const { t: s } = v(S), c = l?.settingsSpec ?? [], p = x(() => Wn(Cn(c, bt)), [c]), r = ue({ defaultValues: i, resolver: p }), { reset: u } = r;
2000
+ j(() => {
2001
+ e && u(i ?? $i);
2002
+ }, [e, i, u]);
2003
+ const d = r.handleSubmit((m) => o(m));
1339
2004
  return /* @__PURE__ */ t(
1340
- Se,
2005
+ de,
1341
2006
  {
1342
2007
  open: e,
1343
2008
  onClose: n,
1344
- header: o("processors.settingsOf", { name: l?.name ?? "" }),
2009
+ header: s("processors.settingsOf", { name: l?.name ?? "" }),
1345
2010
  lazyMount: !0,
1346
2011
  unmountOnExit: !0,
1347
- cancelLabel: o(a ? "common.close" : "common.cancel"),
1348
- saveLabel: o("common.apply"),
2012
+ cancelLabel: s(a ? "common.close" : "common.cancel"),
2013
+ saveLabel: s("common.apply"),
1349
2014
  onSave: a ? void 0 : () => {
1350
- r();
2015
+ d();
1351
2016
  },
1352
- children: /* @__PURE__ */ t(_, { ...d, children: /* @__PURE__ */ t(
2017
+ children: /* @__PURE__ */ t(pe, { ...r, children: /* @__PURE__ */ t(
1353
2018
  "form",
1354
2019
  {
1355
- onSubmit: (u) => {
1356
- u.preventDefault(), r();
2020
+ onSubmit: (m) => {
2021
+ m.preventDefault(), d();
1357
2022
  },
1358
- children: /* @__PURE__ */ t(Dt, { plugins: Pe, children: a ? /* @__PURE__ */ t(He, { schema: c, mode: "read", values: i }) : /* @__PURE__ */ t(He, { schema: c }) })
2023
+ children: /* @__PURE__ */ t(Bn, { plugins: bt, children: a ? /* @__PURE__ */ t(ht, { schema: c, mode: "read", values: i }) : /* @__PURE__ */ t(ht, { schema: c }) })
1359
2024
  }
1360
2025
  ) })
1361
2026
  }
1362
2027
  );
1363
2028
  }
1364
- const ve = (e) => ({
2029
+ const Ce = (e) => ({
1365
2030
  ...e,
1366
2031
  entitySetId: e.entitySetId || null
1367
- }), ti = (e) => ({
2032
+ }), tl = (e) => ({
1368
2033
  ...e,
1369
2034
  entitySetId: e.entitySetId ?? ""
1370
2035
  });
1371
- function ki({ client: e, id: n, onDeleted: l }) {
1372
- const { t: i } = V(S), { workspaceId: a } = W(), s = A({
2036
+ function kl({ client: e, id: n, onDeleted: l }) {
2037
+ const { t: i } = v(S), { workspaceId: a } = w(), o = C({
1373
2038
  queryKey: h.importProfile(a, n),
1374
2039
  queryFn: () => e.getImportProfile(n)
1375
2040
  });
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, {}) });
2041
+ return o.isError ? /* @__PURE__ */ t(le, { title: i("section.profiles.title"), children: /* @__PURE__ */ t(oe, {}) }) : o.data ? /* @__PURE__ */ t(nl, { client: e, profile: o.data, onDeleted: l }) : /* @__PURE__ */ t(le, { title: i("section.profiles.title"), children: /* @__PURE__ */ t(Pe, {}) });
1377
2042
  }
1378
- function ni({
2043
+ function nl({
1379
2044
  client: e,
1380
2045
  profile: n,
1381
2046
  onDeleted: l
1382
2047
  }) {
1383
- const { t: i } = V(S), { workspaceId: a } = W(), { paths: s } = J(), o = $(), c = j(), [p, d] = L(!1), m = A({
2048
+ const { t: i } = v(S), { workspaceId: a } = w(), { paths: o } = z(), s = re(), c = te(), [p, r] = P(!1), u = C({
1384
2049
  queryKey: h.processors(a),
1385
2050
  queryFn: () => e.listProcessors()
1386
- }), r = A({
2051
+ }), d = C({
1387
2052
  queryKey: h.mappings(a),
1388
2053
  queryFn: () => e.listMappings()
1389
- }), u = A({
2054
+ }), m = C({
1390
2055
  queryKey: h.entitySets(a),
1391
2056
  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) });
2057
+ }), f = ue({ defaultValues: Ce(n.content) }), { reset: b, formState: y } = f;
2058
+ j(() => {
2059
+ y.isDirty || b(Ce(n.content));
2060
+ }, [n, b, y.isDirty]);
2061
+ const R = ee({
2062
+ mutationFn: (V) => e.updateImportProfile(n.id, tl(V), n.state.draftRevisionId),
2063
+ onSuccess: (V) => {
2064
+ c.setQueryData(h.importProfile(a, V.id), V), b(Ce(V.content)), c.invalidateQueries({ queryKey: h.importProfiles(a) });
1400
2065
  }
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
- ) })
2066
+ }), N = f.handleSubmit((V) => R.mutate(V)), F = Se({ control: f.control, name: "name" }), [Y, X] = ot(), U = ct({
2067
+ client: e,
2068
+ kind: "importProfile",
2069
+ id: n.id,
2070
+ validity: n.validity,
2071
+ state: n.state,
2072
+ unsaved: y.isDirty
2073
+ });
2074
+ return tt(
2075
+ s ? /* @__PURE__ */ g(K, { storageKey: "importhub.profile.rail", children: [
2076
+ /* @__PURE__ */ t(K.Header, { title: i("rail.title") }),
2077
+ /* @__PURE__ */ g(K.Section, { id: "actions", label: i("rail.actions"), children: [
2078
+ U.railAction,
2079
+ /* @__PURE__ */ t(
2080
+ K.IconButton,
2081
+ {
2082
+ label: i("profiles.delete"),
2083
+ icon: /* @__PURE__ */ t(ge, { size: 16 }),
2084
+ tone: "outline-red",
2085
+ onClick: () => r(!0)
2086
+ }
2087
+ )
2088
+ ] })
1414
2089
  ] }) : null
1415
- ), /* @__PURE__ */ b(
1416
- H,
2090
+ ), /* @__PURE__ */ g(
2091
+ le,
1417
2092
  {
1418
2093
  title: n.content.name,
1419
- breadcrumbs: [{ label: i("section.profiles.title"), to: s.profiles }],
1420
- badges: /* @__PURE__ */ b(U, { gap: "2", children: [
2094
+ breadcrumbs: [{ label: i("section.profiles.title"), to: o.profiles }],
2095
+ badges: /* @__PURE__ */ g(L, { gap: "2", children: [
1421
2096
  /* @__PURE__ */ t(
1422
- ye,
2097
+ ne,
1423
2098
  {
1424
2099
  tone: n.validity.valid ? "success" : "danger",
1425
2100
  label: n.validity.valid ? i("validity.valid") : i("validity.invalid")
1426
2101
  }
1427
2102
  ),
1428
- /* @__PURE__ */ t(Je, { children: oe(n.state, i) })
2103
+ /* @__PURE__ */ t(at, { state: n.state })
1429
2104
  ] }),
1430
- actions: o ? /* @__PURE__ */ t(
1431
- E,
2105
+ tabs: X,
2106
+ actions: s ? /* @__PURE__ */ t(
2107
+ B,
1432
2108
  {
1433
2109
  variant: "solid",
1434
- disabled: !R.isDirty,
1435
- loading: G.isPending,
2110
+ disabled: !y.isDirty,
2111
+ loading: R.isPending,
1436
2112
  onClick: () => {
1437
- Z();
2113
+ N();
1438
2114
  },
1439
2115
  children: i("common.save")
1440
2116
  }
1441
2117
  ) : void 0,
1442
2118
  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(
2119
+ Y === "history" ? /* @__PURE__ */ t(
2120
+ ut,
2121
+ {
2122
+ client: e,
2123
+ kind: "importProfile",
2124
+ id: n.id,
2125
+ draftRevisionId: n.state.draftRevisionId,
2126
+ onRestored: async () => {
2127
+ const V = await e.getImportProfile(n.id);
2128
+ c.setQueryData(h.importProfile(a, V.id), V), b(Ce(V.content));
2129
+ }
2130
+ }
2131
+ ) : /* @__PURE__ */ t(k, { px: "8", py: "6", children: u.isPending || d.isPending || m.isPending ? /* @__PURE__ */ t(Pe, {}) : /* @__PURE__ */ t(pe, { ...f, children: /* @__PURE__ */ t(
1444
2132
  "form",
1445
2133
  {
1446
- onSubmit: (I) => {
1447
- I.preventDefault(), o && Z();
2134
+ onSubmit: (V) => {
2135
+ V.preventDefault(), s && N();
1448
2136
  },
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: [
2137
+ children: /* @__PURE__ */ g(Z, { gap: "4", children: [
2138
+ U.notice,
2139
+ /* @__PURE__ */ t(Me, { validity: n.validity }),
2140
+ R.isError ? /* @__PURE__ */ t(J, { status: "error", colorPalette: "danger", title: i("save.failed"), children: R.error.message }) : null,
2141
+ /* @__PURE__ */ t(O, { title: i("profiles.general"), children: /* @__PURE__ */ g(Z, { gap: "4", children: [
1453
2142
  /* @__PURE__ */ t(
1454
- N,
2143
+ Q,
1455
2144
  {
1456
2145
  name: "name",
1457
2146
  label: i("fields.name"),
1458
2147
  required: !0,
1459
- disabled: !o
2148
+ disabled: !s
1460
2149
  }
1461
2150
  ),
1462
2151
  /* @__PURE__ */ t(
1463
- Re,
2152
+ ze,
1464
2153
  {
1465
2154
  name: "description",
1466
2155
  label: i("fields.description"),
1467
- disabled: !o
2156
+ disabled: !s
1468
2157
  }
1469
2158
  ),
1470
2159
  /* @__PURE__ */ t(
1471
- me,
2160
+ Ye,
1472
2161
  {
1473
2162
  name: "entitySetId",
1474
2163
  label: i("profiles.entitySet"),
1475
2164
  helperText: i("profiles.entitySetHelp"),
1476
2165
  placeholder: i("profiles.noEntitySet"),
1477
- options: (u.data ?? []).map((I) => ({
1478
- id: I.id,
1479
- label: I.content.name
2166
+ options: (m.data ?? []).map((V) => ({
2167
+ id: V.id,
2168
+ label: V.content.name
1480
2169
  })),
1481
- disabled: !o
2170
+ disabled: !s
1482
2171
  }
1483
2172
  ),
1484
2173
  /* @__PURE__ */ t(
1485
- Le,
2174
+ gt,
1486
2175
  {
1487
2176
  name: "autoPublish",
1488
2177
  label: i("profiles.autoPublish"),
1489
2178
  helperText: i("profiles.autoPublishHelp"),
1490
- disabled: !o
2179
+ disabled: !s
1491
2180
  }
1492
2181
  ),
1493
2182
  /* @__PURE__ */ t(
1494
- Le,
2183
+ gt,
1495
2184
  {
1496
2185
  name: "deleteSourceFileOnSuccess",
1497
2186
  label: i("profiles.deleteOnSuccess"),
1498
2187
  helperText: i("profiles.deleteOnSuccessHelp"),
1499
- disabled: !o
2188
+ disabled: !s
1500
2189
  }
1501
2190
  )
1502
2191
  ] }) }),
1503
- /* @__PURE__ */ t(z, { title: i("profiles.preprocessors"), children: /* @__PURE__ */ t(
1504
- tt,
2192
+ /* @__PURE__ */ t(O, { title: i("profiles.preprocessors"), children: /* @__PURE__ */ t(
2193
+ Xt,
1505
2194
  {
1506
2195
  name: "preprocessors",
1507
2196
  kind: "preprocessor",
1508
- catalogue: m.data ?? [],
1509
- editable: o
2197
+ catalogue: u.data ?? [],
2198
+ editable: s
1510
2199
  }
1511
2200
  ) }),
1512
- /* @__PURE__ */ t(z, { title: i("profiles.mappings"), children: /* @__PURE__ */ t(
1513
- li,
2201
+ /* @__PURE__ */ t(O, { title: i("profiles.mappings"), children: /* @__PURE__ */ t(
2202
+ ll,
1514
2203
  {
1515
- mappings: (r.data ?? []).map((I) => ({
1516
- id: I.id,
1517
- name: I.content.name,
1518
- valid: I.validity.valid
2204
+ mappings: (d.data ?? []).map((V) => ({
2205
+ id: V.id,
2206
+ name: V.content.name,
2207
+ valid: V.validity.valid
1519
2208
  })),
1520
- editable: o,
1521
- hrefOf: (I) => q(s, "mappings", I)
2209
+ editable: s,
2210
+ hrefOf: (V) => se(o, "mappings", V)
1522
2211
  }
1523
2212
  ) }),
1524
- /* @__PURE__ */ t(z, { title: i("profiles.postProcessors"), children: /* @__PURE__ */ t(
1525
- tt,
2213
+ /* @__PURE__ */ t(O, { title: i("profiles.postProcessors"), children: /* @__PURE__ */ t(
2214
+ Xt,
1526
2215
  {
1527
2216
  name: "postProcessors",
1528
2217
  kind: "post_processor",
1529
- catalogue: m.data ?? [],
1530
- editable: o
2218
+ catalogue: u.data ?? [],
2219
+ editable: s
1531
2220
  }
1532
2221
  ) })
1533
2222
  ] })
1534
2223
  }
1535
2224
  ) }) }),
2225
+ U.dialog,
1536
2226
  /* @__PURE__ */ t(
1537
- ze,
2227
+ rt,
1538
2228
  {
1539
2229
  open: p,
1540
- onClose: () => d(!1),
1541
- title: i("profiles.deleteTitle", { name: B || n.content.name }),
2230
+ onClose: () => r(!1),
2231
+ title: i("profiles.deleteTitle", { name: F || n.content.name }),
1542
2232
  message: i("profiles.deleteMessage"),
1543
2233
  onDelete: () => e.deleteImportProfile(n.id),
1544
2234
  onDeleted: () => {
1545
- d(!1), c.removeQueries({
2235
+ r(!1), c.removeQueries({
1546
2236
  queryKey: h.importProfile(a, n.id)
1547
2237
  }), c.invalidateQueries({
1548
2238
  queryKey: h.importProfiles(a)
@@ -1554,50 +2244,50 @@ function ni({
1554
2244
  }
1555
2245
  );
1556
2246
  }
1557
- function tt({
2247
+ function Xt({
1558
2248
  name: e,
1559
2249
  kind: n,
1560
2250
  catalogue: l,
1561
2251
  editable: i
1562
2252
  }) {
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: [
2253
+ const { t: a } = v(S), { control: o, setValue: s } = Qt(), c = Se({ control: o, name: e }) ?? [], [p, r] = P(null), u = (b) => s(e, b, { shouldDirty: !0 }), d = (b) => l.find((y) => y.name === b.processor), m = p === null ? void 0 : c[p], f = l.filter((b) => b.kind === n && b.target === "source_file");
2254
+ return /* @__PURE__ */ g(D, { children: [
1565
2255
  /* @__PURE__ */ t(
1566
- ut,
2256
+ xt,
1567
2257
  {
1568
2258
  items: c,
1569
- nameOf: (g) => g.processor,
2259
+ nameOf: (b) => b.processor,
1570
2260
  editable: i,
1571
- onChange: m,
2261
+ onChange: u,
1572
2262
  emptyLabel: a(
1573
2263
  n === "preprocessor" ? "profiles.noPreprocessors" : "profiles.noPostProcessors"
1574
2264
  ),
1575
2265
  addLabel: a(
1576
2266
  n === "preprocessor" ? "profiles.addPreprocessor" : "profiles.addPostProcessor"
1577
2267
  ),
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);
2268
+ addOptions: f.map((b) => ({ value: b.name, label: b.name })),
2269
+ onAdd: (b) => {
2270
+ u([...c, { processor: b, settings: {} }]), (f.find((y) => y.name === b)?.settingsSpec.length ?? 0) > 0 && r(c.length);
1581
2271
  },
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") })
2272
+ renderItem: (b, y) => {
2273
+ const R = d(b), N = Object.keys(b.settings).length;
2274
+ return /* @__PURE__ */ g(L, { justify: "space-between", gap: "3", children: [
2275
+ /* @__PURE__ */ g(Z, { gap: "0", minW: "0", children: [
2276
+ /* @__PURE__ */ t(E, { fontFamily: "mono", fontSize: "sm", children: b.processor }),
2277
+ /* @__PURE__ */ t(E, { color: "fg.muted", fontSize: "sm", children: R ? R.description : a("processors.unknown") })
1588
2278
  ] }),
1589
- G && G.settingsSpec.length > 0 ? /* @__PURE__ */ b(
1590
- E,
2279
+ R && R.settingsSpec.length > 0 ? /* @__PURE__ */ g(
2280
+ B,
1591
2281
  {
1592
2282
  size: "xs",
1593
2283
  variant: "outline",
1594
- onClick: () => d(R),
2284
+ onClick: () => r(y),
1595
2285
  "aria-label": a(i ? "processors.configure" : "processors.viewSettings", {
1596
- name: g.processor
2286
+ name: b.processor
1597
2287
  }),
1598
2288
  children: [
1599
- /* @__PURE__ */ t(kt, { size: 14, "aria-hidden": !0 }),
1600
- a("processors.settingsCount", { count: Z })
2289
+ /* @__PURE__ */ t(bn, { size: 14, "aria-hidden": !0 }),
2290
+ a("processors.settingsCount", { count: N })
1601
2291
  ]
1602
2292
  }
1603
2293
  ) : null
@@ -1606,109 +2296,109 @@ function tt({
1606
2296
  }
1607
2297
  ),
1608
2298
  /* @__PURE__ */ t(
1609
- ei,
2299
+ el,
1610
2300
  {
1611
- open: u !== void 0,
1612
- onClose: () => d(null),
1613
- processor: u ? r(u) ?? null : null,
1614
- settings: u?.settings ?? ii,
2301
+ open: m !== void 0,
2302
+ onClose: () => r(null),
2303
+ processor: m ? d(m) ?? null : null,
2304
+ settings: m?.settings ?? il,
1615
2305
  readOnly: !i,
1616
- onApply: (g) => {
1617
- p !== null && (m(c.map((R, G) => G === p ? { ...R, settings: g } : R)), d(null));
2306
+ onApply: (b) => {
2307
+ p !== null && (u(c.map((y, R) => R === p ? { ...y, settings: b } : y)), r(null));
1618
2308
  }
1619
2309
  }
1620
2310
  )
1621
2311
  ] });
1622
2312
  }
1623
- const ii = {};
1624
- function li({
2313
+ const il = {};
2314
+ function ll({
1625
2315
  mappings: e,
1626
2316
  editable: n,
1627
2317
  hrefOf: l
1628
2318
  }) {
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 });
2319
+ const { t: i } = v(S), { control: a, setValue: o } = Qt(), s = Se({ control: a, name: "mappingIds" }) ?? [], c = x(() => new Map(e.map((u) => [u.id, u])), [e]), p = (u) => o("mappingIds", u, { shouldDirty: !0 });
1630
2320
  return /* @__PURE__ */ t(
1631
- ut,
2321
+ xt,
1632
2322
  {
1633
- items: o,
1634
- nameOf: (m) => c.get(m)?.name ?? i("profiles.missingMapping"),
2323
+ items: s,
2324
+ nameOf: (u) => c.get(u)?.name ?? i("profiles.missingMapping"),
1635
2325
  editable: n,
1636
2326
  onChange: p,
1637
2327
  emptyLabel: i("profiles.noMappings"),
1638
2328
  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") });
2329
+ addOptions: e.filter((u) => !s.includes(u.id)).map((u) => ({ value: u.id, label: u.name })),
2330
+ onAdd: (u) => p([...s, u]),
2331
+ renderItem: (u) => {
2332
+ const d = c.get(u);
2333
+ return d ? /* @__PURE__ */ g(L, { gap: "2", children: [
2334
+ /* @__PURE__ */ t(be, { asChild: !0, children: /* @__PURE__ */ t(Ke, { to: l(d.id), children: d.name }) }),
2335
+ d.valid ? null : /* @__PURE__ */ t(ne, { tone: "danger", label: i("validity.invalid") })
2336
+ ] }) : /* @__PURE__ */ t(E, { color: "fg.muted", children: i("profiles.missingMapping") });
1647
2337
  }
1648
2338
  }
1649
2339
  );
1650
2340
  }
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({
2341
+ const Qt = () => Nt();
2342
+ function zl({ client: e, onOpen: n }) {
2343
+ const { t: l } = v(S), { workspaceId: i } = w(), { paths: a } = z(), o = re(), s = te(), [c, p] = P(!1), r = C({
1654
2344
  queryKey: h.importProfiles(i),
1655
2345
  queryFn: () => e.listImportProfiles()
1656
- }), m = T(
2346
+ }), u = x(
1657
2347
  () => [
1658
2348
  {
1659
2349
  id: "name",
1660
2350
  header: l("fields.name"),
1661
- cell: (r) => /* @__PURE__ */ t(
1662
- Ne,
2351
+ cell: (d) => /* @__PURE__ */ t(
2352
+ nt,
1663
2353
  {
1664
- to: q(a, "profiles", r.row.original.id),
1665
- label: r.row.original.content.name
2354
+ to: se(a, "profiles", d.row.original.id),
2355
+ label: d.row.original.content.name
1666
2356
  }
1667
2357
  )
1668
2358
  },
1669
2359
  {
1670
2360
  id: "validity",
1671
2361
  header: l("validity.column"),
1672
- cell: (r) => /* @__PURE__ */ t(Me, { validity: r.row.original.validity })
2362
+ cell: (d) => /* @__PURE__ */ t(xe, { validity: d.row.original.validity })
1673
2363
  },
1674
2364
  {
1675
2365
  id: "release",
1676
2366
  header: l("release.column"),
1677
2367
  size: 140,
1678
- cell: (r) => /* @__PURE__ */ t(M, { value: oe(r.row.original.state, l) })
2368
+ cell: (d) => /* @__PURE__ */ t($, { value: Mt(d.row.original.state, l) })
1679
2369
  }
1680
2370
  ],
1681
2371
  [l, a]
1682
2372
  );
1683
- return /* @__PURE__ */ b(
1684
- ie,
2373
+ return /* @__PURE__ */ g(
2374
+ fe,
1685
2375
  {
1686
2376
  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 }),
2377
+ actions: o ? /* @__PURE__ */ g(B, { variant: "solid", onClick: () => p(!0), children: [
2378
+ /* @__PURE__ */ t(ye, { size: 16, "aria-hidden": !0 }),
1689
2379
  l("profiles.new")
1690
2380
  ] }) : void 0,
1691
2381
  children: [
1692
- d.isError ? /* @__PURE__ */ t(D, {}) : /* @__PURE__ */ t(
1693
- Ve,
2382
+ r.isError ? /* @__PURE__ */ t(oe, {}) : /* @__PURE__ */ t(
2383
+ Re,
1694
2384
  {
1695
- columns: m,
1696
- data: d.data ?? [],
1697
- loading: d.isPending,
1698
- getRowId: (r) => r.id,
2385
+ columns: u,
2386
+ data: r.data ?? [],
2387
+ loading: r.isPending,
2388
+ getRowId: (d) => d.id,
1699
2389
  emptyState: l("profiles.empty")
1700
2390
  }
1701
2391
  ),
1702
2392
  /* @__PURE__ */ t(
1703
- xe,
2393
+ pt,
1704
2394
  {
1705
2395
  open: c,
1706
2396
  onClose: () => p(!1),
1707
2397
  title: l("profiles.new"),
1708
- onCreate: async ({ name: r, description: u }) => {
1709
- const y = await e.createImportProfile({
1710
- name: r,
1711
- description: u,
2398
+ onCreate: async ({ name: d, description: m }) => {
2399
+ const f = await e.createImportProfile({
2400
+ name: d,
2401
+ description: m,
1712
2402
  entitySetId: "",
1713
2403
  preprocessors: [],
1714
2404
  mappingIds: [],
@@ -1716,12 +2406,12 @@ function zi({ client: e, onOpen: n }) {
1716
2406
  autoPublish: !1,
1717
2407
  deleteSourceFileOnSuccess: !1
1718
2408
  });
1719
- return await o.invalidateQueries({
2409
+ return await s.invalidateQueries({
1720
2410
  queryKey: h.importProfiles(i)
1721
- }), y.id;
2411
+ }), f.id;
1722
2412
  },
1723
- onCreated: (r) => {
1724
- p(!1), n(r);
2413
+ onCreated: (d) => {
2414
+ p(!1), n(d);
1725
2415
  }
1726
2416
  }
1727
2417
  )
@@ -1730,26 +2420,28 @@ function zi({ client: e, onOpen: n }) {
1730
2420
  );
1731
2421
  }
1732
2422
  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,
2423
+ Cl as ChangeSetLink,
2424
+ ut as ConfigurationHistory,
2425
+ Bt as ConfigurationInUseError,
2426
+ Nl as EntitySetDetail,
2427
+ Jl as EntitySetsIndex,
2428
+ Wl as IMPORTHUB_SECTIONS,
2429
+ Ci as IMPORTHUB_SECTION_ICONS,
1739
2430
  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,
2431
+ kl as ImportProfileDetail,
2432
+ zl as ImportProfilesIndex,
2433
+ Bl as ImporthubHostProvider,
2434
+ wl as ImporthubStartPage,
2435
+ Fl as MappingDetail,
2436
+ Yl as MappingsIndex,
2437
+ Oe as NameTakenError,
2438
+ Ul as ProcessorCatalogue,
2439
+ Wt as ReleaseRefusedError,
2440
+ Wi as STANDALONE_IMPORTHUB_PATHS,
2441
+ Zl as createConnectImporthubClient,
2442
+ Xl as i18nResources,
1751
2443
  h as importhubKeys,
1752
- q as itemPath,
1753
- J as useImporthubHost
2444
+ se as itemPath,
2445
+ z as useImporthubHost
1754
2446
  };
1755
2447
  //# sourceMappingURL=index.js.map