@swan-io/shared-business 2.5.0 → 2.6.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swan-io/shared-business",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "engines": {
5
5
  "node": ">=18.0.0",
6
6
  "yarn": "^1.22.0"
@@ -11,13 +11,25 @@ type RIBv1Props = {
11
11
  partnerLogoUrl?: string;
12
12
  iban: string;
13
13
  bic: string;
14
+ bankAddress: Address;
15
+ accountHolderAddress: Address;
16
+ } & ({
17
+ accountCountry: "FRA";
14
18
  bank: string;
15
19
  agency: string;
16
20
  bankNumber: string;
17
21
  bankKey: string;
18
- bankAddress: Address;
19
- accountHolderAddress: Address;
20
- };
22
+ } | {
23
+ accountCountry: "DEU";
24
+ bank: string;
25
+ accountNumber: string;
26
+ } | {
27
+ accountCountry: "ESP";
28
+ bank: string;
29
+ agency: string;
30
+ nationalCode: string;
31
+ bankNumber: string;
32
+ });
21
33
  export type RIBProps = RIBv1Props;
22
34
  export declare const RIB: (props: RIBProps) => import("react/jsx-runtime").JSX.Element;
23
35
  export {};
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { Box } from "@swan-io/lake/src/components/Box";
3
3
  import { Fill } from "@swan-io/lake/src/components/Fill";
4
4
  import { LakeHeading } from "@swan-io/lake/src/components/LakeHeading";
