@swan-io/shared-business 1.4.4 → 1.5.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": "1.4.4",
3
+ "version": "1.5.0",
4
4
  "engines": {
5
5
  "node": ">=14.0.0",
6
6
  "yarn": "^1.20.0"
@@ -32,12 +32,16 @@
32
32
  "@formatjs/intl": "^2.6.9",
33
33
  "@googlemaps/js-api-loader": "^1.15.1",
34
34
  "@swan-io/boxed": "^0.12.1",
35
+ "dayjs": "^1.11.7",
35
36
  "react": "^18.2.0",
36
37
  "react-atomic-state": "^1.2.7",
37
38
  "react-dom": "^18.2.0",
38
- "react-native-web": "^0.18.12",
39
+ "react-dropzone": "^14.2.3",
40
+ "react-native-web": "^0.19.1",
39
41
  "react-ux-form": "^1.3.0",
40
- "ts-pattern": "^4.2.1"
42
+ "rifm": "^0.12.1",
43
+ "ts-pattern": "^4.2.1",
44
+ "uuid": "^9.0.0"
41
45
  },
42
46
  "devDependencies": {
43
47
  "@swan-io/lake": "^1.3.2",
@@ -46,7 +50,7 @@
46
50
  "@types/google.maps": "^3.52.3",
47
51
  "@types/react": "^18.0.28",
48
52
  "@types/react-dom": "^18.0.11",
49
- "@types/react-native": "^0.70.12",
53
+ "@types/react-native": "^0.71.5",
50
54
  "@types/uuid": "^9.0.1",
51
55
  "jsdom": "^21.1.1",
52
56
  "vitest": "^0.29.7"
@@ -22,5 +22,5 @@ export const AddressFormPart = ({ initialAddress, initialCity, initialPostalCode
22
22
  setFieldValue("postalCode", place.postalCode);
23
23
  setManualMode.on();
24
24
  }, [setManualMode, setFieldValue]);
25
- return (_jsxs(_Fragment, { children: [_jsx(Field, { name: "address", children: ({ ref, value, onChange, error }) => (_jsx(LakeLabel, { label: label ?? t("addressFormPart.addressLabel"), optionalLabel: optionalLabel, render: id => (_jsx(AddressSearchInput, { inputRef: ref, emptyResultText: t("common.noResult"), placeholder: placeholder ?? t("addressFormPart.placeholder"), language: locale.language, id: id, country: country, value: value, error: error, onValueChange: onChange, onSuggestion: onSuggestion })), actions: !manualModeEnabled && isLarge ? (_jsx(LakeButton, { mode: "secondary", size: "small", onPress: setManualMode.on, children: t("addressFormPart.setManual") })) : null })) }), !manualModeEnabled && !isLarge ? (_jsx(LakeButton, { mode: "secondary", size: "small", onPress: setManualMode.on, children: t("addressFormPart.setManual") })) : null, manualModeEnabled ? (_jsxs(_Fragment, { children: [_jsx(Space, { height: 12 }), _jsx(Field, { name: "city", children: ({ ref, value, valid, error, onChange }) => (_jsx(LakeLabel, { label: t("addressFormPart.cityLabel"), render: id => (_jsx(LakeTextInput, { ref: ref, nativeID: id, value: value, valid: valid, error: error, onChangeText: onChange })) })) }), _jsx(Space, { height: 12 }), _jsx(Field, { name: "postalCode", children: ({ ref, value, valid, error, onChange }) => (_jsx(LakeLabel, { label: t("addressFormPart.postCodeLabel"), render: id => (_jsx(LakeTextInput, { ref: ref, nativeID: id, value: value, valid: valid, error: error, onChangeText: onChange })) })) })] })) : null] }));
25
+ return (_jsxs(_Fragment, { children: [_jsx(Field, { name: "address", children: ({ ref, value, onChange, error }) => (_jsx(LakeLabel, { label: label ?? t("addressFormPart.addressLabel"), optionalLabel: optionalLabel, render: id => (_jsx(AddressSearchInput, { inputRef: ref, emptyResultText: t("common.noResult"), placeholder: placeholder ?? t("addressFormPart.placeholder"), language: locale.language, id: id, country: country, value: value, error: error, onValueChange: onChange, onSuggestion: onSuggestion })), actions: !manualModeEnabled && isLarge ? (_jsx(LakeButton, { mode: "secondary", size: "small", onPress: setManualMode.on, children: t("addressFormPart.setManual") })) : null })) }), !manualModeEnabled && !isLarge ? (_jsx(LakeButton, { mode: "secondary", size: "small", onPress: setManualMode.on, children: t("addressFormPart.setManual") })) : null, manualModeEnabled ? (_jsxs(_Fragment, { children: [_jsx(Space, { height: 12 }), _jsx(Field, { name: "city", children: ({ ref, value, valid, error, onChange }) => (_jsx(LakeLabel, { label: t("addressFormPart.cityLabel"), render: id => (_jsx(LakeTextInput, { ref: ref, id: id, value: value, valid: valid, error: error, onChangeText: onChange })) })) }), _jsx(Space, { height: 12 }), _jsx(Field, { name: "postalCode", children: ({ ref, value, valid, error, onChange }) => (_jsx(LakeLabel, { label: t("addressFormPart.postCodeLabel"), render: id => (_jsx(LakeTextInput, { ref: ref, id: id, value: value, valid: valid, error: error, onChangeText: onChange })) })) })] })) : null] }));
26
26
  };
