@swan-io/shared-business 13.6.2 → 13.6.4

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.6.2",
3
+ "version": "13.6.4",
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.6.2"
28
+ "@swan-io/lake": "13.6.4"
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.6.2"
53
+ "@swan-io/lake": "13.6.4"
54
54
  }
55
55
  }
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { SwanLogo } from "@swan-io/lake/src/components/SwanLogo";
3
3
  import { colors } from "@swan-io/lake/src/constants/design";
4
4
  import { isNotNullishOrEmpty } from "@swan-io/lake/src/utils/nullish";
@@ -35,8 +35,8 @@ const styles = {
35
35
  marginLeft: 10,
36
36
  },
37
37
  defaultLogo: {
38
- height: LOGO_MAX_HEIGHT,
39
- width: (45 / 10) * LOGO_MAX_HEIGHT,
38
+ height: 20,
39
+ width: (45 / 10) * 20,
40
40
  },
41
41
  swanLogo: {
42
42
  height: 8,
@@ -52,12 +52,12 @@ const styles = {
52
52
  },
53
53
  };
54
54
  const logoStyle = {
55
- height: LOGO_MAX_HEIGHT,
55
+ maxHeight: LOGO_MAX_HEIGHT,
56
56
  maxWidth: LOGO_MAX_WIDTH,
57
57
  objectFit: "contain",
58
58
  objectPosition: "left",
59
59
  };
60
60
  export const AccountStatementHeader = ({ partnerLogoUrl, language, }) => {
61
61
  const t = useTranslation(language);
62
- return (_jsxs("div", { style: styles.container, children: [_jsxs("div", { style: styles.logo, children: [isNotNullishOrEmpty(partnerLogoUrl) ? (_jsx("img", { src: partnerLogoUrl, style: logoStyle })) : (_jsx(SwanLogo, { style: styles.defaultLogo })), _jsxs("div", { style: styles.partnership, children: [_jsx("div", { style: styles.partnershipText, children: t("accountStatement.partnership") }), _jsx(SwanLogo, { color: colors.gray[900], style: styles.swanLogo })] })] }), _jsxs("div", { style: styles.pageNumber, children: [t("accountStatement.page"), " ", _jsx("span", { className: "pageNumber" }), "/", _jsx("span", { className: "totalPages" })] })] }));
62
+ return (_jsxs("div", { style: styles.container, children: [_jsx("div", { style: styles.logo, children: isNotNullishOrEmpty(partnerLogoUrl) ? (_jsxs(_Fragment, { children: [_jsx("img", { src: partnerLogoUrl, style: logoStyle }), _jsxs("div", { style: styles.partnership, children: [_jsx("div", { style: styles.partnershipText, children: t("accountStatement.partnership") }), _jsx(SwanLogo, { color: colors.gray[900], style: styles.swanLogo })] })] })) : (_jsx(SwanLogo, { style: styles.defaultLogo })) }), _jsxs("div", { style: styles.pageNumber, children: [t("accountStatement.page"), " ", _jsx("span", { className: "pageNumber" }), "/", _jsx("span", { className: "totalPages" })] })] }));
63
63
  };
@@ -6,5 +6,6 @@ export type BirthdatePickerProps = {
6
6
  onValueChange?: (value: string | undefined) => void;
7
7
  style?: StyleProp<ViewStyle>;
8
8
  readOnly?: boolean;
9
+ responsive?: boolean;
9
10
  };
