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