@adyen/kyc-components 3.50.2 → 3.51.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 (226) hide show
  1. package/dist/es/{B4MFY5CR-B_M9Rijb.js → B4MFY5CR-DkcZuwrr.js} +2 -2
  2. package/dist/es/{HO4MOOFI-6-_r_YKd.js → HO4MOOFI-C34-7HCT.js} +2 -2
  3. package/dist/es/{HUY7CZI3-BSnh9U8W.js → HUY7CZI3-amkPei4o.js} +2 -2
  4. package/dist/es/adyen-kyc-components.es.js +1 -1
  5. package/dist/es/{index-BGerupa5.js → index-CA2oyCNl.js} +20190 -18980
  6. package/dist/style.css +564 -413
  7. package/dist/types/api/serviceAgreement/useServiceAgreement.d.ts +7 -0
  8. package/dist/types/components/Address/Address.d.ts +1 -1
  9. package/dist/types/components/Address/utils.d.ts +1 -1
  10. package/dist/types/components/Address/validate.d.ts +6 -0
  11. package/dist/types/components/{BankAccountNumber → BankAccount/fields/BankAccountNumber}/fieldConfig.d.ts +2 -2
  12. package/dist/types/components/{BankAccountNumber → BankAccount/fields/BankAccountNumber}/types.d.ts +2 -2
  13. package/dist/types/components/{BankCity → BankAccount/fields/BankCity}/types.d.ts +1 -1
  14. package/dist/types/components/{BankCode → BankAccount/fields/BankCode}/fieldConfig.d.ts +2 -2
  15. package/dist/types/components/{BankCode → BankAccount/fields/BankCode}/types.d.ts +2 -2
  16. package/dist/types/components/{BankName → BankAccount/fields/BankName}/types.d.ts +1 -1
  17. package/dist/types/components/{BranchCode → BankAccount/fields/BranchCode}/fieldConfig.d.ts +2 -2
  18. package/dist/types/components/{BranchCode → BankAccount/fields/BranchCode}/types.d.ts +2 -2
  19. package/dist/types/components/{Iban → BankAccount/fields/Iban}/fieldConfig.d.ts +2 -2
  20. package/dist/types/components/BankAccount/fields/Iban/ibanValidator.d.ts +3 -0
  21. package/dist/types/components/{Iban → BankAccount/fields/Iban}/types.d.ts +2 -2
  22. package/dist/types/components/{SwiftCode → BankAccount/fields/SwiftCode}/fieldConfig.d.ts +1 -1
  23. package/dist/types/components/{SwiftCode → BankAccount/fields/SwiftCode}/types.d.ts +1 -1
  24. package/dist/types/components/{BankDocument → BankAccount/forms/BankDocument}/BankDocumentRequirements.d.ts +1 -1
  25. package/dist/types/components/{BankDocument → BankAccount/forms/BankDocument}/types.d.ts +6 -6
  26. package/dist/types/components/{BankDocument → BankAccount/forms/BankDocument}/validate.d.ts +1 -1
  27. package/dist/types/components/{BankVerification → BankAccount/forms/BankVerification}/types.d.ts +3 -3
  28. package/dist/types/components/{BankVerification → BankAccount/forms/BankVerification}/validate.d.ts +1 -1
  29. package/dist/types/components/{PayoutAccount → BankAccount/forms/PayoutAccount}/helpers/mapPayoutAccountSchemaToApiBankAccount.d.ts +3 -3
  30. package/dist/types/components/{PayoutAccount → BankAccount/forms/PayoutAccount}/types.d.ts +5 -5
  31. package/dist/types/components/{PayoutDetails → BankAccount/forms/PayoutDetails}/rules.d.ts +1 -1
  32. package/dist/types/components/{PayoutDetails → BankAccount/forms/PayoutDetails}/types.d.ts +13 -13
  33. package/dist/types/components/{PayoutVerificationMethod → BankAccount/forms/PayoutVerificationMethod}/AccountHolderDescriptionFragment.d.ts +1 -1
  34. package/dist/types/components/{PayoutVerificationMethod → BankAccount/forms/PayoutVerificationMethod}/PreferInstantVerificationMethod/PreferInstantVerificationMethod.d.ts +4 -4
  35. package/dist/types/components/{PayoutVerificationMethod → BankAccount/forms/PayoutVerificationMethod}/allowedBankCountriesPerCountry.d.ts +1 -1
  36. package/dist/types/components/{PayoutVerificationMethod → BankAccount/forms/PayoutVerificationMethod}/payoutVerificationMethodMetadata.d.ts +2 -2
  37. package/dist/types/components/{PayoutVerificationMethod → BankAccount/forms/PayoutVerificationMethod}/types.d.ts +5 -5
  38. package/dist/types/{core → components/BankAccount}/hooks/useAsyncAccountDetailsValidationRules.d.ts +2 -2
  39. package/dist/types/components/{Dropins → BankAccount/tasks}/PayoutDetailsDropin/PayoutDetailsDropin.d.ts +1 -1
  40. package/dist/types/{utils → components/BankAccount/utils}/payoutAccountUtil.d.ts +6 -6
  41. package/dist/types/components/{AdditionalInformation → Business/forms/AdditionalInformation}/VerifiedBusinessCard.d.ts +2 -2
  42. package/dist/types/components/Business/forms/AdditionalInformation/types.d.ts +26 -0
  43. package/dist/types/components/{AdditionalInformation → Business/forms/AdditionalInformation}/utils.d.ts +3 -3
  44. package/dist/types/components/{BasicInformation → Business/forms/BasicInformation}/types.d.ts +11 -13
  45. package/dist/types/components/{BusinessDetails → Business/forms/BusinessDetails}/forms.d.ts +3 -3
  46. package/dist/types/components/{BusinessDetails → Business/forms/BusinessDetails}/types.d.ts +8 -10
  47. package/dist/types/components/{BusinessSelection → Business/forms/BusinessSelection}/BusinessInformationCard.d.ts +2 -2
  48. package/dist/types/components/{BusinessSelection → Business/forms/BusinessSelection}/types.d.ts +3 -3
  49. package/dist/types/components/{Company → Business/forms/Company}/Company.d.ts +2 -2
  50. package/dist/types/components/{Company → Business/forms/Company}/rules.d.ts +3 -3
  51. package/dist/types/components/{Company → Business/forms/Company}/types.d.ts +10 -10
  52. package/dist/types/components/Business/forms/CompanyStructure/types.d.ts +12 -0
  53. package/dist/types/components/{CompanyStructure → Business/forms/CompanyStructure}/validate.d.ts +1 -1
  54. package/dist/types/components/Business/forms/CompanyType/types.d.ts +9 -0
  55. package/dist/types/components/{CompanyType → Business/forms/CompanyType}/validate.d.ts +1 -1
  56. package/dist/types/components/{TaxDocument → Business/forms/TaxDocument}/config.d.ts +1 -1
  57. package/dist/types/components/{TaxDocument → Business/forms/TaxDocument}/types.d.ts +4 -4
  58. package/dist/types/{core → components/Business}/hooks/useBusinessData/constants.d.ts +1 -1
  59. package/dist/types/{core → components/Business}/hooks/useBusinessData/types.d.ts +5 -5
  60. package/dist/types/components/{Dropins → Business/tasks}/BusinessDetailsDropin/types.d.ts +16 -16
  61. package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +15 -0
  62. package/dist/types/components/Business/tasks/CompanyDropin/types.d.ts +10 -0
  63. package/dist/types/{utils → components/Business/utils}/companyUtil.d.ts +6 -6
  64. package/dist/types/components/ContactDetails/ContactDetails.d.ts +0 -1
  65. package/dist/types/components/ContactDetails/types.d.ts +2 -2
  66. package/dist/types/components/ContextGuidance/ContextGuidance.d.ts +2 -2
  67. package/dist/types/components/ContextGuidance/types.d.ts +3 -4
  68. package/dist/types/components/CustomerSupport/types.d.ts +0 -1
  69. package/dist/types/components/DocumentUpload/DocumentUpload.d.ts +1 -1
  70. package/dist/types/components/Dropins/FormWrapper/FormWrapper.d.ts +3 -3
  71. package/dist/types/components/Dropins/IndividualDropin/IndividualDropin.d.ts +1 -1
  72. package/dist/types/components/Dropins/SourceOfFundsDropin/sofStore.d.ts +3 -0
  73. package/dist/types/components/Dropins/SourceOfFundsDropin/utils.d.ts +1 -0
  74. package/dist/types/components/Dropins/types.d.ts +2 -5
  75. package/dist/types/components/EmbeddedDropins/CreateTransferInstrumentComponent/CreateTransferInstrumentComponent.d.ts +1 -1
  76. package/dist/types/components/IdDocumentUpload/IdDocumentInstantVerification.d.ts +1 -3
  77. package/dist/types/components/IdDocumentUpload/IdDocumentManualUpload.d.ts +1 -3
  78. package/dist/types/components/IdDocumentUpload/types.d.ts +0 -1
  79. package/dist/types/components/IdentityNumber/fieldConfig.d.ts +4 -0
  80. package/dist/types/components/IdentityNumber/type.d.ts +0 -2
  81. package/dist/types/components/Individual/IndividualExperimentWrapper.d.ts +4 -0
  82. package/dist/types/components/Individual/rules.d.ts +0 -1
  83. package/dist/types/components/Individual/types.d.ts +1 -3
  84. package/dist/types/components/IndividualOnfido/Individual.d.ts +1 -0
  85. package/dist/types/components/Name/Name.d.ts +1 -3
  86. package/dist/types/components/PersonalDetails/Identity/IdentityAu/DriversLicense.d.ts +1 -3
  87. package/dist/types/components/PersonalDetails/Identity/IdentityAu/IdentityAu.d.ts +1 -1
  88. package/dist/types/components/PersonalDetails/Identity/IdentityHK/IdentityHK.d.ts +1 -1
  89. package/dist/types/components/PersonalDetails/Identity/IdentityNZ/DriversLicense.d.ts +1 -3
  90. package/dist/types/components/PersonalDetails/Identity/IdentityNZ/IdentityNZ.d.ts +1 -1
  91. package/dist/types/components/PersonalDetails/types.d.ts +1 -0
  92. package/dist/types/components/PersonalDetails/validate.d.ts +19 -2
  93. package/dist/types/components/PhoneField/PhoneField.d.ts +4 -1
  94. package/dist/types/components/PhoneField/fieldConfig.d.ts +2 -1
  95. package/dist/types/components/PhoneField/types.d.ts +0 -1
  96. package/dist/types/components/RegistrationAddress/types.d.ts +0 -2
  97. package/dist/types/components/{SoleProp → SoleProprietorship/forms/SoleProp}/SoleProp.d.ts +2 -2
  98. package/dist/types/components/{SoleProp → SoleProprietorship/forms/SoleProp}/types.d.ts +11 -11
  99. package/dist/types/{core → components/SoleProprietorship}/hooks/useExemptSettlor.d.ts +2 -2
  100. package/dist/types/components/{Dropins → SoleProprietorship/tasks}/SolePropDropin/SolePropDropin.d.ts +1 -1
  101. package/dist/types/components/Trust/{Trust.d.ts → forms/Trust/Trust.d.ts} +1 -1
  102. package/dist/types/components/Trust/{rules.d.ts → forms/Trust/rules.d.ts} +1 -1
  103. package/dist/types/components/Trust/{types.d.ts → forms/Trust/types.d.ts} +8 -8
  104. package/dist/types/components/{TrustRegistrationDetails → Trust/forms/TrustRegistrationDetails}/types.d.ts +7 -7
  105. package/dist/types/components/{TrustRegistrationDetails → Trust/forms/TrustRegistrationDetails}/validate.d.ts +1 -1
  106. package/dist/types/components/{TrustRoleAndEntityType → Trust/forms/TrustRoleAndEntityType}/convertExistingTrustMember.d.ts +1 -1
  107. package/dist/types/components/{TrustRoleAndEntityType → Trust/forms/TrustRoleAndEntityType}/getAvailableRoles.d.ts +2 -2
  108. package/dist/types/components/{TrustRoleAndEntityType → Trust/forms/TrustRoleAndEntityType}/types.d.ts +8 -8
  109. package/dist/types/components/{TrustRoleAndEntityType → Trust/forms/TrustRoleAndEntityType}/validate.d.ts +1 -1
  110. package/dist/types/components/Trust/tasks/RoleAndTypeDropin/formatRoleAndEntityTypeSummary.d.ts +5 -0
  111. package/dist/types/components/{Dropins → Trust/tasks}/RoleAndTypeDropin/types.d.ts +4 -4
  112. package/dist/types/components/{Dropins → Trust/tasks}/TrustDropin/TrustDropin.d.ts +1 -1
  113. package/dist/types/components/{TrustMembers → Trust/tasks/TrustMembers}/CompanyTrustMemberTaskItem.d.ts +1 -1
  114. package/dist/types/components/{TrustMembers → Trust/tasks/TrustMembers}/ExemptSettlorTaskItem.d.ts +1 -1
  115. package/dist/types/components/{TrustMembers → Trust/tasks/TrustMembers}/RegularTrustMemberTaskItem.d.ts +1 -1
  116. package/dist/types/components/{TrustMembers → Trust/tasks/TrustMembers}/RootTrusteeTaskItem.d.ts +1 -1
  117. package/dist/types/components/{TrustMembers → Trust/tasks/TrustMembers}/types.d.ts +5 -5
  118. package/dist/types/{utils/trustMembers/handlers → components/Trust/utils}/addOrUpdateAssociatedTrustMember.d.ts +2 -2
  119. package/dist/types/{utils/trustMembers/handlers → components/Trust/utils}/addOrUpdateUndefinedBeneficiary.d.ts +2 -2
  120. package/dist/types/{utils/trustMembers/handlers → components/Trust/utils}/createExemptSettlor.d.ts +2 -2
  121. package/dist/types/{utils/trustMembers/handlers → components/Trust/utils}/deleteAssociatedTrustMember.d.ts +2 -2
  122. package/dist/types/{utils/trustMembers/handlers → components/Trust/utils}/deleteUndefinedBeneficiary.d.ts +2 -2
  123. package/dist/types/{utils → components/Trust/utils}/trustUtil.d.ts +7 -7
  124. package/dist/types/{utils/trustMembers/handlers → components/Trust/utils}/updateExemptSettlorName.d.ts +2 -2
  125. package/dist/types/components/index.d.ts +5 -5
  126. package/dist/types/components/ui/atoms/Svg/svgs.d.ts +2 -2
  127. package/dist/types/components/ui/molecules/Dropzone/types.d.ts +4 -0
  128. package/dist/types/core/analytics.d.ts +3 -6
  129. package/dist/types/core/context/ConfigurationApiContext/ConfigurationApiContext.d.ts +2 -2
  130. package/dist/types/core/context/CoreContext.d.ts +1 -1
  131. package/dist/types/core/context/ExperimentContext/types.d.ts +5 -2
  132. package/dist/types/core/context/FormContext/FormContext.d.ts +2 -0
  133. package/dist/types/core/context/FormContext/FormContextProvider.d.ts +3 -0
  134. package/dist/types/core/context/FormContext/types.d.ts +10 -0
  135. package/dist/types/core/context/FormContext/useFormContext.d.ts +3 -0
  136. package/dist/types/core/context/StateContext/types.d.ts +10 -10
  137. package/dist/types/core/hooks/useBankConfigurationHandlers.d.ts +1 -1
  138. package/dist/types/core/hooks/useComponentApi.d.ts +0 -1
  139. package/dist/types/core/hooks/useFormComposer.d.ts +6 -3
  140. package/dist/types/core/hooks/useMultiForm/reducer.d.ts +89 -0
  141. package/dist/types/core/hooks/useMultiForm/types.d.ts +151 -0
  142. package/dist/types/core/hooks/useMultiForm/useMultiForm.d.ts +2 -0
  143. package/dist/types/core/hooks/useMultiForm/useMultiFormAsyncValidator.d.ts +16 -0
  144. package/dist/types/core/hooks/useMultiForm/useMultiFormStaticValidator.d.ts +8 -0
  145. package/dist/types/core/hooks/useMultiForm/utils.d.ts +13 -0
  146. package/dist/types/core/hooks/useScenarioConfiguration.d.ts +1 -1
  147. package/dist/types/core/models/api/get-bankVerification-providers.d.ts +1 -1
  148. package/dist/types/core/models/api/get-configuration.d.ts +1 -1
  149. package/dist/types/core/models/api/legal-entity-association.d.ts +1 -1
  150. package/dist/types/core/models/api/source-of-funds.d.ts +4 -0
  151. package/dist/types/core/models/api/trusted-transferInstrument.d.ts +1 -1
  152. package/dist/types/core/models/payout-account.d.ts +2 -2
  153. package/dist/types/core/process-field-configurations.d.ts +9 -10
  154. package/dist/types/core/services/componentApi/update-source-of-funds.d.ts +2 -2
  155. package/dist/types/core/user-events.d.ts +5 -0
  156. package/dist/types/datasets/accountFormats/getAccountFormatForCountry.d.ts +2 -2
  157. package/dist/types/stores/globalStore/calculateTaskStatus.d.ts +1 -1
  158. package/dist/types/stores/globalStore/determineTaskIdentifiers.d.ts +1 -1
  159. package/dist/types/stores/globalStore/globalStore.d.ts +1 -1
  160. package/dist/types/utils/api/documentUtils.d.ts +1 -1
  161. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  162. package/dist/types/utils/getFieldsWithExistingData.d.ts +4 -4
  163. package/dist/types/utils/getSSNType.d.ts +2 -0
  164. package/dist/types/utils/mapping/businessDetails/mapBusinessDetailsSchemaToLegalEntity.d.ts +1 -1
  165. package/dist/types/utils/mapping/businessDetails/mapLegalEntityToBusinessDetailsSchema.d.ts +1 -1
  166. package/dist/types/utils/mapping/componentApiMapping.d.ts +33 -33
  167. package/dist/types/utils/mapping/mapping.d.ts +6 -6
  168. package/dist/types/utils/mapping/trustMembers/getTrustMembers.d.ts +1 -1
  169. package/dist/types/utils/mapping/trustMembers/mapEntityAssociationsToTrustMembers.d.ts +1 -1
  170. package/dist/types/utils/mapping/trustMembers/mapRootLegalEntityToTrustMember.d.ts +1 -1
  171. package/dist/types/utils/mapping/trustMembers/mapUndefinedBeneficiaryInfoToTrustMembers.d.ts +1 -1
  172. package/dist/types/utils/trackNavigation.d.ts +2 -2
  173. package/dist/types/utils/validation/types.d.ts +1 -1
  174. package/dist/types/utils/validation/validationResult.d.ts +2 -0
  175. package/dist/types/utils/verification/helpers/verifyIdNumber.d.ts +9 -2
  176. package/package.json +3 -1
  177. package/dist/types/components/AdditionalInformation/types.d.ts +0 -26
  178. package/dist/types/components/AutoResizer/AutoResizer.d.ts +0 -56
  179. package/dist/types/components/CompanyStructure/types.d.ts +0 -12
  180. package/dist/types/components/CompanyType/types.d.ts +0 -9
  181. package/dist/types/components/Dropins/BusinessDetailsDropin/utils.d.ts +0 -15
  182. package/dist/types/components/Dropins/CompanyDropin/types.d.ts +0 -10
  183. package/dist/types/components/Dropins/RoleAndTypeDropin/formatRoleAndEntityTypeSummary.d.ts +0 -5
  184. package/dist/types/components/Iban/ibanValidator.d.ts +0 -3
  185. package/dist/types/components/Individual/validators.d.ts +0 -16
  186. package/dist/types/components/PhoneField/PhoneFieldExperimentWrapper.d.ts +0 -8
  187. package/dist/types/components/PhoneInput/PhoneInput.d.ts +0 -8
  188. package/dist/types/components/PhoneInput/PhoneInput.types.d.ts +0 -8
  189. package/dist/types/components/PhoneInput/validate.d.ts +0 -6
  190. package/dist/types/core/services/componentApi/get-onboarding-status.d.ts +0 -4
  191. package/dist/types/utils/verification/verificationUtils.d.ts +0 -17
  192. package/dist/types/components/{BankAccountFormat → BankAccount/fields/BankAccountFormat}/BankAccountFormat.d.ts +0 -0
  193. package/dist/types/components/{BankAccountFormat → BankAccount/fields/BankAccountFormat}/types.d.ts +0 -0
  194. package/dist/types/components/{BankAccountNumber → BankAccount/fields/BankAccountNumber}/BankAccountNumber.d.ts +0 -0
  195. package/dist/types/components/{BankCity → BankAccount/fields/BankCity}/BankCity.d.ts +0 -0
  196. package/dist/types/components/{BankCode → BankAccount/fields/BankCode}/BankCode.d.ts +0 -0
  197. package/dist/types/components/{BankName → BankAccount/fields/BankName}/BankName.d.ts +0 -0
  198. package/dist/types/components/{BranchCode → BankAccount/fields/BranchCode}/BranchCode.d.ts +0 -0
  199. package/dist/types/components/{Iban → BankAccount/fields/Iban}/Iban.d.ts +0 -0
  200. package/dist/types/components/{SwiftCode → BankAccount/fields/SwiftCode}/SwiftCode.d.ts +0 -0
  201. package/dist/types/components/{BankDocument → BankAccount/forms/BankDocument}/BankDocument.d.ts +0 -0
  202. package/dist/types/components/{BankVerification → BankAccount/forms/BankVerification}/BankVerification.d.ts +0 -0
  203. package/dist/types/components/{BankVerification → BankAccount/forms/BankVerification}/verification/widget/BankVerificationWidget.d.ts +0 -0
  204. package/dist/types/components/{BankVerification → BankAccount/forms/BankVerification}/verification/widget/iframeWidget.d.ts +0 -0
  205. package/dist/types/components/{BankVerification → BankAccount/forms/BankVerification}/verification/widget/types.d.ts +0 -0
  206. package/dist/types/components/{PayoutAccount → BankAccount/forms/PayoutAccount}/CheckGuidance/CheckGuidance.d.ts +0 -0
  207. package/dist/types/components/{PayoutAccount → BankAccount/forms/PayoutAccount}/PayoutAccount.d.ts +0 -0
  208. package/dist/types/components/{PayoutDetails → BankAccount/forms/PayoutDetails}/PayoutDetails.d.ts +0 -0
  209. package/dist/types/components/{PayoutDetails → BankAccount/forms/PayoutDetails}/utils.d.ts +0 -0
  210. package/dist/types/components/{PayoutVerificationMethod → BankAccount/forms/PayoutVerificationMethod}/PayoutVerificationMethod.d.ts +1 -1
  211. /package/dist/types/components/{AdditionalInformation → Business/forms/AdditionalInformation}/AdditionalInformation.d.ts +0 -0
  212. /package/dist/types/components/{BasicInformation → Business/forms/BasicInformation}/BasicInformation.d.ts +0 -0
  213. /package/dist/types/components/{BusinessDetails → Business/forms/BusinessDetails}/BusinessDetails.d.ts +0 -0
  214. /package/dist/types/components/{BusinessMismatchModal → Business/forms/BusinessMismatchModal}/BusinessMismatchModal.d.ts +0 -0
  215. /package/dist/types/components/{BusinessSelection → Business/forms/BusinessSelection}/BusinessSelection.d.ts +0 -0
  216. /package/dist/types/components/{CompanyStructure → Business/forms/CompanyStructure}/CompanyStructure.d.ts +0 -0
  217. /package/dist/types/components/{CompanyType → Business/forms/CompanyType}/CompanyType.d.ts +0 -0
  218. /package/dist/types/components/{TaxDocument → Business/forms/TaxDocument}/TaxDocument.d.ts +0 -0
  219. /package/dist/types/{core → components/Business}/hooks/useBusinessData/useBusinessData.d.ts +0 -0
  220. /package/dist/types/components/{Dropins → Business/tasks}/BusinessDetailsDropin/BusinessDetailsDropin.d.ts +0 -0
  221. /package/dist/types/components/{Dropins → Business/tasks}/CompanyDropin/CompanyDropin.d.ts +0 -0
  222. /package/dist/types/components/{TrustRegistrationDetails → Trust/forms/TrustRegistrationDetails}/TrustRegistrationDetails.d.ts +0 -0
  223. /package/dist/types/components/{TrustRoleAndEntityType → Trust/forms/TrustRoleAndEntityType}/TrustRoleAndEntityType.d.ts +0 -0
  224. /package/dist/types/components/{Dropins → Trust/tasks}/RoleAndTypeDropin/RoleAndTypeDropin.d.ts +0 -0
  225. /package/dist/types/components/{TrustMembers → Trust/tasks/TrustMembers}/TrustMembersOverview.d.ts +0 -0
  226. /package/dist/types/components/{TrustMembers → Trust/tasks/TrustMembers}/UndefinedBeneficiaryTaskItem.d.ts +0 -0
