@swan-io/shared-business 7.0.2 → 7.0.4
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/package.json +3 -3
- package/src/components/FileTile.d.ts +2 -1
- package/src/components/FileTile.js +14 -3
- package/src/components/FilesUploader.d.ts +9 -1
- package/src/components/FilesUploader.js +8 -4
- package/src/components/SupportingDocumentCollection.d.ts +5 -3
- package/src/components/SupportingDocumentCollection.js +22 -10
- package/src/hooks/useFilesUploader.d.ts +1 -0
- package/src/hooks/useFilesUploader.js +11 -0
- package/src/locales/de.json +3 -0
- package/src/locales/en.json +3 -0
- package/src/locales/es.json +3 -0
- package/src/locales/fi.json +3 -0
- package/src/locales/fr.json +3 -0
- package/src/locales/it.json +3 -0
- package/src/locales/nl.json +3 -0
- package/src/locales/pt.json +3 -0
- package/src/utils/i18n.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swan-io/shared-business",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.4",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=18.0.0",
|
|
6
6
|
"yarn": "^1.22.0"
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"@testing-library/react": "^14.2.1",
|
|
52
52
|
"@testing-library/user-event": "^14.5.2",
|
|
53
53
|
"@types/iban": "0.0.35",
|
|
54
|
-
"@types/react": "^18.2.
|
|
55
|
-
"@types/react-dom": "^18.2.
|
|
54
|
+
"@types/react": "^18.2.65",
|
|
55
|
+
"@types/react-dom": "^18.2.21",
|
|
56
56
|
"@types/react-native": "^0.72.8",
|
|
57
57
|
"@types/uuid": "^9.0.8",
|
|
58
58
|
"jsdom": "^24.0.0",
|
|
@@ -2,7 +2,8 @@ import { Future } from "@swan-io/boxed";
|
|
|
2
2
|
import { SwanFile } from "../utils/SwanFile";
|
|
3
3
|
type Props = {
|
|
4
4
|
file: SwanFile;
|
|
5
|
+
showId?: boolean;
|
|
5
6
|
onRemove?: () => Future<unknown>;
|
|
6
7
|
};
|
|
7
|
-
export declare const FileTile: ({ file: { statusInfo, name, url }, onRemove }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const FileTile: ({ file: { id, statusInfo, name, url }, showId, onRemove, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box } from "@swan-io/lake/src/components/Box";
|
|
3
|
+
import { Icon } from "@swan-io/lake/src/components/Icon";
|
|
3
4
|
import { LakeAlert } from "@swan-io/lake/src/components/LakeAlert";
|
|
4
5
|
import { LakeButton } from "@swan-io/lake/src/components/LakeButton";
|
|
5
6
|
import { LakeText } from "@swan-io/lake/src/components/LakeText";
|
|
7
|
+
import { LakeTooltip } from "@swan-io/lake/src/components/LakeTooltip";
|
|
8
|
+
import { Pressable } from "@swan-io/lake/src/components/Pressable";
|
|
6
9
|
import { Space } from "@swan-io/lake/src/components/Space";
|
|
7
10
|
import { Tag } from "@swan-io/lake/src/components/Tag";
|
|
8
11
|
import { commonStyles } from "@swan-io/lake/src/constants/commonStyles";
|
|
@@ -10,7 +13,7 @@ import { backgroundColor, colors, gray75, shadows, spacings, } from "@swan-io/la
|
|
|
10
13
|
import { getIconNameFromFilename } from "@swan-io/lake/src/utils/file";
|
|
11
14
|
import { isNotNullish, isNotNullishOrEmpty } from "@swan-io/lake/src/utils/nullish";
|
|
12
15
|
import { useCallback, useState } from "react";
|
|
13
|
-
import { StyleSheet, View } from "react-native";
|
|
16
|
+
import { Clipboard, StyleSheet, View } from "react-native";
|
|
14
17
|
import { P, match } from "ts-pattern";
|
|
15
18
|
import { t } from "../utils/i18n";
|
|
16
19
|
const styles = StyleSheet.create({
|
|
@@ -40,7 +43,7 @@ const styles = StyleSheet.create({
|
|
|
40
43
|
backgroundColor: colors.current[500],
|
|
41
44
|
},
|
|
42
45
|
});
|
|
43
|
-
export const FileTile = ({ file: { statusInfo, name, url }, onRemove }) => {
|
|
46
|
+
export const FileTile = ({ file: { id, statusInfo, name, url }, showId = false, onRemove, }) => {
|
|
44
47
|
const [isDeleting, setIsDeleting] = useState(false);
|
|
45
48
|
const onPressRemove = useCallback(() => {
|
|
46
49
|
if (onRemove != undefined) {
|
|
@@ -48,11 +51,19 @@ export const FileTile = ({ file: { statusInfo, name, url }, onRemove }) => {
|
|
|
48
51
|
onRemove().tap(() => setIsDeleting(false));
|
|
49
52
|
}
|
|
50
53
|
}, [onRemove]);
|
|
54
|
+
const [visibleState, setVisibleState] = useState("copy");
|
|
51
55
|
return (_jsxs(Box, { style: styles.base, children: [_jsx(Box, { alignItems: "center", direction: "row", style: styles.content, children: statusInfo.status === "Uploading" ? (_jsxs(_Fragment, { children: [_jsx(LakeText, { numberOfLines: 1, color: colors.gray[700], children: t("fileTile.uploading") }), _jsx(Space, { width: 20 }), _jsx(View, { role: "progressbar", style: styles.progressBar, children: _jsx(View, { style: [styles.progress, { width: `${statusInfo.progress * 100}%` }] }) })] })) : (_jsxs(_Fragment, { children: [_jsx(Tag, { icon: getIconNameFromFilename(name), iconSize: 20, color: match(statusInfo)
|
|
52
56
|
.with({ status: P.union("Uploaded", "Pending") }, () => "shakespear")
|
|
53
57
|
.with({ status: "Validated" }, () => "positive")
|
|
54
58
|
.with({ status: "Refused" }, () => "negative")
|
|
55
|
-
.exhaustive() }), _jsx(Space, { width: 16 }), _jsx(LakeText, { numberOfLines: 1, color: colors.gray[700], style: commonStyles.fill, children: name }),
|
|
59
|
+
.exhaustive() }), _jsx(Space, { width: 16 }), _jsxs(Box, { grow: 1, children: [_jsx(LakeText, { numberOfLines: 1, color: colors.gray[700], style: commonStyles.fill, children: name }), showId ? (_jsx(LakeTooltip, { describedBy: "copy", onHide: () => setVisibleState("copy"), togglableOnFocus: true, content: visibleState === "copy"
|
|
60
|
+
? t("copyButton.copyTooltip")
|
|
61
|
+
: t("copyButton.copiedTooltip"), children: _jsx(Pressable, { onPress: event => {
|
|
62
|
+
event.stopPropagation();
|
|
63
|
+
event.preventDefault();
|
|
64
|
+
Clipboard.setString(id);
|
|
65
|
+
setVisibleState("copied");
|
|
66
|
+
}, children: _jsxs(Box, { direction: "row", alignItems: "center", children: [_jsx(LakeText, { numberOfLines: 1, variant: "smallRegular", children: t("fileTile.id", { id }) }), _jsx(Space, { width: 4 }), _jsx(Icon, { size: 14, name: "copy-regular" })] }) }) })) : null] }), _jsx(Space, { width: 12 }), isNotNullishOrEmpty(url) && (_jsx(LakeButton, { mode: "tertiary", size: "small", icon: "open-filled", onPress: () => {
|
|
56
67
|
window.open(url, "_blank");
|
|
57
68
|
}, ariaLabel: t("common.open") })), isNotNullish(onRemove) && (_jsx(LakeButton, { mode: "tertiary", size: "small", icon: "delete-regular", color: "negative", onPress: onPressRemove, loading: isDeleting, ariaLabel: t("common.remove") }))] })) }), match(statusInfo)
|
|
58
69
|
.with({ status: "Pending" }, () => (_jsx(LakeAlert, { anchored: true, title: t("fileTile.status.Pending"), variant: "info" })))
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Future, Result } from "@swan-io/boxed";
|
|
2
2
|
import { IconName } from "@swan-io/lake/src/components/Icon";
|
|
3
|
+
import { ForwardedRef, Ref } from "react";
|
|
3
4
|
import { Config } from "../hooks/useFilesUploader";
|
|
4
5
|
import { SwanFile } from "../utils/SwanFile";
|
|
5
6
|
type Props<UploadInput, UploadOutput, GenerateUploadError, UploadFileError> = Config<UploadInput, UploadOutput, GenerateUploadError, UploadFileError> & {
|
|
@@ -11,6 +12,13 @@ type Props<UploadInput, UploadOutput, GenerateUploadError, UploadFileError> = Co
|
|
|
11
12
|
onRemoveFile?: (file: SwanFile) => Future<Result<unknown, unknown>>;
|
|
12
13
|
onChange?: (files: SwanFile[]) => void;
|
|
13
14
|
canUpload?: boolean;
|
|
15
|
+
showIds?: boolean;
|
|
14
16
|
};
|
|
15
|
-
export
|
|
17
|
+
export type FilesUploaderRef = {
|
|
18
|
+
add: (file: SwanFile) => void;
|
|
19
|
+
};
|
|
20
|
+
declare const FilesUploaderWithRef: <UploadInput, UploadOutput, GenerateUploadError, UploadFileError>({ maxSize, accept, icon, getUploadConfig, onRemoveFile, onChange, formatAndSizeDescription, canUpload, showIds, ...config }: Props<UploadInput, UploadOutput, GenerateUploadError, UploadFileError>, ref: Ref<FilesUploaderRef>) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const FilesUploader: <UploadInput, UploadOutput, GenerateUploadError, UploadFileError>(props: Props<UploadInput, UploadOutput, GenerateUploadError, UploadFileError> & {
|
|
22
|
+
ref?: ForwardedRef<FilesUploaderRef>;
|
|
23
|
+
}) => ReturnType<typeof FilesUploaderWithRef>;
|
|
16
24
|
export {};
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Box } from "@swan-io/lake/src/components/Box";
|
|
3
3
|
import { Space } from "@swan-io/lake/src/components/Space";
|
|
4
|
-
import { Fragment, useEffect, useRef } from "react";
|
|
4
|
+
import { Fragment, forwardRef, useEffect, useImperativeHandle, useRef, } from "react";
|
|
5
5
|
import { useFilesUploader } from "../hooks/useFilesUploader";
|
|
6
6
|
import { FileInput } from "./FileInput";
|
|
7
7
|
import { FileTile } from "./FileTile";
|
|
8
|
-
|
|
9
|
-
const { files, upload, remove } = useFilesUploader(config);
|
|
8
|
+
const FilesUploaderWithRef = ({ maxSize, accept, icon, getUploadConfig, onRemoveFile, onChange, formatAndSizeDescription, canUpload = true, showIds = false, ...config }, ref) => {
|
|
9
|
+
const { files, upload, remove, add } = useFilesUploader(config);
|
|
10
10
|
// Keep the `onChange` callback as a ref to avoid running the effect
|
|
11
11
|
// every time the function updates
|
|
12
12
|
const onChangeRef = useRef(onChange);
|
|
13
13
|
onChangeRef.current = onChange;
|
|
14
14
|
const isFirstRender = useRef(true);
|
|
15
|
+
useImperativeHandle(ref, () => ({
|
|
16
|
+
add,
|
|
17
|
+
}));
|
|
15
18
|
useEffect(() => {
|
|
16
19
|
// Avoid calling `onChange` on first render
|
|
17
20
|
if (isFirstRender.current) {
|
|
@@ -27,9 +30,10 @@ export const FilesUploader = ({ maxSize, accept, icon, getUploadConfig, onRemove
|
|
|
27
30
|
files.forEach(file => {
|
|
28
31
|
upload(getUploadConfig(file), file);
|
|
29
32
|
});
|
|
30
|
-
}, accept: accept, icon: icon, description: formatAndSizeDescription, maxSize: maxSize }), _jsx(Space, { height: 12 })] })) : null, files.map((file, index) => (_jsxs(Fragment, { children: [index > 0 ? _jsx(Space, { height: 12 }) : null, _jsx(FileTile, { file: file, onRemove: onRemoveFile != undefined && file.statusInfo.status === "Uploaded"
|
|
33
|
+
}, accept: accept, icon: icon, description: formatAndSizeDescription, maxSize: maxSize }), _jsx(Space, { height: 12 })] })) : null, files.map((file, index) => (_jsxs(Fragment, { children: [index > 0 ? _jsx(Space, { height: 12 }) : null, _jsx(FileTile, { file: file, showId: showIds, onRemove: onRemoveFile != undefined && file.statusInfo.status === "Uploaded"
|
|
31
34
|
? () => onRemoveFile(file).tapOk(() => {
|
|
32
35
|
remove(file.id);
|
|
33
36
|
})
|
|
34
37
|
: undefined })] }, file.id)))] }));
|
|
35
38
|
};
|
|
39
|
+
export const FilesUploader = forwardRef(FilesUploaderWithRef);
|
|
@@ -26,14 +26,16 @@ type Props<Purpose extends string> = {
|
|
|
26
26
|
onChange?: (documents: Document<Purpose>[]) => void;
|
|
27
27
|
onRemoveFile?: (file: SwanFile) => Future<Result<unknown, unknown>>;
|
|
28
28
|
templateLanguage?: string;
|
|
29
|
+
showIds?: boolean;
|
|
29
30
|
};
|
|
30
31
|
export declare const getSupportingDocumentPurposeLabel: (purpose: string) => string;
|
|
31
32
|
export declare const getSupportingDocumentPurposeDescriptionLabel: (purpose: string) => string;
|
|
32
|
-
export type SupportingDocumentCollectionRef = {
|
|
33
|
+
export type SupportingDocumentCollectionRef<Purpose extends string> = {
|
|
33
34
|
areAllRequiredDocumentsFilled: () => boolean;
|
|
35
|
+
addDocument: (document: Document<Purpose>) => void;
|
|
34
36
|
};
|
|
35
|
-
export declare const SupportingDocumentCollectionWithRef: <Purpose extends string>({ documents, generateUpload, requiredDocumentPurposes, templateLanguage, status, onRemoveFile, }: Props<Purpose>, ref: Ref<SupportingDocumentCollectionRef
|
|
37
|
+
export declare const SupportingDocumentCollectionWithRef: <Purpose extends string>({ documents, generateUpload, requiredDocumentPurposes, templateLanguage, status, onRemoveFile, showIds, }: Props<Purpose>, ref: Ref<SupportingDocumentCollectionRef<Purpose>>) => import("react/jsx-runtime").JSX.Element;
|
|
36
38
|
export declare const SupportingDocumentCollection: <I extends string>(props: Props<I> & {
|
|
37
|
-
ref?: ForwardedRef<SupportingDocumentCollectionRef
|
|
39
|
+
ref?: ForwardedRef<SupportingDocumentCollectionRef<I>>;
|
|
38
40
|
}) => ReturnType<typeof SupportingDocumentCollectionWithRef>;
|
|
39
41
|
export {};
|
|
@@ -8,7 +8,7 @@ import { LakeTooltip } from "@swan-io/lake/src/components/LakeTooltip";
|
|
|
8
8
|
import { Space } from "@swan-io/lake/src/components/Space";
|
|
9
9
|
import { isNotNullishOrEmpty } from "@swan-io/lake/src/utils/nullish";
|
|
10
10
|
import { Request, badStatusToError } from "@swan-io/request";
|
|
11
|
-
import { Fragment, forwardRef, useImperativeHandle, useMemo, useRef, useState, } from "react";
|
|
11
|
+
import { Fragment, forwardRef, useEffect, useImperativeHandle, useMemo, useRef, useState, } from "react";
|
|
12
12
|
import { StyleSheet } from "react-native";
|
|
13
13
|
import { match } from "ts-pattern";
|
|
14
14
|
import { isTranslationKey, locale, t } from "../utils/i18n";
|
|
@@ -48,15 +48,17 @@ export const getSupportingDocumentPurposeDescriptionLabel = (purpose) => {
|
|
|
48
48
|
return "";
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
-
export const SupportingDocumentCollectionWithRef = ({ documents, generateUpload, requiredDocumentPurposes, templateLanguage = locale.language, status, onRemoveFile, }, ref) => {
|
|
51
|
+
export const SupportingDocumentCollectionWithRef = ({ documents, generateUpload, requiredDocumentPurposes, templateLanguage = locale.language, status, onRemoveFile, showIds = false, }, ref) => {
|
|
52
52
|
const [showPowerOfAttorneyModal, setShowPowerOfAttorneyModal] = useState(false);
|
|
53
53
|
const [showSwornStatementModal, setShowSwornStatementModal] = useState(false);
|
|
54
|
+
const [addedDocuments, setAddedDocuments] = useState([]);
|
|
54
55
|
const orderedDocumentPurposes = useMemo(() => {
|
|
55
56
|
// Get all purposes to display: the required ones and the ones that have at least a document
|
|
56
57
|
const allPurposes = new Set(requiredDocumentPurposes);
|
|
57
|
-
|
|
58
|
+
const allDocuments = [...addedDocuments, ...documents];
|
|
59
|
+
allDocuments.forEach(document => allPurposes.add(document.purpose));
|
|
58
60
|
const documentsByPurpose = new Map([...allPurposes].map(purpose => {
|
|
59
|
-
const purposeDocuments =
|
|
61
|
+
const purposeDocuments = allDocuments.filter(document => document.purpose === purpose);
|
|
60
62
|
return [purpose, purposeDocuments];
|
|
61
63
|
}));
|
|
62
64
|
// Map purposes to their priorities (lower priority comes first)
|
|
@@ -95,14 +97,27 @@ export const SupportingDocumentCollectionWithRef = ({ documents, generateUpload,
|
|
|
95
97
|
areAllDocumentsValidated: priorityByPurpose.get(purpose) === 0,
|
|
96
98
|
};
|
|
97
99
|
});
|
|
98
|
-
}, [requiredDocumentPurposes, documents]);
|
|
100
|
+
}, [requiredDocumentPurposes, documents, addedDocuments]);
|
|
99
101
|
const filesByRequiredPurpose = useRef(new Map(Array.filterMap(orderedDocumentPurposes, ({ isRequired, purpose, files }) => isRequired ? Option.Some([purpose, files]) : Option.None())));
|
|
102
|
+
const filesUploaderRefByPurpose = useRef({});
|
|
100
103
|
useImperativeHandle(ref, () => ({
|
|
101
104
|
areAllRequiredDocumentsFilled: () => {
|
|
102
105
|
const filesByPurposes = [...filesByRequiredPurpose.current.values()];
|
|
103
106
|
return filesByPurposes.every(files => files.length > 0);
|
|
104
107
|
},
|
|
108
|
+
addDocument: document => {
|
|
109
|
+
setAddedDocuments(documents => [...documents, document]);
|
|
110
|
+
},
|
|
105
111
|
}));
|
|
112
|
+
useEffect(() => {
|
|
113
|
+
const lastAddedDocument = addedDocuments[addedDocuments.length - 1];
|
|
114
|
+
if (lastAddedDocument != null) {
|
|
115
|
+
const ref = filesUploaderRefByPurpose.current[lastAddedDocument === null || lastAddedDocument === void 0 ? void 0 : lastAddedDocument.purpose];
|
|
116
|
+
if (ref != null) {
|
|
117
|
+
ref.add(lastAddedDocument.file);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}, [addedDocuments]);
|
|
106
121
|
return (_jsxs(Form, { children: [orderedDocumentPurposes.map(({ purpose, files, areAllDocumentsValidated, isRequired }) => {
|
|
107
122
|
return (_jsxs(Fragment, { children: [_jsx(LakeLabel, { label: getSupportingDocumentPurposeLabel(purpose), help: match(purpose)
|
|
108
123
|
.with("PowerOfAttorney", () => (_jsx(Help, { type: "button", label: t("supportingDocuments.help.whatIsThis"), onPress: () => setShowPowerOfAttorneyModal(true) })))
|
|
@@ -110,10 +125,7 @@ export const SupportingDocumentCollectionWithRef = ({ documents, generateUpload,
|
|
|
110
125
|
.otherwise(() => {
|
|
111
126
|
const label = getSupportingDocumentPurposeDescriptionLabel(purpose);
|
|
112
127
|
return isNotNullishOrEmpty(label) ? _jsx(Help, { type: "tooltip", text: label }) : null;
|
|
113
|
-
}), render: () => (_jsx(FilesUploader
|
|
114
|
-
// Only allow uploading is the Supporting Document Collection awaits for docs
|
|
115
|
-
// and that the specific purpose isn't already fully validated
|
|
116
|
-
, {
|
|
128
|
+
}), render: () => (_jsx(FilesUploader, { ref: ref => (filesUploaderRefByPurpose.current[purpose] = ref),
|
|
117
129
|
// Only allow uploading is the Supporting Document Collection awaits for docs
|
|
118
130
|
// and that the specific purpose isn't already fully validated
|
|
119
131
|
canUpload: status === "WaitingForDocument" && !areAllDocumentsValidated, accept: ACCEPTED_FORMATS, maxSize: 20000000, icon: "document-regular", initialFiles: files, generateUpload: generateUpload, getUploadConfig: file => ({ fileName: file.name, purpose }), uploadFile: ({ upload, file, onLoadStart, onProgress }) => {
|
|
@@ -133,7 +145,7 @@ export const SupportingDocumentCollectionWithRef = ({ documents, generateUpload,
|
|
|
133
145
|
if (isRequired) {
|
|
134
146
|
filesByRequiredPurpose.current.set(purpose, files);
|
|
135
147
|
}
|
|
136
|
-
} })) }), _jsx(Space, { height: 24 })] }, purpose));
|
|
148
|
+
}, showIds: showIds })) }), _jsx(Space, { height: 24 })] }, purpose));
|
|
137
149
|
}), requiredDocumentPurposes.length === 0 ? (_jsxs(_Fragment, { children: [_jsx(Space, { height: 24 }), _jsx(LakeText, { children: t("supportingDocuments.noRequiredDocuments") }), _jsx(Space, { height: 24 })] })) : null, _jsxs(LakeModal, { visible: showPowerOfAttorneyModal, title: t("supportingDocuments.powerOfAttorneyModal.title"), icon: "document-regular", onPressClose: () => setShowPowerOfAttorneyModal(false), children: [_jsx(LakeText, { children: t("supportingDocuments.powerOfAttorneyModal.description") }), _jsx(Space, { height: 16 }), _jsx(LakeButtonGroup, { paddingBottom: 0, children: _jsx(LakeButton, { grow: true, color: "current", onPress: () => window.open(`/power-of-attorney-template/${match(templateLanguage)
|
|
138
150
|
.with("fr", () => "fr")
|
|
139
151
|
.with("de", () => "de")
|
|
@@ -21,4 +21,5 @@ export declare const useFilesUploader: <UploadInput, UploadOutput, GenerateUploa
|
|
|
21
21
|
files: SwanFile[];
|
|
22
22
|
upload: (uploadInput: UploadInput, file: File) => Future<Result<unknown, GenerateUploadError | UploadFileError>>;
|
|
23
23
|
remove: (id: string) => void;
|
|
24
|
+
add: (fileToAdd: SwanFile) => void;
|
|
24
25
|
};
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { useCallback, useState } from "react";
|
|
2
2
|
export const useFilesUploader = (config) => {
|
|
3
3
|
const [files, setFiles] = useState(config.initialFiles);
|
|
4
|
+
const add = useCallback((fileToAdd) => {
|
|
5
|
+
setFiles(files => {
|
|
6
|
+
if (files.some(item => item.id === fileToAdd.id)) {
|
|
7
|
+
return files.map(item => (item.id === fileToAdd.id ? fileToAdd : item));
|
|
8
|
+
}
|
|
9
|
+
else {
|
|
10
|
+
return [...files, fileToAdd];
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
}, []);
|
|
4
14
|
const upload = useCallback((uploadInput, file) => {
|
|
5
15
|
return config
|
|
6
16
|
.generateUpload(uploadInput)
|
|
@@ -63,5 +73,6 @@ export const useFilesUploader = (config) => {
|
|
|
63
73
|
files,
|
|
64
74
|
upload,
|
|
65
75
|
remove,
|
|
76
|
+
add,
|
|
66
77
|
};
|
|
67
78
|
};
|
package/src/locales/de.json
CHANGED
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
"common.showLess": "Weniger anzeigen",
|
|
38
38
|
"common.showMore": "Mehr anzeigen",
|
|
39
39
|
"common.skipToContent": "Zum Inhalt springen",
|
|
40
|
+
"copyButton.copiedTooltip": "In die Zwischenablage kopiert",
|
|
41
|
+
"copyButton.copyTooltip": "Klicken zum Kopieren",
|
|
40
42
|
"datePicker.day.friday": "Freitag",
|
|
41
43
|
"datePicker.day.monday": "Montag",
|
|
42
44
|
"datePicker.day.saturday": "Samstag",
|
|
@@ -68,6 +70,7 @@
|
|
|
68
70
|
"fileInput.dropFile": "Datei hierher ziehen, oder {browse}",
|
|
69
71
|
"fileInput.noFile": "Keine Datei",
|
|
70
72
|
"fileInput.unknownFileName": "unbekannter Dateiname",
|
|
73
|
+
"fileTile.id": "ID: {id}",
|
|
71
74
|
"fileTile.status.Pending": "Ausstehende Überprüfung",
|
|
72
75
|
"fileTile.status.Refused": "Abgelehnt",
|
|
73
76
|
"fileTile.status.Validated": "Überprüft",
|
package/src/locales/en.json
CHANGED
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
"common.showLess": "Show less",
|
|
38
38
|
"common.showMore": "Show more",
|
|
39
39
|
"common.skipToContent": "Skip to content",
|
|
40
|
+
"copyButton.copiedTooltip": "Copied to clipboard",
|
|
41
|
+
"copyButton.copyTooltip": "Click to copy",
|
|
40
42
|
"datePicker.day.friday": "Friday",
|
|
41
43
|
"datePicker.day.monday": "Monday",
|
|
42
44
|
"datePicker.day.saturday": "Saturday",
|
|
@@ -68,6 +70,7 @@
|
|
|
68
70
|
"fileInput.dropFile": "Drop your file, or {browse}",
|
|
69
71
|
"fileInput.noFile": "No file",
|
|
70
72
|
"fileInput.unknownFileName": "unknown filename",
|
|
73
|
+
"fileTile.id": "ID: {id}",
|
|
71
74
|
"fileTile.status.Pending": "Pending verification",
|
|
72
75
|
"fileTile.status.Refused": "Refused",
|
|
73
76
|
"fileTile.status.Validated": "Verified",
|
package/src/locales/es.json
CHANGED
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
"common.showLess": "Mostrar menos",
|
|
38
38
|
"common.showMore": "Mostrar más",
|
|
39
39
|
"common.skipToContent": "Saltar al contenido",
|
|
40
|
+
"copyButton.copiedTooltip": "Copiado al portapapeles",
|
|
41
|
+
"copyButton.copyTooltip": "Haz clic para copiar",
|
|
40
42
|
"datePicker.day.friday": "Viernes",
|
|
41
43
|
"datePicker.day.monday": "Lunes",
|
|
42
44
|
"datePicker.day.saturday": "Sábado",
|
|
@@ -68,6 +70,7 @@
|
|
|
68
70
|
"fileInput.dropFile": "Suelta el archivo, o {browse}",
|
|
69
71
|
"fileInput.noFile": "No hay ningún archivo",
|
|
70
72
|
"fileInput.unknownFileName": "nombre de archivo desconocido",
|
|
73
|
+
"fileTile.id": "ID: {id}",
|
|
71
74
|
"fileTile.status.Pending": "Verificación pendiente",
|
|
72
75
|
"fileTile.status.Refused": "Rechazado",
|
|
73
76
|
"fileTile.status.Validated": "Verificado",
|
package/src/locales/fi.json
CHANGED
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
"common.showLess": "Näytä vähemmän",
|
|
38
38
|
"common.showMore": "Näytä enemmän",
|
|
39
39
|
"common.skipToContent": "Ohita ja siirry sisältöön",
|
|
40
|
+
"copyButton.copiedTooltip": "Kopioitu leikepöydälle",
|
|
41
|
+
"copyButton.copyTooltip": "Napsauta kopioidaksesi",
|
|
40
42
|
"datePicker.day.friday": "Perjantai",
|
|
41
43
|
"datePicker.day.monday": "Maanantai",
|
|
42
44
|
"datePicker.day.saturday": "Lauantai",
|
|
@@ -68,6 +70,7 @@
|
|
|
68
70
|
"fileInput.dropFile": "Pudota tiedosto tai {browse}",
|
|
69
71
|
"fileInput.noFile": "Ei tiedostoa",
|
|
70
72
|
"fileInput.unknownFileName": "tuntematon tiedostonimi",
|
|
73
|
+
"fileTile.id": "ID: {id}",
|
|
71
74
|
"fileTile.status.Pending": "Odottaa vahvistusta",
|
|
72
75
|
"fileTile.status.Refused": "Hylätty",
|
|
73
76
|
"fileTile.status.Validated": "Vahvistettu",
|
package/src/locales/fr.json
CHANGED
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
"common.showLess": "Afficher moins",
|
|
38
38
|
"common.showMore": "Afficher plus",
|
|
39
39
|
"common.skipToContent": "Aller au contenu",
|
|
40
|
+
"copyButton.copiedTooltip": "Copié dans le presse-papiers",
|
|
41
|
+
"copyButton.copyTooltip": "Cliquez pour copier",
|
|
40
42
|
"datePicker.day.friday": "Vendredi",
|
|
41
43
|
"datePicker.day.monday": "Lundi",
|
|
42
44
|
"datePicker.day.saturday": "Samedi",
|
|
@@ -68,6 +70,7 @@
|
|
|
68
70
|
"fileInput.dropFile": "Télécharger votre fichier, ou {browse}",
|
|
69
71
|
"fileInput.noFile": "Aucun fichier",
|
|
70
72
|
"fileInput.unknownFileName": "nom du fichier inconnu",
|
|
73
|
+
"fileTile.id": "ID : {id}",
|
|
71
74
|
"fileTile.status.Pending": "Vérification en attente",
|
|
72
75
|
"fileTile.status.Refused": "Refusé",
|
|
73
76
|
"fileTile.status.Validated": "Vérifié",
|
package/src/locales/it.json
CHANGED
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
"common.showLess": "Mostra meno",
|
|
38
38
|
"common.showMore": "Mostra di più",
|
|
39
39
|
"common.skipToContent": "Salta al contenuto",
|
|
40
|
+
"copyButton.copiedTooltip": "Copiato negli appunti",
|
|
41
|
+
"copyButton.copyTooltip": "Clicca per copiare",
|
|
40
42
|
"datePicker.day.friday": "Venerdì",
|
|
41
43
|
"datePicker.day.monday": "Lunedì",
|
|
42
44
|
"datePicker.day.saturday": "Sabato",
|
|
@@ -68,6 +70,7 @@
|
|
|
68
70
|
"fileInput.dropFile": "Rilasci il file, o {browse}",
|
|
69
71
|
"fileInput.noFile": "Nessun file",
|
|
70
72
|
"fileInput.unknownFileName": "nome del file sconosciuto",
|
|
73
|
+
"fileTile.id": "ID: {id}",
|
|
71
74
|
"fileTile.status.Pending": "Verifica in sospeso",
|
|
72
75
|
"fileTile.status.Refused": "Rifiutato",
|
|
73
76
|
"fileTile.status.Validated": "Verificato",
|
package/src/locales/nl.json
CHANGED
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
"common.showLess": "Toon minder",
|
|
38
38
|
"common.showMore": "Toon meer",
|
|
39
39
|
"common.skipToContent": "Doorgaan naar artikel",
|
|
40
|
+
"copyButton.copiedTooltip": "Gekopieerd naar klembord",
|
|
41
|
+
"copyButton.copyTooltip": "Klik om te kopiëren",
|
|
40
42
|
"datePicker.day.friday": "Vrijdag",
|
|
41
43
|
"datePicker.day.monday": "Maandag",
|
|
42
44
|
"datePicker.day.saturday": "Zaterdag",
|
|
@@ -68,6 +70,7 @@
|
|
|
68
70
|
"fileInput.dropFile": "Sleep uw bestand hiernaartoe, of {browse}",
|
|
69
71
|
"fileInput.noFile": "Geen bestand",
|
|
70
72
|
"fileInput.unknownFileName": "onbekende bestandsnaam",
|
|
73
|
+
"fileTile.id": "ID: {id}",
|
|
71
74
|
"fileTile.status.Pending": "In afwachting van verificatie",
|
|
72
75
|
"fileTile.status.Refused": "Geweigerd",
|
|
73
76
|
"fileTile.status.Validated": "Geverifieerd",
|
package/src/locales/pt.json
CHANGED
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
"common.showLess": "Mostrar menos",
|
|
38
38
|
"common.showMore": "Mostrar mais",
|
|
39
39
|
"common.skipToContent": "Saltar para o conteúdo",
|
|
40
|
+
"copyButton.copiedTooltip": "Copiado para a área de transferência",
|
|
41
|
+
"copyButton.copyTooltip": "Clique para copiar",
|
|
40
42
|
"datePicker.day.friday": "Sexta-feira",
|
|
41
43
|
"datePicker.day.monday": "Segunda-feira",
|
|
42
44
|
"datePicker.day.saturday": "Sábado",
|
|
@@ -68,6 +70,7 @@
|
|
|
68
70
|
"fileInput.dropFile": "Arraste o seu ficheiro, ou {browse}",
|
|
69
71
|
"fileInput.noFile": "Nenhum ficheiro",
|
|
70
72
|
"fileInput.unknownFileName": "nome do ficheiro desconhecido",
|
|
73
|
+
"fileTile.id": "ID: {id}",
|
|
71
74
|
"fileTile.status.Pending": "Verificação pendente",
|
|
72
75
|
"fileTile.status.Refused": "Recusado",
|
|
73
76
|
"fileTile.status.Validated": "Verificado",
|
package/src/utils/i18n.d.ts
CHANGED
|
@@ -19,6 +19,6 @@ export declare const locale: Locale;
|
|
|
19
19
|
export declare const t: (key: TranslationKey, params?: TranslationParams) => string;
|
|
20
20
|
export declare const formatNestedMessage: (key: TranslationKey, params: Record<string, string | number | ReactElement<any, string | import("react").JSXElementConstructor<any>> | ((children: ReactNode) => ReactNode)>) => (string | ReactElement<any, string | import("react").JSXElementConstructor<any>>)[];
|
|
21
21
|
export declare const rifmDateProps: RifmProps;
|
|
22
|
-
export declare const isTranslationKey: (value: unknown) => value is "addressFormPart.addressLabel" | "addressFormPart.cityLabel" | "addressFormPart.placeholder" | "addressFormPart.postCodeLabel" | "businessActivity.administrativeServices" | "businessActivity.agriculture" | "businessActivity.arts" | "businessActivity.businessAndRetail" | "businessActivity.construction" | "businessActivity.education" | "businessActivity.electricalDistributionAndWaterSupply" | "businessActivity.financialAndInsuranceOperations" | "businessActivity.health" | "businessActivity.housekeeping" | "businessActivity.informationAndCommunication" | "businessActivity.lodgingAndFoodServices" | "businessActivity.manufacturingAndMining" | "businessActivity.other" | "businessActivity.publicAdministration" | "businessActivity.realEstate" | "businessActivity.scientificActivities" | "businessActivity.transportation" | "common.cancel" | "common.close" | "common.form.help.nbCharacters" | "common.form.help.nbDigits" | "common.form.invalidTaxIdentificationNumber" | "common.form.taxIdentificationNumber.placeholder" | "common.form.taxIdentificationNumber.tooltip.deu" | "common.next" | "common.noResult" | "common.open" | "common.optional" | "common.previous" | "common.remove" | "common.showLess" | "common.showMore" | "common.skipToContent" | "datePicker.day.friday" | "datePicker.day.monday" | "datePicker.day.saturday" | "datePicker.day.sunday" | "datePicker.day.thursday" | "datePicker.day.tuesday" | "datePicker.day.wednesday" | "datePicker.month.april" | "datePicker.month.august" | "datePicker.month.december" | "datePicker.month.february" | "datePicker.month.january" | "datePicker.month.july" | "datePicker.month.june" | "datePicker.month.march" | "datePicker.month.may" | "datePicker.month.next" | "datePicker.month.november" | "datePicker.month.october" | "datePicker.month.previous" | "datePicker.month.september" | "error.generic" | "error.iban.invalid" | "error.network.500" | "error.network.503" | "error.requiredField" | "fileInput.browse" | "fileInput.clickToModify" | "fileInput.dropFile" | "fileInput.noFile" | "fileInput.unknownFileName" | "fileTile.status.Pending" | "fileTile.status.Refused" | "fileTile.status.Validated" | "fileTile.uploading" | "monthlyPaymentVolume.between10000And50000" | "monthlyPaymentVolume.between50000And100000" | "monthlyPaymentVolume.lessThan10000" | "monthlyPaymentVolume.moreThan100000" | "registrationPage.defaultNumberLabel" | "registrationPage.withOrganismLabel" | "registrationPage.withoutOrganismNameLabel" | "rejection.AccountHolderNotFoundRejection" | "rejection.AccountHolderTypeIndividualRejection" | "rejection.AccountMembershipCannotBeDisabledRejection" | "rejection.AccountMembershipCannotBeUpdatedRejection" | "rejection.AccountMembershipNotAllowedRejection" | "rejection.AccountMembershipNotFoundRejection" | "rejection.AccountMembershipNotReadyToBeBoundRejection" | "rejection.AccountNotEligibleRejection" | "rejection.AccountNotFoundRejection" | "rejection.AccountVerificationAlreadyRejectedRejection" | "rejection.AccountVerificationWrongStatusRejection" | "rejection.AddingCardsToDifferentAccountsRejection" | "rejection.AlreadyValidPhysicalCardRejection" | "rejection.ApplePayNotAllowedForProjectRejection" | "rejection.BadAccountStatusRejection" | "rejection.BadRequestRejection" | "rejection.CannotActivatePhysicalCardRejection" | "rejection.CapitalDepositDocumentCanNotBeUploaded" | "rejection.CardCanNotBeDigitalizedRejection" | "rejection.CardNotFoundRejection" | "rejection.CardProductDisabledRejection" | "rejection.CardProductNotApplicableToPhysicalCardsRejection" | "rejection.CardProductNotFoundRejection" | "rejection.CardProductSuspendedRejection" | "rejection.CardProductUsedRejection" | "rejection.CardWrongStatusRejection" | "rejection.ConsentNotFoundRejection" | "rejection.ConsentsAlreadyLinkedToMultiConsentRejection" | "rejection.ConsentsNotAllInCreatedStatusRejection" | "rejection.ConsentsNotFoundRejection" | "rejection.ConsentTypeNotSupportedByServerConsentRejection" | "rejection.DebtorAccountClosedRejection" | "rejection.DebtorAccountNotAllowedRejection" | "rejection.DigitalCardNotFoundRejection" | "rejection.EnabledCardDesignNotFoundRejection" | "rejection.ExternalAccountAlreadyExistsRejection" | "rejection.ExternalAccountBalanceAlreadyExistsRejection" | "rejection.ForbiddenRejection" | "rejection.FundingLimitExceededRejection" | "rejection.FundingLimitSettingsChangeRequestBadAmountRejection" | "rejection.FundingSourceNotFoundRejection" | "rejection.FundingSourceWrongStatusRejection" | "rejection.GlobalFundingLimitExceededRejection" | "rejection.GlobalInstantFundingLimitExceededRejection" | "rejection.IBANNotReachableRejection" | "rejection.IBANNotValidRejection" | "rejection.IbanValidationRejection" | "rejection.IdentityAlreadyBindToAccountMembershipRejection" | "rejection.InstantFundingLimitExceededRejection" | "rejection.InsufficientFundsRejection" | "rejection.InternalErrorRejection" | "rejection.InvalidArgumentRejection" | "rejection.InvalidPhoneNumberRejection" | "rejection.InvalidSirenNumberRejection" | "rejection.LegalRepresentativeAccountMembershipCannotBeDisabledRejection" | "rejection.LegalRepresentativeAccountMembershipCannotBeSuspendedRejection" | "rejection.MerchantProfileWrongStatusRejection" | "rejection.MissingMandatoryFieldRejection" | "rejection.NotFoundRejection" | "rejection.NotReachableConsentStatusRejection" | "rejection.NotSupportedCountryRejection" | "rejection.OnboardingNotCompletedRejection" | "rejection.PaymentMandateMandateNotFoundRejection" | "rejection.PaymentMandateReferenceAlreadyUsedRejection" | "rejection.PaymentMethodNotCompatibleRejection" | "rejection.PermissionCannotBeGrantedRejection" | "rejection.PhysicalCardNotFoundRejection" | "rejection.PhysicalCardWrongStatusRejection" | "rejection.PINNotReadyRejection" | "rejection.ProjectForbiddenRejection" | "rejection.ProjectFundingLimitExceededRejection" | "rejection.ProjectInstantFundingLimitExceededRejection" | "rejection.ProjectInvalidStatusRejection" | "rejection.ProjectNotFound" | "rejection.ProjectNotFoundRejection" | "rejection.ProjectSettingsForbiddenError" | "rejection.ProjectSettingsNotFound" | "rejection.ProjectSettingsStatusNotReachable" | "rejection.PublicOnboardingDisabledRejection" | "rejection.ReceivedDirectDebitMandateAlreadyExistRejection" | "rejection.ReceivedDirectDebitMandateCanceledRejection" | "rejection.ReceivedDirectDebitMandateNotB2bRejection" | "rejection.ReceivedDirectDebitMandateNotFoundRejection" | "rejection.RefundRejection" | "rejection.RestrictedToUserRejection" | "rejection.SchemeWrongRejection" | "rejection.ServerConsentCredentialsNotValidOrOutdatedRejection" | "rejection.ServerConsentNotAllowedForConsentOperationRejection" | "rejection.ServerConsentNotAllowedForProjectRejection" | "rejection.ServerConsentProjectCredentialMissingRejection" | "rejection.ServerConsentProjectCredentialNotFoundRejection" | "rejection.ServerConsentProjectSettingsNotFoundRejection" | "rejection.ServerConsentSignatureNotValidRejection" | "rejection.StandingOrderNotFoundRejection" | "rejection.SupportingDocumentCollectionNotFoundRejection" | "rejection.SupportingDocumentCollectionStatusDoesNotAllowDeletionRejection" | "rejection.SupportingDocumentCollectionStatusDoesNotAllowUpdateRejection" | "rejection.SupportingDocumentCollectionStatusNotAllowedRejection" | "rejection.SupportingDocumentNotFoundRejection" | "rejection.SupportingDocumentStatusDoesNotAllowDeletionRejection" | "rejection.SupportingDocumentStatusDoesNotAllowUpdateRejection" | "rejection.SupportingDocumentStatusNotAllowedRejection" | "rejection.SupportingDocumentUploadNotAllowedRejection" | "rejection.SuspendReceivedDirectDebitMandatedRejection" | "rejection.TooManyChildConsentsRejection" | "rejection.TooManyItemsRejection" | "rejection.TransactionNotFoundRejection" | "rejection.UpdateUserConsentSettingsTokenRejection" | "rejection.UserNotAllowedToDisableItsOwnAccountMembershipRejection" | "rejection.UserNotAllowedToManageAccountMembershipRejection" | "rejection.UserNotAllowedToSuspendItsOwnAccountMembershipRejection" | "rejection.UserNotCardHolderRejection" | "rejection.ValidationRejection" | "rejection.WrongValueProvidedRejection" | "rib.accountHolder" | "rib.accountNumber" | "rib.address" | "rib.agency" | "rib.bank" | "rib.bankDetails" | "rib.bic" | "rib.iban" | "rib.key" | "rib.nationalCode" | "rib.number" | "rib.partnership" | "supportingDocuments.documentTypes" | "supportingDocuments.downloadTemplate" | "supportingDocuments.errorUpload" | "supportingDocuments.help.whatIsThis" | "supportingDocuments.noRequiredDocuments" | "supportingDocuments.powerOfAttorneyModal.description" | "supportingDocuments.powerOfAttorneyModal.title" | "supportingDocuments.purpose.AdministratorDecisionOfAppointment.description" | "supportingDocuments.purpose.AdministratorDecisionOfAppointment" | "supportingDocuments.purpose.AssociationRegistration.description" | "supportingDocuments.purpose.AssociationRegistration" | "supportingDocuments.purpose.Banking.description" | "supportingDocuments.purpose.Banking" | "supportingDocuments.purpose.CompanyRegistration.description" | "supportingDocuments.purpose.CompanyRegistration" | "supportingDocuments.purpose.FinancialStatements.description" | "supportingDocuments.purpose.FinancialStatements" | "supportingDocuments.purpose.GeneralAssemblyMinutes.description" | "supportingDocuments.purpose.GeneralAssemblyMinutes" | "supportingDocuments.purpose.LegalRepresentativeProofOfIdentity.description" | "supportingDocuments.purpose.LegalRepresentativeProofOfIdentity" | "supportingDocuments.purpose.NIFAccreditationCard.description" | "supportingDocuments.purpose.NIFAccreditationCard" | "supportingDocuments.purpose.Other.description" | "supportingDocuments.purpose.Other" | "supportingDocuments.purpose.PowerOfAttorney.description" | "supportingDocuments.purpose.PowerOfAttorney" | "supportingDocuments.purpose.PresidentDecisionOfAppointment.description" | "supportingDocuments.purpose.PresidentDecisionOfAppointment" | "supportingDocuments.purpose.ProofOfCompanyAddress.description" | "supportingDocuments.purpose.ProofOfCompanyAddress" | "supportingDocuments.purpose.ProofOfCompanyIncome.description" | "supportingDocuments.purpose.ProofOfCompanyIncome" | "supportingDocuments.purpose.ProofOfIdentity.description" | "supportingDocuments.purpose.ProofOfIdentity" | "supportingDocuments.purpose.ProofOfIndividualAddress.description" | "supportingDocuments.purpose.ProofOfIndividualAddress" | "supportingDocuments.purpose.ProofOfIndividualIncome.description" | "supportingDocuments.purpose.ProofOfIndividualIncome" | "supportingDocuments.purpose.ProofOfOriginOfFunds.description" | "supportingDocuments.purpose.ProofOfOriginOfFunds" | "supportingDocuments.purpose.SignedStatus.description" | "supportingDocuments.purpose.SignedStatus" | "supportingDocuments.purpose.SwornStatement.description" | "supportingDocuments.purpose.SwornStatement" | "supportingDocuments.purpose.UBODeclaration.description" | "supportingDocuments.purpose.UBODeclaration" | "supportingDocuments.purpose.UltimateBeneficialOwnerProofOfAddress.description" | "supportingDocuments.purpose.UltimateBeneficialOwnerProofOfAddress" | "supportingDocuments.purpose.UltimateBeneficialOwnerProofOfIdentity.description" | "supportingDocuments.purpose.UltimateBeneficialOwnerProofOfIdentity" | "taxIdentificationNumber.label";
|
|
22
|
+
export declare const isTranslationKey: (value: unknown) => value is "addressFormPart.addressLabel" | "addressFormPart.cityLabel" | "addressFormPart.placeholder" | "addressFormPart.postCodeLabel" | "businessActivity.administrativeServices" | "businessActivity.agriculture" | "businessActivity.arts" | "businessActivity.businessAndRetail" | "businessActivity.construction" | "businessActivity.education" | "businessActivity.electricalDistributionAndWaterSupply" | "businessActivity.financialAndInsuranceOperations" | "businessActivity.health" | "businessActivity.housekeeping" | "businessActivity.informationAndCommunication" | "businessActivity.lodgingAndFoodServices" | "businessActivity.manufacturingAndMining" | "businessActivity.other" | "businessActivity.publicAdministration" | "businessActivity.realEstate" | "businessActivity.scientificActivities" | "businessActivity.transportation" | "common.cancel" | "common.close" | "common.form.help.nbCharacters" | "common.form.help.nbDigits" | "common.form.invalidTaxIdentificationNumber" | "common.form.taxIdentificationNumber.placeholder" | "common.form.taxIdentificationNumber.tooltip.deu" | "common.next" | "common.noResult" | "common.open" | "common.optional" | "common.previous" | "common.remove" | "common.showLess" | "common.showMore" | "common.skipToContent" | "copyButton.copiedTooltip" | "copyButton.copyTooltip" | "datePicker.day.friday" | "datePicker.day.monday" | "datePicker.day.saturday" | "datePicker.day.sunday" | "datePicker.day.thursday" | "datePicker.day.tuesday" | "datePicker.day.wednesday" | "datePicker.month.april" | "datePicker.month.august" | "datePicker.month.december" | "datePicker.month.february" | "datePicker.month.january" | "datePicker.month.july" | "datePicker.month.june" | "datePicker.month.march" | "datePicker.month.may" | "datePicker.month.next" | "datePicker.month.november" | "datePicker.month.october" | "datePicker.month.previous" | "datePicker.month.september" | "error.generic" | "error.iban.invalid" | "error.network.500" | "error.network.503" | "error.requiredField" | "fileInput.browse" | "fileInput.clickToModify" | "fileInput.dropFile" | "fileInput.noFile" | "fileInput.unknownFileName" | "fileTile.id" | "fileTile.status.Pending" | "fileTile.status.Refused" | "fileTile.status.Validated" | "fileTile.uploading" | "monthlyPaymentVolume.between10000And50000" | "monthlyPaymentVolume.between50000And100000" | "monthlyPaymentVolume.lessThan10000" | "monthlyPaymentVolume.moreThan100000" | "registrationPage.defaultNumberLabel" | "registrationPage.withOrganismLabel" | "registrationPage.withoutOrganismNameLabel" | "rejection.AccountHolderNotFoundRejection" | "rejection.AccountHolderTypeIndividualRejection" | "rejection.AccountMembershipCannotBeDisabledRejection" | "rejection.AccountMembershipCannotBeUpdatedRejection" | "rejection.AccountMembershipNotAllowedRejection" | "rejection.AccountMembershipNotFoundRejection" | "rejection.AccountMembershipNotReadyToBeBoundRejection" | "rejection.AccountNotEligibleRejection" | "rejection.AccountNotFoundRejection" | "rejection.AccountVerificationAlreadyRejectedRejection" | "rejection.AccountVerificationWrongStatusRejection" | "rejection.AddingCardsToDifferentAccountsRejection" | "rejection.AlreadyValidPhysicalCardRejection" | "rejection.ApplePayNotAllowedForProjectRejection" | "rejection.BadAccountStatusRejection" | "rejection.BadRequestRejection" | "rejection.CannotActivatePhysicalCardRejection" | "rejection.CapitalDepositDocumentCanNotBeUploaded" | "rejection.CardCanNotBeDigitalizedRejection" | "rejection.CardNotFoundRejection" | "rejection.CardProductDisabledRejection" | "rejection.CardProductNotApplicableToPhysicalCardsRejection" | "rejection.CardProductNotFoundRejection" | "rejection.CardProductSuspendedRejection" | "rejection.CardProductUsedRejection" | "rejection.CardWrongStatusRejection" | "rejection.ConsentNotFoundRejection" | "rejection.ConsentsAlreadyLinkedToMultiConsentRejection" | "rejection.ConsentsNotAllInCreatedStatusRejection" | "rejection.ConsentsNotFoundRejection" | "rejection.ConsentTypeNotSupportedByServerConsentRejection" | "rejection.DebtorAccountClosedRejection" | "rejection.DebtorAccountNotAllowedRejection" | "rejection.DigitalCardNotFoundRejection" | "rejection.EnabledCardDesignNotFoundRejection" | "rejection.ExternalAccountAlreadyExistsRejection" | "rejection.ExternalAccountBalanceAlreadyExistsRejection" | "rejection.ForbiddenRejection" | "rejection.FundingLimitExceededRejection" | "rejection.FundingLimitSettingsChangeRequestBadAmountRejection" | "rejection.FundingSourceNotFoundRejection" | "rejection.FundingSourceWrongStatusRejection" | "rejection.GlobalFundingLimitExceededRejection" | "rejection.GlobalInstantFundingLimitExceededRejection" | "rejection.IBANNotReachableRejection" | "rejection.IBANNotValidRejection" | "rejection.IbanValidationRejection" | "rejection.IdentityAlreadyBindToAccountMembershipRejection" | "rejection.InstantFundingLimitExceededRejection" | "rejection.InsufficientFundsRejection" | "rejection.InternalErrorRejection" | "rejection.InvalidArgumentRejection" | "rejection.InvalidPhoneNumberRejection" | "rejection.InvalidSirenNumberRejection" | "rejection.LegalRepresentativeAccountMembershipCannotBeDisabledRejection" | "rejection.LegalRepresentativeAccountMembershipCannotBeSuspendedRejection" | "rejection.MerchantProfileWrongStatusRejection" | "rejection.MissingMandatoryFieldRejection" | "rejection.NotFoundRejection" | "rejection.NotReachableConsentStatusRejection" | "rejection.NotSupportedCountryRejection" | "rejection.OnboardingNotCompletedRejection" | "rejection.PaymentMandateMandateNotFoundRejection" | "rejection.PaymentMandateReferenceAlreadyUsedRejection" | "rejection.PaymentMethodNotCompatibleRejection" | "rejection.PermissionCannotBeGrantedRejection" | "rejection.PhysicalCardNotFoundRejection" | "rejection.PhysicalCardWrongStatusRejection" | "rejection.PINNotReadyRejection" | "rejection.ProjectForbiddenRejection" | "rejection.ProjectFundingLimitExceededRejection" | "rejection.ProjectInstantFundingLimitExceededRejection" | "rejection.ProjectInvalidStatusRejection" | "rejection.ProjectNotFound" | "rejection.ProjectNotFoundRejection" | "rejection.ProjectSettingsForbiddenError" | "rejection.ProjectSettingsNotFound" | "rejection.ProjectSettingsStatusNotReachable" | "rejection.PublicOnboardingDisabledRejection" | "rejection.ReceivedDirectDebitMandateAlreadyExistRejection" | "rejection.ReceivedDirectDebitMandateCanceledRejection" | "rejection.ReceivedDirectDebitMandateNotB2bRejection" | "rejection.ReceivedDirectDebitMandateNotFoundRejection" | "rejection.RefundRejection" | "rejection.RestrictedToUserRejection" | "rejection.SchemeWrongRejection" | "rejection.ServerConsentCredentialsNotValidOrOutdatedRejection" | "rejection.ServerConsentNotAllowedForConsentOperationRejection" | "rejection.ServerConsentNotAllowedForProjectRejection" | "rejection.ServerConsentProjectCredentialMissingRejection" | "rejection.ServerConsentProjectCredentialNotFoundRejection" | "rejection.ServerConsentProjectSettingsNotFoundRejection" | "rejection.ServerConsentSignatureNotValidRejection" | "rejection.StandingOrderNotFoundRejection" | "rejection.SupportingDocumentCollectionNotFoundRejection" | "rejection.SupportingDocumentCollectionStatusDoesNotAllowDeletionRejection" | "rejection.SupportingDocumentCollectionStatusDoesNotAllowUpdateRejection" | "rejection.SupportingDocumentCollectionStatusNotAllowedRejection" | "rejection.SupportingDocumentNotFoundRejection" | "rejection.SupportingDocumentStatusDoesNotAllowDeletionRejection" | "rejection.SupportingDocumentStatusDoesNotAllowUpdateRejection" | "rejection.SupportingDocumentStatusNotAllowedRejection" | "rejection.SupportingDocumentUploadNotAllowedRejection" | "rejection.SuspendReceivedDirectDebitMandatedRejection" | "rejection.TooManyChildConsentsRejection" | "rejection.TooManyItemsRejection" | "rejection.TransactionNotFoundRejection" | "rejection.UpdateUserConsentSettingsTokenRejection" | "rejection.UserNotAllowedToDisableItsOwnAccountMembershipRejection" | "rejection.UserNotAllowedToManageAccountMembershipRejection" | "rejection.UserNotAllowedToSuspendItsOwnAccountMembershipRejection" | "rejection.UserNotCardHolderRejection" | "rejection.ValidationRejection" | "rejection.WrongValueProvidedRejection" | "rib.accountHolder" | "rib.accountNumber" | "rib.address" | "rib.agency" | "rib.bank" | "rib.bankDetails" | "rib.bic" | "rib.iban" | "rib.key" | "rib.nationalCode" | "rib.number" | "rib.partnership" | "supportingDocuments.documentTypes" | "supportingDocuments.downloadTemplate" | "supportingDocuments.errorUpload" | "supportingDocuments.help.whatIsThis" | "supportingDocuments.noRequiredDocuments" | "supportingDocuments.powerOfAttorneyModal.description" | "supportingDocuments.powerOfAttorneyModal.title" | "supportingDocuments.purpose.AdministratorDecisionOfAppointment.description" | "supportingDocuments.purpose.AdministratorDecisionOfAppointment" | "supportingDocuments.purpose.AssociationRegistration.description" | "supportingDocuments.purpose.AssociationRegistration" | "supportingDocuments.purpose.Banking.description" | "supportingDocuments.purpose.Banking" | "supportingDocuments.purpose.CompanyRegistration.description" | "supportingDocuments.purpose.CompanyRegistration" | "supportingDocuments.purpose.FinancialStatements.description" | "supportingDocuments.purpose.FinancialStatements" | "supportingDocuments.purpose.GeneralAssemblyMinutes.description" | "supportingDocuments.purpose.GeneralAssemblyMinutes" | "supportingDocuments.purpose.LegalRepresentativeProofOfIdentity.description" | "supportingDocuments.purpose.LegalRepresentativeProofOfIdentity" | "supportingDocuments.purpose.NIFAccreditationCard.description" | "supportingDocuments.purpose.NIFAccreditationCard" | "supportingDocuments.purpose.Other.description" | "supportingDocuments.purpose.Other" | "supportingDocuments.purpose.PowerOfAttorney.description" | "supportingDocuments.purpose.PowerOfAttorney" | "supportingDocuments.purpose.PresidentDecisionOfAppointment.description" | "supportingDocuments.purpose.PresidentDecisionOfAppointment" | "supportingDocuments.purpose.ProofOfCompanyAddress.description" | "supportingDocuments.purpose.ProofOfCompanyAddress" | "supportingDocuments.purpose.ProofOfCompanyIncome.description" | "supportingDocuments.purpose.ProofOfCompanyIncome" | "supportingDocuments.purpose.ProofOfIdentity.description" | "supportingDocuments.purpose.ProofOfIdentity" | "supportingDocuments.purpose.ProofOfIndividualAddress.description" | "supportingDocuments.purpose.ProofOfIndividualAddress" | "supportingDocuments.purpose.ProofOfIndividualIncome.description" | "supportingDocuments.purpose.ProofOfIndividualIncome" | "supportingDocuments.purpose.ProofOfOriginOfFunds.description" | "supportingDocuments.purpose.ProofOfOriginOfFunds" | "supportingDocuments.purpose.SignedStatus.description" | "supportingDocuments.purpose.SignedStatus" | "supportingDocuments.purpose.SwornStatement.description" | "supportingDocuments.purpose.SwornStatement" | "supportingDocuments.purpose.UBODeclaration.description" | "supportingDocuments.purpose.UBODeclaration" | "supportingDocuments.purpose.UltimateBeneficialOwnerProofOfAddress.description" | "supportingDocuments.purpose.UltimateBeneficialOwnerProofOfAddress" | "supportingDocuments.purpose.UltimateBeneficialOwnerProofOfIdentity.description" | "supportingDocuments.purpose.UltimateBeneficialOwnerProofOfIdentity" | "taxIdentificationNumber.label";
|
|
23
23
|
export declare const translateError: (error: unknown) => string;
|
|
24
24
|
export {};
|