@auditcore/ui-core 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +1326 -0
- package/dist/account/camera.d.ts +8 -0
- package/dist/account/controller.d.ts +30 -0
- package/dist/account/index.d.ts +7 -0
- package/dist/account/messages.d.ts +2 -0
- package/dist/account/port.d.ts +10 -0
- package/dist/account/presentation.d.ts +9 -0
- package/dist/account/types.d.ts +42 -0
- package/dist/account/view.d.ts +12 -0
- package/dist/attributes/controller.d.ts +26 -0
- package/dist/attributes/index.d.ts +5 -0
- package/dist/attributes/messages.d.ts +3 -0
- package/dist/attributes/port.d.ts +4 -0
- package/dist/attributes/types.d.ts +60 -0
- package/dist/attributes/view.d.ts +49 -0
- package/dist/base/icons.d.ts +38 -0
- package/dist/base/index.d.ts +3 -0
- package/dist/base/types.d.ts +3 -0
- package/dist/batchchecks/controller.d.ts +60 -0
- package/dist/batchchecks/index.d.ts +7 -0
- package/dist/batchchecks/messages.d.ts +3 -0
- package/dist/batchchecks/model.d.ts +38 -0
- package/dist/batchchecks/port.d.ts +6 -0
- package/dist/batchchecks/rest-port.d.ts +4 -0
- package/dist/batchchecks/types.d.ts +121 -0
- package/dist/batchchecks/view.d.ts +58 -0
- package/dist/benford/chart.d.ts +49 -0
- package/dist/benford/controller.d.ts +48 -0
- package/dist/benford/index.d.ts +7 -0
- package/dist/benford/messages.d.ts +3 -0
- package/dist/benford/model.d.ts +32 -0
- package/dist/benford/rest-port.d.ts +4 -0
- package/dist/benford/types.d.ts +144 -0
- package/dist/benford/view.d.ts +45 -0
- package/dist/dataprotection/dsfa.d.ts +55 -0
- package/dist/dataprotection/dsfaView.d.ts +45 -0
- package/dist/dataprotection/exporters.d.ts +33 -0
- package/dist/dataprotection/index.d.ts +10 -0
- package/dist/dataprotection/messages.d.ts +5 -0
- package/dist/dataprotection/registerView.d.ts +47 -0
- package/dist/dataprotection/requests.d.ts +16 -0
- package/dist/dataprotection/rest-port.d.ts +4 -0
- package/dist/dataprotection/types.d.ts +291 -0
- package/dist/dataprotection/vvt.d.ts +69 -0
- package/dist/dbkanban/controller.d.ts +54 -0
- package/dist/dbkanban/index.d.ts +3 -0
- package/dist/dbkanban/messages.d.ts +5 -0
- package/dist/dbkanban/view.d.ts +39 -0
- package/dist/documents/controller.d.ts +63 -0
- package/dist/documents/form.d.ts +52 -0
- package/dist/documents/importing.d.ts +12 -0
- package/dist/documents/index.d.ts +6 -0
- package/dist/documents/list.d.ts +21 -0
- package/dist/documents/messages.d.ts +8 -0
- package/dist/documents/view.d.ts +36 -0
- package/dist/download.d.ts +14 -0
- package/dist/extraction/controller.d.ts +34 -0
- package/dist/extraction/index.d.ts +5 -0
- package/dist/extraction/messages.d.ts +3 -0
- package/dist/extraction/rest-port.d.ts +4 -0
- package/dist/extraction/types.d.ts +115 -0
- package/dist/extraction/view.d.ts +35 -0
- package/dist/extrapolation/controller-subsample.d.ts +20 -0
- package/dist/extrapolation/controller.d.ts +72 -0
- package/dist/extrapolation/index.d.ts +9 -0
- package/dist/extrapolation/messages.d.ts +3 -0
- package/dist/extrapolation/model-design.d.ts +28 -0
- package/dist/extrapolation/model-subsample.d.ts +40 -0
- package/dist/extrapolation/model.d.ts +92 -0
- package/dist/extrapolation/rest-port.d.ts +4 -0
- package/dist/extrapolation/types.d.ts +255 -0
- package/dist/extrapolation/view-details.d.ts +46 -0
- package/dist/extrapolation/view.d.ts +50 -0
- package/dist/focus.d.ts +10 -0
- package/dist/geo/controller.d.ts +87 -0
- package/dist/geo/index.d.ts +6 -0
- package/dist/geo/mapView.d.ts +30 -0
- package/dist/geo/messages.d.ts +3 -0
- package/dist/geo/model.d.ts +43 -0
- package/dist/geo/rest-port.d.ts +12 -0
- package/dist/geo/types.d.ts +195 -0
- package/dist/i18n.d.ts +29 -0
- package/dist/identifiers/controller.d.ts +63 -0
- package/dist/identifiers/index.d.ts +5 -0
- package/dist/identifiers/messages.d.ts +3 -0
- package/dist/identifiers/model.d.ts +87 -0
- package/dist/identifiers/rest-port.d.ts +4 -0
- package/dist/identifiers/types.d.ts +101 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +10676 -0
- package/dist/index.js.map +1 -0
- package/dist/kanban/index.d.ts +2 -0
- package/dist/kanban/messages.d.ts +6 -0
- package/dist/messages.d.ts +2 -0
- package/dist/reporting/controller.d.ts +46 -0
- package/dist/reporting/index.d.ts +5 -0
- package/dist/reporting/messages.d.ts +3 -0
- package/dist/reporting/rest-port.d.ts +4 -0
- package/dist/reporting/types.d.ts +72 -0
- package/dist/reporting/view.d.ts +12 -0
- package/dist/reporttemplates/controller.d.ts +46 -0
- package/dist/reporttemplates/index.d.ts +5 -0
- package/dist/reporttemplates/messages.d.ts +3 -0
- package/dist/reporttemplates/port.d.ts +4 -0
- package/dist/reporttemplates/types.d.ts +92 -0
- package/dist/reporttemplates/view.d.ts +27 -0
- package/dist/risk/controller.d.ts +54 -0
- package/dist/risk/format.d.ts +13 -0
- package/dist/risk/index.d.ts +7 -0
- package/dist/risk/labels.d.ts +9 -0
- package/dist/risk/messages.d.ts +3 -0
- package/dist/risk/port.d.ts +41 -0
- package/dist/risk/state.d.ts +61 -0
- package/dist/risk/types.d.ts +107 -0
- package/dist/runner/aktionen.d.ts +16 -0
- package/dist/runner/controller.d.ts +72 -0
- package/dist/runner/eingabe.d.ts +5 -0
- package/dist/runner/index.d.ts +9 -0
- package/dist/runner/messages.d.ts +3 -0
- package/dist/runner/port.d.ts +20 -0
- package/dist/runner/profil.d.ts +39 -0
- package/dist/runner/types.d.ts +109 -0
- package/dist/runner/view-listen.d.ts +32 -0
- package/dist/runner/view.d.ts +95 -0
- package/dist/samplesize/controller.d.ts +33 -0
- package/dist/samplesize/index.d.ts +7 -0
- package/dist/samplesize/messages.d.ts +3 -0
- package/dist/samplesize/model.d.ts +40 -0
- package/dist/samplesize/port.d.ts +9 -0
- package/dist/samplesize/types.d.ts +92 -0
- package/dist/samplesize/view.d.ts +39 -0
- package/dist/sampling/controller.d.ts +62 -0
- package/dist/sampling/index.d.ts +6 -0
- package/dist/sampling/messages.d.ts +3 -0
- package/dist/sampling/model.d.ts +63 -0
- package/dist/sampling/rest-port.d.ts +4 -0
- package/dist/sampling/types.d.ts +136 -0
- package/dist/sampling/view.d.ts +45 -0
- package/dist/screening/controller.d.ts +52 -0
- package/dist/screening/index.d.ts +8 -0
- package/dist/screening/messages.d.ts +7 -0
- package/dist/screening/rest-port.d.ts +4 -0
- package/dist/screening/runForm.d.ts +22 -0
- package/dist/screening/types.d.ts +295 -0
- package/dist/screening/view.d.ts +84 -0
- package/dist/store.d.ts +30 -0
- package/dist/synopsis/controller.d.ts +68 -0
- package/dist/synopsis/exporters.d.ts +16 -0
- package/dist/synopsis/index.d.ts +8 -0
- package/dist/synopsis/messages.d.ts +3 -0
- package/dist/synopsis/navigation.d.ts +5 -0
- package/dist/synopsis/port.d.ts +38 -0
- package/dist/synopsis/types.d.ts +121 -0
- package/dist/synopsis/viewModel.d.ts +74 -0
- package/dist/synopsis/wordDiff.d.ts +31 -0
- package/dist/table/index.d.ts +6 -0
- package/dist/tabular/index.d.ts +2 -0
- package/dist/tabular/messages.d.ts +3 -0
- package/dist/tabular/tableImport.d.ts +40 -0
- package/package.json +55 -0
- package/styles/account.css +37 -0
- package/styles/attributes.css +18 -0
- package/styles/base.css +116 -0
- package/styles/batchchecks.css +26 -0
- package/styles/benford.css +39 -0
- package/styles/dataprotection.css +68 -0
- package/styles/dbkanban.css +38 -0
- package/styles/documents.css +51 -0
- package/styles/extraction.css +25 -0
- package/styles/extrapolation.css +34 -0
- package/styles/geo.css +54 -0
- package/styles/identifiers.css +38 -0
- package/styles/index.css +24 -0
- package/styles/kanban.css +115 -0
- package/styles/reporting.css +22 -0
- package/styles/reporttemplates.css +21 -0
- package/styles/risk.css +92 -0
- package/styles/runner.css +54 -0
- package/styles/samplesize.css +27 -0
- package/styles/sampling.css +31 -0
- package/styles/screening.css +86 -0
- package/styles/synopsis.css +83 -0
- package/styles/table.css +17 -0
- package/styles/tabular.css +11 -0
- package/styles/tokens.css +121 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Opt-in Kamera, keine Aufnahme ohne Benutzeraktion, Tracks immer schließen. */
|
|
2
|
+
export declare function createAccountCamera(): {
|
|
3
|
+
stop: () => void;
|
|
4
|
+
start(video: HTMLVideoElement): Promise<void>;
|
|
5
|
+
capture(video: HTMLVideoElement): Promise<Blob>;
|
|
6
|
+
};
|
|
7
|
+
/** Quadratischer Zuschnitt: Position 0..1 und Zoom 1..4, Metadaten übernimmt der Server nicht. */
|
|
8
|
+
export declare function cropAccountImage(file: Blob, zoom: number, x: number, y: number): Promise<Blob>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { RequestState } from '../store';
|
|
2
|
+
import { AccountDocument, AccountItem, AccountPort } from './types';
|
|
3
|
+
export interface AccountCallbacks {
|
|
4
|
+
selected?: (item: AccountItem) => void;
|
|
5
|
+
failed?: (message: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export interface AccountData extends RequestState<string> {
|
|
8
|
+
items: readonly AccountItem[];
|
|
9
|
+
selectedId: string | null;
|
|
10
|
+
document: AccountDocument | null;
|
|
11
|
+
draft: Readonly<Record<string, string>>;
|
|
12
|
+
dirty: boolean;
|
|
13
|
+
images: Readonly<Record<string, string>>;
|
|
14
|
+
}
|
|
15
|
+
export interface AccountSource {
|
|
16
|
+
port: () => AccountPort | null | undefined;
|
|
17
|
+
callbacks?: () => AccountCallbacks;
|
|
18
|
+
}
|
|
19
|
+
export declare const INITIAL_ACCOUNT: AccountData;
|
|
20
|
+
export declare function createAccountController(source: AccountSource): {
|
|
21
|
+
store: import('..').Store<AccountData>;
|
|
22
|
+
dispose(): void;
|
|
23
|
+
load(): Promise<void>;
|
|
24
|
+
select(id: string): Promise<void>;
|
|
25
|
+
edit(id: string, value: string): void;
|
|
26
|
+
discard(): void;
|
|
27
|
+
save(): Promise<void>;
|
|
28
|
+
upload(fieldId: string, file: Blob): Promise<void>;
|
|
29
|
+
};
|
|
30
|
+
export type AccountController = ReturnType<typeof createAccountController>;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const accountMessages: import('..').Catalogs<"loading" | "title" | "readonly" | "stop" | "empty" | "save" | "discard" | "saved" | "preview" | "failed" | "choose" | "zoom" | "remove" | "upload" | "crop" | "horizontal" | "vertical" | "dirty" | "camera" | "capture" | "cameraFailed">;
|
|
2
|
+
export type AccountMessageKey = keyof typeof accountMessages.de;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AccountDocument, AccountItem, AccountPort } from './types';
|
|
2
|
+
/** Nur synthetische Demo/Testdaten; keine Autorisierungs- oder Persistenzschicht. */
|
|
3
|
+
export declare function createAccountMemoryPort(items: readonly AccountItem[], documents?: readonly AccountDocument[]): AccountPort;
|
|
4
|
+
/** Der injizierte Transport ergänzt Session, CSRF und Fehlerabbildung der Anwendung. */
|
|
5
|
+
export interface AccountTransport {
|
|
6
|
+
request: <T>(method: 'GET' | 'POST', path: string, body?: unknown) => Promise<T>;
|
|
7
|
+
upload?: AccountPort['upload'];
|
|
8
|
+
imageUrl?: AccountPort['imageUrl'];
|
|
9
|
+
}
|
|
10
|
+
export declare function createAccountRestPort(transport: AccountTransport, base?: string): AccountPort;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AccountDocument, AccountPort } from './types';
|
|
2
|
+
/** Keine beliebigen CSS-Werte aus editierbaren Feldern einsetzen. */
|
|
3
|
+
export declare function accountPreviewStyle(values: Readonly<Record<string, string>>): {
|
|
4
|
+
backgroundColor: string | undefined;
|
|
5
|
+
color: string | undefined;
|
|
6
|
+
fontFamily: string | undefined;
|
|
7
|
+
};
|
|
8
|
+
export declare function accountImageUrl(port: AccountPort | null | undefined, id: string): string;
|
|
9
|
+
export declare function accountWelcomePreview(document: AccountDocument, values: Readonly<Record<string, string>>): string;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/** Frameworkunabhängiger Formularvertrag; Feldrechte kommen vom Server. */
|
|
2
|
+
export interface AccountItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
group?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface AccountField {
|
|
8
|
+
id: string;
|
|
9
|
+
label: string;
|
|
10
|
+
type?: 'text' | 'email' | 'url' | 'password' | 'textarea' | 'select' | 'multiselect' | 'color' | 'image';
|
|
11
|
+
required?: boolean;
|
|
12
|
+
readonly?: boolean;
|
|
13
|
+
hint?: string;
|
|
14
|
+
options?: readonly {
|
|
15
|
+
value: string;
|
|
16
|
+
label: string;
|
|
17
|
+
}[];
|
|
18
|
+
autocomplete?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface AccountDocument {
|
|
21
|
+
id: string;
|
|
22
|
+
title: string;
|
|
23
|
+
description: string;
|
|
24
|
+
kind: 'profile' | 'branding' | 'welcome' | 'security' | 'admin' | 'extension';
|
|
25
|
+
revision: number;
|
|
26
|
+
fields: readonly AccountField[];
|
|
27
|
+
values: Readonly<Record<string, string>>;
|
|
28
|
+
submitLabel?: string;
|
|
29
|
+
editable: boolean;
|
|
30
|
+
}
|
|
31
|
+
export interface AccountImage {
|
|
32
|
+
id: string;
|
|
33
|
+
url: string;
|
|
34
|
+
}
|
|
35
|
+
export interface AccountPort {
|
|
36
|
+
list: () => Promise<readonly AccountItem[]>;
|
|
37
|
+
read: (id: string) => Promise<AccountDocument>;
|
|
38
|
+
save: (id: string, revision: number, values: Readonly<Record<string, string>>) => Promise<AccountDocument>;
|
|
39
|
+
/** Host autorisiert Dokument und Feld und liefert eine zugriffsgeschützte Bild-URL. */
|
|
40
|
+
upload?: (documentId: string, fieldId: string, file: Blob) => Promise<AccountImage>;
|
|
41
|
+
imageUrl?: (assetId: string) => string;
|
|
42
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AccountData } from './controller';
|
|
2
|
+
import { AccountItem } from './types';
|
|
3
|
+
/** Zeile der Liste, wie Vue und React sie darstellen. */
|
|
4
|
+
export interface AccountRow {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
selected: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function accountRows(state: AccountData): AccountRow[];
|
|
10
|
+
export declare function accountSelection(state: AccountData): AccountItem | null;
|
|
11
|
+
/** Hinweis „keine Einträge“ nur nach abgeschlossener, fehlerfreier Anfrage. */
|
|
12
|
+
export declare function accountIsEmpty(state: AccountData): boolean;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { RequestState, Store } from '../store';
|
|
2
|
+
import { AttributesCatalogue, AttributesPort, AttributesResult } from './types';
|
|
3
|
+
import { AttributesForm, AttributesIssues } from './view';
|
|
4
|
+
export interface AttributesCallbacks {
|
|
5
|
+
evaluated?: (result: AttributesResult) => void;
|
|
6
|
+
failed?: (message: string) => void;
|
|
7
|
+
}
|
|
8
|
+
/** Stand; `error` ist die Meldung der letzten abgelehnten Anfrage. */
|
|
9
|
+
export interface AttributesData extends RequestState<string> {
|
|
10
|
+
catalogue: AttributesCatalogue | null;
|
|
11
|
+
form: AttributesForm;
|
|
12
|
+
issues: AttributesIssues;
|
|
13
|
+
result: AttributesResult | null;
|
|
14
|
+
}
|
|
15
|
+
export interface AttributesSource {
|
|
16
|
+
port: () => AttributesPort | null | undefined;
|
|
17
|
+
callbacks?: () => AttributesCallbacks;
|
|
18
|
+
}
|
|
19
|
+
export interface AttributesController {
|
|
20
|
+
store: Store<AttributesData>;
|
|
21
|
+
load: () => Promise<void>;
|
|
22
|
+
update: (patch: Partial<AttributesForm>) => void;
|
|
23
|
+
evaluate: () => Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
export declare const INITIAL_ATTRIBUTES: AttributesData;
|
|
26
|
+
export declare function createAttributesController(source: AttributesSource): AttributesController;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Texte von AttributeSampling (Vue) und FlowauditAttributeSampling (React); sichtbare Texte nur hier. */
|
|
2
|
+
export declare const attributesMessages: import('..').Catalogs<"loading" | "notice" | "title" | "threshold" | "failed" | "choose" | "fingerprint" | "confidence" | "derivation" | "sampleSize" | "colValue" | "critical" | "factorProfile" | "evaluate" | "issueRequired" | "issueInvalid" | "issueRange" | "formIncomplete" | "resultTitle" | "tolerable" | "precision" | "upperLimit" | "colStep" | "colFormula" | "colSource" | "rate" | "approach" | "approachnormal" | "approachdiscovery" | "approachstop_or_go" | "deviations" | "conclusionsupported" | "conclusionnot_supported" | "conclusioncriterion_met" | "conclusiondeviation_found" | "conclusionstop" | "conclusiongo">;
|
|
3
|
+
export type AttributesMessageKey = keyof typeof attributesMessages.de;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/** Typen des REST-Endpunkts `POST /attributes` (Vertrag `auditcore_extrapolation.evaluation/1`, Leitfaden 7.9). */
|
|
2
|
+
export type AttributeApproach = 'normal' | 'discovery' | 'stop_or_go';
|
|
3
|
+
export interface AttributesCatalogue {
|
|
4
|
+
contract: string;
|
|
5
|
+
library: string;
|
|
6
|
+
factor_profiles: readonly {
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
}[];
|
|
10
|
+
recommended_profile: string;
|
|
11
|
+
confidence_levels: {
|
|
12
|
+
z: readonly number[];
|
|
13
|
+
};
|
|
14
|
+
attribute_approaches?: readonly {
|
|
15
|
+
id: AttributeApproach;
|
|
16
|
+
label: string;
|
|
17
|
+
source: string;
|
|
18
|
+
}[];
|
|
19
|
+
}
|
|
20
|
+
export interface AttributesRequest {
|
|
21
|
+
approach: AttributeApproach;
|
|
22
|
+
deviations: number;
|
|
23
|
+
sample_size: number;
|
|
24
|
+
confidence_level: number;
|
|
25
|
+
/** Nur Normalapproximation (z-Wert). */
|
|
26
|
+
factor_profile?: string;
|
|
27
|
+
/** Tolerierbare bzw. kritische Abweichungsquote als Anteil. */
|
|
28
|
+
tolerable_rate: number;
|
|
29
|
+
}
|
|
30
|
+
export interface AttributesStep {
|
|
31
|
+
label: string;
|
|
32
|
+
formula: string;
|
|
33
|
+
value: number;
|
|
34
|
+
source: string;
|
|
35
|
+
}
|
|
36
|
+
export type AttributesConclusion = 'supported' | 'not_supported' | 'criterion_met' | 'deviation_found' | 'stop' | 'go';
|
|
37
|
+
export interface AttributesOutcome {
|
|
38
|
+
approach: AttributeApproach;
|
|
39
|
+
deviations: number;
|
|
40
|
+
sample_size: number;
|
|
41
|
+
confidence_level: number;
|
|
42
|
+
rate: number;
|
|
43
|
+
upper_limit: number;
|
|
44
|
+
conclusion: AttributesConclusion;
|
|
45
|
+
steps: readonly AttributesStep[];
|
|
46
|
+
precision?: number;
|
|
47
|
+
tolerable_rate?: number;
|
|
48
|
+
threshold?: number;
|
|
49
|
+
}
|
|
50
|
+
export interface AttributesResult {
|
|
51
|
+
contract: string;
|
|
52
|
+
library: string;
|
|
53
|
+
fingerprint: string;
|
|
54
|
+
attributes: AttributesOutcome;
|
|
55
|
+
}
|
|
56
|
+
/** Fachlogik hinter der Oberfläche; Standardumsetzung: `createAttributesRestPort`. */
|
|
57
|
+
export interface AttributesPort {
|
|
58
|
+
profiles: () => Promise<AttributesCatalogue>;
|
|
59
|
+
evaluate: (request: AttributesRequest) => Promise<AttributesResult>;
|
|
60
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { TableColumn, TableRow } from '@auditcore/common';
|
|
2
|
+
import { BadgeTone } from '../base/types';
|
|
3
|
+
import { Locale, Translate } from '../i18n';
|
|
4
|
+
import { AttributesMessageKey } from './messages';
|
|
5
|
+
import { AttributeApproach, AttributesCatalogue, AttributesConclusion, AttributesRequest, AttributesResult } from './types';
|
|
6
|
+
export type AttributesTranslate = Translate<AttributesMessageKey>;
|
|
7
|
+
export interface AttributesForm {
|
|
8
|
+
approach: AttributeApproach;
|
|
9
|
+
deviations: string;
|
|
10
|
+
sampleSize: string;
|
|
11
|
+
confidence: number | null;
|
|
12
|
+
profileId: string | null;
|
|
13
|
+
/** Tolerierbare bzw. kritische Quote in Prozent. */
|
|
14
|
+
rate: string;
|
|
15
|
+
}
|
|
16
|
+
export type AttributesIssue = 'required' | 'invalid' | 'range';
|
|
17
|
+
export type AttributesIssues = Readonly<Record<string, AttributesIssue>>;
|
|
18
|
+
export type AttributesValidation = {
|
|
19
|
+
ok: true;
|
|
20
|
+
request: AttributesRequest;
|
|
21
|
+
} | {
|
|
22
|
+
ok: false;
|
|
23
|
+
issues: AttributesIssues;
|
|
24
|
+
};
|
|
25
|
+
export declare const EMPTY_ATTRIBUTES_FORM: AttributesForm;
|
|
26
|
+
export declare function attributesApproachChoices(t: AttributesTranslate): {
|
|
27
|
+
id: AttributeApproach;
|
|
28
|
+
label: string;
|
|
29
|
+
}[];
|
|
30
|
+
/** Anfrage für `POST /attributes`; bei Befunden die Feldschlüssel mit ihrem Fehler. */
|
|
31
|
+
export declare function buildAttributesRequest(form: AttributesForm): AttributesValidation;
|
|
32
|
+
export declare function attributesConfidenceChoices(catalogue: AttributesCatalogue | null): readonly number[];
|
|
33
|
+
export declare function attributesPercent(value: number, locale: Locale): string;
|
|
34
|
+
export declare function attributesIssueKey(issue: AttributesIssue): AttributesMessageKey;
|
|
35
|
+
export declare function attributesConclusionTone(conclusion: AttributesConclusion): BadgeTone;
|
|
36
|
+
export interface AttributesMetric {
|
|
37
|
+
id: string;
|
|
38
|
+
label: string;
|
|
39
|
+
value: string;
|
|
40
|
+
}
|
|
41
|
+
export declare function attributesMetrics(result: AttributesResult, t: AttributesTranslate, locale: Locale): AttributesMetric[];
|
|
42
|
+
export declare function attributesStepColumns(t: AttributesTranslate, locale: Locale): TableColumn[];
|
|
43
|
+
export declare function attributesStepRows(result: AttributesResult): TableRow[];
|
|
44
|
+
export declare const ATTRIBUTE_FIELDS: readonly {
|
|
45
|
+
key: 'deviations' | 'sampleSize' | 'rate';
|
|
46
|
+
numeric: true;
|
|
47
|
+
}[];
|
|
48
|
+
export declare function attributesFieldLabel(key: 'deviations' | 'sampleSize' | 'rate', approach: AttributeApproach, t: AttributesTranslate): string;
|
|
49
|
+
export declare function attributesFormMessage(issues: AttributesIssues, t: AttributesTranslate): string;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Eigene Strichsymbole (24er-Raster, Strichstärke über CSS). Jede Zeile ist
|
|
3
|
+
* eine Liste von SVG-Pfaden; neue Symbole nur hier ergänzen.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ICONS: {
|
|
6
|
+
readonly close: readonly ["M6 6l12 12", "M18 6L6 18"];
|
|
7
|
+
readonly plus: readonly ["M12 5v14", "M5 12h14"];
|
|
8
|
+
readonly minus: readonly ["M5 12h14"];
|
|
9
|
+
readonly check: readonly ["M5 12.5l4.5 4.5L19 7.5"];
|
|
10
|
+
readonly search: readonly ["M10.5 17a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13z", "M15.5 15.5L20 20"];
|
|
11
|
+
readonly filter: readonly ["M4 5h16", "M7 12h10", "M10 19h4"];
|
|
12
|
+
readonly settings: readonly ["M4 6h9", "M17 6h3", "M15 4v4", "M4 12h3", "M11 12h9", "M9 10v4", "M4 18h11", "M19 18h1", "M17 16v4"];
|
|
13
|
+
readonly share: readonly ["M6 14a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z", "M18 8a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z", "M18 21a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z", "M8.2 10.4l7.6-4.3", "M8.2 12.6l7.6 4.3"];
|
|
14
|
+
readonly trash: readonly ["M4 7h16", "M9 7V4.5h6V7", "M6.5 7l1 13h9l1-13", "M10 11v6", "M14 11v6"];
|
|
15
|
+
readonly edit: readonly ["M4 20h4L19 9l-4-4L4 16v4z", "M13.5 6.5l4 4"];
|
|
16
|
+
readonly 'chevron-down': readonly ["M6 9l6 6 6-6"];
|
|
17
|
+
readonly 'chevron-up': readonly ["M6 15l6-6 6 6"];
|
|
18
|
+
readonly 'chevron-left': readonly ["M15 6l-6 6 6 6"];
|
|
19
|
+
readonly 'chevron-right': readonly ["M9 6l6 6-6 6"];
|
|
20
|
+
readonly sort: readonly ["M8 4v16", "M4.5 7.5L8 4l3.5 3.5", "M16 20V4", "M12.5 16.5L16 20l3.5-3.5"];
|
|
21
|
+
readonly 'sort-asc': readonly ["M12 19V5", "M6.5 10.5L12 5l5.5 5.5"];
|
|
22
|
+
readonly 'sort-desc': readonly ["M12 5v14", "M6.5 13.5L12 19l5.5-5.5"];
|
|
23
|
+
readonly grip: readonly ["M9 6h.01", "M15 6h.01", "M9 12h.01", "M15 12h.01", "M9 18h.01", "M15 18h.01"];
|
|
24
|
+
readonly calendar: readonly ["M4.5 6.5h15v13h-15z", "M4.5 10.5h15", "M8.5 4v4", "M15.5 4v4"];
|
|
25
|
+
readonly clock: readonly ["M12 20.5a8.5 8.5 0 1 0 0-17 8.5 8.5 0 0 0 0 17z", "M12 7.5V12l3 2"];
|
|
26
|
+
readonly paperclip: readonly ["M19 11.5l-7.2 7.2a4.5 4.5 0 0 1-6.4-6.4l7.8-7.8a3 3 0 0 1 4.2 4.2l-7.6 7.6a1.5 1.5 0 0 1-2.1-2.1l6.9-6.9"];
|
|
27
|
+
readonly user: readonly ["M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8z", "M4.5 20.5a7.5 7.5 0 0 1 15 0"];
|
|
28
|
+
readonly lock: readonly ["M6 11h12v9H6z", "M8.5 11V8a3.5 3.5 0 0 1 7 0v3"];
|
|
29
|
+
readonly pin: readonly ["M9 4h6l-1 6 3 3H7l3-3-1-6z", "M12 13v7"];
|
|
30
|
+
readonly sun: readonly ["M12 16.5a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9z", "M12 2.5v2", "M12 19.5v2", "M2.5 12h2", "M19.5 12h2", "M5.3 5.3l1.4 1.4", "M17.3 17.3l1.4 1.4", "M5.3 18.7l1.4-1.4", "M17.3 6.7l1.4-1.4"];
|
|
31
|
+
readonly moon: readonly ["M19.5 14.5A8 8 0 0 1 9.5 4.5a8 8 0 1 0 10 10z"];
|
|
32
|
+
readonly warning: readonly ["M12 4l9 16H3z", "M12 10v4.5", "M12 17.5h.01"];
|
|
33
|
+
readonly info: readonly ["M12 20.5a8.5 8.5 0 1 0 0-17 8.5 8.5 0 0 0 0 17z", "M12 11v5.5", "M12 7.5h.01"];
|
|
34
|
+
readonly expand: readonly ["M4 9V4h5", "M20 9V4h-5", "M4 15v5h5", "M20 15v5h-5"];
|
|
35
|
+
readonly 'more-vertical': readonly ["M12 5.5h.01", "M12 12h.01", "M12 18.5h.01"];
|
|
36
|
+
};
|
|
37
|
+
export type IconName = keyof typeof ICONS;
|
|
38
|
+
export declare function isIconName(value: string): value is IconName;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { DecimalSeparator, DownloadFile } from '@auditcore/common';
|
|
2
|
+
import { RequestState, Store } from '../store';
|
|
3
|
+
import { BatchchecksError, BatchchecksMapping } from './model';
|
|
4
|
+
import { BatchchecksAnswer, BatchchecksCatalogue, BatchchecksDocument, BatchchecksExportFormat, BatchchecksPort, BatchchecksRequest } from './types';
|
|
5
|
+
export type BatchchecksBusy = 'load' | 'run' | 'export';
|
|
6
|
+
export interface BatchchecksCallbacks {
|
|
7
|
+
completed?: (answer: BatchchecksAnswer) => void;
|
|
8
|
+
failed?: (message: string) => void;
|
|
9
|
+
}
|
|
10
|
+
/** Stand; `error` ist die Meldung der letzten abgelehnten Anfrage. */
|
|
11
|
+
export interface BatchchecksData extends RequestState<string> {
|
|
12
|
+
catalogue: BatchchecksCatalogue | null;
|
|
13
|
+
/** Belege aus einer JSON-Datei (sonst gilt die Tabelle des TableImport-Controllers). */
|
|
14
|
+
json: readonly BatchchecksDocument[] | null;
|
|
15
|
+
jsonName: string;
|
|
16
|
+
mapping: BatchchecksMapping;
|
|
17
|
+
totalVolume: string;
|
|
18
|
+
supplementary: boolean;
|
|
19
|
+
validation: BatchchecksError | null;
|
|
20
|
+
request: BatchchecksRequest | null;
|
|
21
|
+
answer: BatchchecksAnswer | null;
|
|
22
|
+
/** Regel, deren Befunde angezeigt werden (`null` = alle). */
|
|
23
|
+
ruleFilter: string | null;
|
|
24
|
+
}
|
|
25
|
+
export interface BatchchecksSource {
|
|
26
|
+
port: () => BatchchecksPort | null | undefined;
|
|
27
|
+
callbacks?: () => BatchchecksCallbacks;
|
|
28
|
+
}
|
|
29
|
+
export declare const INITIAL_BATCHCHECKS: BatchchecksData;
|
|
30
|
+
export declare function createBatchchecksController(source: BatchchecksSource): {
|
|
31
|
+
setTotalVolume: (totalVolume: string) => void;
|
|
32
|
+
setSupplementary: (supplementary: boolean) => void;
|
|
33
|
+
setRuleFilter: (ruleFilter: string | null) => void;
|
|
34
|
+
/** Vorhandenes Ergebnis anzeigen (Eigenschaft `result`). */
|
|
35
|
+
showAnswer: (answer: BatchchecksAnswer | null) => void;
|
|
36
|
+
/** Dateiinhalt übernehmen (Datei bereits gelesen, z. B. Beispielbestand). */
|
|
37
|
+
loadText: (filename: string, text: string) => void;
|
|
38
|
+
readFile: (file: File) => Promise<void>;
|
|
39
|
+
setHasHeader: (hasHeader: boolean) => void;
|
|
40
|
+
setDecimal: (decimal: DecimalSeparator) => void;
|
|
41
|
+
/** Feld einer Spalte zuordnen (`null` = keine). */
|
|
42
|
+
setColumn: (field: string, column: number | null) => void;
|
|
43
|
+
store: Store<BatchchecksData>;
|
|
44
|
+
/** Tabellenimport (gemeinsamer TableImport-Controller aus `@auditcore/ui-core`). */
|
|
45
|
+
table: {
|
|
46
|
+
store: Store<import('..').TableImportData>;
|
|
47
|
+
load: (filename: string, text: string) => void;
|
|
48
|
+
reparse: () => void;
|
|
49
|
+
read: (file: File) => Promise<void>;
|
|
50
|
+
setHasHeader: (hasHeader: boolean) => void;
|
|
51
|
+
setValueColumn: (valueColumn: number) => void;
|
|
52
|
+
setIdColumn: (idColumn: number | null) => void;
|
|
53
|
+
setStratumColumn: (stratumColumn: number | null) => void;
|
|
54
|
+
setDecimal: (decimal: DecimalSeparator) => void;
|
|
55
|
+
};
|
|
56
|
+
load: () => Promise<void>;
|
|
57
|
+
check: () => Promise<void>;
|
|
58
|
+
exportRun: (format: BatchchecksExportFormat) => Promise<DownloadFile | null>;
|
|
59
|
+
};
|
|
60
|
+
export type BatchchecksController = ReturnType<typeof createBatchchecksController>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { batchchecksMessages, type BatchchecksMessageKey } from './messages';
|
|
2
|
+
export type * from './types';
|
|
3
|
+
export { createBatchchecksMemoryPort } from './port';
|
|
4
|
+
export { createBatchchecksRestPort } from './rest-port';
|
|
5
|
+
export * from './model';
|
|
6
|
+
export * from './controller';
|
|
7
|
+
export * from './view';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Texte der Bestandsprüfung: BatchChecks (Vue) und FlowauditBatchChecks (React); sichtbare Texte nur hier. */
|
|
2
|
+
export declare const batchchecksMessages: import('..').Catalogs<"loading" | "notice" | "header" | "input" | "summary" | "title" | "decimal" | "none" | "noPort" | "exportCsv" | "colStatus" | "columns" | "result" | "failed" | "colCode" | "run" | "file" | "decimalComma" | "decimalDot" | "colId" | "exportJson" | "errortooMany" | "metrics" | "tableSummary" | "errornoRows" | "fileHelp" | "noValue" | "findings" | "findingsNone" | "colMessage" | "jsonSummary" | "totalVolume" | "totalVolumeHelp" | "supplementary" | "errornoData" | "errornoColumns" | "errorjson" | "errortotalVolume" | "escalation" | "levelinfo" | "levelwarning" | "levelblocker" | "blocked" | "rules" | "colTitle" | "colChecks" | "statuspassed" | "statusfindings" | "statusnot_checked" | "statusresult" | "supplement" | "filterRule" | "allRules" | "colLevel" | "colAffected" | "colBasis" | "inventoryWide" | "more" | "metricMandatory" | "metricFormal" | "metricErrors" | "metricOcrAvg" | "metricOcrMin">;
|
|
3
|
+
export type BatchchecksMessageKey = keyof typeof batchchecksMessages.de;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { DecimalSeparator, ParsedTable } from '@auditcore/common';
|
|
2
|
+
import { BatchchecksCatalogue, BatchchecksDocument, BatchchecksField, BatchchecksRequest } from './types';
|
|
3
|
+
export type BatchchecksError = 'noData' | 'noRows' | 'tooMany' | 'noColumns' | 'json' | 'totalVolume';
|
|
4
|
+
export type BatchchecksValidation = {
|
|
5
|
+
ok: true;
|
|
6
|
+
request: BatchchecksRequest;
|
|
7
|
+
} | {
|
|
8
|
+
ok: false;
|
|
9
|
+
error: BatchchecksError;
|
|
10
|
+
};
|
|
11
|
+
/** Feld → Spalte der Tabelle (`null` = nicht zugeordnet). */
|
|
12
|
+
export type BatchchecksMapping = Readonly<Record<string, number | null>>;
|
|
13
|
+
/** Spalten automatisch zuordnen: Spaltenname gleich Feldkennung oder einem Spaltennamen des Katalogs; jede Spalte höchstens einmal. */
|
|
14
|
+
export declare function batchchecksAutoMapping(fields: readonly BatchchecksField[], header: readonly string[]): Record<string, number | null>;
|
|
15
|
+
/** Dezimaltrennzeichen aus den Zellen aller zugeordneten Zahlenspalten. */
|
|
16
|
+
export declare function batchchecksDecimal(table: ParsedTable, fields: readonly BatchchecksField[], mapping: BatchchecksMapping): DecimalSeparator;
|
|
17
|
+
/** Dateiinhalt als JSON behandeln (Endung `.json` oder beginnt mit `[`/`{`). */
|
|
18
|
+
export declare function batchchecksLooksLikeJson(filename: string, text: string): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Belege aus einer JSON-Datei: Liste, `{"documents": [...]}` oder ein
|
|
21
|
+
* einzelner Lauf der Belegerkennung; `null`, wenn die Datei das nicht ist.
|
|
22
|
+
*/
|
|
23
|
+
export declare function batchchecksJsonDocuments(text: string): BatchchecksDocument[] | null;
|
|
24
|
+
/** Zelle als Wert: leer → `null`, Zahlenfelder als Zahl (Prozentangaben der OCR-Konfidenz als Anteil), Unlesbares unverändert. */
|
|
25
|
+
export declare function batchchecksCellValue(cell: string, field: BatchchecksField, decimal: DecimalSeparator): string | number | null;
|
|
26
|
+
/** Tabellenzeilen als Belege (nur zugeordnete Felder). */
|
|
27
|
+
export declare function batchchecksTableDocuments(table: ParsedTable, mapping: BatchchecksMapping, fields: readonly BatchchecksField[], decimal: DecimalSeparator): BatchchecksDocument[];
|
|
28
|
+
export interface BatchchecksInput {
|
|
29
|
+
catalogue: BatchchecksCatalogue;
|
|
30
|
+
table: ParsedTable | null;
|
|
31
|
+
json: readonly BatchchecksDocument[] | null;
|
|
32
|
+
mapping: BatchchecksMapping;
|
|
33
|
+
decimal: DecimalSeparator;
|
|
34
|
+
totalVolume: string;
|
|
35
|
+
supplementary: boolean;
|
|
36
|
+
}
|
|
37
|
+
/** Anfrage für `POST /runs` aus Datei, Zuordnung und Optionen. */
|
|
38
|
+
export declare function buildBatchchecksRequest(input: BatchchecksInput): BatchchecksValidation;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BatchchecksAnswer, BatchchecksCatalogue, BatchchecksPort } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Port mit festen Antworten (Demo ohne Server, Tests): Katalog und Antwort
|
|
4
|
+
* wie vom Dienst; der Export liefert die Antwort als JSON-Datei.
|
|
5
|
+
*/
|
|
6
|
+
export declare function createBatchchecksMemoryPort(catalogue: BatchchecksCatalogue, answer: BatchchecksAnswer): BatchchecksPort;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RestOptions } from '@auditcore/common';
|
|
2
|
+
import { BatchchecksPort } from './types';
|
|
3
|
+
/** Port auf den REST-Vertrag `documents_batch_checks/1` von `auditcore_documents.web` (Starlette oder FastAPI). */
|
|
4
|
+
export declare function createBatchchecksRestPort(options: RestOptions): BatchchecksPort;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { DownloadFile } from '@auditcore/common';
|
|
2
|
+
export type BatchchecksLevel = 'info' | 'warning' | 'blocker';
|
|
3
|
+
export type BatchchecksRuleStatus = 'passed' | 'findings' | 'not_checked' | 'result';
|
|
4
|
+
export type BatchchecksScope = 'document' | 'inventory' | 'run';
|
|
5
|
+
export type BatchchecksExportFormat = 'json' | 'csv';
|
|
6
|
+
/** Prüfregel des Katalogs: was geprüft wird, Rechtsgrundlage, Herkunft. */
|
|
7
|
+
export interface BatchchecksRule {
|
|
8
|
+
code: string;
|
|
9
|
+
title: string;
|
|
10
|
+
checks: string;
|
|
11
|
+
legal_basis: string;
|
|
12
|
+
scope: BatchchecksScope;
|
|
13
|
+
source: string;
|
|
14
|
+
}
|
|
15
|
+
/** Feld des Bestands mit Spaltennamen für die automatische Zuordnung. */
|
|
16
|
+
export interface BatchchecksField {
|
|
17
|
+
name: string;
|
|
18
|
+
label: string;
|
|
19
|
+
aliases: readonly string[];
|
|
20
|
+
numeric: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface BatchchecksOptions {
|
|
23
|
+
total_volume: number | null;
|
|
24
|
+
tolerance: number;
|
|
25
|
+
concentration_threshold: number;
|
|
26
|
+
block_threshold: number;
|
|
27
|
+
supplementary: boolean;
|
|
28
|
+
}
|
|
29
|
+
export interface BatchchecksCatalogue {
|
|
30
|
+
contract: string;
|
|
31
|
+
library: string;
|
|
32
|
+
rules: readonly BatchchecksRule[];
|
|
33
|
+
fields: readonly BatchchecksField[];
|
|
34
|
+
defaults: BatchchecksOptions;
|
|
35
|
+
levels: readonly {
|
|
36
|
+
id: BatchchecksLevel;
|
|
37
|
+
label: string;
|
|
38
|
+
}[];
|
|
39
|
+
limits: {
|
|
40
|
+
max_documents: number;
|
|
41
|
+
max_body_bytes: number;
|
|
42
|
+
};
|
|
43
|
+
export_formats: readonly BatchchecksExportFormat[];
|
|
44
|
+
stored: boolean;
|
|
45
|
+
}
|
|
46
|
+
/** Beleg der Anfrage: flacher Datensatz oder Lauf der Belegerkennung (`documents_extraction/1`). */
|
|
47
|
+
export type BatchchecksDocument = Readonly<Record<string, unknown>>;
|
|
48
|
+
export interface BatchchecksRequest {
|
|
49
|
+
documents: readonly BatchchecksDocument[];
|
|
50
|
+
options?: Partial<BatchchecksOptions>;
|
|
51
|
+
}
|
|
52
|
+
export interface BatchchecksRuleResult extends BatchchecksRule {
|
|
53
|
+
status: BatchchecksRuleStatus;
|
|
54
|
+
note: string | null;
|
|
55
|
+
findings: number;
|
|
56
|
+
documents: number;
|
|
57
|
+
level: BatchchecksLevel | null;
|
|
58
|
+
}
|
|
59
|
+
export interface BatchchecksFinding {
|
|
60
|
+
id: string;
|
|
61
|
+
rule: string;
|
|
62
|
+
category: string;
|
|
63
|
+
level: BatchchecksLevel;
|
|
64
|
+
field: string | null;
|
|
65
|
+
/** Begründung (deutsch). */
|
|
66
|
+
message: string;
|
|
67
|
+
/** Betroffene Belege (0-basiert). */
|
|
68
|
+
documents: readonly number[];
|
|
69
|
+
evidence: Readonly<Record<string, unknown>>;
|
|
70
|
+
rule_reference: string;
|
|
71
|
+
}
|
|
72
|
+
export interface BatchchecksDocumentResult {
|
|
73
|
+
index: number;
|
|
74
|
+
ref: string;
|
|
75
|
+
supplier_name: string | number | null;
|
|
76
|
+
invoice_number: string | number | null;
|
|
77
|
+
invoice_date: string | number | null;
|
|
78
|
+
gross_amount: string | number | null;
|
|
79
|
+
ocr_confidence: number | null;
|
|
80
|
+
findings: number;
|
|
81
|
+
level: BatchchecksLevel | null;
|
|
82
|
+
rules: readonly string[];
|
|
83
|
+
}
|
|
84
|
+
export interface BatchchecksSummary {
|
|
85
|
+
documents: number;
|
|
86
|
+
findings: number;
|
|
87
|
+
documents_with_findings: number;
|
|
88
|
+
escalation_level: BatchchecksLevel;
|
|
89
|
+
report_blocked: boolean;
|
|
90
|
+
block_reason: string | null;
|
|
91
|
+
timestamp: string;
|
|
92
|
+
}
|
|
93
|
+
export interface BatchchecksMetrics {
|
|
94
|
+
total_documents: number;
|
|
95
|
+
mandatory_fields_success_rate: number;
|
|
96
|
+
per_field_success: Readonly<Record<string, number>>;
|
|
97
|
+
documents_with_errors: number;
|
|
98
|
+
documents_with_errors_rate: number;
|
|
99
|
+
avg_ocr_confidence: number | null;
|
|
100
|
+
min_ocr_confidence: number | null;
|
|
101
|
+
escalated_documents: number;
|
|
102
|
+
formal_correctness_rate: number;
|
|
103
|
+
}
|
|
104
|
+
/** Antwort von `POST /runs`. */
|
|
105
|
+
export interface BatchchecksAnswer {
|
|
106
|
+
contract: string;
|
|
107
|
+
library: string;
|
|
108
|
+
options: BatchchecksOptions;
|
|
109
|
+
summary: BatchchecksSummary;
|
|
110
|
+
metrics: BatchchecksMetrics;
|
|
111
|
+
rules: readonly BatchchecksRuleResult[];
|
|
112
|
+
findings: readonly BatchchecksFinding[];
|
|
113
|
+
documents: readonly BatchchecksDocumentResult[];
|
|
114
|
+
stored: boolean;
|
|
115
|
+
}
|
|
116
|
+
/** Fachlogik hinter der Oberfläche; Vue und React rufen nur diesen Port auf. */
|
|
117
|
+
export interface BatchchecksPort {
|
|
118
|
+
catalogue: () => Promise<BatchchecksCatalogue>;
|
|
119
|
+
run: (request: BatchchecksRequest) => Promise<BatchchecksAnswer>;
|
|
120
|
+
exportRun: (request: BatchchecksRequest, format: BatchchecksExportFormat) => Promise<DownloadFile>;
|
|
121
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Locale, Translate } from '../i18n';
|
|
2
|
+
import { TableImportData } from '../tabular';
|
|
3
|
+
import { BatchchecksData } from './controller';
|
|
4
|
+
import { BatchchecksMessageKey } from './messages';
|
|
5
|
+
import { BatchchecksAnswer, BatchchecksFinding, BatchchecksLevel } from './types';
|
|
6
|
+
export type BatchchecksTranslate = Translate<BatchchecksMessageKey>;
|
|
7
|
+
export type BatchchecksTone = 'success' | 'warning' | 'danger' | 'neutral';
|
|
8
|
+
/** Höchstzahl aufgezählter Belege je Befund. */
|
|
9
|
+
export declare const BATCHCHECKS_LISTED_DOCUMENTS = 10;
|
|
10
|
+
export declare function batchchecksLevelText(level: BatchchecksLevel | null, t: BatchchecksTranslate): string;
|
|
11
|
+
export declare function batchchecksLevelTone(level: BatchchecksLevel | null): BatchchecksTone;
|
|
12
|
+
/** Eine Tabelle ist geladen (und keine JSON-Datei). */
|
|
13
|
+
export declare function batchchecksHasTable(state: BatchchecksData, table: TableImportData): boolean;
|
|
14
|
+
/** Kurzbeschreibung der eingelesenen Datei. */
|
|
15
|
+
export declare function batchchecksSourceText(state: BatchchecksData, table: TableImportData, t: BatchchecksTranslate): string;
|
|
16
|
+
export interface BatchchecksColumnField {
|
|
17
|
+
name: string;
|
|
18
|
+
label: string;
|
|
19
|
+
value: number | null;
|
|
20
|
+
}
|
|
21
|
+
/** Auswahlfelder der Spaltenzuordnung in der Reihenfolge des Katalogs. */
|
|
22
|
+
export declare function batchchecksColumnFields(state: BatchchecksData): BatchchecksColumnField[];
|
|
23
|
+
export interface BatchchecksRuleRow {
|
|
24
|
+
code: string;
|
|
25
|
+
title: string;
|
|
26
|
+
checks: string;
|
|
27
|
+
basis: string;
|
|
28
|
+
supplement: boolean;
|
|
29
|
+
status: string;
|
|
30
|
+
tone: BatchchecksTone;
|
|
31
|
+
note: string;
|
|
32
|
+
}
|
|
33
|
+
/** Regelübersicht: alle Regeln mit Status, auch ohne Befund und nicht geprüfte. */
|
|
34
|
+
export declare function batchchecksRuleRows(answer: BatchchecksAnswer, t: BatchchecksTranslate): BatchchecksRuleRow[];
|
|
35
|
+
/** Regeln mit Befunden für die Filterauswahl. */
|
|
36
|
+
export declare function batchchecksFilterOptions(answer: BatchchecksAnswer): {
|
|
37
|
+
code: string;
|
|
38
|
+
label: string;
|
|
39
|
+
}[];
|
|
40
|
+
/** Betroffene Belege als Kennungen (höchstens zehn, dann „… und n weitere“); ohne Belege „Gesamtbestand“. */
|
|
41
|
+
export declare function batchchecksAffectedText(finding: BatchchecksFinding, answer: BatchchecksAnswer, t: BatchchecksTranslate): string;
|
|
42
|
+
export interface BatchchecksFindingRow {
|
|
43
|
+
id: string;
|
|
44
|
+
rule: string;
|
|
45
|
+
level: string;
|
|
46
|
+
tone: BatchchecksTone;
|
|
47
|
+
message: string;
|
|
48
|
+
affected: string;
|
|
49
|
+
basis: string;
|
|
50
|
+
}
|
|
51
|
+
/** Befunde (wahlweise einer Regel) mit Begründung und betroffenen Belegen. */
|
|
52
|
+
export declare function batchchecksFindingRows(answer: BatchchecksAnswer, ruleFilter: string | null, t: BatchchecksTranslate): BatchchecksFindingRow[];
|
|
53
|
+
export declare function batchchecksSummaryText(answer: BatchchecksAnswer, t: BatchchecksTranslate): string;
|
|
54
|
+
/** Kennzahlen der Extraktionsqualität (C-12). */
|
|
55
|
+
export declare function batchchecksMetricRows(answer: BatchchecksAnswer, t: BatchchecksTranslate, locale: Locale): {
|
|
56
|
+
label: string;
|
|
57
|
+
value: string;
|
|
58
|
+
}[];
|