@@ -17,10 +17,12 @@ const styles = StyleSheet.create({
17
17
  itemTitle: {
18
18
  ...typography.bodyLarge,
19
19
  lineHeight: typography.lineHeights.title,
20
+ userSelect: "none",
20
21
  },
21
22
  itemSubtitle: {
22
23
  ...typography.bodySmall,
23
24
  color: colors.gray[50],
25
+ userSelect: "none",
24
26
  },
25
27
  poweredByGoogle: {
26
28
  paddingVertical: 8,
@@ -103,16 +105,12 @@ export const AddressSearchInput = ({ inputRef, id, country, disabled, error, val
103
105
  onSuggestion?.(result);
104
106
  });
105
107
  };
106
- return (_jsx(LakeCombobox, { inputRef: inputRef, nativeID: id, placeholder: placeholder, value: value, items: state, icon: "search-filled", disabled: disabled, error: error, ListFooterComponent: _jsx(Box, { direction: "row", justifyContent: "end", style: styles.poweredByGoogle, children: _jsx(AutoWidthImage, { height: 14, sourceUri: poweredByGoogle }) }), onSelectItem: suggestion => selectAddress(suggestion), onValueChange: value => {
108
+ return (_jsx(LakeCombobox, { inputRef: inputRef, id: id, placeholder: placeholder, value: value, items: state, icon: "search-filled", disabled: disabled, error: error, ListFooterComponent: _jsx(Box, { direction: "row", justifyContent: "end", style: styles.poweredByGoogle, children: _jsx(AutoWidthImage, { height: 14, sourceUri: poweredByGoogle }) }), onSelectItem: suggestion => selectAddress(suggestion), onValueChange: value => {
107
109
  setValue(value);
108
110
  onValueChange(value);
109
- }, keyExtractor: item => item.value, emptyResultText: emptyResultText, renderItem: item => (_jsxs(_Fragment, { children: [_jsx(Text, { numberOfLines: 1, selectable: false, style: styles.itemTitle, children: item.prediction.structured_formatting.main_text }), _jsx(Text, { numberOfLines: 1, selectable: false, style: styles.itemSubtitle, children: item.prediction.structured_formatting.secondary_text })] })) }));
111
+ }, keyExtractor: item => item.value, emptyResultText: emptyResultText, renderItem: item => (_jsxs(_Fragment, { children: [_jsx(Text, { numberOfLines: 1, style: styles.itemTitle, children: item.prediction.structured_formatting.main_text }), _jsx(Text, { numberOfLines: 1, style: styles.itemSubtitle, children: item.prediction.structured_formatting.secondary_text })] })) }));
110
112
  }
111
- return (_jsx(LakeTextInput
112
- // @ts-expect-error
113
- , {
114
- // @ts-expect-error
115
- ref: inputRef, nativeID: id, placeholder: placeholder, value: value, icon: "search-filled", disabled: disabled, error: error, onChangeText: value => {
113
+ return (_jsx(LakeTextInput, { ref: inputRef, id: id, placeholder: placeholder, value: value, icon: "search-filled", disabled: disabled, error: error, onChangeText: value => {
116
114
  setValue(value);
117
115
  onValueChange(value);
118
116
  } }));
@@ -269,14 +269,14 @@ export const BeneficiaryForm = forwardRef(({ initialState, accountCountry, step,
269
269
  };
270
270
  });
271
271
  return (_jsx(ResponsiveContainer, { breakpoint: breakpoints.tiny, children: ({ small, large }) => (_jsxs(_Fragment, { children: [match(step)
272
- .with("common", () => (_jsxs(View, { accessibilityRole: "form", children: [_jsxs(Box, { direction: small ? "column" : "row", children: [_jsx(Field, { name: "firstName", children: ({ value, onChange, error }) => (_jsx(LakeLabel, { label: t("beneficiaryForm.beneficiary.firstName"), style: styles.inputContainer, render: id => (_jsx(LakeTextInput, { error: error, placeholder: t("beneficiaryForm.beneficiary.firstNamePlaceholder"), nativeID: id, value: value, onChangeText: onChange })) })) }), _jsx(Space, { width: 12 }), _jsx(Field, { name: "lastName", children: ({ value, onChange, error }) => (_jsx(LakeLabel, { label: t("beneficiaryForm.beneficiary.lastName"), style: styles.inputContainer, render: id => (_jsx(LakeTextInput, { error: error, placeholder: t("beneficiaryForm.beneficiary.lastNamePlaceholder"), nativeID: id, value: value, onChangeText: onChange })) })) })] }), _jsxs(Box, { direction: small ? "column" : "row", children: [_jsx(Field, { name: "birthDate", children: ({ value, onChange, error }) => (_jsx(LakeLabel, { label: t("beneficiaryForm.beneficiary.birthDate"), style: styles.inputContainer, render: id => (_jsx(Rifm, { value: value ?? "", onChange: onChange, ...rifmDateProps, children: ({ value, onChange }) => (_jsx(LakeTextInput, { error: error, placeholder: locale.datePlaceholder, nativeID: id, value: value, onChange: onChange })) })) })) }), _jsx(Space, { width: 12 }), _jsx(Field, { name: "birthCountryCode", children: ({ value, onChange, error }) => (_jsx(LakeLabel, { label: t("beneficiaryForm.beneficiary.birthCountry"), style: styles.inputContainer, render: id => (_jsx(CountryPicker, { nativeID: id, error: error, value: value, placeholder: t("beneficiaryForm.beneficiary.birthCountryPlaceholder"), items: allCountriesItems, onValueChange: onChange })) })) })] }), _jsx(Box, { direction: small ? "column" : "row", children: _jsx(FieldsListener, { names: ["birthCountryCode"], children: ({ birthCountryCode }) => (_jsxs(_Fragment, { children: [_jsx(Field, { name: "birthCity", children: ({ value, onChange, error }) => (_jsx(LakeLabel, { label: t("beneficiaryForm.beneficiary.birthCity"), style: styles.inputContainer, render: id => (_jsx(LakeCityInput, { nativeID: id, error: error, country: birthCountryCode.value, value: value ?? "", onValueChange: onChange, placeholder: birthCountryCode.value == null
272
+ .with("common", () => (_jsxs(View, { role: "form", children: [_jsxs(Box, { direction: small ? "column" : "row", children: [_jsx(Field, { name: "firstName", children: ({ value, onChange, error }) => (_jsx(LakeLabel, { label: t("beneficiaryForm.beneficiary.firstName"), style: styles.inputContainer, render: id => (_jsx(LakeTextInput, { error: error, placeholder: t("beneficiaryForm.beneficiary.firstNamePlaceholder"), id: id, value: value, onChangeText: onChange })) })) }), _jsx(Space, { width: 12 }), _jsx(Field, { name: "lastName", children: ({ value, onChange, error }) => (_jsx(LakeLabel, { label: t("beneficiaryForm.beneficiary.lastName"), style: styles.inputContainer, render: id => (_jsx(LakeTextInput, { error: error, placeholder: t("beneficiaryForm.beneficiary.lastNamePlaceholder"), id: id, value: value, onChangeText: onChange })) })) })] }), _jsxs(Box, { direction: small ? "column" : "row", children: [_jsx(Field, { name: "birthDate", children: ({ value, onChange, error }) => (_jsx(LakeLabel, { label: t("beneficiaryForm.beneficiary.birthDate"), style: styles.inputContainer, render: id => (_jsx(Rifm, { value: value ?? "", onChange: onChange, ...rifmDateProps, children: ({ value, onChange }) => (_jsx(LakeTextInput, { error: error, placeholder: locale.datePlaceholder, id: id, value: value, onChange: onChange })) })) })) }), _jsx(Space, { width: 12 }), _jsx(Field, { name: "birthCountryCode", children: ({ value, onChange, error }) => (_jsx(LakeLabel, { label: t("beneficiaryForm.beneficiary.birthCountry"), style: styles.inputContainer, render: id => (_jsx(CountryPicker, { id: id, error: error, value: value, placeholder: t("beneficiaryForm.beneficiary.birthCountryPlaceholder"), items: allCountriesItems, onValueChange: onChange })) })) })] }), _jsx(Box, { direction: small ? "column" : "row", children: _jsx(FieldsListener, { names: ["birthCountryCode"], children: ({ birthCountryCode }) => (_jsxs(_Fragment, { children: [_jsx(Field, { name: "birthCity", children: ({ value, onChange, error }) => (_jsx(LakeLabel, { label: t("beneficiaryForm.beneficiary.birthCity"), style: styles.inputContainer, render: id => (_jsx(LakeCityInput, { id: id, error: error, country: birthCountryCode.value, value: value ?? "", onValueChange: onChange, placeholder: birthCountryCode.value == null
273
273
  ? t("beneficiaryForm.beneficiary.fillBirthCountry")
274
274
  : t("beneficiaryForm.beneficiary.birthCityPlaceholder"), onSuggestion: place => {
275
275
  onChange(place.city);
276
276
  setFieldValue("birthCityPostalCode", place.postalCode);
277
277
  }, onLoadError: onCityLoadError })) })) }), _jsx(Space, { width: 12 }), _jsx(Field, { name: "birthCityPostalCode", children: ({ value, onChange, error }) => (_jsx(LakeLabel, { label: t("beneficiaryForm.beneficiary.birthPostalCode"), style: styles.inputContainer, render: id => (_jsx(LakeTextInput, { error: error, placeholder: birthCountryCode.value == null
278
278
  ? t("beneficiaryForm.beneficiary.fillBirthCountry")
279
- : t("beneficiaryForm.beneficiary.birthPostalCodePlaceholder"), nativeID: id, disabled: birthCountryCode.value === undefined, value: value, onChangeText: onChange })) })) })] })) }) }), _jsx(Field, { name: "type", children: ({ value, onChange }) => (_jsx(LakeLabel, { label: t("beneficiaryForm.beneficiary.type"), type: "radioGroup", render: () => (_jsx(RadioGroup, { direction: "row", value: value, onValueChange: onChange, items: beneficiaryTypes })) })) }), _jsx(FieldsListener, { names: ["type"], children: ({ type }) => type.value === "HasCapital" ? (_jsxs(_Fragment, { children: [_jsx(Field, { name: "totalCapitalPercentage", children: ({ value, onChange, error }) => (_jsx(LakeLabel, { label: t("beneficiaryForm.beneficiary.totalCapitalPercentage"), render: id => (_jsx(LakeTextInput, { error: error, unit: "%", keyboardType: "decimal-pad", accessibilityValueMin: 0, accessibilityValueMax: 100, nativeID: id, value: value, onChangeText: onChange })) })) }), _jsx(Space, { height: 12 }), _jsx(Field, { name: "capitalType", children: ({ value, error, onChange }) => (_jsx(CapitalTypeCheckboxes, { value: value ?? "none", error: error, onChange: onChange })) })] })) : null })] })))
280
- .with("address", () => (_jsxs(View, { accessibilityRole: "form", children: [_jsx(Field, { name: "country", children: ({ value, onChange }) => (_jsx(LakeLabel, { label: t("beneficiaryForm.beneficiary.country"), render: id => (_jsx(CountryPicker, { nativeID: id, value: value, items: individualCountriesItems, onValueChange: onChange })) })) }), _jsx(Space, { height: 12 }), _jsx(FieldsListener, { names: ["country"], children: ({ country }) => (_jsxs(_Fragment, { children: [_jsx(AddressFormPart, { initialAddress: initialState?.residencyAddressLine1 ?? "", initialCity: initialState?.residencyAddressCity ?? "", initialPostalCode: initialState?.residencyAddressPostalCode ?? "", country: country?.value ?? accountCountry, label: t("beneficiaryForm.beneficiary.address"), Field: Field, setFieldValue: setFieldValue, listenFields: listenFields, isLarge: large }), country?.value === "DEU" && (_jsxs(_Fragment, { children: [_jsx(Space, { height: 12 }), _jsx(Field, { name: "taxIdentificationNumber", children: ({ value, error, valid, onChange }) => (_jsx(LakeLabel, { label: t("beneficiaryForm.beneficiary.taxIdentificationNumber"), optionalLabel: t("common.optional"), render: id => (_jsx(LakeTextInput, { nativeID: id, placeholder: t("beneficiaryForm.beneficiary.taxIdentificationNumberPlaceholder"), value: value, error: error, valid: valid, onChangeText: onChange })) })) })] }))] })) })] })))
279
+ : t("beneficiaryForm.beneficiary.birthPostalCodePlaceholder"), id: id, disabled: birthCountryCode.value === undefined, value: value, onChangeText: onChange })) })) })] })) }) }), _jsx(Field, { name: "type", children: ({ value, onChange }) => (_jsx(LakeLabel, { label: t("beneficiaryForm.beneficiary.type"), type: "radioGroup", render: () => (_jsx(RadioGroup, { direction: "row", value: value, onValueChange: onChange, items: beneficiaryTypes })) })) }), _jsx(FieldsListener, { names: ["type"], children: ({ type }) => type.value === "HasCapital" ? (_jsxs(_Fragment, { children: [_jsx(Field, { name: "totalCapitalPercentage", children: ({ value, onChange, error }) => (_jsx(LakeLabel, { label: t("beneficiaryForm.beneficiary.totalCapitalPercentage"), render: id => (_jsx(LakeTextInput, { error: error, unit: "%", inputMode: "decimal", "aria-valuemin": 0, "aria-valuemax": 100, id: id, value: value, onChangeText: onChange })) })) }), _jsx(Space, { height: 12 }), _jsx(Field, { name: "capitalType", children: ({ value, error, onChange }) => (_jsx(CapitalTypeCheckboxes, { value: value ?? "none", error: error, onChange: onChange })) })] })) : null })] })))
280
+ .with("address", () => (_jsxs(View, { role: "form", children: [_jsx(Field, { name: "country", children: ({ value, onChange }) => (_jsx(LakeLabel, { label: t("beneficiaryForm.beneficiary.country"), render: id => (_jsx(CountryPicker, { id: id, value: value, items: individualCountriesItems, onValueChange: onChange })) })) }), _jsx(Space, { height: 12 }), _jsx(FieldsListener, { names: ["country"], children: ({ country }) => (_jsxs(_Fragment, { children: [_jsx(AddressFormPart, { initialAddress: initialState?.residencyAddressLine1 ?? "", initialCity: initialState?.residencyAddressCity ?? "", initialPostalCode: initialState?.residencyAddressPostalCode ?? "", country: country?.value ?? accountCountry, label: t("beneficiaryForm.beneficiary.address"), Field: Field, setFieldValue: setFieldValue, listenFields: listenFields, isLarge: large }), country?.value === "DEU" && (_jsxs(_Fragment, { children: [_jsx(Space, { height: 12 }), _jsx(Field, { name: "taxIdentificationNumber", children: ({ value, error, valid, onChange }) => (_jsx(LakeLabel, { label: t("beneficiaryForm.beneficiary.taxIdentificationNumber"), optionalLabel: t("common.optional"), render: id => (_jsx(LakeTextInput, { id: id, placeholder: t("beneficiaryForm.beneficiary.taxIdentificationNumberPlaceholder"), value: value, error: error, valid: valid, onChangeText: onChange })) })) })] }))] })) })] })))
281
281
  .exhaustive(), isAddressRequired && (_jsxs(_Fragment, { children: [_jsx(Space, { height: 12 }), _jsx(StepDots, { currentStep: step, steps: formSteps })] }))] })) }));
282
282
  });
@@ -12,9 +12,9 @@ type Props<T extends CountryCCA3> = {
12
12
  error?: string;
13
13
  placeholder?: string;
14
14
  readOnly?: boolean;
15
- nativeID?: string;
15
+ id?: string;
16
16
  disabled?: boolean;
17
17
  hideErrors?: boolean;
18
18
  };
19
- export declare function CountryPicker<T extends CountryCCA3>({ onValueChange, value, items, readOnly, nativeID, error, placeholder, disabled, hideErrors, }: Props<T>): JSX.Element;
19
+ export declare function CountryPicker<T extends CountryCCA3>({ onValueChange, value, items, readOnly, id, error, placeholder, disabled, hideErrors, }: Props<T>): JSX.Element;
20
20
  export {};
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Flag } from "@swan-io/lake/src/components/Flag";
3
3
  import { LakeSelect } from "@swan-io/lake/src/components/LakeSelect";
4
4
  import { useMemo } from "react";
5
- export function CountryPicker({ onValueChange, value, items, readOnly, nativeID, error, placeholder, disabled, hideErrors, }) {
5
+ export function CountryPicker({ onValueChange, value, items, readOnly, id, error, placeholder, disabled, hideErrors, }) {
6
6
  const countries = useMemo(() => {
7
7
  const hasIntl = "Intl" in window && "DisplayNames" in window.Intl;
8
8
  const countryResolver = hasIntl && Intl.DisplayNames.supportedLocalesOf(["en"]).length
@@ -22,5 +22,5 @@ export function CountryPicker({ onValueChange, value, items, readOnly, nativeID,
22
22
  }))
23
23
  .sort((a, b) => a.name.localeCompare(b.name));
24
24
  }, [items]);
25
- return (_jsx(LakeSelect, { readOnly: readOnly, nativeID: nativeID, error: error, items: countries, placeholder: placeholder, value: value, onValueChange: onValueChange, disabled: disabled, hideErrors: hideErrors }));
25
+ return (_jsx(LakeSelect, { readOnly: readOnly, id: id, error: error, items: countries, placeholder: placeholder, value: value, onValueChange: onValueChange, disabled: disabled, hideErrors: hideErrors }));
26
26
  }
@@ -10,11 +10,11 @@ type Props = {
10
10
  country?: CountryCCA3;
11
11
  disabled?: boolean;
12
12
  error?: string;
13
- nativeID?: string;
13
+ id?: string;
14
14
  placeholder?: string;
15
15
  onSuggestion?: (place: PlaceDetail) => void;
16
16
  onLoadError: (error: unknown) => void;
17
17
  apiKey?: string;
18
18
  };
19
- export declare const LakeCityInput: ({ value, onValueChange, country, disabled, placeholder, nativeID, error, onSuggestion, onLoadError, apiKey, }: Props) => JSX.Element | null;
19
+ export declare const LakeCityInput: ({ value, onValueChange, country, disabled, placeholder, id, error, onSuggestion, onLoadError, apiKey, }: Props) => JSX.Element | null;
20
20
  export {};
@@ -17,17 +17,19 @@ const styles = StyleSheet.create({
17
17
  itemTitle: {
18
18
  ...typography.bodyLarge,
19
19
  lineHeight: typography.lineHeights.title,
20
+ userSelect: "none",
20
21
  },
21
22
  itemSubtitle: {
22
23
  ...typography.bodySmall,
23
24
  color: colors.gray[400],
25
+ userSelect: "none",
24
26
  },
25
27
  poweredByGoogle: {
26
28
  paddingVertical: 8,
27
29
  paddingHorizontal: 16,
28
30
  },
29
31
  });
30
- export const LakeCityInput = ({ value, onValueChange, country, disabled, placeholder, nativeID, error, onSuggestion, onLoadError, apiKey, }) => {
32
+ export const LakeCityInput = ({ value, onValueChange, country, disabled, placeholder, id, error, onSuggestion, onLoadError, apiKey, }) => {
31
33
  const [state, setState] = useState(AsyncData.NotAsked());
32
34
  const comboboxRef = useRef(null);
33
35
  const sdk = useGoogleMapSDK({ apiKey });
@@ -80,7 +82,7 @@ export const LakeCityInput = ({ value, onValueChange, country, disabled, placeho
80
82
  }
81
83
  });
82
84
  };
83
- return (_jsx(LakeCombobox, { ref: comboboxRef, placeholder: placeholder, value: value, items: state, icon: "search-filled", disabled: isNullish(country) || disabled, error: error, onValueChange: onValueChange, nativeID: nativeID, ListFooterComponent: _jsx(Box, { direction: "row", justifyContent: "end", style: styles.poweredByGoogle, children: _jsx(AutoWidthImage, { height: 14, sourceUri: poweredByGoogle }) }), onSelectItem: selectAddress, emptyResultText: t("common.noResult"), keyExtractor: item => item.value, renderItem: item => (_jsxs(_Fragment, { children: [_jsx(Text, { numberOfLines: 1, selectable: false, style: styles.itemTitle, children: item.prediction.structured_formatting.main_text }), _jsx(Text, { numberOfLines: 1, selectable: false, style: styles.itemSubtitle, children: item.prediction.structured_formatting.secondary_text })] })) }));
85
+ return (_jsx(LakeCombobox, { ref: comboboxRef, placeholder: placeholder, value: value, items: state, icon: "search-filled", disabled: isNullish(country) || disabled, error: error, onValueChange: onValueChange, id: id, ListFooterComponent: _jsx(Box, { direction: "row", justifyContent: "end", style: styles.poweredByGoogle, children: _jsx(AutoWidthImage, { height: 14, sourceUri: poweredByGoogle }) }), onSelectItem: selectAddress, emptyResultText: t("common.noResult"), keyExtractor: item => item.value, renderItem: item => (_jsxs(_Fragment, { children: [_jsx(Text, { numberOfLines: 1, style: styles.itemTitle, children: item.prediction.structured_formatting.main_text }), _jsx(Text, { numberOfLines: 1, style: styles.itemSubtitle, children: item.prediction.structured_formatting.secondary_text })] })) }));
84
86
  },
85
87
  });
