@adyen/kyc-components 2.37.1 → 2.38.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.
@@ -6,6 +6,7 @@ import { lazy, Suspense, useId, forwardRef, memo, useMemo as useMemo$1, useEffec
6
6
  import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
7
7
  import { debounce, noop as noop$1, isEmpty as isEmpty$1, range } from "lodash";
8
8
  import OpenBankingSDK from "@adyen/openbankingsdk";
9
+ import { jsxs as jsxs$1, jsx as jsx$1 } from "preact/compat/jsx-runtime";
9
10
  import "@adyen/adyen-document-viewer/dist/adyen-document-viewer.min.css";
10
11
  import AdyenDocumentViewer from "@adyen/adyen-document-viewer";
11
12
  const ConfigurationApiContext = createContext(void 0);
@@ -187,6 +188,7 @@ const registrationAddress = "Registration address";
187
188
  const registeredAddressHeaderDescription = "The address as it appears on your company's official registration documents.";
188
189
  const registeredAddressHeaderDescription__NL = "The address registered to your company with the Chamber of Commerce.";
189
190
  const registeredAddressHeaderDescription__US = "Your address as it appears on your Secretary of State Registration.";
191
+ const registeredAddressHeaderDescription__PR = "Your address as it appears on your Department of State Registration.";
190
192
  const registeredAddressTrustHeaderDescription = "The address registered to your trust";
191
193
  const operationalAddress = "Operational address";
192
194
  const provideRegistrationDetails = "Provide registration details";
@@ -652,6 +654,7 @@ const soleProprietorshipDetails = "Sole proprietorship details";
652
654
  const selectAccountHolder = "Select account holder";
653
655
  const nameOfBankAccountHolder = "We need to know about the bank account where you want to receive your payouts. What is the name of the account holder of that bank account?";
654
656
  const whatBestDescribesYourBusinessSetup = "What best describes your business setup?";
657
+ const howWouldYouLikeToSetUpYourAccount = "How would you like to set up your account";
655
658
  const whichLegalArrangementDoesYourBusinessHave = "Which legal arrangement does your business have?";
656
659
  const sorryWeCantSetUpAnAccountForYou = "Sorry, we can’t set up an account for you";
657
660
  const changeYourBusinessSetup = "Change your business setup?";
@@ -797,11 +800,13 @@ const irsScheduleK1 = "IRS Schedule K-1 (Form 1065)";
797
800
  const certificateOfIncorporation = "Certificate of incorporation";
798
801
  const certificateOfFormation = "Certificate of formation";
799
802
  const secretaryOfStateFiling = "Secretary of State filing";
803
+ const secretaryOfStateFiling__PR = "Department of State filing";
800
804
  const partnerShipAgreement = "Partnership agreement";
801
805
  const charter = "Charter";
802
806
  const articlesOfIncorporation = "Articles of incorporation";
803
807
  const meetingRecords = "Board of directors' meeting records of decisions";
804
808
  const secretaryOfStateRegDoc = "Registration document from Secretary of State";
809
+ const secretaryOfStateRegDoc__PR = "Registration document from Department of State";
805
810
  const certificateOfIncumbency = "Certificate of incumbency";
806
811
  const documentIssuedWithinLastYear = "The document must be issued in the last 12 months. If it is older, make sure it contains a signature and a statement of affairs from the last 12 months.";
807
812
  const learnMore = "Learn more";
@@ -828,6 +833,10 @@ const addresses = "Addresses";
828
833
  const loading = "Loading";
829
834
  const businessIncorporationNumber = "Business incorporation number";
830
835
  const doNotHaveBusinessIncorporationNumber = "I do not have a Business incorporation number";
836
+ const retrieveMyInfoBusiness = "Retrieve Myinfo business";
837
+ const getYourBusinessVerifiedDetails = "Get your business's verified details instantly and skip uploading documents.";
838
+ const enterTheDetailsYourself = "Enter the details yourself";
839
+ const youAlsoHaveToUploadSomeSupportingDocuments = "You'll also have to upload some supporting documents.";
831
840
  const verificationMethod = "Verification method";
832
841
  const verifyViaMobileBankAppOrBankWebsite = "Verify the account via mobile bank app or bank website";
833
842
  const provideAccountDetailsAndUploadBankStatement = "Provide account details and upload a scan of a bank statement";
@@ -898,6 +907,7 @@ const legalCompanyName__helperText = "Enter the name exactly as it is on your co
898
907
  const legalCompanyName__helperText__AU = "Enter the name exactly as it is on your Australian Securities and Investment Commission's (ASIC).";
899
908
  const legalCompanyName__helperText__NL = "Enter the name exactly as it is on your Chamber of Commerce registration.";
900
909
  const legalCompanyName__helperText__US = "Enter the name exactly as it appears on your Secretary of State Registration.";
910
+ const legalCompanyName__helperText__PR = "Enter the name exactly as it appears on your Department of State Registration.";
901
911
  const legalCompanyName__helperText__SG = "Enter the name exactly as it is on your Accounting and Corporate Regulatory Authority (ACRA) BizFile.";
902
912
  const legalCompanyName__helperText__HK = "Enter the name exactly as it is on your Hong Kong Companies Registry's Certificate of Incorporation.";
903
913
  const taxInformationNumber = "Tax Identification Number";
@@ -1280,6 +1290,7 @@ const onboardingRedirectVerifiedDescriptionP1 = "Your details are verified.";
1280
1290
  const onboardingRedirectLinkError = "Onboarding link not available at the moment, please try again later.";
1281
1291
  const onboardingRedirectOpenError = "Pop-up blocker prevented redirecting, please allow pop-ups for this site.";
1282
1292
  const eg_ = "E.g. %{examples}";
1293
+ const failToLaunchSingpass = "failed to launch Singpass";
1283
1294
  const defaultTrans = {
1284
1295
  smartling,
1285
1296
  close,
@@ -1434,6 +1445,7 @@ const defaultTrans = {
1434
1445
  registeredAddressHeaderDescription,
1435
1446
  registeredAddressHeaderDescription__NL,
1436
1447
  registeredAddressHeaderDescription__US,
1448
+ registeredAddressHeaderDescription__PR,
1437
1449
  registeredAddressTrustHeaderDescription,
1438
1450
  operationalAddress,
1439
1451
  provideRegistrationDetails,
@@ -1904,6 +1916,7 @@ const defaultTrans = {
1904
1916
  selectAccountHolder,
1905
1917
  nameOfBankAccountHolder,
1906
1918
  whatBestDescribesYourBusinessSetup,
1919
+ howWouldYouLikeToSetUpYourAccount,
1907
1920
  whichLegalArrangementDoesYourBusinessHave,
1908
1921
  sorryWeCantSetUpAnAccountForYou,
1909
1922
  changeYourBusinessSetup,
@@ -2051,11 +2064,13 @@ const defaultTrans = {
2051
2064
  certificateOfIncorporation,
2052
2065
  certificateOfFormation,
2053
2066
  secretaryOfStateFiling,
2067
+ secretaryOfStateFiling__PR,
2054
2068
  partnerShipAgreement,
2055
2069
  charter,
2056
2070
  articlesOfIncorporation,
2057
2071
  meetingRecords,
2058
2072
  secretaryOfStateRegDoc,
2073
+ secretaryOfStateRegDoc__PR,
2059
2074
  certificateOfIncumbency,
2060
2075
  documentIssuedWithinLastYear,
2061
2076
  learnMore,
@@ -2083,6 +2098,10 @@ const defaultTrans = {
2083
2098
  loading,
2084
2099
  businessIncorporationNumber,
2085
2100
  doNotHaveBusinessIncorporationNumber,
2101
+ retrieveMyInfoBusiness,
2102
+ getYourBusinessVerifiedDetails,
2103
+ enterTheDetailsYourself,
2104
+ youAlsoHaveToUploadSomeSupportingDocuments,
2086
2105
  verificationMethod,
2087
2106
  verifyViaMobileBankAppOrBankWebsite,
2088
2107
  provideAccountDetailsAndUploadBankStatement,
@@ -2153,6 +2172,7 @@ const defaultTrans = {
2153
2172
  legalCompanyName__helperText__AU,
2154
2173
  legalCompanyName__helperText__NL,
2155
2174
  legalCompanyName__helperText__US,
2175
+ legalCompanyName__helperText__PR,
2156
2176
  legalCompanyName__helperText__SG,
2157
2177
  legalCompanyName__helperText__HK,
2158
2178
  taxInformationNumber,
@@ -2534,7 +2554,8 @@ const defaultTrans = {
2534
2554
  onboardingRedirectVerifiedDescriptionP1,
2535
2555
  onboardingRedirectLinkError,
2536
2556
  onboardingRedirectOpenError,
2537
- eg_
2557
+ eg_,
2558
+ failToLaunchSingpass
2538
2559
  };
2539
2560
  const FALLBACK_LOCALE = "en-US";
2540
2561
  const defaultTranslation = Object.entries(defaultTrans).reduce((acc, [translationKey, translationValue]) => translationKey !== "smartling" ? {
@@ -2739,13 +2760,6 @@ function useToastContext() {
2739
2760
  }
2740
2761
  return context;
2741
2762
  }
2742
- const CoreContext = createContext(void 0);
2743
- const useCoreContext = () => {
2744
- const context = useContext(CoreContext);
2745
- if (!context)
2746
- throw Error("You need a <CoreProvider> to use core context");
2747
- return context;
2748
- };
2749
2763
  var SettingNames = /* @__PURE__ */ ((SettingNames2) => {
2750
2764
  SettingNames2["AcceptedCountries"] = "acceptedCountries";
2751
2765
  SettingNames2["AllowBankAccountFormatSelection"] = "allowBankAccountFormatSelection";
@@ -6659,7 +6673,6 @@ const InputRadio = ({
6659
6673
  });
6660
6674
  function RadioGroup({
6661
6675
  items = [],
6662
- i18n,
6663
6676
  name,
6664
6677
  onChange = noop,
6665
6678
  value,
@@ -6668,6 +6681,9 @@ function RadioGroup({
6668
6681
  className,
6669
6682
  disabled = false
6670
6683
  }) {
6684
+ const {
6685
+ i18n
6686
+ } = useI18nContext();
6671
6687
  const uniqueIdBase = uniqueId == null ? void 0 : uniqueId.replace(/[0-9]/g, "").substring(0, uniqueId.lastIndexOf("-"));
6672
6688
  return jsx("div", {
6673
6689
  className: "adyen-kyc-radio-group",
@@ -6856,7 +6872,6 @@ function CompanyRegistrationNumberTypeSelector({
6856
6872
  name: "companyRegistrationNumberType",
6857
6873
  items: options,
6858
6874
  value: selected,
6859
- i18n,
6860
6875
  onChange: (e) => handleSelect(e.target.value)
6861
6876
  })
6862
6877
  });
@@ -7188,11 +7203,6 @@ const businessRegistrationNumberMasks = {
7188
7203
  nonProfit: {
7189
7204
  mask: makeMask(...numericInputs(6), ...numericInputs(1, true))
7190
7205
  }
7191
- },
7192
- [CountryCodes.UnitedStates]: {
7193
- default: {
7194
- mask: makeMask(...numericInputs(2), ...nonInputs(" - "), ...numericInputs(7))
7195
- }
7196
7206
  }
7197
7207
  };
7198
7208
  const emailPattern = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
@@ -7325,9 +7335,6 @@ const businessRegistrationNumberPatterns = {
7325
7335
  [CountryCodes.Portugal]: {
7326
7336
  default: /^\d{9}$/
7327
7337
  },
7328
- [CountryCodes.PuertoRico]: {
7329
- default: /^\d{9}$/
7330
- },
7331
7338
  [CountryCodes.Romania]: {
7332
7339
  default: /^[A-Z]\d{2}\/\d{1,9}\/\d{4}$/
7333
7340
  },
@@ -7352,9 +7359,6 @@ const businessRegistrationNumberPatterns = {
7352
7359
  [CountryCodes.UnitedKingdom]: {
7353
7360
  default: /^[a-zA-Z0-9]{8}$/,
7354
7361
  nonProfit: /^\d{6,7}$/
7355
- },
7356
- [CountryCodes.UnitedStates]: {
7357
- default: /^\d{9}$/
7358
7362
  }
7359
7363
  };
7360
7364
  const CountryIdNumberPatterns = {
@@ -7372,6 +7376,7 @@ const CountryIdNumberPatterns = {
7372
7376
  },
7373
7377
  [CountryCodes.Sweden]: /^\d{10}$|^\d{12}$/,
7374
7378
  [CountryCodes.UnitedStates]: {
7379
+ // used by CountryCodes.PuertoRico
7375
7380
  ssn: /^\d{9}$/,
7376
7381
  ssnLastFour: /^\d{4}$/
7377
7382
  }
@@ -7939,16 +7944,7 @@ const defaultFieldConfig$8 = {
7939
7944
  }
7940
7945
  },
7941
7946
  [CountryCodes.PuertoRico]: {
7942
- label: "employerIdentificationNumber",
7943
- mask: businessRegistrationNumberMasks[CountryCodes.UnitedStates].default,
7944
- validators: validatePatternOnBlur(businessRegistrationNumberPatterns[CountryCodes.UnitedStates].default),
7945
- guidanceText: {
7946
- key: "enterNDigitsForExample",
7947
- values: {
7948
- numDigits: "9",
7949
- example: "12-3456789"
7950
- }
7951
- }
7947
+ // should exactly match CountryCodes.UnitedStates
7952
7948
  },
7953
7949
  [CountryCodes.Romania]: {
7954
7950
  label: "numarOrdineRegistrulComertului",
@@ -8700,6 +8696,20 @@ const defaultFieldConfig$7 = {
8700
8696
  }
8701
8697
  }
8702
8698
  },
8699
+ [CountryCodes.PuertoRico]: {
8700
+ // should exactly match CountryCodes.UnitedStates
8701
+ label: "employerIdentificationNumber",
8702
+ validators: validatePatternOnBlur(/^\d{9}$/),
8703
+ mask: {
8704
+ mask: makeMask(...numericInputs(2), ...nonInputs(" - "), ...numericInputs(7))
8705
+ },
8706
+ guidanceText: {
8707
+ key: "validationPleaseEnterAValidEINWithFormat",
8708
+ values: {
8709
+ format: "XX-XXXXXXX"
8710
+ }
8711
+ }
8712
+ },
8703
8713
  /**
8704
8714
  * NOT YET SUPPORTED
8705
8715
  * These are brought over from the old pattern files. We have no idea if they are accurate or not.
@@ -9411,7 +9421,6 @@ function TaxIdNumberTypeSelector({
9411
9421
  name: "taxIdNumberType",
9412
9422
  items: options,
9413
9423
  value: selected,
9414
- i18n,
9415
9424
  onChange: (e) => handleSelect(e.target.value)
9416
9425
  })
9417
9426
  });
@@ -10324,7 +10333,21 @@ const countryConfig$3 = {
10324
10333
  label: "vatAbsenceReason"
10325
10334
  }
10326
10335
  },
10327
- [CountryCodes.PuertoRico]: {},
10336
+ [CountryCodes.PuertoRico]: {
10337
+ // exactly matches CountryCodes.UnitedStates, except `stateOrProvince`
10338
+ country: {
10339
+ label: "companyCountry"
10340
+ },
10341
+ legalCompanyName: {
10342
+ helperText: "legalCompanyName__helperText__US"
10343
+ },
10344
+ tradingName: {
10345
+ label: "doingBusinessAs"
10346
+ },
10347
+ exemptedFromTax: {
10348
+ label: "doNotHaveEIN"
10349
+ }
10350
+ },
10328
10351
  [CountryCodes.Romania]: {},
10329
10352
  [CountryCodes.Slovakia]: {},
10330
10353
  [CountryCodes.Slovenia]: {},
@@ -10580,6 +10603,13 @@ const EntityTypeSelectionRadioCardBody = ({
10580
10603
  })]
10581
10604
  });
10582
10605
  };
10606
+ const CoreContext = createContext(void 0);
10607
+ const useCoreContext = () => {
10608
+ const context = useContext(CoreContext);
10609
+ if (!context)
10610
+ throw Error("You need a <CoreProvider> to use core context");
10611
+ return context;
10612
+ };
10583
10613
  var TrustMemberTypes = /* @__PURE__ */ ((TrustMemberTypes2) => {
10584
10614
  TrustMemberTypes2["DEFINED_BENEFICIARY"] = "definedBeneficiary";
10585
10615
  TrustMemberTypes2["UNDEFINED_BENEFICIARY"] = "undefinedBeneficiary";
@@ -10714,6 +10744,7 @@ var TaskTypes = /* @__PURE__ */ ((TaskTypes2) => {
10714
10744
  TaskTypes2["SOLE_PROPRIETOR_COMPANY"] = "SOLE_PROPRIETOR_COMPANY";
10715
10745
  TaskTypes2["LEGAL_ENTITY_TYPE_SWITCHER"] = "LEGAL_ENTITY_TYPE_SWITCHER";
10716
10746
  TaskTypes2["CAPABILITY_REJECTED"] = "CAPABILITY_REJECTED";
10747
+ TaskTypes2["SINGPASS_SELECTION"] = "SINGPASS_SELECTION";
10717
10748
  return TaskTypes2;
10718
10749
  })(TaskTypes || {});
10719
10750
  var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
@@ -10863,8 +10894,8 @@ var DecisionMakerType = /* @__PURE__ */ ((DecisionMakerType2) => {
10863
10894
  })(DecisionMakerType || {});
10864
10895
  const REQUIRED = "REQUIRED";
10865
10896
  const SOLE_PROP_COUNTRIES = [CountryCodes.Austria, CountryCodes.Australia, CountryCodes.Belgium, CountryCodes.Bulgaria, CountryCodes.Canada, CountryCodes.Croatia, CountryCodes.Cyprus, CountryCodes.CzechRepublic, CountryCodes.Denmark, CountryCodes.Estonia, CountryCodes.Finland, CountryCodes.France, CountryCodes.Germany, CountryCodes.Gibraltar, CountryCodes.Greece, CountryCodes.Guernsey, CountryCodes.HongKong, CountryCodes.Hungary, CountryCodes.Ireland, CountryCodes.IsleOfMan, CountryCodes.Italy, CountryCodes.Jersey, CountryCodes.Latvia, CountryCodes.Liechtenstein, CountryCodes.Lithuania, CountryCodes.Luxembourg, CountryCodes.Malta, CountryCodes.Monaco, CountryCodes.Netherlands, CountryCodes.NewZealand, CountryCodes.Norway, CountryCodes.Poland, CountryCodes.Portugal, CountryCodes.PuertoRico, CountryCodes.Romania, CountryCodes.Singapore, CountryCodes.Slovakia, CountryCodes.Slovenia, CountryCodes.Spain, CountryCodes.Sweden, CountryCodes.Switzerland, CountryCodes.UnitedKingdom, CountryCodes.UnitedStates];
10866
- const ID_NUMBER_EXEMPT_COUNTRIES = [CountryCodes.Canada, CountryCodes.UnitedStates];
10867
- const ID_NUMBER_VERIFICATION_COUNTRIES = [CountryCodes.UnitedStates];
10897
+ const ID_NUMBER_EXEMPT_COUNTRIES = [CountryCodes.Canada, CountryCodes.PuertoRico, CountryCodes.UnitedStates];
10898
+ const ID_NUMBER_VERIFICATION_COUNTRIES = [CountryCodes.PuertoRico, CountryCodes.UnitedStates];
10868
10899
  const COUNTRIES_WHICH_USE_MULTIPLE_IDENTITY_TYPES = [CountryCodes.HongKong, CountryCodes.Australia, CountryCodes.NewZealand];
10869
10900
  const ID_NUMBER_REQUIRED_FOR_DIRECTOR_COUNTRIES = [CountryCodes.Singapore];
10870
10901
  const NATIONALITY_REQUIRED_FOR_COUNTRIES = [CountryCodes.Singapore];
@@ -11819,12 +11850,20 @@ function ListItem({
11819
11850
  const ADDRESS_SCHEMA = ["address", "otherAddressInformation", "postalCode", "city", "stateOrProvince", "country"];
11820
11851
  const [ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE, COUNTRY] = ADDRESS_SCHEMA;
11821
11852
  const COUNTRIES_WITH_STATES_DATASET = [CountryCodes.Australia, CountryCodes.Brazil, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.UnitedStates];
11822
- const COUNTRIES_WITH_HOUSE_NUMBER_FIRST = [CountryCodes.Australia, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.UnitedStates, CountryCodes.UnitedKingdom];
11853
+ const COUNTRIES_WITH_HOUSE_NUMBER_FIRST = [CountryCodes.Australia, CountryCodes.Canada, CountryCodes.NewZealand, CountryCodes.PuertoRico, CountryCodes.UnitedStates, CountryCodes.UnitedKingdom];
11823
11854
  const ADDRESS_SCHEMAS = {
11824
11855
  [CountryCodes.Australia]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE, POSTAL_CODE],
11825
11856
  [CountryCodes.Canada]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, POSTAL_CODE, STATE],
11826
11857
  [CountryCodes.UnitedKingdom]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, POSTAL_CODE, STATE],
11827
11858
  [CountryCodes.UnitedStates]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE, POSTAL_CODE],
11859
+ [CountryCodes.PuertoRico]: [
11860
+ // should exactly match CountryCodes.UnitedStates
11861
+ COUNTRY,
11862
+ ADDRESS,
11863
+ OTHER_ADDRESS_INFORMATION,
11864
+ CITY,
11865
+ POSTAL_CODE
11866
+ ],
11828
11867
  [CountryCodes.HongKong]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, CITY, STATE],
11829
11868
  [CountryCodes.NewZealand]: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE],
11830
11869
  default: [COUNTRY, ADDRESS, OTHER_ADDRESS_INFORMATION, POSTAL_CODE, CITY, STATE]
@@ -11840,10 +11879,14 @@ const LABELS = {
11840
11879
  otherAddressInformation: {
11841
11880
  default: OTHER_ADDRESS_INFORMATION,
11842
11881
  [CountryCodes.Canada]: "apartmentSuiteOptional",
11882
+ [CountryCodes.PuertoRico]: "apartmentSuiteOptional",
11883
+ // should exactly match CountryCodes.UnitedStates
11843
11884
  [CountryCodes.UnitedStates]: "apartmentSuiteOptional"
11844
11885
  },
11845
11886
  postalCode: {
11846
11887
  default: POSTAL_CODE,
11888
+ [CountryCodes.PuertoRico]: "zipCode",
11889
+ // should exactly match CountryCodes.UnitedStates
11847
11890
  [CountryCodes.UnitedStates]: "zipCode"
11848
11891
  },
11849
11892
  stateOrProvince: {
@@ -12269,7 +12312,8 @@ const postalCodePatterns = {
12269
12312
  [CountryCodes.Norway]: createRegExpByDigits(4),
12270
12313
  [CountryCodes.Poland]: /^\d{2}-\d{3}$/,
12271
12314
  [CountryCodes.Portugal]: /^[1-9]\d{3}([- ]?\d{3})?$/,
12272
- [CountryCodes.PuertoRico]: createRegExpByDigits(5),
12315
+ [CountryCodes.PuertoRico]: /^\d{5}(?:[ -]?\d{4})?$/,
12316
+ // should exactly match CountryCodes.UnitedStates
12273
12317
  [CountryCodes.Romania]: createRegExpByDigits(6),
12274
12318
  [CountryCodes.Slovakia]: /^(SK-)?\d{5}$/,
12275
12319
  [CountryCodes.Slovenia]: /^(SI-)?\d{4}$/,
@@ -12913,7 +12957,6 @@ function RegistrationAddressComponent(props) {
12913
12957
  name: "operationalAddressIsSame",
12914
12958
  items: operationalAddressIsSameItems,
12915
12959
  value: formData.operationalAddressIsSame,
12916
- i18n,
12917
12960
  disabled: formUtils.isReadOnly("operationalAddressIsSame"),
12918
12961
  onChange: handleChangeFor("operationalAddressIsSame"),
12919
12962
  "aria-required": true,
@@ -12936,6 +12979,33 @@ function RegistrationAddressComponent(props) {
12936
12979
  });
12937
12980
  }
12938
12981
  const ACCEPTED_DOCUMENTS_MAP$1 = {
12982
+ [CountryCodes.PuertoRico]: {
12983
+ // should exactly match CountryCodes.UnitedStates
12984
+ [CompanyTypesValue.PRIVATE_COMPANY]: {
12985
+ header: "acceptedDocumentsForPrivateCompanies",
12986
+ documents: ["certificateOfIncorporation", "certificateOfFormation", "secretaryOfStateFiling__PR"]
12987
+ },
12988
+ [CompanyTypesValue.PUBLIC_COMPANY]: {
12989
+ header: "acceptedDocumentsForPublicCompanies",
12990
+ documents: ["certificateOfIncorporation", "certificateOfFormation"]
12991
+ },
12992
+ [CompanyTypesValue.UNLISTED_PUBLIC_COMPANY]: {
12993
+ header: "acceptedDocumentsForPublicCompanies",
12994
+ documents: ["certificateOfIncorporation", "certificateOfFormation"]
12995
+ },
12996
+ [CompanyTypesValue.GOVERNMENTAL_ORGANIZATION]: {
12997
+ header: "acceptedDocumentsForGovernment",
12998
+ documents: ["charter"]
12999
+ },
13000
+ [CompanyTypesValue.NON_PROFIT_OR_CHARITABLE]: {
13001
+ header: "acceptedDocumentsForNonProfit",
13002
+ documents: ["articlesOfIncorporation", "meetingRecords", "secretaryOfStateRegDoc__PR", "certificateOfIncumbency"]
13003
+ },
13004
+ [CompanyTypesValue.INCORPORATED_PARTNERSHIP]: {
13005
+ header: "acceptedDocumentsForPartnerships",
13006
+ documents: ["partnerShipAgreement", "secretaryOfStateFiling__PR"]
13007
+ }
13008
+ },
12939
13009
  [CountryCodes.UnitedStates]: {
12940
13010
  [CompanyTypesValue.PRIVATE_COMPANY]: {
12941
13011
  header: "acceptedDocumentsForPrivateCompanies",
@@ -12964,11 +13034,13 @@ const ACCEPTED_DOCUMENTS_MAP$1 = {
12964
13034
  }
12965
13035
  };
12966
13036
  const GuidanceContent$1 = ({
12967
- i18n,
12968
13037
  country: country2,
12969
13038
  companyType: companyType2
12970
13039
  }) => {
12971
13040
  var _a;
13041
+ const {
13042
+ i18n
13043
+ } = useI18nContext();
12972
13044
  const acceptedDocGuidance = (_a = ACCEPTED_DOCUMENTS_MAP$1[country2]) == null ? void 0 : _a[companyType2];
12973
13045
  return jsx("div", {
12974
13046
  className: "adyen-kyc-upload-field__guidance",
@@ -13039,8 +13111,7 @@ function RegistrationDocumentComponent({
13039
13111
  description: i18n.get(description2),
13040
13112
  documentField: "registrationDocument",
13041
13113
  documentType: DocumentType.REGISTRATION_DOCUMENT,
13042
- guidanceContent: GuidanceContent$1({
13043
- i18n,
13114
+ guidanceContent: jsx(GuidanceContent$1, {
13044
13115
  country: country2,
13045
13116
  companyType: companyType2
13046
13117
  }),
@@ -13049,6 +13120,29 @@ function RegistrationDocumentComponent({
13049
13120
  });
13050
13121
  }
13051
13122
  const ACCEPTED_DOCUMENTS_MAP = {
13123
+ [CountryCodes.PuertoRico]: {
13124
+ // should exactly match CountryCodes.UnitedStates
13125
+ [CompanyTypesValue.PRIVATE_COMPANY]: {
13126
+ header: "acceptedDocumentsForPrivateCompanies",
13127
+ documents: ["irsCP575"]
13128
+ },
13129
+ [CompanyTypesValue.PUBLIC_COMPANY]: {
13130
+ header: "acceptedDocumentsForPublicCompanies",
13131
+ documents: ["annualReport", "secForm10k"]
13132
+ },
13133
+ [CompanyTypesValue.UNLISTED_PUBLIC_COMPANY]: {
13134
+ header: "acceptedDocumentsForPublicCompanies",
13135
+ documents: ["annualReport", "secForm10k"]
13136
+ },
13137
+ [CompanyTypesValue.NON_PROFIT_OR_CHARITABLE]: {
13138
+ header: "acceptedDocumentsForNonProfit",
13139
+ documents: ["annualReport"]
13140
+ },
13141
+ [CompanyTypesValue.INCORPORATED_PARTNERSHIP]: {
13142
+ header: "acceptedDocumentsForPartnerships",
13143
+ documents: ["irsScheduleK1"]
13144
+ }
13145
+ },
13052
13146
  [CountryCodes.UnitedStates]: {
13053
13147
  [CompanyTypesValue.PRIVATE_COMPANY]: {
13054
13148
  header: "acceptedDocumentsForPrivateCompanies",
@@ -13073,11 +13167,13 @@ const ACCEPTED_DOCUMENTS_MAP = {
13073
13167
  }
13074
13168
  };
13075
13169
  const GuidanceContent = ({
13076
- i18n,
13077
13170
  country: country2,
13078
13171
  companyType: companyType2
13079
13172
  }) => {
13080
13173
  var _a;
13174
+ const {
13175
+ i18n
13176
+ } = useI18nContext();
13081
13177
  const acceptedDocGuidance = (_a = ACCEPTED_DOCUMENTS_MAP[country2]) == null ? void 0 : _a[companyType2];
13082
13178
  return jsx("div", {
13083
13179
  className: "adyen-kyc-upload-field__guidance",
@@ -13141,8 +13237,7 @@ function TaxDocumentComponent({
13141
13237
  description: i18n.get(description2),
13142
13238
  documentField: "taxDocument",
13143
13239
  documentType: DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO,
13144
- guidanceContent: GuidanceContent({
13145
- i18n,
13240
+ guidanceContent: jsx(GuidanceContent, {
13146
13241
  country: country2,
13147
13242
  companyType: companyType2
13148
13243
  }),
@@ -13478,7 +13573,7 @@ const fileToBase64 = (file) => new Promise((resolve, reject) => {
13478
13573
  });
13479
13574
  const getFileExtention = (fileName2) => fileName2.split(".").pop();
13480
13575
  const COUNTRIES_THAT_DONT_REQUIRE_SOLE_PROP_REGISTRATION = [CountryCodes.Australia, CountryCodes.Gibraltar, CountryCodes.Guernsey, CountryCodes.HongKong, CountryCodes.Ireland, CountryCodes.IsleOfMan, CountryCodes.Jersey, CountryCodes.Malta, CountryCodes.PuertoRico, CountryCodes.Spain, CountryCodes.UnitedKingdom, CountryCodes.UnitedStates];
13481
- const COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [CountryCodes.UnitedStates];
13576
+ const COUNTRIES_THAT_DONT_REQUIRE_COMPANY_REGISTRATION = [CountryCodes.PuertoRico, CountryCodes.UnitedStates];
13482
13577
  const COUNTRIES_WITH_POSSIBLE_REGISTRATION_EXEMPTIONS_FOR_SOLE_PROPS = [CountryCodes.Austria, CountryCodes.Canada, CountryCodes.Finland, CountryCodes.Germany, CountryCodes.Lithuania, CountryCodes.Luxembourg, CountryCodes.Poland, CountryCodes.Sweden, CountryCodes.Switzerland];
13483
13578
  const COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT = [CountryCodes.Australia, CountryCodes.Canada, CountryCodes.Gibraltar, CountryCodes.HongKong, CountryCodes.NewZealand, CountryCodes.PuertoRico, CountryCodes.Singapore, CountryCodes.UnitedStates];
13484
13579
  const COUNTRIES_THAT_DO_NOT_USE_TAX_ID_FOR_SOLE_PROP = [CountryCodes.NewZealand, CountryCodes.Singapore];
@@ -13489,6 +13584,7 @@ const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_COMPANIES = [
13489
13584
  const COUNTRIES_WITH_POSSIBLE_TAX_EXEMPTION_FOR_SOLE_PROPS = [
13490
13585
  // strictly a subset of countries which use tax ID
13491
13586
  CountryCodes.Canada,
13587
+ CountryCodes.PuertoRico,
13492
13588
  CountryCodes.UnitedStates
13493
13589
  ];
13494
13590
  const COUNTRIES_THAT_REQUIRE_DATE_OF_INCORPORATION = [CountryCodes.HongKong, CountryCodes.Singapore];
@@ -13537,10 +13633,10 @@ const rules$2 = ({
13537
13633
  companyRegistrationNumberExemptionAllowed: () => {
13538
13634
  var _a, _b;
13539
13635
  const companyType2 = ("companyType" in data || "companyStructure" in data) && (((_a = data.companyType) == null ? void 0 : _a.entityType) || ((_b = data.companyStructure) == null ? void 0 : _b.entityType));
13540
- if (country2 === "DE" && (companyType2 === CompanyTypesValue.GOVERNMENTAL_ORGANIZATION || companyType2 === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE)) {
13636
+ if (country2 === CountryCodes.Germany && (companyType2 === CompanyTypesValue.GOVERNMENTAL_ORGANIZATION || companyType2 === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE)) {
13541
13637
  return "REQUIRED";
13542
13638
  }
13543
- if (country2 === "DK" && companyType2 === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE) {
13639
+ if (country2 === CountryCodes.Denmark && companyType2 === CompanyTypesValue.NON_PROFIT_OR_CHARITABLE) {
13544
13640
  return "REQUIRED";
13545
13641
  }
13546
13642
  },
@@ -15473,13 +15569,22 @@ const IdVerificationMethodOptionFooter = ({
15473
15569
  };
15474
15570
  const idVerificationMethodFields = ["idVerificationMethod"];
15475
15571
  function IdVerificationMethodComponent(props) {
15572
+ const {
15573
+ id: id2,
15574
+ data: propsData,
15575
+ fieldValidationErrors,
15576
+ validators,
15577
+ formVerificationErrors,
15578
+ name,
15579
+ countryOfResidence
15580
+ } = props;
15476
15581
  const {
15477
15582
  i18n
15478
15583
  } = useI18nContext();
15479
15584
  const {
15480
15585
  getImageUrl
15481
15586
  } = useConfigurationApi();
15482
- const verificationMethodFormId = props.id;
15587
+ const verificationMethodFormId = id2;
15483
15588
  const schema = idVerificationMethodFields;
15484
15589
  const stateRef = useRef({
15485
15590
  setState: null
@@ -15497,11 +15602,11 @@ function IdVerificationMethodComponent(props) {
15497
15602
  ...props,
15498
15603
  schema,
15499
15604
  defaultData: {
15500
- ...props.data,
15605
+ ...propsData,
15501
15606
  idVerificationMethod: "instantVerification"
15502
15607
  },
15503
- rules: props.validators,
15504
- fieldProblems: props == null ? void 0 : props.fieldValidationErrors
15608
+ rules: validators,
15609
+ fieldProblems: fieldValidationErrors
15505
15610
  });
15506
15611
  const formUtils = formUtilities(props, i18n);
15507
15612
  useEffect(() => {
@@ -15528,15 +15633,15 @@ function IdVerificationMethodComponent(props) {
15528
15633
  children: [jsx(FormHeader, {
15529
15634
  heading: i18n.get("verificationMethod")
15530
15635
  }), jsx(ErrorPanel, {
15531
- verificationErrors: props == null ? void 0 : props.formVerificationErrors,
15532
- validationErrors: props == null ? void 0 : props.fieldValidationErrors,
15636
+ verificationErrors: formVerificationErrors,
15637
+ validationErrors: fieldValidationErrors,
15533
15638
  formUtils,
15534
15639
  id: "ariaErrorField"
15535
15640
  }), jsx("div", {
15536
15641
  dangerouslySetInnerHTML: {
15537
15642
  __html: i18n.get("idUploadDocumentSubtitle", {
15538
15643
  values: {
15539
- name: props.name
15644
+ name
15540
15645
  }
15541
15646
  })
15542
15647
  }
@@ -15603,7 +15708,7 @@ function IdVerificationMethodComponent(props) {
15603
15708
  }),
15604
15709
  titleId: "howVerificationWithOnfidoWork",
15605
15710
  contentId: "howVerificationWithOnfidoWorkContent"
15606
- }), props.countryOfResidence === CountryCodes.UnitedStates && data.idVerificationMethod === "instantVerification" && jsx("div", {
15711
+ }), (countryOfResidence === CountryCodes.PuertoRico || countryOfResidence === CountryCodes.UnitedStates) && data.idVerificationMethod === "instantVerification" && jsx("div", {
15607
15712
  dangerouslySetInnerHTML: {
15608
15713
  __html: i18n.get("byProceedingToTheNextStepYouConfirmThatYouHaveReadUnderstandAndAcceptTheTerms")
15609
15714
  }
@@ -16714,7 +16819,6 @@ function IndividualIdNumberTypeSelector({
16714
16819
  name: "individualIdNumberType",
16715
16820
  items: options,
16716
16821
  value: selected,
16717
- i18n,
16718
16822
  onChange: (e) => {
16719
16823
  var _a;
16720
16824
  return setSelected == null ? void 0 : setSelected((_a = e == null ? void 0 : e.target) == null ? void 0 : _a.value);
@@ -18716,6 +18820,7 @@ const currencyByCountry = {
18716
18820
  [CountryCodes.Poland]: [Currencies.PLN, Currencies.EUR],
18717
18821
  [CountryCodes.Portugal]: [Currencies.EUR],
18718
18822
  [CountryCodes.PuertoRico]: [Currencies.USD],
18823
+ // should exactly match CountryCodes.UnitedStates
18719
18824
  [CountryCodes.Romania]: [Currencies.RON, Currencies.EUR],
18720
18825
  [CountryCodes.Singapore]: [Currencies.SGD],
18721
18826
  [CountryCodes.Slovakia]: [Currencies.EUR],
@@ -24043,7 +24148,6 @@ function CompanyDropinComponent({
24043
24148
  const {
24044
24149
  isExperimentEnabled
24045
24150
  } = useExperimentsContext();
24046
- useCoreContext();
24047
24151
  const {
24048
24152
  i18n,
24049
24153
  setLocale
@@ -24594,13 +24698,15 @@ const mapCompanyDataResponseToFormSchema = (company2) => ({
24594
24698
  const CompanyLookupResultsHeader = ({
24595
24699
  results,
24596
24700
  status,
24597
- i18n,
24598
24701
  hasInternalError,
24599
24702
  selectedCompanyId,
24600
24703
  verifiedCompany,
24601
24704
  retrySearch,
24602
24705
  reset
24603
24706
  }) => {
24707
+ const {
24708
+ i18n
24709
+ } = useI18nContext();
24604
24710
  const numberOfResults = results == null ? void 0 : results.length;
24605
24711
  const headerText = useMemo(() => {
24606
24712
  if (hasInternalError && !selectedCompanyId) {
@@ -24635,7 +24741,7 @@ const CompanyLookupResultsHeader = ({
24635
24741
  onClick: reset,
24636
24742
  children: "Reset selection"
24637
24743
  })]
24638
- }), descriptionText && jsxs("div", {
24744
+ }), descriptionText && status !== "loading" && jsxs("div", {
24639
24745
  className: "adyen-company-lookup-results-header__description",
24640
24746
  children: [hasInternalError && !selectedCompanyId && jsx("button", {
24641
24747
  type: "button",
@@ -24659,9 +24765,11 @@ const LookupResultBody = ({
24659
24765
  })]
24660
24766
  });
24661
24767
  const LookupResultAlert = ({
24662
- i18n,
24663
24768
  type
24664
24769
  }) => {
24770
+ const {
24771
+ i18n
24772
+ } = useI18nContext();
24665
24773
  const iconType = {
24666
24774
  verified: AlertTypes.SUCCESS,
24667
24775
  warning: AlertTypes.WARNING,
@@ -24687,7 +24795,6 @@ const LookupResultAlert = ({
24687
24795
  };
24688
24796
  const LookupResult = ({
24689
24797
  classes,
24690
- i18n,
24691
24798
  option,
24692
24799
  status,
24693
24800
  isSelected,
@@ -24741,7 +24848,6 @@ const LookupResult = ({
24741
24848
  label: classes
24742
24849
  }
24743
24850
  }), showAlert && jsx(LookupResultAlert, {
24744
- i18n,
24745
24851
  type: alertType
24746
24852
  })]
24747
24853
  });
@@ -24767,7 +24873,6 @@ const LookupResult = ({
24767
24873
  label: classes
24768
24874
  }
24769
24875
  }), showAlert && jsx(LookupResultAlert, {
24770
- i18n,
24771
24876
  type: alertType
24772
24877
  })]
24773
24878
  })
@@ -24777,7 +24882,6 @@ const CompanyLookupResultsList = ({
24777
24882
  results,
24778
24883
  selectedCompanyId,
24779
24884
  status,
24780
- i18n,
24781
24885
  hasInternalError,
24782
24886
  tin = "",
24783
24887
  verifiedCompany,
@@ -24808,7 +24912,6 @@ const CompanyLookupResultsList = ({
24808
24912
  classes: optionClasses(option),
24809
24913
  option,
24810
24914
  status,
24811
- i18n,
24812
24915
  tin,
24813
24916
  isSelected: isOptionSelected(option),
24814
24917
  isInvalid: isOptionInvalid(option),
@@ -24855,9 +24958,7 @@ function CompanyLookup({
24855
24958
  handleVerifyTin
24856
24959
  }) {
24857
24960
  var _a;
24858
- const {
24859
- i18n
24860
- } = useI18nContext();
24961
+ useI18nContext();
24861
24962
  const {
24862
24963
  status,
24863
24964
  results,
@@ -24942,7 +25043,6 @@ function CompanyLookup({
24942
25043
  children: [jsx(CompanyLookupResultsHeader, {
24943
25044
  results,
24944
25045
  status,
24945
- i18n,
24946
25046
  hasInternalError,
24947
25047
  selectedCompanyId,
24948
25048
  verifiedCompany,
@@ -24954,7 +25054,6 @@ function CompanyLookup({
24954
25054
  results,
24955
25055
  selectedCompanyId,
24956
25056
  status,
24957
- i18n,
24958
25057
  hasInternalError,
24959
25058
  tin: taxInformationNumber2,
24960
25059
  verifiedCompany,
@@ -26344,9 +26443,6 @@ function useCompanySearchTaskSubmit({
26344
26443
  onExternalSubmit,
26345
26444
  handleUpdateLegalEntity
26346
26445
  }) {
26347
- const {
26348
- setAccountHolder
26349
- } = useCoreContext();
26350
26446
  const {
26351
26447
  showToast,
26352
26448
  clearToasts
@@ -26430,7 +26526,6 @@ function useCompanySearchTaskSubmit({
26430
26526
  }
26431
26527
  });
26432
26528
  logger$c.log(submittedLegalEntity);
26433
- setAccountHolder(entityTypeToCorrespondingAccountHolderOption[legalEntityResponse.type]);
26434
26529
  clearToasts();
26435
26530
  onExternalSubmit == null ? void 0 : onExternalSubmit(data);
26436
26531
  } catch (e) {
@@ -26466,7 +26561,7 @@ function useCompanySearchTaskSubmit({
26466
26561
  } finally {
26467
26562
  setLoadingStatus("success");
26468
26563
  }
26469
- }, [baseTrackingPayload, clearToasts, forms2, i18n, legalEntityResponse, onExternalSubmit, problems, setAccountHolder, setLoadingStatus, setProblems, showToast, submitDocuments, task]);
26564
+ }, [baseTrackingPayload, clearToasts, forms2, i18n, legalEntityResponse, onExternalSubmit, problems, setLoadingStatus, setProblems, showToast, submitDocuments, task]);
26470
26565
  return {
26471
26566
  submit: submit2
26472
26567
  };
@@ -26874,6 +26969,16 @@ const useShouldShowIntroduction = ({
26874
26969
  });
26875
26970
  return canSeeIntroduction && !hasSeenIntroduction;
26876
26971
  };
26972
+ const getHasSeenSingpassSelectionStorageKey = (legalEntityId) => `COMPLETED_SINGPASS_SELECTION-${legalEntityId}`;
26973
+ const useHasSeenSingpassSelection = ({
26974
+ legalEntityId
26975
+ }) => {
26976
+ const [hasSeenSingpassSelection, setHasSeenSingpassSelection] = useLocalStorage(getHasSeenSingpassSelectionStorageKey(legalEntityId), false);
26977
+ return {
26978
+ hasSeenSingpassSelection,
26979
+ setHasSeenSingpassSelection
26980
+ };
26981
+ };
26877
26982
  const logger$b = createLogger("useAssociatedLegalArrangement");
26878
26983
  function useAssociatedLegalArrangement({
26879
26984
  rootLegalEntity,
@@ -28810,6 +28915,152 @@ function ReviewComponent({
28810
28915
  footer
28811
28916
  });
28812
28917
  }
28918
+ const SvgSetupManual = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 102 100", ...props, children: [
28919
+ /* @__PURE__ */ jsx$1("path", { fill: "#EEF0F3", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M66.82 10.09H2.9c-1.19 0-2.15.96-2.15 2.15v84.05c0 1.19.96 2.15 2.15 2.15h63.9c1.2 0 2.15-.96 2.15-2.15V12.24c0-1.19-.96-2.15-2.14-2.15" }),
28920
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M25.44 35.7H9.02v3.94h16.42z" }),
28921
+ /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M24.44 55.91H9.02v1.97h15.42z" }),
28922
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M55.77 35.7H29.16v3.94h26.61z" }),
28923
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 29.58H20.4m-11.38-3.4h20.14" }),
28924
+ /* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 51.75h18.9" }),
28925
+ /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M24.44 69.35H9.02v1.97h15.42z" }),
28926
+ /* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 65.19h18.9" }),
28927
+ /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M48 55.91H32.57v1.97h15.41z" }),
28928
+ /* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M32.58 51.75h18.9" }),
28929
+ /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M48 69.35H32.57v1.97h15.41z" }),
28930
+ /* @__PURE__ */ jsx$1("path", { stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M32.58 65.19h18.9" }),
28931
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.02 82.5h9.46M9.02 86h25.8" }),
28932
+ /* @__PURE__ */ jsx$1("path", { fill: "#fff", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M83.1.79H19.17c-1.18 0-2.14.96-2.14 2.15v84.05c0 1.19.96 2.15 2.14 2.15H83.1c1.19 0 2.15-.96 2.15-2.15V2.94c0-1.19-.96-2.15-2.15-2.15" }),
28933
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M64.64 16.78h-39.1v6.01h39.1zm0 11.71h-39.1v6.01h39.1zm0 11.71h-39.1v6.01h39.1z" }),
28934
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M25.44 10.14h22.54" }),
28935
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M25.44 51.9h22.54m-22.54 5.7h32.82M25.44 68.99h26.54m-26.54 5.69H37.4" }),
28936
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M54.4 10.14h17.28M27.93 41.7v2.84m-.4-2.94h.8m-.8 3.2h.8m-.8-25.02h7.83m3.49 0h9.75M27.7 31.5h14.32m9.96-11.72h2.85" }),
28937
+ /* @__PURE__ */ jsx$1("path", { fill: "#00112C", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "m79.81 76.03 1.96 21.5a1.12 1.12 0 0 0 1.93.68l6.59-6.82q.2-.2.46-.28l9.01-2.96c.9-.3 1.05-1.52.23-2.02L81.51 74.96a1.12 1.12 0 0 0-1.69 1.06z" })
28938
+ ] });
28939
+ const SvgSetupSingpass = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 146 95", ...props, children: [
28940
+ /* @__PURE__ */ jsx$1("path", { fill: "#fff", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M55.82 76.52a6.1 6.1 0 0 0 6.11 6.11h76.67a6.1 6.1 0 0 0 6.11-6.11V21.46H55.83z" }),
28941
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M138.6 13.88H61.93a6.1 6.1 0 0 0-6.11 6.11v1.47h88.88V20a6.1 6.1 0 0 0-6.11-6.11z" }),
28942
+ /* @__PURE__ */ jsx$1("path", { fill: "#fff", d: "m30.16 94.33 3.47-2.6a41 41 0 0 0 8.1-8.1l2.6-3.48 6.07-2.02 13.53-1.69a3.04 3.04 0 0 0-.71-6.03l-8.6.96.7-3.47 12.66-1.58a3.04 3.04 0 0 0-.71-6.03L56.6 61.48l.8-3.96 10.58-1.32a3.04 3.04 0 0 0-.71-6.03l-8.6.95.8-3.98 8.5-1.06a3.04 3.04 0 0 0-.7-6.03L52.42 41.7l-22.26 2.47V41a4.86 4.86 0 0 0-4.86-4.86c-.68 0-1.22.55-1.22 1.22v2.7c0 1.42-.36 2.8-1.07 4.02L17.2 54.25c-.8 1.4-1.4 2.93-1.75 4.51L11.93 74.6" }),
28943
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "m30.16 94.33 3.47-2.6a41 41 0 0 0 8.1-8.1l2.6-3.48 6.07-2.02 13.53-1.69a3.04 3.04 0 0 0-.71-6.03l-8.6.96.7-3.47 12.66-1.58a3.04 3.04 0 0 0-.71-6.03L56.6 61.48l.8-3.96 10.58-1.32a3.04 3.04 0 0 0-.71-6.03l-8.6.95.8-3.98 8.5-1.06a3.04 3.04 0 0 0-.7-6.03L52.42 41.7l-22.26 2.47V41a4.86 4.86 0 0 0-4.86-4.86c-.68 0-1.22.55-1.22 1.22v2.7c0 1.42-.36 2.8-1.07 4.02L17.2 54.25c-.8 1.4-1.4 2.93-1.75 4.51L11.93 74.6" }),
28944
+ /* @__PURE__ */ jsx$1("path", { fill: "#00112C", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M30.15 44.19h-6.07V62.4h6.07z" }),
28945
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M42.8 76.1a11 11 0 0 0 1.4 3.63l.14.24" }),
28946
+ /* @__PURE__ */ jsx$1("path", { fill: "#00112C", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M58.16 1.11H33.74a6.1 6.1 0 0 0-6.1 6.11v61.05a6.1 6.1 0 0 0 6.1 6.1h24.42a6.1 6.1 0 0 0 6.1-6.1V7.22a6.1 6.1 0 0 0-6.1-6.1" }),
28947
+ /* @__PURE__ */ jsx$1("path", { fill: "#fff", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M62.74 7.22a4.6 4.6 0 0 0-4.58-4.58H33.74a4.6 4.6 0 0 0-4.58 4.58v53.42h33.58z" }),
28948
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M45.94 69.8a3.05 3.05 0 1 0 0-6.1 3.05 3.05 0 0 0 0 6.1" }),
28949
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M29.16 60.64v7.63a4.6 4.6 0 0 0 4.58 4.58h24.42a4.6 4.6 0 0 0 4.58-4.58v-7.63" }),
28950
+ /* @__PURE__ */ jsx$1("path", { fill: "#fff", d: "M30.16 76.63v-7.24c0-3.2-.95-6.32-2.72-8.98a5 5 0 0 1-.58-4.26l2.67-8q.62-1.87.62-3.84v-3.3a4.86 4.86 0 0 0-4.86-4.85c-.67 0-1.22.54-1.22 1.21v2.71c0 1.41-.36 2.79-1.07 4.01l-5.8 10.18q-1.22 2.13-1.76 4.52L11.92 74.6 1.32 85.33" }),
28951
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M30.16 76.63v-7.24c0-3.2-.95-6.32-2.72-8.98a5 5 0 0 1-.58-4.26l2.67-8q.62-1.87.62-3.84v-3.3a4.86 4.86 0 0 0-4.86-4.85c-.67 0-1.22.54-1.22 1.21v2.71c0 1.41-.36 2.79-1.07 4.01l-5.8 10.18q-1.22 2.13-1.76 4.52L11.92 74.6 1.32 85.33" }),
28952
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M58.16 2.64H33.74a4.6 4.6 0 0 0-4.56 4.16h33.54a4.6 4.6 0 0 0-4.56-4.16" }),
28953
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M58.3 28.37H33.95v3.74H58.3z" }),
28954
+ /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M46.12 42.77H33.95v3.74h12.17z" }),
28955
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M36.72 30.24h18.8" }),
28956
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M58.3 35.46H33.95v3.74H58.3z" }),
28957
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M37.86 36.19v2.3m.82-1.96-1.62 1.61m1.62 0-1.62-1.61m1.94.81h-2.28m12.15-1.15v2.3m.82-1.96-1.62 1.61m1.62 0-1.62-1.61m1.95.81h-2.29m6.65-1.15v2.3m.82-1.96-1.63 1.61m1.63 0-1.63-1.61m1.95.81h-2.28m-9.87-1.15v2.3m.81-1.96-1.62 1.61m1.62 0-1.62-1.61m1.96.81h-2.3" }),
28958
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M33.9 21.3h18.82M33.9 24.97h8.4" }),
28959
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M119.82 43.55h-39.1v6.02h39.1z" }),
28960
+ /* @__PURE__ */ jsx$1("path", { fill: "#6F7988", stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M100.27 61.31H80.7v6.02h19.56z" }),
28961
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M85.17 46.56h30.2" }),
28962
+ /* @__PURE__ */ jsx$1("path", { fill: "#A0BEE6", stroke: "#A0BEE6", strokeLinecap: "round", strokeLinejoin: "round", d: "M119.82 52.25h-39.1v6.02h39.1z" }),
28963
+ /* @__PURE__ */ jsx$1("path", { stroke: "#00112C", strokeLinecap: "round", strokeLinejoin: "round", d: "M86.73 53.7v3.13m1.1-2.68-2.2 2.21m2.2 0-2.2-2.2m2.67 1.1h-3.13m19.61-1.56v3.13m1.1-2.68-2.21 2.21m2.21 0-2.21-2.2m2.67 1.1h-3.13m10.59-1.56v3.13m1.1-2.68-2.2 2.21m2.2 0-2.2-2.2m2.66 1.1h-3.12M95.75 53.7v3.13m1.1-2.68-2.2 2.21m2.2 0-2.2-2.2m2.66 1.1H94.2" }),
28964
+ /* @__PURE__ */ jsx$1("path", { stroke: "#6F7988", strokeLinecap: "round", strokeLinejoin: "round", d: "M80.65 34.88h30.2m-30.2 3.21h13.47" })
28965
+ ] });
28966
+ const SvgSingpassLogo = (props) => /* @__PURE__ */ jsxs$1("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 93 16", ...props, children: [
28967
+ /* @__PURE__ */ jsx$1("path", { fill: "#F4333D", d: "M5.88 11.8c-2.54 0-4.34-.85-5.13-1.57l1.69-2.48a5.5 5.5 0 0 0 3.44 1.36c.92 0 1.33-.27 1.33-.77 0-.38-.32-.68-1.3-.9l-2-.47c-1.96-.46-2.89-1.65-2.89-3.3C1.02 1.42 2.82.1 5.5.1c2.07 0 3.73.63 4.54 1.35L8.35 3.92A4.5 4.5 0 0 0 5.5 2.75c-.86 0-1.24.3-1.24.74 0 .45.4.7 1.17.88l2 .45c2.05.45 3.04 1.56 3.04 3.18 0 2.32-1.73 3.81-4.59 3.81m12-.22h3.38V5.52c0-1.48.72-2.4 2.12-2.4 1.32 0 2.02.76 2.02 2.4v6.06h3.37V4.67c0-3.02-1.5-4.58-4.09-4.58q-2.2 0-3.42 1.74V1.1c0-.5-.29-.8-.78-.8h-2.59v11.27M42.46.32v9.75c0 4.24-2.75 5.93-6.12 5.93-2.25 0-4.12-.59-5.24-1.6l1.75-2.61a5 5 0 0 0 3.49 1.37c1.73 0 2.74-1.1 2.74-2.64V9.8c-.8 1.02-1.98 1.47-3.41 1.47-2.73 0-5.09-2.39-5.09-5.59S32.93.09 35.66.09a3.9 3.9 0 0 1 3.41 1.7V1.1c0-.5.3-.8.8-.8zM39.2 5.68c0-1.46-1.1-2.61-2.63-2.61A2.57 2.57 0 0 0 34 5.68a2.6 2.6 0 0 0 2.57 2.61 2.56 2.56 0 0 0 2.63-2.61m18 .27c0 3.47-2.35 5.86-5.28 5.86-1.53 0-2.74-.45-3.62-1.46v5.38h-3.37V.32h2.59c.5 0 .78.29.78.79v.67A4.2 4.2 0 0 1 51.91.1c2.93 0 5.29 2.39 5.29 5.86m-3.4 0c0-1.69-1.2-2.88-2.78-2.88a2.77 2.77 0 0 0-2.83 2.88 2.8 2.8 0 0 0 2.83 2.89c1.58 0 2.77-1.2 2.77-2.89M70.91.32v11.26h-3.38v-1.46a4.2 4.2 0 0 1-3.62 1.69c-2.92 0-5.28-2.39-5.28-5.86S61 .09 63.92.09c1.53 0 2.8.54 3.62 1.7V1.1c0-.5.3-.8.79-.8zm-3.26 5.63a2.8 2.8 0 0 0-2.84-2.88c-1.57 0-2.76 1.19-2.76 2.88 0 1.7 1.19 2.89 2.76 2.89 1.6 0 2.84-1.2 2.84-2.89m10.1 5.86c2.85 0 4.58-1.49 4.58-3.8 0-1.63-.99-2.73-3.03-3.19l-2-.45c-.77-.18-1.18-.43-1.18-.88s.39-.74 1.24-.74c1.04 0 2.11.5 2.86 1.17l1.68-2.48C81.11.72 79.44.1 77.37.1 74.7.1 72.9 1.42 72.9 3.68c0 1.64.92 2.83 2.88 3.29l2 .47c.99.22 1.3.52 1.3.9 0 .5-.4.77-1.33.77a5.5 5.5 0 0 1-3.44-1.36l-1.68 2.48c.78.72 2.58 1.58 5.12 1.58m10.65 0C91.27 11.8 93 10.32 93 8c0-1.63-.99-2.73-3.04-3.19l-2-.45c-.76-.18-1.17-.43-1.17-.88s.38-.74 1.24-.74c1.03 0 2.11.5 2.86 1.17l1.68-2.48C91.77.72 90.1.1 88.03.1c-2.68 0-4.47 1.33-4.47 3.59 0 1.64.92 2.83 2.87 3.29l2 .47c1 .22 1.3.52 1.3.9 0 .5-.4.77-1.32.77a5.5 5.5 0 0 1-3.44-1.36l-1.69 2.48c.8.72 2.6 1.58 5.13 1.58" }),
28968
+ /* @__PURE__ */ jsx$1("path", { fill: "#000", d: "M13.8 3.92c1.1 0 1.95-.86 1.95-1.96S14.9 0 13.8 0s-1.96.86-1.96 1.96.85 1.96 1.96 1.96m-2.12 7.66h4.23l-.9-7a5 5 0 0 1-2.43 0z" })
28969
+ ] });
28970
+ const setupAccountMethods = ["singpass", "manual"];
28971
+ const setupAccountMethodFields = ["setupAccountMethod"];
28972
+ const getSetupAccountMethodMetadata = () => ({
28973
+ singpass: {
28974
+ name: "retrieveMyInfoBusiness",
28975
+ description: "getYourBusinessVerifiedDetails",
28976
+ icon: jsx("span", {
28977
+ className: "adyen-kyc-setup-singpass-container",
28978
+ children: jsx(SvgSetupSingpass, {})
28979
+ }),
28980
+ provider: {
28981
+ name: "singpass",
28982
+ icon: jsx("span", {
28983
+ className: "adyen-kyc-singpass-logo-container",
28984
+ children: jsx(SvgSingpassLogo, {})
28985
+ })
28986
+ }
28987
+ },
28988
+ manual: {
28989
+ name: "enterTheDetailsYourself",
28990
+ description: "youAlsoHaveToUploadSomeSupportingDocuments",
28991
+ icon: jsx("span", {
28992
+ className: "adyen-kyc-setup-manual-container",
28993
+ children: jsx(SvgSetupManual, {})
28994
+ })
28995
+ }
28996
+ });
28997
+ const SingpassSelection = (props) => {
28998
+ const {
28999
+ handleNextClick
29000
+ } = props;
29001
+ const {
29002
+ i18n
29003
+ } = useI18nContext();
29004
+ const [selectedMethod, setSelectedMethod] = useState();
29005
+ const selectSetupAccountMethod = (method) => {
29006
+ setSelectedMethod(method);
29007
+ handleChangeFor("setupAccountMethod")(method);
29008
+ };
29009
+ const {
29010
+ handleChangeFor,
29011
+ data
29012
+ } = useForm({
29013
+ ...props,
29014
+ schema: setupAccountMethodFields,
29015
+ defaultData: {}
29016
+ });
29017
+ const methodsMetadata = getSetupAccountMethodMetadata();
29018
+ return jsx("div", {
29019
+ className: "adl-u-display-flex adl-u-justify-content-center",
29020
+ children: jsxs("div", {
29021
+ className: "adyen-kyc-singpass-selection",
29022
+ children: [jsx("header", {
29023
+ className: "adl-u-margin-bottom-32",
29024
+ children: jsx(Heading, {
29025
+ level: 2,
29026
+ children: i18n.get("howWouldYouLikeToSetUpYourAccount")
29027
+ })
29028
+ }), jsx("form", {
29029
+ children: jsx(Field, {
29030
+ name: "setupAccountMethod",
29031
+ children: (childProps) => jsx(RadioCardSelect, {
29032
+ ...childProps,
29033
+ name: "setupAccountMethod",
29034
+ options: setupAccountMethods,
29035
+ onSelect: selectSetupAccountMethod,
29036
+ selected: data.setupAccountMethod,
29037
+ optionId: (method) => method,
29038
+ optionName: (method) => methodsMetadata[method].name,
29039
+ optionDescription: (method) => methodsMetadata[method].description,
29040
+ className: "adyen-kyc-field-verification-methods",
29041
+ optionClassNames: () => ({
29042
+ icon: "adyen-kyc-radio-group-card__illustration",
29043
+ label: "adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio",
29044
+ footer: "adyen-kyc-field-verification-methods__footer"
29045
+ }),
29046
+ renderOptionIcon: (method) => methodsMetadata[method].icon,
29047
+ renderOptionFooter: (method) => {
29048
+ var _a;
29049
+ return (_a = methodsMetadata[method].provider) == null ? void 0 : _a.icon;
29050
+ }
29051
+ })
29052
+ })
29053
+ }), jsx(Button, {
29054
+ label: i18n.get("next"),
29055
+ block: true,
29056
+ disabled: !selectedMethod,
29057
+ onClick: () => handleNextClick(selectedMethod),
29058
+ type: "button",
29059
+ role: "button"
29060
+ })]
29061
+ })
29062
+ });
29063
+ };
28813
29064
  const businessTypeMapping = {
28814
29065
  myName: {
28815
29066
  [LegalEntityType.INDIVIDUAL]: "individual"
@@ -32442,6 +32693,13 @@ function DropinComposerComponent({
32442
32693
  } = useToastContext();
32443
32694
  const [isLoadingConfiguration, setIsLoadingConfiguration] = useState(false);
32444
32695
  const isNewEntryFlowEnabled = isExperimentEnabled("EnableNewEntryFlow");
32696
+ const isSingpassExperimentEnabled = isExperimentEnabled("ShowSingPassButtonForCompanies");
32697
+ const {
32698
+ hasSeenSingpassSelection,
32699
+ setHasSeenSingpassSelection
32700
+ } = useHasSeenSingpassSelection({
32701
+ legalEntityId: legalEntityResponse.id
32702
+ });
32445
32703
  const [leId, setLeId] = useLeId();
32446
32704
  const showIntroduction = useShouldShowIntroduction({
32447
32705
  legalEntity: legalEntityResponse
@@ -32452,16 +32710,22 @@ function DropinComposerComponent({
32452
32710
  legalEntityId: legalEntityResponse.id
32453
32711
  });
32454
32712
  const [tasks, setTasks] = useState([]);
32713
+ const [rootLegalEntity, setRootLegalEntity] = useState(legalEntityResponse);
32714
+ const rootLegalEntityCountry = rootLegalEntity.type === LegalEntityType.INDIVIDUAL ? rootLegalEntity.individual.residentialAddress.country : rootLegalEntity.organization.registeredAddress.country;
32715
+ const isSoleProp = accountHolder2 === "mySoleProprietorName" || hasSolePropInLegalEntity(legalEntityResponse);
32716
+ const isSingpassEnabled = rootLegalEntityCountry === CountryCodes.Singapore && isSingpassExperimentEnabled && !hasSeenSingpassSelection;
32717
+ const shouldShowSingpass = isSingpassEnabled && (isSoleProp || legalEntityResponse.type === LegalEntityType.ORGANIZATION);
32455
32718
  const initialTask = useMemo(() => {
32456
32719
  if (isNewEntryFlowEnabled && (!accountHolder2 || legalEntityResponse.id !== leId)) {
32457
32720
  return TaskTypes.BUSINESS_TYPE_SELECTION;
32458
32721
  }
32459
32722
  if (showIntroduction)
32460
32723
  return TaskTypes.INTRODUCTION;
32724
+ if (isSingpassEnabled)
32725
+ return TaskTypes.SINGPASS_SELECTION;
32461
32726
  return TaskTypes.TASKS_OVERVIEW;
32462
32727
  }, [showIntroduction, isNewEntryFlowEnabled, accountHolder2, legalEntityResponse, leId]);
32463
32728
  const [taskHistory, setTaskHistory] = useState([initialTask]);
32464
- const [rootLegalEntity, setRootLegalEntity] = useState(legalEntityResponse);
32465
32729
  const [associatedLegalEntity, setAssociatedLegalEntity] = useState(null);
32466
32730
  const {
32467
32731
  associatedLegalArrangement,
@@ -32483,7 +32747,6 @@ function DropinComposerComponent({
32483
32747
  const [serviceAgreementTypes, setServiceAgreementTypes] = useState([]);
32484
32748
  const [serviceAgreementAcceptanceInfosWithNames, setServiceAgreementAcceptanceInfosWithNames] = useState([]);
32485
32749
  const [transferInstrument, setTransferInstrument] = useState(null);
32486
- const rootLegalEntityCountry = rootLegalEntity.type === LegalEntityType.INDIVIDUAL ? rootLegalEntity.individual.residentialAddress.country : rootLegalEntity.organization.registeredAddress.country;
32487
32750
  const [capabilityProblems, setCapabilityProblems] = useState(getCapabilityProblems(legalEntityResponse, rootLegalEntityCountry, isExperimentEnabled));
32488
32751
  const [bankVerificationVendors, setBankVerificationVendors] = useState();
32489
32752
  const hasTrust = accountHolder2 === "aTrust" || isPartOfTrustFromLegalEntity(legalEntityResponse);
@@ -32739,6 +33002,33 @@ function DropinComposerComponent({
32739
33002
  });
32740
33003
  }
32741
33004
  };
33005
+ const handleSingpassSelectionNextClick = async (method) => {
33006
+ const {
33007
+ handleOpenSingpassAuthorizationLink
33008
+ } = args;
33009
+ if (method === "singpass" && handleOpenSingpassAuthorizationLink) {
33010
+ try {
33011
+ const {
33012
+ item: {
33013
+ authUrl
33014
+ }
33015
+ } = await handleOpenSingpassAuthorizationLink();
33016
+ setHasSeenSingpassSelection(true);
33017
+ window.open(authUrl, "_blank").focus();
33018
+ onNavigateTo(TaskTypes.TASKS_OVERVIEW);
33019
+ } catch (e) {
33020
+ logger$8.error(e);
33021
+ showToast({
33022
+ label: i18n.get("failToLaunchSingpass"),
33023
+ type: ToastType.ERROR
33024
+ });
33025
+ }
33026
+ }
33027
+ if (method === "manual") {
33028
+ setHasSeenSingpassSelection(true);
33029
+ onNavigateTo(TaskTypes.TASKS_OVERVIEW);
33030
+ }
33031
+ };
32742
33032
  const onNavigateTo = (task) => {
32743
33033
  setTaskHistory([...taskHistory, task]);
32744
33034
  onNavigate(task);
@@ -32998,7 +33288,15 @@ function DropinComposerComponent({
32998
33288
  setLeId(legalEntityResponse.id);
32999
33289
  setAccountHolder(newAccountHolder);
33000
33290
  await refreshLegalEntity();
33001
- onNavigateTo(showIntroduction ? TaskTypes.INTRODUCTION : TaskTypes.TASKS_OVERVIEW);
33291
+ if (showIntroduction) {
33292
+ onNavigateTo(TaskTypes.INTRODUCTION);
33293
+ return;
33294
+ }
33295
+ if (isSingpassEnabled && newAccountHolder === "theCompanyIWorkFor" || newAccountHolder === "mySoleProprietorName") {
33296
+ onNavigateTo(TaskTypes.SINGPASS_SELECTION);
33297
+ return;
33298
+ }
33299
+ onNavigateTo(TaskTypes.TASKS_OVERVIEW);
33002
33300
  },
33003
33301
  taskHistory,
33004
33302
  setTaskHistory,
@@ -33009,11 +33307,19 @@ function DropinComposerComponent({
33009
33307
  eventEmitter
33010
33308
  })
33011
33309
  });
33310
+ case TaskTypes.SINGPASS_SELECTION:
33311
+ return jsx(SingpassSelection, {
33312
+ handleNextClick: handleSingpassSelectionNextClick
33313
+ });
33012
33314
  case TaskTypes.INTRODUCTION:
33013
33315
  return jsx(Introduction, {
33014
33316
  legalEntity: rootLegalEntity,
33015
33317
  onExitIntroduction: () => {
33016
33318
  setHasSeenIntroduction(true);
33319
+ if (shouldShowSingpass) {
33320
+ onNavigateTo(TaskTypes.SINGPASS_SELECTION);
33321
+ return;
33322
+ }
33017
33323
  onNavigateTo(TaskTypes.TASKS_OVERVIEW);
33018
33324
  },
33019
33325
  tasks
@@ -34554,7 +34860,7 @@ const ConfigurationApiProvider = ({
34554
34860
  isEmbeddedDropin,
34555
34861
  loadingContext
34556
34862
  } = authContext;
34557
- const sdkVersion = "2.37.1";
34863
+ const sdkVersion = "2.38.0";
34558
34864
  useAnalytics({
34559
34865
  onUserEvent,
34560
34866
  legalEntityId: rootLegalEntityId,
package/dist/style.css CHANGED
@@ -99763,6 +99763,53 @@ a.adl-button:disabled, a.adl-button.adl-button--disabled {
99763
99763
  /* #endregion */
99764
99764
  /* #region Inline components */
99765
99765
  /* #endregion */
99766
+ .adyen-kyc-singpass-selection {
99767
+ max-width: 544px;
99768
+ }
99769
+ .adyen-kyc-singpass-selection__nav {
99770
+ margin-top: 32px;
99771
+ }
99772
+ .adyen-kyc-singpass-selection__confirm {
99773
+ display: flex;
99774
+ gap: 16px;
99775
+ margin-top: 32px;
99776
+ }
99777
+ .adyen-kyc-singpass-selection__confirm button {
99778
+ flex-grow: 1;
99779
+ }
99780
+
99781
+ .adyen-kyc-setup-singpass-container {
99782
+ width: 143px;
99783
+ }
99784
+
99785
+ .adyen-kyc-setup-manual-container {
99786
+ width: 99px;
99787
+ }
99788
+
99789
+ .adyen-kyc-singpass-logo-container {
99790
+ width: 92px;
99791
+ }/* #region Spacing */
99792
+ /* #endregion */
99793
+ /* #region Colors */
99794
+ /* #endregion */
99795
+ /* #region Fonts */
99796
+ /* #endregion */
99797
+ /* #region Borders */
99798
+ /* #endregion */
99799
+ /* #region Box-shadow */
99800
+ /* #endregion */
99801
+ /* #region Shadows */
99802
+ /* #endregion */
99803
+ /* #region Z-index */
99804
+ /* #endregion */
99805
+ /* #region Transition */
99806
+ /* #endregion */
99807
+ /* #region Timing functions */
99808
+ /* #endregion */
99809
+ /* #region Focus ring */
99810
+ /* #endregion */
99811
+ /* #region Inline components */
99812
+ /* #endregion */
99766
99813
  /* stylelint-disable-line scss/dollar-variable-pattern */
99767
99814
  /* stylelint-disable-line scss/dollar-variable-pattern */
99768
99815
  /* stylelint-disable-line scss/dollar-variable-pattern */
@@ -1,2 +1,2 @@
1
1
  import { CompanyLookupResultsHeaderProps } from './types';
2
- export declare const CompanyLookupResultsHeader: ({ results, status, i18n, hasInternalError, selectedCompanyId, verifiedCompany, retrySearch, reset, }: CompanyLookupResultsHeaderProps) => import("preact").JSX.Element;
2
+ export declare const CompanyLookupResultsHeader: ({ results, status, hasInternalError, selectedCompanyId, verifiedCompany, retrySearch, reset, }: CompanyLookupResultsHeaderProps) => import("preact").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { CompanyLookupResultsListProps } from './types';
2
- export declare const CompanyLookupResultsList: ({ results, selectedCompanyId, status, i18n, hasInternalError, tin, verifiedCompany, verify, }: CompanyLookupResultsListProps) => import("preact").JSX.Element;
2
+ export declare const CompanyLookupResultsList: ({ results, selectedCompanyId, status, hasInternalError, tin, verifiedCompany, verify, }: CompanyLookupResultsListProps) => import("preact").JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import './LookupResult.scss';
2
2
  import { LookupResultProps } from './types';
3
- export declare const LookupResult: ({ classes, i18n, option, status, isSelected, isInvalid, isVerified, isError, tin, verifiedCompany, onSelect, }: LookupResultProps) => import("preact").JSX.Element;
3
+ export declare const LookupResult: ({ classes, option, status, isSelected, isInvalid, isVerified, isError, tin, verifiedCompany, onSelect, }: LookupResultProps) => import("preact").JSX.Element;
@@ -5,7 +5,6 @@ import type { CountryCode } from '../../core/models/country-code';
5
5
  import type { ProvinceCode } from '../../core/models/province-code';
6
6
  import type { StateCode } from '../../core/models/state-code';
7
7
  import type { BaseTrackingPayload } from '../../core/utils';
8
- import type Language from '../../language';
9
8
  import type { ValidatorMode } from '../../utils/validation/types';
10
9
  import type { CompanyBasicsSchema } from '../CompanyBasics/types';
11
10
  import type { CompanySearchSchema } from '../CompanySearch/types';
@@ -15,12 +14,10 @@ export interface LookupResultBodyProps {
15
14
  address: string | undefined;
16
15
  }
17
16
  export interface LookupResultAlertProps {
18
- i18n: Language;
19
17
  type: 'verified' | 'warning' | 'error';
20
18
  }
21
19
  export interface LookupResultProps {
22
20
  classes: string;
23
- i18n: Language;
24
21
  option: CompanySearchResult;
25
22
  status: HookStatus;
26
23
  isSelected: boolean;
@@ -34,7 +31,6 @@ export interface LookupResultProps {
34
31
  export interface CompanyLookupResultsHeaderProps {
35
32
  results: readonly CompanySearchResult[] | undefined;
36
33
  status: HookStatus;
37
- i18n: Language;
38
34
  hasInternalError: boolean;
39
35
  selectedCompanyId: string | undefined;
40
36
  verifiedCompany: CompanyDatasetResponse | undefined;
@@ -45,7 +41,6 @@ export interface CompanyLookupResultsListProps {
45
41
  results: readonly CompanySearchResult[];
46
42
  selectedCompanyId: string | undefined;
47
43
  status: HookStatus;
48
- i18n: Language;
49
44
  hasInternalError: boolean;
50
45
  tin: string | undefined;
51
46
  verifiedCompany: CompanyDatasetResponse | undefined;
@@ -16,6 +16,13 @@ import { TranslationKey } from '../../language/types';
16
16
  import EventEmitter from '../EventEmitter';
17
17
  import { TaskTypes } from '../TaskList/types';
18
18
  import type { BasicComponentProps } from '../UIElement';
19
+ interface SingpassLinkResponseItem {
20
+ authUrl: string;
21
+ success: boolean;
22
+ }
23
+ interface SingpassLinkResponse {
24
+ item: SingpassLinkResponseItem;
25
+ }
19
26
  export interface DropinComposerProps extends DropinAPIHandlers, BasicComponentProps {
20
27
  capabilities?: CapabilityName[];
21
28
  legalEntityResponse: ExistingLegalEntity;
@@ -58,6 +65,7 @@ export interface DropinAPIHandlers {
58
65
  handleVerifyTin?(data: TinVerificationRequest): Promise<TinVerificationResponse>;
59
66
  handleGetOnboardingStatus?(): Promise<OnboardingStatusResponse>;
60
67
  handleGenerateOnboardingLink?(config: OnboardingLinkConfig): Promise<OnboardingLinkResponse>;
68
+ handleOpenSingpassAuthorizationLink?(): Promise<SingpassLinkResponse>;
61
69
  }
62
70
  export interface DropinProps {
63
71
  legalEntityResponse?: ExistingLegalEntity;
@@ -73,3 +81,4 @@ export interface DropinProps {
73
81
  taskType?: TaskTypes;
74
82
  taskName?: TranslationKey;
75
83
  }
84
+ export {};
@@ -0,0 +1,15 @@
1
+ import './_singpass-selection.component.scss';
2
+ import type { JSX } from 'preact';
3
+ import { TranslationKey } from '../../language/types';
4
+ import { SetUpAccountMethodProps, SetupAccountMethodSchema } from './types';
5
+ export declare const setupAccountMethodFields: Array<keyof SetupAccountMethodSchema>;
6
+ export interface SetupAccountMetadata {
7
+ name: TranslationKey;
8
+ description: TranslationKey;
9
+ icon: JSX.Element;
10
+ provider?: {
11
+ name: string;
12
+ icon: JSX.Element;
13
+ };
14
+ }
15
+ export declare const SingpassSelection: (props: SetUpAccountMethodProps) => JSX.Element;
@@ -0,0 +1,9 @@
1
+ import type { BaseInnerFormProps } from '../../core/hooks/useForm';
2
+ export declare const setupAccountMethods: readonly ["singpass", "manual"];
3
+ export type SetupAccountMethod = (typeof setupAccountMethods)[number];
4
+ export interface SetupAccountMethodSchema {
5
+ setupAccountMethod: SetupAccountMethod | undefined;
6
+ }
7
+ export interface SetUpAccountMethodProps extends BaseInnerFormProps<SetupAccountMethodSchema> {
8
+ handleNextClick: (setupAccountMethod: SetupAccountMethod | undefined) => void;
9
+ }
@@ -28,7 +28,8 @@ export declare enum TaskTypes {
28
28
  TRUST_MEMBER_COMPANY_OWNER = "TRUST_MEMBER_COMPANY_OWNER",
29
29
  SOLE_PROPRIETOR_COMPANY = "SOLE_PROPRIETOR_COMPANY",
30
30
  LEGAL_ENTITY_TYPE_SWITCHER = "LEGAL_ENTITY_TYPE_SWITCHER",
31
- CAPABILITY_REJECTED = "CAPABILITY_REJECTED"
31
+ CAPABILITY_REJECTED = "CAPABILITY_REJECTED",
32
+ SINGPASS_SELECTION = "SINGPASS_SELECTION"
32
33
  }
33
34
  /**
34
35
  * Order of TaskStatus enums are used to define the priority of the statuses
@@ -1,3 +1,3 @@
1
1
  import './RadioGroup.scss';
2
2
  import { RadioGroupProps } from './types';
3
- export default function RadioGroup({ items, i18n, name, onChange, value, isInvalid, uniqueId, className, disabled, }: RadioGroupProps): import("preact").JSX.Element;
3
+ export default function RadioGroup({ items, name, onChange, value, isInvalid, uniqueId, className, disabled, }: RadioGroupProps): import("preact").JSX.Element;
@@ -1,5 +1,4 @@
1
1
  import { TargetedEvent } from 'preact/compat';
2
- import Language from '../../../../language/Language';
3
2
  import { TranslationKey } from '../../../../language/types';
4
3
  interface RadioGroupItem {
5
4
  name: TranslationKey;
@@ -9,7 +8,6 @@ export interface RadioGroupProps {
9
8
  className?: string;
10
9
  isInvalid?: boolean;
11
10
  items: readonly RadioGroupItem[];
12
- i18n: Language;
13
11
  name?: string;
14
12
  onChange: (e: TargetedEvent<HTMLInputElement>) => void;
15
13
  value?: string;
@@ -8,7 +8,8 @@ export declare enum ExperimentNames {
8
8
  EnableNewEntryFlow = "EnableNewEntryFlow",
9
9
  AllowOrganizationSettlorWithExemptionReason = "AllowOrganizationSettlorWithExemptionReason",
10
10
  AllowMoreRolesForMainRootTrustee = "AllowMoreRolesForMainRootTrustee",
11
- ShowUnsupportedEntityType = "ShowUnsupportedEntityType"
11
+ ShowUnsupportedEntityType = "ShowUnsupportedEntityType",
12
+ ShowSingPassButtonForCompanies = "ShowSingPassButtonForCompanies"
12
13
  }
13
14
  export type ExperimentName = `${ExperimentNames}`;
14
15
  export type Experiments = {
@@ -0,0 +1,7 @@
1
+ export interface UseHasSeenSingpassSelectionProps {
2
+ legalEntityId: string;
3
+ }
4
+ export declare const useHasSeenSingpassSelection: ({ legalEntityId, }: UseHasSeenSingpassSelectionProps) => {
5
+ hasSeenSingpassSelection: boolean;
6
+ setHasSeenSingpassSelection: import("preact/hooks").StateUpdater<boolean>;
7
+ };
@@ -247,9 +247,4 @@ export declare const businessRegistrationNumberMasks: {
247
247
  mask: import("../maskTypes").Mask;
248
248
  };
249
249
  };
250
- US: {
251
- default: {
252
- mask: import("../maskTypes").Mask;
253
- };
254
- };
255
250
  };
@@ -126,9 +126,6 @@ export declare const businessRegistrationNumberPatterns: {
126
126
  PT: {
127
127
  default: RegExp;
128
128
  };
129
- PR: {
130
- default: RegExp;
131
- };
132
129
  RO: {
133
130
  default: RegExp;
134
131
  };
@@ -154,7 +151,4 @@ export declare const businessRegistrationNumberPatterns: {
154
151
  default: RegExp;
155
152
  nonProfit: RegExp;
156
153
  };
157
- US: {
158
- default: RegExp;
159
- };
160
154
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/kyc-components",
3
- "version": "2.37.1",
3
+ "version": "2.38.0",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "files": [