@adyen/kyc-components 2.18.1 → 2.19.1

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.
Files changed (29) hide show
  1. package/dist/es/adyen-kyc-components.es.js +422 -247
  2. package/dist/types/components/Dropins/IndividualDropin/components/IndividualDropinComponent.d.ts +1 -1
  3. package/dist/types/components/EmbeddedDropins/CreateIndividualComponent/CreateIndividualComponent.d.ts +16 -0
  4. package/dist/types/components/EmbeddedDropins/CreateTransferInstrumentComponent/CreateTransferInstrumentComponent.d.ts +11 -0
  5. package/dist/types/components/Individual/types.d.ts +2 -1
  6. package/dist/types/components/{TaskIntros → Introduction}/types.d.ts +1 -0
  7. package/dist/types/components/index.d.ts +4 -2
  8. package/dist/types/components/internal/AccountHolder/types.d.ts +1 -1
  9. package/dist/types/components/internal/Address/utils.d.ts +1 -1
  10. package/dist/types/core/SDKValidation/index.d.ts +1 -1
  11. package/dist/types/core/Services/componentApi/create-legal-entity.d.ts +3 -0
  12. package/dist/types/core/Services/componentApi/index.d.ts +2 -0
  13. package/dist/types/core/Services/componentApi/update-legal-entity.d.ts +3 -0
  14. package/dist/types/core/core.d.ts +1 -1
  15. package/dist/types/core/hooks/introduction/useIntroductionScreens.d.ts +1 -1
  16. package/dist/types/core/hooks/useBusinessSetup.d.ts +1 -1
  17. package/dist/types/core/hooks/useComponentApi.d.ts +6 -0
  18. package/dist/types/core/models/api/organization.d.ts +1 -1
  19. package/dist/types/core/models/form-rules.d.ts +1 -0
  20. package/dist/types/language/config.d.ts +9 -0
  21. package/dist/types/utils/decision-maker-roles.d.ts +1 -1
  22. package/dist/types/utils/entity-status-util.d.ts +2 -2
  23. package/dist/types/utils/trust-util.d.ts +1 -1
  24. package/package.json +1 -1
  25. package/dist/types/components/EmbeddedDropins/TransferInstrumentComponent/TransferInstrumentComponent.d.ts +0 -11
  26. /package/dist/types/components/{TaskIntros/TaskIntros.d.ts → Introduction/Introduction.d.ts} +0 -0
  27. /package/dist/types/components/{TaskIntros/TaskIntro.d.ts → Introduction/IntroductionScreen.d.ts} +0 -0
  28. /package/dist/types/components/{TaskIntros → Introduction}/constants.d.ts +0 -0
  29. /package/dist/types/components/{TaskIntros → Introduction}/copy.d.ts +0 -0
@@ -139,8 +139,13 @@ const privateCompanyTitle = "Private company";
139
139
  const privateCompanyDescription = "Owned privately. The shareholders don’t necessarily trade on public exchanges (like the stock market).";
140
140
  const publicCompanyTitle = "Public company";
141
141
  const publicCompanyDescription = "Owned by public shareholders. They’re also required to disclose financial information to the public regularly.";
142
+ const incorporatedPartnership = "Incorporated partnership";
143
+ const unincorporatedPartnership = "Unincorporated partnership";
142
144
  const incorporatedPartnershipTitle = "Incorporated partnership";
143
145
  const incorporatedPartnershipDescription = "An agreement between two or more people who run a business together.";
146
+ const incorporatedPartnershipNewEntryFlowDescription = "You and your partners have limited liability for business debts.";
147
+ const unincorporatedPartnershipDescription = "You or your partners are personally liable for business debts.";
148
+ const unincorporatedPartnershipNewEntryFlowDescription = "You or your partners are personally liable for business debts.";
144
149
  const nonProfitOrCharitableOrgTitle = "Non-profit or charitable organization";
145
150
  const nonProfitOrCharitableOrgDescription = "An organization that has an official status as not for profit or tax exempt, sometimes called an NGO.";
146
151
  const governmentalOrganizationTitle = "Governmental organization";
@@ -1110,6 +1115,10 @@ const introductionScreenDecisionMakerDescriptionP2 = "Where to find this informa
1110
1115
  const introductionScreenDecisionMakerDescriptionLI1 = "Driver’s license";
1111
1116
  const introductionScreenDecisionMakerDescriptionLI2 = "Passport";
1112
1117
  const introductionScreenDecisionMakerDescriptionLI3 = "ID document";
1118
+ const introductionScreenSoleProprietorCompanyTitle = "Sole proprietorship details";
1119
+ const introductionScreenSoleProprietorCompanyDescriptionP1 = "For example, your business name and tax identification number.";
1120
+ const introductionScreenSoleProprietorCompanyDescriptionP2 = "Where to find this information";
1121
+ const introductionScreenSoleProprietorCompanyDescriptionLI1 = "Your sole proprietorship registration document";
1113
1122
  const introductionScreenTrustTitle = "Trust details";
1114
1123
  const introductionScreenTrustDescriptionP1 = "For example, your trust’s name and business number. You’ll also need to upload your trust deed.";
1115
1124
  const introductionScreenTrustDescriptionP2 = "Where to find this information";
@@ -1252,8 +1261,13 @@ const defaultTrans = {
1252
1261
  privateCompanyDescription,
1253
1262
  publicCompanyTitle,
1254
1263
  publicCompanyDescription,
1264
+ incorporatedPartnership,
1265
+ unincorporatedPartnership,
1255
1266
  incorporatedPartnershipTitle,
1256
1267
  incorporatedPartnershipDescription,
1268
+ incorporatedPartnershipNewEntryFlowDescription,
1269
+ unincorporatedPartnershipDescription,
1270
+ unincorporatedPartnershipNewEntryFlowDescription,
1257
1271
  nonProfitOrCharitableOrgTitle,
1258
1272
  nonProfitOrCharitableOrgDescription,
1259
1273
  governmentalOrganizationTitle,
@@ -2240,6 +2254,10 @@ const defaultTrans = {
2240
2254
  introductionScreenDecisionMakerDescriptionLI1,
2241
2255
  introductionScreenDecisionMakerDescriptionLI2,
2242
2256
  introductionScreenDecisionMakerDescriptionLI3,
2257
+ introductionScreenSoleProprietorCompanyTitle,
2258
+ introductionScreenSoleProprietorCompanyDescriptionP1,
2259
+ introductionScreenSoleProprietorCompanyDescriptionP2,
2260
+ introductionScreenSoleProprietorCompanyDescriptionLI1,
2243
2261
  introductionScreenTrustTitle,
2244
2262
  introductionScreenTrustDescriptionP1,
2245
2263
  introductionScreenTrustDescriptionP2,
@@ -2934,7 +2952,7 @@ const createLogger = (namespace) => {
2934
2952
  });
2935
2953
  return methods;
2936
2954
  };
2937
- const logger$n = createLogger("Link");
2955
+ const logger$o = createLogger("Link");
2938
2956
  const getIconClass = (icon, external) => {
2939
2957
  if (external) {
2940
2958
  return "adl-link__icon adyen-kyc-icon-external-link";
@@ -2946,7 +2964,7 @@ const getIconClass = (icon, external) => {
2946
2964
  };
2947
2965
  const isValidLink = (href) => {
2948
2966
  if (href === "#") {
2949
- logger$n.error('Links must include a valid href. If your href is "#", consider using a Button instead');
2967
+ logger$o.error('Links must include a valid href. If your href is "#", consider using a Button instead');
2950
2968
  return false;
2951
2969
  }
2952
2970
  return true;
@@ -3240,14 +3258,14 @@ function useResetGlobalData(caller) {
3240
3258
  }
3241
3259
  }), [dispatch, caller]);
3242
3260
  }
3243
- const logger$m = createLogger("useAllowedCountries");
3261
+ const logger$n = createLogger("useAllowedCountries");
3244
3262
  const useAllowedCountries = () => {
3245
3263
  const {
3246
3264
  getAllowedCountries: getAllowedCountries2
3247
3265
  } = useConfigurationApi();
3248
3266
  const [allowedCountries, setAllowedCountries] = useState();
3249
3267
  useEffect(() => {
3250
- getAllowedCountries2().then((response) => setAllowedCountries(response.countries)).catch(logger$m.error);
3268
+ getAllowedCountries2().then((response) => setAllowedCountries(response.countries)).catch(logger$n.error);
3251
3269
  }, []);
3252
3270
  return allowedCountries;
3253
3271
  };
@@ -3586,7 +3604,7 @@ class ValidationResult {
3586
3604
  return this.validationResults.filter((result) => result.hasError);
3587
3605
  }
3588
3606
  }
3589
- const logger$l = createLogger("useAsyncValidator");
3607
+ const logger$m = createLogger("useAsyncValidator");
3590
3608
  const useAsyncValidator = (asyncRules) => {
3591
3609
  const [asyncValidationResults, setAsyncValidationResults] = useState({});
3592
3610
  const clearAsyncValidationResults = useCallback(() => setAsyncValidationResults({}), []);
@@ -3609,7 +3627,7 @@ const useAsyncValidator = (asyncRules) => {
3609
3627
  hasError: !isValid
3610
3628
  }])
3611
3629
  });
3612
- }).catch(logger$l.error);
3630
+ }).catch(logger$m.error);
3613
3631
  }, [asyncRules, clearAsyncValidationResults]);
3614
3632
  return {
3615
3633
  asyncValidationResults,
@@ -5030,7 +5048,7 @@ const Select = ({
5030
5048
  })]
5031
5049
  });
5032
5050
  };
