@swan-io/shared-business 13.5.2 → 13.5.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": "13.5.
|
|
3
|
+
"version": "13.5.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": "13.5.
|
|
28
|
+
"@swan-io/lake": "13.5.3"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@formatjs/intl": "^4.1.2",
|
|
@@ -50,6 +50,6 @@
|
|
|
50
50
|
"@types/react-dom": "^19.2.3",
|
|
51
51
|
"@types/react-native": "^0.72.8",
|
|
52
52
|
"type-fest": "^5.4.3",
|
|
53
|
-
"@swan-io/lake": "13.5.
|
|
53
|
+
"@swan-io/lake": "13.5.3"
|
|
54
54
|
}
|
|
55
55
|
}
|
|
@@ -105,7 +105,7 @@ const translateTransaction = (transaction, t) => {
|
|
|
105
105
|
};
|
|
106
106
|
export const AccountStatementV1 = ({ style, accountHolderName, accountHolderAddress, accountHolderType, iban, bic, openingDate, closingDate, openingBalance, transactions, feesDebit, feesCredit, totalsCredit, totalsDebit, closingBalance, language, }) => {
|
|
107
107
|
const t = useTranslation(language);
|
|
108
|
-
return (_jsx(Box, { style: style, children: _jsx(Box, { style: styles.container, direction: "column", justifyContent: "spaceBetween", children: _jsxs(Box, { children: [_jsxs(Box, { direction: "row", justifyContent: "spaceBetween", children: [_jsxs(Box, { direction: "column", children: [_jsx(Text, { style: styles.sectionTitle, children: accountHolderName.toUpperCase() }), _jsx(Text, { style: styles.text, children: accountHolderAddress.street }), _jsxs(Text, { style: styles.text, children: [accountHolderAddress.city, ",", " ", isNotNullish(accountHolderAddress.country) && accountHolderAddress.country] }), _jsx(Space, { height: 24 }), isNotEmpty(iban) && (_jsxs(Text, { style: styles.textBold, children: [t("accountStatement.iban"), " ", _jsx(Text, { style: styles.text, children: iban })] })), _jsx(Space, { height: 4 }), isNotEmpty(bic) && (_jsxs(Text, { style: styles.textBold, children: [t("accountStatement.bic"), _jsx(Text, { style: styles.text, children: bic })] }))] }), _jsxs(Box, { direction: "column", alignItems: "end", children: [_jsx(Text, { style: styles.pageTitle, children: t("accountStatement.titleDocument") }), _jsx(Text, { style: styles.pageSubTitle, children: accountHolderType === "Company"
|
|
108
|
+
return (_jsx(Box, { style: style, children: _jsx(Box, { style: styles.container, direction: "column", justifyContent: "spaceBetween", children: _jsxs(Box, { children: [_jsxs(Box, { direction: "row", justifyContent: "spaceBetween", children: [_jsxs(Box, { direction: "column", children: [_jsx(Text, { style: styles.sectionTitle, children: accountHolderName.toUpperCase() }), _jsx(Text, { style: styles.text, children: accountHolderAddress.street }), _jsxs(Text, { style: styles.text, children: [accountHolderAddress.city, ",", " ", isNotNullish(accountHolderAddress.country) && accountHolderAddress.country] }), _jsx(Space, { height: 24 }), isNotEmpty(iban) && (_jsxs(Text, { style: styles.textBold, children: [t("accountStatement.iban"), " ", _jsx(Text, { style: styles.text, children: iban })] })), _jsx(Space, { height: 4 }), isNotEmpty(bic) && (_jsxs(Text, { style: styles.textBold, children: [t("accountStatement.bic"), " ", _jsx(Text, { style: styles.text, children: bic })] }))] }), _jsxs(Box, { direction: "column", alignItems: "end", children: [_jsx(Text, { style: styles.pageTitle, children: t("accountStatement.titleDocument") }), _jsx(Text, { style: styles.pageSubTitle, children: accountHolderType === "Company"
|
|
109
109
|
? t("accountStatement.titleDocument.companyDescription")
|
|
110
110
|
: t("accountStatement.titleDocument.individualDescription") }), _jsx(Space, { height: 24 }), _jsx(Text, { style: styles.textBold, children: t("accountStatement.contactSupport") }), _jsx(Text, { style: styles.text, children: "support.swan.io" })] })] }), _jsx(Space, { height: 48 }), _jsxs(Box, { direction: "row", justifyContent: "spaceBetween", alignItems: "center", children: [_jsx(Box, { direction: "column", children: _jsx(Text, { style: styles.dateTitle, children: t("accountStatement.date", { openingDate, closingDate }) }) }), _jsxs(Box, { direction: "column", children: [_jsx(Text, { style: styles.openingBalanceText, children: t("accountStatement.openingBalance") }), _jsx(Text, { style: styles.totalAmount, children: openingBalance.value })] })] }), _jsx(Space, { height: 24 }), _jsxs(_Fragment, { children: [_jsxs(Box, { direction: "row", style: styles.thead, children: [_jsx(Text, { style: [styles.titleColumn, { width: "13%" }], children: t("accountStatement.column.date") }), _jsx(Text, { style: [styles.titleColumn, { width: "17%" }], children: t("accountStatement.column.type") }), _jsx(Text, { style: [styles.titleColumn, { width: "40%" }], children: t("accountStatement.column.description") }), _jsx(Text, { style: [styles.titleColumn, { width: "15%", textAlign: "right" }], children: t("accountStatement.column.credit") }), _jsx(Text, { style: [styles.titleColumn, { width: "15%", textAlign: "right" }], children: t("accountStatement.column.debit") })] }), _jsx(Box, { direction: "column", children: transactions.map(transaction => (_jsxs(Box, { direction: "row", children: [_jsx(Text, { style: [styles.textColumn, { width: "13%" }], children: transaction.date }), _jsx(Text, { style: [styles.textColumn, { width: "17%" }], children: translateTransaction(transaction.type, t) }), _jsx(Text, { style: [styles.textColumn, { width: "40%" }], children: transaction.label }), _jsx(Text, { style: [styles.textColumn, { width: "15%", textAlign: "right" }], children: transaction.credit ? transaction.credit.value : "" }), _jsx(Text, { style: [styles.textColumn, { width: "15%", textAlign: "right" }], children: transaction.debit ? transaction.debit.value : "" })] }, transaction.id))) })] }), _jsx(Space, { height: 12 }), _jsxs(Box, { direction: "column", children: [_jsxs(Box, { direction: "row", justifyContent: "end", children: [_jsx(Text, { style: [styles.row, styles.textBold], children: t("accountStatement.column.fees") }), _jsx(Text, { style: [styles.row, styles.textBold], children: feesCredit.value }), _jsx(Text, { style: [styles.row, styles.textBold], children: feesDebit.value })] }), _jsxs(Box, { direction: "row", justifyContent: "end", children: [_jsx(Text, { style: [styles.row, styles.textBold], children: t("accountStatement.column.totals") }), _jsx(Text, { style: [styles.row, styles.textBold], children: totalsCredit.value }), _jsx(Text, { style: [styles.row, styles.textBold], children: totalsDebit.value })] })] }), _jsx(Space, { height: 12 }), _jsx(Box, { direction: "row", justifyContent: "end", children: _jsxs(Box, { direction: "row", alignItems: "center", style: styles.closingBalanceRow, justifyContent: "spaceBetween", children: [_jsx(Title, { style: styles.closingBalanceRowText, text: t("accountStatement.closingBalance") }), _jsx(Title, { text: closingBalance.value, style: styles.totalAmount, align: "right" })] }) })] }) }) }));
|
|
111
111
|
};
|