@swan-io/shared-business 9.2.0 → 10.0.1
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
|
+
"version": "10.0.1",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=20.9.0",
|
|
6
6
|
"yarn": "^1.22.0"
|
|
@@ -29,30 +29,30 @@
|
|
|
29
29
|
"@swan-io/lake": "*"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@formatjs/intl": "^2.10.
|
|
32
|
+
"@formatjs/intl": "^2.10.9",
|
|
33
33
|
"@placekit/client-js": "^2.3.0",
|
|
34
34
|
"@swan-io/boxed": "^3.0.0",
|
|
35
35
|
"@swan-io/request": "^1.0.6",
|
|
36
36
|
"@swan-io/use-form": "^3.1.0",
|
|
37
|
-
"dayjs": "^1.11.
|
|
37
|
+
"dayjs": "^1.11.13",
|
|
38
38
|
"iban": "^0.0.14",
|
|
39
39
|
"react": "^18.3.1",
|
|
40
40
|
"react-atomic-state": "^2.0.0",
|
|
41
41
|
"react-dom": "^18.3.1",
|
|
42
|
-
"react-dropzone": "^14.2.
|
|
43
|
-
"react-native-web": "^0.19.
|
|
42
|
+
"react-dropzone": "^14.2.10",
|
|
43
|
+
"react-native-web": "^0.19.13",
|
|
44
44
|
"rifm": "^0.12.1",
|
|
45
|
-
"ts-pattern": "^5.
|
|
45
|
+
"ts-pattern": "^5.5.0",
|
|
46
46
|
"uuid": "^10.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@swan-io/lake": "*",
|
|
50
50
|
"@types/iban": "0.0.35",
|
|
51
|
-
"@types/react": "^18.3.
|
|
52
|
-
"@types/react-dom": "^18.3.
|
|
51
|
+
"@types/react": "^18.3.11",
|
|
52
|
+
"@types/react-dom": "^18.3.1",
|
|
53
53
|
"@types/react-native": "^0.72.8",
|
|
54
54
|
"@types/uuid": "^10.0.0",
|
|
55
|
-
"jsdom": "^
|
|
56
|
-
"vitest": "^2.
|
|
55
|
+
"jsdom": "^25.0.1",
|
|
56
|
+
"vitest": "^2.1.3"
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -69,7 +69,7 @@ export const SupportChat = ({ children, accentColor, type, additionalInfo }) =>
|
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
catch
|
|
72
|
+
catch {
|
|
73
73
|
// nothing
|
|
74
74
|
}
|
|
75
75
|
});
|
|
@@ -79,7 +79,7 @@ export const SupportChat = ({ children, accentColor, type, additionalInfo }) =>
|
|
|
79
79
|
zE("webWidget", "show");
|
|
80
80
|
zE("webWidget", "open");
|
|
81
81
|
}
|
|
82
|
-
catch
|
|
82
|
+
catch {
|
|
83
83
|
// nothing
|
|
84
84
|
}
|
|
85
85
|
}, []);
|
|
@@ -33,7 +33,7 @@ const styles = StyleSheet.create({
|
|
|
33
33
|
pageTitle: {
|
|
34
34
|
...getTextStyle("sans", 20),
|
|
35
35
|
color: colors.swan[500],
|
|
36
|
-
fontWeight: "
|
|
36
|
+
fontWeight: "600",
|
|
37
37
|
},
|
|
38
38
|
sectionTitle: {
|
|
39
39
|
...getTextStyle("sans", 14),
|
|
@@ -41,11 +41,11 @@ const styles = StyleSheet.create({
|
|
|
41
41
|
fontWeight: "600",
|
|
42
42
|
},
|
|
43
43
|
lineName: {
|
|
44
|
-
...getTextStyle("sans",
|
|
44
|
+
...getTextStyle("sans", 14),
|
|
45
45
|
color: colors.gray[700],
|
|
46
46
|
},
|
|
47
47
|
lineValue: {
|
|
48
|
-
...getTextStyle("sans",
|
|
48
|
+
...getTextStyle("sans", 14),
|
|
49
49
|
color: colors.swan[500],
|
|
50
50
|
fontWeight: "600",
|
|
51
51
|
},
|
|
@@ -91,7 +91,7 @@ export const TransactionStatementV1 = ({ partnerLogoUrl, generationDate, executi
|
|
|
91
91
|
: debtorAccountNumber }), isNotNullishOrEmpty(debtorBankName) && (_jsx(Line, { name: t("transactionStatement.debtor.bankName"), value: debtorBankName })), isNotNullishOrEmpty(debtorBankIdentifier) && (_jsx(Line, { name: t("transactionStatement.debtor.bankIdentifier"), value: debtorBankIdentifier }))] }), _jsx(Space, { height: 24 }), _jsx(Text, { style: styles.sectionTitle, children: t("transactionStatement.title.creditor") }), _jsx(Space, { height: 8 }), _jsxs(Stack, { space: 8, children: [_jsx(Line, { name: t("transactionStatement.creditor.name"), value: creditorName }), _jsx(Line, { name: t("transactionStatement.creditor.accountNumber"), value: IBAN.isValid(creditorAccountNumber)
|
|
92
92
|
? IBAN.printFormat(creditorAccountNumber)
|
|
93
93
|
: creditorAccountNumber }), isNotNullishOrEmpty(creditorBankName) && (_jsx(Line, { name: t("transactionStatement.creditor.bankName"), value: creditorBankName })), isNotNullishOrEmpty(creditorBankIdentifier) && (_jsx(Line, { name: t("transactionStatement.creditor.bankIdentifier"), value: creditorBankIdentifier }))] }), _jsx(Fill, { minHeight: 8 }), _jsx(Text, { style: styles.generationInfos, children: t("transactionStatement.generationDate", { date: generationDate }) }), _jsx(Space, { height: 8 }), match(type)
|
|
94
|
-
.with("SepaCreditTransferOut", "
|
|
94
|
+
.with("SepaCreditTransferOut", "InternationalCreditTransferOut", () => (_jsx(Text, { style: styles.generationInfos, children: t("transactionStatement.generationInfos") })))
|
|
95
95
|
.otherwise(() => null), _jsx(Separator, { space: 24 }), _jsx(Text, { style: styles.footer, children: t("transactionStatement.footer") })] }));
|
|
96
96
|
};
|
|
97
97
|
export const TransactionStatement = (props) => match(props)
|
|
@@ -1502,9 +1502,9 @@ export declare const france: {
|
|
|
1502
1502
|
uid: string;
|
|
1503
1503
|
flag: string;
|
|
1504
1504
|
};
|
|
1505
|
-
export declare const individualCountries: ("BEL" | "CZE" | "DNK" | "DEU" | "EST" | "IRL" | "ESP" | "FRA" | "HRV" | "ISL" | "ITA" | "LVA" | "LIE" | "LTU" | "LUX" | "HUN" | "MLT" | "
|
|
1505
|
+
export declare const individualCountries: ("BEL" | "CZE" | "DNK" | "DEU" | "EST" | "IRL" | "ESP" | "FRA" | "HRV" | "ISL" | "ITA" | "LVA" | "LIE" | "LTU" | "LUX" | "HUN" | "MLT" | "NLD" | "NOR" | "AUT" | "POL" | "PRT" | "ROU" | "SVN" | "SVK" | "FIN" | "SWE" | "GRC" | "CYP" | "BGR")[];
|
|
1506
1506
|
export type IndividualCountryCCA3 = (typeof individualCountries)[number];
|
|
1507
|
-
export declare const companyCountries: ("BEL" | "CZE" | "DNK" | "DEU" | "EST" | "IRL" | "ESP" | "FRA" | "HRV" | "ISL" | "ITA" | "LVA" | "LIE" | "LTU" | "LUX" | "HUN" | "MLT" | "
|
|
1507
|
+
export declare const companyCountries: ("BEL" | "CZE" | "DNK" | "DEU" | "EST" | "IRL" | "ESP" | "FRA" | "HRV" | "ISL" | "ITA" | "LVA" | "LIE" | "LTU" | "LUX" | "HUN" | "MLT" | "NLD" | "NOR" | "AUT" | "POL" | "PRT" | "ROU" | "SVN" | "SVK" | "FIN" | "SWE" | "GRC" | "CYP" | "BGR")[];
|
|
1508
1508
|
export type CompanyCountryCCA3 = (typeof companyCountries)[number];
|
|
1509
1509
|
export declare const countriesWithMultipleCCA3: Partial<Record<CountryCCA3, CountryCCA3[]>>;
|
|
1510
1510
|
export declare const isCountryCCA3: (value: unknown) => value is CountryCCA3;
|
|
@@ -1512,7 +1512,7 @@ export declare const isCountryCCA2: (value: unknown) => value is CountryCCA2;
|
|
|
1512
1512
|
export declare const isIndividualCountryCCA3: (value: unknown) => value is IndividualCountryCCA3;
|
|
1513
1513
|
export declare const isCompanyCountryCCA3: (value: unknown) => value is CompanyCountryCCA3;
|
|
1514
1514
|
export declare const isCompanyWithUboCountryCCA3: (value: unknown) => value is CompanyWithUboCountryCCA3;
|
|
1515
|
-
export declare const companyFallbackCountry: "BEL" | "CZE" | "DNK" | "DEU" | "EST" | "IRL" | "ESP" | "FRA" | "HRV" | "ISL" | "ITA" | "LVA" | "LIE" | "LTU" | "LUX" | "HUN" | "MLT" | "
|
|
1516
|
-
export declare const individualFallbackCountry: "BEL" | "CZE" | "DNK" | "DEU" | "EST" | "IRL" | "ESP" | "FRA" | "HRV" | "ISL" | "ITA" | "LVA" | "LIE" | "LTU" | "LUX" | "HUN" | "MLT" | "
|
|
1515
|
+
export declare const companyFallbackCountry: "BEL" | "CZE" | "DNK" | "DEU" | "EST" | "IRL" | "ESP" | "FRA" | "HRV" | "ISL" | "ITA" | "LVA" | "LIE" | "LTU" | "LUX" | "HUN" | "MLT" | "NLD" | "NOR" | "AUT" | "POL" | "PRT" | "ROU" | "SVN" | "SVK" | "FIN" | "SWE" | "GRC" | "CYP" | "BGR";
|
|
1516
|
+
export declare const individualFallbackCountry: "BEL" | "CZE" | "DNK" | "DEU" | "EST" | "IRL" | "ESP" | "FRA" | "HRV" | "ISL" | "ITA" | "LVA" | "LIE" | "LTU" | "LUX" | "HUN" | "MLT" | "NLD" | "NOR" | "AUT" | "POL" | "PRT" | "ROU" | "SVN" | "SVK" | "FIN" | "SWE" | "GRC" | "CYP" | "BGR";
|
|
1517
1517
|
export declare const getCountryName: (cca3: CountryCCA3) => string;
|
|
1518
1518
|
export {};
|
|
@@ -1799,7 +1799,6 @@ export const individualCountries = [
|
|
|
1799
1799
|
"ROU",
|
|
1800
1800
|
"SWE",
|
|
1801
1801
|
"BGR",
|
|
1802
|
-
"MCO",
|
|
1803
1802
|
];
|
|
1804
1803
|
export const companyCountries = [
|
|
1805
1804
|
"BEL",
|
|
@@ -1832,7 +1831,6 @@ export const companyCountries = [
|
|
|
1832
1831
|
"BGR",
|
|
1833
1832
|
"CYP",
|
|
1834
1833
|
"NOR",
|
|
1835
|
-
"MCO",
|
|
1836
1834
|
];
|
|
1837
1835
|
// Google API accepts only 5 country codes
|
|
1838
1836
|
export const countriesWithMultipleCCA3 = {
|
package/src/locales/en.json
CHANGED
|
@@ -152,9 +152,9 @@
|
|
|
152
152
|
"rejection.NotReachableConsentStatusRejection": "Couldn't change consent status",
|
|
153
153
|
"rejection.NotSupportedCountryRejection": "Unsupported country",
|
|
154
154
|
"rejection.OnboardingNotCompletedRejection": "Incomplete onboarding process",
|
|
155
|
-
"rejection.OtpIncorrectCodeRejection": "The key isn’t correct, please try again",
|
|
156
|
-
"rejection.OtpExpiredRejection": "The code is expired, please restart the process",
|
|
157
155
|
"rejection.OtpAttemptsExceededRejection": "Too many incorrect code, please restart the process",
|
|
156
|
+
"rejection.OtpExpiredRejection": "The code is expired, please restart the process",
|
|
157
|
+
"rejection.OtpIncorrectCodeRejection": "The key isn’t correct, please try again",
|
|
158
158
|
"rejection.PINNotReadyRejection": "PIN isn't ready",
|
|
159
159
|
"rejection.PaymentMandateMandateNotFoundRejection": "Couldn't find payment mandate",
|
|
160
160
|
"rejection.PaymentMandateReferenceAlreadyUsedRejection": "Payment mandates require unique reference numbers",
|