10
- export declare const BirthdatePicker: ({ value, label, readOnly, onValueChange, error: externalError, style, }: BirthdatePickerProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const BirthdatePicker: ({ value, label, readOnly, onValueChange, error: externalError, style, responsive, }: BirthdatePickerProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { validateBirthdate } from "../utils/validation";
3
3
  import { InlineDatePicker } from "./InlineDatePicker";
4
- export const BirthdatePicker = ({ value, label, readOnly = false, onValueChange, error: externalError, style, }) => {
5
- return (_jsx(InlineDatePicker, { value: value, label: label, readOnly: readOnly, onValueChange: onValueChange, error: externalError, style: style, validate: validateBirthdate }));
4
+ export const BirthdatePicker = ({ value, label, readOnly = false, onValueChange, error: externalError, style, responsive = true, }) => {
5
+ return (_jsx(InlineDatePicker, { value: value, label: label, readOnly: readOnly, onValueChange: onValueChange, error: externalError, style: style, validate: validateBirthdate, responsive: responsive }));
6
6
  };
@@ -7,6 +7,7 @@ export type InlineDatePickerProps = {
7
7
  onValueChange?: (value: string | undefined) => void;
8
8
  style?: StyleProp<ViewStyle>;
9
9
  readOnly?: boolean;
10
+ responsive?: boolean;
10
11
  validate?: (value: ExtractedDate | undefined) => string | undefined;
11
12
  };
12
- export declare const InlineDatePicker: ({ value, label, readOnly, onValueChange, validate, error: externalError, style, }: InlineDatePickerProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const InlineDatePicker: ({ value, label, readOnly, responsive, onValueChange, validate, error: externalError, style, }: InlineDatePickerProps) => import("react/jsx-runtime").JSX.Element;
@@ -58,8 +58,9 @@ const order = match(getMostLikelyUserCountry().cca2)
58
58
  .with("US", () => "MDY")
59
59
  .with("CN", "JP", "KR", "KP", "TW", "HU", "MN", "LT", "BT", () => "YMD")
60
60
  .otherwise(() => "DMY");
61
- export const InlineDatePicker = ({ value, label, readOnly = false, onValueChange, validate = validateDate, error: externalError, style, }) => {
62
- const { desktop } = useResponsive(breakpoints.small);
61
+ export const InlineDatePicker = ({ value, label, readOnly = false, responsive = true, onValueChange, validate = validateDate, error: externalError, style, }) => {
62
+ const { desktop: isDesktopViewport } = useResponsive(breakpoints.small);
63
+ const desktop = responsive && isDesktopViewport;
63
64
  // We can't rely on blurred, since 3 inputs / select are mapped on
64
65
  // 1 field. The first onBlur update the field internal state from
65
66
  // not blurred -> blurred, then when the second input is blurred,
@@ -128,7 +128,7 @@
128
128
  "forecastYearlyIncome.from1000001To5000000": "Zwischen 1.000.000 € und 5.000.000 €",
129
129
  "forecastYearlyIncome.from500001To1000000": "Zwischen 500.000 € und 1.000.000 €",
130
130
  "forecastYearlyIncome.moreThan5000000": "Mehr als 5.000.000 €",
131
- "monthlyPaymentVolume.between10000And50000": "Zwischen 10.000 und 50.000 € pro Monat",
131
+ "monthlyPaymentVolume.between10000And50000": "Zwischen 10.000 und 50.000 € pro Monat",
132
132
  "monthlyPaymentVolume.between50000And100000": "Zwischen 50.000 € und 100.000 € pro Monat",
133
133
  "monthlyPaymentVolume.lessThan10000": "Weniger als 10.000 € pro Monat",
134
134
  "monthlyPaymentVolume.moreThan100000": "Mehr als 100.000 € pro Monat",
@@ -310,7 +310,7 @@
310
310
  "supportingDocuments.downloadTemplate": "Vorlage herunterladen",
311
311
  "supportingDocuments.errorUpload": "Datei konnte nicht hochgeladen werden",
312
312
  "supportingDocuments.help.downloadTemplate": "Vorlage herunterladen",
313
- "supportingDocuments.help.howToSendAGoodDocument": "Wie versendet man ein gutes Dokument?",
313
+ "supportingDocuments.help.howToSendAGoodDocument": "Wie versendet man ein korrektes Dokument?",
314
314
  "supportingDocuments.help.whatIsThis": "Was ist das?",
315
315
  "supportingDocuments.informations": "Details zum Dokument",
316
316
  "supportingDocuments.noDocuments": "Keine Dokumente.",