86
88
  };
@@ -5,9 +5,9 @@ export type Document = {
5
5
  downloadUrl?: string;
6
6
  purpose: SupportingDocumentPurpose;
7
7
  };
8
- export type TypeOfRepresentation = "LegalRepresentative" | "PowerOfAttorney";
9
- export type SupportingDocumentPurpose = "AssociationRegistration" | "CompanyRegistration" | "ProofOfIdentity" | "Other" | "SignedStatus";
10
- type SupportingDocumentPurposeEnum = "AssociationRegistration" | "Banking" | "CompanyRegistration" | "Other" | "PowerOfAttorney" | "ProofOfCompanyAddress" | "ProofOfCompanyIncome" | "ProofOfIdentity" | "ProofOfIndividualAddress" | "ProofOfIndividualIncome" | "ProofOfOriginOfFunds" | "SignedStatus" | "UBODeclaration";
8
+ type SupportingDocumentPurposeEnum = "AssociationRegistration" | "Banking" | "CompanyRegistration" | "Other" | "PowerOfAttorney" | "ProofOfCompanyAddress" | "ProofOfCompanyIncome" | "ProofOfIdentity" | "ProofOfIndividualAddress" | "ProofOfIndividualIncome" | "ProofOfOriginOfFunds" | "SignedStatus" | "SwornStatement" | "UBODeclaration";
9
+ export declare const uploadableDocumentTypes: ("AssociationRegistration" | "CompanyRegistration" | "PowerOfAttorney" | "ProofOfIdentity" | "SignedStatus" | "SwornStatement" | "UBODeclaration")[];
10
+ export type SupportingDocumentPurpose = (typeof uploadableDocumentTypes)[number];
11
11
  type Props = {
12
12
  getAwsUrl: (file: File, purpose: SupportingDocumentPurpose) => Promise<{
13
13
  upload: {
@@ -16,6 +16,15 @@ import { locale, t } from "../utils/i18n";
16
16
  import { UploadArea } from "./UploadArea";
17
17
  const ACCEPTED_FORMATS = ["application/pdf", "image/png", "image/jpeg"];
18
18
  const NO_ID_YET = "NO_ID_YET";
19
+ export const uploadableDocumentTypes = [
20
+ "AssociationRegistration",
21
+ "CompanyRegistration",
22
+ "ProofOfIdentity",
23
+ "SignedStatus",
24
+ "PowerOfAttorney",
25
+ "SwornStatement",
26
+ "UBODeclaration",
27
+ ];
19
28
  const validateNotEmpty = value => {
20
29
  if (value.length === 0) {
21
30
  return t("error.requiredField");
@@ -32,8 +41,8 @@ const styles = StyleSheet.create({
32
41
  });
33
42
  const Help = (props) => {
34
43
  return match(props)
35
- .with({ type: "tooltip" }, ({ text, width }) => (_jsx(LakeTooltip, { content: t(text), width: width, togglableOnFocus: true, placement: "top", children: _jsx(LakeButton, { mode: "tertiary", size: "small", color: "gray", icon: "question-circle-regular", disabled: true, style: [styles.button, styles.buttonWithDefaultCursor], accessibilityLabel: t("supportingDoc.whatIsThis") }) })))
36
- .with({ type: "button" }, ({ label, onPress }) => (_jsx(LakeButton, { mode: "tertiary", size: "small", color: "gray", icon: "question-circle-regular", onPress: onPress, style: styles.button, accessibilityLabel: t("supportingDoc.whatIsThis"), children: label })))
44
+ .with({ type: "tooltip" }, ({ text, width }) => (_jsx(LakeTooltip, { content: t(text), width: width, togglableOnFocus: true, placement: "top", children: _jsx(LakeButton, { mode: "tertiary", size: "small", color: "gray", icon: "question-circle-regular", disabled: true, style: [styles.button, styles.buttonWithDefaultCursor], ariaLabel: t("supportingDoc.whatIsThis") }) })))
45
+ .with({ type: "button" }, ({ label, onPress }) => (_jsx(LakeButton, { mode: "tertiary", size: "small", color: "gray", icon: "question-circle-regular", onPress: onPress, style: styles.button, ariaLabel: t("supportingDoc.whatIsThis"), children: label })))
37
46
  .exhaustive();
38
47
  };
39
48
  export const SupportingDocument = forwardRef(({ documents, getAwsUrl, onChange, requiredDocumentTypes, onboardingLanguage = locale.language }, externalRef) => {
@@ -52,6 +61,9 @@ export const SupportingDocument = forwardRef(({ documents, getAwsUrl, onChange,
52
61
  };
53
62
  }, {}), [documents]);
54
63
  const [showPowerOfAttorneyModal, setShowPowerOfAttorneyModal] = useState(false);
64
+ const [showSwornStatementModal, setShowSwornStatementModal] = useState(false);
65
+ const initialPowerOfAttorneyDocuments = initialValues["PowerOfAttorney"] ?? [];
66
+ const initialOtherDocuments = initialValues["Other"] ?? [];
55
67
  const { Field, setFieldValue, getFieldState, listenFields, submitForm } = useForm({
56
68
  CompanyRegistration: {
57
69
  initialValue: initialValues["CompanyRegistration"] ?? [],
@@ -69,8 +81,18 @@ export const SupportingDocument = forwardRef(({ documents, getAwsUrl, onChange,
69
81
  initialValue: initialValues["ProofOfIdentity"] ?? [],
70
82
  validate: validateNotEmpty,
71
83
  },
72
- Other: {
73
- initialValue: initialValues["Other"] ?? [],
84
+ UBODeclaration: {
85
+ initialValue: initialValues["UBODeclaration"] ?? [],
86
+ validate: validateNotEmpty,
87
+ },
88
+ PowerOfAttorney: {
89
+ // we keep initialOtherDocuments because it was the key for legacy onboarding
90
+ // this should be replaced by initialValues["PowerOfAttorney"] ?? [] in may 2023
91
+ initialValue: [...initialPowerOfAttorneyDocuments, ...initialOtherDocuments],
92
+ validate: validateNotEmpty,
93
+ },
94
+ SwornStatement: {
95
+ initialValue: initialValues["SwornStatement"] ?? [],
74
96
  validate: validateNotEmpty,
75
97
  },
76
98
  });
@@ -82,13 +104,7 @@ export const SupportingDocument = forwardRef(({ documents, getAwsUrl, onChange,
82
104
  };
83
105
  });
84
106
  useEffect(() => {
85
- const removeListener = listenFields([
86
- "CompanyRegistration",
87
- "AssociationRegistration",
88
- "SignedStatus",
89
- "Other",
90
- "ProofOfIdentity",
91
- ], state => {
107
+ const removeListener = listenFields(uploadableDocumentTypes, state => {
92
108
  let documents = [];
93
109
  Object.entries(state).forEach(([key, { value: values }]) => {
94
110
  documents = [
@@ -147,24 +163,30 @@ export const SupportingDocument = forwardRef(({ documents, getAwsUrl, onChange,
147
163
  })
148
164
  .catch(console.error);
149
165
  };
150
- return (_jsxs(Form, { children: [requiredDocumentTypes.some(t => t === "CompanyRegistration") && (_jsxs(_Fragment, { children: [_jsx(LakeLabel, { label: t("supportingDoc.companyRegistration"), help: _jsx(Help, { type: "tooltip", text: "supportingDoc.companyRegistration.description" }), render: () => (_jsx(Field, { name: "CompanyRegistration", children: ({ value, onChange, error }) => (_jsx(UploadArea, { layout: "horizontal", error: error, onDropAccepted: files => {
166
+ return (_jsxs(Form, { children: [requiredDocumentTypes.includes("CompanyRegistration") && (_jsxs(_Fragment, { children: [_jsx(LakeLabel, { label: t("supportingDoc.companyRegistration"), help: _jsx(Help, { type: "tooltip", text: "supportingDoc.companyRegistration.description" }), render: () => (_jsx(Field, { name: "CompanyRegistration", children: ({ value, onChange, error }) => (_jsx(UploadArea, { layout: "horizontal", error: error, onDropAccepted: files => {
151
167
  onChange([...value, { id: NO_ID_YET }]);
152
168
  handleUpload(files, "CompanyRegistration");
153
- }, documents: value, accept: ACCEPTED_FORMATS, icon: "document-regular", description: t("supportingDoc.documentTypes"), maxSize: MAX_SUPPORTING_DOCUMENT_UPLOAD_SIZE })) })) }), _jsx(Space, { height: 24 })] })), requiredDocumentTypes.some(t => t === "AssociationRegistration") && (_jsxs(_Fragment, { children: [_jsx(LakeLabel, { label: t("supportingDoc.associationRegistration"), help: _jsx(Help, { type: "tooltip", text: "supportingDoc.associationRegistration.description" }), render: () => (_jsx(Field, { name: "AssociationRegistration", children: ({ value, onChange, error }) => (_jsx(UploadArea, { layout: "horizontal", onDropAccepted: files => {
169
+ }, documents: value, accept: ACCEPTED_FORMATS, icon: "document-regular", description: t("supportingDoc.documentTypes"), maxSize: MAX_SUPPORTING_DOCUMENT_UPLOAD_SIZE })) })) }), _jsx(Space, { height: 24 })] })), requiredDocumentTypes.includes("AssociationRegistration") && (_jsxs(_Fragment, { children: [_jsx(LakeLabel, { label: t("supportingDoc.associationRegistration"), help: _jsx(Help, { type: "tooltip", text: "supportingDoc.associationRegistration.description" }), render: () => (_jsx(Field, { name: "AssociationRegistration", children: ({ value, onChange, error }) => (_jsx(UploadArea, { layout: "horizontal", onDropAccepted: files => {
154
170
  onChange([...value, { id: NO_ID_YET }]);
155
171
  handleUpload(files, "AssociationRegistration");
156
- }, error: error, documents: value, accept: ACCEPTED_FORMATS, icon: "document-regular", description: t("supportingDoc.documentTypes"), maxSize: MAX_SUPPORTING_DOCUMENT_UPLOAD_SIZE })) })) }), _jsx(Space, { height: 24 })] })), requiredDocumentTypes.some(t => t === "SignedStatus") && (_jsxs(_Fragment, { children: [_jsx(LakeLabel, { label: t("supportingDoc.signedStatus"), help: _jsx(Help, { type: "tooltip", text: "supportingDoc.signedStatus.description" }), render: () => (_jsx(Field, { name: "SignedStatus", children: ({ value, onChange, error }) => (_jsx(UploadArea, { layout: "horizontal", onDropAccepted: files => {
172
+ }, error: error, documents: value, accept: ACCEPTED_FORMATS, icon: "document-regular", description: t("supportingDoc.documentTypes"), maxSize: MAX_SUPPORTING_DOCUMENT_UPLOAD_SIZE })) })) }), _jsx(Space, { height: 24 })] })), requiredDocumentTypes.includes("SignedStatus") && (_jsxs(_Fragment, { children: [_jsx(LakeLabel, { label: t("supportingDoc.signedStatus"), help: _jsx(Help, { type: "tooltip", text: "supportingDoc.signedStatus.description" }), render: () => (_jsx(Field, { name: "SignedStatus", children: ({ value, onChange, error }) => (_jsx(UploadArea, { layout: "horizontal", onDropAccepted: files => {
157
173
  onChange([...value, { id: NO_ID_YET }]);
158
174
  handleUpload(files, "SignedStatus");
159
- }, error: error, documents: value, accept: ACCEPTED_FORMATS, icon: "document-regular", description: t("supportingDoc.documentTypes"), maxSize: MAX_SUPPORTING_DOCUMENT_UPLOAD_SIZE })) })) }), _jsx(Space, { height: 24 })] })), requiredDocumentTypes.some(t => t === "ProofOfIdentity") && (_jsxs(_Fragment, { children: [_jsx(LakeLabel, { label: t("supportingDoc.proofOfIdentity"), help: _jsx(Help, { type: "tooltip", width: 600, text: "supportingDoc.proofOfIdentity.description" }), render: () => (_jsx(Field, { name: "ProofOfIdentity", children: ({ value, onChange, error }) => (_jsx(UploadArea, { layout: "horizontal", onDropAccepted: files => {
175
+ }, error: error, documents: value, accept: ACCEPTED_FORMATS, icon: "document-regular", description: t("supportingDoc.documentTypes"), maxSize: MAX_SUPPORTING_DOCUMENT_UPLOAD_SIZE })) })) }), _jsx(Space, { height: 24 })] })), requiredDocumentTypes.includes("UBODeclaration") && (_jsxs(_Fragment, { children: [_jsx(LakeLabel, { label: t("supportingDoc.UBODeclaration"), help: _jsx(Help, { type: "tooltip", text: "supportingDoc.UBODeclaration.description" }), render: () => (_jsx(Field, { name: "UBODeclaration", children: ({ value, onChange, error }) => (_jsx(UploadArea, { layout: "horizontal", onDropAccepted: files => {
176
+ onChange([...value, { id: NO_ID_YET }]);
177
+ handleUpload(files, "UBODeclaration");
178
+ }, error: error, documents: value, accept: ACCEPTED_FORMATS, icon: "document-regular", description: t("supportingDoc.documentTypes"), maxSize: MAX_SUPPORTING_DOCUMENT_UPLOAD_SIZE })) })) }), _jsx(Space, { height: 24 })] })), requiredDocumentTypes.includes("ProofOfIdentity") && (_jsxs(_Fragment, { children: [_jsx(LakeLabel, { label: t("supportingDoc.proofOfIdentity"), help: _jsx(Help, { type: "tooltip", width: 600, text: "supportingDoc.proofOfIdentity.description" }), render: () => (_jsx(Field, { name: "ProofOfIdentity", children: ({ value, onChange, error }) => (_jsx(UploadArea, { layout: "horizontal", onDropAccepted: files => {
160
179
  onChange([...value, { id: NO_ID_YET }]);
161
180
  handleUpload(files, "ProofOfIdentity");
162
- }, error: error, documents: value, accept: ACCEPTED_FORMATS, icon: "document-regular", description: t("supportingDoc.documentTypes"), maxSize: MAX_SUPPORTING_DOCUMENT_UPLOAD_SIZE })) })) }), _jsx(Space, { height: 24 })] })), requiredDocumentTypes.some(t => t === "PowerOfAttorney") && (_jsxs(_Fragment, { children: [_jsx(LakeLabel, { label: t("supportingDoc.powerAttornySigned"), help: _jsx(Help, { type: "button", label: t("supportingDoc.whatIsThis"), onPress: () => setShowPowerOfAttorneyModal(true) }), render: () => (_jsx(Field, { name: "Other", children: ({ value, onChange, error }) => (_jsx(UploadArea, { layout: "horizontal", onDropAccepted: files => {
181
+ }, error: error, documents: value, accept: ACCEPTED_FORMATS, icon: "document-regular", description: t("supportingDoc.documentTypes"), maxSize: MAX_SUPPORTING_DOCUMENT_UPLOAD_SIZE })) })) }), _jsx(Space, { height: 24 })] })), requiredDocumentTypes.includes("PowerOfAttorney") && (_jsxs(_Fragment, { children: [_jsx(LakeLabel, { label: t("supportingDoc.powerAttornySigned"), help: _jsx(Help, { type: "button", label: t("supportingDoc.whatIsThis"), onPress: () => setShowPowerOfAttorneyModal(true) }), render: () => (_jsx(Field, { name: "PowerOfAttorney", children: ({ value, onChange, error }) => (_jsx(UploadArea, { layout: "horizontal", onDropAccepted: files => {
182
+ onChange([...value, { id: NO_ID_YET }]);
183
+ handleUpload(files, "PowerOfAttorney");
184
+ }, error: error, documents: value, accept: ACCEPTED_FORMATS, icon: "document-regular", description: t("supportingDoc.documentTypes"), maxSize: MAX_SUPPORTING_DOCUMENT_UPLOAD_SIZE })) })) }), _jsx(Space, { height: 24 })] })), requiredDocumentTypes.includes("SwornStatement") && (_jsxs(_Fragment, { children: [_jsx(LakeLabel, { label: t("supportingDoc.swornStatementDeclaration"), help: _jsx(Help, { type: "button", label: t("supportingDoc.whatIsThis"), onPress: () => setShowSwornStatementModal(true) }), render: () => (_jsx(Field, { name: "SwornStatement", children: ({ value, onChange, error }) => (_jsx(UploadArea, { layout: "horizontal", onDropAccepted: files => {
163
185
  onChange([...value, { id: NO_ID_YET }]);
164
- handleUpload(files, "Other");
186
+ handleUpload(files, "SwornStatement");
165
187
  }, error: error, documents: value, accept: ACCEPTED_FORMATS, icon: "document-regular", description: t("supportingDoc.documentTypes"), maxSize: MAX_SUPPORTING_DOCUMENT_UPLOAD_SIZE })) })) }), _jsx(Space, { height: 24 })] })), requiredDocumentTypes.length === 0 ? (_jsxs(_Fragment, { children: [_jsx(Space, { height: 24 }), _jsx(LakeText, { children: t("supportingDoc.noRequiredDocuments") }), _jsx(Space, { height: 24 })] })) : null, _jsxs(LakeModal, { visible: showPowerOfAttorneyModal, title: t("supportingDoc.powerAttorney"), icon: "document-regular", onPressClose: () => setShowPowerOfAttorneyModal(false), children: [_jsx(LakeText, { children: t("supportingDoc.powerAttornySigned.description") }), _jsx(Space, { height: 16 }), _jsx(LakeButtonGroup, { paddingBottom: 0, children: _jsx(LakeButton, { grow: true, color: "current", onPress: () => window.open(`/power-of-attorney-template/${match(onboardingLanguage)
166
188
  .with("fr", () => "fr")
167
189
  .with("de", () => "de")
168
190
  .with("es", () => "es")
169
- .otherwise(() => "en")}.pdf`), children: t("supportingDoc.downloadTemplate") }) })] })] }));
191
+ .otherwise(() => "en")}.pdf`), children: t("supportingDoc.downloadTemplate") }) })] }), _jsxs(LakeModal, { visible: showSwornStatementModal, title: t("supportingDoc.swornStatementDeclaration"), icon: "document-regular", onPressClose: () => setShowSwornStatementModal(false), children: [_jsx(LakeText, { children: t("supportingDoc.swornStatementDeclaration.description") }), _jsx(Space, { height: 16 }), _jsx(LakeButtonGroup, { paddingBottom: 0, children: _jsx(LakeButton, { grow: true, color: "current", onPress: () => window.open("/sworn-statement-template/es.pdf"), children: t("supportingDoc.downloadTemplate") }) })] })] }));
170
192
  });
@@ -54,28 +54,28 @@ const styles = StyleSheet.create({
54
54
  bottom: 0,
55
55
  left: "50%",
56
56
  opacity: 0,
57
- transform: [{ translateX: "-50%" }, { scale: 0.6 }],
57
+ transform: "translateX(-50%) scale(0.6)",
58
58
  transitionProperty: ["opacity", "transform"],
59
59
  transitionDuration: "300ms",
60
60
  transitionTimingFunction: "ease-in-out",
61
61
  },
62
62
  decorativeIconLeftHovered: {
63
63
  opacity: 0.3,
64
- transform: [{ translateX: "-50%" }, { translateX: -24 }, { scale: 0.6 }, { rotate: "-5deg" }],
64
+ transform: "translateX(-50%) translateX(-24px) scale(0.6) rotate(-5deg)",
65
65
  },
66
66
  decorativeIconRight: {
67
67
  position: "absolute",
68
68
  bottom: 0,
69
69
  left: "50%",
70
70
  opacity: 0,
71
- transform: [{ translateX: "-50%" }, { scale: 0.6 }],
71
+ transform: "translateX(-50%) scale(0.6)",
72
72
  transitionProperty: ["opacity", "transform"],
73
73
  transitionDuration: "300ms",
74
74
  transitionTimingFunction: "ease-in-out",
75
75
  },
76
76
  decorativeIconRightHovered: {
77
77
  opacity: 0.3,
78
- transform: [{ translateX: "-50%" }, { translateX: 24 }, { scale: 0.6 }, { rotate: "5deg" }],
78
+ transform: "translateX(-50%) translateX(24px) scale(0.6) rotate(5deg)",
79
79
  },
80
80
  progressBar: {
81
81
  flex: 1,
@@ -136,14 +136,14 @@ export const UploadArea = ({ icon, accept, value, documents = [], disabled = fal
136
136
  disabled,
137
137
  maxSize,
138
138
  });
139
- return (_jsxs(View, { style: commonStyles.fill, children: [_jsx("div", { ...getRootProps(), onMouseEnter: setIsHovered.on, onMouseLeave: setIsHovered.off, children: _jsxs(View, { style: [
139
+ return (_jsxs(View, { style: commonStyles.fill, children: [_jsx("div", { ...getRootProps(), onMouseEnter: setIsHovered.on, onMouseLeave: setIsHovered.off, children: _jsxs(View, { "aria-errormessage": error != null ? error : fileRejections[0]?.errors.join(", "), style: [
140
140
  styles.container,
141
141
  disabled && styles.disabled,
142
142
  layout === "horizontal" && styles.horizontalContainer,
143
143
  !disabled && isHovered && styles.hoveredContainer,
144
144
  isDragActive && styles.activeContainer,
145
145
  (error != null || fileRejections.length > 0) && styles.errorContainer,
146
- ], accessibilityErrorMessage: error != null ? error : fileRejections[0]?.errors.join(", "), children: [_jsx("input", { ...getInputProps() }), isNotNullish(value) ? (value instanceof Element ? (_jsx(UploadAreaPreview, { value: value })) : (_jsxs(_Fragment, { children: [_jsx(Icon, { name: getIconNameFromFilename(value.name), size: 48, color: disabled ? colors.gray[200] : colors.current[500] }), _jsx(Space, { width: layout === "horizontal" ? 48 : 16, height: layout === "horizontal" ? 48 : 16 }), _jsxs(View, { style: styles.browseBlock, children: [_jsx(LakeHeading, { level: 5, variant: "h5", align: layout === "horizontal" ? "left" : "center", children: t("uploadArea.droppedFile") }), _jsx(Space, { height: 4 }), _jsx(LakeText, { variant: "smallRegular", color: colors.gray[200], children: value.name })] })] }))) : (_jsxs(_Fragment, { children: [_jsxs(View, { style: styles.icon, children: [_jsx(Icon, { name: icon, size: 48, color: disabled ? colors.gray[200] : colors.current[500], style: [
146
+ ], children: [_jsx("input", { ...getInputProps() }), isNotNullish(value) ? (value instanceof Element ? (_jsx(UploadAreaPreview, { value: value })) : (_jsxs(_Fragment, { children: [_jsx(Icon, { name: getIconNameFromFilename(value.name), size: 48, color: disabled ? colors.gray[200] : colors.current[500] }), _jsx(Space, { width: layout === "horizontal" ? 48 : 16, height: layout === "horizontal" ? 48 : 16 }), _jsxs(View, { style: styles.browseBlock, children: [_jsx(LakeHeading, { level: 5, variant: "h5", align: layout === "horizontal" ? "left" : "center", children: t("uploadArea.droppedFile") }), _jsx(Space, { height: 4 }), _jsx(LakeText, { variant: "smallRegular", color: colors.gray[200], children: value.name })] })] }))) : (_jsxs(_Fragment, { children: [_jsxs(View, { style: styles.icon, children: [_jsx(Icon, { name: icon, size: 48, color: disabled ? colors.gray[200] : colors.current[500], style: [
147
147
  styles.decorativeIconLeft,
148
148
  (isDragActive || isHovered) && styles.decorativeIconLeftHovered,
149
149
  ] }), _jsx(Icon, { name: icon, size: 48, color: disabled ? colors.gray[200] : colors.current[500], style: [
@@ -156,6 +156,6 @@ export const UploadArea = ({ icon, accept, value, documents = [], disabled = fal
156
156
  }) }), isNotNullish(error) ? (_jsxs(_Fragment, { children: [_jsx(Space, { height: 4 }), _jsx(LakeText, { color: colors.negative[400], align: layout === "horizontal" ? "left" : "center", children: error })] })) : (!disabled &&
157
157
  isNotNullish(description) && (_jsxs(_Fragment, { children: [_jsx(Space, { height: 4 }), _jsx(LakeText, { align: layout === "horizontal" ? "left" : "center", children: description })] })))] })] }))] }) }), documents.map(({ finished = false, ...document }, index) => {
158
158
  const progress = Math.max(document.progress ?? 0, 3);
159
- return (_jsxs(Fragment, { children: [_jsx(Space, { height: index === 0 ? 8 : 4 }), finished ? (_jsx(FileTile, { name: document.name ?? t("uploadArea.unknownFileName"), url: document.fileUrl, onRemove: isNullish(onRemoveFile) ? undefined : () => onRemoveFile(document.id) })) : (_jsxs(Box, { direction: "row", alignItems: "center", style: styles.item, children: [_jsx(LakeText, { numberOfLines: 1, color: colors.gray[700], children: t("uploadArea.uploading") }), _jsx(Space, { width: 20 }), _jsx(View, { accessibilityRole: "progressbar", style: styles.progressBar, children: _jsx(View, { style: [styles.progress, { width: `${progress}%` }] }) })] }))] }, document.id));
159
+ return (_jsxs(Fragment, { children: [_jsx(Space, { height: index === 0 ? 8 : 4 }), finished ? (_jsx(FileTile, { name: document.name ?? t("uploadArea.unknownFileName"), url: document.fileUrl, onRemove: isNullish(onRemoveFile) ? undefined : () => onRemoveFile(document.id) })) : (_jsxs(Box, { direction: "row", alignItems: "center", style: styles.item, children: [_jsx(LakeText, { numberOfLines: 1, color: colors.gray[700], children: t("uploadArea.uploading") }), _jsx(Space, { width: 20 }), _jsx(View, { role: "progressbar", style: styles.progressBar, children: _jsx(View, { style: [styles.progress, { width: `${progress}%` }] }) })] }))] }, document.id));
160
160
  })] }));
161
161
  };
@@ -1986,18 +1986,18 @@ export declare const getCountryNameByCCA3: (cca3: string) => string;
1986
1986
  export declare const companyWithUboCountries: readonly ["BEL", "DEU", "FRA", "ITA", "LTU", "LUX", "NLD"];
1987
1987
  export type CompanyWithUboCountryCCA3 = (typeof companyWithUboCountries)[number];
1988
1988
  export declare const allCountriesItems: CountryItem<CountryCCA3>[];
1989
- 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")[];
1989
+ declare const individualCountries: ("BEL" | "CZE" | "DNK" | "DEU" | "EST" | "IRL" | "ESP" | "FRA" | "HRV" | "ISL" | "ITA" | "LVA" | "LIE" | "LTU" | "LUX" | "HUN" | "MLT" | "MCO" | "NLD" | "NOR" | "AUT" | "POL" | "PRT" | "ROU" | "SVN" | "SVK" | "FIN" | "SWE" | "GRC" | "CYP" | "BGR")[];
1990
1990
  export type IndividualCountryCCA3 = (typeof individualCountries)[number];
1991
1991
  export declare const individualCountriesItems: CountryItem<IndividualCountryCCA3>[];
1992
- 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")[];
1992
+ declare const companyCountries: ("BEL" | "CZE" | "DNK" | "DEU" | "EST" | "IRL" | "ESP" | "FRA" | "HRV" | "ISL" | "ITA" | "LVA" | "LIE" | "LTU" | "LUX" | "HUN" | "MLT" | "MCO" | "NLD" | "NOR" | "AUT" | "POL" | "PRT" | "ROU" | "SVN" | "SVK" | "FIN" | "SWE" | "GRC" | "CYP" | "BGR")[];
1993
1993
  export type CompanyCountryCCA3 = (typeof companyCountries)[number];
1994
1994
  export declare const companyCountriesItems: CountryItem<CompanyCountryCCA3>[];
1995
1995
  export declare const countriesWithMultipleCCA3: Partial<Record<CountryCCA3, string[]>>;
1996
1996
  export declare const isCountryCCA3: (value: unknown) => value is "ALA" | "ASM" | "AND" | "AGO" | "AIA" | "ATA" | "ATG" | "ARG" | "ABW" | "AUS" | "AZE" | "BHS" | "BGD" | "BRB" | "BEL" | "BLZ" | "BEN" | "BMU" | "BOL" | "BES" | "BIH" | "BWA" | "BVT" | "BRA" | "VGB" | "BFA" | "BDI" | "CPV" | "CMR" | "CAN" | "CYM" | "CZE" | "CHL" | "CXR" | "CCK" | "COL" | "COK" | "CRI" | "CIV" | "CUB" | "CUW" | "DNK" | "DEU" | "DJI" | "DMA" | "ECU" | "EST" | "IRL" | "SLV" | "ESP" | "FLK" | "FJI" | "FRO" | "FRA" | "GAB" | "GMB" | "GHA" | "GIB" | "GRD" | "GLP" | "GUM" | "GTM" | "GGY" | "GNB" | "GNQ" | "GIN" | "GUY" | "GUF" | "HTI" | "HMD" | "HND" | "HRV" | "IDN" | "ISL" | "IMN" | "ITA" | "JAM" | "JEY" | "GRL" | "KHM" | "KAZ" | "KEN" | "KIR" | "CAF" | "COM" | "REU" | "LVA" | "LSO" | "LBR" | "LIE" | "LTU" | "LUX" | "MDG" | "HUN" | "MHL" | "MWI" | "MYS" | "MDV" | "MLI" | "MLT" | "MTQ" | "MUS" | "MYT" | "MEX" | "FSM" | "MOZ" | "MDA" | "MCO" | "MSR" | "NAM" | "NLD" | "BRN" | "NZL" | "NIC" | "NER" | "NGA" | "NIU" | "NFK" | "NOR" | "MNP" | "NCL" | "AUT" | "UZB" | "PAK" | "PLW" | "PAN" | "PNG" | "PRY" | "PER" | "PHL" | "PCN" | "POL" | "PYF" | "PRT" | "PRI" | "DOM" | "UNK" | "COD" | "COG" | "ROU" | "RWA" | "KNA" | "LCA" | "VCT" | "BLM" | "MAF" | "SPM" | "WSM" | "SMR" | "STP" | "CHE" | "SEN" | "SYC" | "ALB" | "SLE" | "SGP" | "SVN" | "SVK" | "SLB" | "SOM" | "ZAF" | "SGS" | "SSD" | "LKA" | "FIN" | "SUR" | "SWE" | "SWZ" | "TZA" | "TCD" | "ATF" | "TLS" | "TGO" | "TON" | "TTO" | "TUR" | "TKM" | "TCA" | "TUV" | "UGA" | "GBR" | "USA" | "UMI" | "VIR" | "URY" | "VUT" | "VAT" | "VEN" | "VNM" | "WLF" | "ZMB" | "ZWE" | "BTN" | "GRC" | "CYP" | "BLR" | "BGR" | "KGZ" | "MKD" | "MNG" | "RUS" | "SRB" | "TJK" | "UKR" | "MNE" | "ARM" | "ISR" | "AFG" | "JOR" | "DZA" | "SDN" | "ESH" | "IRQ" | "SAU" | "KWT" | "MAR" | "YEM" | "IRN" | "TUN" | "ARE" | "SYR" | "OMN" | "PSE" | "QAT" | "LBN" | "EGY" | "MRT" | "NPL" | "IND" | "THA" | "LAO" | "MMR" | "GEO" | "ETH" | "ERI" | "BHR" | "LBY" | "CHN" | "JPN" | "MAC" | "TWN" | "HKG" | "KOR" | "PRK";
1997
1997
  export declare const isCountryCCA2: (value: unknown) => value is "AX" | "AS" | "AD" | "AO" | "AI" | "AQ" | "AG" | "AR" | "AW" | "AU" | "AZ" | "BS" | "BD" | "BB" | "BE" | "BZ" | "BJ" | "BM" | "BO" | "BQ" | "BA" | "BW" | "BV" | "BR" | "VG" | "BF" | "BI" | "CV" | "CM" | "CA" | "KY" | "CZ" | "CL" | "CX" | "CC" | "CO" | "CK" | "CR" | "CI" | "CU" | "CW" | "DK" | "DE" | "DJ" | "DM" | "EC" | "EE" | "IE" | "SV" | "ES" | "FK" | "FJ" | "FO" | "FR" | "GA" | "GM" | "GH" | "GI" | "GD" | "GP" | "GU" | "GT" | "GG" | "GW" | "GQ" | "GN" | "GY" | "GF" | "HT" | "HM" | "HN" | "HR" | "ID" | "IS" | "IM" | "IT" | "JM" | "JE" | "GL" | "KH" | "KZ" | "KE" | "KI" | "CF" | "KM" | "RE" | "LV" | "LS" | "LR" | "LI" | "LT" | "LU" | "MG" | "HU" | "MH" | "MW" | "MY" | "MV" | "ML" | "MT" | "MQ" | "MU" | "YT" | "MX" | "FM" | "MZ" | "MD" | "MC" | "MS" | "NA" | "NL" | "BN" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "NO" | "MP" | "NC" | "AT" | "UZ" | "PK" | "PW" | "PA" | "PG" | "PY" | "PE" | "PH" | "PN" | "PL" | "PF" | "PT" | "PR" | "DO" | "XK" | "CD" | "CG" | "RO" | "RW" | "KN" | "LC" | "VC" | "BL" | "MF" | "PM" | "WS" | "SM" | "ST" | "CH" | "SN" | "SC" | "AL" | "SL" | "SG" | "SI" | "SK" | "SB" | "SO" | "ZA" | "GS" | "SS" | "LK" | "FI" | "SR" | "SE" | "SZ" | "TZ" | "TD" | "TF" | "TL" | "TG" | "TO" | "TT" | "TR" | "TM" | "TC" | "TV" | "UG" | "GB" | "US" | "UM" | "VI" | "UY" | "VU" | "VA" | "VE" | "VN" | "WF" | "ZM" | "ZW" | "BT" | "GR" | "CY" | "BY" | "BG" | "KG" | "MK" | "MN" | "RU" | "RS" | "TJ" | "UA" | "ME" | "AM" | "IL" | "AF" | "JO" | "DZ" | "SD" | "EH" | "IQ" | "SA" | "KW" | "MA" | "YE" | "IR" | "TN" | "AE" | "SY" | "OM" | "PS" | "QA" | "LB" | "EG" | "MR" | "NP" | "IN" | "TH" | "LA" | "MM" | "GE" | "ET" | "ER" | "BH" | "LY" | "CN" | "JP" | "MO" | "TW" | "HK" | "KR" | "KP";
1998
- export declare const isIndividualCountryCCA3: (value: unknown) => value is "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";
1999
- export declare const isCompanyCountryCCA3: (value: unknown) => value is "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";
1998
+ export declare const isIndividualCountryCCA3: (value: unknown) => value is "BEL" | "CZE" | "DNK" | "DEU" | "EST" | "IRL" | "ESP" | "FRA" | "HRV" | "ISL" | "ITA" | "LVA" | "LIE" | "LTU" | "LUX" | "HUN" | "MLT" | "MCO" | "NLD" | "NOR" | "AUT" | "POL" | "PRT" | "ROU" | "SVN" | "SVK" | "FIN" | "SWE" | "GRC" | "CYP" | "BGR";
1999
+ export declare const isCompanyCountryCCA3: (value: unknown) => value is "BEL" | "CZE" | "DNK" | "DEU" | "EST" | "IRL" | "ESP" | "FRA" | "HRV" | "ISL" | "ITA" | "LVA" | "LIE" | "LTU" | "LUX" | "HUN" | "MLT" | "MCO" | "NLD" | "NOR" | "AUT" | "POL" | "PRT" | "ROU" | "SVN" | "SVK" | "FIN" | "SWE" | "GRC" | "CYP" | "BGR";
2000
2000
  export declare const isCompanyWithUboCountryCCA3: (value: unknown) => value is "BEL" | "DEU" | "FRA" | "ITA" | "LTU" | "LUX" | "NLD";
2001
- 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";
2002
- 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";
2001
+ export declare const individualFallbackCountry: "BEL" | "CZE" | "DNK" | "DEU" | "EST" | "IRL" | "ESP" | "FRA" | "HRV" | "ISL" | "ITA" | "LVA" | "LIE" | "LTU" | "LUX" | "HUN" | "MLT" | "MCO" | "NLD" | "NOR" | "AUT" | "POL" | "PRT" | "ROU" | "SVN" | "SVK" | "FIN" | "SWE" | "GRC" | "CYP" | "BGR";
2002
+ export declare const companyFallbackCountry: "BEL" | "CZE" | "DNK" | "DEU" | "EST" | "IRL" | "ESP" | "FRA" | "HRV" | "ISL" | "ITA" | "LVA" | "LIE" | "LTU" | "LUX" | "HUN" | "MLT" | "MCO" | "NLD" | "NOR" | "AUT" | "POL" | "PRT" | "ROU" | "SVN" | "SVK" | "FIN" | "SWE" | "GRC" | "CYP" | "BGR";
2003
2003
  export {};
@@ -2251,6 +2251,7 @@ const names = {
2251
2251
  LUX: t("country.LUX"),
2252
2252
  LVA: t("country.LVA"),
2253
2253
  MLT: t("country.MLT"),
2254
+ MCO: t("country.MCO"),
2254
2255
  NLD: t("country.NLD"),
2255
2256
  NOR: t("country.NOR"),
2256
2257
  POL: t("country.POL"),
@@ -2298,6 +2299,7 @@ const individualCountries = [
2298
2299
  "ROU",
2299
2300
  "SWE",
2300
2301
  "BGR",
2302
+ "MCO",
2301
2303
  ];
2302
2304
  export const individualCountriesItems = individualCountries
2303
2305
  .map(cca3 => ({
@@ -2337,6 +2339,7 @@ const companyCountries = [
2337
2339
  "BGR",
2338
2340
  "CYP",
2339
2341
  "NOR",
2342
+ "MCO",
2340
2343
  ];
2341
2344
  export const companyCountriesItems = companyCountries
2342
2345
  .map(cca3 => ({
@@ -20,9 +20,10 @@ const termsAndConditions = {
20
20
  };
21
21
  const defaultTerms = termsAndConditions.FRA;
22
22
  export const getTermsAndConditionsPathByAccountCountryAndLocale = ({ rootUrl, accountCountry, locale, }) => {
23
+ const rootUrlWithSlash = rootUrl.endsWith("/") ? rootUrl : rootUrl + "/";
23
24
  if (accountCountry == null) {
24
- return new URL(defaultTerms[locale], rootUrl).toString();
25
+ return rootUrlWithSlash + defaultTerms[locale];
25
26
  }
26
27
  const termsByLocale = termsAndConditions[accountCountry] ?? defaultTerms;
27
- return new URL(termsByLocale[locale], rootUrl).toString();
28
+ return rootUrlWithSlash + termsByLocale[locale];
28
29
  };
@@ -71,6 +71,7 @@
71
71
  "country.LTU": "Litauen",
72
72
  "country.LUX": "Luxemburg",
73
73
  "country.LVA": "Lettland",
74
+ "country.MCO": "Monaco",
74
75
  "country.MLT": "Malta",
75
76
  "country.NLD": "Niederlande",
76
77
  "country.NOR": "Norwegen",
@@ -88,6 +89,8 @@
88
89
  "registrationPage.defaultNumberLabel": "Registrierungsnummer",
89
90
  "registrationPage.withOrganismLabel": "Ist Ihre Firma bereits im {organismName} eingetragen?",
90
91
  "registrationPage.withoutOrganismNameLabel": "Sind Sie registriert?",
92
+ "supportingDoc.UBODeclaration": "Wirtschaftlicher Eigentümer Erklärung",
93
+ "supportingDoc.UBODeclaration.description": "Wirtschaftlicher Eigentümer Erklärung",
91
94
  "supportingDoc.associationRegistration": "Nachweis der Registrierung",
92
95
  "supportingDoc.associationRegistration.description": "Offizielles Dokument zum Nachweis der Registrierung Ihrer Vereinigung. (weniger als 3 Monate alt)",
93
96
  "supportingDoc.companyRegistration": "Nachweis der Unternehmensregistrierung (weniger als 3 Monate alt)",
@@ -71,6 +71,7 @@
71
71
  "country.LTU": "Lithuania",
72
72
  "country.LUX": "Luxembourg",
73
73
  "country.LVA": "Latvia",
74
+ "country.MCO": "Monaco",
74
75
  "country.MLT": "Malta",
75
76
  "country.NLD": "Netherlands",
76
77
  "country.NOR": "Norway",
@@ -88,6 +89,8 @@
88
89
  "registrationPage.defaultNumberLabel": "Registration number",
89
90
  "registrationPage.withOrganismLabel": "Are you registered to {organismName}?",
90
91
  "registrationPage.withoutOrganismNameLabel": "Are you registered?",
92
+ "supportingDoc.UBODeclaration": "UBO Declaration",
93
+ "supportingDoc.UBODeclaration.description": "Ultimate Beneficial Owners declaration of the organization",
91
94
  "supportingDoc.associationRegistration": "Proof of registration",
92
95
  "supportingDoc.associationRegistration.description": "Official document proving the registration of your association. (< 3 months old)",
93
96
  "supportingDoc.companyRegistration": "Proof of company registration (< 3 months old)",
@@ -104,6 +107,8 @@
104
107
  "supportingDoc.proofOfIdentity.description": "Authorized documents: Passport, ID card (only applicable to citizens of member country of the EEE zone), Residence permit (only applicable to residents of member country of the EEE zone)",
105
108
  "supportingDoc.signedStatus": "Statutes and By-laws",
106
109
  "supportingDoc.signedStatus.description": "The rules your company put in place to regulate members and maintain civility.",
110
+ "supportingDoc.swornStatementDeclaration": "Sworn Statement UBO Declaration",
111
+ "supportingDoc.swornStatementDeclaration.description": "For regulatory reason we need a sworn statement of the UBO declaration",
107
112
  "supportingDoc.whatIsThis": "What is this?",
108
113
  "supportingDoc.whoAreYou": "Who are you?",
109
114
  "uploadArea.browse": "browse",
@@ -71,6 +71,7 @@
71
71
  "country.LTU": "Lituania",
72
72
  "country.LUX": "Luxemburgo",
73
73
  "country.LVA": "Letonia",
74
+ "country.MCO": "Mónaco",
74
75
  "country.MLT": "Malta",
75
76
  "country.NLD": "Países Bajos",
76
77
  "country.NOR": "Noruega",
@@ -88,6 +89,8 @@
88
89
  "registrationPage.defaultNumberLabel": "Número de registro",
89
90
  "registrationPage.withOrganismLabel": "¿Está usted registrado en {organismName}?",
90
91
  "registrationPage.withoutOrganismNameLabel": "¿Está usted registrado?",
92
+ "supportingDoc.UBODeclaration": "Declaración de titular real",
93
+ "supportingDoc.UBODeclaration.description": "Declaración de titular real",
91
94
  "supportingDoc.associationRegistration": "Prueba de registro",
92
95
  "supportingDoc.associationRegistration.description": "Documento oficial que acredite el registro de tu asociación. (< 3 meses)",
93
96
  "supportingDoc.companyRegistration": "Comprobante de registro de la empresa (< 3 meses de antigüedad)",
@@ -71,6 +71,7 @@
71
71
  "country.LTU": "Lituanie",
72
72
  "country.LUX": "Luxembourg",
73
73
  "country.LVA": "Lettonie",
74
+ "country.MCO": "Monaco",
74
75
  "country.MLT": "Malte",
75
76
  "country.NLD": "Pays-Bas",
76
77
  "country.NOR": "Norvège",
@@ -88,6 +89,8 @@
88
89
  "registrationPage.defaultNumberLabel": "Numéro d'immatriculation",
89
90
  "registrationPage.withOrganismLabel": "Êtes-vous immatriculé au {organismName}?",
90
91
  "registrationPage.withoutOrganismNameLabel": "Êtes-vous immatriculé?",
92
+ "supportingDoc.UBODeclaration": "Déclaration des bénéficiares effectifs",
93
+ "supportingDoc.UBODeclaration.description": "Déclaration des bénéficiares effectifs",
91
94
  "supportingDoc.associationRegistration": "Preuve d'enregistrement",
92
95
  "supportingDoc.associationRegistration.description": "Document officiel prouvant l'enregistrement de votre association. (de moins de 3 mois)",
93
96
  "supportingDoc.companyRegistration": "Preuve d'enregistrement de l'entreprise (de moins de 3 mois)",
@@ -71,6 +71,7 @@
71
71
  "country.LTU": "Lituania",
72
72
  "country.LUX": "Lussemburgo",
73
73
  "country.LVA": "Lettonia",
74
+ "country.MCO": "Monaco",
74
75
  "country.MLT": "Malta",
75
76
  "country.NLD": "Paesi Bassi",
76
77
  "country.NOR": "Norvegia",
@@ -88,6 +89,8 @@
88
89
  "registrationPage.defaultNumberLabel": "Numero di registrazione",
89
90
  "registrationPage.withOrganismLabel": "Sei registrato a {organismName}?",
90
91
  "registrationPage.withoutOrganismNameLabel": "Sei registrato?",
92
+ "supportingDoc.UBODeclaration": "Dichiarazione di titolare effettivo",
93
+ "supportingDoc.UBODeclaration.description": "Dichiarazione di titolare effettivo",
91
94
  "supportingDoc.associationRegistration": "Prova di registrazione",
92
95
  "supportingDoc.associationRegistration.description": "Documento ufficiale attestante la registrazione della tua associazione. (< 3 mesi)",
93
96
  "supportingDoc.companyRegistration": "Prova di registrazione della società (< 3 mesi)",
@@ -71,6 +71,7 @@
71
71
  "country.LTU": "Lithouwen",
72
72
  "country.LUX": "Luxemburg",
73
73
  "country.LVA": "Letland",
74
+ "country.MCO": "Monaco",
74
75
  "country.MLT": "Malta",
75
76
  "country.NLD": "Nederland",
76
77
  "country.NOR": "Noorwegen",
@@ -88,6 +89,8 @@
88
89
  "registrationPage.defaultNumberLabel": "Registratienummer",
89
90
  "registrationPage.withOrganismLabel": "Bent u geregistreerd bij {organismName}?",
90
91
  "registrationPage.withoutOrganismNameLabel": "Bent u geregistreerd?",
92
+ "supportingDoc.UBODeclaration": "Uiteindelijk begunstigde verklaring",
93
+ "supportingDoc.UBODeclaration.description": "Uiteindelijk begunstigde verklaring",
91
94
  "supportingDoc.associationRegistration": "Bewijs van inschrijving",
92
95
  "supportingDoc.associationRegistration.description": "Officieel document waaruit de registratie van uw vereniging blijkt. (minder dan 3 maanden oud)",
93
96
  "supportingDoc.companyRegistration": "Uittreksel van het handelsregister (KVK document, minder dan 3 maanden oud)",
@@ -71,6 +71,7 @@
71
71
  "country.LTU": "Lituânia",
72
72
  "country.LUX": "Luxemburgo",
73
73
  "country.LVA": "Letónia",
74
+ "country.MCO": "Mónaco",
74
75
  "country.MLT": "Malta",
75
76
  "country.NLD": "Paises Baixos",
76
77
  "country.NOR": "Noruega",
@@ -88,6 +89,8 @@
88
89
  "registrationPage.defaultNumberLabel": "Número de registo",
89
90
  "registrationPage.withOrganismLabel": "Você está registado no {organismName}?",
90
91
  "registrationPage.withoutOrganismNameLabel": "Você está registado?",
92
+ "supportingDoc.UBODeclaration": "Declaração dos beneficiários efetivos",
93
+ "supportingDoc.UBODeclaration.description": "Declaração dos beneficiários efetivos",
91
94
  "supportingDoc.associationRegistration": "Prova de registo",
92
95
  "supportingDoc.associationRegistration.description": "Documento oficial comprovando o registo da sua associação. (< 3 meses)",
93
96
  "supportingDoc.companyRegistration": "Prova de registo da empresa (< 3 meses)",
@@ -1,3 +1,2 @@
1
1
  export declare const decodeBirthDate: (value: string) => string;
2
- export declare const isValidBirthDate: (value: string) => boolean;
3
2
  export declare const encodeBirthDate: (value: string) => string;
package/src/utils/date.js CHANGED
@@ -3,10 +3,6 @@ export const decodeBirthDate = (value) => {
3
3
  const date = dayjs.utc(value, "YYYY-MM-DD");
4
4
  return date.isValid() ? date.format("DD/MM/YYYY") : "";
5
5
  };
6
- export const isValidBirthDate = (value) => {
7
- const date = dayjs.utc(value, "DD/MM/YYYY");
8
- return date.isValid() && date.isBefore(dayjs.utc());
9
- };
10
6
  export const encodeBirthDate = (value) => {
11
7
  const date = dayjs.utc(value, "DD/MM/YYYY");
12
8
  return date.isValid() ? date.format("YYYY-MM-DD") : "";