@swan-io/shared-business 12.4.2 → 12.4.3
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": "12.4.
|
|
3
|
+
"version": "12.4.3",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": "^22.12.0"
|
|
6
6
|
},
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
],
|
|
26
26
|
"license": "MIT",
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@swan-io/lake": "12.4.
|
|
28
|
+
"@swan-io/lake": "12.4.3"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@formatjs/intl": "^3.1.6",
|
|
@@ -51,6 +51,6 @@
|
|
|
51
51
|
"@types/react-native": "^0.72.8",
|
|
52
52
|
"jsdom": "^26.1.0",
|
|
53
53
|
"vitest": "^3.2.0",
|
|
54
|
-
"@swan-io/lake": "12.4.
|
|
54
|
+
"@swan-io/lake": "12.4.3"
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StyleProp, ViewStyle } from "react-native";
|
|
2
2
|
import { CountryCCA3 } from "../constants/countries";
|
|
3
|
-
export type TransactionType = "Card" | "Check" | "Fees" | "InternationalDirectDebit" | "InternationalCreditTransfer" | "SepaCreditTransfer" | "SepaDirectDebit";
|
|
3
|
+
export type TransactionType = "Card" | "Check" | "Fees" | "InternationalDirectDebit" | "InternationalCreditTransfer" | "SepaCreditTransfer" | "SepaDirectDebit" | (string & {});
|
|
4
4
|
type AddressInfo = {
|
|
5
5
|
street: string;
|
|
6
6
|
city: string;
|
|
@@ -14,7 +14,7 @@ export type Transaction = {
|
|
|
14
14
|
id: string;
|
|
15
15
|
label: string;
|
|
16
16
|
date: string;
|
|
17
|
-
type:
|
|
17
|
+
type: TransactionType;
|
|
18
18
|
credit?: Amount;
|
|
19
19
|
debit?: Amount;
|
|
20
20
|
};
|
|
@@ -99,7 +99,7 @@ const translateTransaction = (transaction) => {
|
|
|
99
99
|
.with("Fees", () => t("accountStatement.fees"))
|
|
100
100
|
.with("InternationalDirectDebit", "SepaDirectDebit", () => t("accountStatement.directDebit"))
|
|
101
101
|
.with("InternationalCreditTransfer", "SepaCreditTransfer", () => t("accountStatement.creditTransfer"))
|
|
102
|
-
.
|
|
102
|
+
.otherwise(() => transaction);
|
|
103
103
|
};
|
|
104
104
|
const logoStyle = {
|
|
105
105
|
height: LOGO_MAX_HEIGHT,
|
package/src/components/RIB.d.ts
CHANGED
|
@@ -35,6 +35,10 @@ type RIBv1Props = {
|
|
|
35
35
|
accountCountry: "ITA";
|
|
36
36
|
agency: string;
|
|
37
37
|
bankNumber: string;
|
|
38
|
+
} | {
|
|
39
|
+
accountCountry: "BEL";
|
|
40
|
+
agency: string;
|
|
41
|
+
bankNumber: string;
|
|
38
42
|
});
|
|
39
43
|
export type RIBProps = RIBv1Props;
|
|
40
44
|
export declare const RIB: (props: RIBProps) => import("react/jsx-runtime").JSX.Element;
|
package/src/components/RIB.js
CHANGED
|
@@ -79,6 +79,7 @@ const RIBv1 = ({ accountHolderAddress, bank, bankAddress, bic, iban, partnerColo
|
|
|
79
79
|
.with({ accountCountry: "ESP" }, ({ agency, bankNumber, nationalCode }) => (_jsxs(_Fragment, { children: [_jsx(Item, { kind: "small", label: t("rib.bank"), value: bank }), _jsx(Space, { width: 24 }), _jsx(Item, { kind: "small", label: t("rib.agency"), value: agency }), _jsx(Space, { width: 24 }), _jsx(Item, { kind: "small", label: t("rib.nationalCode"), value: nationalCode }), _jsx(Space, { width: 24 }), _jsx(Item, { kind: "small", label: t("rib.number"), value: bankNumber })] })))
|
|
80
80
|
.with({ accountCountry: "NLD" }, ({ bankKey, bankNumber }) => (_jsxs(_Fragment, { children: [_jsx(Item, { kind: "small", label: t("rib.bank"), value: bank }), _jsx(Space, { width: 24 }), _jsx(Item, { kind: "small", label: t("rib.number"), value: bankNumber }), _jsx(Space, { width: 24 }), _jsx(Item, { kind: "small", label: t("rib.key"), value: bankKey })] })))
|
|
81
81
|
.with({ accountCountry: "ITA" }, ({ agency, bankNumber }) => (_jsxs(_Fragment, { children: [_jsx(Item, { kind: "small", label: t("rib.bank"), value: bank }), _jsx(Space, { width: 24 }), _jsx(Item, { kind: "small", label: t("rib.agency"), value: agency }), _jsx(Space, { width: 24 }), _jsx(Item, { kind: "small", label: t("rib.number"), value: bankNumber })] })))
|
|
82
|
+
.with({ accountCountry: "BEL" }, ({ agency, bankNumber }) => (_jsxs(_Fragment, { children: [_jsx(Item, { kind: "small", label: t("rib.bank"), value: bank }), _jsx(Space, { width: 24 }), _jsx(Item, { kind: "small", label: t("rib.agency"), value: agency }), _jsx(Space, { width: 24 }), _jsx(Item, { kind: "small", label: t("rib.number"), value: bankNumber })] })))
|
|
82
83
|
.exhaustive() })] }), _jsx(Separator, {}), _jsxs(View, { style: styles.half, children: [_jsxs(Box, { direction: "row", alignItems: "center", children: [_jsx(Item, { kind: "address", color: "partner", label: t("rib.address"), value: [
|
|
83
84
|
bankAddress.name,
|
|
84
85
|
bankAddress.address,
|