@@ -68,8 +68,13 @@ const styles = StyleSheet.create({
68
68
  export const RIB = (props) => match(props)
69
69
  .with({ version: "v1" }, props => _jsx(RIBv1, { ...props }))
70
70
  .exhaustive();
71
- const RIBv1 = ({ partnerColor, partnerLogoUrl, iban, bic, bank, agency, bankNumber, bankKey, bankAddress, accountHolderAddress, }) => {
72
- return (_jsx(WithPartnerAccentColor, { color: partnerColor, children: _jsxs(View, { style: styles.container, children: [_jsxs(View, { style: styles.part, children: [_jsxs(Box, { direction: "row", alignItems: "center", children: [isNotNullishOrEmpty(partnerLogoUrl) ? (_jsx("img", { src: partnerLogoUrl, width: LOGO_MAX_WIDTH, height: LOGO_MAX_HEIGHT, style: imageStyle })) : (_jsx(SwanLogo, { style: styles.defaultLogo })), _jsx(Fill, { minWidth: 24 }), _jsx(LakeHeading, { level: 2, variant: "h3", color: colors.gray[900], children: t("rib.bankDetails") })] }), _jsx(Space, { height: 24 }), _jsxs(Box, { direction: "row", alignItems: "center", children: [_jsx(RibValue, { type: "mainInfo", color: "partner", label: t("rib.iban"), value: iban }), _jsx(Space, { width: 24 }), _jsx(RibValue, { type: "mainInfo", color: "partner", label: t("rib.bic"), value: bic })] }), _jsx(Space, { height: 8 }), _jsxs(Box, { direction: "row", alignItems: "center", children: [_jsx(RibValue, { type: "smallInfo", color: "gray", label: t("rib.bank"), value: bank }), _jsx(Space, { width: 24 }), _jsx(RibValue, { type: "smallInfo", color: "gray", label: t("rib.agency"), value: agency }), _jsx(Space, { width: 24 }), _jsx(RibValue, { type: "smallInfo", color: "gray", label: t("rib.number"), value: bankNumber }), _jsx(Space, { width: 24 }), _jsx(RibValue, { type: "smallInfo", color: "gray", label: t("rib.key"), value: bankKey })] })] }), _jsx(Separator, {}), _jsxs(View, { style: styles.part, children: [_jsxs(Box, { direction: "row", alignItems: "center", children: [_jsx(RibValue, { type: "addressInfo", color: "partner", label: t("rib.address"), value: [
71
+ const RIBv1 = (props) => {
72
+ const { partnerColor, partnerLogoUrl, iban, bic, bankAddress, accountHolderAddress } = props;
73
+ return (_jsx(WithPartnerAccentColor, { color: partnerColor, children: _jsxs(View, { style: styles.container, children: [_jsxs(View, { style: styles.part, children: [_jsxs(Box, { direction: "row", alignItems: "center", children: [isNotNullishOrEmpty(partnerLogoUrl) ? (_jsx("img", { src: partnerLogoUrl, width: LOGO_MAX_WIDTH, height: LOGO_MAX_HEIGHT, style: imageStyle })) : (_jsx(SwanLogo, { style: styles.defaultLogo })), _jsx(Fill, { minWidth: 24 }), _jsx(LakeHeading, { level: 2, variant: "h3", color: colors.gray[900], children: t("rib.bankDetails") })] }), _jsx(Space, { height: 24 }), _jsxs(Box, { direction: "row", alignItems: "center", children: [_jsx(RibValue, { type: "mainInfo", color: "partner", label: t("rib.iban"), value: iban }), _jsx(Space, { width: 24 }), _jsx(RibValue, { type: "mainInfo", color: "partner", label: t("rib.bic"), value: bic })] }), _jsx(Space, { height: 8 }), _jsx(Box, { direction: "row", alignItems: "center", children: match(props)
74
+ .with({ accountCountry: "FRA" }, ({ bank, agency, bankNumber, bankKey }) => (_jsxs(_Fragment, { children: [_jsx(RibValue, { type: "smallInfo", color: "gray", label: t("rib.bank"), value: bank }), _jsx(Space, { width: 24 }), _jsx(RibValue, { type: "smallInfo", color: "gray", label: t("rib.agency"), value: agency }), _jsx(Space, { width: 24 }), _jsx(RibValue, { type: "smallInfo", color: "gray", label: t("rib.number"), value: bankNumber }), _jsx(Space, { width: 24 }), _jsx(RibValue, { type: "smallInfo", color: "gray", label: t("rib.key"), value: bankKey })] })))
75
+ .with({ accountCountry: "DEU" }, ({ bank, accountNumber }) => (_jsxs(_Fragment, { children: [_jsx(RibValue, { type: "smallInfo", color: "gray", label: t("rib.bank"), value: bank }), _jsx(Space, { width: 24 }), _jsx(RibValue, { type: "smallInfo", color: "gray", label: t("rib.accountNumber"), value: accountNumber })] })))
76
+ .with({ accountCountry: "ESP" }, ({ bank, agency, nationalCode, bankNumber }) => (_jsxs(_Fragment, { children: [_jsx(RibValue, { type: "smallInfo", color: "gray", label: t("rib.bank"), value: bank }), _jsx(Space, { width: 24 }), _jsx(RibValue, { type: "smallInfo", color: "gray", label: t("rib.agency"), value: agency }), _jsx(Space, { width: 24 }), _jsx(RibValue, { type: "smallInfo", color: "gray", label: t("rib.nationalCode"), value: nationalCode }), _jsx(Space, { width: 24 }), _jsx(RibValue, { type: "smallInfo", color: "gray", label: t("rib.number"), value: bankNumber })] })))
77
+ .exhaustive() })] }), _jsx(Separator, {}), _jsxs(View, { style: styles.part, children: [_jsxs(Box, { direction: "row", alignItems: "center", children: [_jsx(RibValue, { type: "addressInfo", color: "partner", label: t("rib.address"), value: [
73
78
  bankAddress.name,
74
79
  bankAddress.address,
75
80
  `${bankAddress.zipCode} ${bankAddress.city}`,
@@ -112,6 +112,7 @@
112
112
  "registrationPage.withOrganismLabel": "Ist deine Firma bereits im {organismName} eingetragen?",
113
113
  "registrationPage.withoutOrganismNameLabel": "Bist du registriert?",
114
114
  "rib.accountHolder": "Kontoinhaber",
115
+ "rib.accountNumber": "Kontonummer",
115
116
  "rib.address": "Adresse",
116
117
  "rib.agency": "Die Agentur",
117
118
  "rib.bank": "Bank",
@@ -119,6 +120,7 @@
119
120
  "rib.bic": "BIC / SWIFT",
120
121
  "rib.iban": "IBAN",
121
122
  "rib.key": "RIB-Schlüssel",
123
+ "rib.nationalCode": "Nationaler Code",
122
124
  "rib.number": "Nummer",
123
125
  "rib.partnership": "In Partnerschaft mit",
124
126
  "supportingDoc.UBODeclaration": "Erklärung des wirtschaftlich Berechtigten",
@@ -112,6 +112,7 @@
112
112
  "registrationPage.withOrganismLabel": "Are you registered to {organismName}?",
113
113
  "registrationPage.withoutOrganismNameLabel": "Are you registered?",
114
114
  "rib.accountHolder": "Account holder",
115
+ "rib.accountNumber": "Account number",
115
116
  "rib.address": "Address",
116
117
  "rib.agency": "Agency",
117
118
  "rib.bank": "Bank",
@@ -119,6 +120,7 @@
119
120
  "rib.bic": "BIC / SWIFT",
120
121
  "rib.iban": "IBAN",
121
122
  "rib.key": "Key",
123
+ "rib.nationalCode": "National code",
122
124
  "rib.number": "Number",
123
125
  "rib.partnership": "In partnership with",
124
126
  "supportingDoc.UBODeclaration": "UBO Declaration",
@@ -112,6 +112,7 @@
112
112
  "registrationPage.withOrganismLabel": "¿Estás registrado en {organismName}?",
113
113
  "registrationPage.withoutOrganismNameLabel": "¿Estás registrado?",
114
114
  "rib.accountHolder": "Titular de la cuenta",
115
+ "rib.accountNumber": "Número de cuenta",
115
116
  "rib.address": "Dirección",
116
117
  "rib.agency": "Agencia",
117
118
  "rib.bank": "Banco",
@@ -119,6 +120,7 @@
119
120
  "rib.bic": "BIC / SWIFT",
120
121
  "rib.iban": "IBAN",
121
122
  "rib.key": "Clave",
123
+ "rib.nationalCode": "Código nacional",
122
124
  "rib.number": "Número",
123
125
  "rib.partnership": "En colaboración con",
124
126
  "supportingDoc.UBODeclaration": "Declaración de beneficiario final",
@@ -112,6 +112,7 @@
112
112
  "registrationPage.withOrganismLabel": "Êtes-vous immatriculé au {organismName}?",
113
113
  "registrationPage.withoutOrganismNameLabel": "Êtes-vous immatriculé?",
114
114
  "rib.accountHolder": "Titulaire du compte",
115
+ "rib.accountNumber": "Numéro de compte",
115
116
  "rib.address": "Adresse",
116
117
  "rib.agency": "Agence",
117
118
  "rib.bank": "Banque",
@@ -119,6 +120,7 @@
119
120
  "rib.bic": "BIC/SWIFT",
120
121
  "rib.iban": "IBAN",
121
122
  "rib.key": "Clé",
123
+ "rib.nationalCode": "Code national",
122
124
  "rib.number": "Numéro",
123
125
  "rib.partnership": "En partenariat avec",
124
126
  "supportingDoc.UBODeclaration": "Déclaration des bénéficiares effectifs",
@@ -112,6 +112,7 @@
112
112
  "registrationPage.withOrganismLabel": "Sei registrato a {organismName}?",
113
113
  "registrationPage.withoutOrganismNameLabel": "Sei registrato?",
114
114
  "rib.accountHolder": "Titolare del conto",
115
+ "rib.accountNumber": "Numero di conto",
115
116
  "rib.address": "Indirizzo",
116
117
  "rib.agency": "Agenzia",
117
118
  "rib.bank": "Banca",
@@ -119,6 +120,7 @@
119
120
  "rib.bic": "BIC/SWIFT",
120
121
  "rib.iban": "IBAN",
121
122
  "rib.key": "Chiave",
123
+ "rib.nationalCode": "Codice nazionale",
122
124
  "rib.number": "Numero",
123
125
  "rib.partnership": "In collaborazione con",
124
126
  "supportingDoc.UBODeclaration": "Dichiarazione di beneficiario effettivo (UBO)",
@@ -112,6 +112,7 @@
112
112
  "registrationPage.withOrganismLabel": "Bent u geregistreerd bij {organismName}?",
113
113
  "registrationPage.withoutOrganismNameLabel": "Bent u geregistreerd?",
114
114
  "rib.accountHolder": "Rekeninghouder",
115
+ "rib.accountNumber": "Rekeningnummer",
115
116
  "rib.address": "Adres",
116
117
  "rib.agency": "Het Agentschap",
117
118
  "rib.bank": "De bank",
@@ -119,6 +120,7 @@
119
120
  "rib.bic": "BIC/SWIFT",
120
121
  "rib.iban": "IBAN",
121
122
  "rib.key": "RIB-Sleutel",
123
+ "rib.nationalCode": "National code",
122
124
  "rib.number": "Nummer",
123
125
  "rib.partnership": "in samenwerking met",
124
126
  "supportingDoc.UBODeclaration": "Uiteindelijk begunstigde verklaring",
@@ -112,6 +112,7 @@
112
112
  "registrationPage.withOrganismLabel": "Está registado no {organismName}?",
113
113
  "registrationPage.withoutOrganismNameLabel": "Está registado?",
114
114
  "rib.accountHolder": "Titular da conta",
115
+ "rib.accountNumber": "Número da conta",
115
116
  "rib.address": "Endereço",
116
117
  "rib.agency": "Agência",
117
118
  "rib.bank": "Banco",
@@ -119,6 +120,7 @@
119
120
  "rib.bic": "BIC / SWIFT",
120
121
  "rib.iban": "IBAN",
121
122
  "rib.key": "Chave",
123
+ "rib.nationalCode": "Código nacional",
122
124
  "rib.number": "Número",
123
125
  "rib.partnership": "Em parceria com",
124
126
  "supportingDoc.UBODeclaration": "Declaração do beneficiário efetivo",