@@ -1,5 +1,5 @@
1
- import type { DropinAPIHandlers } from '../../../components/Dropins/types';
2
- import type { ExemptSettlor } from '../../../components/TrustMembers/types';
1
+ import type { DropinAPIHandlers } from '../../Dropins/types';
2
+ import type { ExemptSettlor } from '../tasks/TrustMembers/types';
3
3
  import type { ExistingLegalEntity } from '../../../core/models/api/legal-entity';
4
4
  export declare const exemptSettlorNamesTheSame: (existingSettlor: ExemptSettlor, newSettlor: ExemptSettlor) => boolean;
5
5
  export declare const updateExemptSettlorName: ({ exemptSettlor, handleUpdateLegalEntity, }: {
@@ -2,14 +2,13 @@ import type { CoreProviderProps } from '../core/context/CoreProvider';
2
2
  import type { ExperimentsProps } from '../core/context/ExperimentContext/types';
3
3
  import type { SettingsProps } from '../core/context/SettingsContext/types';
4
4
  import type { UserEventCallback } from '../core/user-events';
5
- import { BusinessDetailsDropin } from './Dropins/BusinessDetailsDropin/BusinessDetailsDropin';
6
- import { CompanyDropin } from './Dropins/CompanyDropin/CompanyDropin';
5
+ import { BusinessDetailsDropin } from './Business/tasks/BusinessDetailsDropin/BusinessDetailsDropin';
6
+ import { CompanyDropin } from './Business/tasks/CompanyDropin/CompanyDropin';
7
7
  import { DropinComposer } from './Dropins/DropinComposer/DropinComposer';
8
8
  import { IndividualDropin } from './Dropins/IndividualDropin/IndividualDropin';
9
- import { PayoutDetailsDropin } from './Dropins/PayoutDetailsDropin/PayoutDetailsDropin';
10
9
  import { PciDropin } from './Dropins/PciDropin/PciDropin';
11
- import { SolePropDropin } from './Dropins/SolePropDropin/SolePropDropin';
12
- import { TrustDropin } from './Dropins/TrustDropin/TrustDropin';
10
+ import { SolePropDropin } from './SoleProprietorship/tasks/SolePropDropin/SolePropDropin';
11
+ import { TrustDropin } from './Trust/tasks/TrustDropin/TrustDropin';
13
12
  import { AcceptTermsOfServiceComponent } from './EmbeddedDropins/AcceptTermsOfServiceComponent/AcceptTermsOfServiceComponent';
14
13
  import { CreateIndividualComponent } from './EmbeddedDropins/CreateIndividualComponent/CreateIndividualComponent';
15
14
  import { CreateTransferInstrumentComponent } from './EmbeddedDropins/CreateTransferInstrumentComponent/CreateTransferInstrumentComponent';
@@ -23,6 +22,7 @@ import { UpdateLegalEntityForHighExposure } from './EmbeddedDropins/UpdateLegalE
23
22
  import { ViewVerificationStatusComponent } from './EmbeddedDropins/ViewVerificationStatus/ViewVerificationStatusComponent';
24
23
  import type { EventEmitter } from '../core/EventEmitter';
25
24
  import { SourceOfFundsDropin } from './Dropins/SourceOfFundsDropin/SourceOfFundsDropin';
25
+ import { PayoutDetailsDropin } from './BankAccount/tasks/PayoutDetailsDropin/PayoutDetailsDropin';
26
26
  /**
27
27
  * Maps each component with a Component element.
28
28
  */
@@ -19,7 +19,7 @@ export declare const icons: {
19
19
  check: import("preact").FunctionComponent<import("preact").JSX.SVGAttributes<SVGSVGElement>>;
20
20
  certificate: import("preact").FunctionComponent<import("preact").JSX.SVGAttributes<SVGSVGElement>>;
21
21
  checkmark: import("preact").FunctionComponent<import("preact").JSX.SVGAttributes<SVGSVGElement>>;
22
- 'checkmark-circle-fill': import("preact").FunctionComponent<import("preact").JSX.SVGAttributes<SVGSVGElement>>;
22
+ 'checkmark-circle': import("preact").FunctionComponent<import("preact").JSX.SVGAttributes<SVGSVGElement>>;
23
23
  'checkmark-small': import("preact").FunctionComponent<import("preact").JSX.SVGAttributes<SVGSVGElement>>;
24
24
  'chevron-down': import("preact").FunctionComponent<import("preact").JSX.SVGAttributes<SVGSVGElement>>;
25
25
  'chevron-right': import("preact").FunctionComponent<import("preact").JSX.SVGAttributes<SVGSVGElement>>;
@@ -146,7 +146,7 @@ export declare const svgs: {
146
146
  readonly check: import("preact").FunctionComponent<import("preact").JSX.SVGAttributes<SVGSVGElement>>;
147
147
  readonly certificate: import("preact").FunctionComponent<import("preact").JSX.SVGAttributes<SVGSVGElement>>;
148
148
  readonly checkmark: import("preact").FunctionComponent<import("preact").JSX.SVGAttributes<SVGSVGElement>>;
149
- readonly 'checkmark-circle-fill': import("preact").FunctionComponent<import("preact").JSX.SVGAttributes<SVGSVGElement>>;
149
+ readonly 'checkmark-circle': import("preact").FunctionComponent<import("preact").JSX.SVGAttributes<SVGSVGElement>>;
150
150
  readonly 'checkmark-small': import("preact").FunctionComponent<import("preact").JSX.SVGAttributes<SVGSVGElement>>;
151
151
  readonly 'chevron-down': import("preact").FunctionComponent<import("preact").JSX.SVGAttributes<SVGSVGElement>>;
152
152
  readonly 'chevron-right': import("preact").FunctionComponent<import("preact").JSX.SVGAttributes<SVGSVGElement>>;
@@ -16,6 +16,10 @@ export interface DropzoneProps extends Partial<FileValidationOptions> {
16
16
  shouldValidate?: boolean;
17
17
  showMinimal?: boolean;
18
18
  hidePageCount?: boolean;
19
+ errors?: any;
20
+ fieldValidationErrors?: any;
21
+ valid?: any;
22
+ handleFieldChange?: any;
19
23
  enableTracking?: boolean;
20
24
  }
21
25
  export interface DropzoneFileProps {
@@ -1,19 +1,16 @@
1
1
  import type { SetOptional } from 'type-fest';
2
2
  import type { LegalEntity } from './models/api/legal-entity';
3
- import type { TaskIdentifier } from '../stores/globalStore/globalStore';
4
3
  import type { AdditionalEventProperties } from './user-events';
5
- type BaseTrackingPayloadParams = {
6
- task?: TaskIdentifier;
4
+ type GetAssociatedLeAnalyticsParams = {
7
5
  associatedLegalEntity?: LegalEntity;
8
6
  associatedLegalEntityOrg?: LegalEntity;
9
7
  };
10
- export type BaseTrackingPayload = {
11
- task?: TaskIdentifier;
8
+ export type AssociatedLeAnalyticsParams = {
12
9
  associatedLegalEntityId?: string;
13
10
  associatedLegalEntityType?: string;
14
11
  associatedLegalEntityOrgId?: string;
15
12
  associatedLegalEntityOrgType?: string;
16
13
  };
17
- export declare const getAssociatedLeAnalyticsPayload: ({ task, associatedLegalEntity, associatedLegalEntityOrg, }: BaseTrackingPayloadParams) => BaseTrackingPayload;
14
+ export declare const getAssociatedLeAnalyticsPayload: ({ associatedLegalEntity, associatedLegalEntityOrg, }: GetAssociatedLeAnalyticsParams) => AssociatedLeAnalyticsParams;
18
15
  export declare const debouncedInputEvent: import("lodash").DebouncedFunc<(properties: SetOptional<AdditionalEventProperties, "actionLevel">) => void>;
19
16
  export {};
@@ -7,7 +7,7 @@ import type { GetConfigurationRequest, GetConfigurationResponse } from '../../mo
7
7
  import type { VerifyIdNumberRequest, VerifyIdNumberResponse } from '../../models/api/verify-id-number';
8
8
  import type { CountryCode } from '../../models/country-code';
9
9
  import type { AccountValidationResponse, ValidationResponse } from '../../models/errors/validation-error';
10
- import type { BusinessLinesType, SourceOfFundsPayloadType } from '../../models/api/source-of-funds';
10
+ import type { BusinessLinesType, SourceOfFundsPayloadDataType } from '../../models/api/source-of-funds';
11
11
  export type ConfigurationApi = {
12
12
  getConfiguration: (request: GetConfigurationRequest) => Promise<GetConfigurationResponse>;
13
13
  getAllowedCountries: () => Promise<GetAllowedCountriesResponse>;
@@ -21,6 +21,6 @@ export type ConfigurationApi = {
21
21
  getNaceCodes: () => Promise<DataSet>;
22
22
  getBusinessLines: (legalEntityId: string) => Promise<BusinessLinesType[]>;
23
23
  getSourceOfFundsTypes: () => Promise<DataSet>;
24
- updateSourceOfFunds: (businessLineId: string, sourceOfFundData: SourceOfFundsPayloadType) => Promise<BusinessLinesType | undefined>;
24
+ updateSourceOfFunds: (legalEntityId: string, businessLineId: string, sourceOfFundData: SourceOfFundsPayloadDataType) => Promise<BusinessLinesType | undefined>;
25
25
  };
26
26
  export declare const ConfigurationApiContext: import("preact").Context<ConfigurationApi>;
@@ -1,6 +1,6 @@
1
1
  import type { AccountHolderOption } from '../types/AccountHolder.types';
2
- import type { BankAccountFormatType } from '../../components/BankAccountFormat/types';
3
2
  import type { CountryCode } from '../models/country-code';
3
+ import type { BankAccountFormatType } from '../../components/BankAccount/fields/BankAccountFormat/types';
4
4
  export interface CoreContextType {
5
5
  setContextCountry: (country: CountryCode) => void;
6
6
  contextCountry: CountryCode;
@@ -7,7 +7,6 @@ export declare enum ExperimentNames {
7
7
  EnableNewBusinessDetailsFlow = "EnableNewBusinessDetailsFlow",
8
8
  EnableKompanySearchByRegistrationNumber = "EnableKompanySearchByRegistrationNumber",
9
9
  EnableNewAddressComponent = "EnableNewAddressComponent",
10
- EnableNewPhoneField = "EnableNewPhoneField",
11
10
  AllowMoreRolesForMainRootTrustee = "AllowMoreRolesForMainRootTrustee",
12
11
  ShowUnsupportedEntityType = "ShowUnsupportedEntityType",
13
12
  ShowSingPassButtonForCompanies = "ShowSingPassButtonForCompanies",
@@ -30,7 +29,11 @@ export declare enum ExperimentNames {
30
29
  ShowCustomerSupportV4 = "ShowCustomerSupportV4",
31
30
  EnableRegistrationAndTaxAbsentStatesV4 = "EnableRegistrationAndTaxAbsentStatesV4",
32
31
  CredentialBankingWeightage_EmphasizeCredentialBankingFlow = "CredentialBankingWeightage_EmphasizeCredentialBankingFlow",
33
- EnableManualCompanyTinVerification = "EnableManualCompanyTinVerification"
32
+ EnableManualCompanyTinVerification = "EnableManualCompanyTinVerification",
33
+ EnableAutofillFlowForPureIndividualsInKeyMarkets = "EnableAutofillFlowForPureIndividualsInKeyMarkets",
34
+ EnableAutofillFlowForPureIndividualsInAdditionalMarkets = "EnableAutofillFlowForPureIndividualsInAdditionalMarkets",
35
+ EnableAutofillFlowForDecisionMakersInKeyMarkets = "EnableAutofillFlowForDecisionMakersInKeyMarkets",
36
+ EnableAutofillFlowForDecisionMakersInAdditionalMarkets = "EnableAutofillFlowForDecisionMakersInAdditionalMarkets"
34
37
  }
35
38
  export type ExperimentName = `${ExperimentNames}`;
36
39
  export type Experiments = {
@@ -0,0 +1,2 @@
1
+ import type { FormContextValue } from './types';
2
+ export declare const FormContext: import("preact").Context<FormContextValue<import("../StateContext/types").TopLevelDataSchema>>;
@@ -0,0 +1,3 @@
1
+ import type { FormContextProps } from './types';
2
+ import type { TopLevelDataSchema } from '../StateContext/types';
3
+ export declare function FormContextProvider<FormSchema extends TopLevelDataSchema>({ children, form, }: FormContextProps<FormSchema>): import("preact").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import type { ComponentChildren } from 'preact';
2
+ import type { TopLevelDataSchema } from '../StateContext/types';
3
+ import type { Form } from '../../hooks/useMultiForm/types';
4
+ export interface FormContextProps<FormSchema extends TopLevelDataSchema = TopLevelDataSchema> {
5
+ children?: ComponentChildren;
6
+ form: Form<FormSchema>;
7
+ }
8
+ export interface FormContextValue<FormSchema extends TopLevelDataSchema = TopLevelDataSchema> {
9
+ form?: Form<FormSchema>;
10
+ }
@@ -0,0 +1,3 @@
1
+ import type { FormContextValue } from './types';
2
+ import type { TopLevelDataSchema } from '../StateContext/types';
3
+ export declare function useFormContext<FormSchema extends TopLevelDataSchema>(): FormContextValue<FormSchema>;
@@ -1,14 +1,14 @@
1
- import type { BusinessDetailsSchema } from '../../../components/BusinessDetails/types';
2
- import type { CompanySchema } from '../../../components/Company/types';
1
+ import type { BusinessDetailsSchema } from '../../../components/Business/forms/BusinessDetails/types';
2
+ import type { CompanySchema } from '../../../components/Business/forms/Company/types';
3
3
  import type { CustomerSupportSchema } from '../../../components/CustomerSupport/types';
4
4
  import type { HighExposureSchema } from '../../../components/Dropins/HighExposureDropin/types';
5
- import type { TrustMemberSchema } from '../../../components/Dropins/RoleAndTypeDropin/types';
5
+ import type { TrustMemberSchema } from '../../../components/Trust/tasks/RoleAndTypeDropin/types';
6
6
  import type { IndividualSchema } from '../../../components/Individual/types';
7
- import type { PayoutDetailsSchema } from '../../../components/PayoutDetails/types';
8
- import type { SolePropSchema } from '../../../components/SoleProp/types';
9
- import type { TrustSchema } from '../../../components/Trust/types';
7
+ import type { SolePropSchema } from '../../../components/SoleProprietorship/forms/SoleProp/types';
8
+ import type { TrustSchema } from '../../../components/Trust/forms/Trust/types';
10
9
  import type { ValidationRuleResult } from '../../../utils/validation/types';
11
10
  import type { SourceOfFundsSchema } from '../../../components/Dropins/SourceOfFundsDropin/types';
11
+ import type { PayoutDetailsSchema } from '../../../components/BankAccount/forms/PayoutDetails/types';
12
12
  export interface SFValue {
13
13
  caller?: string;
14
14
  data?: object;
@@ -77,12 +77,12 @@ export interface State<TLDS extends TopLevelDataSchema> {
77
77
  }
78
78
  export interface StateSlice<TLDS extends TopLevelDataSchema, SliceName extends keyof TLDS, SliceData extends TLDS[SliceName]> {
79
79
  data?: SliceData;
80
- valid?: {
80
+ valid?: Partial<{
81
81
  [key in keyof SliceData]: boolean;
82
- };
83
- errors?: {
82
+ }>;
83
+ errors?: Partial<{
84
84
  [key in keyof SliceData]: ValidationRuleResult | null;
85
- };
85
+ }>;
86
86
  fieldProblems?: {
87
87
  [key in keyof SliceData]: boolean;
88
88
  };
@@ -1,4 +1,3 @@
1
- import type { BankVerificationVendor } from '../../components/BankVerification/types';
2
1
  import type { DropinAPIHandlers } from '../../components/Dropins/types';
3
2
  import type { LoadingStatus } from '../../components/ui/atoms/LoaderWrapper/constants';
4
3
  import type { ConfigurationApi } from '../context/ConfigurationApiContext/ConfigurationApiContext';
@@ -6,6 +5,7 @@ import type { CapabilityName } from '../models/api/capability';
6
5
  import type { GetConfigurationResponse } from '../models/api/get-configuration';
7
6
  import type { LegalEntityType } from '../models/api/legal-entity-type';
8
7
  import type { CountryCode } from '../models/country-code';
8
+ import type { BankVerificationVendor } from '../../components/BankAccount/forms/BankVerification/types';
9
9
  interface UseBankConfigurationHandlersProps {
10
10
  isEmbeddedDropin: boolean;
11
11
  handleGetBankVerificationVendors: DropinAPIHandlers['handleGetBankVerificationVendors'];
@@ -22,7 +22,6 @@ export type ComponentApi = {
22
22
  createTrustedTransferInstrument: Required<DropinAPIHandlers>['handleCreateTrustedTransferInstrument'];
23
23
  handleBankVerificationError(errorCode: string, errorMessage: string, state: string, metadata?: Map<string, string>): Promise<BankVerificationErrorResponse>;
24
24
  getTransferInstruments(): Promise<TransferInstrumentReference[]>;
25
- getOnboardingStatus: Required<DropinAPIHandlers>['handleGetOnboardingStatus'];
26
25
  generateOnboardingLink: Required<DropinAPIHandlers>['handleGenerateOnboardingLink'];
27
26
  getPciStatus: Required<DropinAPIHandlers>['handleGetPciStatus'];
28
27
  getPciTemplate: Required<DropinAPIHandlers>['handleGetPciTemplate'];
@@ -1,7 +1,9 @@
1
1
  import type { Dispatch, StateUpdater } from 'preact/hooks';
2
2
  import type { EntityProblems } from '../models/errors/entity-problems';
3
3
  import type { FormModelWithValidity } from '../models/form';
4
- import type { BaseTrackingPayload } from '../analytics';
4
+ import type { AdditionalEventProperties } from '../user-events';
5
+ import type { Form } from './useMultiForm/types';
6
+ import type { TopLevelDataSchema } from '../context/StateContext/types';
5
7
  export interface FormComposer {
6
8
  handleNextClick(): void;
7
9
  handleBackClick?(): void;
@@ -14,11 +16,12 @@ export interface FormComposer {
14
16
  total: number;
15
17
  };
16
18
  }
17
- export declare const useFormComposer: ({ problems, baseTrackingPayload, forms, formRef, externalBackClick, onSubmit, }: {
19
+ export declare const useFormComposer: <Schema extends TopLevelDataSchema = TopLevelDataSchema>({ problems, navigationTrackingParams, forms, externalBackClick, onSubmit, triggerValidation, }: {
18
20
  problems?: EntityProblems;
19
- baseTrackingPayload: BaseTrackingPayload;
21
+ navigationTrackingParams?: Partial<AdditionalEventProperties>;
20
22
  forms: FormModelWithValidity[];
21
23
  formRef?: any;
22
24
  externalBackClick?(): void;
23
25
  onSubmit(): void;
26
+ triggerValidation?: Form<Schema>["triggerValidation"];
24
27
  }) => FormComposer;
@@ -0,0 +1,89 @@
1
+ import type { Reducer } from 'preact/hooks';
2
+ import type { FormatRules, ValidationRuleResult, ValidatorMode } from '../../../utils/validation/types';
3
+ import { ValidationResult } from '../../../utils/validation/validationResult';
4
+ import type { TriggerStaticValidation } from './useMultiFormStaticValidator';
5
+ import type { FieldValue, FormState, MultiFormState, NestedSchema } from './types';
6
+ export interface MultiFormInitOptions<T> {
7
+ requiredFields?: {
8
+ [InnerFormName in keyof T]: Array<keyof T[InnerFormName]>;
9
+ };
10
+ staticValidate: TriggerStaticValidation<T>;
11
+ defaultData?: T;
12
+ data?: T;
13
+ asyncErrors?: {
14
+ [InnerFormName in keyof T]: {
15
+ [FieldName in keyof T[InnerFormName]]: ValidationResult;
16
+ };
17
+ };
18
+ obscuredFields?: {
19
+ [InnerFormName in keyof T]: Array<keyof T[InnerFormName]>;
20
+ };
21
+ optionalFields?: {
22
+ [InnerFormName in keyof T]: Array<keyof T[InnerFormName]>;
23
+ };
24
+ trustedFields?: {
25
+ [InnerFormName in keyof T]: Array<keyof T[InnerFormName]>;
26
+ };
27
+ fieldProblems?: {
28
+ [InnerFormName in keyof T]: {
29
+ [FieldName in keyof T[InnerFormName]]: boolean;
30
+ };
31
+ };
32
+ formatters?: {
33
+ [InnerFormName in keyof T]: FormatRules<T[InnerFormName]>;
34
+ };
35
+ }
36
+ /**
37
+ * The function takes in the below params and spits out an initial state, by running the validations
38
+ * across all forms and fields. It makes sure all validations are done and only sets the validity
39
+ * instead of the errors, this is to avoid users seeing error immaturely on initial load.
40
+ *
41
+ * @param requiredFields
42
+ * @param staticValidate
43
+ * @param asyncValidate
44
+ * @param defaultData
45
+ * @param obscuredFields
46
+ * @param optionalFields
47
+ * @param trustedFields
48
+ * @param fieldProblems
49
+ * @param formatters
50
+ * @param data
51
+ */
52
+ export declare function init<FormSchema>({ requiredFields, staticValidate, defaultData, obscuredFields, optionalFields, trustedFields, fieldProblems, formatters, data, asyncErrors, }: MultiFormInitOptions<FormSchema>): MultiFormState<FormSchema>;
53
+ export type ReducerActionType = 'setData' | 'setValid' | 'setErrors' | 'updateField' | 'setInnerFormRequiredFields' | 'setRequiredFields' | 'validateForm' | 'setAsyncErrors';
54
+ export interface ReducerAction<FormSchema> {
55
+ type: ReducerActionType;
56
+ key?: keyof NestedSchema<FormSchema>;
57
+ mode?: ValidatorMode;
58
+ value?: FieldValue<NestedSchema<FormSchema>> | ValidationRuleResult | boolean | null;
59
+ formName?: keyof FormSchema;
60
+ innerFormFields?: (keyof NestedSchema<FormSchema>)[];
61
+ requiredFields?: {
62
+ [InnerFormName in keyof FormSchema]: Array<keyof FormSchema[InnerFormName]>;
63
+ };
64
+ optionalFields?: {
65
+ [InnerFormName in keyof FormSchema]: Array<keyof FormSchema[InnerFormName]>;
66
+ };
67
+ defaultData?: FormSchema;
68
+ selectedSchema?: (keyof NestedSchema<FormSchema>)[];
69
+ formValue?: FormState<NestedSchema<FormSchema>>;
70
+ asyncValidationResults?: Record<keyof NestedSchema<FormSchema>, ValidationResult>;
71
+ }
72
+ export interface GetReducerOptions<T> {
73
+ staticValidate: TriggerStaticValidation<T>;
74
+ obscuredFields?: {
75
+ [InnerFormName in keyof T]: Array<keyof T[InnerFormName]>;
76
+ };
77
+ optionalFields?: {
78
+ [InnerFormName in keyof T]: Array<keyof T[InnerFormName]>;
79
+ };
80
+ trustedFields?: {
81
+ [InnerFormName in keyof T]: Array<keyof T[InnerFormName]>;
82
+ };
83
+ formatters?: {
84
+ [InnerFormName in keyof T]: FormatRules<T[InnerFormName]>;
85
+ };
86
+ defaultData?: T;
87
+ }
88
+ export type GetReducerResults<FormSchema> = Reducer<MultiFormState<FormSchema>, ReducerAction<FormSchema>>;
89
+ export declare function reducer<FormSchema>({ staticValidate, obscuredFields, optionalFields, trustedFields, formatters, defaultData, }: GetReducerOptions<FormSchema>): GetReducerResults<FormSchema>;
@@ -0,0 +1,151 @@
1
+ import type { Translatable, TranslationKey } from '../../../language/types';
2
+ import type { Mask } from '../../../utils/masking/maskTypes';
3
+ import type { AsyncValidatorRules, FormatRules, ValidationRuleResult, ValidatorMode, ValidatorRules } from '../../../utils/validation/types';
4
+ import type { TrustedFieldsProvider } from '../../models/api/trusted-fields-provider';
5
+ export type FieldData<FieldSchema> = {
6
+ [fieldData in keyof FieldSchema]: FieldSchema[fieldData];
7
+ };
8
+ export type FieldValid<FieldSchema> = {
9
+ [fieldValid in keyof FieldSchema]: boolean;
10
+ };
11
+ export type FieldErrors<FieldSchema> = {
12
+ [fieldError in keyof FieldSchema]: string | boolean;
13
+ };
14
+ export type FieldLabels<FieldSchema> = {
15
+ [fieldLabel in keyof FieldSchema]?: string;
16
+ };
17
+ export interface MaskSettings {
18
+ mask?: Mask;
19
+ transformOnType?: (val: string) => string;
20
+ }
21
+ export type FieldValue<InnerFormSchema> = InnerFormSchema[keyof InnerFormSchema];
22
+ export interface FormState<InnerFormSchema> {
23
+ schema?: Array<keyof InnerFormSchema>;
24
+ data: InnerFormSchema;
25
+ errors: Record<keyof InnerFormSchema, ValidationRuleResult | null>;
26
+ asyncErrors: Record<keyof InnerFormSchema, ValidationRuleResult | null>;
27
+ valid: Record<keyof InnerFormSchema, boolean>;
28
+ fieldProblems: Record<keyof InnerFormSchema, boolean>;
29
+ obscuredFields?: Array<keyof InnerFormSchema>;
30
+ optionalFields?: Array<keyof InnerFormSchema>;
31
+ trustedFields?: Array<string>;
32
+ isValid?: boolean;
33
+ dataStoreId?: string;
34
+ local?: FormState<InnerFormSchema> | Partial<FormState<InnerFormSchema>>;
35
+ }
36
+ export interface Form<T> extends MultiFormState<T> {
37
+ setData: (key: keyof NestedSchema<T>, value: FieldValue<NestedSchema<T>>, formName: FormName<T>) => void;
38
+ setValid: (key: keyof NestedSchema<T>, value: boolean, formName: FormName<T>) => void;
39
+ setErrors: (key: keyof NestedSchema<T>, value: ValidationRuleResult | null, formName: FormName<T>) => void;
40
+ handleChangeFor<InnerFormName extends keyof T>(key: keyof T[InnerFormName], formName: InnerFormName, mode?: ValidatorMode): (e: any) => void;
41
+ triggerValidation: (formName: FormName<T>, selectedSchema?: (keyof NestedSchema<T>)[]) => Promise<boolean>;
42
+ resetToDefaultData: () => void;
43
+ defaultData?: T;
44
+ }
45
+ export interface BaseFormProps<FormSchema> {
46
+ placeholders?: {
47
+ [Field in keyof FormSchema]: TranslationKey;
48
+ };
49
+ labels?: {
50
+ [Field in keyof FormSchema]: TranslationKey;
51
+ };
52
+ helperText?: {
53
+ [Field in keyof FormSchema]: Translatable;
54
+ };
55
+ guidanceText?: {
56
+ [Field in keyof FormSchema]: Translatable;
57
+ };
58
+ masks?: {
59
+ [Field in keyof FormSchema]: MaskSettings;
60
+ };
61
+ data?: FormSchema;
62
+ validators?: ValidatorRules<FormSchema>;
63
+ ref?: any;
64
+ heading?: string;
65
+ name?: string;
66
+ description?: string;
67
+ readOnly?: boolean;
68
+ shouldValidate?: boolean;
69
+ trustedFieldsProvider?: TrustedFieldsProvider;
70
+ }
71
+ export type FormName<T> = keyof {
72
+ [InnerFormName in keyof T]: T[InnerFormName];
73
+ };
74
+ export type NestedSchema<T> = T[keyof T];
75
+ export type MultiFormState<T> = {
76
+ requiredFields?: {
77
+ [InnerFormName in keyof T]: Array<keyof T[InnerFormName]>;
78
+ };
79
+ data: T;
80
+ errors: {
81
+ [InnerFormName in keyof T]: {
82
+ [FieldName in keyof T[InnerFormName]]: ValidationRuleResult | null;
83
+ };
84
+ };
85
+ asyncErrors: {
86
+ [InnerFormName in keyof T]: {
87
+ [FieldName in keyof T[InnerFormName]]: ValidationRuleResult | null;
88
+ };
89
+ };
90
+ valid: {
91
+ [InnerFormName in keyof T]: {
92
+ [FieldName in keyof T[InnerFormName]]: boolean;
93
+ };
94
+ };
95
+ fieldProblems: {
96
+ [InnerFormName in keyof T]: {
97
+ [FieldName in keyof T[InnerFormName]]: boolean;
98
+ };
99
+ };
100
+ obscuredFields?: {
101
+ [InnerFormName in keyof T]: Array<keyof T[InnerFormName]>;
102
+ };
103
+ optionalFields?: {
104
+ [InnerFormName in keyof T]: Array<keyof T[InnerFormName]>;
105
+ };
106
+ trustedFields?: {
107
+ [InnerFormName in keyof T]: Array<keyof T[InnerFormName]>;
108
+ };
109
+ isValid?: {
110
+ [InnerFormName in keyof T]: boolean;
111
+ };
112
+ local?: {
113
+ [InnerFormName in keyof T]: Partial<FormState<T[InnerFormName]>>;
114
+ };
115
+ defaultData?: T;
116
+ };
117
+ export interface MultiFormOptions<T> {
118
+ requiredFields?: {
119
+ [InnerFormName in keyof T]: (keyof Required<T[InnerFormName]>)[];
120
+ } | ((data: T | undefined) => {
121
+ [InnerFormName in keyof T]: (keyof T[InnerFormName])[];
122
+ });
123
+ defaultData?: T;
124
+ rules?: {
125
+ [InnerFormName in keyof T]: ValidatorRules<T[InnerFormName]>;
126
+ } | ((data?: T) => {
127
+ [InnerFormName in keyof T]: ValidatorRules<T[InnerFormName]>;
128
+ });
129
+ asyncRules?: {
130
+ [InnerFormName in keyof T]: AsyncValidatorRules<T[InnerFormName]>;
131
+ } | ((data?: T) => {
132
+ [InnerFormName in keyof T]: AsyncValidatorRules<T[InnerFormName]>;
133
+ });
134
+ formatters?: {
135
+ [InnerFormName in keyof T]: FormatRules<T[InnerFormName]>;
136
+ };
137
+ fieldProblems?: {
138
+ [InnerFormName in keyof T]: {
139
+ [FieldName in keyof T[InnerFormName]]: boolean;
140
+ };
141
+ };
142
+ obscuredFields?: {
143
+ [InnerFormName in keyof T]: Array<keyof T[InnerFormName]>;
144
+ };
145
+ optionalFields?: {
146
+ [InnerFormName in keyof T]: Array<keyof T[InnerFormName]>;
147
+ };
148
+ trustedFields?: {
149
+ [InnerFormName in keyof T]: Array<keyof T[InnerFormName]>;
150
+ };
151
+ }
@@ -0,0 +1,2 @@
1
+ import type { Form, MultiFormOptions } from './types';
2
+ export declare function useMultiForm<FormSchema>({ requiredFields, defaultData, rules, asyncRules, fieldProblems, obscuredFields, optionalFields, trustedFields, formatters, }: MultiFormOptions<FormSchema>): Form<FormSchema>;
@@ -0,0 +1,16 @@
1
+ import type { AsyncValidatorRules } from '../../../utils/validation/types';
2
+ import { ValidationResult } from '../../../utils/validation/validationResult';
3
+ import type { MultiFormState } from './types';
4
+ export type TriggerAsyncValidation<FormSchema, InnerFormName extends keyof FormSchema> = (field: keyof FormSchema[InnerFormName], formName: InnerFormName, data?: FormSchema) => Promise<ValidationResult>;
5
+ export type UseAsyncValidator<FormSchema> = {
6
+ triggerAsyncFormValidation: <InnerFormName extends keyof FormSchema>(formName: InnerFormName, state: MultiFormState<FormSchema>, selectedSchema?: (keyof FormSchema[InnerFormName])[]) => Promise<Record<keyof FormSchema[InnerFormName], ValidationResult> & {
7
+ isValid: boolean;
8
+ }>;
9
+ };
10
+ /**
11
+ * Returns
12
+ * - triggerAsyncValidation function which can execute the async validation for a field and populate the sync validation results
13
+ * - asyncValidationResult state which keeps track of async validations of all fields.
14
+ * @param asyncRules
15
+ */
16
+ export declare const useMultiFormAsyncValidator: <T>(asyncRules?: { [InnerFormName in keyof T]: AsyncValidatorRules<T[InnerFormName]>; } | ((data?: T) => { [InnerFormName in keyof T]: AsyncValidatorRules<T[InnerFormName]>; })) => UseAsyncValidator<T>;
@@ -0,0 +1,8 @@
1
+ import type { FieldContext, FieldData } from '../../../utils/validation/types';
2
+ import { ValidationResult } from '../../../utils/validation/validationResult';
3
+ import type { MultiFormOptions, NestedSchema } from './types';
4
+ export type TriggerStaticValidation<FormSchema> = (fieldData: FieldData<NestedSchema<FormSchema>>, data?: FormSchema, context?: FieldContext<NestedSchema<FormSchema>>) => ValidationResult;
5
+ export type UseStaticValidator<FormSchema> = {
6
+ triggerStaticValidation: TriggerStaticValidation<FormSchema>;
7
+ };
8
+ export declare const useMultiFormStaticValidator: <T>(rules?: MultiFormOptions<T>["rules"]) => UseStaticValidator<T>;
@@ -0,0 +1,13 @@
1
+ import type { FieldData } from './types';
2
+ export declare const omitKeys: (obj: any, omit: any) => any;
3
+ export declare const addKeys: (obj: any, add: any, initialValue: any, defaultData: any, pendingData: any) => any;
4
+ /**
5
+ * @description Extracts the field schema data from the form schema using the field component
6
+ *
7
+ * @param formData The data of the form using the field component
8
+ * @param fieldKeys The keys in the field schema
9
+ * @returns An object containing only the field schemas form data
10
+ */
11
+ export declare function getDataByFields<FormSchema, Fields extends Array<keyof FormSchema>, FieldSchema extends {
12
+ [field in keyof FormSchema]: FormSchema[field];
13
+ }>(formData: FormSchema, fieldKeys: Fields): FieldData<FieldSchema>;
@@ -1,10 +1,10 @@
1
1
  import type { Dispatch, StateUpdater } from 'preact/hooks';
2
- import type { BankAccountFormatType } from '../../components/BankAccountFormat/types';
3
2
  import type { LoadingStatus } from '../../components/ui/atoms/LoaderWrapper/constants';
4
3
  import type { AccountFormatRequirements, PayoutAccountFormats } from '../../datasets/accountFormats/getAccountFormatForCountry';
5
4
  import type { GetConfigurationResponse } from '../models/api/get-configuration';
6
5
  import type { CountryCode } from '../models/country-code';
7
6
  import type { FieldConfigurations } from '../models/field-configurations';
7
+ import type { BankAccountFormatType } from '../../components/BankAccount/fields/BankAccountFormat/types';
8
8
  export type ParseConfiguration = (configuration: GetConfigurationResponse & {
9
9
  requiredFields: AccountFormatRequirements | undefined;
10
10
  bankVerificationAvailable?: boolean;
@@ -1,2 +1,2 @@
1
- import type { BankVerificationVendor } from '../../../components/BankVerification/types';
1
+ import type { BankVerificationVendor } from '../../../components/BankAccount/forms/BankVerification/types';
2
2
  export type BankVerificationVendorsResponse = BankVerificationVendor[];
@@ -1,9 +1,9 @@
1
- import type { BankVerificationVendor, CountryBankVerificationVendors } from '../../../components/BankVerification/types';
2
1
  import type { TaskTypes } from '../../../components/TaskList/types';
3
2
  import type { CountryCode } from '../country-code';
4
3
  import type { CapabilityName } from './capability';
5
4
  import type { GetScenariosResponse } from './get-scenarios';
6
5
  import type { LegalEntityType } from './legal-entity-type';
6
+ import type { BankVerificationVendor, CountryBankVerificationVendors } from '../../../components/BankAccount/forms/BankVerification/types';
7
7
  export interface GetConfigurationRequest {
8
8
  country: CountryCode;
9
9
  capabilities?: CapabilityName[];
@@ -1,4 +1,4 @@
1
- import type { SettlorExemptionReason } from '../../../components/TrustRoleAndEntityType/types';
1
+ import type { SettlorExemptionReason } from '../../../components/Trust/forms/TrustRoleAndEntityType/types';
2
2
  import type { DecisionMakerType } from './decision-maker-type';
3
3
  import type { LegalEntityType } from './legal-entity-type';
4
4
  import type { TrustMemberType } from './trust-member-type';
@@ -32,6 +32,10 @@ export interface SourceOfFundsType {
32
32
  export interface SourceOfFundsPayloadType extends Omit<SourceOfFundsType, 'legalName' | 'country' | 'firstName' | 'lastName' | 'originatorType'> {
33
33
  adyenProcessedFunds: boolean;
34
34
  }
35
+ export interface SourceOfFundsPayloadDataType {
36
+ sourceOfFunds: SourceOfFundsPayloadType;
37
+ legalEntityId: string;
38
+ }
35
39
  export interface SourceOfFundsAmount {
36
40
  currency: Currency;
37
41
  value: number;
@@ -1,4 +1,4 @@
1
- import type { AccountVerificationResponse } from '../../../components/BankVerification/types';
1
+ import type { AccountVerificationResponse } from '../../../components/BankAccount/forms/BankVerification/types';
2
2
  export type CreateTrustedTransferInstrumentResponse = {
3
3
  verificationReference: string;
4
4
  accounts: AccountVerificationResponse[];
@@ -1,7 +1,7 @@
1
- import type { BankAccountFormatType } from '../../components/BankAccountFormat/types';
2
- import type { PayoutAccountSchema } from '../../components/PayoutAccount/types';
3
1
  import type { CountryCode } from './country-code';
4
2
  import type { CountryConfig } from './country-config';
3
+ import type { PayoutAccountSchema } from '../../components/BankAccount/forms/PayoutAccount/types';
4
+ import type { BankAccountFormatType } from '../../components/BankAccount/fields/BankAccountFormat/types';
5
5
  export declare const obscuredPayoutFields: Array<keyof PayoutAccountSchema>;
6
6
  export declare const countryConfig: CountryConfig;
7
7
  export declare const defaultPayoutAccountFormat: Partial<Record<CountryCode, BankAccountFormatType>>;