@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,195 @@
|
|
|
1
|
+
/** Typen des REST-Vertrags `docs/ui/geo-rest.md` (auditcore_geo.web). */
|
|
2
|
+
export interface LatLon {
|
|
3
|
+
lat: number;
|
|
4
|
+
lon: number;
|
|
5
|
+
}
|
|
6
|
+
/** GeoJSON-Fläche in Achsenfolge Länge, Breite (RFC 7946). */
|
|
7
|
+
export type AreaGeometry = {
|
|
8
|
+
type: 'Polygon';
|
|
9
|
+
coordinates: number[][][];
|
|
10
|
+
} | {
|
|
11
|
+
type: 'MultiPolygon';
|
|
12
|
+
coordinates: number[][][][];
|
|
13
|
+
};
|
|
14
|
+
/** Punkt auf der Karte (z. B. Vorhabenstandort); `id` ist die Kennung in Ergebnissen. */
|
|
15
|
+
export interface GeoPoint extends LatLon {
|
|
16
|
+
id: string;
|
|
17
|
+
label?: string | null;
|
|
18
|
+
}
|
|
19
|
+
/** Fläche auf der Karte (z. B. Schutzgebiet); `notes` sind Hinweise zur Geometrie. */
|
|
20
|
+
export interface GeoArea {
|
|
21
|
+
id: string;
|
|
22
|
+
label?: string | null;
|
|
23
|
+
geometry: AreaGeometry;
|
|
24
|
+
notes?: readonly string[];
|
|
25
|
+
}
|
|
26
|
+
/** Kachelquelle der Anwendung; ohne Quelle zeigt die Karte keinen Hintergrund. */
|
|
27
|
+
export interface TileSource {
|
|
28
|
+
/** URL-Vorlage mit `{z}`, `{x}`, `{y}` (optional `{s}`). */
|
|
29
|
+
url: string;
|
|
30
|
+
/** Pflichtnennung der Kachel- und Kartendaten, wird immer angezeigt. */
|
|
31
|
+
attribution: string;
|
|
32
|
+
maxZoom?: number;
|
|
33
|
+
subdomains?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface EarthModel {
|
|
36
|
+
id: string;
|
|
37
|
+
radius_m: number;
|
|
38
|
+
beschreibung: string;
|
|
39
|
+
empfohlen: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface GeoCatalogue {
|
|
42
|
+
bibliothek: string;
|
|
43
|
+
erdmodelle: readonly EarthModel[];
|
|
44
|
+
empfohlenes_erdmodell: string;
|
|
45
|
+
rand_gilt_als_innen_empfohlen: boolean;
|
|
46
|
+
ellipsoide: readonly string[];
|
|
47
|
+
vereinfachung_einheiten: readonly ('meter' | 'grad')[];
|
|
48
|
+
grenzen: {
|
|
49
|
+
max_body_bytes: number;
|
|
50
|
+
max_punkte: number;
|
|
51
|
+
max_stuetzpunkte: number;
|
|
52
|
+
max_gpkg_bytes: number;
|
|
53
|
+
max_gpkg_flaechen: number;
|
|
54
|
+
};
|
|
55
|
+
geocoder: {
|
|
56
|
+
aktiv: boolean;
|
|
57
|
+
namensnennung: string | null;
|
|
58
|
+
};
|
|
59
|
+
gpkg_quellen: readonly string[];
|
|
60
|
+
}
|
|
61
|
+
export interface RadiusRequest {
|
|
62
|
+
zentrum: LatLon;
|
|
63
|
+
punkte: readonly (LatLon & {
|
|
64
|
+
id: string;
|
|
65
|
+
})[];
|
|
66
|
+
radius_m: number;
|
|
67
|
+
erdmodell: string;
|
|
68
|
+
}
|
|
69
|
+
export interface RadiusHit {
|
|
70
|
+
index: number;
|
|
71
|
+
id: string;
|
|
72
|
+
abstand_m: number;
|
|
73
|
+
}
|
|
74
|
+
export interface RadiusResult {
|
|
75
|
+
erdmodell: string;
|
|
76
|
+
radius_m: number;
|
|
77
|
+
geprueft: number;
|
|
78
|
+
treffer: readonly RadiusHit[];
|
|
79
|
+
}
|
|
80
|
+
export type Position = 'innen' | 'aussen' | 'rand';
|
|
81
|
+
export interface LocateRequest {
|
|
82
|
+
punkt: LatLon;
|
|
83
|
+
flaeche: AreaGeometry;
|
|
84
|
+
erdmodell: string;
|
|
85
|
+
rand_gilt_als_innen: boolean;
|
|
86
|
+
rand_toleranz_m?: number;
|
|
87
|
+
}
|
|
88
|
+
export interface DegenerateRing {
|
|
89
|
+
polygon: number;
|
|
90
|
+
ring: number;
|
|
91
|
+
art: 'punkt' | 'linie';
|
|
92
|
+
rolle: 'aussen' | 'loch';
|
|
93
|
+
hinweis: string;
|
|
94
|
+
}
|
|
95
|
+
export interface LocateResult {
|
|
96
|
+
lage: Position;
|
|
97
|
+
lage_mit_toleranz: Position;
|
|
98
|
+
rand_toleranz_m: number;
|
|
99
|
+
rand_gilt_als_innen: boolean;
|
|
100
|
+
enthaelt: boolean;
|
|
101
|
+
abstand_m: number;
|
|
102
|
+
erdmodell: string;
|
|
103
|
+
entarteter_ring: DegenerateRing | null;
|
|
104
|
+
hinweise: readonly string[];
|
|
105
|
+
}
|
|
106
|
+
export interface UtmRequest {
|
|
107
|
+
punkt: LatLon;
|
|
108
|
+
ellipsoid: string;
|
|
109
|
+
zone?: number;
|
|
110
|
+
}
|
|
111
|
+
export interface UtmResult {
|
|
112
|
+
zone: number;
|
|
113
|
+
nordhalbkugel: boolean;
|
|
114
|
+
ellipsoid: string;
|
|
115
|
+
epsg: number | null;
|
|
116
|
+
mittelmeridian: number;
|
|
117
|
+
ost: number;
|
|
118
|
+
nord: number;
|
|
119
|
+
}
|
|
120
|
+
/** `POST /utm/geographisch`: Punkt aus Rechts-/Hochwert, Zone und Halbkugel. */
|
|
121
|
+
export interface UtmPointRequest {
|
|
122
|
+
ost: number;
|
|
123
|
+
nord: number;
|
|
124
|
+
zone: number;
|
|
125
|
+
nordhalbkugel: boolean;
|
|
126
|
+
ellipsoid: string;
|
|
127
|
+
}
|
|
128
|
+
export interface UtmPointResult {
|
|
129
|
+
punkt: LatLon;
|
|
130
|
+
zone: number;
|
|
131
|
+
}
|
|
132
|
+
export type SimplifyUnit = 'meter' | 'grad';
|
|
133
|
+
export interface SimplifyRequest {
|
|
134
|
+
flaeche: AreaGeometry;
|
|
135
|
+
toleranz: number;
|
|
136
|
+
einheit: SimplifyUnit;
|
|
137
|
+
stellen?: number;
|
|
138
|
+
}
|
|
139
|
+
export interface SimplifyResult {
|
|
140
|
+
geometrie: AreaGeometry | null;
|
|
141
|
+
stuetzpunkte_vorher: number;
|
|
142
|
+
stuetzpunkte_nachher: number;
|
|
143
|
+
entfallene_ringe: readonly {
|
|
144
|
+
polygon: number;
|
|
145
|
+
ring: number;
|
|
146
|
+
}[];
|
|
147
|
+
einheit: SimplifyUnit;
|
|
148
|
+
toleranz: number;
|
|
149
|
+
utm_zone: number | null;
|
|
150
|
+
}
|
|
151
|
+
export interface GeoPackageArea {
|
|
152
|
+
id: string;
|
|
153
|
+
bezeichnung: string | null;
|
|
154
|
+
geometrie: AreaGeometry;
|
|
155
|
+
hinweise: readonly string[];
|
|
156
|
+
}
|
|
157
|
+
export interface GeoPackageResult {
|
|
158
|
+
quelle?: string;
|
|
159
|
+
tabellen: readonly string[];
|
|
160
|
+
tabelle: string;
|
|
161
|
+
srs_id: number;
|
|
162
|
+
umgerechnet: boolean;
|
|
163
|
+
flaechen: readonly GeoPackageArea[];
|
|
164
|
+
fehler: readonly {
|
|
165
|
+
id: string;
|
|
166
|
+
meldung: string;
|
|
167
|
+
}[];
|
|
168
|
+
abgeschnitten: boolean;
|
|
169
|
+
}
|
|
170
|
+
export interface GeocodeHit extends LatLon {
|
|
171
|
+
rang: number;
|
|
172
|
+
anzeigename: string | null;
|
|
173
|
+
}
|
|
174
|
+
export interface GeocodeResult {
|
|
175
|
+
treffer: readonly GeocodeHit[];
|
|
176
|
+
namensnennung: string;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Schnittstelle der Komponente zur Fachlogik; Standardumsetzung:
|
|
180
|
+
* `createGeoRestPort`. Optionale Methoden fehlen, wenn die Anwendung die
|
|
181
|
+
* Funktion nicht anbietet – die Oberfläche blendet sie dann aus.
|
|
182
|
+
* `geocode` (Adresssuche) gibt es nur auf ausdrücklichen Wunsch.
|
|
183
|
+
*/
|
|
184
|
+
export interface GeoPort {
|
|
185
|
+
catalogue(): Promise<GeoCatalogue>;
|
|
186
|
+
radius(request: RadiusRequest): Promise<RadiusResult>;
|
|
187
|
+
locate(request: LocateRequest): Promise<LocateResult>;
|
|
188
|
+
utm(request: UtmRequest): Promise<UtmResult>;
|
|
189
|
+
/** Rückrechnung aus UTM; ohne sie blendet die Oberfläche die UTM-Eingabe aus. */
|
|
190
|
+
fromUtm?(request: UtmPointRequest): Promise<UtmPointResult>;
|
|
191
|
+
simplify(request: SimplifyRequest): Promise<SimplifyResult>;
|
|
192
|
+
loadGeoPackage?(file: Blob, table?: string): Promise<GeoPackageResult>;
|
|
193
|
+
loadSource?(name: string, table?: string): Promise<GeoPackageResult>;
|
|
194
|
+
geocode?(query: string): Promise<GeocodeResult>;
|
|
195
|
+
}
|
package/dist/i18n.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework-freier Kern der Sprachunterstützung: Kataloge, Platzhalter,
|
|
3
|
+
* Rückfall auf Deutsch. Vue (`useI18n` in `@auditcore/ui`) und React
|
|
4
|
+
* (`useTranslation` in `@auditcore/ui-react`) setzen darauf auf.
|
|
5
|
+
*/
|
|
6
|
+
export type Locale = 'de' | 'en';
|
|
7
|
+
export declare const LOCALES: readonly Locale[];
|
|
8
|
+
export declare const DEFAULT_LOCALE: Locale;
|
|
9
|
+
export type MessageParams = Readonly<Record<string, string | number>>;
|
|
10
|
+
/** Kataloge je Sprache; Deutsch ist vollständig, Englisch darf (noch) lückenhaft sein. */
|
|
11
|
+
export interface Catalogs<K extends string> {
|
|
12
|
+
de: Readonly<Record<K, string>>;
|
|
13
|
+
en: Readonly<Partial<Record<K, string>>>;
|
|
14
|
+
}
|
|
15
|
+
export type Translate<K extends string> = (key: K, params?: MessageParams) => string;
|
|
16
|
+
/** Typisiert Kataloge einer Komponente; die Schlüssel ergeben sich aus dem deutschen Katalog. */
|
|
17
|
+
export declare function defineMessages<K extends string>(catalogs: Catalogs<K>): Catalogs<K>;
|
|
18
|
+
/** Ersetzt {name}-Platzhalter; unbekannte Platzhalter bleiben sichtbar stehen. */
|
|
19
|
+
export declare function interpolate(template: string, params?: MessageParams): string;
|
|
20
|
+
/** Übersetzt mit Rückfall auf Deutsch und zuletzt auf den Schlüssel. */
|
|
21
|
+
export declare function translate<K extends string>(catalogs: Catalogs<K>, locale: Locale, key: K, params?: MessageParams): string;
|
|
22
|
+
/** Übersetzungsfunktion für eine feste Sprache. */
|
|
23
|
+
export declare function translator<K extends string>(catalogs: Catalogs<K>, locale: Locale): Translate<K>;
|
|
24
|
+
export declare function isLocale(value: unknown): value is Locale;
|
|
25
|
+
/** Sprache ohne Provider (Web Components, React ohne `LocaleProvider`). */
|
|
26
|
+
export declare function setDefaultLocale(locale: Locale): void;
|
|
27
|
+
export declare function getDefaultLocale(): Locale;
|
|
28
|
+
/** Meldet Änderungen der Standardsprache; liefert die Abmeldung. */
|
|
29
|
+
export declare function subscribeDefaultLocale(listener: () => void): () => void;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { RequestState, Store } from '../store';
|
|
2
|
+
import { TableImportData } from '../tabular';
|
|
3
|
+
import { IdentifierBatchMapping, IdentifierColumn, IdentifierError } from './model';
|
|
4
|
+
import { IdentifierBatchAnswer, IdentifierBatchRequest, IdentifierCatalogue, IdentifierResult, IdentifiersPort } from './types';
|
|
5
|
+
export type IdentifierBusy = 'load' | 'check' | 'batch';
|
|
6
|
+
export interface IdentifierCallbacks {
|
|
7
|
+
checked?: (result: IdentifierResult) => void;
|
|
8
|
+
batchChecked?: (answer: IdentifierBatchAnswer) => void;
|
|
9
|
+
failed?: (message: string) => void;
|
|
10
|
+
}
|
|
11
|
+
export interface IdentifierData extends RequestState<string> {
|
|
12
|
+
catalogue: IdentifierCatalogue | null;
|
|
13
|
+
profileId: string | null;
|
|
14
|
+
kind: string | null;
|
|
15
|
+
value: string;
|
|
16
|
+
country: string;
|
|
17
|
+
result: IdentifierResult | null;
|
|
18
|
+
validation: IdentifierError | null;
|
|
19
|
+
/** Kennungsart aller Tabellenzeilen; `null` = aus `kindColumn`. */
|
|
20
|
+
batchKind: string | null;
|
|
21
|
+
kindColumn: number | null;
|
|
22
|
+
countryColumn: number | null;
|
|
23
|
+
batchRequest: IdentifierBatchRequest | null;
|
|
24
|
+
batch: IdentifierBatchAnswer | null;
|
|
25
|
+
batchValidation: IdentifierError | null;
|
|
26
|
+
onlyIssues: boolean;
|
|
27
|
+
}
|
|
28
|
+
export declare const INITIAL_IDENTIFIERS: IdentifierData;
|
|
29
|
+
/** Einfache Eingabefelder, die die Oberfläche direkt setzen darf. */
|
|
30
|
+
export type IdentifierField = 'value' | 'country' | 'kindColumn' | 'countryColumn' | 'onlyIssues';
|
|
31
|
+
export interface IdentifierSource {
|
|
32
|
+
port: () => IdentifiersPort | null | undefined;
|
|
33
|
+
callbacks?: () => IdentifierCallbacks;
|
|
34
|
+
}
|
|
35
|
+
/** Zuordnung aus beiden Zuständen (Tabelle und Kennungsprüfung). */
|
|
36
|
+
export declare function identifierBatchMapping(state: IdentifierData, loaded: TableImportData): IdentifierBatchMapping;
|
|
37
|
+
export declare function createIdentifierController(source: IdentifierSource): {
|
|
38
|
+
/** Spalte zuordnen; `null` = keine (nur optionale Spalten). */
|
|
39
|
+
setColumn: (column: IdentifierColumn, index: number | null) => void;
|
|
40
|
+
setHasHeader: (hasHeader: boolean) => void;
|
|
41
|
+
readFile: (file: File) => Promise<void>;
|
|
42
|
+
store: Store<IdentifierData>;
|
|
43
|
+
/** Datei-Import (gemeinsamer TableImport-Controller aus `@auditcore/ui-core`). */
|
|
44
|
+
table: {
|
|
45
|
+
store: Store<TableImportData>;
|
|
46
|
+
load: (filename: string, text: string) => void;
|
|
47
|
+
reparse: () => void;
|
|
48
|
+
read: (file: File) => Promise<void>;
|
|
49
|
+
setHasHeader: (hasHeader: boolean) => void;
|
|
50
|
+
setValueColumn: (valueColumn: number) => void;
|
|
51
|
+
setIdColumn: (idColumn: number | null) => void;
|
|
52
|
+
setStratumColumn: (stratumColumn: number | null) => void;
|
|
53
|
+
setDecimal: (decimal: import('@auditcore/common').DecimalSeparator) => void;
|
|
54
|
+
};
|
|
55
|
+
load: () => Promise<void>;
|
|
56
|
+
check: () => Promise<void>;
|
|
57
|
+
checkBatch: () => Promise<void>;
|
|
58
|
+
setProfile: (profileId: string | null) => void;
|
|
59
|
+
setKind: (kind: string | null) => void;
|
|
60
|
+
setBatchKind: (batchKind: string | null) => void;
|
|
61
|
+
setField: <K extends IdentifierField>(key: K, value: IdentifierData[K]) => void;
|
|
62
|
+
};
|
|
63
|
+
export type IdentifierController = ReturnType<typeof createIdentifierController>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/** Texte von „Kennung prüfen“. */
|
|
2
|
+
export declare const identifierMessages: import('..').Catalogs<"loading" | "header" | "message" | "details" | "summary" | "title" | "check" | "reason" | "value" | "none" | "profile" | "kind" | "noPort" | "yes" | "no" | "colStatus" | "result" | "export" | "failed" | "choose" | "recommended" | "normalized" | "country" | "file" | "valueColumn" | "colValue" | "errortooMany" | "errorprofile" | "profileSource" | "single" | "legacy" | "countryHelp" | "statusVALID" | "statusINVALID" | "statusMISSING" | "validText" | "countryFound" | "batch" | "batchHelp" | "tableSummary" | "kindSource" | "fromColumn" | "kindColumn" | "refColumn" | "countryColumn" | "batchRun" | "colRef" | "colKind" | "colReason" | "colNormalized" | "notChecked" | "onlyInvalid" | "lineRef" | "errorkind" | "errornoTable" | "errornoRows" | "errorkindColumn">;
|
|
3
|
+
export type IdentifierMessageKey = keyof typeof identifierMessages.de;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ParsedTable } from '@auditcore/common';
|
|
2
|
+
import { Translate } from '../i18n';
|
|
3
|
+
import { IdentifierMessageKey } from './messages';
|
|
4
|
+
import { IdentifierBatchAnswer, IdentifierBatchRequest, IdentifierBatchRow, IdentifierCheckRequest, IdentifierCatalogue, IdentifierKindInfo, IdentifierProfileInfo, IdentifierResult, IdentifierStatus } from './types';
|
|
5
|
+
export type IdentifierTranslate = Translate<IdentifierMessageKey>;
|
|
6
|
+
export type IdentifierError = 'kind' | 'profile' | 'noTable' | 'noRows' | 'tooMany' | 'kindColumn';
|
|
7
|
+
export type IdentifierValidation<R> = {
|
|
8
|
+
ok: true;
|
|
9
|
+
request: R;
|
|
10
|
+
} | {
|
|
11
|
+
ok: false;
|
|
12
|
+
error: IdentifierError;
|
|
13
|
+
};
|
|
14
|
+
export declare function findIdentifierProfile(catalogue: IdentifierCatalogue | null, id: string | null): IdentifierProfileInfo | null;
|
|
15
|
+
/** Kennungsarten, die das gewählte Profil prüft (ohne Profil: keine). */
|
|
16
|
+
export declare function identifierProfileKinds(catalogue: IdentifierCatalogue | null, profileId: string | null): IdentifierKindInfo[];
|
|
17
|
+
/** Anzeige eines Profils in der Auswahl: Empfehlung und Altverhalten sichtbar. */
|
|
18
|
+
export declare function identifierProfileLabel(catalogue: IdentifierCatalogue, profile: IdentifierProfileInfo, t: IdentifierTranslate): string;
|
|
19
|
+
export declare function kindNeedsCountry(catalogue: IdentifierCatalogue | null, kind: string | null): boolean;
|
|
20
|
+
export interface IdentifierCheckInput {
|
|
21
|
+
catalogue: IdentifierCatalogue;
|
|
22
|
+
profile: string | null;
|
|
23
|
+
kind: string | null;
|
|
24
|
+
value: string;
|
|
25
|
+
country: string;
|
|
26
|
+
}
|
|
27
|
+
/** Anfrage für `POST /check`; Profil und Kennungsart sind Pflicht, ein leerer Wert ergibt „fehlt“. */
|
|
28
|
+
export declare function buildIdentifierCheck(input: IdentifierCheckInput): IdentifierValidation<IdentifierCheckRequest>;
|
|
29
|
+
/** Kennungsart aus einer Tabellenzelle: Kennung oder Bezeichnung des Katalogs, sonst unverändert (Server meldet sie). */
|
|
30
|
+
export declare function resolveIdentifierKind(catalogue: IdentifierCatalogue, cell: string): string;
|
|
31
|
+
export interface IdentifierBatchMapping {
|
|
32
|
+
table: ParsedTable | null;
|
|
33
|
+
hasHeader: boolean;
|
|
34
|
+
valueColumn: number;
|
|
35
|
+
refColumn: number | null;
|
|
36
|
+
/** Kennungsart für alle Zeilen; `null` = aus `kindColumn`. */
|
|
37
|
+
kind: string | null;
|
|
38
|
+
kindColumn: number | null;
|
|
39
|
+
countryColumn: number | null;
|
|
40
|
+
}
|
|
41
|
+
/** Anfrage für `POST /check/batch` aus der geladenen Tabelle und der Spaltenzuordnung. */
|
|
42
|
+
export declare function buildIdentifierBatch(catalogue: IdentifierCatalogue, profile: string | null, mapping: IdentifierBatchMapping): IdentifierValidation<IdentifierBatchRequest>;
|
|
43
|
+
export declare function identifierErrorKey(error: IdentifierError): IdentifierMessageKey;
|
|
44
|
+
export type IdentifierTone = 'success' | 'danger' | 'warning' | 'neutral';
|
|
45
|
+
export declare function identifierStatusTone(status: IdentifierStatus | null): IdentifierTone;
|
|
46
|
+
export declare function identifierStatusText(status: IdentifierStatus | null, t: IdentifierTranslate): string;
|
|
47
|
+
/** Begründung eines Ergebnisses: Meldung der Bibliothek, bei „gültig“ der Satz zum Profil. */
|
|
48
|
+
export declare function identifierReasonText(result: IdentifierResult, profileTitle: string, t: IdentifierTranslate): string;
|
|
49
|
+
/** Einzelheiten (`details`) mit deutschen Bezeichnungen aus dem Katalog. */
|
|
50
|
+
export declare function identifierFacts(catalogue: IdentifierCatalogue, result: IdentifierResult, t: IdentifierTranslate): {
|
|
51
|
+
key: string;
|
|
52
|
+
label: string;
|
|
53
|
+
value: string;
|
|
54
|
+
}[];
|
|
55
|
+
/** Status einer Stapelzeile; `null` = nicht prüfbar. */
|
|
56
|
+
export declare function identifierRowStatus(row: IdentifierBatchRow): IdentifierStatus | null;
|
|
57
|
+
/** Begründung einer Stapelzeile; gültige Zeilen nur mit eigener Meldung der Bibliothek (Tabelle bleibt knapp). */
|
|
58
|
+
export declare function identifierRowReason(row: IdentifierBatchRow): string;
|
|
59
|
+
export declare function identifierRowKind(catalogue: IdentifierCatalogue, row: IdentifierBatchRow, request: IdentifierBatchRequest | null): string;
|
|
60
|
+
export declare function identifierRowValue(row: IdentifierBatchRow, request: IdentifierBatchRequest | null): string;
|
|
61
|
+
/** Zeilen der Ergebnistabelle; wahlweise nur ungültige, fehlende und nicht prüfbare. */
|
|
62
|
+
export declare function visibleIdentifierRows(answer: IdentifierBatchAnswer, onlyIssues: boolean): readonly IdentifierBatchRow[];
|
|
63
|
+
export declare function identifierBatchSummary(answer: IdentifierBatchAnswer, t: IdentifierTranslate): string;
|
|
64
|
+
/** Anzeigezeile der Stapelprüfung (Tabelle und CSV). */
|
|
65
|
+
export interface IdentifierBatchLine {
|
|
66
|
+
key: number;
|
|
67
|
+
ref: string;
|
|
68
|
+
kind: string;
|
|
69
|
+
value: string;
|
|
70
|
+
status: string;
|
|
71
|
+
tone: IdentifierTone;
|
|
72
|
+
reason: string;
|
|
73
|
+
normalized: string;
|
|
74
|
+
}
|
|
75
|
+
export declare function identifierBatchLines(catalogue: IdentifierCatalogue, answer: IdentifierBatchAnswer, request: IdentifierBatchRequest | null, onlyIssues: boolean, t: IdentifierTranslate): IdentifierBatchLine[];
|
|
76
|
+
/** CSV (Excel-DE) der Stapelprüfung mit denselben Spalten wie die Tabelle (alle Zeilen). */
|
|
77
|
+
export declare function identifierBatchCsv(catalogue: IdentifierCatalogue, answer: IdentifierBatchAnswer, request: IdentifierBatchRequest | null, t: IdentifierTranslate): string;
|
|
78
|
+
export type IdentifierColumn = 'value' | 'kind' | 'ref' | 'country';
|
|
79
|
+
export interface IdentifierColumnField {
|
|
80
|
+
id: IdentifierColumn;
|
|
81
|
+
label: IdentifierMessageKey;
|
|
82
|
+
value: number | null;
|
|
83
|
+
/** Text der leeren Auswahl: „keine“ bei optionalen Spalten, „Bitte wählen“ bei der Spalte mit Kennungsart. */
|
|
84
|
+
placeholder: IdentifierMessageKey | null;
|
|
85
|
+
}
|
|
86
|
+
/** Spaltenauswahl der Stapelprüfung; die Spalte mit Kennungsart nur ohne feste Art. */
|
|
87
|
+
export declare function identifierColumnFields(mapping: IdentifierBatchMapping): IdentifierColumnField[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RestOptions } from '@auditcore/common';
|
|
2
|
+
import { IdentifiersPort } from './types';
|
|
3
|
+
/** Port auf den REST-Vertrag `identifiers_ui/1` von `auditcore_identifiers.web` (Starlette oder FastAPI). */
|
|
4
|
+
export declare function createIdentifiersRestPort(options: RestOptions): IdentifiersPort;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/** Typen des REST-Vertrags `identifiers_ui/1` (`docs/ui/identifiers-rest.md`, auditcore_identifiers.web). */
|
|
2
|
+
export type IdentifierStatus = 'VALID' | 'INVALID' | 'MISSING';
|
|
3
|
+
export interface IdentifierKindInfo {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
description: string;
|
|
7
|
+
/** Land als Zusatzangabe sinnvoll (USt-IdNr. ohne Präfix). */
|
|
8
|
+
country: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface IdentifierProfileInfo {
|
|
11
|
+
id: string;
|
|
12
|
+
title: string;
|
|
13
|
+
rationale: string;
|
|
14
|
+
origin: string;
|
|
15
|
+
legacy: boolean;
|
|
16
|
+
/** Kennungsarten, die das Profil prüft. */
|
|
17
|
+
kinds: readonly string[];
|
|
18
|
+
}
|
|
19
|
+
export interface IdentifierCatalogue {
|
|
20
|
+
contract: string;
|
|
21
|
+
library: string;
|
|
22
|
+
recommended_profile: string;
|
|
23
|
+
kinds: readonly IdentifierKindInfo[];
|
|
24
|
+
profiles: readonly IdentifierProfileInfo[];
|
|
25
|
+
reasons: readonly {
|
|
26
|
+
id: string;
|
|
27
|
+
label: string;
|
|
28
|
+
}[];
|
|
29
|
+
detail_labels: Readonly<Record<string, string>>;
|
|
30
|
+
value_labels: Readonly<Record<string, string>>;
|
|
31
|
+
limits: {
|
|
32
|
+
max_items: number;
|
|
33
|
+
max_value_length: number;
|
|
34
|
+
max_body_bytes: number;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export type IdentifierDetailValue = string | number | boolean | null;
|
|
38
|
+
export interface IdentifierResult {
|
|
39
|
+
kind: string;
|
|
40
|
+
kind_label: string;
|
|
41
|
+
status: IdentifierStatus;
|
|
42
|
+
raw: string | null;
|
|
43
|
+
normalized: string | null;
|
|
44
|
+
reason: string | null;
|
|
45
|
+
reason_label: string | null;
|
|
46
|
+
message: string;
|
|
47
|
+
country: string | null;
|
|
48
|
+
profile: string;
|
|
49
|
+
details: Readonly<Record<string, IdentifierDetailValue>>;
|
|
50
|
+
}
|
|
51
|
+
export interface IdentifierCheckRequest {
|
|
52
|
+
kind: string;
|
|
53
|
+
value: string | null;
|
|
54
|
+
profile: string;
|
|
55
|
+
country?: string | null;
|
|
56
|
+
}
|
|
57
|
+
export interface IdentifierCheckAnswer {
|
|
58
|
+
contract: string;
|
|
59
|
+
result: IdentifierResult;
|
|
60
|
+
}
|
|
61
|
+
export interface IdentifierBatchItem {
|
|
62
|
+
ref?: string;
|
|
63
|
+
kind: string;
|
|
64
|
+
value: string | null;
|
|
65
|
+
country?: string | null;
|
|
66
|
+
}
|
|
67
|
+
export interface IdentifierBatchRequest {
|
|
68
|
+
profile: string;
|
|
69
|
+
items: readonly IdentifierBatchItem[];
|
|
70
|
+
}
|
|
71
|
+
/** Zeile der Stapelprüfung: Ergebnisfelder oder `error` (Art unbekannt bzw. vom Profil nicht geprüft). */
|
|
72
|
+
export type IdentifierBatchRow = {
|
|
73
|
+
index: number;
|
|
74
|
+
ref: string;
|
|
75
|
+
} & (({
|
|
76
|
+
error: null;
|
|
77
|
+
} & IdentifierResult) | {
|
|
78
|
+
error: {
|
|
79
|
+
code: string;
|
|
80
|
+
message: string;
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
export interface IdentifierBatchSummary {
|
|
84
|
+
total: number;
|
|
85
|
+
valid: number;
|
|
86
|
+
invalid: number;
|
|
87
|
+
missing: number;
|
|
88
|
+
not_checked: number;
|
|
89
|
+
}
|
|
90
|
+
export interface IdentifierBatchAnswer {
|
|
91
|
+
contract: string;
|
|
92
|
+
profile: string;
|
|
93
|
+
results: readonly IdentifierBatchRow[];
|
|
94
|
+
summary: IdentifierBatchSummary;
|
|
95
|
+
}
|
|
96
|
+
/** Schnittstelle zur Fachlogik; Standardumsetzung `createIdentifiersRestPort`. */
|
|
97
|
+
export interface IdentifiersPort {
|
|
98
|
+
catalogue(): Promise<IdentifierCatalogue>;
|
|
99
|
+
check(request: IdentifierCheckRequest): Promise<IdentifierCheckAnswer>;
|
|
100
|
+
checkBatch(request: IdentifierBatchRequest): Promise<IdentifierBatchAnswer>;
|
|
101
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework-freier Kern von `@auditcore/ui` (Vue) und `@auditcore/ui-react`:
|
|
3
|
+
* Texte, Datentypen der REST-Verträge, View-Modelle, Zustandsautomaten,
|
|
4
|
+
* Ports und Exporte. Kein Vue, kein React.
|
|
5
|
+
*/
|
|
6
|
+
export * from './i18n';
|
|
7
|
+
export { baseMessages } from './messages';
|
|
8
|
+
export { createStore, createRunner, createDelay, IDLE, type Store, type RequestState } from './store';
|
|
9
|
+
export { downloadText, printHtml, deliverExport } from './download';
|
|
10
|
+
export { createFocusTrap, focusableWithin, wrapTarget, type FocusTrap } from './focus';
|
|
11
|
+
export * from './base';
|
|
12
|
+
export { cellText, sortIcon, rowKeyOf, cellAlignClass } from './table';
|
|
13
|
+
export * from './synopsis';
|
|
14
|
+
export * from './dataprotection';
|
|
15
|
+
export * from './geo';
|
|
16
|
+
export * from './risk';
|
|
17
|
+
export * from './screening';
|
|
18
|
+
export * from './tabular';
|
|
19
|
+
export * from './sampling';
|
|
20
|
+
export * from './benford';
|
|
21
|
+
export * from './extrapolation';
|
|
22
|
+
export * from './documents';
|
|
23
|
+
export * from './reporting';
|
|
24
|
+
export * from './identifiers';
|
|
25
|
+
export * from './extraction';
|
|
26
|
+
export * from './kanban';
|
|
27
|
+
export * from './dbkanban';
|
|
28
|
+
export * from './batchchecks';
|
|
29
|
+
export * from './samplesize';
|
|
30
|
+
export * from './attributes';
|
|
31
|
+
export * from './reporttemplates';
|
|
32
|
+
export * from './runner';
|
|
33
|
+
export * from './account';
|