@knkcs/importhub-ui 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +5 -4
- package/dist/{importhub-client-Wrb4s3lw.js → importhub-client-BzOVIXA4.js} +16 -7
- package/dist/importhub-client-BzOVIXA4.js.map +1 -0
- package/dist/index.d.ts +385 -8
- package/dist/index.js +1870 -1351
- package/dist/index.js.map +1 -1
- package/dist/mapping-editor.d.ts +135 -1
- package/dist/mapping-editor.js +1 -1
- package/dist/{mapping-page-BTEJR0-z.js → mapping-page-CABgzLlj.js} +402 -387
- package/dist/mapping-page-CABgzLlj.js.map +1 -0
- package/dist/testing.d.ts +141 -2
- package/dist/testing.js +655 -501
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
- package/dist/importhub-client-Wrb4s3lw.js.map +0 -1
- package/dist/mapping-page-BTEJR0-z.js.map +0 -1
package/dist/mapping-editor.d.ts
CHANGED
|
@@ -21,6 +21,19 @@ declare interface ApiKey {
|
|
|
21
21
|
createTime: string;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
/** One mediahub asset an Import moved into the folder mirroring its path. */
|
|
25
|
+
declare interface AssetMove {
|
|
26
|
+
/** The asset's key in mediahub, as the source spells it. */
|
|
27
|
+
key: string;
|
|
28
|
+
/**
|
|
29
|
+
* The folder paths it was moved from and to, from the workspace's root,
|
|
30
|
+
* joined by " / "; `from` is importhub's "(no folder)" for an asset filed
|
|
31
|
+
* nowhere.
|
|
32
|
+
*/
|
|
33
|
+
from: string;
|
|
34
|
+
to: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
24
37
|
/** What moving a Mapping's draft to another Blueprint Release would lose. */
|
|
25
38
|
declare interface BlueprintReleaseCheck {
|
|
26
39
|
blueprintId: string;
|
|
@@ -140,6 +153,53 @@ declare interface CutReleaseResult {
|
|
|
140
153
|
importProfiles: ImportProfileRef[];
|
|
141
154
|
}
|
|
142
155
|
|
|
156
|
+
/**
|
|
157
|
+
* What a real Import would do with one Source Version (importhub.v1.DryRunAction):
|
|
158
|
+
* create its Content, give it a new Planned Release, correct the Release its
|
|
159
|
+
* Changed Version matched, keep that Release, create a Stub, or nothing.
|
|
160
|
+
*/
|
|
161
|
+
declare type DryRunAction = "created" | "planned" | "corrected" | "kept" | "stubbed" | "unchanged";
|
|
162
|
+
|
|
163
|
+
/** One entry of a Dry Run's report: one Source Version of one Content. */
|
|
164
|
+
declare interface DryRunContent {
|
|
165
|
+
mappingId: string;
|
|
166
|
+
/** The Mapping's name in what the Dry Run ran. */
|
|
167
|
+
mappingName: string;
|
|
168
|
+
/** The element's Source Key: the Content's Content Key. */
|
|
169
|
+
sourceKey: string;
|
|
170
|
+
/** As the Mapping's display-name template makes it; "" without one. */
|
|
171
|
+
displayName: string;
|
|
172
|
+
action: DryRunAction;
|
|
173
|
+
/** The existing Content it is about; "" for Content it would create or stub. */
|
|
174
|
+
contentId: string;
|
|
175
|
+
/** The Validity Period, as YYYY-MM-DD; "" for undated Content and an open end. */
|
|
176
|
+
firstDay: string;
|
|
177
|
+
lastDay: string;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/** How a Dry Run's report is filtered: by action, by Mapping, by Source Key. */
|
|
181
|
+
declare interface DryRunContentsFilter {
|
|
182
|
+
/** "" for every action. */
|
|
183
|
+
action: DryRunAction | "";
|
|
184
|
+
/** "" for every Mapping. */
|
|
185
|
+
mappingId: string;
|
|
186
|
+
/** Matches Source Keys that contain it, ignoring case; "" for all. */
|
|
187
|
+
sourceKeyQuery: string;
|
|
188
|
+
/** "" for the first page. */
|
|
189
|
+
pageToken: string;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/** One page of a Dry Run's report. */
|
|
193
|
+
declare interface DryRunContentsPage {
|
|
194
|
+
contents: DryRunContent[];
|
|
195
|
+
/** Every entry of the report, whatever the filter. */
|
|
196
|
+
totalCount: number;
|
|
197
|
+
/** The entries the filter matches, on every page. */
|
|
198
|
+
matchingCount: number;
|
|
199
|
+
/** "" on the last page. */
|
|
200
|
+
nextPageToken: string;
|
|
201
|
+
}
|
|
202
|
+
|
|
143
203
|
declare type EntitySet = Configured<EntitySetContent>;
|
|
144
204
|
|
|
145
205
|
/** What an admin edits of an Entity Set. */
|
|
@@ -191,6 +251,28 @@ declare interface Import {
|
|
|
191
251
|
/** YYYY-MM-DD, or "" for none. */
|
|
192
252
|
effectiveDate: string;
|
|
193
253
|
source?: ImportSource;
|
|
254
|
+
/**
|
|
255
|
+
* Whether it is a Dry Run (CONTEXT.md "Dry Run"): it writes nothing and
|
|
256
|
+
* opens no Change Set, its counts say what a real Import would do, and its
|
|
257
|
+
* report is `listDryRunContents`'.
|
|
258
|
+
*/
|
|
259
|
+
dryRun: boolean;
|
|
260
|
+
/** Whether it runs drafts: a Dry Run started on them. Never for a real Import. */
|
|
261
|
+
draft: boolean;
|
|
262
|
+
/**
|
|
263
|
+
* The Placeholder Assets it found in mediahub outside the folder mirroring
|
|
264
|
+
* their path and moved there, in the order moved
|
|
265
|
+
* (link-placeholder-assets-in-mediahub:AC7). `getImport` reads them;
|
|
266
|
+
* `listImports` leaves them empty, as they grow with the Source File.
|
|
267
|
+
*/
|
|
268
|
+
assetMoves: AssetMove[];
|
|
269
|
+
/**
|
|
270
|
+
* When its Source File was deleted, as an ISO 8601 timestamp, and why, as
|
|
271
|
+
* importhub words it; both "" while it is kept. Re-run is offered only
|
|
272
|
+
* while it is kept (re-run-a-source-file).
|
|
273
|
+
*/
|
|
274
|
+
sourceFileDeleteTime: string;
|
|
275
|
+
sourceFileDeletionReason: string;
|
|
194
276
|
}
|
|
195
277
|
|
|
196
278
|
/** What an Import has done (importhub.v1.ImportCounts). */
|
|
@@ -209,6 +291,10 @@ declare interface ImportCounts {
|
|
|
209
291
|
kept: number;
|
|
210
292
|
/** Source Versions already in contenthub. */
|
|
211
293
|
unchanged: number;
|
|
294
|
+
/** Stubs created for a Stub Mapping's Source Keys no Content had. */
|
|
295
|
+
stubbed: number;
|
|
296
|
+
/** References it could not resolve: each one of its Item Problems too. */
|
|
297
|
+
pendingReferences: number;
|
|
212
298
|
}
|
|
213
299
|
|
|
214
300
|
/**
|
|
@@ -277,6 +363,25 @@ declare interface ImporthubClient {
|
|
|
277
363
|
/** Asks a queued or running Import to stop; returns it as it is now. */
|
|
278
364
|
cancelImport(id: string): Promise<Import>;
|
|
279
365
|
listItemProblems(importId: string, filter: ItemProblemsFilter): Promise<ItemProblemsPage>;
|
|
366
|
+
/**
|
|
367
|
+
* Starts a new Import of the same Source File on the latest Releases, its
|
|
368
|
+
* other inputs copied (re-run-a-source-file:AC1); a re-run of a Dry Run is
|
|
369
|
+
* a Dry Run. Throws StartRefusedError, with importhub's reason, as
|
|
370
|
+
* `startImport` does, and once the Source File is deleted.
|
|
371
|
+
*/
|
|
372
|
+
rerunImport(id: string): Promise<Import>;
|
|
373
|
+
/**
|
|
374
|
+
* Queues a Dry Run: an Import with the same inputs that writes nothing
|
|
375
|
+
* and opens no Change Set (dry-run-an-import:AC1, AC2). Throws
|
|
376
|
+
* StartRefusedError, with importhub's reason, as `startImport` does, and
|
|
377
|
+
* for a draft that is invalid.
|
|
378
|
+
*/
|
|
379
|
+
startDryRun(input: StartDryRunInput): Promise<Import>;
|
|
380
|
+
/**
|
|
381
|
+
* One page of a Dry Run's report: per Source Version, what a real Import
|
|
382
|
+
* would do with its Content (dry-run-an-import:AC3).
|
|
383
|
+
*/
|
|
384
|
+
listDryRunContents(importId: string, filter: DryRunContentsFilter): Promise<DryRunContentsPage>;
|
|
280
385
|
/**
|
|
281
386
|
* Every API key of the workspace, every importer's, newest first, without
|
|
282
387
|
* their secrets. Needs importhub's `importer`, as all three key calls do.
|
|
@@ -329,9 +434,12 @@ declare interface ImportReleaseRef {
|
|
|
329
434
|
configurationId: string;
|
|
330
435
|
/** The configuration's name in that Release. */
|
|
331
436
|
name: string;
|
|
437
|
+
/** "" for a draft a Dry Run runs. */
|
|
332
438
|
releaseId: string;
|
|
333
|
-
/** "Release 3". */
|
|
439
|
+
/** "Release 3"; 0 for a draft a Dry Run runs. */
|
|
334
440
|
number: number;
|
|
441
|
+
/** The draft Revision a Dry Run on drafts runs; unset for a Release. */
|
|
442
|
+
revisionId?: string;
|
|
335
443
|
}
|
|
336
444
|
|
|
337
445
|
/** The publication that triggered an Import: such as 2026-09-20, "BGBl. 2026 I Nr. 270". */
|
|
@@ -361,6 +469,21 @@ declare interface ItemProblem {
|
|
|
361
469
|
field: string;
|
|
362
470
|
/** Why, as importhub words it. */
|
|
363
471
|
reason: string;
|
|
472
|
+
/**
|
|
473
|
+
* The Content's display name, as its Mapping's display-name template makes
|
|
474
|
+
* it; "" without one, or when the problem is about no one Content.
|
|
475
|
+
*/
|
|
476
|
+
displayName: string;
|
|
477
|
+
/**
|
|
478
|
+
* Set when it is a reference the Import could not resolve (CONTEXT.md
|
|
479
|
+
* "Pending Reference"): what it names. Its holder is the Content its
|
|
480
|
+
* Mapping and Source Key read, and `field` is where it holds it.
|
|
481
|
+
*/
|
|
482
|
+
pendingReference?: {
|
|
483
|
+
targetMappingId: string;
|
|
484
|
+
targetBlueprintId: string;
|
|
485
|
+
targetSourceKey: string;
|
|
486
|
+
};
|
|
364
487
|
}
|
|
365
488
|
|
|
366
489
|
/** How an Import's Item Problems are filtered: by Mapping, and by Source Key. */
|
|
@@ -386,6 +509,8 @@ declare interface ItemProblemsPage {
|
|
|
386
509
|
mappingName: string;
|
|
387
510
|
count: number;
|
|
388
511
|
}[];
|
|
512
|
+
/** The Item Problems that are Pending References, whatever the filter. */
|
|
513
|
+
pendingReferenceCount: number;
|
|
389
514
|
/** "" on the last page. */
|
|
390
515
|
nextPageToken: string;
|
|
391
516
|
}
|
|
@@ -581,6 +706,15 @@ declare interface SourceFile {
|
|
|
581
706
|
fileName: string;
|
|
582
707
|
}
|
|
583
708
|
|
|
709
|
+
/** What starting a Dry Run takes: an Import's inputs, and whether to run drafts. */
|
|
710
|
+
declare interface StartDryRunInput extends StartImportInput {
|
|
711
|
+
/**
|
|
712
|
+
* Run the drafts of the Profile, its Mappings and its Entity Set instead
|
|
713
|
+
* of their latest Releases (ADR 0016); unset for the Releases.
|
|
714
|
+
*/
|
|
715
|
+
draft?: boolean;
|
|
716
|
+
}
|
|
717
|
+
|
|
584
718
|
/** What starting an Import takes. */
|
|
585
719
|
declare interface StartImportInput {
|
|
586
720
|
importProfileId: string;
|
package/dist/mapping-editor.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as e, jsxs as a, Fragment as z } from "react/jsx-runtime";
|
|
2
2
|
import { useState as N, useEffect as ye, useId as He, useMemo as U } from "react";
|
|
3
3
|
import { useTranslation as E } from "react-i18next";
|
|
4
|
-
import { I,
|
|
4
|
+
import { I, m as O, n as te, u as $e, i as Te, o as we, F as W, M as ze } from "./mapping-page-CABgzLlj.js";
|
|
5
5
|
import { Button as w, StatusBadge as Se, BaseSelect as ke, IconButton as X } from "@knkcs/anker/atoms";
|
|
6
6
|
import { Card as v, NavList as Q, UploadDropZone as Ae, CodeCell as Me, TruncatedTextCell as se, DataTable as Re } from "@knkcs/anker/components";
|
|
7
7
|
import { Stack as b, Text as h, Textarea as ve, Alert as $, Box as x, List as de, HStack as R, Heading as Oe, Code as Le, Checkbox as De, Center as _e, Grid as le, Separator as ce, RadioGroup as Ve, Radio as je } from "@knkcs/anker/primitives";
|