@swan-io/shared-business 12.2.5 → 12.2.7
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 +8 -9
- package/src/components/Filters.d.ts +24 -0
- package/src/components/Filters.js +9 -0
- package/src/locales/de.json +2 -2
- package/src/locales/es.json +4 -4
- package/src/locales/fi.json +21 -21
- package/src/locales/fr.json +6 -6
- package/src/locales/it.json +1 -1
- package/src/locales/nl.json +3 -3
- package/src/locales/pt.json +1 -1
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swan-io/shared-business",
|
|
3
|
-
"version": "12.2.
|
|
3
|
+
"version": "12.2.7",
|
|
4
4
|
"engines": {
|
|
5
|
-
"node": "^22.12.0"
|
|
6
|
-
"pnpm": "^10.2.0"
|
|
5
|
+
"node": "^22.12.0"
|
|
7
6
|
},
|
|
8
7
|
"files": [
|
|
9
8
|
"LICENSE",
|
|
@@ -26,7 +25,7 @@
|
|
|
26
25
|
],
|
|
27
26
|
"license": "MIT",
|
|
28
27
|
"peerDependencies": {
|
|
29
|
-
"@swan-io/lake": "12.2.
|
|
28
|
+
"@swan-io/lake": "12.2.7"
|
|
30
29
|
},
|
|
31
30
|
"dependencies": {
|
|
32
31
|
"@formatjs/intl": "^3.1.6",
|
|
@@ -42,16 +41,16 @@
|
|
|
42
41
|
"react-dropzone": "^14.3.8",
|
|
43
42
|
"react-native-web": "^0.20.0",
|
|
44
43
|
"rifm": "^0.12.1",
|
|
45
|
-
"ts-pattern": "^5.7.
|
|
44
|
+
"ts-pattern": "^5.7.1",
|
|
46
45
|
"uuid": "^11.1.0"
|
|
47
46
|
},
|
|
48
47
|
"devDependencies": {
|
|
49
48
|
"@types/iban": "0.0.35",
|
|
50
|
-
"@types/react": "^19.1.
|
|
51
|
-
"@types/react-dom": "^19.1.
|
|
49
|
+
"@types/react": "^19.1.6",
|
|
50
|
+
"@types/react-dom": "^19.1.5",
|
|
52
51
|
"@types/react-native": "^0.72.8",
|
|
53
52
|
"jsdom": "^26.1.0",
|
|
54
|
-
"vitest": "^2.
|
|
55
|
-
"@swan-io/lake": "12.2.
|
|
53
|
+
"vitest": "^3.2.0",
|
|
54
|
+
"@swan-io/lake": "12.2.7"
|
|
56
55
|
}
|
|
57
56
|
}
|
|
@@ -6,6 +6,9 @@ type Item<T> = {
|
|
|
6
6
|
label: string;
|
|
7
7
|
value: T;
|
|
8
8
|
};
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated
|
|
11
|
+
*/
|
|
9
12
|
export type FilterCheckboxDef<T> = {
|
|
10
13
|
type: "checkbox";
|
|
11
14
|
label: string;
|
|
@@ -13,12 +16,18 @@ export type FilterCheckboxDef<T> = {
|
|
|
13
16
|
width?: number;
|
|
14
17
|
checkAllLabel?: string;
|
|
15
18
|
};
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated
|
|
21
|
+
*/
|
|
16
22
|
export type FilterRadioDef<T> = {
|
|
17
23
|
type: "radio";
|
|
18
24
|
label: string;
|
|
19
25
|
items: Item<T>[];
|
|
20
26
|
width?: number;
|
|
21
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* @deprecated
|
|
30
|
+
*/
|
|
22
31
|
export type FilterDateDef<Values = unknown> = {
|
|
23
32
|
type: "date";
|
|
24
33
|
label: string;
|
|
@@ -29,6 +38,9 @@ export type FilterDateDef<Values = unknown> = {
|
|
|
29
38
|
isSelectable?: (date: DatePickerDate, filters: Values) => boolean;
|
|
30
39
|
validate?: (value: string, filters: Values) => ValidatorResult;
|
|
31
40
|
};
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated
|
|
43
|
+
*/
|
|
32
44
|
export type FilterInputDef = {
|
|
33
45
|
type: "input";
|
|
34
46
|
label: string;
|
|
@@ -43,6 +55,9 @@ type ExtractFilterValue<T extends Filter<unknown>> = T extends {
|
|
|
43
55
|
type: "radio";
|
|
44
56
|
} ? T["items"][number]["value"] | undefined : string | undefined;
|
|
45
57
|
type FiltersDefinition = Record<string, Filter<unknown>>;
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated
|
|
60
|
+
*/
|
|
46
61
|
export type FiltersState<T extends FiltersDefinition> = Simplify<{
|
|
47
62
|
[K in keyof T]: Simplify<ExtractFilterValue<T[K]>>;
|
|
48
63
|
}>;
|
|
@@ -53,7 +68,13 @@ type FiltersStackProps<Definition extends FiltersDefinition, State extends Filte
|
|
|
53
68
|
onChangeOpened: (value: (keyof Definition)[]) => void;
|
|
54
69
|
onChangeFilters: (value: State) => void;
|
|
55
70
|
};
|
|
71
|
+
/**
|
|
72
|
+
* @deprecated
|
|
73
|
+
*/
|
|
56
74
|
export declare const FiltersStack: <T extends FiltersDefinition>({ filters, openedFilters, definition, onChangeOpened, onChangeFilters, }: FiltersStackProps<T>) => import("react/jsx-runtime").JSX.Element | null;
|
|
75
|
+
/**
|
|
76
|
+
* @deprecated
|
|
77
|
+
*/
|
|
57
78
|
export declare const filter: {
|
|
58
79
|
readonly checkbox: <T>(config: {
|
|
59
80
|
label: string;
|
|
@@ -74,6 +95,9 @@ export declare const filter: {
|
|
|
74
95
|
items: Item<T>[];
|
|
75
96
|
}) => FilterRadioDef<T>;
|
|
76
97
|
};
|
|
98
|
+
/**
|
|
99
|
+
* @deprecated
|
|
100
|
+
*/
|
|
77
101
|
export declare const useFiltersProps: <Definition extends FiltersDefinition, Filters extends Record<string, unknown>>({ available, filters, filtersDefinition, }: {
|
|
78
102
|
available?: ReadonlyArray<keyof Filters>;
|
|
79
103
|
filters: Filters;
|
|
@@ -170,6 +170,9 @@ const FilterInput = ({ label, initialValue = "", noValueText, autoOpen = false,
|
|
|
170
170
|
return (_jsxs(View, { style: styles.container, children: [_jsx(FilterTag, { label: label, onPress: toggle, ref: tagRef, onPressRemove: onPressRemove, isActive: visible, value: validValue !== null && validValue !== void 0 ? validValue : noValueText }), _jsx(Popover, { role: "listbox", matchReferenceWidth: false, onDismiss: close, referenceRef: tagRef, returnFocus: false, visible: visible, children: _jsx(View, { style: [styles.dropdown, styles.inputContent], children: _jsx(LakeLabel, { label: label, render: id => (_jsx(LakeTextInput, { id: id, value: inputValue, error: error, style: styles.input, placeholder: placeholder, onChangeText: onChangeText })) }) }) })] }));
|
|
171
171
|
};
|
|
172
172
|
const getFilterValue = (_type, filters, name) => filters[name];
|
|
173
|
+
/**
|
|
174
|
+
* @deprecated
|
|
175
|
+
*/
|
|
173
176
|
export const FiltersStack = ({ filters, openedFilters, definition, onChangeOpened, onChangeFilters, }) => {
|
|
174
177
|
const previousOpened = usePreviousValue(openedFilters);
|
|
175
178
|
const lastOpenedFilter = openedFilters.length > previousOpened.length
|
|
@@ -203,6 +206,9 @@ export const FiltersStack = ({ filters, openedFilters, definition, onChangeOpene
|
|
|
203
206
|
.exhaustive() }, filterName));
|
|
204
207
|
}) }));
|
|
205
208
|
};
|
|
209
|
+
/**
|
|
210
|
+
* @deprecated
|
|
211
|
+
*/
|
|
206
212
|
export const filter = {
|
|
207
213
|
checkbox: (config) => ({
|
|
208
214
|
type: "checkbox",
|
|
@@ -233,6 +239,9 @@ export const filter = {
|
|
|
233
239
|
items: config.items,
|
|
234
240
|
}),
|
|
235
241
|
};
|
|
242
|
+
/**
|
|
243
|
+
* @deprecated
|
|
244
|
+
*/
|
|
236
245
|
export const useFiltersProps = ({ available, filters, filtersDefinition, }) => {
|
|
237
246
|
const availableFilters = useMemo(() => {
|
|
238
247
|
const availableSet = new Set(isNullish(available) ? Dict.keys(filtersDefinition) : available);
|
package/src/locales/de.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"accountStatement.closingBalance": "Endsaldo",
|
|
6
6
|
"accountStatement.column.credit": "Guthaben (€)",
|
|
7
7
|
"accountStatement.column.date": "Datum",
|
|
8
|
-
"accountStatement.column.debit": "
|
|
8
|
+
"accountStatement.column.debit": "Lastschrift (€)",
|
|
9
9
|
"accountStatement.column.description": "Beschreibung",
|
|
10
10
|
"accountStatement.column.fees": "Gebühren",
|
|
11
11
|
"accountStatement.column.totals": "Summen",
|
|
@@ -303,7 +303,7 @@
|
|
|
303
303
|
"supportingDocuments.purpose.Banking.description": "Ein Kontoauszug mit den Namen der Organisation.",
|
|
304
304
|
"supportingDocuments.purpose.CapitalShareDepositCertificate": "Zertifikat über die Einzahlung des Stammkapitals",
|
|
305
305
|
"supportingDocuments.purpose.CompanyLeaseAgreement": "Firmen-Pachtvertrag",
|
|
306
|
-
"supportingDocuments.purpose.CompanyRegistration": "Nachweis der Zulassung
|
|
306
|
+
"supportingDocuments.purpose.CompanyRegistration": "Nachweis der Zulassung",
|
|
307
307
|
"supportingDocuments.purpose.CompanyRegistration.description": "Ein Dokument, das die rechtliche Registrierung eines Unternehmen oder Wirtschaftseinheit bei der zuständigen Regierungsbehörde bestätigt. Das Dokument muss weniger als 3 Monate alt sein.",
|
|
308
308
|
"supportingDocuments.purpose.CorporateIncomeTaxReturn": "Körperschaftsteuererklärung",
|
|
309
309
|
"supportingDocuments.purpose.FinancialStatements": "Letzte Körperschaftsteuererklärung",
|
package/src/locales/es.json
CHANGED
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
"accountStatement.bic": "BIC",
|
|
3
3
|
"accountStatement.card": "Tarjeta",
|
|
4
4
|
"accountStatement.check": "Cheque",
|
|
5
|
-
"accountStatement.closingBalance": "Saldo
|
|
5
|
+
"accountStatement.closingBalance": "Saldo de cierre",
|
|
6
6
|
"accountStatement.column.credit": "Crédito (€)",
|
|
7
7
|
"accountStatement.column.date": "Fecha",
|
|
8
8
|
"accountStatement.column.debit": "Débito (€)",
|
|
9
9
|
"accountStatement.column.description": "Descripción",
|
|
10
|
-
"accountStatement.column.fees": "
|
|
10
|
+
"accountStatement.column.fees": "Tasas",
|
|
11
11
|
"accountStatement.column.totals": "Totales",
|
|
12
12
|
"accountStatement.column.type": "Tipo",
|
|
13
13
|
"accountStatement.contactSupport": "Contactar con Swan",
|
|
14
14
|
"accountStatement.creditTransfer": "Transferencia de crédito",
|
|
15
15
|
"accountStatement.date": "Desde {openingDate} hasta {closingDate}",
|
|
16
16
|
"accountStatement.directDebit": "Domiciliación bancaria",
|
|
17
|
-
"accountStatement.fees": "
|
|
17
|
+
"accountStatement.fees": "Tasas",
|
|
18
18
|
"accountStatement.iban": "IBAN",
|
|
19
19
|
"accountStatement.openingBalance": "Saldo inicial",
|
|
20
|
-
"accountStatement.partnership": "En
|
|
20
|
+
"accountStatement.partnership": "En colaboración con",
|
|
21
21
|
"accountStatement.titleDocument": "Extracto de cuenta",
|
|
22
22
|
"accountStatement.titleDocument.companyDescription": "Cuenta de empresa - en euros",
|
|
23
23
|
"accountStatement.titleDocument.individualDescription": "Cuenta personal - en euros",
|
package/src/locales/fi.json
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
{
|
|
2
|
-
"accountStatement.bic": "BIC",
|
|
3
|
-
"accountStatement.card": "
|
|
4
|
-
"accountStatement.check": "
|
|
5
|
-
"accountStatement.closingBalance": "
|
|
6
|
-
"accountStatement.column.credit": "
|
|
7
|
-
"accountStatement.column.date": "
|
|
8
|
-
"accountStatement.column.debit": "
|
|
9
|
-
"accountStatement.column.description": "
|
|
10
|
-
"accountStatement.column.fees": "
|
|
11
|
-
"accountStatement.column.totals": "
|
|
12
|
-
"accountStatement.column.type": "
|
|
13
|
-
"accountStatement.contactSupport": "
|
|
14
|
-
"accountStatement.creditTransfer": "
|
|
15
|
-
"accountStatement.date": "
|
|
16
|
-
"accountStatement.directDebit": "
|
|
17
|
-
"accountStatement.fees": "
|
|
2
|
+
"accountStatement.bic": "BIC-koodi",
|
|
3
|
+
"accountStatement.card": "Kortti",
|
|
4
|
+
"accountStatement.check": "Shekki",
|
|
5
|
+
"accountStatement.closingBalance": "Loppusaldo",
|
|
6
|
+
"accountStatement.column.credit": "Luotto (€)",
|
|
7
|
+
"accountStatement.column.date": "Päivämäärä",
|
|
8
|
+
"accountStatement.column.debit": "Veloitus (€)",
|
|
9
|
+
"accountStatement.column.description": "Kuvaus",
|
|
10
|
+
"accountStatement.column.fees": "Maksut",
|
|
11
|
+
"accountStatement.column.totals": "Yhteensä",
|
|
12
|
+
"accountStatement.column.type": "Tyyppi",
|
|
13
|
+
"accountStatement.contactSupport": "Ota yhteyttä Swaniin",
|
|
14
|
+
"accountStatement.creditTransfer": "Tilisiirto",
|
|
15
|
+
"accountStatement.date": "Al {openingDate} kaen {closingDate}",
|
|
16
|
+
"accountStatement.directDebit": "Suoraveloitus",
|
|
17
|
+
"accountStatement.fees": "Maksut",
|
|
18
18
|
"accountStatement.iban": "IBAN",
|
|
19
|
-
"accountStatement.openingBalance": "
|
|
20
|
-
"accountStatement.partnership": "
|
|
21
|
-
"accountStatement.titleDocument": "
|
|
22
|
-
"accountStatement.titleDocument.companyDescription": "
|
|
23
|
-
"accountStatement.titleDocument.individualDescription": "
|
|
19
|
+
"accountStatement.openingBalance": "Aloitussaldo",
|
|
20
|
+
"accountStatement.partnership": "Kumppanina",
|
|
21
|
+
"accountStatement.titleDocument": "Tilinpäätös",
|
|
22
|
+
"accountStatement.titleDocument.companyDescription": "Yritystili - euroina",
|
|
23
|
+
"accountStatement.titleDocument.individualDescription": "Henkilökohtainen tili - euroina",
|
|
24
24
|
"addressFormPart.addressLabel": "Kirjoita osoitteesi",
|
|
25
25
|
"addressFormPart.cityLabel": "Kaupunki",
|
|
26
26
|
"addressFormPart.placeholder": "Aloita kirjoittaminen...",
|
package/src/locales/fr.json
CHANGED
|
@@ -6,19 +6,19 @@
|
|
|
6
6
|
"accountStatement.column.credit": "Crédit (€)",
|
|
7
7
|
"accountStatement.column.date": "Date",
|
|
8
8
|
"accountStatement.column.debit": "Débit (€)",
|
|
9
|
-
"accountStatement.column.description": "
|
|
9
|
+
"accountStatement.column.description": "Descriptif",
|
|
10
10
|
"accountStatement.column.fees": "Frais",
|
|
11
|
-
"accountStatement.column.totals": "
|
|
11
|
+
"accountStatement.column.totals": "Totaux",
|
|
12
12
|
"accountStatement.column.type": "Type",
|
|
13
13
|
"accountStatement.contactSupport": "Contacter Swan",
|
|
14
|
-
"accountStatement.creditTransfer": "
|
|
15
|
-
"accountStatement.date": "Du {openingDate}
|
|
16
|
-
"accountStatement.directDebit": "Prélèvement
|
|
14
|
+
"accountStatement.creditTransfer": "Transfert de crédit",
|
|
15
|
+
"accountStatement.date": "Du {openingDate} à {closingDate}",
|
|
16
|
+
"accountStatement.directDebit": "Prélèvement",
|
|
17
17
|
"accountStatement.fees": "Frais",
|
|
18
18
|
"accountStatement.iban": "IBAN",
|
|
19
19
|
"accountStatement.openingBalance": "Solde d'ouverture",
|
|
20
20
|
"accountStatement.partnership": "En partenariat avec",
|
|
21
|
-
"accountStatement.titleDocument": "
|
|
21
|
+
"accountStatement.titleDocument": "Relevé de compte",
|
|
22
22
|
"accountStatement.titleDocument.companyDescription": "Compte professionnel - en euros",
|
|
23
23
|
"accountStatement.titleDocument.individualDescription": "Compte personnel - en euros",
|
|
24
24
|
"addressFormPart.addressLabel": "Saisissez votre adresse",
|
package/src/locales/it.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"accountStatement.column.type": "Tipo",
|
|
13
13
|
"accountStatement.contactSupport": "Contatta Swan",
|
|
14
14
|
"accountStatement.creditTransfer": "Bonifico",
|
|
15
|
-
"accountStatement.date": "
|
|
15
|
+
"accountStatement.date": "Dal {openingDate} al {closingDate}",
|
|
16
16
|
"accountStatement.directDebit": "Addebito diretto",
|
|
17
17
|
"accountStatement.fees": "Commissioni",
|
|
18
18
|
"accountStatement.iban": "IBAN",
|
package/src/locales/nl.json
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
"accountStatement.bic": "BIC",
|
|
3
3
|
"accountStatement.card": "Kaart",
|
|
4
4
|
"accountStatement.check": "Cheque",
|
|
5
|
-
"accountStatement.closingBalance": "
|
|
6
|
-
"accountStatement.column.credit": "
|
|
5
|
+
"accountStatement.closingBalance": "Eindsaldo",
|
|
6
|
+
"accountStatement.column.credit": "Krediet (€)",
|
|
7
7
|
"accountStatement.column.date": "Datum",
|
|
8
8
|
"accountStatement.column.debit": "Debet (€)",
|
|
9
9
|
"accountStatement.column.description": "Omschrijving",
|
|
10
10
|
"accountStatement.column.fees": "Kosten",
|
|
11
|
-
"accountStatement.column.totals": "
|
|
11
|
+
"accountStatement.column.totals": "Totalen",
|
|
12
12
|
"accountStatement.column.type": "Type",
|
|
13
13
|
"accountStatement.contactSupport": "Neem contact op met Swan",
|
|
14
14
|
"accountStatement.creditTransfer": "Overschrijving",
|
package/src/locales/pt.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"accountStatement.column.type": "Tipo",
|
|
13
13
|
"accountStatement.contactSupport": "Contacte a Swan",
|
|
14
14
|
"accountStatement.creditTransfer": "Transferência de crédito",
|
|
15
|
-
"accountStatement.date": "De {openingDate}
|
|
15
|
+
"accountStatement.date": "De {openingDate} até {closingDate}",
|
|
16
16
|
"accountStatement.directDebit": "Débito direto",
|
|
17
17
|
"accountStatement.fees": "Taxas",
|
|
18
18
|
"accountStatement.iban": "IBAN",
|