@knkcs/importhub-ui 0.9.0 → 0.10.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 +7 -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 +298 -5
- package/dist/index.js +1781 -1411
- package/dist/index.js.map +1 -1
- package/dist/mapping-editor.d.ts +96 -1
- package/dist/mapping-editor.js +1 -1
- package/dist/{mapping-page-BTEJR0-z.js → mapping-page-Bl2rA1SR.js} +301 -291
- package/dist/mapping-page-Bl2rA1SR.js.map +1 -0
- package/dist/testing.d.ts +100 -2
- package/dist/testing.js +580 -481
- 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
|
@@ -140,6 +140,53 @@ declare interface CutReleaseResult {
|
|
|
140
140
|
importProfiles: ImportProfileRef[];
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
+
/**
|
|
144
|
+
* What a real Import would do with one Source Version (importhub.v1.DryRunAction):
|
|
145
|
+
* create its Content, give it a new Planned Release, correct the Release its
|
|
146
|
+
* Changed Version matched, keep that Release, create a Stub, or nothing.
|
|
147
|
+
*/
|
|
148
|
+
declare type DryRunAction = "created" | "planned" | "corrected" | "kept" | "stubbed" | "unchanged";
|
|
149
|
+
|
|
150
|
+
/** One entry of a Dry Run's report: one Source Version of one Content. */
|
|
151
|
+
declare interface DryRunContent {
|
|
152
|
+
mappingId: string;
|
|
153
|
+
/** The Mapping's name in what the Dry Run ran. */
|
|
154
|
+
mappingName: string;
|
|
155
|
+
/** The element's Source Key: the Content's Content Key. */
|
|
156
|
+
sourceKey: string;
|
|
157
|
+
/** As the Mapping's display-name template makes it; "" without one. */
|
|
158
|
+
displayName: string;
|
|
159
|
+
action: DryRunAction;
|
|
160
|
+
/** The existing Content it is about; "" for Content it would create or stub. */
|
|
161
|
+
contentId: string;
|
|
162
|
+
/** The Validity Period, as YYYY-MM-DD; "" for undated Content and an open end. */
|
|
163
|
+
firstDay: string;
|
|
164
|
+
lastDay: string;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/** How a Dry Run's report is filtered: by action, by Mapping, by Source Key. */
|
|
168
|
+
declare interface DryRunContentsFilter {
|
|
169
|
+
/** "" for every action. */
|
|
170
|
+
action: DryRunAction | "";
|
|
171
|
+
/** "" for every Mapping. */
|
|
172
|
+
mappingId: string;
|
|
173
|
+
/** Matches Source Keys that contain it, ignoring case; "" for all. */
|
|
174
|
+
sourceKeyQuery: string;
|
|
175
|
+
/** "" for the first page. */
|
|
176
|
+
pageToken: string;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/** One page of a Dry Run's report. */
|
|
180
|
+
declare interface DryRunContentsPage {
|
|
181
|
+
contents: DryRunContent[];
|
|
182
|
+
/** Every entry of the report, whatever the filter. */
|
|
183
|
+
totalCount: number;
|
|
184
|
+
/** The entries the filter matches, on every page. */
|
|
185
|
+
matchingCount: number;
|
|
186
|
+
/** "" on the last page. */
|
|
187
|
+
nextPageToken: string;
|
|
188
|
+
}
|
|
189
|
+
|
|
143
190
|
declare type EntitySet = Configured<EntitySetContent>;
|
|
144
191
|
|
|
145
192
|
/** What an admin edits of an Entity Set. */
|
|
@@ -191,6 +238,14 @@ declare interface Import {
|
|
|
191
238
|
/** YYYY-MM-DD, or "" for none. */
|
|
192
239
|
effectiveDate: string;
|
|
193
240
|
source?: ImportSource;
|
|
241
|
+
/**
|
|
242
|
+
* Whether it is a Dry Run (CONTEXT.md "Dry Run"): it writes nothing and
|
|
243
|
+
* opens no Change Set, its counts say what a real Import would do, and its
|
|
244
|
+
* report is `listDryRunContents`'.
|
|
245
|
+
*/
|
|
246
|
+
dryRun: boolean;
|
|
247
|
+
/** Whether it runs drafts: a Dry Run started on them. Never for a real Import. */
|
|
248
|
+
draft: boolean;
|
|
194
249
|
}
|
|
195
250
|
|
|
196
251
|
/** What an Import has done (importhub.v1.ImportCounts). */
|
|
@@ -209,6 +264,10 @@ declare interface ImportCounts {
|
|
|
209
264
|
kept: number;
|
|
210
265
|
/** Source Versions already in contenthub. */
|
|
211
266
|
unchanged: number;
|
|
267
|
+
/** Stubs created for a Stub Mapping's Source Keys no Content had. */
|
|
268
|
+
stubbed: number;
|
|
269
|
+
/** References it could not resolve: each one of its Item Problems too. */
|
|
270
|
+
pendingReferences: number;
|
|
212
271
|
}
|
|
213
272
|
|
|
214
273
|
/**
|
|
@@ -277,6 +336,18 @@ declare interface ImporthubClient {
|
|
|
277
336
|
/** Asks a queued or running Import to stop; returns it as it is now. */
|
|
278
337
|
cancelImport(id: string): Promise<Import>;
|
|
279
338
|
listItemProblems(importId: string, filter: ItemProblemsFilter): Promise<ItemProblemsPage>;
|
|
339
|
+
/**
|
|
340
|
+
* Queues a Dry Run: an Import with the same inputs that writes nothing
|
|
341
|
+
* and opens no Change Set (dry-run-an-import:AC1, AC2). Throws
|
|
342
|
+
* StartRefusedError, with importhub's reason, as `startImport` does, and
|
|
343
|
+
* for a draft that is invalid.
|
|
344
|
+
*/
|
|
345
|
+
startDryRun(input: StartDryRunInput): Promise<Import>;
|
|
346
|
+
/**
|
|
347
|
+
* One page of a Dry Run's report: per Source Version, what a real Import
|
|
348
|
+
* would do with its Content (dry-run-an-import:AC3).
|
|
349
|
+
*/
|
|
350
|
+
listDryRunContents(importId: string, filter: DryRunContentsFilter): Promise<DryRunContentsPage>;
|
|
280
351
|
/**
|
|
281
352
|
* Every API key of the workspace, every importer's, newest first, without
|
|
282
353
|
* their secrets. Needs importhub's `importer`, as all three key calls do.
|
|
@@ -329,9 +400,12 @@ declare interface ImportReleaseRef {
|
|
|
329
400
|
configurationId: string;
|
|
330
401
|
/** The configuration's name in that Release. */
|
|
331
402
|
name: string;
|
|
403
|
+
/** "" for a draft a Dry Run runs. */
|
|
332
404
|
releaseId: string;
|
|
333
|
-
/** "Release 3". */
|
|
405
|
+
/** "Release 3"; 0 for a draft a Dry Run runs. */
|
|
334
406
|
number: number;
|
|
407
|
+
/** The draft Revision a Dry Run on drafts runs; unset for a Release. */
|
|
408
|
+
revisionId?: string;
|
|
335
409
|
}
|
|
336
410
|
|
|
337
411
|
/** The publication that triggered an Import: such as 2026-09-20, "BGBl. 2026 I Nr. 270". */
|
|
@@ -361,6 +435,16 @@ declare interface ItemProblem {
|
|
|
361
435
|
field: string;
|
|
362
436
|
/** Why, as importhub words it. */
|
|
363
437
|
reason: string;
|
|
438
|
+
/**
|
|
439
|
+
* Set when it is a reference the Import could not resolve (CONTEXT.md
|
|
440
|
+
* "Pending Reference"): what it names. Its holder is the Content its
|
|
441
|
+
* Mapping and Source Key read, and `field` is where it holds it.
|
|
442
|
+
*/
|
|
443
|
+
pendingReference?: {
|
|
444
|
+
targetMappingId: string;
|
|
445
|
+
targetBlueprintId: string;
|
|
446
|
+
targetSourceKey: string;
|
|
447
|
+
};
|
|
364
448
|
}
|
|
365
449
|
|
|
366
450
|
/** How an Import's Item Problems are filtered: by Mapping, and by Source Key. */
|
|
@@ -386,6 +470,8 @@ declare interface ItemProblemsPage {
|
|
|
386
470
|
mappingName: string;
|
|
387
471
|
count: number;
|
|
388
472
|
}[];
|
|
473
|
+
/** The Item Problems that are Pending References, whatever the filter. */
|
|
474
|
+
pendingReferenceCount: number;
|
|
389
475
|
/** "" on the last page. */
|
|
390
476
|
nextPageToken: string;
|
|
391
477
|
}
|
|
@@ -581,6 +667,15 @@ declare interface SourceFile {
|
|
|
581
667
|
fileName: string;
|
|
582
668
|
}
|
|
583
669
|
|
|
670
|
+
/** What starting a Dry Run takes: an Import's inputs, and whether to run drafts. */
|
|
671
|
+
declare interface StartDryRunInput extends StartImportInput {
|
|
672
|
+
/**
|
|
673
|
+
* Run the drafts of the Profile, its Mappings and its Entity Set instead
|
|
674
|
+
* of their latest Releases (ADR 0016); unset for the Releases.
|
|
675
|
+
*/
|
|
676
|
+
draft?: boolean;
|
|
677
|
+
}
|
|
678
|
+
|
|
584
679
|
/** What starting an Import takes. */
|
|
585
680
|
declare interface StartImportInput {
|
|
586
681
|
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, l as O, m as te, u as $e, i as Te, n as we, F as W, M as ze } from "./mapping-page-
|
|
4
|
+
import { I, l as O, m as te, u as $e, i as Te, n as we, F as W, M as ze } from "./mapping-page-Bl2rA1SR.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";
|