5033
- const logger$k = createLogger("CountryField");
5051
+ const logger$l = createLogger("CountryField");
5034
5052
  const COUNTRY_FIELD = ["country"];
5035
5053
  function CountryField({
5036
5054
  data,
@@ -5053,7 +5071,7 @@ function CountryField({
5053
5071
  dataset: countriesFromApi
5054
5072
  } = useDataset(datasetIdentifier.country);
5055
5073
  useEffect(() => {
5056
- loadFlags2().catch(logger$k.error);
5074
+ loadFlags2().catch(logger$l.error);
5057
5075
  }, [loadFlags2]);
5058
5076
  const countries = countriesFromApi.filter((country2) => allowedCountries ? allowedCountries.includes(country2.id) : true).map((item) => ({
5059
5077
  ...item,
@@ -8789,7 +8807,8 @@ const EXPIRY_DATE_REQUIRED_FOR_COUNTRIES = [CountryCodes.NewZealand];
8789
8807
  const rules$3 = ({
8790
8808
  data,
8791
8809
  country: country2,
8792
- taskType
8810
+ taskType,
8811
+ isEmbeddedDropin
8793
8812
  }) => ({
8794
8813
  isDirectorIdNumberRequiredForCountry: () => {
8795
8814
  var _a, _b, _c, _d, _e;
@@ -8854,7 +8873,7 @@ const rules$3 = ({
8854
8873
  }
8855
8874
  },
8856
8875
  accountHolderIfCustomer: () => {
8857
- if (taskType === TaskTypes.INDIVIDUAL) {
8876
+ if (taskType === TaskTypes.INDIVIDUAL && !isEmbeddedDropin) {
8858
8877
  return REQUIRED;
8859
8878
  }
8860
8879
  },
@@ -8886,7 +8905,7 @@ const accountHolderValidationRules = {
8886
8905
  }
8887
8906
  };
8888
8907
  const accountHolderFields = ["accountHolder"];
8889
- const logger$j = createLogger("AccountHolder");
8908
+ const logger$k = createLogger("AccountHolder");
8890
8909
  function getAvailableAccountHolderOptions(legalEntityType, isChangeOfLegalEntityTypeAllowed, isTrustFlowEnabled, isSoleProprietorshipAllowed, isChangeToMyNameAllowed) {
8891
8910
  switch (legalEntityType) {
8892
8911
  case LegalEntityType.ORGANIZATION: {
@@ -8896,11 +8915,13 @@ function getAvailableAccountHolderOptions(legalEntityType, isChangeOfLegalEntity
8896
8915
  return [...isChangeToMyNameAllowed ? ["myName"] : [], ...isChangeOfLegalEntityTypeAllowed ? ["theCompanyIWorkFor"] : [], ...isTrustFlowEnabled ? ["aTrust"] : [], ...isSoleProprietorshipAllowed ? ["mySoleProprietorName"] : []];
8897
8916
  }
8898
8917
  default:
8899
- logger$j.error(`No available account holder options for legal entity type '${legalEntityType}'`);
8918
+ logger$k.error(`No available account holder options for legal entity type '${legalEntityType}'`);
8900
8919
  return [];
8901
8920
  }
8902
8921
  }
8922
+ const capabilitiesToPreventTypeChange = ["receivePayments", "issueCard", "useCard", "withdrawFromAtm", "withdrawFromAtmInRestrictedCountries", "receiveFromTransferInstrument", "useCardInRestrictedCountries", "useCardInRestrictedIndustries", "issueBankAccount", "sendToThirdParty", "receiveFromThirdParty", "getGrantOffers", "receiveGrants"];
8903
8923
  function AccountHolder(props) {
8924
+ var _a;
8904
8925
  const {
8905
8926
  i18n
8906
8927
  } = useI18nContext();
@@ -8920,7 +8941,21 @@ function AccountHolder(props) {
8920
8941
  const {
8921
8942
  isExperimentEnabled
8922
8943
  } = useExperimentsContext();
8923
- const defaultData = cloneObject(props.data);
8944
+ const isChangeToMyNameAllowed = !(capabilities == null ? void 0 : capabilities.map((c) => c.replace("Commercial", "").replace("Consumer", "")).some((c) => capabilitiesToPreventTypeChange.includes(c)));
8945
+ const accountHolderOptions = getAvailableAccountHolderOptions(props.legalEntityType, isSettingEnabled(SettingNames.AllowLegalEntityTypeChange), isExperimentEnabled("EnableTrustFlow") && TRUST_COUNTRIES.includes(props.country), SOLE_PROP_COUNTRIES.includes(props.country), isChangeToMyNameAllowed).map((accountHolderOption) => ({
8946
+ id: accountHolderOption,
8947
+ name: i18n.get(accountHolderOption),
8948
+ description: i18n.get(`${accountHolderOption}Description`)
8949
+ }));
8950
+ const isDefaultOptionAvailable = Boolean(accountHolderOptions == null ? void 0 : accountHolderOptions.find(({
8951
+ id: id2
8952
+ }) => {
8953
+ var _a2;
8954
+ return id2 === ((_a2 = props.data) == null ? void 0 : _a2.accountHolder);
8955
+ }));
8956
+ const defaultData = {
8957
+ accountHolder: isDefaultOptionAvailable ? (_a = props.data) == null ? void 0 : _a.accountHolder : void 0
8958
+ };
8924
8959
  if (isExperimentEnabled("EnableNewEntryFlow") && defaultData) {
8925
8960
  defaultData.accountHolder = accountHolder2 || defaultData.accountHolder;
8926
8961
  }
@@ -8938,8 +8973,8 @@ function AccountHolder(props) {
8938
8973
  fieldProblems: props == null ? void 0 : props.fieldValidationErrors
8939
8974
  });
8940
8975
  useEffect(() => {
8941
- var _a, _b;
8942
- (_b = (_a = stateRef.current) == null ? void 0 : _a.setState) == null ? void 0 : _b.call(_a, {
8976
+ var _a2, _b;
8977
+ (_b = (_a2 = stateRef.current) == null ? void 0 : _a2.setState) == null ? void 0 : _b.call(_a2, {
8943
8978
  type: "addToState",
8944
8979
  value: {
8945
8980
  data,
@@ -8952,13 +8987,6 @@ function AccountHolder(props) {
8952
8987
  }, [data, errors, valid, dataStoreId]);
8953
8988
  const formUtils = formUtilities(props, i18n);
8954
8989
  const questionLabel = i18n.get("nameOfBankAccountHolder");
8955
- const capabilitiesToPreventTypeChange = ["receivePayments", "issueCard", "useCard", "withdrawFromAtm", "withdrawFromAtmInRestrictedCountries", "receiveFromTransferInstrument", "useCardInRestrictedCountries", "useCardInRestrictedIndustries", "issueBankAccount", "sendToThirdParty", "receiveFromThirdParty", "getGrantOffers", "receiveGrants"];
8956
- const isChangeToMyNameAllowed = !(capabilities == null ? void 0 : capabilities.map((c) => c.replace("Commercial", "").replace("Consumer", "")).some((c) => capabilitiesToPreventTypeChange.includes(c)));
8957
- const accountHolderOptions = getAvailableAccountHolderOptions(props.legalEntityType, isSettingEnabled(SettingNames.AllowLegalEntityTypeChange), isExperimentEnabled("EnableTrustFlow") && TRUST_COUNTRIES.includes(props.country), SOLE_PROP_COUNTRIES.includes(props.country), isChangeToMyNameAllowed).map((accountHolderOption) => ({
8958
- id: accountHolderOption,
8959
- name: i18n.get(accountHolderOption),
8960
- description: i18n.get(`${accountHolderOption}Description`)
8961
- }));
8962
8990
  return jsxs("div", {
8963
8991
  children: [jsx(StateContextSetter, {
8964
8992
  stateRef
@@ -9207,7 +9235,7 @@ function CompanyTypeComponent(props) {
9207
9235
  "aria-label": formUtils.getLabel("entityType", "whatTypeOfCompanyDoYouHave"),
9208
9236
  "aria-invalid": !valid.entityType
9209
9237
  })
9210
- }), formUtils.isRequiredField("accountHolder") && jsx(AccountHolder, {
9238
+ }), formUtils.isRequiredField("accountHolder") && props.country && jsx(AccountHolder, {
9211
9239
  ...accountHolderProps,
9212
9240
  dataStoreId: COMPANY_TYPE_ID,
9213
9241
  legalEntityType: LegalEntityType.ORGANIZATION,
@@ -9636,7 +9664,7 @@ function Dropzone(props) {
9636
9664
  })]
9637
9665
  });
9638
9666
  }
9639
- const logger$i = createLogger("TextArea");
9667
+ const logger$j = createLogger("TextArea");
9640
9668
  function TextArea(props) {
9641
9669
  const {
9642
9670
  classNameModifiers,
@@ -9657,7 +9685,7 @@ function TextArea(props) {
9657
9685
  } = useI18nContext();
9658
9686
  const [value, setValue] = useState("");
9659
9687
  if (Object.prototype.hasOwnProperty.call(props, "onChange")) {
9660
- logger$i.error("Error: Form fields that rely on InputBase may not have an onChange property");
9688
+ logger$j.error("Error: Form fields that rely on InputBase may not have an onChange property");
9661
9689
  }
9662
9690
  const handleInput = (e) => {
9663
9691
  var _a;
@@ -10069,7 +10097,7 @@ function FieldContainer(props) {
10069
10097
  }
10070
10098
  return renderField(fieldName);
10071
10099
  }
10072
- const logger$h = createLogger("SearchAddress");
10100
+ const logger$i = createLogger("SearchAddress");
10073
10101
  const SearchAddress = ({
10074
10102
  data,
10075
10103
  legalEntityId,
@@ -10095,7 +10123,7 @@ const SearchAddress = ({
10095
10123
  const response = await handleFindAddress(selectedAddressId);
10096
10124
  autocompleteAddressForm(response);
10097
10125
  } catch (e) {
10098
- logger$h.error(e);
10126
+ logger$i.error(e);
10099
10127
  }
10100
10128
  };
10101
10129
  const onDrilldown = async (selectedAddress) => {
@@ -10107,7 +10135,7 @@ const SearchAddress = ({
10107
10135
  }, legalEntityId);
10108
10136
  setItems((response == null ? void 0 : response.results) || []);
10109
10137
  } catch (e) {
10110
- logger$h.error(e);
10138
+ logger$i.error(e);
10111
10139
  }
10112
10140
  };
10113
10141
  const onChange = (e) => {
@@ -10162,7 +10190,7 @@ const SearchAddress = ({
10162
10190
  setItems([]);
10163
10191
  }
10164
10192
  } catch (e) {
10165
- logger$h.error(e);
10193
+ logger$i.error(e);
10166
10194
  }
10167
10195
  setLoading(false);
10168
10196
  }
@@ -13534,7 +13562,7 @@ const initOnfido = async ({
13534
13562
  language: getOnfidoLocaleConfig(i18n)
13535
13563
  });
13536
13564
  };
13537
- const logger$g = createLogger("IdVerificationComponent");
13565
+ const logger$h = createLogger("IdVerificationComponent");
13538
13566
  function IdVerificationComponent({
13539
13567
  userDetails,
13540
13568
  legalEntityId,
@@ -13567,7 +13595,7 @@ function IdVerificationComponent({
13567
13595
  onIdVerificationError,
13568
13596
  onIdVerificationComplete
13569
13597
  });
13570
- })().catch(logger$g.error);
13598
+ })().catch(logger$h.error);
13571
13599
  return () => {
13572
13600
  if (onfidoSdk.current)
13573
13601
  onfidoSdk.current.tearDown();
@@ -13619,7 +13647,7 @@ function IdDocumentAlreadyUpload(props) {
13619
13647
  })]
13620
13648
  });
13621
13649
  }
13622
- const logger$f = createLogger("IdDocumentInstantVerificationComponent");
13650
+ const logger$g = createLogger("IdDocumentInstantVerificationComponent");
13623
13651
  const idVerificationSchema = ["instantIdVerificationData", "idDocumentType"];
13624
13652
  const documentTypeValidationRules = {
13625
13653
  instantIdVerificationData: {
@@ -13701,7 +13729,7 @@ function IdDocumentInstantVerificationComponent(props) {
13701
13729
  userDetails: props.userDetails,
13702
13730
  legalEntityId: props.legalEntityId,
13703
13731
  onIdVerificationComplete: handleIdVerificationComplete,
13704
- onIdVerificationError: logger$f.error
13732
+ onIdVerificationError: logger$g.error
13705
13733
  }), jsxs("div", {
13706
13734
  className: "adyen-kyc-document-upload__manual-upload",
13707
13735
  children: [i18n.get("canNotCompleteInstantVerification"), " ", jsx("button", {
@@ -15922,7 +15950,7 @@ function PersonalDetailsComponent(props) {
15922
15950
  "aria-label": formUtils.getLabel("jobTitle"),
15923
15951
  "aria-invalid": !valid.birthDate
15924
15952
  })
15925
- }), formUtils.isRequiredField("accountHolder") && jsx(AccountHolder, {
15953
+ }), formUtils.isRequiredField("accountHolder") && data.residencyCountry && jsx(AccountHolder, {
15926
15954
  ...accountHolderProps,
15927
15955
  country: data.residencyCountry,
15928
15956
  dataStoreId: PERSONAL_DETAILS,
@@ -16393,7 +16421,7 @@ class AdyenKycSdkError extends Error {
16393
16421
  }
16394
16422
  let sdkToken;
16395
16423
  let fetchSdkToken;
16396
- const logger$e = createLogger("Session");
16424
+ const logger$f = createLogger("Session");
16397
16425
  const setSdkToken = (token) => {
16398
16426
  sdkToken = token;
16399
16427
  };
@@ -16411,7 +16439,7 @@ const refreshSession = async () => {
16411
16439
  } = await fetchSdkToken();
16412
16440
  setSdkToken(token);
16413
16441
  } catch (e) {
16414
- logger$e.error("Failed to fetch sdk token", e);
16442
+ logger$f.error("Failed to fetch sdk token", e);
16415
16443
  }
16416
16444
  };
16417
16445
  const addAnimationStartListener = (element, listener) => {
@@ -16424,7 +16452,7 @@ const removeAnimationStartListener = (element, listener) => {
16424
16452
  element.removeEventListener("MSAnimationStart", listener, false);
16425
16453
  element.removeEventListener("webkitAnimationStart", listener, false);
16426
16454
  };
16427
- const logger$d = createLogger("Fetch");
16455
+ const logger$e = createLogger("Fetch");
16428
16456
  const getRequestObject = (options, data) => {
16429
16457
  const {
16430
16458
  headers = [],
@@ -16471,10 +16499,10 @@ const logFetchError = (message, level) => {
16471
16499
  case "info":
16472
16500
  case "warn":
16473
16501
  case "error":
16474
- logger$d[level](message);
16502
+ logger$e[level](message);
16475
16503
  break;
16476
16504
  default:
16477
- logger$d.error(message);
16505
+ logger$e.error(message);
16478
16506
  }
16479
16507
  };
16480
16508
  const handleFetchResponse = async (response, responseType) => {
@@ -16563,7 +16591,7 @@ const RELEVANT_MESSAGE_TYPES = ["account_verification_report_id", "error"];
16563
16591
  const TERMINAL_DATA_PROPS = ["accounts", "error", "reference"];
16564
16592
  const MOUNT_TIMEOUT = 10 * 1e3;
16565
16593
  const TINK_VENDOR = "Tink";
16566
- const logger$c = createLogger("iframeWidget");
16594
+ const logger$d = createLogger("iframeWidget");
16567
16595
  const isObjectData = (data) => typeof data === "object" && !Array.isArray(data) && data !== null;
16568
16596
  const isTerminalMessageData = (data) => Object.entries(data).some(([prop]) => TERMINAL_DATA_PROPS.includes(prop));
16569
16597
  const parseMessageJson = (message) => {
@@ -16582,7 +16610,7 @@ const callbackErrorHandler = async (response) => {
16582
16610
  try {
16583
16611
  await response;
16584
16612
  } catch (ex) {
16585
- logger$c.error(ex);
16613
+ logger$d.error(ex);
16586
16614
  }
16587
16615
  return {
16588
16616
  error: "UNKNOWN_ERROR",
@@ -16688,7 +16716,7 @@ class IFrameWidget {
16688
16716
  message = responseData.errorMessage;
16689
16717
  }
16690
16718
  } catch (ex) {
16691
- logger$c.error(ex);
16719
+ logger$d.error(ex);
16692
16720
  }
16693
16721
  throw new AdyenKycSdkError(reason, jsonData.error);
16694
16722
  }
@@ -16874,7 +16902,7 @@ function BankVerificationWidget({
16874
16902
  ref: widgetContainerRef
16875
16903
  });
16876
16904
  }
16877
- const logger$b = createLogger("BankVerification");
16905
+ const logger$c = createLogger("BankVerification");
16878
16906
  const accountVerificationFields = ["verifiedAccountHolder", "verifiedBankCountry", "verifiedBankName", "verifiedCurrencyCode", "verifiedBankAccountNumber"];
16879
16907
  const InstantVerificationErrorContext = createContext(null);
16880
16908
  const useInstantVerificationErrorNotification = (notificationVisibilityDuration) => {
@@ -16908,7 +16936,7 @@ const usePreferredVendorForCountry = (country2, getBankVerificationVendors) => {
16908
16936
  const preferredVendor2 = vendors[0];
16909
16937
  setPreferredVendor(preferredVendor2.name ? preferredVendor2 : null);
16910
16938
  };
16911
- getPreferredVendor().catch(logger$b.error);
16939
+ getPreferredVendor().catch(logger$c.error);
16912
16940
  }, [country2, getBankVerificationVendors]);
16913
16941
  return preferredVendor;
16914
16942
  };
@@ -20131,7 +20159,7 @@ const defaultPayoutAccountFormat = {
20131
20159
  [CountryCodes.Sweden]: "local",
20132
20160
  [CountryCodes.UnitedKingdom]: "local"
20133
20161
  };
20134
- const logger$a = createLogger("useScenarioConfiguration");
20162
+ const logger$b = createLogger("useScenarioConfiguration");
20135
20163
  const useScenarioConfiguration = ({
20136
20164
  getConfigurationData,
20137
20165
  getPayoutAccountFormatData,
@@ -20153,12 +20181,12 @@ const useScenarioConfiguration = ({
20153
20181
  const response = await getConfigurationData();
20154
20182
  setConfigurationResponse(response);
20155
20183
  } catch (err) {
20156
- logger$a.warn("WARNING: Configuration request failed - error:", err);
20184
+ logger$b.warn("WARNING: Configuration request failed - error:", err);
20157
20185
  } finally {
20158
20186
  setLoadingStatus("success");
20159
20187
  }
20160
20188
  };
20161
- makeConfigCallAndSave().catch(logger$a.error);
20189
+ makeConfigCallAndSave().catch(logger$b.error);
20162
20190
  }, [getConfigurationData, setLoadingStatus]);
20163
20191
  useEffect(() => {
20164
20192
  setLoadingStatus("loading");
@@ -20174,12 +20202,12 @@ const useScenarioConfiguration = ({
20174
20202
  const defaultAccountFormat = defaultPayoutAccountFormat[country2] ?? allowedBankAccountFormats[0];
20175
20203
  setAccountFormat(defaultAccountFormat);
20176
20204
  } catch (err) {
20177
- logger$a.warn("WARNING: Payout format request failed - error:", err);
20205
+ logger$b.warn("WARNING: Payout format request failed - error:", err);
20178
20206
  } finally {
20179
20207
  setLoadingStatus("success");
20180
20208
  }
20181
20209
  };
20182
- makePayoutFormatCallAndSave().catch(logger$a.error);
20210
+ makePayoutFormatCallAndSave().catch(logger$b.error);
20183
20211
  }, [country2, setAccountFormat, getPayoutAccountFormatData, setLoadingStatus]);
20184
20212
  const {
20185
20213
  fieldConfigurations,
@@ -20835,7 +20863,7 @@ var ToastType = /* @__PURE__ */ ((ToastType2) => {
20835
20863
  return ToastType2;
20836
20864
  })(ToastType || {});
20837
20865
  const FormComposer = "";
20838
- const logger$9 = createLogger("FormRouterContextProvider");
20866
+ const logger$a = createLogger("FormRouterContextProvider");
20839
20867
  function FormRouterContextProvider({
20840
20868
  children,
20841
20869
  forms,
@@ -20855,7 +20883,7 @@ function FormRouterContextProvider({
20855
20883
  if (formIndex > -1) {
20856
20884
  setFormIndex(formIndex);
20857
20885
  } else {
20858
- logger$9.error("No form was found to have that field so form navigation failed.");
20886
+ logger$a.error("No form was found to have that field so form navigation failed.");
20859
20887
  }
20860
20888
  }
20861
20889
  }), [forms, handleGetIdVerificationToken, setFormIndex]);
@@ -21455,7 +21483,7 @@ function CompanyDropinComponent({
21455
21483
  })
21456
21484
  });
21457
21485
  }
21458
- const logger$8 = createLogger("useLocalStorage");
21486
+ const logger$9 = createLogger("useLocalStorage");
21459
21487
  const useLocalStorage = (key, defaultValue, options) => {
21460
21488
  const {
21461
21489
  serializer,
@@ -21476,7 +21504,7 @@ const useLocalStorage = (key, defaultValue, options) => {
21476
21504
  const res = rawValueRef.current ? parser(rawValueRef.current) : defaultValue;
21477
21505
  return res;
21478
21506
  } catch (err) {
21479
- logger$8.error(err);
21507
+ logger$9.error(err);
21480
21508
  return defaultValue;
21481
21509
  }
21482
21510
  });
@@ -21508,7 +21536,7 @@ const useLocalStorage = (key, defaultValue, options) => {
21508
21536
  try {
21509
21537
  updateLocalStorage();
21510
21538
  } catch (err) {
21511
- logger$8.error(err);
21539
+ logger$9.error(err);
21512
21540
  }
21513
21541
  }, [value]);
21514
21542
  useEffect(() => {
@@ -21523,7 +21551,7 @@ const useLocalStorage = (key, defaultValue, options) => {
21523
21551
  setValue(event.newValue ? parser(event.newValue) : void 0);
21524
21552
  }
21525
21553
  } catch (err) {
21526
- logger$8.error(err);
21554
+ logger$9.error(err);
21527
21555
  }
21528
21556
  };
21529
21557
  if (typeof window === "undefined")
@@ -21607,7 +21635,7 @@ const useShouldShowBusinessTypeSelection = (accountHolder2) => {
21607
21635
  } = useExperimentsContext();
21608
21636
  return isExperimentEnabled("EnableNewEntryFlow") && !accountHolder2;
21609
21637
  };
21610
- const logger$7 = createLogger("useExemptSettlor");
21638
+ const logger$8 = createLogger("useExemptSettlor");
21611
21639
  const useExemptSettlor = ({
21612
21640
  trust: trust2,
21613
21641
  handleGetLegalEntity
@@ -21619,7 +21647,7 @@ const useExemptSettlor = ({
21619
21647
  setExemptSettlor(exemptSettlorLE);
21620
21648
  }, [handleGetLegalEntity]);
21621
21649
  useEffect(() => {
21622
- updateExemptSettlor(trust2).catch(logger$7.error);
21650
+ updateExemptSettlor(trust2).catch(logger$8.error);
21623
21651
  }, [trust2, updateExemptSettlor]);
21624
21652
  return exemptSettlor;
21625
21653
  };
@@ -22136,14 +22164,19 @@ const legalArrangementItems = [{
22136
22164
  name: "trust",
22137
22165
  description: "youAreTrusteeManagingTheTrustForBeneficiaries"
22138
22166
  }, {
22139
- id: "aPartnership",
22140
- accountHolder: "aPartnership",
22141
- name: "partnership",
22142
- description: "jointlyOwnedBusinessWhereTwoOrMorePeopleOperateAndShareProfits"
22167
+ id: "incorporatedPartnership",
22168
+ accountHolder: "incorporatedPartnership",
22169
+ name: "incorporatedPartnership",
22170
+ description: "incorporatedPartnershipNewEntryFlowDescription"
22171
+ }, {
22172
+ id: "unincorporatedPartnership",
22173
+ accountHolder: "unincorporatedPartnership",
22174
+ name: "unincorporatedPartnership",
22175
+ description: "unincorporatedPartnershipNewEntryFlowDescription"
22143
22176
  }, {
22144
22177
  id: "anAssociation",
22145
22178
  accountHolder: "anAssociation",
22146
- name: "association",
22179
+ name: "associationIncorporatedTitle",
22147
22180
  description: "groupOfPeopleActingTogetherForNonCommercialPurpose"
22148
22181
  }];
22149
22182
  const trusteeTypeItems = [{
@@ -22164,9 +22197,6 @@ const getFormSchema = (isLegalArrangement, isTrust) => {
22164
22197
  return schema;
22165
22198
  };
22166
22199
  const getBusinessTypes = (includeTrust, includeSoleProp) => businessTypes.filter((businessType) => {
22167
- if (businessType.id === "legalArrangement") {
22168
- return includeTrust;
22169
- }
22170
22200
  if (businessType.id === "soleProprietorship") {
22171
22201
  return includeSoleProp;
22172
22202
  }
@@ -22216,6 +22246,9 @@ const getTargetLegalEntityType = (businessType, legalArrangement, trusteeType, c
22216
22246
  if (isOrganization && businessType === "legalArrangement" && legalArrangement === "aTrust" && trusteeType === "individual" || businessType === "individual" || businessType === "soleProprietorship") {
22217
22247
  return LegalEntityType.INDIVIDUAL;
22218
22248
  }
22249
+ if (legalArrangement === "incorporatedPartnership") {
22250
+ return LegalEntityType.ORGANIZATION;
22251
+ }
22219
22252
  return currentLegalEntityType;
22220
22253
  };
22221
22254
  const BusinessTypeSelection = ({
@@ -22247,7 +22280,7 @@ const BusinessTypeSelection = ({
22247
22280
  const businessTypeItems = getBusinessTypes(showTrustOption, showSolePropOption);
22248
22281
  const getDefaultBusinessType = () => {
22249
22282
  if (accountHolder2) {
22250
- if (["aTrust", "aPartnership", "anAssociation"].includes(accountHolder2)) {
22283
+ if (["aTrust", "incorporatedPartnership", "unincorporatedPartnership", "anAssociation"].includes(accountHolder2)) {
22251
22284
  return businessTypeItems.find((businessTypeItem) => businessTypeItem.id === "legalArrangement");
22252
22285
  }
22253
22286
  return businessTypeItems.find((businessTypeItem) => businessTypeItem.accountHolder === accountHolder2);
@@ -22284,7 +22317,7 @@ const BusinessTypeSelection = ({
22284
22317
  setFormSchema(getFormSchema(((_a2 = data.businessType) == null ? void 0 : _a2.id) === "legalArrangement" && !!data.legalArrangement || currentStep === 1, ((_b2 = data.legalArrangement) == null ? void 0 : _b2.id) === "aTrust"));
22285
22318
  }, [data.businessType, data.legalArrangement, currentStep]);
22286
22319
  const handleNextClick = async () => {
22287
- var _a2, _b2, _c2;
22320
+ var _a2, _b2;
22288
22321
  if (loadingStatus === "loading")
22289
22322
  return;
22290
22323
  triggerValidation();
@@ -22297,7 +22330,8 @@ const BusinessTypeSelection = ({
22297
22330
  );
22298
22331
  return;
22299
22332
  }
22300
- if (((_b2 = data.legalArrangement) == null ? void 0 : _b2.id) === "aPartnership" || ((_c2 = data.legalArrangement) == null ? void 0 : _c2.id) === "anAssociation") {
22333
+ const legalArrangementId = (_b2 = data.legalArrangement) == null ? void 0 : _b2.id;
22334
+ if (legalArrangementId === "anAssociation" || legalArrangementId === "unincorporatedPartnership") {
22301
22335
  setCurrentStep(
22302
22336
  2
22303
22337
  /* WE_CANNOT_SET_UP_ACCOUNT */
@@ -22320,13 +22354,33 @@ const BusinessTypeSelection = ({
22320
22354
  }
22321
22355
  };
22322
22356
  const updateLegalEntityAndSelectAccountHolder = async () => {
22357
+ var _a2;
22358
+ const selectedLegalArrangement = (_a2 = data.legalArrangement) == null ? void 0 : _a2.id;
22323
22359
  try {
22324
22360
  if (legalEntityResponse.type !== targetLegalEntityType) {
22325
22361
  setLoadingStatus("loading");
22326
- await (handleUpdateLegalEntity == null ? void 0 : handleUpdateLegalEntity({
22327
- type: targetLegalEntityType,
22328
- entityAssociations: []
22329
- }, legalEntityResponse == null ? void 0 : legalEntityResponse.id));
22362
+ const updateLegalEntityPayload = {
22363
+ type: targetLegalEntityType
22364
+ };
22365
+ await (handleUpdateLegalEntity == null ? void 0 : handleUpdateLegalEntity(updateLegalEntityPayload, legalEntityResponse == null ? void 0 : legalEntityResponse.id));
22366
+ if (selectedLegalArrangement === "incorporatedPartnership") {
22367
+ await (handleUpdateLegalEntity == null ? void 0 : handleUpdateLegalEntity({
22368
+ type: LegalEntityType.ORGANIZATION
22369
+ }, legalEntityResponse == null ? void 0 : legalEntityResponse.id));
22370
+ await (handleUpdateLegalEntity == null ? void 0 : handleUpdateLegalEntity({
22371
+ organization: {
22372
+ type: CompanyTypesValue.INCORPORATED_PARTNERSHIP
22373
+ }
22374
+ }, legalEntityResponse == null ? void 0 : legalEntityResponse.id));
22375
+ }
22376
+ } else if (newAccountHolder !== accountHolder2) {
22377
+ if (newAccountHolder === "theCompanyIWorkFor") {
22378
+ await (handleUpdateLegalEntity == null ? void 0 : handleUpdateLegalEntity({
22379
+ organization: {
22380
+ type: ""
22381
+ }
22382
+ }, legalEntityResponse == null ? void 0 : legalEntityResponse.id));
22383
+ }
22330
22384
  }
22331
22385
  } catch (e) {
22332
22386
  showToast({
@@ -23218,154 +23272,13 @@ function Shimmer() {
23218
23272
  })]
23219
23273
  });
23220
23274
  }
23221
- function LegalEntityTypeSwitcher({
23222
- targetLegalEntityType,
23223
- handleHomeClick,
23224
- onLegalEntityTypeChange,
23225
- handleUpdateLegalEntity,
23226
- legalEntityResponse
23227
- }) {
23228
- const {
23229
- i18n
23230
- } = useI18nContext();
23231
- const [loadingStatus, setLoadingStatus] = useState(null);
23232
- const {
23233
- showToast
23234
- } = useToastContext();
23235
- const changeLegalEntityType = async () => {
23236
- try {
23237
- setLoadingStatus("loading");
23238
- await handleUpdateLegalEntity({
23239
- type: targetLegalEntityType
23240
- }, legalEntityResponse.id);
23241
- showToast({
23242
- label: i18n.get("successfullyUpdatedDetails"),
23243
- type: ToastType.SUCCESS
23244
- });
23245
- onLegalEntityTypeChange();
23246
- } catch (e) {
23247
- showToast({
23248
- label: i18n.get("failedToUpdateDetails"),
23249
- type: ToastType.ERROR
23250
- });
23251
- } finally {
23252
- setLoadingStatus("success");
23253
- }
23254
- };
23255
- const content = (targetLegalEntityType2) => {
23256
- switch (targetLegalEntityType2) {
23257
- case LegalEntityType.ORGANIZATION:
23258
- return jsxs(Fragment, {
23259
- children: [jsx("h2", {
23260
- className: "adyen-kyc-form-header__heading",
23261
- "data-testid": LegalEntityType.ORGANIZATION,
23262
- children: i18n.get("areYouACompany")
23263
- }), jsx("span", {
23264
- children: i18n.get("singingUpAsIndividualButLooksLikeYouAreACompany")
23265
- }), jsx("p", {
23266
- children: i18n.get("wouldYouLikeToSignUpAsCompanyInstead")
23267
- })]
23268
- });
23269
- case LegalEntityType.INDIVIDUAL:
23270
- return jsxs(Fragment, {
23271
- children: [jsx("h2", {
23272
- className: "adyen-kyc-form-header__heading",
23273
- "data-testid": LegalEntityType.INDIVIDUAL,
23274
- children: i18n.get("areYouAnIndividual")
23275
- }), jsx("span", {
23276
- children: i18n.get("singingUpAsCompanyButLooksLikeYouAreAnIndividual")
23277
- }), jsx("p", {
23278
- children: i18n.get("wouldYouLikeToSignUpAsIndividualInstead")
23279
- })]
23280
- });
23281
- default:
23282
- jsx("p", {
23283
- children: "Change not supported"
23284
- });
23285
- }
23286
- };
23287
- const footer = jsx(ActionBar, {
23288
- onHome: handleHomeClick,
23289
- homeButtonLabel: i18n.get("noGoBack"),
23290
- onNext: changeLegalEntityType,
23291
- nextButtonLabel: targetLegalEntityType === LegalEntityType.ORGANIZATION ? i18n.get("continueCompany") : i18n.get("continueIndividual")
23292
- });
23293
- return jsx(DropinLayout, {
23294
- content: jsxs(LoaderWrapper, {
23295
- status: loadingStatus,
23296
- formOpacityWhenLoading: 0.3,
23297
- showSpinner: false,
23298
- children: [content(targetLegalEntityType), footer]
23299
- })
23300
- });
23301
- }
23302
- function ReviewComponent({
23303
- legalEntityId,
23304
- handleReviewConfirm,
23305
- handleHomeClick
23306
- }) {
23307
- const {
23308
- i18n
23309
- } = useI18nContext();
23310
- const [loadingStatus, setLoadingStatus] = useState();
23311
- const {
23312
- showToast
23313
- } = useToastContext();
23314
- const [hasConfirmed, setHasConfirmed] = useState(false);
23315
- const content = jsx("div", {
23316
- children: jsxs(LoaderWrapper, {
23317
- status: loadingStatus,
23318
- formOpacityWhenLoading: 0.3,
23319
- showSpinner: false,
23320
- children: [jsx(FormHeader, {
23321
- heading: i18n.get("submitReviewOfYourData")
23322
- }), jsx("span", {
23323
- children: i18n.get("pleaseNote")
23324
- }), jsx("br", {}), jsx("br", {}), jsx(Checkbox, {
23325
- checked: hasConfirmed,
23326
- onChange: setHasConfirmed,
23327
- label: i18n.get("byClickingSubmitReview"),
23328
- name: "confirmReviewData"
23329
- })]
23330
- })
23331
- });
23332
- const onConfirmClick = async () => {
23333
- try {
23334
- setLoadingStatus("loading");
23335
- await handleReviewConfirm(legalEntityId);
23336
- setLoadingStatus("success");
23337
- showToast({
23338
- label: i18n.get("submitSuccessful"),
23339
- type: ToastType.SUCCESS
23340
- });
23341
- handleHomeClick();
23342
- } catch {
23343
- showToast({
23344
- label: i18n.get("submitFailed"),
23345
- type: ToastType.ERROR
23346
- });
23347
- } finally {
23348
- setLoadingStatus("success");
23349
- }
23350
- };
23351
- const footer = jsx(ActionBar, {
23352
- onHome: handleHomeClick,
23353
- homeButtonLabel: i18n.get("goToOverview"),
23354
- onNext: onConfirmClick,
23355
- nextButtonLabel: i18n.get("submitReview"),
23356
- nextButtonDisabled: !hasConfirmed
23357
- });
23358
- return jsx(DropinLayout, {
23359
- content,
23360
- footer
23361
- });
23362
- }
23363
23275
  const _introduction_component = "";
23364
23276
  var IntroductionScreens = ((IntroductionScreens2) => {
23365
23277
  IntroductionScreens2["PROLOGUE"] = "PROLOGUE";
23366
23278
  IntroductionScreens2[IntroductionScreens2["COMPANY"] = TaskTypes.COMPANY] = "COMPANY";
23367
23279
  IntroductionScreens2[IntroductionScreens2["INDIVIDUAL"] = TaskTypes.INDIVIDUAL] = "INDIVIDUAL";
23368
23280
  IntroductionScreens2[IntroductionScreens2["DECISION_MAKER"] = TaskTypes.DECISION_MAKER] = "DECISION_MAKER";
23281
+ IntroductionScreens2[IntroductionScreens2["SOLE_PROPRIETOR_COMPANY"] = TaskTypes.SOLE_PROPRIETOR_COMPANY] = "SOLE_PROPRIETOR_COMPANY";
23369
23282
  IntroductionScreens2[IntroductionScreens2["TRUST"] = TaskTypes.TRUST] = "TRUST";
23370
23283
  IntroductionScreens2[IntroductionScreens2["TRUST_MEMBER_OVERVIEW"] = TaskTypes.TRUST_MEMBER_OVERVIEW] = "TRUST_MEMBER_OVERVIEW";
23371
23284
  IntroductionScreens2["ACCOUNT"] = "ACCOUNT";
@@ -23375,7 +23288,7 @@ var IntroductionScreens = ((IntroductionScreens2) => {
23375
23288
  const introductionScreensByLegalEntityType = {
23376
23289
  [LegalEntityType.INDIVIDUAL]: [IntroductionScreens.PROLOGUE, IntroductionScreens.INDIVIDUAL, IntroductionScreens.ACCOUNT, IntroductionScreens.EPILOGUE],
23377
23290
  [LegalEntityType.ORGANIZATION]: [IntroductionScreens.PROLOGUE, IntroductionScreens.COMPANY, IntroductionScreens.DECISION_MAKER, IntroductionScreens.ACCOUNT, IntroductionScreens.EPILOGUE],
23378
- [LegalEntityType.SOLE_PROPRIETORSHIP]: [IntroductionScreens.PROLOGUE, IntroductionScreens.INDIVIDUAL, IntroductionScreens.ACCOUNT, IntroductionScreens.EPILOGUE],
23291
+ [LegalEntityType.SOLE_PROPRIETORSHIP]: [IntroductionScreens.PROLOGUE, IntroductionScreens.INDIVIDUAL, IntroductionScreens.SOLE_PROPRIETOR_COMPANY, IntroductionScreens.ACCOUNT, IntroductionScreens.EPILOGUE],
23379
23292
  [LegalEntityType.TRUST]: [IntroductionScreens.PROLOGUE, IntroductionScreens.COMPANY, IntroductionScreens.INDIVIDUAL, IntroductionScreens.DECISION_MAKER, IntroductionScreens.TRUST, IntroductionScreens.TRUST_MEMBER_OVERVIEW, IntroductionScreens.ACCOUNT, IntroductionScreens.EPILOGUE]
23380
23293
  };
23381
23294
  const useIntroductionScreens = ({
@@ -23388,13 +23301,17 @@ const useIntroductionScreens = ({
23388
23301
  const legalEntityType = useLegalEntityType({
23389
23302
  legalEntity
23390
23303
  });
23391
- const introductionScreens = useMemo$1(() => legalEntityType ? introductionScreensByLegalEntityType[legalEntityType].filter((screen) => {
23304
+ const introductionScreens = useMemo$1(() => legalEntityType ? introductionScreensByLegalEntityType[legalEntityType].filter((screen, _i, a) => {
23392
23305
  const isAccountScreen = screen === IntroductionScreens.ACCOUNT;
23393
23306
  const hasAccountTask = tasks.includes(TaskTypes.PAYIN) || tasks.includes(TaskTypes.PAYOUT);
23307
+ const isSoleProprietorScreen = screen === IntroductionScreens.SOLE_PROPRIETOR_COMPANY;
23308
+ const isSoleProprietor = legalEntityType === LegalEntityType.SOLE_PROPRIETORSHIP;
23394
23309
  const isTrustScreen = screen === IntroductionScreens.TRUST || screen === IntroductionScreens.TRUST_MEMBER_OVERVIEW;
23395
23310
  const isTrust = legalEntityType === LegalEntityType.TRUST;
23396
23311
  if (isAccountScreen)
23397
23312
  return hasAccountTask;
23313
+ if (isSoleProprietorScreen)
23314
+ return isSoleProprietor;
23398
23315
  if (isTrustScreen)
23399
23316
  return isTrust;
23400
23317
  return tasks.some((task) => screen === task);
@@ -23538,6 +23455,148 @@ const Introduction = ({
23538
23455
  })]
23539
23456
  }) : null;
23540
23457
  };
23458
+ function LegalEntityTypeSwitcher({
23459
+ targetLegalEntityType,
23460
+ handleHomeClick,
23461
+ onLegalEntityTypeChange,
23462
+ handleUpdateLegalEntity,
23463
+ legalEntityResponse
23464
+ }) {
23465
+ const {
23466
+ i18n
23467
+ } = useI18nContext();
23468
+ const [loadingStatus, setLoadingStatus] = useState(null);
23469
+ const {
23470
+ showToast
23471
+ } = useToastContext();
23472
+ const changeLegalEntityType = async () => {
23473
+ try {
23474
+ setLoadingStatus("loading");
23475
+ await handleUpdateLegalEntity({
23476
+ type: targetLegalEntityType
23477
+ }, legalEntityResponse.id);
23478
+ showToast({
23479
+ label: i18n.get("successfullyUpdatedDetails"),
23480
+ type: ToastType.SUCCESS
23481
+ });
23482
+ onLegalEntityTypeChange();
23483
+ } catch (e) {
23484
+ showToast({
23485
+ label: i18n.get("failedToUpdateDetails"),
23486
+ type: ToastType.ERROR
23487
+ });
23488
+ } finally {
23489
+ setLoadingStatus("success");
23490
+ }
23491
+ };
23492
+ const content = (targetLegalEntityType2) => {
23493
+ switch (targetLegalEntityType2) {
23494
+ case LegalEntityType.ORGANIZATION:
23495
+ return jsxs(Fragment, {
23496
+ children: [jsx("h2", {
23497
+ className: "adyen-kyc-form-header__heading",
23498
+ "data-testid": LegalEntityType.ORGANIZATION,
23499
+ children: i18n.get("areYouACompany")
23500
+ }), jsx("span", {
23501
+ children: i18n.get("singingUpAsIndividualButLooksLikeYouAreACompany")
23502
+ }), jsx("p", {
23503
+ children: i18n.get("wouldYouLikeToSignUpAsCompanyInstead")
23504
+ })]
23505
+ });
23506
+ case LegalEntityType.INDIVIDUAL:
23507
+ return jsxs(Fragment, {
23508
+ children: [jsx("h2", {
23509
+ className: "adyen-kyc-form-header__heading",
23510
+ "data-testid": LegalEntityType.INDIVIDUAL,
23511
+ children: i18n.get("areYouAnIndividual")
23512
+ }), jsx("span", {
23513
+ children: i18n.get("singingUpAsCompanyButLooksLikeYouAreAnIndividual")
23514
+ }), jsx("p", {
23515
+ children: i18n.get("wouldYouLikeToSignUpAsIndividualInstead")
23516
+ })]
23517
+ });
23518
+ default:
23519
+ jsx("p", {
23520
+ children: "Change not supported"
23521
+ });
23522
+ }
23523
+ };
23524
+ const footer = jsx(ActionBar, {
23525
+ onHome: handleHomeClick,
23526
+ homeButtonLabel: i18n.get("noGoBack"),
23527
+ onNext: changeLegalEntityType,
23528
+ nextButtonLabel: targetLegalEntityType === LegalEntityType.ORGANIZATION ? i18n.get("continueCompany") : i18n.get("continueIndividual")
23529
+ });
23530
+ return jsx(DropinLayout, {
23531
+ content: jsxs(LoaderWrapper, {
23532
+ status: loadingStatus,
23533
+ formOpacityWhenLoading: 0.3,
23534
+ showSpinner: false,
23535
+ children: [content(targetLegalEntityType), footer]
23536
+ })
23537
+ });
23538
+ }
23539
+ function ReviewComponent({
23540
+ legalEntityId,
23541
+ handleReviewConfirm,
23542
+ handleHomeClick
23543
+ }) {
23544
+ const {
23545
+ i18n
23546
+ } = useI18nContext();
23547
+ const [loadingStatus, setLoadingStatus] = useState();
23548
+ const {
23549
+ showToast
23550
+ } = useToastContext();
23551
+ const [hasConfirmed, setHasConfirmed] = useState(false);
23552
+ const content = jsx("div", {
23553
+ children: jsxs(LoaderWrapper, {
23554
+ status: loadingStatus,
23555
+ formOpacityWhenLoading: 0.3,
23556
+ showSpinner: false,
23557
+ children: [jsx(FormHeader, {
23558
+ heading: i18n.get("submitReviewOfYourData")
23559
+ }), jsx("span", {
23560
+ children: i18n.get("pleaseNote")
23561
+ }), jsx("br", {}), jsx("br", {}), jsx(Checkbox, {
23562
+ checked: hasConfirmed,
23563
+ onChange: setHasConfirmed,
23564
+ label: i18n.get("byClickingSubmitReview"),
23565
+ name: "confirmReviewData"
23566
+ })]
23567
+ })
23568
+ });
23569
+ const onConfirmClick = async () => {
23570
+ try {
23571
+ setLoadingStatus("loading");
23572
+ await handleReviewConfirm(legalEntityId);
23573
+ setLoadingStatus("success");
23574
+ showToast({
23575
+ label: i18n.get("submitSuccessful"),
23576
+ type: ToastType.SUCCESS
23577
+ });
23578
+ handleHomeClick();
23579
+ } catch {
23580
+ showToast({
23581
+ label: i18n.get("submitFailed"),
23582
+ type: ToastType.ERROR
23583
+ });
23584
+ } finally {
23585
+ setLoadingStatus("success");
23586
+ }
23587
+ };
23588
+ const footer = jsx(ActionBar, {
23589
+ onHome: handleHomeClick,
23590
+ homeButtonLabel: i18n.get("goToOverview"),
23591
+ onNext: onConfirmClick,
23592
+ nextButtonLabel: i18n.get("submitReview"),
23593
+ nextButtonDisabled: !hasConfirmed
23594
+ });
23595
+ return jsx(DropinLayout, {
23596
+ content,
23597
+ footer
23598
+ });
23599
+ }
23541
23600
  const TaskList = "";
23542
23601
  const businessTypeMapping = {
23543
23602
  myName: {
@@ -23566,7 +23625,7 @@ const useBusinessSetup = (legalEntityResponse) => {
23566
23625
  const accountHolderType = accountHolder2 || getDefaultAccountHolderType(legalEntityResponse);
23567
23626
  const businessSetup = (_a = businessTypeMapping[accountHolderType]) == null ? void 0 : _a[legalEntityResponse == null ? void 0 : legalEntityResponse.type];
23568
23627
  return {
23569
- businessSetup
23628
+ businessSetup: businessSetup || accountHolder2
23570
23629
  };
23571
23630
  };
23572
23631
  const useEnableNewEntryFlow = () => {
@@ -24297,7 +24356,9 @@ function IndividualDropinComponent({
24297
24356
  handleUpdateLegalEntity,
24298
24357
  trustMember,
24299
24358
  onSubmit: externalOnSubmit,
24300
- onTypeSwitch
24359
+ onTypeSwitch,
24360
+ hideNavigation = false,
24361
+ handleBackClick: externalBackClick
24301
24362
  }) {
24302
24363
  var _a, _b, _c, _d;
24303
24364
  const {
@@ -24314,6 +24375,9 @@ function IndividualDropinComponent({
24314
24375
  const {
24315
24376
  getConfiguration: getConfiguration2
24316
24377
  } = useConfigurationApi();
24378
+ const {
24379
+ isEmbeddedDropin
24380
+ } = useAuthContext();
24317
24381
  let dataFromResponse = mapLegalEntityToIndividual(legalEntityResponse, isTargetLegalEntityType);
24318
24382
  const documentUtils = documentApiUtils(handleCreateDocument, handleGetDocument, handleUpdateDocument);
24319
24383
  let roleTypes = [];
@@ -24355,7 +24419,8 @@ function IndividualDropinComponent({
24355
24419
  const fieldsFromCustomRules = useMemo(() => rules$3({
24356
24420
  data,
24357
24421
  country: country2,
24358
- taskType
24422
+ taskType,
24423
+ isEmbeddedDropin
24359
24424
  }), [country2, data, taskType]);
24360
24425
  const derivedProps = useMemo(() => getPropsFromConfigurations(fieldConfigurations, individualForms, (problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [], (problems == null ? void 0 : problems.missingData) ?? [], legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse) : [], fieldsFromCustomRules), [fieldConfigurations, fieldsFromCustomRules, problems == null ? void 0 : problems.remediationActions]);
24361
24426
  const {
@@ -24673,6 +24738,7 @@ function IndividualDropinComponent({
24673
24738
  } = useFormComposer({
24674
24739
  problems,
24675
24740
  baseTrackingPayload,
24741
+ externalBackClick,
24676
24742
  forms,
24677
24743
  formRef,
24678
24744
  onSubmit
@@ -24699,6 +24765,7 @@ function IndividualDropinComponent({
24699
24765
  validateForm: () => setShouldValidate(true),
24700
24766
  canSubmit: canSubmit2() && hasDataChanged(dataFromResponse, data),
24701
24767
  problems,
24768
+ hideNavigation,
24702
24769
  children: jsx(IndividualComponent, {
24703
24770
  ...derivedProps,
24704
24771
  capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
@@ -26385,7 +26452,7 @@ const serviceAgreementValidationRules = {
26385
26452
  errorMessage: "fieldIsRequired"
26386
26453
  }
26387
26454
  };
26388
- const logger$6 = createLogger("useServiceAgreement");
26455
+ const logger$7 = createLogger("useServiceAgreement");
26389
26456
  const FALLBACK_LANGUAGE_CODE = "en";
26390
26457
  const useServiceAgreement = ({
26391
26458
  handleGetServiceAgreement,
@@ -26414,7 +26481,7 @@ const useServiceAgreement = ({
26414
26481
  language: agreementLanguage
26415
26482
  });
26416
26483
  if (!document2) {
26417
- logger$6.log('"document" field was missing in response');
26484
+ logger$7.log('"document" field was missing in response');
26418
26485
  return;
26419
26486
  }
26420
26487
  const contract = JSON.parse(decodeURIComponent(escape(window.atob(document2))));
@@ -26432,7 +26499,7 @@ const useServiceAgreement = ({
26432
26499
  throw err;
26433
26500
  }
26434
26501
  };
26435
- requestServiceAgreement().catch(logger$6.error);
26502
+ requestServiceAgreement().catch(logger$7.error);
26436
26503
  }, [handleGetServiceAgreement, handleServiceAgreementIsNotAvailableInThatLanguage, agreementLanguage, legalEntityId, serviceAgreementType]);
26437
26504
  return {
26438
26505
  loading: loading2,
@@ -27774,7 +27841,7 @@ function TrustDropinComponent(props) {
27774
27841
  }
27775
27842
  const PAGES_WITH_STATUS = [TaskTypes.DECISION_MAKER_OVERVIEW, TaskTypes.TASKS_OVERVIEW];
27776
27843
  const POLLING_INTERVAL = 3e3;
27777
- const logger$5 = createLogger("DropinComposerComponent");
27844
+ const logger$6 = createLogger("DropinComposerComponent");
27778
27845
  const isOrganizationSettlorWithExemptionReasonEnabled = (enabled, country2) => country2 === CountryCodes.Australia && enabled;
27779
27846
  function DropinComposerComponent({
27780
27847
  capabilities,
@@ -27867,7 +27934,7 @@ function DropinComposerComponent({
27867
27934
  setPciStatus(response);
27868
27935
  return response;
27869
27936
  } catch (e) {
27870
- logger$5.warn(i18n.get("failedToGetPciStatus"));
27937
+ logger$6.warn(i18n.get("failedToGetPciStatus"));
27871
27938
  }
27872
27939
  }
27873
27940
  return void 0;
@@ -27896,7 +27963,7 @@ function DropinComposerComponent({
27896
27963
  useEffect(() => {
27897
27964
  if (!tasks.includes(TaskTypes.PCI_DSS))
27898
27965
  return;
27899
- getPciTemplate().catch(logger$5.error);
27966
+ getPciTemplate().catch(logger$6.error);
27900
27967
  }, [getPciTemplate, tasks]);
27901
27968
  const getServiceAgreementAcceptanceInfos = async () => {
27902
27969
  if (legalEntity.id && (args == null ? void 0 : args.handleGetServiceAgreementAcceptanceInfos)) {
@@ -27904,7 +27971,7 @@ function DropinComposerComponent({
27904
27971
  const response = await args.handleGetServiceAgreementAcceptanceInfos(legalEntity.id);
27905
27972
  setServiceAgreementAcceptanceInfos(response.data);
27906
27973
  } catch (e) {
27907
- logger$5.warn(i18n.get("failedToGetServiceAgreementStatus"));
27974
+ logger$6.warn(i18n.get("failedToGetServiceAgreementStatus"));
27908
27975
  }
27909
27976
  }
27910
27977
  };
@@ -27914,7 +27981,7 @@ function DropinComposerComponent({
27914
27981
  const response = await args.handleGetServiceAgreementStatus(legalEntity.id);
27915
27982
  setServiceAgreementTypes(response.termsOfServiceTypes);
27916
27983
  } catch (e) {
27917
- logger$5.warn(i18n.get("failedToGetServiceAgreementStatus"));
27984
+ logger$6.warn(i18n.get("failedToGetServiceAgreementStatus"));
27918
27985
  }
27919
27986
  }
27920
27987
  };
@@ -27953,7 +28020,7 @@ function DropinComposerComponent({
27953
28020
  setCapabilityProblems(getCapabilityProblems(response));
27954
28021
  return response;
27955
28022
  } catch (e) {
27956
- logger$5.warn(i18n.get("failedToFetchLegalEntityDetails"));
28023
+ logger$6.warn(i18n.get("failedToFetchLegalEntityDetails"));
27957
28024
  }
27958
28025
  }
27959
28026
  return void 0;
@@ -27965,7 +28032,7 @@ function DropinComposerComponent({
27965
28032
  setTrust(response);
27966
28033
  return response;
27967
28034
  } catch (e) {
27968
- logger$5.warn(i18n.get("failedToFetchTrustDetails"));
28035
+ logger$6.warn(i18n.get("failedToFetchTrustDetails"));
27969
28036
  }
27970
28037
  }
27971
28038
  return void 0;
@@ -28015,7 +28082,7 @@ function DropinComposerComponent({
28015
28082
  label: i18n.get("successFullyRemovedTrustMember")
28016
28083
  });
28017
28084
  } catch (err) {
28018
- logger$5.error(`Failed to delete trust member`, err);
28085
+ logger$6.error(`Failed to delete trust member`, err);
28019
28086
  showToast({
28020
28087
  type: ToastType.ERROR,
28021
28088
  label: i18n.get("failedToRemoveTrustMember")
@@ -28085,7 +28152,7 @@ function DropinComposerComponent({
28085
28152
  }
28086
28153
  break;
28087
28154
  default:
28088
- logger$5.warn(`Updating trust member type "${trustMember.trustMemberType}" is not implemented.`);
28155
+ logger$6.warn(`Updating trust member type "${trustMember.trustMemberType}" is not implemented.`);
28089
28156
  }
28090
28157
  showToast({
28091
28158
  label: i18n.get("successfullyUpdatedDetails"),
@@ -28093,7 +28160,7 @@ function DropinComposerComponent({
28093
28160
  });
28094
28161
  await refreshTrustAndRunOnSubmit(trust2, 1);
28095
28162
  } catch (err) {
28096
- logger$5.error(err);
28163
+ logger$6.error(err);
28097
28164
  showToast({
28098
28165
  label: i18n.get("failedToUpdateDetails"),
28099
28166
  type: ToastType.ERROR
@@ -28316,7 +28383,7 @@ function DropinComposerComponent({
28316
28383
  }
28317
28384
  };
28318
28385
  setIsLoadingConfiguration(true);
28319
- fetchConfiguration().catch(logger$5.error).finally(() => {
28386
+ fetchConfiguration().catch(logger$6.error).finally(() => {
28320
28387
  setIsLoadingConfiguration(false);
28321
28388
  onLoad();
28322
28389
  });
@@ -28700,6 +28767,22 @@ const createDocument = async (context, document2, ownerId) => {
28700
28767
  }
28701
28768
  }, document2);
28702
28769
  };
28770
+ const createLegalEntity = async (context, legalEntity) => {
28771
+ const {
28772
+ loadingContext,
28773
+ legalEntityId
28774
+ } = context;
28775
+ return httpPost({
28776
+ loadingContext,
28777
+ errorLevel: "warn",
28778
+ errorMessage: `LegalEntity creation available`,
28779
+ path: `${legalEntityId}`,
28780
+ authentication: "jwt",
28781
+ headers: {
28782
+ "Content-Type": "application/json"
28783
+ }
28784
+ }, legalEntity);
28785
+ };
28703
28786
  const createTransferInstrument = async (context, transferInstrument) => {
28704
28787
  const {
28705
28788
  loadingContext,
@@ -28854,6 +28937,22 @@ const updateDocument = async (context, document2, documentId, ownerId) => {
28854
28937
  }
28855
28938
  }, document2);
28856
28939
  };
28940
+ const updateLegalEntity = async (context, legalEntity) => {
28941
+ const {
28942
+ loadingContext,
28943
+ legalEntityId
28944
+ } = context;
28945
+ return httpPost({
28946
+ loadingContext,
28947
+ errorLevel: "warn",
28948
+ errorMessage: `LegalEntity update failed`,
28949
+ path: `${legalEntityId}`,
28950
+ authentication: "jwt",
28951
+ headers: {
28952
+ "Content-Type": "application/json"
28953
+ }
28954
+ }, legalEntity);
28955
+ };
28857
28956
  const updateTransferInstrument = async (context, transferInstrument, transferInstrumentId) => {
28858
28957
  const {
28859
28958
  loadingContext,
@@ -28933,6 +29032,14 @@ const useComponentApi = (rootLegalEntityId) => {
28933
29032
  ...baseRequestContext,
28934
29033
  legalEntityId
28935
29034
  }),
29035
+ updateLegalEntity: async (legalEntity, legalEntityId) => updateLegalEntity({
29036
+ ...baseRequestContext,
29037
+ legalEntityId
29038
+ }, legalEntity),
29039
+ createLegalEntity: async (legalEntity) => createLegalEntity({
29040
+ ...baseRequestContext,
29041
+ legalEntityId: rootLegalEntityId
29042
+ }, legalEntity),
28936
29043
  getTransferInstrument: async (transferInstrumentId) => getTransferInstrument(baseRequestContext, transferInstrumentId),
28937
29044
  getBankVerificationVendor: async (country2) => getBankVerificationVendor(baseRequestContext, country2),
28938
29045
  getDocument: async (documentId) => getDocument(baseRequestContext, documentId),
@@ -28964,12 +29071,65 @@ class EventEmitter {
28964
29071
  };
28965
29072
  }
28966
29073
  }
28967
- const logger$4 = createLogger("TransferInstrumentComponent");
28968
- function TransferInstrumentComponent({
29074
+ const logger$5 = createLogger("CreateIndividualComponent");
29075
+ function CreateIndividualComponent({
29076
+ parentLegalEntityId,
29077
+ legalEntityId,
29078
+ taskType,
29079
+ onSubmitSuccess,
29080
+ handleBackClick,
29081
+ eventEmitter
29082
+ }) {
29083
+ if (!legalEntityId && !parentLegalEntityId) {
29084
+ throw new Error("Must provide at-least one of parentLegalEntityId or legalEntityId");
29085
+ }
29086
+ const {
29087
+ getLegalEntity: getLegalEntity2,
29088
+ createLegalEntity: createLegalEntity2,
29089
+ updateLegalEntity: updateLegalEntity2,
29090
+ getDocument: getDocument2,
29091
+ createDocument: createDocument2,
29092
+ updateDocument: updateDocument2
29093
+ } = useComponentApi(legalEntityId ?? parentLegalEntityId);
29094
+ const [legalEntity, setLegalEntity] = useState();
29095
+ const [parentLegalEntity, setParentLegalEntity] = useState();
29096
+ const [loadingStatus, setLoadingStatus] = useState("loading");
29097
+ const fetchLegalEntity = useCallback(async () => {
29098
+ try {
29099
+ const [parentEntity, entity] = await Promise.all([parentLegalEntityId ? getLegalEntity2(parentLegalEntityId) : Promise.resolve(void 0), legalEntityId ? getLegalEntity2(legalEntityId) : Promise.resolve(void 0)]);
29100
+ setParentLegalEntity(parentEntity);
29101
+ setLegalEntity(entity);
29102
+ } catch (error) {
29103
+ logger$5.error(error);
29104
+ } finally {
29105
+ setLoadingStatus("success");
29106
+ }
29107
+ }, [parentLegalEntityId, legalEntityId, getLegalEntity2]);
29108
+ useEffect(() => {
29109
+ fetchLegalEntity().catch(logger$5.error);
29110
+ }, [fetchLegalEntity]);
29111
+ return loadingStatus === "loading" ? jsx(Loader, {
29112
+ size: "medium"
29113
+ }) : jsx(IndividualDropinComponent, {
29114
+ eventEmitter: eventEmitter ?? new EventEmitter(),
29115
+ parentLegalEntity,
29116
+ legalEntityResponse: legalEntity,
29117
+ handleGetDocument: getDocument2,
29118
+ handleCreateDocument: createDocument2,
29119
+ handleUpdateDocument: updateDocument2,
29120
+ handleUpdateLegalEntity: updateLegalEntity2,
29121
+ handleCreateLegalEntity: createLegalEntity2,
29122
+ handleBackClick,
29123
+ hideNavigation: true,
29124
+ onSubmit: onSubmitSuccess,
29125
+ taskType
29126
+ });
29127
+ }
29128
+ const logger$4 = createLogger("CreateTransferInstrumentComponent");
29129
+ function CreateTransferInstrumentComponent({
28969
29130
  legalEntityId,
28970
29131
  transferInstrumentId,
28971
- onChange,
28972
- onSubmit,
29132
+ onSubmitSuccess,
28973
29133
  handleBackClick,
28974
29134
  eventEmitter
28975
29135
  }) {
@@ -29015,8 +29175,7 @@ function TransferInstrumentComponent({
29015
29175
  handleBackClick,
29016
29176
  hideNavigation: true,
29017
29177
  refreshLegalEntity: fetchLegalEntity,
29018
- onChange,
29019
- onSubmit,
29178
+ onSubmit: onSubmitSuccess,
29020
29179
  createTrustedTransferInstrument: createTrustedTransferInstrument2,
29021
29180
  handleBankVerificationError: handleBankVerificationError2,
29022
29181
  taskType: TaskTypes.PAYOUT
@@ -29030,7 +29189,8 @@ const componentsMap = {
29030
29189
  trustDropin: TrustDropinComponent,
29031
29190
  soleProprietorDropin: SolePropDropinComponent,
29032
29191
  pci: PciDropinComponent,
29033
- transferInstrumentComponent: TransferInstrumentComponent
29192
+ createTransferInstrumentComponent: CreateTransferInstrumentComponent,
29193
+ createIndividualComponent: CreateIndividualComponent
29034
29194
  };
29035
29195
  const AuthProvider = ({
29036
29196
  children,
@@ -29118,7 +29278,7 @@ const getEmbeddedApi = ({
29118
29278
  const [scenarios, tasks] = await Promise.all([getScenarios(baseRequestContext), getTasks(baseRequestContext)]);
29119
29279
  return {
29120
29280
  matchingScenario: {
29121
- [legalEntityType]: scenarios
29281
+ ...scenarios
29122
29282
  },
29123
29283
  taskList: tasks
29124
29284
  };
@@ -30252,11 +30412,8 @@ const pciDropinSchema = {
30252
30412
  }
30253
30413
  }
30254
30414
  };
30255
- const transferInstrumentComponentSchema = {
30256
- onChange: {
30257
- type: "function"
30258
- },
30259
- onSubmit: {
30415
+ const createTransferInstrumentComponentSchema = {
30416
+ onSubmitSuccess: {
30260
30417
  type: "function"
30261
30418
  },
30262
30419
  legalEntityId: {
@@ -30264,6 +30421,23 @@ const transferInstrumentComponentSchema = {
30264
30421
  required: true
30265
30422
  }
30266
30423
  };
30424
+ const createIndividualComponentSchema = {
30425
+ onSubmitSuccess: {
30426
+ type: "function"
30427
+ },
30428
+ legalEntityId: {
30429
+ type: "string"
30430
+ },
30431
+ parentLegalEntityId: {
30432
+ type: "string"
30433
+ },
30434
+ taskType: {
30435
+ type: "string"
30436
+ },
30437
+ handleBackClick: {
30438
+ type: "function"
30439
+ }
30440
+ };
30267
30441
  const componentsSchemaMap = {
30268
30442
  payoutAccount: payoutAccountSchema,
30269
30443
  soleProprietorDropin: solePropDropinSchema,
@@ -30272,7 +30446,8 @@ const componentsSchemaMap = {
30272
30446
  individualDropin: individualDropinSchema,
30273
30447
  trustDropin: trustDropinSchema,
30274
30448
  taskList: taskListSchema,
30275
- transferInstrumentComponent: transferInstrumentComponentSchema
30449
+ createIndividualComponent: createIndividualComponentSchema,
30450
+ createTransferInstrumentComponent: createTransferInstrumentComponentSchema
30276
30451
  };
30277
30452
  const validateComponentName = (componentName) => {
30278
30453
  if (!componentName) {