@knkcs/contenthub-ui 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +4 -4
- package/dist/{branch-content-fields-SshLLDRV.js → branch-content-fields-CiAVF2F3.js} +2 -2
- package/dist/{branch-content-fields-SshLLDRV.js.map → branch-content-fields-CiAVF2F3.js.map} +1 -1
- package/dist/{content-library-B6Y9Bxph.js → content-library-DoiD_FOJ.js} +353 -342
- package/dist/content-library-DoiD_FOJ.js.map +1 -0
- package/dist/{heads-Brd2Gtjm.js → heads-dBmqNcOB.js} +12 -12
- package/dist/heads-dBmqNcOB.js.map +1 -0
- package/dist/index.d.ts +33 -3
- package/dist/index.js +2133 -2119
- package/dist/index.js.map +1 -1
- package/dist/testing.d.ts +26 -6
- package/dist/testing.js +464 -439
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
- package/dist/content-library-B6Y9Bxph.js.map +0 -1
- package/dist/heads-Brd2Gtjm.js.map +0 -1
|
@@ -1,123 +1,128 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useCallback as
|
|
3
|
-
import { Fragment as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { DataTable as
|
|
6
|
-
import { Alert as D, HStack as
|
|
7
|
-
import { IndexPageTemplate as
|
|
8
|
-
import { keepPreviousData as re, useInfiniteQuery as ie, useQuery as
|
|
9
|
-
import { ChevronRight as
|
|
1
|
+
import { C as e, S as t, h as n, y as r } from "./heads-dBmqNcOB.js";
|
|
2
|
+
import { useCallback as i, useEffect as a, useMemo as o, useRef as s, useState as c } from "react";
|
|
3
|
+
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
4
|
+
import { Button as f, EmptyState as p } from "@knkcs/anker/atoms";
|
|
5
|
+
import { DataTable as m, DateCell as h, Modal as g, Toolbar as _, TreeViewBranchControl as v, TreeViewBranchIndicator as y, TreeViewBranchText as b, TreeViewItem as x, TreeViewItemText as S, TreeViewLabel as ee, TreeViewNode as C, TreeViewRoot as w, TreeViewTree as T, TruncatedTextCell as te, createTreeCollection as E } from "@knkcs/anker/components";
|
|
6
|
+
import { Alert as D, HStack as O, NativeSelect as k, Spinner as A, Stack as j, Text as M } from "@knkcs/anker/primitives";
|
|
7
|
+
import { IndexPageTemplate as ne, SubNavLayout as N } from "@knkcs/anker/templates";
|
|
8
|
+
import { keepPreviousData as re, useInfiniteQuery as ie, useQuery as P, useQueryClient as ae } from "@tanstack/react-query";
|
|
9
|
+
import { ChevronRight as F, FileText as oe, Lock as se, Plus as ce } from "lucide-react";
|
|
10
10
|
import { useTranslation as I } from "react-i18next";
|
|
11
|
-
import { zodResolver as
|
|
12
|
-
import { BaseSelectField as
|
|
13
|
-
import { FormProvider as
|
|
14
|
-
import { z as
|
|
11
|
+
import { zodResolver as L } from "@hookform/resolvers/zod";
|
|
12
|
+
import { BaseSelectField as R, InputField as z, LookupSelectField as B } from "@knkcs/anker/forms";
|
|
13
|
+
import { FormProvider as V, useForm as le, useWatch as H } from "react-hook-form";
|
|
14
|
+
import { z as U } from "zod";
|
|
15
15
|
import { useHostIdentity as ue } from "@knkcs/anker/host";
|
|
16
16
|
import { useSearchParams as de } from "react-router";
|
|
17
17
|
//#region src/common/query-keys.ts
|
|
18
|
-
var
|
|
18
|
+
var W = {
|
|
19
19
|
all: ["contenthub"],
|
|
20
|
-
blockReasons: () => [...
|
|
21
|
-
changeSets: () => [...
|
|
22
|
-
changeSetLists: () => [...
|
|
23
|
-
changeSetList: (e) => [...
|
|
24
|
-
openChangeSets: () => [...
|
|
20
|
+
blockReasons: () => [...W.all, "block-reasons"],
|
|
21
|
+
changeSets: () => [...W.all, "change-sets"],
|
|
22
|
+
changeSetLists: () => [...W.changeSets(), "list"],
|
|
23
|
+
changeSetList: (e) => [...W.changeSetLists(), e],
|
|
24
|
+
openChangeSets: () => [...W.changeSetLists(), "open-picker"],
|
|
25
25
|
changeSet: (e) => [
|
|
26
|
-
...
|
|
26
|
+
...W.changeSets(),
|
|
27
27
|
"detail",
|
|
28
28
|
e
|
|
29
29
|
],
|
|
30
30
|
publishReadiness: (e) => [
|
|
31
|
-
...
|
|
31
|
+
...W.changeSets(),
|
|
32
32
|
"readiness",
|
|
33
33
|
e
|
|
34
34
|
],
|
|
35
|
-
publishReadinessAt: (e, t) => [...
|
|
35
|
+
publishReadinessAt: (e, t) => [...W.publishReadiness(e), t],
|
|
36
36
|
checkStandings: (e) => [
|
|
37
|
-
...
|
|
37
|
+
...W.changeSets(),
|
|
38
38
|
"checks",
|
|
39
39
|
e
|
|
40
40
|
],
|
|
41
|
-
changeSetStatuses: () => [...
|
|
42
|
-
requiredChecks: () => [...
|
|
41
|
+
changeSetStatuses: () => [...W.all, "change-set-statuses"],
|
|
42
|
+
requiredChecks: () => [...W.all, "required-checks"],
|
|
43
43
|
requiredCheckRecorders: (e) => [
|
|
44
|
-
...
|
|
44
|
+
...W.requiredChecks(),
|
|
45
45
|
"recorders",
|
|
46
46
|
e
|
|
47
47
|
],
|
|
48
|
-
collections: () => [...
|
|
48
|
+
collections: () => [...W.all, "collections"],
|
|
49
49
|
collectionGrants: (e) => [
|
|
50
|
-
...
|
|
50
|
+
...W.collections(),
|
|
51
51
|
"grants",
|
|
52
52
|
e
|
|
53
53
|
],
|
|
54
|
-
contents: () => [...
|
|
55
|
-
contentLists: () => [...
|
|
56
|
-
contentList: (e) => [...
|
|
54
|
+
contents: () => [...W.all, "contents"],
|
|
55
|
+
contentLists: () => [...W.contents(), "list"],
|
|
56
|
+
contentList: (e) => [...W.contentLists(), e],
|
|
57
57
|
content: (e) => [
|
|
58
|
-
...
|
|
58
|
+
...W.contents(),
|
|
59
59
|
"detail",
|
|
60
60
|
e
|
|
61
61
|
],
|
|
62
62
|
contentRead: (e, t) => [
|
|
63
|
-
...
|
|
63
|
+
...W.content(e),
|
|
64
64
|
"read",
|
|
65
65
|
t
|
|
66
66
|
],
|
|
67
|
-
|
|
67
|
+
contentBranchRead: (e, t, n) => [
|
|
68
|
+
...W.contentRead(e, t),
|
|
69
|
+
"branch",
|
|
70
|
+
n
|
|
71
|
+
],
|
|
72
|
+
contentTimeline: (e) => [...W.content(e), "timeline"],
|
|
68
73
|
contentRevisions: (e, t) => [
|
|
69
|
-
...
|
|
74
|
+
...W.content(e),
|
|
70
75
|
"revisions",
|
|
71
76
|
t
|
|
72
77
|
],
|
|
73
78
|
contentCompare: (e, t, n) => [
|
|
74
|
-
...
|
|
79
|
+
...W.content(e),
|
|
75
80
|
"compare",
|
|
76
81
|
t,
|
|
77
82
|
n
|
|
78
83
|
],
|
|
79
84
|
contentReferences: (e, t) => [
|
|
80
|
-
...
|
|
85
|
+
...W.content(e),
|
|
81
86
|
"references",
|
|
82
87
|
t
|
|
83
88
|
],
|
|
84
|
-
contentReferrers: (e) => [...
|
|
89
|
+
contentReferrers: (e) => [...W.content(e), "referrers"],
|
|
85
90
|
contentOutdatedPins: (e, t) => [
|
|
86
|
-
...
|
|
91
|
+
...W.content(e),
|
|
87
92
|
"outdated-pins",
|
|
88
93
|
t
|
|
89
94
|
],
|
|
90
|
-
contentChangeSets: (e) => [...
|
|
95
|
+
contentChangeSets: (e) => [...W.content(e), "change-sets"],
|
|
91
96
|
chainPreview: (e, t, ...n) => [
|
|
92
|
-
...
|
|
97
|
+
...W.content(e),
|
|
93
98
|
"preview",
|
|
94
99
|
t,
|
|
95
100
|
...n
|
|
96
101
|
],
|
|
97
102
|
previewInForce: (e, t, n) => [
|
|
98
|
-
...
|
|
103
|
+
...W.content(e),
|
|
99
104
|
"preview-in-force",
|
|
100
105
|
t,
|
|
101
106
|
n
|
|
102
107
|
],
|
|
103
108
|
pendingMerge: (e) => [
|
|
104
|
-
...
|
|
109
|
+
...W.all,
|
|
105
110
|
"pending-merge",
|
|
106
111
|
e
|
|
107
112
|
],
|
|
108
|
-
blueprints: () => [...
|
|
113
|
+
blueprints: () => [...W.all, "blueprints"],
|
|
109
114
|
blueprintNames: (e) => [
|
|
110
|
-
...
|
|
115
|
+
...W.blueprints(),
|
|
111
116
|
"names",
|
|
112
117
|
e
|
|
113
118
|
],
|
|
114
|
-
blueprintFilterOptions: () => [...
|
|
119
|
+
blueprintFilterOptions: () => [...W.blueprints(), "filter-options"],
|
|
115
120
|
blueprintReleases: (e) => [
|
|
116
|
-
...
|
|
121
|
+
...W.blueprints(),
|
|
117
122
|
"releases",
|
|
118
123
|
e
|
|
119
124
|
]
|
|
120
|
-
},
|
|
125
|
+
}, G = {
|
|
121
126
|
common: { cancel: "Abbrechen" },
|
|
122
127
|
settings: {
|
|
123
128
|
section: "Einstellungen",
|
|
@@ -532,7 +537,7 @@ var U = {
|
|
|
532
537
|
failed: "Die Kette konnte nicht entfernt werden. Bitte erneut versuchen."
|
|
533
538
|
}
|
|
534
539
|
},
|
|
535
|
-
changeSet: /* @__PURE__ */ JSON.parse("{\"loading\":\"Change Set wird geladen\",\"unavailable\":\"Change Set nicht verfügbar\",\"notFound\":\"Dieses Change Set gibt es nicht.\",\"loadError\":\"Das Change Set konnte nicht geladen werden.\",\"tabs\":{\"general\":\"Allgemein\",\"contents\":\"Inhalte\",\"releases\":\"Releases\",\"checks\":\"Prüfungen\"},\"save\":\"Speichern\",\"saveChanged_one\":\"Speichern · {{count}} Tab geändert\",\"saveChanged_other\":\"Speichern · {{count}} Tabs geändert\",\"saved\":\"Gespeichert.\",\"refused\":{\"transition\":\"Der Status kann nicht von {{from}} zu {{to}} wechseln.\",\"staleStatus\":\"Inzwischen hat jemand den Status auf {{current}} gesetzt. Wähle erneut und speichere.\",\"closed\":\"Dieses Change Set ist geschlossen: Es wurde inzwischen veröffentlicht oder verworfen.\",\"invalid\":\"Die Änderung wurde abgelehnt.\",\"failed\":\"Die Änderungen konnten nicht gespeichert werden. Versuche es erneut.\",\"guarded\":\"Du darfst den Status nicht von {{from}} zu {{to}} wechseln.\",\"unavailable\":\"Change-Set-Status können gerade nicht geprüft werden. Speichere gleich noch einmal.\"},\"leave\":{\"title\":\"Mit ungespeicherten Änderungen verlassen?\",\"message\":\"Deine Änderungen an diesem Change Set sind noch nicht gespeichert. Trotzdem verlassen?\",\"confirm\":\"Verlassen\",\"cancel\":\"Bleiben\"},\"general\":{\"about\":\"Überblick\",\"name\":\"Name\",\"source\":\"Quelle\",\"noSource\":\"Keine\",\"state\":\"Zustand\",\"createdBy\":\"Angelegt von\",\"frozenHint\":\"Name und Quelle ändern sich nicht mehr: Das Change Set ist abgeschlossen.\",\"work\":\"Arbeit\",\"status\":\"Status\",\"noStatus\":\"Kein Status\",\"statusHelp\":\"Wo die Arbeit steht. Er entscheidet nie, ob das Change Set veröffentlicht werden kann.\",\"statusFrozen\":\"Eingefroren: Das Change Set ist geschlossen.\",\"assignees\":\"Zuständig\",\"assigneesHelp\":\"Wer gerade daran arbeitet.\",\"nobody\":\"Niemand\",\"dependencies\":\"Hängt ab von\",\"dependenciesHelp\":\"Offene Change Sets, auf denen dieses aufbaut. Es kann erst nach ihnen veröffentlicht werden.\",\"dependenciesClosed\":\"Abhängigkeiten ändern sich nicht mehr, sobald ein Change Set geschlossen ist.\",\"noDependencies\":\"Keine Abhängigkeiten\"},\"contents\":{\"columns\":{\"content\":\"Content\",\"branches\":\"Branches\",\"born\":\"Herkunft\"},\"branch\":\"Branch\",\"branches\":\"Branches\",\"bornHere\":\"Hier angelegt\",\"onMain\":\"Veröffentlicht\",\"empty\":\"Noch kein Content in diesem Change Set\",\"emptyHint\":\"Beginne, einen Content in diesem Change Set zu bearbeiten, dann erscheint seine Chain hier.\"},\"rail\":{\"eyebrow\":\"Change Set\",\"actions\":\"Aktionen\",\"publish\":\"Veröffentlichen\",\"updateFromMain\":\"Aus Main aktualisieren\",\"discard\":\"Verwerfen\",\"about\":\"Überblick\",\"blockers_one\":\"Hindernis\",\"blockers_other\":\"Hindernisse\",\"readiness\":\"Bereit zur Veröffentlichung\",\"ready\":\"Bereit\",\"unknownReadiness\":\"Unbekannt\",\"status\":\"Status\",\"noStatus\":\"Kein Status\",\"state\":\"Zustand\",\"source\":\"Quelle\",\"noSource\":\"Keine Quelle\"},\"review\":{\"title\":\"{{name}} veröffentlichen\",\"checking\":\"Prüfe, was die Veröffentlichung täte …\",\"loadError\":\"Die Prüfung konnte nicht laufen. Schließe sie und versuche es erneut.\",\"headsTitle\":\"Geprüfte Stände\",\"headsHint\":\"Veröffentlicht werden genau diese Stände. Ändert sich einer davor, wird die Veröffentlichung abgelehnt und nichts geschrieben.\",\"headLine\":\"{{content}} · Branch {{branch}} auf {{head}}\",\"noHeads\":\"Keine Branches: es entstehen nur Releases ohne Branch.\",\"blockersTitle_one\":\"{{count}} Hindernis\",\"blockersTitle_other\":\"{{count}} Hindernisse\",\"blockersHint\":\"Behebe jedes davon und prüfe dann erneut.\",\"ready\":\"Nichts steht dieser Veröffentlichung im Weg.\",\"releasesTitle\":\"Entstehende Releases\",\"noReleases\":\"Es entsteht kein Release.\",\"releaseLine\":\"{{content}} · {{kind}} · {{period}}\",\"publish\":\"Veröffentlichen\",\"again\":\"Erneut prüfen\",\"refused\":\"Die Veröffentlichung wurde abgelehnt. Nichts wurde geschrieben.\",\"closed\":\"Dieses Change Set wurde inzwischen veröffentlicht oder verworfen.\",\"withheld\":\"Dieses Change Set enthält Arbeit, die du nicht sehen kannst. Nur wer alle seine Inhalte sieht, kann es veröffentlichen.\",\"failed\":\"Die Veröffentlichung ist fehlgeschlagen. Versuche es erneut.\",\"published\":\"Veröffentlicht.\",\"alreadyPublished\":\"Es ist mit diesen Ständen bereits veröffentlicht.\",\"openContent\":\"{{content}} öffnen\"},\"blockers\":{\"moved_head\":\"{{content}}: Branch {{branch}} ist seit der Prüfung von {{expected}} auf {{current}} weitergegangen.\",\"moved_head_unreviewed\":\"{{content}}: Branch {{branch}} auf {{current}} war nicht Teil der Prüfung.\",\"moved_head_gone\":\"Branch {{branch}} wurde geprüft, gehört aber nicht mehr zu diesem Change Set.\",\"unplanned_branch\":\"{{content}}: Branch {{branch}} hat kein geplantes Release; die Veröffentlichung würde ihn beenden, ohne ihn zu releasen.\",\"several_branches\":\"{{content}} ist undatierter Content auf mehr als einem Branch; er wird auf genau einem bearbeitet.\",\"behind_base\":\"{{content}}: Branch {{branch}} liegt hinter {{current}}, zuletzt übernommen wurde {{expected}}. Aus Main aktualisieren.\",\"superseded_release\":\"{{content}}: Das geplante Release {{release}} ersetzt {{overlaps}}, das bereits ersetzt ist.\",\"overlapping_periods\":\"{{content}}: Der Gültigkeitszeitraum von {{release}} überschneidet sich mit dem von {{overlaps}}. Ersetze es oder ändere die Daten.\",\"covers_release\":\"{{content}}: Der Gültigkeitszeitraum von {{release}} deckt Release {{covered}} vollständig ab. Ersetze es oder ändere die Daten.\",\"pending_merge\":\"{{content}}: Branch {{branch}} hat einen offenen Merge. Löse ihn im Branch-Editor auf oder brich ihn ab.\",\"nothing_in_force\":\"{{content}}: Die Aufhebung {{release}} findet nichts mehr in Kraft, das sie aufheben könnte.\",\"withdrawal_with_chain\":\"{{content}} wird in diesem Change Set zugleich aufgehoben ({{release}}) und bearbeitet. Entferne eines davon.\",\"dated_changed\":\"{{content}} ist datierter Content geworden, nachdem {{release}} undatiert geplant wurde. Entferne die Chain und beginne sie mit Datum neu.\",\"unpublished_dependency\":\"Es hängt von Change Set {{dependency}} ab, das noch offen ist. Veröffentliche es zuerst oder entferne die Abhängigkeit.\",\"discarded_dependency\":\"Es hängt von Change Set {{dependency}} ab, das verworfen wurde. Entferne die Abhängigkeit und aktualisiere dann aus Main.\",\"dangling_pin\":\"{{content}}: Der Wert an {{path}} verweist auf Release {{release}} von {{target}}, das es nicht geben wird.\",\"second_toc_parent\":\"{{content}} stünde im Inhaltsverzeichnis von {{parents}}; es kann nur in einem stehen.\",\"missing_asset\":\"{{content}}: Der Wert an {{path}} zeigt Asset {{asset}}, das es nicht gibt.\",\"media_unavailable\":\"MediaHub ist für diesen Workspace nicht verfügbar.\",\"missing_required_field\":\"{{content}}: Das Pflichtfeld {{path}} ist in {{revision}} leer. Fülle es im Branch-Editor aus.\",\"outstanding_check\":\"{{check}} hat kein bestandenes oder erlassenes Ergebnis auf den aktuellen Ständen.\",\"outstanding_check_on\":\"{{check}} hat kein bestandenes oder erlassenes Ergebnis für {{content}} ({{subject}}).\",\"unknown\":\"Blockiert: {{code}}.\"},\"releases\":{\"planned\":\"Geplante Releases\",\"columns\":{\"content\":\"Content\",\"kind\":\"Art\",\"period\":\"Gültigkeitszeitraum\",\"pins\":\"Verweist auf\",\"origin\":\"Herkunft\"},\"kind\":{\"revision\":\"Revision\",\"date_only\":\"Nur Datum\",\"repeal\":\"Aufhebung\",\"withdrawal\":\"Rücknahme\"},\"openEnd\":\"offen\",\"undated\":\"Undatiert\",\"period\":\"{{first}} – {{last}}\",\"branchHead\":\"Stand von Branch {{branch}}\",\"revision\":\"Revision {{revision}}\",\"plannedByHand\":\"Geplant\",\"proposed\":\"Vorgeschlagen für {{release}}\",\"splitFrom\":\"Setzt {{release}} fort\",\"withheld\":\"Zurückgehalten: ein Plan ersetzt, was es trägt\",\"proposedHint\":\"Vorschläge folgen aus den geplanten Gültigkeitszeiträumen und werden mit jedem Plan neu berechnet; sie sind nicht bearbeitbar.\",\"empty\":\"Noch keine geplanten Releases\",\"emptyHint\":\"Plane ein Release auf einem Branch im Branch-Editor, dann erscheint hier, was die Veröffentlichung erzeugt.\",\"covered\":\"Abgedeckte Releases\",\"coveredHint\":\"Veröffentlichte Releases, die ein Plan abdeckt: Die Veröffentlichung ersetzt die, die ein Plan nennt, und wird für die übrigen abgelehnt, bis ein Plan sie ersetzt oder sich die Daten ändern.\",\"coveredColumns\":{\"release\":\"Release\",\"by\":\"Abgedeckt von\",\"outcome\":\"Bei Veröffentlichung\"},\"superseded\":\"Ersetzt\",\"blocks\":\"Verhindert die Veröffentlichung\",\"noCovered\":\"Kein veröffentlichtes Release ist abgedeckt.\"},\"checks\":{\"columns\":{\"check\":\"Pflichtprüfung\",\"on\":\"Für\",\"latest\":\"Letztes Ergebnis\",\"standing\":\"Stand\",\"actions\":\"Aktionen\"},\"wholeChangeSet\":\"Das ganze Change Set\",\"onBranch\":\"{{content}} · Branch {{branch}}\",\"onRelease\":\"{{content}} · Release {{release}}\",\"none\":\"Noch kein Ergebnis\",\"latest\":\"{{outcome}} von {{who}}\",\"outcome\":{\"passed\":\"Bestanden\",\"failed\":\"Nicht bestanden\",\"waived\":\"Erlassen\"},\"cleared\":\"Erfüllt\",\"stale\":\"Veraltet: seitdem gespeichert\",\"outstanding\":\"Ausstehend\",\"record\":\"Ergebnis erfassen\",\"independent\":\"Unabhängig\",\"empty\":\"Keine Pflichtprüfung gilt\",\"emptyHint\":\"Die Pflichtprüfungen des Workspaces sperren die Veröffentlichung des Contents, den sie nennen. Keine davon gilt für dieses Change Set.\",\"loadError\":\"Die Prüfergebnisse konnten nicht geladen werden.\",\"form\":{\"title\":\"Ergebnis von {{check}} erfassen\",\"on\":\"Für {{subject}}, auf den Ständen, die du jetzt siehst.\",\"outcome\":\"Ergebnis\",\"note\":\"Notiz\",\"noteHelp\":\"Warum, bei einem Erlass; sonst optional.\",\"noteRequired\":\"Ein Erlass braucht eine Notiz mit dem Grund.\",\"noteTooLong\":\"Höchstens {{max}} Zeichen.\",\"submit\":\"Erfassen\",\"stale\":\"Seit dem Öffnen hat jemand gespeichert. Schließe den Dialog, sieh erneut hin und erfasse auf den neuen Ständen.\",\"denied\":\"Du darfst dieses Ergebnis nicht erfassen.\",\"closed\":\"Dieses Change Set ist geschlossen und nimmt keine Ergebnisse mehr an.\",\"failed\":\"Das Ergebnis konnte nicht erfasst werden. Versuche es erneut.\"}},\"update\":{\"title\":\"Aus Main aktualisieren\",\"message\":\"Übernimm, was Main und die Abhängigkeiten dieses Change Sets seitdem hinzugewonnen haben, in jede Chain. Wie jedes Speichern macht das bisherige Prüfergebnisse veraltet.\",\"confirm\":\"Aktualisieren\",\"close\":\"Schließen\",\"done\":\"Aktualisiert.\",\"merged_one\":\"{{count}} Branch hat einen Merge übernommen.\",\"merged_other\":\"{{count}} Branches haben einen Merge übernommen.\",\"nothingMerged\":\"Nichts zu übernehmen: jeder Branch ist aktuell.\",\"pendingTitle\":\"Mit offenem Merge, im Branch-Editor aufzulösen:\",\"pendingLine\":\"{{content}} · Branch {{branch}}\",\"closed\":\"Dieses Change Set ist geschlossen.\",\"withheld\":\"Dieses Change Set enthält Arbeit, die du nicht sehen kannst. Nur wer alle seine Inhalte sieht, kann es als Ganzes aktualisieren.\",\"failed\":\"Die Aktualisierung ist fehlgeschlagen. Versuche es erneut.\"},\"discard\":{\"title\":\"Change Set verwerfen\",\"message\":\"„{{name}}“ verwerfen? Seine Branches enden, und darin angelegter Content verschwindet. Das kann nicht rückgängig gemacht werden.\",\"confirm\":\"Verwerfen\",\"closed\":\"Dieses Change Set ist bereits geschlossen.\",\"withheld\":\"Dieses Change Set enthält Arbeit, die du nicht sehen kannst. Nur wer alle seine Inhalte sieht, kann es verwerfen.\",\"failed\":\"Das Change Set konnte nicht verworfen werden. Versuche es erneut.\"}}"),
|
|
540
|
+
changeSet: /* @__PURE__ */ JSON.parse("{\"loading\":\"Change Set wird geladen\",\"unavailable\":\"Change Set nicht verfügbar\",\"notFound\":\"Dieses Change Set gibt es nicht.\",\"loadError\":\"Das Change Set konnte nicht geladen werden.\",\"tabs\":{\"general\":\"Allgemein\",\"contents\":\"Inhalte\",\"releases\":\"Releases\",\"checks\":\"Prüfungen\"},\"save\":\"Speichern\",\"saveChanged_one\":\"Speichern · {{count}} Tab geändert\",\"saveChanged_other\":\"Speichern · {{count}} Tabs geändert\",\"saved\":\"Gespeichert.\",\"refused\":{\"transition\":\"Der Status kann nicht von {{from}} zu {{to}} wechseln.\",\"staleStatus\":\"Inzwischen hat jemand den Status auf {{current}} gesetzt. Wähle erneut und speichere.\",\"closed\":\"Dieses Change Set ist geschlossen: Es wurde inzwischen veröffentlicht oder verworfen.\",\"invalid\":\"Die Änderung wurde abgelehnt.\",\"failed\":\"Die Änderungen konnten nicht gespeichert werden. Versuche es erneut.\",\"guarded\":\"Du darfst den Status nicht von {{from}} zu {{to}} wechseln.\",\"unavailable\":\"Change-Set-Status können gerade nicht geprüft werden. Speichere gleich noch einmal.\"},\"leave\":{\"title\":\"Mit ungespeicherten Änderungen verlassen?\",\"message\":\"Deine Änderungen an diesem Change Set sind noch nicht gespeichert. Trotzdem verlassen?\",\"confirm\":\"Verlassen\",\"cancel\":\"Bleiben\"},\"general\":{\"about\":\"Überblick\",\"name\":\"Name\",\"source\":\"Quelle\",\"noSource\":\"Keine\",\"state\":\"Zustand\",\"createdBy\":\"Angelegt von\",\"frozenHint\":\"Name und Quelle ändern sich nicht mehr: Das Change Set ist abgeschlossen.\",\"work\":\"Arbeit\",\"status\":\"Status\",\"noStatus\":\"Kein Status\",\"statusHelp\":\"Wo die Arbeit steht. Er entscheidet nie, ob das Change Set veröffentlicht werden kann.\",\"statusFrozen\":\"Eingefroren: Das Change Set ist geschlossen.\",\"assignees\":\"Zuständig\",\"assigneesHelp\":\"Wer gerade daran arbeitet.\",\"nobody\":\"Niemand\",\"dependencies\":\"Hängt ab von\",\"dependenciesHelp\":\"Offene Change Sets, auf denen dieses aufbaut. Es kann erst nach ihnen veröffentlicht werden.\",\"dependenciesClosed\":\"Abhängigkeiten ändern sich nicht mehr, sobald ein Change Set geschlossen ist.\",\"noDependencies\":\"Keine Abhängigkeiten\"},\"contents\":{\"columns\":{\"content\":\"Content\",\"branches\":\"Branches\",\"born\":\"Herkunft\"},\"branch\":\"Branch\",\"branches\":\"Branches\",\"bornHere\":\"Hier angelegt\",\"onMain\":\"Veröffentlicht\",\"empty\":\"Noch kein Content in diesem Change Set\",\"emptyHint\":\"Beginne, einen Content in diesem Change Set zu bearbeiten, dann erscheint seine Chain hier.\"},\"rail\":{\"eyebrow\":\"Change Set\",\"actions\":\"Aktionen\",\"publish\":\"Veröffentlichen\",\"updateFromMain\":\"Aus Main aktualisieren\",\"discard\":\"Verwerfen\",\"about\":\"Überblick\",\"blockers_one\":\"Hindernis\",\"blockers_other\":\"Hindernisse\",\"readiness\":\"Bereit zur Veröffentlichung\",\"ready\":\"Bereit\",\"unknownReadiness\":\"Unbekannt\",\"status\":\"Status\",\"noStatus\":\"Kein Status\",\"state\":\"Zustand\",\"source\":\"Quelle\",\"noSource\":\"Keine Quelle\"},\"review\":{\"title\":\"{{name}} veröffentlichen\",\"checking\":\"Prüfe, was die Veröffentlichung täte …\",\"loadError\":\"Die Prüfung konnte nicht laufen. Schließe sie und versuche es erneut.\",\"headsTitle\":\"Geprüfte Stände\",\"headsHint\":\"Veröffentlicht werden genau diese Stände. Ändert sich einer davor, wird die Veröffentlichung abgelehnt und nichts geschrieben.\",\"headLine\":\"{{content}} · Branch {{branch}} auf {{head}}\",\"noHeads\":\"Keine Branches: es entstehen nur Releases ohne Branch.\",\"blockersTitle_one\":\"{{count}} Hindernis\",\"blockersTitle_other\":\"{{count}} Hindernisse\",\"blockersHint\":\"Behebe jedes davon und prüfe dann erneut.\",\"ready\":\"Nichts steht dieser Veröffentlichung im Weg.\",\"releasesTitle\":\"Entstehende Releases\",\"noReleases\":\"Es entsteht kein Release.\",\"releaseLine\":\"{{content}} · {{kind}} · {{period}}\",\"publish\":\"Veröffentlichen\",\"again\":\"Erneut prüfen\",\"refused\":\"Die Veröffentlichung wurde abgelehnt. Nichts wurde geschrieben.\",\"closed\":\"Dieses Change Set wurde inzwischen veröffentlicht oder verworfen.\",\"withheld\":\"Dieses Change Set enthält Arbeit, die du nicht sehen kannst. Nur wer alle seine Inhalte sieht, kann es veröffentlichen.\",\"failed\":\"Die Veröffentlichung ist fehlgeschlagen. Versuche es erneut.\",\"published\":\"Veröffentlicht.\",\"alreadyPublished\":\"Es ist mit diesen Ständen bereits veröffentlicht.\",\"openContent\":\"{{content}} öffnen\"},\"blockers\":{\"moved_head\":\"{{content}}: Branch {{branch}} ist seit der Prüfung von {{expected}} auf {{current}} weitergegangen.\",\"moved_head_unreviewed\":\"{{content}}: Branch {{branch}} auf {{current}} war nicht Teil der Prüfung.\",\"moved_head_gone\":\"Branch {{branch}} wurde geprüft, gehört aber nicht mehr zu diesem Change Set.\",\"unplanned_branch\":\"{{content}}: Branch {{branch}} hat kein geplantes Release; die Veröffentlichung würde ihn beenden, ohne ihn zu releasen.\",\"several_branches\":\"{{content}} ist undatierter Content auf mehr als einem Branch; er wird auf genau einem bearbeitet.\",\"behind_base\":\"{{content}}: Branch {{branch}} liegt hinter {{current}}, zuletzt übernommen wurde {{expected}}. Aus Main aktualisieren.\",\"superseded_release\":\"{{content}}: Das geplante Release {{release}} ersetzt {{overlaps}}, das bereits ersetzt ist.\",\"overlapping_periods\":\"{{content}}: Der Gültigkeitszeitraum von {{release}} überschneidet sich mit dem von {{overlaps}}. Ersetze es oder ändere die Daten.\",\"covers_release\":\"{{content}}: Der Gültigkeitszeitraum von {{release}} deckt Release {{covered}} vollständig ab. Ersetze es oder ändere die Daten.\",\"pending_merge\":\"{{content}}: Branch {{branch}} hat einen offenen Merge. Löse ihn im Branch-Editor auf oder brich ihn ab.\",\"nothing_in_force\":\"{{content}}: Die Aufhebung {{release}} findet nichts mehr in Kraft, das sie aufheben könnte.\",\"withdrawal_with_chain\":\"{{content}} wird in diesem Change Set zugleich aufgehoben ({{release}}) und bearbeitet. Entferne eines davon.\",\"dated_changed\":\"{{content}} ist datierter Content geworden, nachdem {{release}} undatiert geplant wurde. Entferne die Chain und beginne sie mit Datum neu.\",\"unpublished_dependency\":\"Es hängt von Change Set {{dependency}} ab, das noch offen ist. Veröffentliche es zuerst oder entferne die Abhängigkeit.\",\"discarded_dependency\":\"Es hängt von Change Set {{dependency}} ab, das verworfen wurde. Entferne die Abhängigkeit und aktualisiere dann aus Main.\",\"dangling_pin\":\"{{content}}: Der Wert an {{path}} verweist auf Release {{release}} von {{target}}, das es nicht geben wird.\",\"second_toc_parent\":\"{{content}} stünde im Inhaltsverzeichnis von {{parents}}; es kann nur in einem stehen.\",\"missing_asset\":\"{{content}}: Der Wert an {{path}} zeigt Asset {{asset}}, das es nicht gibt.\",\"media_unavailable\":\"MediaHub ist für diesen Workspace nicht verfügbar.\",\"missing_required_field\":\"{{content}}: Das Pflichtfeld {{path}} ist in {{revision}} leer. Fülle es im Branch-Editor aus.\",\"outstanding_check\":\"{{check}} hat kein bestandenes oder erlassenes Ergebnis auf den aktuellen Ständen.\",\"outstanding_check_on\":\"{{check}} hat kein bestandenes oder erlassenes Ergebnis für {{content}} ({{subject}}).\",\"unknown\":\"Blockiert: {{code}}.\"},\"releases\":{\"planned\":\"Geplante Releases\",\"columns\":{\"content\":\"Content\",\"kind\":\"Art\",\"period\":\"Gültigkeitszeitraum\",\"pins\":\"Verweist auf\",\"origin\":\"Herkunft\"},\"kind\":{\"revision\":\"Revision\",\"date_only\":\"Nur Datum\",\"repeal\":\"Aufhebung\",\"withdrawal\":\"Rücknahme\"},\"openEnd\":\"offen\",\"undated\":\"Undatiert\",\"period\":\"{{first}} – {{last}}\",\"branchHead\":\"Stand von Branch {{branch}}\",\"revision\":\"Revision {{revision}}\",\"plannedByHand\":\"Geplant\",\"proposed\":\"Vorgeschlagen für {{release}}\",\"splitFrom\":\"Setzt {{release}} fort\",\"withheld\":\"Zurückgehalten: ein Plan ersetzt, was es trägt\",\"proposedHint\":\"Vorschläge folgen aus den geplanten Gültigkeitszeiträumen und werden mit jedem Plan neu berechnet; sie sind nicht bearbeitbar.\",\"empty\":\"Noch keine geplanten Releases\",\"emptyHint\":\"Plane ein Release auf einem Branch im Branch-Editor, dann erscheint hier, was die Veröffentlichung erzeugt.\",\"covered\":\"Abgedeckte Releases\",\"coveredHint\":\"Veröffentlichte Releases, die ein Plan abdeckt: Die Veröffentlichung ersetzt die, die ein Plan nennt, und wird für die übrigen abgelehnt, bis ein Plan sie ersetzt oder sich die Daten ändern.\",\"coveredColumns\":{\"release\":\"Release\",\"by\":\"Abgedeckt von\",\"outcome\":\"Bei Veröffentlichung\"},\"superseded\":\"Ersetzt\",\"blocks\":\"Verhindert die Veröffentlichung\",\"noCovered\":\"Kein veröffentlichtes Release ist abgedeckt.\"},\"checks\":{\"columns\":{\"check\":\"Pflichtprüfung\",\"on\":\"Für\",\"latest\":\"Letztes Ergebnis\",\"standing\":\"Stand\",\"actions\":\"Aktionen\"},\"wholeChangeSet\":\"Das ganze Change Set\",\"onBranch\":\"{{content}} · Branch {{branch}}\",\"onRelease\":\"{{content}} · Release {{release}}\",\"none\":\"Noch kein Ergebnis\",\"latest\":\"{{outcome}} von {{who}}\",\"outcome\":{\"passed\":\"Bestanden\",\"failed\":\"Nicht bestanden\",\"waived\":\"Erlassen\"},\"cleared\":\"Erfüllt\",\"stale\":\"Veraltet: seitdem gespeichert\",\"outstanding\":\"Ausstehend\",\"record\":\"Ergebnis erfassen\",\"independent\":\"Unabhängig\",\"empty\":\"Keine Pflichtprüfung gilt\",\"emptyHint\":\"Die Pflichtprüfungen des Workspaces sperren die Veröffentlichung des Contents, den sie nennen. Keine davon gilt für dieses Change Set.\",\"loadError\":\"Die Prüfergebnisse konnten nicht geladen werden.\",\"form\":{\"title\":\"Ergebnis von {{check}} erfassen\",\"on\":\"Für {{subject}}, auf den Ständen, die du jetzt siehst.\",\"outcome\":\"Ergebnis\",\"note\":\"Notiz\",\"noteHelp\":\"Warum, bei einem Erlass; sonst optional.\",\"noteRequired\":\"Ein Erlass braucht eine Notiz mit dem Grund.\",\"noteTooLong\":\"Höchstens {{max}} Zeichen.\",\"submit\":\"Erfassen\",\"stale\":\"Seit dem Öffnen hat jemand gespeichert. Schließe den Dialog, sieh erneut hin und erfasse auf den neuen Ständen.\",\"denied\":\"Du darfst dieses Ergebnis nicht erfassen.\",\"closed\":\"Dieses Change Set ist geschlossen und nimmt keine Ergebnisse mehr an.\",\"failed\":\"Das Ergebnis konnte nicht erfasst werden. Versuche es erneut.\"}},\"update\":{\"title\":\"Aus Main aktualisieren\",\"message\":\"Übernimm, was Main und die Abhängigkeiten dieses Change Sets seitdem hinzugewonnen haben, in jede Chain. Wie jedes Speichern macht das bisherige Prüfergebnisse veraltet.\",\"confirm\":\"Aktualisieren\",\"close\":\"Schließen\",\"done\":\"Aktualisiert.\",\"merged_one\":\"{{count}} Branch hat einen Merge übernommen.\",\"merged_other\":\"{{count}} Branches haben einen Merge übernommen.\",\"nothingMerged\":\"Nichts zu übernehmen: jeder Branch ist aktuell.\",\"stopped_one\":\"Der Merge ist bei {{count}} Branch angehalten.\",\"stopped_other\":\"Der Merge ist bei {{count}} Branches angehalten.\",\"noneMerged\":\"Kein Branch hat einen Merge übernommen.\",\"pendingTitle\":\"Mit offenem Merge, im Branch-Editor aufzulösen:\",\"pendingLine\":\"{{content}} · Branch {{branch}}\",\"closed\":\"Dieses Change Set ist geschlossen.\",\"withheld\":\"Dieses Change Set enthält Arbeit, die du nicht sehen kannst. Nur wer alle seine Inhalte sieht, kann es als Ganzes aktualisieren.\",\"failed\":\"Die Aktualisierung ist fehlgeschlagen. Versuche es erneut.\"},\"discard\":{\"title\":\"Change Set verwerfen\",\"message\":\"„{{name}}“ verwerfen? Seine Branches enden, und darin angelegter Content verschwindet. Das kann nicht rückgängig gemacht werden.\",\"confirm\":\"Verwerfen\",\"closed\":\"Dieses Change Set ist bereits geschlossen.\",\"withheld\":\"Dieses Change Set enthält Arbeit, die du nicht sehen kannst. Nur wer alle seine Inhalte sieht, kann es verwerfen.\",\"failed\":\"Das Change Set konnte nicht verworfen werden. Versuche es erneut.\"}}"),
|
|
536
541
|
library: {
|
|
537
542
|
title: "Inhalte",
|
|
538
543
|
collections: "Sammlungen",
|
|
@@ -838,7 +843,7 @@ var U = {
|
|
|
838
843
|
confirm: "Archivieren"
|
|
839
844
|
}
|
|
840
845
|
}
|
|
841
|
-
},
|
|
846
|
+
}, fe = {
|
|
842
847
|
common: { cancel: "Cancel" },
|
|
843
848
|
settings: {
|
|
844
849
|
section: "Settings",
|
|
@@ -1473,6 +1478,9 @@ var U = {
|
|
|
1473
1478
|
merged_one: "{{count}} Branch took in a merge.",
|
|
1474
1479
|
merged_other: "{{count}} Branches took in a merge.",
|
|
1475
1480
|
nothingMerged: "Nothing to take in: every Branch is up to date.",
|
|
1481
|
+
stopped_one: "The merge stopped on {{count}} Branch.",
|
|
1482
|
+
stopped_other: "The merge stopped on {{count}} Branches.",
|
|
1483
|
+
noneMerged: "No Branch took in a merge.",
|
|
1476
1484
|
pendingTitle: "Left with a Pending Merge, to resolve in the Branch editor:",
|
|
1477
1485
|
pendingLine: "{{content}} · Branch {{branch}}",
|
|
1478
1486
|
closed: "This Change Set is closed.",
|
|
@@ -1794,43 +1802,37 @@ var U = {
|
|
|
1794
1802
|
}
|
|
1795
1803
|
}
|
|
1796
1804
|
}, K = "contenthub-ui", q = {
|
|
1797
|
-
en: { [K]:
|
|
1798
|
-
de: { [K]:
|
|
1799
|
-
},
|
|
1805
|
+
en: { [K]: fe },
|
|
1806
|
+
de: { [K]: G }
|
|
1807
|
+
}, pe = {
|
|
1800
1808
|
namespace: K,
|
|
1801
1809
|
resources: q
|
|
1802
1810
|
};
|
|
1803
1811
|
//#endregion
|
|
1804
1812
|
//#region src/common/blueprint-source.ts
|
|
1805
|
-
function
|
|
1806
|
-
let t = /* @__PURE__ */ new Map();
|
|
1813
|
+
function me(t) {
|
|
1807
1814
|
return {
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
async getBlueprints(e) {
|
|
1814
|
-
return e.flatMap((e) => {
|
|
1815
|
-
let n = t.get(e);
|
|
1816
|
-
return n ? [{ ...n }] : [];
|
|
1817
|
-
});
|
|
1815
|
+
searchBlueprints: (e) => t.searchBlueprints(e),
|
|
1816
|
+
async getBlueprints(n) {
|
|
1817
|
+
let r = [...new Set(n.filter((e) => e !== ""))], i = [];
|
|
1818
|
+
for (let t = 0; t < r.length; t += e) i.push(r.slice(t, t + e));
|
|
1819
|
+
return (await Promise.all(i.map((e) => t.getBlueprints(e)))).flat();
|
|
1818
1820
|
},
|
|
1819
|
-
listReleases: (
|
|
1821
|
+
listReleases: (e) => t.listBlueprintReleases(e)
|
|
1820
1822
|
};
|
|
1821
1823
|
}
|
|
1822
|
-
function
|
|
1823
|
-
return
|
|
1824
|
+
function he(e, t) {
|
|
1825
|
+
return o(() => t ?? me(e), [e, t]);
|
|
1824
1826
|
}
|
|
1825
1827
|
//#endregion
|
|
1826
1828
|
//#region src/common/use-open-change-sets.ts
|
|
1827
|
-
var
|
|
1828
|
-
function
|
|
1829
|
-
return
|
|
1830
|
-
queryKey:
|
|
1829
|
+
var J = 200;
|
|
1830
|
+
function ge(e, t = !0) {
|
|
1831
|
+
return P({
|
|
1832
|
+
queryKey: W.openChangeSets(),
|
|
1831
1833
|
queryFn: () => e.listChangeSets({
|
|
1832
1834
|
state: "open",
|
|
1833
|
-
pageSize:
|
|
1835
|
+
pageSize: J
|
|
1834
1836
|
}),
|
|
1835
1837
|
enabled: t
|
|
1836
1838
|
});
|
|
@@ -1838,20 +1840,20 @@ function he(e, t = !0) {
|
|
|
1838
1840
|
//#endregion
|
|
1839
1841
|
//#region src/screens/collection-tree.tsx
|
|
1840
1842
|
var Y = "__all__";
|
|
1841
|
-
function
|
|
1843
|
+
function _e(e, t) {
|
|
1842
1844
|
let n = new Map(t.map((e) => [e.id, e])), r = [], i = /* @__PURE__ */ new Set(), a = n.get(e);
|
|
1843
1845
|
for (; a && !i.has(a.id);) i.add(a.id), r.unshift(a), a = n.get(a.parentId);
|
|
1844
1846
|
return r;
|
|
1845
1847
|
}
|
|
1846
1848
|
function X() {
|
|
1847
1849
|
let { t: e } = I(K);
|
|
1848
|
-
return /* @__PURE__ */
|
|
1850
|
+
return /* @__PURE__ */ u(se, {
|
|
1849
1851
|
size: 12,
|
|
1850
1852
|
"aria-label": e("library.restricted")
|
|
1851
1853
|
});
|
|
1852
1854
|
}
|
|
1853
|
-
function
|
|
1854
|
-
let { t: r } = I(K), i =
|
|
1855
|
+
function ve({ collections: e, activeId: t, onSelect: n }) {
|
|
1856
|
+
let { t: r } = I(K), i = o(() => new Map(e.map((e) => [e.id, e])), [e]), a = o(() => {
|
|
1855
1857
|
let t = /* @__PURE__ */ new Map();
|
|
1856
1858
|
for (let n of e) {
|
|
1857
1859
|
let e = n.parentId !== "" && i.has(n.parentId) ? n.parentId : "", r = t.get(e) ?? [];
|
|
@@ -1888,24 +1890,24 @@ function _e({ collections: e, activeId: t, onSelect: n }) {
|
|
|
1888
1890
|
e,
|
|
1889
1891
|
i,
|
|
1890
1892
|
r
|
|
1891
|
-
]), [
|
|
1892
|
-
return /* @__PURE__ */
|
|
1893
|
-
collection:
|
|
1893
|
+
]), [s] = c(() => _e(t, e).slice(0, -1).map((e) => e.id));
|
|
1894
|
+
return /* @__PURE__ */ d(w, {
|
|
1895
|
+
collection: a,
|
|
1894
1896
|
size: "sm",
|
|
1895
1897
|
selectedValue: [t === "" ? Y : t],
|
|
1896
|
-
defaultExpandedValue:
|
|
1898
|
+
defaultExpandedValue: s,
|
|
1897
1899
|
onSelectionChange: (e) => {
|
|
1898
1900
|
let t = e.selectedValue[0];
|
|
1899
1901
|
t !== void 0 && n(t === Y ? "" : t);
|
|
1900
1902
|
},
|
|
1901
|
-
children: [/* @__PURE__ */
|
|
1903
|
+
children: [/* @__PURE__ */ u(ee, {
|
|
1902
1904
|
srOnly: !0,
|
|
1903
1905
|
children: r("library.collections")
|
|
1904
|
-
}), /* @__PURE__ */
|
|
1905
|
-
/* @__PURE__ */
|
|
1906
|
-
/* @__PURE__ */
|
|
1907
|
-
e.restricted ? /* @__PURE__ */
|
|
1908
|
-
] }) : /* @__PURE__ */
|
|
1906
|
+
}), /* @__PURE__ */ u(T, { children: /* @__PURE__ */ u(C, { render: ({ node: e, nodeState: t }) => t.isBranch ? /* @__PURE__ */ d(v, { children: [
|
|
1907
|
+
/* @__PURE__ */ u(y, { children: /* @__PURE__ */ u(F, { size: 14 }) }),
|
|
1908
|
+
/* @__PURE__ */ u(b, { children: e.name }),
|
|
1909
|
+
e.restricted ? /* @__PURE__ */ u(X, {}) : null
|
|
1910
|
+
] }) : /* @__PURE__ */ d(x, { children: [/* @__PURE__ */ u(S, { children: e.name }), e.restricted ? /* @__PURE__ */ u(X, {}) : null] }) }) })]
|
|
1909
1911
|
});
|
|
1910
1912
|
}
|
|
1911
1913
|
//#endregion
|
|
@@ -1914,94 +1916,94 @@ var Z = {
|
|
|
1914
1916
|
name: "",
|
|
1915
1917
|
sourceDate: "",
|
|
1916
1918
|
sourceReference: ""
|
|
1917
|
-
},
|
|
1918
|
-
function
|
|
1919
|
-
let { t:
|
|
1920
|
-
name:
|
|
1921
|
-
sourceDate:
|
|
1922
|
-
sourceReference:
|
|
1919
|
+
}, ye = "contenthub-create-change-set", Q = /^[^\u0000-\u001f\u007f]*$/;
|
|
1920
|
+
function be({ open: e, onClose: n, onSubmit: r }) {
|
|
1921
|
+
let { t: i } = I(K), s = o(() => U.object({
|
|
1922
|
+
name: U.string().trim().min(1, i("changeSets.form.nameRequired")).max(200, i("changeSets.form.tooLong", { max: 200 })).regex(Q, i("changeSets.form.oneLine")),
|
|
1923
|
+
sourceDate: U.string().trim(),
|
|
1924
|
+
sourceReference: U.string().trim().max(500, i("changeSets.form.tooLong", { max: 500 })).regex(Q, i("changeSets.form.oneLine"))
|
|
1923
1925
|
}).superRefine((e, t) => {
|
|
1924
1926
|
e.sourceReference !== "" && e.sourceDate === "" && t.addIssue({
|
|
1925
1927
|
code: "custom",
|
|
1926
1928
|
path: ["sourceDate"],
|
|
1927
|
-
message:
|
|
1929
|
+
message: i("changeSets.form.sourceDateRequired")
|
|
1928
1930
|
}), e.sourceDate !== "" && e.sourceReference === "" && t.addIssue({
|
|
1929
1931
|
code: "custom",
|
|
1930
1932
|
path: ["sourceReference"],
|
|
1931
|
-
message:
|
|
1933
|
+
message: i("changeSets.form.sourceReferenceRequired")
|
|
1932
1934
|
});
|
|
1933
|
-
}), [
|
|
1934
|
-
resolver:
|
|
1935
|
+
}), [i]), l = le({
|
|
1936
|
+
resolver: L(s),
|
|
1935
1937
|
defaultValues: Z
|
|
1936
|
-
}), [p, m] =
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
}, [
|
|
1940
|
-
let _ =
|
|
1938
|
+
}), [p, m] = c(null), h = l.formState.isSubmitting;
|
|
1939
|
+
a(() => {
|
|
1940
|
+
e && (l.reset(Z), m(null));
|
|
1941
|
+
}, [e, l]);
|
|
1942
|
+
let _ = l.handleSubmit(async (e) => {
|
|
1941
1943
|
m(null);
|
|
1942
1944
|
try {
|
|
1943
1945
|
await r({
|
|
1944
|
-
name:
|
|
1945
|
-
source:
|
|
1946
|
-
date:
|
|
1947
|
-
reference:
|
|
1946
|
+
name: e.name,
|
|
1947
|
+
source: e.sourceDate === "" ? void 0 : {
|
|
1948
|
+
date: e.sourceDate,
|
|
1949
|
+
reference: e.sourceReference
|
|
1948
1950
|
}
|
|
1949
1951
|
});
|
|
1950
|
-
} catch (
|
|
1951
|
-
m(
|
|
1952
|
+
} catch (e) {
|
|
1953
|
+
m(e instanceof t ? e.message : i("changeSets.form.failed"));
|
|
1952
1954
|
}
|
|
1953
1955
|
});
|
|
1954
|
-
return /* @__PURE__ */
|
|
1955
|
-
open:
|
|
1956
|
+
return /* @__PURE__ */ u(g, {
|
|
1957
|
+
open: e,
|
|
1956
1958
|
onClose: n,
|
|
1957
1959
|
lazyMount: !0,
|
|
1958
1960
|
unmountOnExit: !0,
|
|
1959
1961
|
size: "md",
|
|
1960
|
-
header:
|
|
1961
|
-
footer: /* @__PURE__ */
|
|
1962
|
+
header: i("changeSets.form.createTitle"),
|
|
1963
|
+
footer: /* @__PURE__ */ d(O, {
|
|
1962
1964
|
gap: "2",
|
|
1963
|
-
children: [/* @__PURE__ */
|
|
1965
|
+
children: [/* @__PURE__ */ u(f, {
|
|
1964
1966
|
size: "sm",
|
|
1965
1967
|
variant: "ghost",
|
|
1966
1968
|
onClick: n,
|
|
1967
|
-
children:
|
|
1968
|
-
}), /* @__PURE__ */
|
|
1969
|
+
children: i("common.cancel")
|
|
1970
|
+
}), /* @__PURE__ */ u(f, {
|
|
1969
1971
|
type: "submit",
|
|
1970
|
-
form:
|
|
1972
|
+
form: ye,
|
|
1971
1973
|
size: "sm",
|
|
1972
1974
|
variant: "solid",
|
|
1973
|
-
loading:
|
|
1974
|
-
children:
|
|
1975
|
+
loading: h,
|
|
1976
|
+
children: i("changeSets.form.createSubmit")
|
|
1975
1977
|
})]
|
|
1976
1978
|
}),
|
|
1977
|
-
children: /* @__PURE__ */
|
|
1978
|
-
...
|
|
1979
|
-
children: /* @__PURE__ */
|
|
1980
|
-
id:
|
|
1979
|
+
children: /* @__PURE__ */ u(V, {
|
|
1980
|
+
...l,
|
|
1981
|
+
children: /* @__PURE__ */ u("form", {
|
|
1982
|
+
id: ye,
|
|
1981
1983
|
onSubmit: (e) => {
|
|
1982
1984
|
e.preventDefault(), _();
|
|
1983
1985
|
},
|
|
1984
|
-
children: /* @__PURE__ */
|
|
1986
|
+
children: /* @__PURE__ */ d(j, {
|
|
1985
1987
|
gap: "4",
|
|
1986
1988
|
children: [
|
|
1987
|
-
/* @__PURE__ */
|
|
1989
|
+
/* @__PURE__ */ u(z, {
|
|
1988
1990
|
name: "name",
|
|
1989
|
-
label:
|
|
1990
|
-
helperText:
|
|
1991
|
+
label: i("changeSets.form.name"),
|
|
1992
|
+
helperText: i("changeSets.form.nameHelp"),
|
|
1991
1993
|
required: !0
|
|
1992
1994
|
}),
|
|
1993
|
-
/* @__PURE__ */
|
|
1995
|
+
/* @__PURE__ */ u(z, {
|
|
1994
1996
|
name: "sourceDate",
|
|
1995
1997
|
type: "date",
|
|
1996
|
-
label:
|
|
1997
|
-
helperText:
|
|
1998
|
+
label: i("changeSets.form.sourceDate"),
|
|
1999
|
+
helperText: i("changeSets.form.sourceDateHelp")
|
|
1998
2000
|
}),
|
|
1999
|
-
/* @__PURE__ */
|
|
2001
|
+
/* @__PURE__ */ u(z, {
|
|
2000
2002
|
name: "sourceReference",
|
|
2001
|
-
label:
|
|
2002
|
-
helperText:
|
|
2003
|
+
label: i("changeSets.form.sourceReference"),
|
|
2004
|
+
helperText: i("changeSets.form.sourceReferenceHelp")
|
|
2003
2005
|
}),
|
|
2004
|
-
p ? /* @__PURE__ */
|
|
2006
|
+
p ? /* @__PURE__ */ u(D, {
|
|
2005
2007
|
status: "error",
|
|
2006
2008
|
title: p
|
|
2007
2009
|
}) : null
|
|
@@ -2013,8 +2015,8 @@ function ye({ open: t, onClose: n, onSubmit: r }) {
|
|
|
2013
2015
|
}
|
|
2014
2016
|
//#endregion
|
|
2015
2017
|
//#region src/screens/change-set-choice.tsx
|
|
2016
|
-
var
|
|
2017
|
-
function
|
|
2018
|
+
var xe = "@new";
|
|
2019
|
+
function Se(e, t, n = !1) {
|
|
2018
2020
|
if (!t.changeSetId) return {
|
|
2019
2021
|
path: "changeSetId",
|
|
2020
2022
|
message: e("library.create.changeSetRequired")
|
|
@@ -2032,37 +2034,37 @@ function xe(e, t, n = !1) {
|
|
|
2032
2034
|
message: e("changeSets.form.oneLine")
|
|
2033
2035
|
};
|
|
2034
2036
|
}
|
|
2035
|
-
function
|
|
2036
|
-
let { t:
|
|
2037
|
-
id:
|
|
2038
|
-
label:
|
|
2037
|
+
function Ce({ client: e, open: t, helperText: n, nameHelperText: r, nameOptional: i = !1 }) {
|
|
2038
|
+
let { t: a } = I(K), s = ge(e, t), c = o(() => [{
|
|
2039
|
+
id: xe,
|
|
2040
|
+
label: a("library.create.newChangeSet")
|
|
2039
2041
|
}, ...(s.data?.changeSets ?? []).map((e) => ({
|
|
2040
2042
|
id: e.id,
|
|
2041
2043
|
label: e.name
|
|
2042
|
-
}))], [s.data,
|
|
2043
|
-
return /* @__PURE__ */
|
|
2044
|
+
}))], [s.data, a]), f = H({ name: "changeSetId" });
|
|
2045
|
+
return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u(R, {
|
|
2044
2046
|
name: "changeSetId",
|
|
2045
|
-
label:
|
|
2047
|
+
label: a("library.create.changeSet"),
|
|
2046
2048
|
helperText: n,
|
|
2047
|
-
options:
|
|
2049
|
+
options: c,
|
|
2048
2050
|
isClearable: !1,
|
|
2049
2051
|
required: !0
|
|
2050
|
-
}), f === "@new" ? /* @__PURE__ */
|
|
2052
|
+
}), f === "@new" ? /* @__PURE__ */ u(z, {
|
|
2051
2053
|
name: "changeSetName",
|
|
2052
|
-
label:
|
|
2053
|
-
helperText: r ??
|
|
2054
|
+
label: a("library.create.changeSetName"),
|
|
2055
|
+
helperText: r ?? a("changeSets.form.nameHelp"),
|
|
2054
2056
|
required: !i
|
|
2055
2057
|
}) : null] });
|
|
2056
2058
|
}
|
|
2057
2059
|
//#endregion
|
|
2058
2060
|
//#region src/screens/create-content-modal.tsx
|
|
2059
|
-
var
|
|
2060
|
-
function
|
|
2061
|
-
let { t: v } = I(K), y = ae(), b =
|
|
2062
|
-
blueprintId:
|
|
2063
|
-
releaseId:
|
|
2064
|
-
changeSetId:
|
|
2065
|
-
changeSetName:
|
|
2061
|
+
var we = "contenthub-create-content", $ = (e) => !e.refusals?.length, Te = (e) => e.path ? `${e.code} (${e.path})` : e.code;
|
|
2062
|
+
function Ee({ open: e, onClose: l, client: p, blueprintSource: m, initialChangeSetId: h, onCreated: _ }) {
|
|
2063
|
+
let { t: v } = I(K), y = ae(), b = o(() => U.object({
|
|
2064
|
+
blueprintId: U.string().nullable().refine((e) => !!e, v("library.create.blueprintRequired")),
|
|
2065
|
+
releaseId: U.string().nullable().refine((e) => !!e, v("library.create.releaseRequired")),
|
|
2066
|
+
changeSetId: U.string().nullable().refine((e) => !!e, v("library.create.changeSetRequired")),
|
|
2067
|
+
changeSetName: U.string().trim()
|
|
2066
2068
|
}).superRefine((e, t) => {
|
|
2067
2069
|
if (e.changeSetId !== "@new") return;
|
|
2068
2070
|
let n = (e) => t.addIssue({
|
|
@@ -2071,46 +2073,46 @@ function Te({ open: c, onClose: f, client: p, blueprintSource: m, initialChangeS
|
|
|
2071
2073
|
message: e
|
|
2072
2074
|
});
|
|
2073
2075
|
e.changeSetName === "" ? n(v("changeSets.form.nameRequired")) : [...e.changeSetName].length > 200 ? n(v("changeSets.form.tooLong", { max: 200 })) : Q.test(e.changeSetName) || n(v("changeSets.form.oneLine"));
|
|
2074
|
-
}), [v]), x =
|
|
2076
|
+
}), [v]), x = o(() => ({
|
|
2075
2077
|
blueprintId: null,
|
|
2076
2078
|
releaseId: null,
|
|
2077
|
-
changeSetId:
|
|
2079
|
+
changeSetId: h || "@new",
|
|
2078
2080
|
changeSetName: ""
|
|
2079
|
-
}), [
|
|
2080
|
-
resolver:
|
|
2081
|
+
}), [h]), S = le({
|
|
2082
|
+
resolver: L(b),
|
|
2081
2083
|
defaultValues: x
|
|
2082
|
-
}), [ee, C] =
|
|
2084
|
+
}), [ee, C] = c(null), w = S.formState.isSubmitting, T = H({
|
|
2083
2085
|
control: S.control,
|
|
2084
2086
|
name: "blueprintId"
|
|
2085
|
-
}),
|
|
2087
|
+
}), te = H({
|
|
2086
2088
|
control: S.control,
|
|
2087
2089
|
name: "changeSetId"
|
|
2088
2090
|
});
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
+
a(() => {
|
|
2092
|
+
e && (S.reset(x), C(null));
|
|
2091
2093
|
}, [
|
|
2092
|
-
|
|
2094
|
+
e,
|
|
2093
2095
|
S,
|
|
2094
2096
|
x
|
|
2095
2097
|
]);
|
|
2096
|
-
let
|
|
2097
|
-
id:
|
|
2098
|
+
let E = ge(p, e), k = o(() => [{
|
|
2099
|
+
id: xe,
|
|
2098
2100
|
label: v("library.create.newChangeSet")
|
|
2099
|
-
}, ...(
|
|
2101
|
+
}, ...(E.data?.changeSets ?? []).map((e) => ({
|
|
2100
2102
|
id: e.id,
|
|
2101
2103
|
label: e.name
|
|
2102
|
-
}))], [
|
|
2103
|
-
queryKey:
|
|
2104
|
+
}))], [E.data, v]), A = P({
|
|
2105
|
+
queryKey: W.blueprintReleases(T ?? ""),
|
|
2104
2106
|
queryFn: () => m.listReleases(T),
|
|
2105
|
-
enabled:
|
|
2106
|
-
}),
|
|
2107
|
+
enabled: e && !!T
|
|
2108
|
+
}), ne = o(() => (A.data ?? []).map((e) => ({
|
|
2107
2109
|
id: e.id,
|
|
2108
2110
|
label: $(e) ? e.name : v("library.create.refusedRelease", { name: e.name }),
|
|
2109
2111
|
data: { refused: !$(e) }
|
|
2110
|
-
})), [
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
let e = S.getValues("releaseId"), t =
|
|
2112
|
+
})), [A.data, v]), N = o(() => (A.data ?? []).filter((e) => !$(e)), [A.data]), re = s(T);
|
|
2113
|
+
a(() => {
|
|
2114
|
+
re.current !== T && (re.current = T, S.setValue("releaseId", null));
|
|
2115
|
+
let e = S.getValues("releaseId"), t = A.data;
|
|
2114
2116
|
if (!T) {
|
|
2115
2117
|
e !== null && S.setValue("releaseId", null);
|
|
2116
2118
|
return;
|
|
@@ -2118,10 +2120,10 @@ function Te({ open: c, onClose: f, client: p, blueprintSource: m, initialChangeS
|
|
|
2118
2120
|
t && !t.some((t) => t.id === e && $(t)) && S.setValue("releaseId", t.find($)?.id ?? null);
|
|
2119
2121
|
}, [
|
|
2120
2122
|
T,
|
|
2121
|
-
|
|
2123
|
+
A.data,
|
|
2122
2124
|
S
|
|
2123
2125
|
]);
|
|
2124
|
-
let
|
|
2126
|
+
let ie = !!T && A.isSuccess && A.data.length === 0, F = !!T && A.isSuccess && A.data.length > 0 && !A.data.some($), oe = i(async ({ query: e, cursor: t, signal: n }) => {
|
|
2125
2127
|
let r = await m.searchBlueprints({
|
|
2126
2128
|
query: e,
|
|
2127
2129
|
pageToken: t ?? void 0,
|
|
@@ -2134,13 +2136,13 @@ function Te({ open: c, onClose: f, client: p, blueprintSource: m, initialChangeS
|
|
|
2134
2136
|
})),
|
|
2135
2137
|
nextCursor: r.nextPageToken || null
|
|
2136
2138
|
};
|
|
2137
|
-
}, [m]), se =
|
|
2139
|
+
}, [m]), se = i(async ({ ids: e }) => {
|
|
2138
2140
|
let t = await m.getBlueprints(e);
|
|
2139
2141
|
return e.map((e) => ({
|
|
2140
2142
|
id: e,
|
|
2141
2143
|
label: t.find((t) => t.id === e)?.name ?? e
|
|
2142
2144
|
}));
|
|
2143
|
-
}, [m]),
|
|
2145
|
+
}, [m]), ce = S.handleSubmit(async (e) => {
|
|
2144
2146
|
C(null);
|
|
2145
2147
|
let t = e.changeSetId, n = !1;
|
|
2146
2148
|
try {
|
|
@@ -2152,112 +2154,112 @@ function Te({ open: c, onClose: f, client: p, blueprintSource: m, initialChangeS
|
|
|
2152
2154
|
changeSetId: t,
|
|
2153
2155
|
blueprintReleaseId: e.releaseId
|
|
2154
2156
|
});
|
|
2155
|
-
y.invalidateQueries({ queryKey:
|
|
2157
|
+
y.invalidateQueries({ queryKey: W.contents() }), _(r);
|
|
2156
2158
|
} catch (e) {
|
|
2157
|
-
if (C(
|
|
2159
|
+
if (C(ue(e)), !n) return;
|
|
2158
2160
|
}
|
|
2159
|
-
y.invalidateQueries({ queryKey:
|
|
2161
|
+
y.invalidateQueries({ queryKey: W.changeSets() });
|
|
2160
2162
|
});
|
|
2161
|
-
function
|
|
2162
|
-
if (
|
|
2163
|
-
let
|
|
2164
|
-
return v("library.create.refused", { reasons:
|
|
2163
|
+
function ue(e) {
|
|
2164
|
+
if (e instanceof r) {
|
|
2165
|
+
let t = e.reasons.map(Te).join(", ");
|
|
2166
|
+
return v("library.create.refused", { reasons: t });
|
|
2165
2167
|
}
|
|
2166
|
-
return
|
|
2168
|
+
return e instanceof n ? v("library.create.changeSetClosed") : e instanceof t ? e.message : v("library.create.failed");
|
|
2167
2169
|
}
|
|
2168
|
-
return /* @__PURE__ */
|
|
2169
|
-
open:
|
|
2170
|
-
onClose:
|
|
2170
|
+
return /* @__PURE__ */ u(g, {
|
|
2171
|
+
open: e,
|
|
2172
|
+
onClose: l,
|
|
2171
2173
|
lazyMount: !0,
|
|
2172
2174
|
unmountOnExit: !0,
|
|
2173
2175
|
size: "md",
|
|
2174
2176
|
header: v("library.create.title"),
|
|
2175
|
-
footer: /* @__PURE__ */
|
|
2177
|
+
footer: /* @__PURE__ */ d(O, {
|
|
2176
2178
|
gap: "2",
|
|
2177
|
-
children: [/* @__PURE__ */
|
|
2179
|
+
children: [/* @__PURE__ */ u(f, {
|
|
2178
2180
|
size: "sm",
|
|
2179
2181
|
variant: "ghost",
|
|
2180
|
-
onClick:
|
|
2182
|
+
onClick: l,
|
|
2181
2183
|
children: v("common.cancel")
|
|
2182
|
-
}), /* @__PURE__ */
|
|
2184
|
+
}), /* @__PURE__ */ u(f, {
|
|
2183
2185
|
type: "submit",
|
|
2184
|
-
form:
|
|
2186
|
+
form: we,
|
|
2185
2187
|
size: "sm",
|
|
2186
2188
|
variant: "solid",
|
|
2187
2189
|
loading: w,
|
|
2188
|
-
disabled:
|
|
2190
|
+
disabled: ie || F || A.isError,
|
|
2189
2191
|
children: v("library.create.submit")
|
|
2190
2192
|
})]
|
|
2191
2193
|
}),
|
|
2192
|
-
children: /* @__PURE__ */
|
|
2194
|
+
children: /* @__PURE__ */ u(V, {
|
|
2193
2195
|
...S,
|
|
2194
|
-
children: /* @__PURE__ */
|
|
2195
|
-
id:
|
|
2196
|
+
children: /* @__PURE__ */ u("form", {
|
|
2197
|
+
id: we,
|
|
2196
2198
|
onSubmit: (e) => {
|
|
2197
|
-
e.preventDefault(),
|
|
2199
|
+
e.preventDefault(), ce();
|
|
2198
2200
|
},
|
|
2199
|
-
children: /* @__PURE__ */
|
|
2201
|
+
children: /* @__PURE__ */ d(j, {
|
|
2200
2202
|
gap: "4",
|
|
2201
2203
|
children: [
|
|
2202
|
-
/* @__PURE__ */
|
|
2204
|
+
/* @__PURE__ */ u(B, {
|
|
2203
2205
|
name: "blueprintId",
|
|
2204
2206
|
label: v("library.create.blueprint"),
|
|
2205
2207
|
helperText: v("library.create.blueprintHelp"),
|
|
2206
|
-
search:
|
|
2208
|
+
search: oe,
|
|
2207
2209
|
resolve: se,
|
|
2208
2210
|
placeholder: v("library.create.pickBlueprint"),
|
|
2209
2211
|
required: !0
|
|
2210
2212
|
}),
|
|
2211
|
-
T ? /* @__PURE__ */
|
|
2213
|
+
T ? /* @__PURE__ */ u(R, {
|
|
2212
2214
|
name: "releaseId",
|
|
2213
2215
|
label: v("library.create.release"),
|
|
2214
2216
|
helperText: v("library.create.releaseHelp"),
|
|
2215
|
-
options:
|
|
2217
|
+
options: ne,
|
|
2216
2218
|
isClearable: !1,
|
|
2217
2219
|
required: !0,
|
|
2218
2220
|
selectProps: { isOptionDisabled: (e) => e.data?.refused === !0 }
|
|
2219
2221
|
}) : null,
|
|
2220
|
-
|
|
2222
|
+
ie ? /* @__PURE__ */ u(D, {
|
|
2221
2223
|
status: "warning",
|
|
2222
2224
|
title: v("library.create.noRelease")
|
|
2223
2225
|
}) : null,
|
|
2224
|
-
|
|
2226
|
+
F ? /* @__PURE__ */ u(D, {
|
|
2225
2227
|
status: "warning",
|
|
2226
2228
|
title: v("library.create.noUsableRelease")
|
|
2227
2229
|
}) : null,
|
|
2228
|
-
|
|
2230
|
+
A.isError ? /* @__PURE__ */ u(D, {
|
|
2229
2231
|
status: "error",
|
|
2230
2232
|
title: v("library.create.releasesFailed")
|
|
2231
2233
|
}) : null,
|
|
2232
|
-
|
|
2234
|
+
N.length > 0 ? /* @__PURE__ */ u(D, {
|
|
2233
2235
|
status: "info",
|
|
2234
2236
|
title: v("library.create.refusedReleases"),
|
|
2235
|
-
children: /* @__PURE__ */
|
|
2237
|
+
children: /* @__PURE__ */ u(j, {
|
|
2236
2238
|
gap: "1",
|
|
2237
|
-
children:
|
|
2239
|
+
children: N.map((e) => /* @__PURE__ */ u(M, {
|
|
2238
2240
|
textStyle: "sm",
|
|
2239
2241
|
children: v("library.create.refusedReleaseReasons", {
|
|
2240
2242
|
name: e.name,
|
|
2241
|
-
reasons: (e.refusals ?? []).map(
|
|
2243
|
+
reasons: (e.refusals ?? []).map(Te).join(", ")
|
|
2242
2244
|
})
|
|
2243
2245
|
}, e.id))
|
|
2244
2246
|
})
|
|
2245
2247
|
}) : null,
|
|
2246
|
-
/* @__PURE__ */
|
|
2248
|
+
/* @__PURE__ */ u(R, {
|
|
2247
2249
|
name: "changeSetId",
|
|
2248
2250
|
label: v("library.create.changeSet"),
|
|
2249
2251
|
helperText: v("library.create.changeSetHelp"),
|
|
2250
|
-
options:
|
|
2252
|
+
options: k,
|
|
2251
2253
|
isClearable: !1,
|
|
2252
2254
|
required: !0
|
|
2253
2255
|
}),
|
|
2254
|
-
|
|
2256
|
+
te === "@new" ? /* @__PURE__ */ u(z, {
|
|
2255
2257
|
name: "changeSetName",
|
|
2256
2258
|
label: v("library.create.changeSetName"),
|
|
2257
2259
|
helperText: v("changeSets.form.nameHelp"),
|
|
2258
2260
|
required: !0
|
|
2259
2261
|
}) : null,
|
|
2260
|
-
ee ? /* @__PURE__ */
|
|
2262
|
+
ee ? /* @__PURE__ */ u(D, {
|
|
2261
2263
|
status: "error",
|
|
2262
2264
|
title: ee
|
|
2263
2265
|
}) : null
|
|
@@ -2269,66 +2271,66 @@ function Te({ open: c, onClose: f, client: p, blueprintSource: m, initialChangeS
|
|
|
2269
2271
|
}
|
|
2270
2272
|
//#endregion
|
|
2271
2273
|
//#region src/screens/content-library.tsx
|
|
2272
|
-
var
|
|
2274
|
+
var De = [
|
|
2273
2275
|
"main",
|
|
2274
2276
|
"in_force",
|
|
2275
2277
|
"change_set"
|
|
2276
|
-
],
|
|
2277
|
-
function
|
|
2278
|
+
], Oe = 50, ke = 300, Ae = 5, je = "@me", Me = "collection";
|
|
2279
|
+
function Ne(e) {
|
|
2278
2280
|
return Object.values(e).filter((e) => typeof e == "string" && e.trim() !== "" && e.length <= 200).slice(0, 2).join(" ");
|
|
2279
2281
|
}
|
|
2280
|
-
function
|
|
2281
|
-
let { t:
|
|
2282
|
-
|
|
2283
|
-
let e = setTimeout(() =>
|
|
2282
|
+
function Pe({ client: e, blueprintSource: n, onOpenContent: r, onOpenBranch: s }) {
|
|
2283
|
+
let { t: l } = I(K), g = he(e, n), [v, y] = de(), b = v.get("collection") ?? "", [x, S] = c("main"), [ee, C] = c(""), [w, T] = c(""), [E, ae] = c(""), [F, se] = c(""), [L, R] = c(""), [z, B] = c(!1), { userId: V, members: le } = ue();
|
|
2284
|
+
a(() => {
|
|
2285
|
+
let e = setTimeout(() => ae(w), ke);
|
|
2284
2286
|
return () => clearTimeout(e);
|
|
2285
2287
|
}, [w]);
|
|
2286
|
-
let H =
|
|
2288
|
+
let H = i((e) => y((t) => {
|
|
2287
2289
|
let n = new URLSearchParams(t);
|
|
2288
|
-
return e ? n.set(
|
|
2289
|
-
}), [y]),
|
|
2290
|
-
queryKey:
|
|
2291
|
-
queryFn: () =>
|
|
2292
|
-
}), G =
|
|
2290
|
+
return e ? n.set(Me, e) : n.delete(Me), n;
|
|
2291
|
+
}), [y]), U = P({
|
|
2292
|
+
queryKey: W.collections(),
|
|
2293
|
+
queryFn: () => e.listCollections()
|
|
2294
|
+
}), G = ge(e), fe = i((e) => G.data?.changeSets.find((t) => t.id === e)?.name ?? e, [G.data]), q = ee || G.data?.changeSets[0]?.id || "", pe = o(() => x === "change_set" ? q ? {
|
|
2293
2295
|
kind: "change_set",
|
|
2294
|
-
changeSetId:
|
|
2295
|
-
} : void 0 : { kind: x }, [x,
|
|
2296
|
-
view:
|
|
2296
|
+
changeSetId: q
|
|
2297
|
+
} : void 0 : { kind: x }, [x, q]), me = o(() => ({
|
|
2298
|
+
view: pe,
|
|
2297
2299
|
collectionId: b || void 0,
|
|
2298
|
-
search: x === "in_force" ? void 0 :
|
|
2300
|
+
search: x === "in_force" ? void 0 : E.trim() || void 0,
|
|
2299
2301
|
blueprintIds: F ? [F] : void 0,
|
|
2300
|
-
assigneeId: L ===
|
|
2302
|
+
assigneeId: L === je ? V : L || void 0
|
|
2301
2303
|
}), [
|
|
2302
|
-
|
|
2304
|
+
pe,
|
|
2303
2305
|
b,
|
|
2304
2306
|
x,
|
|
2305
|
-
|
|
2307
|
+
E,
|
|
2306
2308
|
F,
|
|
2307
2309
|
L,
|
|
2308
|
-
|
|
2309
|
-
]),
|
|
2310
|
-
queryKey:
|
|
2311
|
-
queryFn: ({ pageParam:
|
|
2310
|
+
V
|
|
2311
|
+
]), J = ie({
|
|
2312
|
+
queryKey: W.contentList(me),
|
|
2313
|
+
queryFn: ({ pageParam: t }) => e.listContents({
|
|
2312
2314
|
...me,
|
|
2313
|
-
pageSize:
|
|
2314
|
-
pageToken:
|
|
2315
|
+
pageSize: Oe,
|
|
2316
|
+
pageToken: t
|
|
2315
2317
|
}),
|
|
2316
2318
|
initialPageParam: "",
|
|
2317
2319
|
getNextPageParam: (e) => e.nextPageToken || void 0,
|
|
2318
|
-
enabled:
|
|
2320
|
+
enabled: pe !== void 0,
|
|
2319
2321
|
placeholderData: re
|
|
2320
|
-
}),
|
|
2321
|
-
queryKey:
|
|
2322
|
-
queryFn: () =>
|
|
2323
|
-
enabled:
|
|
2322
|
+
}), Y = o(() => J.data?.pages.flatMap((e) => e.contents) ?? [], [J.data]), X = o(() => [...new Set(Y.map((e) => e.blueprintId))].sort(), [Y]), Z = P({
|
|
2323
|
+
queryKey: W.blueprintNames(X),
|
|
2324
|
+
queryFn: () => g.getBlueprints(X),
|
|
2325
|
+
enabled: X.length > 0,
|
|
2324
2326
|
placeholderData: re,
|
|
2325
2327
|
staleTime: 6e4
|
|
2326
|
-
}),
|
|
2327
|
-
queryKey:
|
|
2328
|
+
}), ye = i((e) => Z.data?.find((t) => t.id === e)?.name ?? e, [Z.data]), Q = P({
|
|
2329
|
+
queryKey: W.blueprintFilterOptions(),
|
|
2328
2330
|
queryFn: async () => {
|
|
2329
2331
|
let e = [], t = "";
|
|
2330
|
-
for (let n = 0; n <
|
|
2331
|
-
let n = await
|
|
2332
|
+
for (let n = 0; n < Ae; n++) {
|
|
2333
|
+
let n = await g.searchBlueprints({
|
|
2332
2334
|
query: "",
|
|
2333
2335
|
pageToken: t
|
|
2334
2336
|
});
|
|
@@ -2337,13 +2339,22 @@ function Ne({ client: t, blueprintSource: n, onOpenContent: o, onOpenBranch: c }
|
|
|
2337
2339
|
return e;
|
|
2338
2340
|
},
|
|
2339
2341
|
staleTime: 6e4
|
|
2340
|
-
}), be =
|
|
2342
|
+
}), be = o(() => /* @__PURE__ */ new Map(), [g]), xe = o(() => {
|
|
2343
|
+
for (let e of Z.data ?? []) be.set(e.id, e);
|
|
2344
|
+
let e = new Map(be);
|
|
2345
|
+
for (let t of Q.data ?? []) e.set(t.id, t);
|
|
2346
|
+
return [...e.values()].sort((e, t) => e.name.localeCompare(t.name));
|
|
2347
|
+
}, [
|
|
2348
|
+
be,
|
|
2349
|
+
Q.data,
|
|
2350
|
+
Z.data
|
|
2351
|
+
]), Se = o(() => [
|
|
2341
2352
|
{
|
|
2342
2353
|
id: "content",
|
|
2343
|
-
header:
|
|
2354
|
+
header: l("library.columns.content"),
|
|
2344
2355
|
cell: ({ row: e }) => {
|
|
2345
|
-
let t =
|
|
2346
|
-
return /* @__PURE__ */
|
|
2356
|
+
let t = Ne(e.original.data);
|
|
2357
|
+
return /* @__PURE__ */ u(te, {
|
|
2347
2358
|
value: t || e.original.id,
|
|
2348
2359
|
subText: t ? e.original.id : void 0
|
|
2349
2360
|
});
|
|
@@ -2351,178 +2362,178 @@ function Ne({ client: t, blueprintSource: n, onOpenContent: o, onOpenBranch: c }
|
|
|
2351
2362
|
},
|
|
2352
2363
|
{
|
|
2353
2364
|
id: "blueprint",
|
|
2354
|
-
header:
|
|
2355
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
2365
|
+
header: l("library.columns.blueprint"),
|
|
2366
|
+
cell: ({ row: e }) => /* @__PURE__ */ u(te, { value: ye(e.original.blueprintId) })
|
|
2356
2367
|
},
|
|
2357
2368
|
{
|
|
2358
2369
|
id: "readOn",
|
|
2359
|
-
header:
|
|
2370
|
+
header: l("library.columns.readOn"),
|
|
2360
2371
|
cell: ({ row: e }) => {
|
|
2361
|
-
let t = e.original, n = t.changeSetId ?
|
|
2362
|
-
return /* @__PURE__ */
|
|
2372
|
+
let t = e.original, n = t.changeSetId ? fe(t.changeSetId) : t.releaseId ? l("library.readOn.release") : l("library.readOn.main");
|
|
2373
|
+
return /* @__PURE__ */ u(te, { value: n });
|
|
2363
2374
|
}
|
|
2364
2375
|
},
|
|
2365
2376
|
{
|
|
2366
2377
|
id: "revised",
|
|
2367
|
-
header:
|
|
2368
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
2378
|
+
header: l("library.columns.revised"),
|
|
2379
|
+
cell: ({ row: e }) => /* @__PURE__ */ u(h, { value: e.original.revisionCreateTime })
|
|
2369
2380
|
}
|
|
2370
2381
|
], [
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
]),
|
|
2382
|
+
l,
|
|
2383
|
+
ye,
|
|
2384
|
+
fe
|
|
2385
|
+
]), Ce = /* @__PURE__ */ d(f, {
|
|
2375
2386
|
size: "sm",
|
|
2376
2387
|
variant: "solid",
|
|
2377
|
-
onClick: () =>
|
|
2378
|
-
children: [/* @__PURE__ */
|
|
2379
|
-
}),
|
|
2380
|
-
return /* @__PURE__ */
|
|
2381
|
-
title:
|
|
2382
|
-
breadcrumbs: [{ label:
|
|
2383
|
-
actions:
|
|
2384
|
-
toolbar: /* @__PURE__ */
|
|
2385
|
-
x === "in_force" ? /* @__PURE__ */
|
|
2388
|
+
onClick: () => B(!0),
|
|
2389
|
+
children: [/* @__PURE__ */ u(ce, { size: 16 }), l("library.create.button")]
|
|
2390
|
+
}), we = J.error instanceof t ? J.error.message : l("library.loadError"), $ = b ? _e(b, U.data ?? []).map((e) => e.name).join(" / ") || b : l("library.allContent");
|
|
2391
|
+
return /* @__PURE__ */ d(ne, {
|
|
2392
|
+
title: l("library.title"),
|
|
2393
|
+
breadcrumbs: [{ label: l("library.title") }],
|
|
2394
|
+
actions: Ce,
|
|
2395
|
+
toolbar: /* @__PURE__ */ d(_, { children: [
|
|
2396
|
+
x === "in_force" ? /* @__PURE__ */ u(M, {
|
|
2386
2397
|
fontSize: "sm",
|
|
2387
2398
|
color: "muted",
|
|
2388
|
-
children:
|
|
2389
|
-
}) : /* @__PURE__ */
|
|
2390
|
-
placeholder:
|
|
2399
|
+
children: l("library.filter.searchInForce")
|
|
2400
|
+
}) : /* @__PURE__ */ u(_.Search, {
|
|
2401
|
+
placeholder: l("library.filter.searchPlaceholder"),
|
|
2391
2402
|
value: w,
|
|
2392
|
-
onChange: (e) =>
|
|
2403
|
+
onChange: (e) => T([...e].slice(0, 200).join(""))
|
|
2393
2404
|
}),
|
|
2394
|
-
/* @__PURE__ */
|
|
2395
|
-
/* @__PURE__ */
|
|
2405
|
+
/* @__PURE__ */ d(_.Filters, { children: [
|
|
2406
|
+
/* @__PURE__ */ u(k, {
|
|
2396
2407
|
size: "sm",
|
|
2397
|
-
"aria-label":
|
|
2408
|
+
"aria-label": l("library.filter.view"),
|
|
2398
2409
|
value: x,
|
|
2399
2410
|
onChange: (e) => {
|
|
2400
2411
|
let t = e.target.value;
|
|
2401
|
-
t === "in_force" && (
|
|
2412
|
+
t === "in_force" && (T(""), ae("")), S(t);
|
|
2402
2413
|
},
|
|
2403
|
-
children:
|
|
2414
|
+
children: De.map((e) => /* @__PURE__ */ u("option", {
|
|
2404
2415
|
value: e,
|
|
2405
|
-
children:
|
|
2416
|
+
children: l(`library.view.${e}`)
|
|
2406
2417
|
}, e))
|
|
2407
2418
|
}),
|
|
2408
|
-
x === "change_set" ? /* @__PURE__ */
|
|
2419
|
+
x === "change_set" ? /* @__PURE__ */ d(k, {
|
|
2409
2420
|
size: "sm",
|
|
2410
|
-
"aria-label":
|
|
2411
|
-
value:
|
|
2421
|
+
"aria-label": l("library.filter.changeSet"),
|
|
2422
|
+
value: q,
|
|
2412
2423
|
onChange: (e) => C(e.target.value),
|
|
2413
|
-
children: [G.data?.changeSets.length ? null : /* @__PURE__ */
|
|
2424
|
+
children: [G.data?.changeSets.length ? null : /* @__PURE__ */ u("option", {
|
|
2414
2425
|
value: "",
|
|
2415
|
-
children:
|
|
2416
|
-
}), (G.data?.changeSets ?? []).map((e) => /* @__PURE__ */
|
|
2426
|
+
children: l("library.filter.noOpenChangeSet")
|
|
2427
|
+
}), (G.data?.changeSets ?? []).map((e) => /* @__PURE__ */ u("option", {
|
|
2417
2428
|
value: e.id,
|
|
2418
2429
|
children: e.name
|
|
2419
2430
|
}, e.id))]
|
|
2420
2431
|
}) : null,
|
|
2421
|
-
/* @__PURE__ */
|
|
2432
|
+
/* @__PURE__ */ d(k, {
|
|
2422
2433
|
size: "sm",
|
|
2423
|
-
"aria-label":
|
|
2434
|
+
"aria-label": l("library.filter.blueprint"),
|
|
2424
2435
|
value: F,
|
|
2425
|
-
onChange: (e) =>
|
|
2426
|
-
children: [/* @__PURE__ */
|
|
2436
|
+
onChange: (e) => se(e.target.value),
|
|
2437
|
+
children: [/* @__PURE__ */ u("option", {
|
|
2427
2438
|
value: "",
|
|
2428
|
-
children:
|
|
2429
|
-
}),
|
|
2439
|
+
children: l("library.filter.anyBlueprint")
|
|
2440
|
+
}), xe.map((e) => /* @__PURE__ */ u("option", {
|
|
2430
2441
|
value: e.id,
|
|
2431
2442
|
children: e.name
|
|
2432
2443
|
}, e.id))]
|
|
2433
2444
|
}),
|
|
2434
|
-
/* @__PURE__ */
|
|
2445
|
+
/* @__PURE__ */ d(k, {
|
|
2435
2446
|
size: "sm",
|
|
2436
|
-
"aria-label":
|
|
2447
|
+
"aria-label": l("library.filter.assignee"),
|
|
2437
2448
|
value: L,
|
|
2438
2449
|
onChange: (e) => R(e.target.value),
|
|
2439
2450
|
children: [
|
|
2440
|
-
/* @__PURE__ */
|
|
2451
|
+
/* @__PURE__ */ u("option", {
|
|
2441
2452
|
value: "",
|
|
2442
|
-
children:
|
|
2453
|
+
children: l("library.filter.anyone")
|
|
2443
2454
|
}),
|
|
2444
|
-
/* @__PURE__ */
|
|
2445
|
-
value:
|
|
2446
|
-
children:
|
|
2455
|
+
/* @__PURE__ */ u("option", {
|
|
2456
|
+
value: je,
|
|
2457
|
+
children: l("library.filter.me")
|
|
2447
2458
|
}),
|
|
2448
|
-
|
|
2459
|
+
le.list().filter((e) => e.userId !== V).map((e) => /* @__PURE__ */ u("option", {
|
|
2449
2460
|
value: e.userId,
|
|
2450
2461
|
children: e.displayName
|
|
2451
2462
|
}, e.userId))
|
|
2452
2463
|
]
|
|
2453
2464
|
})
|
|
2454
2465
|
] }),
|
|
2455
|
-
/* @__PURE__ */
|
|
2466
|
+
/* @__PURE__ */ u(_.Right, { children: J.isError ? null : /* @__PURE__ */ d(_.Count, { children: [l("library.count", { count: Y.length }), J.hasNextPage ? "+" : ""] }) })
|
|
2456
2467
|
] }),
|
|
2457
|
-
children: [/* @__PURE__ */
|
|
2468
|
+
children: [/* @__PURE__ */ d(N, {
|
|
2458
2469
|
storageKey: "contenthub-library-subnav",
|
|
2459
|
-
children: [/* @__PURE__ */
|
|
2460
|
-
"aria-label":
|
|
2461
|
-
children:
|
|
2462
|
-
collections:
|
|
2470
|
+
children: [/* @__PURE__ */ u(N.Nav, {
|
|
2471
|
+
"aria-label": l("library.collections"),
|
|
2472
|
+
children: U.isSuccess ? /* @__PURE__ */ u(ve, {
|
|
2473
|
+
collections: U.data,
|
|
2463
2474
|
activeId: b,
|
|
2464
2475
|
onSelect: H
|
|
2465
|
-
}) :
|
|
2476
|
+
}) : U.isError ? /* @__PURE__ */ u(M, {
|
|
2466
2477
|
fontSize: "sm",
|
|
2467
2478
|
color: "muted",
|
|
2468
2479
|
px: "3",
|
|
2469
2480
|
py: "2",
|
|
2470
|
-
children:
|
|
2471
|
-
}) : /* @__PURE__ */
|
|
2481
|
+
children: l("library.collectionsError")
|
|
2482
|
+
}) : /* @__PURE__ */ u(O, {
|
|
2472
2483
|
justify: "center",
|
|
2473
2484
|
py: "4",
|
|
2474
|
-
children: /* @__PURE__ */
|
|
2485
|
+
children: /* @__PURE__ */ u(A, { size: "sm" })
|
|
2475
2486
|
})
|
|
2476
|
-
}), /* @__PURE__ */
|
|
2487
|
+
}), /* @__PURE__ */ d(N.Detail, { children: [/* @__PURE__ */ u(N.Toolbar, { children: /* @__PURE__ */ u(M, {
|
|
2477
2488
|
fontSize: "sm",
|
|
2478
2489
|
fontWeight: "medium",
|
|
2479
|
-
children:
|
|
2480
|
-
}) }), /* @__PURE__ */
|
|
2490
|
+
children: $
|
|
2491
|
+
}) }), /* @__PURE__ */ d(j, {
|
|
2481
2492
|
gap: "3",
|
|
2482
2493
|
children: [
|
|
2483
|
-
|
|
2494
|
+
J.isError ? /* @__PURE__ */ u(D, {
|
|
2484
2495
|
status: "error",
|
|
2485
|
-
title:
|
|
2496
|
+
title: we,
|
|
2486
2497
|
mx: "8",
|
|
2487
2498
|
mt: "4"
|
|
2488
2499
|
}) : null,
|
|
2489
|
-
/* @__PURE__ */
|
|
2490
|
-
columns:
|
|
2491
|
-
data:
|
|
2492
|
-
loading:
|
|
2500
|
+
/* @__PURE__ */ u(m, {
|
|
2501
|
+
columns: Se,
|
|
2502
|
+
data: Y,
|
|
2503
|
+
loading: J.isLoading,
|
|
2493
2504
|
getRowId: (e) => `${e.id}/${e.branchId}/${e.releaseId}`,
|
|
2494
|
-
onRowClick: (e) =>
|
|
2505
|
+
onRowClick: (e) => r({
|
|
2495
2506
|
contentId: e.id,
|
|
2496
2507
|
changeSetId: e.changeSetId || void 0
|
|
2497
2508
|
}),
|
|
2498
2509
|
variant: "hoverable",
|
|
2499
|
-
emptyState: /* @__PURE__ */
|
|
2500
|
-
icon: /* @__PURE__ */
|
|
2501
|
-
header:
|
|
2502
|
-
description:
|
|
2510
|
+
emptyState: /* @__PURE__ */ u(p, {
|
|
2511
|
+
icon: /* @__PURE__ */ u(oe, { size: 32 }),
|
|
2512
|
+
header: l("library.empty"),
|
|
2513
|
+
description: l("library.emptyHint")
|
|
2503
2514
|
})
|
|
2504
2515
|
}),
|
|
2505
|
-
|
|
2516
|
+
J.hasNextPage ? /* @__PURE__ */ u(O, {
|
|
2506
2517
|
justify: "center",
|
|
2507
2518
|
pb: "4",
|
|
2508
|
-
children: /* @__PURE__ */
|
|
2519
|
+
children: /* @__PURE__ */ u(f, {
|
|
2509
2520
|
size: "sm",
|
|
2510
2521
|
variant: "outline",
|
|
2511
|
-
loading:
|
|
2512
|
-
onClick: () => void
|
|
2513
|
-
children:
|
|
2522
|
+
loading: J.isFetchingNextPage,
|
|
2523
|
+
onClick: () => void J.fetchNextPage(),
|
|
2524
|
+
children: l("library.more")
|
|
2514
2525
|
})
|
|
2515
2526
|
}) : null
|
|
2516
2527
|
]
|
|
2517
2528
|
})] })]
|
|
2518
|
-
}), /* @__PURE__ */
|
|
2519
|
-
open:
|
|
2520
|
-
onClose: () =>
|
|
2521
|
-
client:
|
|
2522
|
-
blueprintSource:
|
|
2523
|
-
initialChangeSetId: x === "change_set" ?
|
|
2529
|
+
}), /* @__PURE__ */ u(Ee, {
|
|
2530
|
+
open: z,
|
|
2531
|
+
onClose: () => B(!1),
|
|
2532
|
+
client: e,
|
|
2533
|
+
blueprintSource: g,
|
|
2534
|
+
initialChangeSetId: x === "change_set" ? q : void 0,
|
|
2524
2535
|
onCreated: (e) => {
|
|
2525
|
-
|
|
2536
|
+
B(!1), s({
|
|
2526
2537
|
changeSetId: e.changeSetId,
|
|
2527
2538
|
contentId: e.id,
|
|
2528
2539
|
branchId: e.branchId
|
|
@@ -2531,8 +2542,8 @@ function Ne({ client: t, blueprintSource: n, onOpenContent: o, onOpenBranch: c }
|
|
|
2531
2542
|
})]
|
|
2532
2543
|
});
|
|
2533
2544
|
}
|
|
2534
|
-
|
|
2545
|
+
Pe.displayName = "ContentLibrary";
|
|
2535
2546
|
//#endregion
|
|
2536
|
-
export {
|
|
2547
|
+
export { xe as a, _e as c, K as d, pe as f, Ce as i, ge as l, W as m, Pe as n, Se as o, q as p, Ne as r, be as s, Me as t, he as u };
|
|
2537
2548
|
|
|
2538
|
-
//# sourceMappingURL=content-library-
|
|
2549
|
+
//# sourceMappingURL=content-library-DoiD_FOJ.js.map
|