formica-ui-lib 1.0.319 → 1.0.320
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/dist/componentProps/organisms/sections/vendorimportsection/VendorImportSectionProps.d.ts
CHANGED
|
@@ -5,24 +5,30 @@ export type VendorImportMode = "add" | "replace";
|
|
|
5
5
|
export interface VendorImportModePayload {
|
|
6
6
|
mode: VendorImportMode;
|
|
7
7
|
}
|
|
8
|
+
export interface VendorImportModeLabels {
|
|
9
|
+
label?: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
uploadLabel?: string;
|
|
12
|
+
}
|
|
8
13
|
export interface VendorImportSectionProps {
|
|
14
|
+
/** Optional UI copy overrides. The API mode remains add or replace. */
|
|
15
|
+
modeLabels?: Partial<Record<VendorImportMode, VendorImportModeLabels>>;
|
|
9
16
|
mode: VendorImportMode;
|
|
10
17
|
/** Names the exact set of vendor listings affected, for example Europe. */
|
|
11
18
|
targetLabel: string;
|
|
12
|
-
/** Changing mode must invalidate any previous parse result in the app layer. */
|
|
13
19
|
onModeChange: (payload: VendorImportModePayload) => void;
|
|
14
20
|
scopeDescription: string;
|
|
15
21
|
importDescription: string;
|
|
16
22
|
acceptedExtensions: string[];
|
|
17
23
|
maxFileSizeBytes: number;
|
|
18
24
|
fileName?: string;
|
|
19
|
-
state: "idle" | "selected" | "processing" | "
|
|
25
|
+
state: "idle" | "selected" | "processing" | "importing" | "success" | "error";
|
|
20
26
|
message?: string;
|
|
21
27
|
errors?: string[];
|
|
22
28
|
disabled?: boolean;
|
|
23
29
|
onFileSelect: (payload: VendorImportFilePayload) => void;
|
|
24
30
|
onFileRemove: () => void;
|
|
25
|
-
|
|
31
|
+
/** Starts the complete upload/import operation with the selected mode. */
|
|
26
32
|
onImportClick: (payload: VendorImportModePayload) => void;
|
|
27
33
|
onTemplateDownloadClick?: () => void;
|
|
28
34
|
}
|