@swan-io/shared-business 3.2.0 → 3.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swan-io/shared-business",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=18.0.0",
|
|
6
6
|
"yarn": "^1.22.0"
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
"@swan-io/lake": "*"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@formatjs/intl": "^2.9.
|
|
32
|
+
"@formatjs/intl": "^2.9.5",
|
|
33
33
|
"@googlemaps/js-api-loader": "1.16.2",
|
|
34
34
|
"@swan-io/boxed": "^1.2.0",
|
|
35
|
-
"dayjs": "^1.11.
|
|
35
|
+
"dayjs": "^1.11.10",
|
|
36
36
|
"react": "^18.2.0",
|
|
37
37
|
"react-atomic-state": "^1.2.7",
|
|
38
38
|
"react-dom": "^18.2.0",
|
|
39
39
|
"react-dropzone": "^14.2.3",
|
|
40
|
-
"react-native-web": "^0.19.
|
|
40
|
+
"react-native-web": "^0.19.9",
|
|
41
41
|
"react-ux-form": "^1.5.0",
|
|
42
42
|
"rifm": "^0.12.1",
|
|
43
43
|
"ts-pattern": "^5.0.5",
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@swan-io/lake": "*",
|
|
49
49
|
"@testing-library/react": "^14.0.0",
|
|
50
|
-
"@testing-library/user-event": "^14.
|
|
51
|
-
"@types/google.maps": "^3.54.
|
|
52
|
-
"@types/react": "^18.2.
|
|
53
|
-
"@types/react-dom": "^18.2.
|
|
54
|
-
"@types/react-native": "^0.72.
|
|
55
|
-
"@types/uuid": "^9.0.
|
|
50
|
+
"@testing-library/user-event": "^14.5.1",
|
|
51
|
+
"@types/google.maps": "^3.54.4",
|
|
52
|
+
"@types/react": "^18.2.31",
|
|
53
|
+
"@types/react-dom": "^18.2.14",
|
|
54
|
+
"@types/react-native": "^0.72.5",
|
|
55
|
+
"@types/uuid": "^9.0.6",
|
|
56
56
|
"jsdom": "^22.1.0",
|
|
57
|
-
"vitest": "^0.34.
|
|
57
|
+
"vitest": "^0.34.6"
|
|
58
58
|
}
|
|
59
59
|
}
|
|
@@ -12,7 +12,7 @@ type Props = {
|
|
|
12
12
|
onValueChange: (value: string) => void;
|
|
13
13
|
style?: StyleProp<ViewStyle>;
|
|
14
14
|
value?: string;
|
|
15
|
-
language: "en" | "es" | "de" | "fr" | "it" | "nl" | "pt";
|
|
15
|
+
language: "en" | "es" | "de" | "fi" | "fr" | "it" | "nl" | "pt";
|
|
16
16
|
placeholder: string;
|
|
17
17
|
shouldDisplaySuggestions?: boolean;
|
|
18
18
|
emptyResultText: string;
|
package/src/components/RIB.d.ts
CHANGED
|
@@ -27,6 +27,10 @@ type RIBv1Props = {
|
|
|
27
27
|
agency: string;
|
|
28
28
|
bankNumber: string;
|
|
29
29
|
nationalCode: string;
|
|
30
|
+
} | {
|
|
31
|
+
accountCountry: "NLD";
|
|
32
|
+
bankKey: string;
|
|
33
|
+
bankNumber: string;
|
|
30
34
|
});
|
|
31
35
|
export type RIBProps = RIBv1Props;
|
|
32
36
|
export declare const RIB: (props: RIBProps) => import("react/jsx-runtime").JSX.Element;
|
package/src/components/RIB.js
CHANGED
|
@@ -31,6 +31,9 @@ const styles = StyleSheet.create({
|
|
|
31
31
|
half: {
|
|
32
32
|
padding: spacings[24],
|
|
33
33
|
},
|
|
34
|
+
shrink: {
|
|
35
|
+
flexShrink: 1,
|
|
36
|
+
},
|
|
34
37
|
label: {
|
|
35
38
|
...getTextStyle("serif", 10),
|
|
36
39
|
},
|
|
@@ -65,7 +68,7 @@ const kindStyles = {
|
|
|
65
68
|
main: styles.mainText,
|
|
66
69
|
small: styles.smallText,
|
|
67
70
|
};
|
|
68
|
-
const Item = ({ color = "gray", kind, label, value }) => (_jsxs(View, { children: [_jsx(Text, { style: [styles.label, color === "partner" && styles.partnerLabel], children: label }), _jsx(Space, { height: 4 }), typeof value === "string" ? (_jsx(Text, { style: kindStyles[kind], children: value })) : (value.map((line, index) => (_jsx(Text, { style: kindStyles[kind], children: line }, index))))] }));
|
|
71
|
+
const Item = ({ color = "gray", kind, label, value }) => (_jsxs(View, { style: styles.shrink, children: [_jsx(Text, { style: [styles.label, color === "partner" && styles.partnerLabel], children: label }), _jsx(Space, { height: 4 }), typeof value === "string" ? (_jsx(Text, { style: kindStyles[kind], children: value })) : (value.map((line, index) => (_jsx(Text, { style: kindStyles[kind], children: line }, index))))] }));
|
|
69
72
|
const logoStyle = {
|
|
70
73
|
objectFit: "contain",
|
|
71
74
|
objectPosition: "left",
|
|
@@ -74,6 +77,7 @@ const RIBv1 = ({ accountHolderAddress, bank, bankAddress, bic, iban, partnerColo
|
|
|
74
77
|
.with({ accountCountry: "FRA" }, ({ agency, 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.agency"), value: agency }), _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 })] })))
|
|
75
78
|
.with({ accountCountry: "DEU" }, ({ accountNumber }) => (_jsxs(_Fragment, { children: [_jsx(Item, { kind: "small", label: t("rib.bank"), value: bank }), _jsx(Space, { width: 24 }), _jsx(Item, { kind: "small", label: t("rib.accountNumber"), value: accountNumber })] })))
|
|
76
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
|
+
.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 })] })))
|
|
77
81
|
.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: [
|
|
78
82
|
bankAddress.name,
|
|
79
83
|
bankAddress.address,
|