@adyen/kyc-components 4.0.0-beta.1 → 4.0.0-beta.3

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 (346) hide show
  1. package/dist/{AcceptTermsOfServiceComponent-BQ4Yct7L.js → AcceptTermsOfServiceComponent-i222mdxX.js} +53 -49
  2. package/dist/{AccountSetupRejected-UVhxMcAe.js → AccountSetupRejected-DHph9lFl.js} +6 -6
  3. package/dist/{Avatar-NEiNEcRx.js → Avatar-vCjWXfC7.js} +2 -2
  4. package/dist/{BusinessDetailsDropin-l0xfPekL.js → BusinessDetailsDropin-DQcfiSR8.js} +333 -287
  5. package/dist/{BusinessFinancingComponent-Bs-poF2d.js → BusinessFinancingComponent-DC3jzBrq.js} +3 -3
  6. package/dist/{BusinessFinancingDropin-DoRzdS4n.js → BusinessFinancingDropin-D2lMEbNh.js} +161 -264
  7. package/dist/{BusinessFinancingPage-DSlmJmOK.js → BusinessFinancingPage-BPD2cSDR.js} +3 -3
  8. package/dist/{BusinessTypeSelectionPage-Bmi_8K2g.js → BusinessTypeSelectionPage-Cdp8joPJ.js} +82 -87
  9. package/dist/{CZ-BhoS6sd6.js → CZ-BiPeoA9G.js} +11 -1
  10. package/dist/{ContractViewer-R4-gfVmp.js → ContractViewer-B0bZ14Ts.js} +305 -296
  11. package/dist/{CreateIndividualComponent-D3aXuYRk.js → CreateIndividualComponent-D9wnexv4.js} +7 -7
  12. package/dist/{CreateTransferInstrumentComponent-C-ncZ-A8.js → CreateTransferInstrumentComponent-COzPdQjC.js} +4 -4
  13. package/dist/{CustomerSupport-CMFRgQNa.js → CustomerSupport-NGBoBg3N.js} +27 -32
  14. package/dist/{DebugModal-BEmhG3UP.js → DebugModal-I2U6TjGT.js} +43 -35
  15. package/dist/{DecisionMakerDetailsPage-DI2Ubmef.js → DecisionMakerDetailsPage-BN-H1sJF.js} +3 -3
  16. package/dist/{DecisionMakers-BKhtcs_K.js → DecisionMakers-CZ5-IRtU.js} +128 -23
  17. package/dist/{EmbeddedStatus-BsZsXbKc.js → EmbeddedStatus-Blr0seRl.js} +6 -6
  18. package/dist/FormEndState-JB6QFSet.js +59 -0
  19. package/dist/{FormFlow-Bt-mu4Wm.js → FormFlow-DjvdNEiV.js} +18 -19
  20. package/dist/{HU-v3vOxRm8.js → HU-D8vJYkDH.js} +10 -1
  21. package/dist/{IndividualOnfidoDropin-DGMCOm9M.js → IndividualOnfidoDropin-DHhyO2ai.js} +732 -739
  22. package/dist/{Introduction-DJ6qIUPC.js → Introduction-erRXgreE.js} +32 -34
  23. package/dist/LandingLayout-B45lEjOv.js +84 -0
  24. package/dist/{LegalRepresentativeDetailsPage-CyHwQR_W.js → LegalRepresentativeDetailsPage-rS5K4657.js} +3 -3
  25. package/dist/{ManageIndividualComponent-BIMCvcr2.js → ManageIndividualComponent-BEzE5lkX.js} +8 -12
  26. package/dist/{ManagePCIComponent-Blj60xLa.js → ManagePCIComponent-BgdGfAuT.js} +5 -5
  27. package/dist/{ManageTermsOfServiceComponent-CsM23jq3.js → ManageTermsOfServiceComponent-BWkwy6YC.js} +7 -8
  28. package/dist/{ManageTransferInstrumentComponent-Vut9_bRn.js → ManageTransferInstrumentComponent-B8kRNftW.js} +21 -29
  29. package/dist/{OnboardingDropinComponent-BW6er2HU.js → OnboardingDropinComponent-DBW5N3Dr.js} +243 -281
  30. package/dist/{ProviderButton-DAsW5EVa.js → ProviderButton-B58n0cRC.js} +12 -13
  31. package/dist/{Review-DWDbL9-9.js → Review-O6Al47Cu.js} +11 -11
  32. package/dist/{RootBusinessDetailsPage-BTYIldSf.js → RootBusinessDetailsPage-q_6wAcer.js} +3 -3
  33. package/dist/{RootIndividualDetailsPage-DCxJ3ycQ.js → RootIndividualDetailsPage-CiXgSJsV.js} +3 -3
  34. package/dist/{SignPCIComponent-kHaxhkWa.js → SignPCIComponent-cqRNhGdl.js} +17 -19
  35. package/dist/{SingpassSelection-Dmlbiq4Z.js → SingpassSelection-BWEJ3Yi-.js} +6 -9
  36. package/dist/{SoleProprietorshipPage-Bdhs90-q.js → SoleProprietorshipPage-CRcJSpn9.js} +3 -3
  37. package/dist/{SourceOfFundsPage-Bj22DAFv.js → SourceOfFundsPage-BxLGXTHb.js} +500 -481
  38. package/dist/{StoreProvider-BmzY19Td.js → StoreProvider-ClKLaHzy.js} +8753 -10118
  39. package/dist/{TaskItemStatus-CB6FEOnk.js → TaskItemStatus-DrTIwCTx.js} +14 -14
  40. package/dist/TaskStatusIndicator-CTtKjo0m.js +69 -0
  41. package/dist/{TaxReportingDropin-jofokkei.js → TaxReportingDropin-DFZ2ehfk.js} +82 -101
  42. package/dist/{TileGroup-i5Jc08ns.js → TileGroup-BtE472I1.js} +6 -8
  43. package/dist/{TrustDetailsPage-B6HmvYUf.js → TrustDetailsPage-CGiiTbfR.js} +71 -73
  44. package/dist/{TrustMemberCompanyPage-D3VJOq6a.js → TrustMemberCompanyPage-oLNhg0hg.js} +4 -4
  45. package/dist/{TrustMemberIndividualPage-1aeOYsnG.js → TrustMemberIndividualPage-Bgsis586.js} +3 -3
  46. package/dist/{UnincorporatedPartnershipIndividualPage-Bt7e6ncF.js → UnincorporatedPartnershipIndividualPage-DPE3grqL.js} +3 -3
  47. package/dist/{UnincorporatedPartnershipMemberCompanyPage-Ck5C_SEU.js → UnincorporatedPartnershipMemberCompanyPage-HUnc9g0g.js} +3 -3
  48. package/dist/{VerificationErrorAlert-DhtKOmjt.js → VerificationErrorAlert-BBdJmGJu.js} +10 -8
  49. package/dist/{ViewVerificationStatusComponent-DtKLcCGI.js → ViewVerificationStatusComponent-DDtXG_pM.js} +12 -13
  50. package/dist/adyen-business-financing.js +8 -12
  51. package/dist/adyen-individual.js +6 -4
  52. package/dist/adyen-kyc-components.js +135 -118
  53. package/dist/adyen-manage-individual.js +2 -2
  54. package/dist/adyen-manage-pci.js +2 -2
  55. package/dist/adyen-manage-terms-of-service.js +2 -2
  56. package/dist/adyen-manage-transfer-instruments.js +2 -2
  57. package/dist/adyen-onboarding.js +14 -6
  58. package/dist/adyen-sign-pci.js +8 -15
  59. package/dist/adyen-terms-of-service.js +18 -6
  60. package/dist/adyen-transfer-instrument.js +10 -6
  61. package/dist/{adyen-transfer-instrument.vue_vue_type_script_lang-BE-ro1iH.js → adyen-transfer-instrument.vue_vue_type_script_lang-DQBzahGy.js} +5 -1
  62. package/dist/adyen-verification-status.js +2 -2
  63. package/dist/bg-BG-BY3Wa361.js +54 -0
  64. package/dist/bg-BG-BvSUDgGF.js +13 -0
  65. package/dist/bg-BG-HpLj_LOM.js +16 -0
  66. package/dist/cs-CZ-BEFeaKsV.js +54 -0
  67. package/dist/cs-CZ-CQ_M3lEp.js +16 -0
  68. package/dist/cs-CZ-y4mvq4Lv.js +13 -0
  69. package/dist/{css-CQUoQdd2.js → css-BJGWcW8A.js} +2 -2
  70. package/dist/da-DK-D6UK8XT9.js +54 -0
  71. package/dist/da-DK-k4JW3iVF.js +16 -0
  72. package/dist/da-DK-qgQOVjDp.js +13 -0
  73. package/dist/de-DE-B3nctkG8.js +13 -0
  74. package/dist/de-DE-C7mjtS5w.js +16 -0
  75. package/dist/de-DE-DUl6gRKv.js +54 -0
  76. package/dist/de-DE-pSdsxBpQ.js +13 -0
  77. package/dist/decision-makers-group-CgddXgrx.js +1944 -0
  78. package/dist/el-GR-B5j7VZ3E.js +54 -0
  79. package/dist/el-GR-Bvjk5Sw8.js +13 -0
  80. package/dist/el-GR-CEQrkYHW.js +16 -0
  81. package/dist/el-GR-CdgLZhuO.js +13 -0
  82. package/dist/en-US-Bq2Twy6x.js +54 -0
  83. package/dist/en-US-DDagIr01.js +16 -0
  84. package/dist/en-US-DSoLr6rp.js +13 -0
  85. package/dist/es-ES-BRfK6tX7.js +13 -0
  86. package/dist/es-ES-Cavm0szq.js +54 -0
  87. package/dist/es-ES-DB1c74Kv.js +16 -0
  88. package/dist/es-ES-Dy1uR2H_.js +13 -0
  89. package/dist/et-EE-DUWZ2Vqm.js +54 -0
  90. package/dist/et-EE-d9V24rcf.js +13 -0
  91. package/dist/et-EE-xIegUSuv.js +16 -0
  92. package/dist/fi-FI-B0fnAFV2.js +13 -0
  93. package/dist/fi-FI-DVa-ccaW.js +54 -0
  94. package/dist/fi-FI-NCxneAqU.js +16 -0
  95. package/dist/fr-FR-BoKzVp2q.js +13 -0
  96. package/dist/fr-FR-CY9emHgF.js +54 -0
  97. package/dist/fr-FR-Dk6Lw2On.js +13 -0
  98. package/dist/fr-FR-daiUnUwo.js +16 -0
  99. package/dist/{getFieldsWithExistingData-BW8_TEQl.js → getFieldsWithExistingData-BY--eXBQ.js} +3 -4
  100. package/dist/{hasDataChanged-Mu0HyZ3E.js → hasDataChanged-CwfuS4et.js} +4 -4
  101. package/dist/hr-HR-BAUywqDj.js +16 -0
  102. package/dist/hr-HR-CF0AHQzi.js +13 -0
  103. package/dist/hr-HR-CnP5sqih.js +54 -0
  104. package/dist/hu-HU-3GQojIHR.js +16 -0
  105. package/dist/hu-HU-BTlpbCpc.js +54 -0
  106. package/dist/hu-HU-CSPhOvLC.js +13 -0
  107. package/dist/it-IT-BH-eqIKH.js +13 -0
  108. package/dist/it-IT-D7G4BaP7.js +13 -0
  109. package/dist/it-IT-GgHc0cHR.js +54 -0
  110. package/dist/it-IT-pDWPFHEh.js +16 -0
  111. package/dist/ja-JP-B3yqM_FM.js +13 -0
  112. package/dist/ja-JP-BhS-_dIx.js +54 -0
  113. package/dist/ja-JP-DTW_hY1L.js +13 -0
  114. package/dist/ja-JP-scPXJ93L.js +16 -0
  115. package/dist/{json-DWikzB4g.js → json-Dk6RRAV8.js} +2 -2
  116. package/dist/{localizeDateString-QtCjf8Fg.js → localizeDateString-CKCBXzSn.js} +6 -6
  117. package/dist/lt-LT-BcGNy8Ti.js +16 -0
  118. package/dist/lt-LT-DTQGR9M0.js +54 -0
  119. package/dist/lt-LT-Lzl_Cbw-.js +13 -0
  120. package/dist/lv-LV-BQ4F1GrV.js +54 -0
  121. package/dist/lv-LV-CBD07r1Y.js +16 -0
  122. package/dist/lv-LV-y00wN1pj.js +13 -0
  123. package/dist/{mapFinancialReportsToFinancialInformation-C-2jp0wg.js → mapFinancialReportsToFinancialInformation-D_6u_bSS.js} +19 -12
  124. package/dist/minus-circle-filled-BGKeHaxJ.js +17 -0
  125. package/dist/nl-NL-BxJUDHMK.js +16 -0
  126. package/dist/nl-NL-CFzm75Jw.js +13 -0
  127. package/dist/nl-NL-CUcML482.js +54 -0
  128. package/dist/nl-NL-DmnFXAQC.js +13 -0
  129. package/dist/no-NO-BBCvsecq.js +54 -0
  130. package/dist/no-NO-DbvFfP96.js +13 -0
  131. package/dist/no-NO-Drup6Jyy.js +16 -0
  132. package/dist/pl-PL--mmxopYA.js +13 -0
  133. package/dist/pl-PL-BXv8Mmzb.js +16 -0
  134. package/dist/pl-PL-kGaeUP-w.js +54 -0
  135. package/dist/{plaintext-B39yQnOr.js → plaintext-9WNCwUtz.js} +2 -2
  136. package/dist/plus-circle-filled-Cnf1oJTm.js +17 -0
  137. package/dist/preact/adyen-transfer-instrument.js +1 -1
  138. package/dist/pt-PT-BVzXBFp7.js +13 -0
  139. package/dist/pt-PT-D8nU-UM2.js +16 -0
  140. package/dist/pt-PT-DpDxAynk.js +13 -0
  141. package/dist/pt-PT-JVqqgvPs.js +54 -0
  142. package/dist/{resolveEnvironment-Dx0BPNMa.js → resolveEnvironment-DQH1ab0S.js} +3 -3
  143. package/dist/ro-RO-C83h2zHZ.js +54 -0
  144. package/dist/ro-RO-CG33OwqS.js +16 -0
  145. package/dist/ro-RO-Cdmevo9A.js +13 -0
  146. package/dist/ru-RU-FZb2upqh.js +13 -0
  147. package/dist/{rules-CUANHpja.js → rules-CCnLDGvk.js} +43 -70
  148. package/dist/sk-SK-CgLJIuJw.js +54 -0
  149. package/dist/sk-SK-DV_xkO69.js +16 -0
  150. package/dist/sk-SK-nfeuTcY5.js +13 -0
  151. package/dist/sl-SI-B5yeoadY.js +16 -0
  152. package/dist/sl-SI-BzeVaC1Z.js +54 -0
  153. package/dist/sl-SI-DUTZDqkP.js +13 -0
  154. package/dist/style.css +417 -605
  155. package/dist/styles-CLV89_hH.js +417 -605
  156. package/dist/sv-SE-BTx2XKAp.js +13 -0
  157. package/dist/sv-SE-CVmo11gI.js +54 -0
  158. package/dist/sv-SE-CfxyR53r.js +16 -0
  159. package/dist/sv-SE-rckxD-43.js +13 -0
  160. package/dist/types/api/companySelection/useCompanySelection.d.ts +18 -1
  161. package/dist/types/api/configurations/useScenarios.d.ts +6 -6
  162. package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +1 -0
  163. package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +0 -306
  164. package/dist/types/components/Business/forms/AdditionalInformation/types.d.ts +2 -1
  165. package/dist/types/components/Business/forms/BasicInformation/types.d.ts +2 -1
  166. package/dist/types/components/Business/forms/BusinessDetails/forms.d.ts +1 -1
  167. package/dist/types/components/Business/forms/rules.d.ts +1 -0
  168. package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsFormConfig.d.ts +1 -2
  169. package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +0 -3
  170. package/dist/types/components/EFP/fields/LegalFormField/types.d.ts +4 -2
  171. package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +5 -307
  172. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +2 -2
  173. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/SOFFinancierModal.d.ts +1 -2
  174. package/dist/types/components/Individual/fields/NameFields/NameFields.d.ts +0 -2
  175. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.d.ts +1 -2
  176. package/dist/types/components/Individual/forms/IndividualOnfido/GuidanceQuestion/GuidanceQuestion.d.ts +7 -3
  177. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.d.ts +0 -1
  178. package/dist/types/components/Individual/mapping/adjustOnfidoIdentificationData.d.ts +3 -0
  179. package/dist/types/components/Individual/mapping/getOnfidoIdentityTypeToApiIdentityTypeMap.d.ts +3 -0
  180. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakersGettingStarted/DecisionMakersGettingStarted.d.ts +5 -0
  181. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakersGettingStarted/DecisionMakersModalContent.d.ts +1 -0
  182. package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/IndividualOnfidoStore.d.ts +6 -0
  183. package/dist/types/components/Shared/FormNavigation/FormNavigationItem.d.ts +1 -2
  184. package/dist/types/components/Shared/Introduction/copy.d.ts +2 -2
  185. package/dist/types/components/Shared/Summary/Summary.d.ts +0 -1
  186. package/dist/types/components/Shared/devex/DebugListener/DebugModal.d.ts +0 -1
  187. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/BusinessRegistrationNumberField.d.ts +1 -1
  188. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/types.d.ts +5 -7
  189. package/dist/types/components/Shared/fields/CountryField/types.d.ts +1 -1
  190. package/dist/types/components/Shared/fields/CountryOfGoverningLawField/types.d.ts +1 -1
  191. package/dist/types/components/Shared/fields/Currency/types.d.ts +1 -1
  192. package/dist/types/components/Shared/fields/DBANameField/types.d.ts +1 -3
  193. package/dist/types/components/Shared/fields/DateOfIncorporationField/types.d.ts +1 -1
  194. package/dist/types/components/Shared/fields/EInvoicingCodeField/types.d.ts +1 -1
  195. package/dist/types/components/Shared/fields/FinancialReportingDate/types.d.ts +1 -1
  196. package/dist/types/components/Shared/fields/IdFieldTypeSelector/getDefaultRegistrationNumberType.d.ts +16 -0
  197. package/dist/types/components/Shared/fields/IdFieldTypeSelector/getDefaultVatNumberType.d.ts +13 -0
  198. package/dist/types/components/Shared/fields/LegalCompanyNameField/LegalCompanyNameField.d.ts +1 -2
  199. package/dist/types/components/Shared/fields/LegalCompanyNameField/types.d.ts +1 -1
  200. package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/fieldConfig.d.ts +12 -0
  201. package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/types.d.ts +5 -0
  202. package/dist/types/components/Shared/fields/NumberOfEmployees/types.d.ts +1 -1
  203. package/dist/types/components/Shared/fields/PhoneField/PhoneField.d.ts +1 -2
  204. package/dist/types/components/Shared/fields/PhoneField/types.d.ts +1 -1
  205. package/dist/types/components/Shared/fields/StateField/types.d.ts +1 -1
  206. package/dist/types/components/Shared/fields/StockExchangeMICField/types.d.ts +1 -1
  207. package/dist/types/components/Shared/fields/StockISINField/types.d.ts +1 -1
  208. package/dist/types/components/Shared/fields/StockTickerSymbol/types.d.ts +1 -1
  209. package/dist/types/components/Shared/fields/TaxInformationField/TaxInformationField.d.ts +1 -2
  210. package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +5 -3
  211. package/dist/types/components/Shared/fields/TaxInformationField/types.d.ts +1 -1
  212. package/dist/types/components/Shared/fields/VatNumberField/VatNumberField.d.ts +1 -1
  213. package/dist/types/components/Shared/fields/VatNumberField/types.d.ts +2 -4
  214. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  215. package/dist/types/components/Shared/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +1 -1
  216. package/dist/types/components/Shared/forms/FinancialInformation/mapping/mapFinancialInformationToFinancialReport.d.ts +1 -1
  217. package/dist/types/components/Shared/forms/FinancialInformation/types.d.ts +1 -1
  218. package/dist/types/components/Shared/tasks/TaskList/TaskItemStatus.d.ts +1 -2
  219. package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/UnincorporatedPartnershipRadioGroup.d.ts +2 -3
  220. package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/UnincorporatedPartnershipRoleAndType.d.ts +1 -2
  221. package/dist/types/components/ui/atoms/Accordion/Accordion.d.ts +1 -2
  222. package/dist/types/components/ui/atoms/Button/Button.d.ts +2 -3
  223. package/dist/types/components/ui/atoms/Button/Button.types.d.ts +3 -3
  224. package/dist/types/components/ui/atoms/Field/Field.d.ts +3 -6
  225. package/dist/types/components/ui/atoms/Field/Field.types.d.ts +9 -12
  226. package/dist/types/components/ui/atoms/FormHeader/FormHeader.d.ts +4 -6
  227. package/dist/types/components/ui/atoms/InputBase/InputBase.d.ts +4 -4
  228. package/dist/types/components/ui/atoms/List/List.d.ts +12 -0
  229. package/dist/types/components/ui/atoms/Modal/MaybeModal.d.ts +1 -1
  230. package/dist/types/components/ui/atoms/RadioGroupCard/RadioGroupCard.types.d.ts +3 -3
  231. package/dist/types/components/ui/atoms/Remove/Remove.d.ts +1 -2
  232. package/dist/types/components/ui/atoms/Select/Select.d.ts +1 -2
  233. package/dist/types/components/ui/atoms/Select/Select.types.d.ts +1 -0
  234. package/dist/types/components/ui/atoms/SelectButton/SelectButton.d.ts +1 -2
  235. package/dist/types/components/ui/atoms/SelectButton/SelectButton.types.d.ts +3 -4
  236. package/dist/types/components/ui/atoms/SelectList/SelectList.d.ts +1 -2
  237. package/dist/types/components/ui/atoms/SelectList/SelectList.types.d.ts +2 -2
  238. package/dist/types/components/ui/atoms/SelectListItem/SelectListItem.types.d.ts +3 -3
  239. package/dist/types/components/ui/atoms/Svg/svgs.d.ts +6 -0
  240. package/dist/types/components/ui/atoms/TextArea/TextArea.d.ts +1 -2
  241. package/dist/types/components/ui/atoms/Tile/Tile.d.ts +1 -2
  242. package/dist/types/components/ui/layout/LandingLayout/LandingLayout.d.ts +10 -0
  243. package/dist/types/components/ui/layout/StackLayout/StackLayout.d.ts +8 -0
  244. package/dist/types/components/ui/molecules/Card/Card.d.ts +1 -2
  245. package/dist/types/components/ui/molecules/Card/types.d.ts +3 -3
  246. package/dist/types/components/ui/molecules/DocumentGuidance/DocumentGuidance.types.d.ts +2 -2
  247. package/dist/types/components/ui/molecules/Dropzone/Dropzone.d.ts +1 -2
  248. package/dist/types/components/ui/molecules/Dropzone/FilePicker.d.ts +2 -4
  249. package/dist/types/components/ui/molecules/EmbeddedStatus/EmbeddedStatus.d.ts +2 -2
  250. package/dist/types/components/ui/molecules/EmbeddedStatus/statusToTag.d.ts +2 -2
  251. package/dist/types/components/ui/molecules/FormEndState/FormEndState.d.ts +0 -1
  252. package/dist/types/components/ui/molecules/InputCurrency/InputCurrency.d.ts +1 -2
  253. package/dist/types/components/ui/molecules/InputDate/InputDate.d.ts +3 -3
  254. package/dist/types/components/ui/molecules/MaskedInput/MaskedInput.d.ts +2 -2
  255. package/dist/types/constants/keys.d.ts +2 -0
  256. package/dist/types/context/ExperimentContext/types.d.ts +8 -0
  257. package/dist/types/core/EmbedShell/EmbedShell.d.ts +1 -0
  258. package/dist/types/core/UIElement/UIElement.d.ts +1 -0
  259. package/dist/types/core/models/api/financialReport.d.ts +2 -2
  260. package/dist/types/core/models/api/get-scenarios.d.ts +1 -1
  261. package/dist/types/core/models/api/legal-arrangement.d.ts +10 -2
  262. package/dist/types/core/models/api/organization.d.ts +8 -0
  263. package/dist/types/core/user-events.d.ts +1 -1
  264. package/dist/types/embeds/business-financing/AdyenBusinessFinancing.d.ts +1 -1
  265. package/dist/types/embeds/business-financing/adyen-business-financing.types.d.ts +6 -1
  266. package/dist/types/embeds/individual/adyen-individual.types.d.ts +6 -1
  267. package/dist/types/embeds/onboarding/AdyenOnboarding.d.ts +1 -0
  268. package/dist/types/embeds/onboarding/adyen-onboarding.types.d.ts +4 -1
  269. package/dist/types/embeds/sign-pci/AdyenSignPci.d.ts +0 -1
  270. package/dist/types/embeds/sign-pci/adyen-sign-pci.types.d.ts +5 -3
  271. package/dist/types/embeds/terms-of-service/adyen-terms-of-service.types.d.ts +7 -1
  272. package/dist/types/embeds/transfer-instrument/AdyenTransferInstrument.d.ts +2 -1
  273. package/dist/types/embeds/transfer-instrument/adyen-transfer-instrument.types.d.ts +7 -2
  274. package/dist/types/hooks/useForm/types.d.ts +0 -2
  275. package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +28 -0
  276. package/dist/types/hooks/useMultiForm/types.d.ts +36 -34
  277. package/dist/types/hooks/useMultiForm/useMultiForm.d.ts +1 -1
  278. package/dist/types/language/Language.d.ts +1 -7
  279. package/dist/types/language/i18n.d.ts +2 -0
  280. package/dist/types/language/types.d.ts +3 -0
  281. package/dist/types/language/utils.d.ts +11 -2
  282. package/dist/types/types/datasets/country-code.d.ts +249 -249
  283. package/dist/types/utils/entityAssociationUtil.d.ts +1 -2
  284. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  285. package/dist/types/utils/eventHandlers/handleKeys.d.ts +2 -2
  286. package/dist/types/utils/getDisplayErrorMessage.d.ts +2 -2
  287. package/dist/types/utils/getName.d.ts +2 -2
  288. package/dist/types/utils/makeSelectItemForRole.d.ts +2 -2
  289. package/dist/types/utils/masking/masks/businessRegistrationNumberMasks.d.ts +1 -0
  290. package/dist/types/utils/regex/patternValidators.d.ts +2 -0
  291. package/dist/types/utils/simulateTextChangeFromKeyboardEvent.d.ts +2 -2
  292. package/dist/types/utils/urlUtils.d.ts +1 -0
  293. package/dist/types/utils/validatorUtils.d.ts +2 -0
  294. package/dist/{useMultiForm-Bwx2nVhh.js → useMultiForm-KQwxav4F.js} +158 -135
  295. package/dist/{useOnboardingStatus-Cwba-HzS.js → useOnboardingStatus-BMyj9Pwn.js} +1 -1
  296. package/dist/{useSalesChannelsSettings-BLzegVJh.js → useSalesChannelsSettings-43TfSoxc.js} +2 -2
  297. package/dist/{useTermsOfServiceStatus-C-i9mF4m.js → useTermsOfServiceStatus-CBHKWYSb.js} +1 -1
  298. package/dist/{useUpdateLegalEntity-xQlAqIqy.js → useUpdateLegalEntity-D8dw9Oc3.js} +2 -2
  299. package/dist/{utils-DXv7uAh6.js → utils-CL9qlD-O.js} +18 -11
  300. package/dist/{validate-BN5p-GhK.js → validate-CeF0YKvL.js} +2 -2
  301. package/dist/vue/adyen-transfer-instrument.js +5 -4
  302. package/dist/{yaml-jFdy-qnY.js → yaml-CBkrSAtc.js} +2 -2
  303. package/dist/zh-CN-wUb4MmTZ.js +13 -0
  304. package/dist/zh-TW-DNTXHLKa.js +13 -0
  305. package/package.json +28 -27
  306. package/dist/FormEndState-C3HCmXcw.js +0 -32
  307. package/dist/SourceOfFunds.module-xwHIboir.js +0 -128
  308. package/dist/bg-BG-COTwZXwN.js +0 -2040
  309. package/dist/cs-CZ-DUlgJKVq.js +0 -2040
  310. package/dist/da-DK-BDzDHhVR.js +0 -2040
  311. package/dist/de-DE-B3TpRjZX.js +0 -994
  312. package/dist/de-DE-DJdgXqS_.js +0 -2040
  313. package/dist/el-GR-CFEuLvxK.js +0 -994
  314. package/dist/el-GR-D5i9BNyh.js +0 -2040
  315. package/dist/en-US-ghR-1_C2.js +0 -994
  316. package/dist/es-ES-BtWn2FOQ.js +0 -994
  317. package/dist/es-ES-VOSWszW5.js +0 -2040
  318. package/dist/et-EE-Bp4Ngsn4.js +0 -2040
  319. package/dist/fi-FI-DaujOE-a.js +0 -2040
  320. package/dist/fr-FR-BdPZxk11.js +0 -2040
  321. package/dist/fr-FR-HvIkGqJf.js +0 -994
  322. package/dist/hr-HR-BY7C7NxY.js +0 -2040
  323. package/dist/hu-HU-DHCty-Tc.js +0 -2040
  324. package/dist/it-IT-BMsuhZEQ.js +0 -2040
  325. package/dist/it-IT-CjbZahlB.js +0 -994
  326. package/dist/ja-JP-4jufT0xh.js +0 -994
  327. package/dist/ja-JP-BYDz1z2G.js +0 -2040
  328. package/dist/lt-LT-DNJ9V9xV.js +0 -2040
  329. package/dist/lv-LV-CFJwN5wq.js +0 -2040
  330. package/dist/nl-NL-B3xjfpMi.js +0 -994
  331. package/dist/nl-NL-DibAf790.js +0 -2040
  332. package/dist/no-NO-DHCy5rXx.js +0 -2040
  333. package/dist/pl-PL-eZBNH5HH.js +0 -2040
  334. package/dist/pt-PT-BpYDD-PX.js +0 -994
  335. package/dist/pt-PT-CiN_Wmfe.js +0 -2040
  336. package/dist/ro-RO-CgyMTvLc.js +0 -2040
  337. package/dist/ru-RU-BlgIj-Q4.js +0 -994
  338. package/dist/sk-SK-B5qlQB_U.js +0 -2040
  339. package/dist/sl-SI-8PPfrGzL.js +0 -2040
  340. package/dist/sv-SE-7lcf_fB9.js +0 -994
  341. package/dist/sv-SE-ZWLw6D3j.js +0 -2040
  342. package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/RichText.d.ts +0 -5
  343. package/dist/types/utils/sanitizeHtml.d.ts +0 -3
  344. package/dist/types/utils/useStateFromProp.d.ts +0 -9
  345. package/dist/zh-CN-xYZH718R.js +0 -994
  346. package/dist/zh-TW-DqBBNurv.js +0 -994
@@ -2,20 +2,20 @@
2
2
  {
3
3
  try {
4
4
  let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "445db899-d54f-429c-910c-46ebe44c7ef3", e._sentryDebugIdIdentifier = "sentry-dbid-445db899-d54f-429c-910c-46ebe44c7ef3");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "ba18ab40-57e3-4f27-878f-7d4de0949d67", e._sentryDebugIdIdentifier = "sentry-dbid-ba18ab40-57e3-4f27-878f-7d4de0949d67");
6
6
  } catch (e) {
7
7
  }
8
8
  }
9
9
  ;
10
10
  import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
11
- import { useRef, useEffect, useCallback, useMemo, useState } from "preact/hooks";
12
- import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-xQlAqIqy.js";
13
- import { bR as reverseMapping, bS as formatObject, bT as isEeaCountry, y as LegalEntityType, ba as cloneObject, p as useApiContext, q as useQuery, r as httpGet, b as useI18nContext, az as Field, bK as Select, C as Typography, ay as createFormUtils, aV as RadioGroup, bU as Link, bq as InputText, bb as currencyByCountry, bV as InputNumber, bW as InputDate, bX as Currency, bY as CURRENCY_FIELD, bZ as InputCurrency, bL as useFormContext, av as getFieldProps, ax as ErrorPanel, b_ as getAddressSchemaForCountry, b$ as COUNTRIES_WITH_STATES_DATASET, c0 as Address, c1 as getAddressSchemaLabelsByCountry, $ as useAnalyticsContext, be as useInvalidateRootLegalEntity, an as useAssociatedLegalEntity, b0 as datasetUtilities, a5 as useToastContext, J as useSettingsContext, K as SettingNames, c2 as getAssociatedLeAnalyticsPayload, bO as getRequiredForms, bP as addValidityToForms, bQ as useFormComposer, c3 as trackNavigation, L as Loader, a3 as Icon, Z as Button, c4 as isValidationError, c5 as processValidationErrors, c6 as isMaintenanceModeError } from "./StoreProvider-BmzY19Td.js";
14
- import { F as FormContextProvider, a as FormFlow } from "./FormFlow-Bt-mu4Wm.js";
15
- import { u as useMultiForm } from "./useMultiForm-Bwx2nVhh.js";
16
- import { F as FormEndState } from "./FormEndState-C3HCmXcw.js";
17
- import { l as localizeDateString } from "./localizeDateString-QtCjf8Fg.js";
18
- import { m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./mapFinancialReportsToFinancialInformation-C-2jp0wg.js";
11
+ import { useRef, useEffect, useMemo, useState, useCallback } from "preact/hooks";
12
+ import { u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./useUpdateLegalEntity-D8dw9Oc3.js";
13
+ import { bz as reverseMapping, bA as formatObject, bB as isEeaCountry, y as LegalEntityType, bd as cloneObject, p as useApiContext, q as useQuery, r as httpGet, ap as useI18nContext, aB as Field, bu as Select, G as Typography, bC as LegalFormField, aA as createFormUtils, aY as RadioGroup, bD as Link, bE as InputText, be as currencyByCountry, bF as InputNumber, bG as InputDate, bH as Currency, bI as CURRENCY_FIELD, bJ as InputCurrency, bK as useFormContext, ax as getFieldProps, az as ErrorPanel, bL as getAddressSchemaForCountry, bM as COUNTRIES_WITH_STATES_DATASET, bN as Address, bO as getAddressSchemaLabelsByCountry, a0 as useAnalyticsContext, bh as useInvalidateRootLegalEntity, ao as useAssociatedLegalEntity, b3 as datasetUtilities, a6 as useToastContext, K as useSettingsContext, M as SettingNames, bP as getAssociatedLeAnalyticsPayload, bQ as getRequiredForms, bR as addValidityToForms, bS as useFormComposer, bT as trackNavigation, L as Loader, a4 as Icon, _ as Button, bU as isValidationError, bV as processValidationErrors, bW as isMaintenanceModeError } from "./StoreProvider-ClKLaHzy.js";
14
+ import { F as FormContextProvider, a as FormFlow } from "./FormFlow-DjvdNEiV.js";
15
+ import { u as useMultiForm } from "./useMultiForm-KQwxav4F.js";
16
+ import { F as FormEndState } from "./FormEndState-JB6QFSet.js";
17
+ import { l as localizeDateString } from "./localizeDateString-CKCBXzSn.js";
18
+ import { m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./mapFinancialReportsToFinancialInformation-D_6u_bSS.js";
19
19
  import { b as businessFinancingMultiformRules } from "./validate-CuwYJGc9.js";
20
20
  const businessFinancingBaseMapping = {
21
21
  legalProceedingsDate: "organization.dateOfInitiationOfLegalProceeding",
@@ -124,25 +124,18 @@ var BusinessFinancingIndex = /* @__PURE__ */ ((BusinessFinancingIndex2) => {
124
124
  return BusinessFinancingIndex2;
125
125
  })(BusinessFinancingIndex || {});
126
126
  const getLegalEntityId = (businessFinancingIndex, rootLegalEntity) => {
127
- var _a;
128
127
  if (!rootLegalEntity) return void 0;
129
128
  if (businessFinancingIndex === BusinessFinancingIndex.COMPANY) return rootLegalEntity.id;
130
- if (!(rootLegalEntity == null ? void 0 : rootLegalEntity.entityAssociations)) return void 0;
129
+ if (!rootLegalEntity?.entityAssociations) return void 0;
131
130
  const businessFinancingEntityType = BusinessFinancingIndex.PARENT_COMPANY ? "immediateParentCompany" : "ultimateParentCompany";
132
- const businessFinancingEntityAssociation = (_a = rootLegalEntity.entityAssociations) == null ? void 0 : _a.find(
131
+ const businessFinancingEntityAssociation = rootLegalEntity.entityAssociations?.find(
133
132
  (entity) => entity.type === businessFinancingEntityType
134
133
  );
135
- return businessFinancingEntityAssociation == null ? void 0 : businessFinancingEntityAssociation.legalEntityId;
134
+ return businessFinancingEntityAssociation?.legalEntityId;
136
135
  };
137
136
  const USER_LOCALE = typeof navigator !== "undefined" ? navigator.language : "en-US";
138
- const entityHasParentCompany = (data) => {
139
- var _a, _b;
140
- return ((_a = data.company) == null ? void 0 : _a.isCompanyOwnedByAnotherCompany) && ((_b = data.company) == null ? void 0 : _b.isCompanyOwnedByAnotherCompany) === "Yes";
141
- };
142
- const entityHasUltimateParentCompany = (data) => {
143
- var _a, _b;
144
- return ((_a = data.company) == null ? void 0 : _a.isParentOwnedByAnotherCompany) && ((_b = data.company) == null ? void 0 : _b.isParentOwnedByAnotherCompany) === "Yes";
145
- };
137
+ const entityHasParentCompany = (data) => data.company?.isCompanyOwnedByAnotherCompany && data.company?.isCompanyOwnedByAnotherCompany === "Yes";
138
+ const entityHasUltimateParentCompany = (data) => data.company?.isParentOwnedByAnotherCompany && data.company?.isParentOwnedByAnotherCompany === "Yes";
146
139
  const financialReportsToString = (financialReports) => {
147
140
  return {
148
141
  ...financialReports,
@@ -153,7 +146,6 @@ const financialReportsToString = (financialReports) => {
153
146
  };
154
147
  };
155
148
  const prepareBusinessFinancingSubmitData = (businessFinancingIndex, data, rootLegalEntity) => {
156
- var _a, _b, _c;
157
149
  const businessFinancingData = data[businessFinancingIndex];
158
150
  if (!businessFinancingData) return null;
159
151
  if (businessFinancingIndex === BusinessFinancingIndex.PARENT_COMPANY && !entityHasParentCompany(data)) {
@@ -164,7 +156,7 @@ const prepareBusinessFinancingSubmitData = (businessFinancingIndex, data, rootLe
164
156
  }
165
157
  const businessFinancingDetails = mapBusinessFinancingToLegalEntity(businessFinancingData);
166
158
  if (!businessFinancingDetails.organization) return null;
167
- const businessFinancingCountry = ((_a = businessFinancingDetails.organization.registeredAddress) == null ? void 0 : _a.country) || ((_c = (_b = rootLegalEntity == null ? void 0 : rootLegalEntity.organization) == null ? void 0 : _b.registeredAddress) == null ? void 0 : _c.country);
159
+ const businessFinancingCountry = businessFinancingDetails.organization.registeredAddress?.country || rootLegalEntity?.organization?.registeredAddress?.country;
168
160
  if (businessFinancingData.financialReportingDate && isEeaCountry(businessFinancingCountry)) {
169
161
  const finReports = {
170
162
  currency: businessFinancingData.currency,
@@ -257,15 +249,14 @@ const getCompanySchemaKeys = (country, currentData, schemaKeys) => {
257
249
  if (currentData.doesYourCompanyHaveLEI !== "Yes") {
258
250
  fieldsToRemove.push("legalEntityIdentifier");
259
251
  }
260
- if (!(currentData == null ? void 0 : currentData.legalInformationInsolvency) || ["noLegalActionsTaken", "iDontKnow"].includes(currentData == null ? void 0 : currentData.legalInformationInsolvency)) {
252
+ if (!currentData?.legalInformationInsolvency || ["noLegalActionsTaken", "iDontKnow"].includes(currentData?.legalInformationInsolvency)) {
261
253
  fieldsToRemove.push("legalProceedingsDate");
262
254
  }
263
255
  return schemaKeys.filter((field) => !fieldsToRemove.includes(field));
264
256
  };
265
257
  const getParentCompanySchemaKeys = (currentData, schemaKeys) => {
266
- var _a;
267
258
  const fieldsToRemove = [];
268
- const companyCountry = (_a = currentData == null ? void 0 : currentData.registrationAddress) == null ? void 0 : _a.country;
259
+ const companyCountry = currentData?.registrationAddress?.country;
269
260
  if (!isEeaCountry(companyCountry)) {
270
261
  fieldsToRemove.push(
271
262
  "financialReportingDate",
@@ -278,12 +269,12 @@ const getParentCompanySchemaKeys = (currentData, schemaKeys) => {
278
269
  if (currentData.doesYourCompanyHaveLEI !== "Yes") {
279
270
  fieldsToRemove.push("legalEntityIdentifier");
280
271
  }
281
- if (!(currentData == null ? void 0 : currentData.legalInformationInsolvency) || ["noLegalActionsTaken", "iDontKnow"].includes(currentData == null ? void 0 : currentData.legalInformationInsolvency)) {
272
+ if (!currentData?.legalInformationInsolvency || ["noLegalActionsTaken", "iDontKnow"].includes(currentData?.legalInformationInsolvency)) {
282
273
  fieldsToRemove.push("legalProceedingsDate");
283
274
  }
284
275
  return schemaKeys.filter((field) => !fieldsToRemove.includes(field));
285
276
  };
286
- const getBusinessFinancingRequiredFields = (data) => {
277
+ const getBusinessFinancingRequiredFields = (country, data) => {
287
278
  let requiredFields = {
288
279
  company: companySchemaKeys
289
280
  };
@@ -292,9 +283,9 @@ const getBusinessFinancingRequiredFields = (data) => {
292
283
  }
293
284
  const { company, parentCompany = {}, ultimateParentCompany = {} } = data;
294
285
  if (company) {
295
- requiredFields.company = getCompanySchemaKeys("NL", company, companySchemaKeys);
286
+ requiredFields.company = getCompanySchemaKeys(country, company, companySchemaKeys);
296
287
  }
297
- if ((company == null ? void 0 : company.isCompanyOwnedByAnotherCompany) === "Yes") {
288
+ if (company?.isCompanyOwnedByAnotherCompany === "Yes") {
298
289
  const parentCompanyRequiredFields = getParentCompanySchemaKeys(
299
290
  parentCompany,
300
291
  parentCompaniesSchemaKeys
@@ -304,7 +295,7 @@ const getBusinessFinancingRequiredFields = (data) => {
304
295
  parentCompany: parentCompanyRequiredFields
305
296
  };
306
297
  }
307
- if ((company == null ? void 0 : company.isParentOwnedByAnotherCompany) === "Yes") {
298
+ if (company?.isParentOwnedByAnotherCompany === "Yes") {
308
299
  const ultimateParentCompanyRequiredFields = getParentCompanySchemaKeys(
309
300
  ultimateParentCompany,
310
301
  parentCompaniesSchemaKeys
@@ -358,14 +349,13 @@ const getFormattedAmount = (value, currency) => {
358
349
  return `${currency} ${formattedValue}`;
359
350
  };
360
351
  const formatDataForSummary = (i18n, datasetUtils, data) => {
361
- var _a, _b, _c, _d, _e;
362
352
  const summaryData = cloneObject(data) || {};
363
353
  if (summaryData.company) {
364
354
  summaryData.company.legalForm = summaryData.company.legalFormLabel;
365
355
  summaryData.company.naceCode = summaryData.company.naceCodeLabel;
366
356
  summaryData.company.legalInformationInsolvency = getTranslatedLegalInsolvency(
367
357
  i18n,
368
- (_a = summaryData.company) == null ? void 0 : _a.legalInformationInsolvency
358
+ summaryData.company?.legalInformationInsolvency
369
359
  );
370
360
  summaryData.company.annualTurnover = getFormattedAmount(
371
361
  summaryData.company.annualTurnover,
@@ -379,13 +369,13 @@ const formatDataForSummary = (i18n, datasetUtils, data) => {
379
369
  summaryData.company.legalProceedingsDate = legalProceedingsDate ? localizeDateString(legalProceedingsDate, i18n.locale) : void 0;
380
370
  summaryData.company.financialReportingDate = financialReportingDate ? localizeDateString(financialReportingDate, i18n.locale) : void 0;
381
371
  }
382
- if ((_b = summaryData.parentCompany) == null ? void 0 : _b.legalName) {
372
+ if (summaryData.parentCompany?.legalName) {
383
373
  summaryData.parentCompany.legalForm = summaryData.parentCompany.legalFormLabel;
384
374
  summaryData.parentCompany.naceCode = summaryData.parentCompany.naceCodeLabel;
385
375
  summaryData.parentCompany.country = summaryData.parentCompany.country ? datasetUtils.getCountryName(summaryData.parentCompany.country) : "";
386
376
  summaryData.parentCompany.legalInformationInsolvency = getTranslatedLegalInsolvency(
387
377
  i18n,
388
- (_c = summaryData.parentCompany) == null ? void 0 : _c.legalInformationInsolvency
378
+ summaryData.parentCompany?.legalInformationInsolvency
389
379
  );
390
380
  summaryData.parentCompany.annualTurnover = getFormattedAmount(
391
381
  summaryData.parentCompany.annualTurnover,
@@ -399,13 +389,13 @@ const formatDataForSummary = (i18n, datasetUtils, data) => {
399
389
  summaryData.parentCompany.legalProceedingsDate = legalProceedingsDate ? localizeDateString(legalProceedingsDate, i18n.locale) : void 0;
400
390
  summaryData.parentCompany.financialReportingDate = financialReportingDate ? localizeDateString(financialReportingDate, i18n.locale) : void 0;
401
391
  }
402
- if ((_d = summaryData.ultimateParentCompany) == null ? void 0 : _d.legalName) {
392
+ if (summaryData.ultimateParentCompany?.legalName) {
403
393
  summaryData.ultimateParentCompany.legalForm = summaryData.ultimateParentCompany.legalFormLabel;
404
394
  summaryData.ultimateParentCompany.naceCode = summaryData.ultimateParentCompany.naceCodeLabel;
405
395
  summaryData.ultimateParentCompany.country = summaryData.ultimateParentCompany.country ? datasetUtils.getCountryName(summaryData.ultimateParentCompany.country) : "";
406
396
  summaryData.ultimateParentCompany.legalInformationInsolvency = getTranslatedLegalInsolvency(
407
397
  i18n,
408
- (_e = summaryData.ultimateParentCompany) == null ? void 0 : _e.legalInformationInsolvency
398
+ summaryData.ultimateParentCompany?.legalInformationInsolvency
409
399
  );
410
400
  summaryData.ultimateParentCompany.annualTurnover = getFormattedAmount(
411
401
  summaryData.ultimateParentCompany.annualTurnover,
@@ -422,85 +412,6 @@ const formatDataForSummary = (i18n, datasetUtils, data) => {
422
412
  return summaryData;
423
413
  };
424
414
  const mapLegalEntityToBusinessFinancing = (legalEntity) => formatObject(legalEntity, businessFinancingComponentsKeyMapping);
425
- const getLegalForms = async (countryCode, baseUrl) => {
426
- return httpGet({
427
- baseUrl,
428
- path: `datasets/legalForms/${countryCode}`
429
- });
430
- };
431
- const useLegalForms = (countryCode, options) => {
432
- const { baseUrl } = useApiContext();
433
- return useQuery({
434
- queryKey: ["legalForms", countryCode],
435
- queryFn: () => getLegalForms(countryCode, baseUrl.value),
436
- ...options
437
- });
438
- };
439
- function LegalFormField({
440
- name = "legalForm",
441
- data,
442
- valid,
443
- errorMessage,
444
- label,
445
- readonly,
446
- handleChangeFor,
447
- helperText,
448
- countryCode
449
- }) {
450
- const { i18n } = useI18nContext();
451
- const { data: legalFormsData } = useLegalForms(countryCode);
452
- const handleChangeForRef = useRef(handleChangeFor);
453
- useEffect(() => {
454
- handleChangeForRef.current = handleChangeFor;
455
- }, [handleChangeFor]);
456
- const handleChangeForLegalForm = useCallback(
457
- (e) => {
458
- const legalFormEvent = {
459
- target: {
460
- name: "legalForm",
461
- value: e.target.value
462
- }
463
- };
464
- handleChangeFor("legalForm")(legalFormEvent);
465
- },
466
- [handleChangeFor]
467
- );
468
- useEffect(() => {
469
- var _a;
470
- const selectedLabel = (_a = legalFormsData == null ? void 0 : legalFormsData.find(
471
- (legalForm) => legalForm.id === data.legalForm
472
- )) == null ? void 0 : _a.name;
473
- const legalFormEvent = {
474
- target: {
475
- name: "legalFormLabel",
476
- value: selectedLabel
477
- }
478
- };
479
- handleChangeForRef.current("legalFormLabel")(legalFormEvent);
480
- }, [data.legalForm, legalFormsData]);
481
- return /* @__PURE__ */ jsx(
482
- Field,
483
- {
484
- name,
485
- label: label || i18n.get("businessStructure"),
486
- errorMessage,
487
- isValid: valid.legalForm,
488
- helper: helperText == null ? void 0 : helperText.legalForm,
489
- children: (childProps) => /* @__PURE__ */ jsx(
490
- Select,
491
- {
492
- ...childProps,
493
- name,
494
- placeholder: i18n.get("selectOne"),
495
- selected: data.legalForm,
496
- items: legalFormsData ?? [],
497
- readonly: readonly && !!data,
498
- onChange: handleChangeForLegalForm
499
- }
500
- )
501
- }
502
- );
503
- }
504
415
  const getNaceCodes = async (baseUrl) => {
505
416
  return httpGet({
506
417
  baseUrl,
@@ -541,8 +452,7 @@ function NaceCodeField({
541
452
  handleChangeFor("naceCode")(naceCodeEvent);
542
453
  };
543
454
  useEffect(() => {
544
- var _a;
545
- const selectedLabel = (_a = naceCodesData == null ? void 0 : naceCodesData.find((naceCode) => naceCode.id === data.naceCode)) == null ? void 0 : _a.name;
455
+ const selectedLabel = naceCodesData?.find((naceCode) => naceCode.id === data.naceCode)?.name;
546
456
  const naceCodeEvent = {
547
457
  target: {
548
458
  name: "naceCodeLabel",
@@ -558,7 +468,7 @@ function NaceCodeField({
558
468
  label: label || i18n.get("industryAndNaceCode"),
559
469
  errorMessage,
560
470
  isValid: valid.naceCode,
561
- helper: helperText == null ? void 0 : helperText.naceCode,
471
+ helper: helperText?.naceCode,
562
472
  children: (childProps) => /* @__PURE__ */ jsx(
563
473
  Select,
564
474
  {
@@ -607,9 +517,9 @@ function BusinessFinancingBusinessInformation(props) {
607
517
  name: "legalForm",
608
518
  countryCode: country,
609
519
  data: {
610
- legalForm: data == null ? void 0 : data.legalForm
520
+ legalForm: data?.legalForm
611
521
  },
612
- valid: { legalForm: valid == null ? void 0 : valid.legalForm },
522
+ valid: { legalForm: valid?.legalForm },
613
523
  errorMessage: formUtils.getErrorMessage("legalForm", errors, fieldValidationErrors),
614
524
  handleChangeFor: handleFieldChange,
615
525
  readonly: false,
@@ -620,8 +530,8 @@ function BusinessFinancingBusinessInformation(props) {
620
530
  NaceCodeField,
621
531
  {
622
532
  name: "naceCode",
623
- data: { naceCode: data == null ? void 0 : data.naceCode },
624
- valid: { naceCode: valid == null ? void 0 : valid.naceCode },
533
+ data: { naceCode: data?.naceCode },
534
+ valid: { naceCode: valid?.naceCode },
625
535
  errorMessage: formUtils.getErrorMessage("naceCode", errors, fieldValidationErrors),
626
536
  handleChangeFor: handleFieldChange,
627
537
  readonly: false,
@@ -651,16 +561,16 @@ function BusinessFinancingBusinessInformation(props) {
651
561
  ...childProps,
652
562
  name: "doesYourCompanyHaveLEI",
653
563
  items: isMainCompany ? businessFinancingRadioItems : businessFinancingParentRadioItems,
654
- value: data == null ? void 0 : data.doesYourCompanyHaveLEI,
564
+ value: data?.doesYourCompanyHaveLEI,
655
565
  disabled: false,
656
566
  onChange: handleFieldChange("doesYourCompanyHaveLEI"),
657
567
  "aria-required": true,
658
- "aria-invalid": !(valid == null ? void 0 : valid.doesYourCompanyHaveLEI)
568
+ "aria-invalid": !valid?.doesYourCompanyHaveLEI
659
569
  }
660
570
  )
661
571
  }
662
572
  ),
663
- (data == null ? void 0 : data.doesYourCompanyHaveLEI) === "Yes" && /* @__PURE__ */ jsx(
573
+ data?.doesYourCompanyHaveLEI === "Yes" && /* @__PURE__ */ jsx(
664
574
  Field,
665
575
  {
666
576
  name: "legalEntityIdentifier",
@@ -670,7 +580,7 @@ function BusinessFinancingBusinessInformation(props) {
670
580
  errors,
671
581
  fieldValidationErrors
672
582
  ),
673
- isValid: valid == null ? void 0 : valid.legalEntityIdentifier,
583
+ isValid: valid?.legalEntityIdentifier,
674
584
  helper: i18n.get("enterNCharactersWithAMixForExample", {
675
585
  values: {
676
586
  numChars: 20,
@@ -682,13 +592,13 @@ function BusinessFinancingBusinessInformation(props) {
682
592
  {
683
593
  ...childProps,
684
594
  name: "legalEntityIdentifier",
685
- value: data == null ? void 0 : data.legalEntityIdentifier,
595
+ value: data?.legalEntityIdentifier,
686
596
  readonly: false,
687
597
  onInput: handleFieldChange("legalEntityIdentifier", "input"),
688
598
  onBlur: handleFieldChange("legalEntityIdentifier", "blur"),
689
599
  "aria-required": true,
690
- "aria-invalid": !(valid == null ? void 0 : valid.legalEntityIdentifier),
691
- isValid: valid == null ? void 0 : valid.legalEntityIdentifier
600
+ "aria-invalid": !valid?.legalEntityIdentifier,
601
+ isValid: valid?.legalEntityIdentifier
692
602
  }
693
603
  )
694
604
  }
@@ -726,17 +636,17 @@ function BusinessFinancingFinancialInformation(props) {
726
636
  name: "numberOfEmployees",
727
637
  label: formUtils.getLabel("numberOfEmployees", "numberOfEmployees"),
728
638
  errorMessage: formUtils.getErrorMessage("numberOfEmployees", errors, fieldValidationErrors),
729
- isValid: valid == null ? void 0 : valid.numberOfEmployees,
639
+ isValid: valid?.numberOfEmployees,
730
640
  children: (childProps) => /* @__PURE__ */ jsx(
731
641
  InputNumber,
732
642
  {
733
643
  ...childProps,
734
644
  "aria-required": true,
735
- "aria-invalid": !(valid == null ? void 0 : valid.numberOfEmployees),
645
+ "aria-invalid": !valid?.numberOfEmployees,
736
646
  name: "numberOfEmployees",
737
647
  min: "0",
738
648
  step: "1",
739
- value: data == null ? void 0 : data.numberOfEmployees,
649
+ value: data?.numberOfEmployees,
740
650
  onInput: handleFieldChange("numberOfEmployees", "input"),
741
651
  onBlur: handleFieldChange("numberOfEmployees", "blur")
742
652
  }
@@ -754,17 +664,17 @@ function BusinessFinancingFinancialInformation(props) {
754
664
  errors,
755
665
  fieldValidationErrors
756
666
  ),
757
- isValid: valid == null ? void 0 : valid.financialReportingDate,
667
+ isValid: valid?.financialReportingDate,
758
668
  children: (childProps) => /* @__PURE__ */ jsx(
759
669
  InputDate,
760
670
  {
761
671
  ...childProps,
762
672
  name: "financialReportingDate",
763
- value: data == null ? void 0 : data.financialReportingDate,
673
+ value: data?.financialReportingDate,
764
674
  onInput: handleFieldChange("financialReportingDate", "input"),
765
675
  onBlur: handleFieldChange("financialReportingDate", "blur"),
766
676
  "aria-required": true,
767
- "aria-invalid": !(valid == null ? void 0 : valid.financialReportingDate),
677
+ "aria-invalid": !valid?.financialReportingDate,
768
678
  max: TODAY_DATE$1
769
679
  }
770
680
  )
@@ -795,8 +705,8 @@ function BusinessFinancingFinancialInformation(props) {
795
705
  {
796
706
  ...childProps,
797
707
  locale: i18n.locale,
798
- currency: (data == null ? void 0 : data.currency) ?? defaultCurrency,
799
- amount: (data == null ? void 0 : data.netAssets) ? Number(data == null ? void 0 : data.netAssets) : void 0,
708
+ currency: data?.currency ?? defaultCurrency,
709
+ amount: data?.netAssets ? Number(data?.netAssets) : void 0,
800
710
  onAmountChanged: handleFieldChange("netAssets")
801
711
  }
802
712
  )
@@ -815,8 +725,8 @@ function BusinessFinancingFinancialInformation(props) {
815
725
  ...childProps,
816
726
  name: "annualTurnover",
817
727
  locale: i18n.locale,
818
- currency: (data == null ? void 0 : data.currency) ?? defaultCurrency,
819
- amount: (data == null ? void 0 : data.annualTurnover) ? Number(data == null ? void 0 : data.annualTurnover) : void 0,
728
+ currency: data?.currency ?? defaultCurrency,
729
+ amount: data?.annualTurnover ? Number(data?.annualTurnover) : void 0,
820
730
  onAmountChanged: handleFieldChange("annualTurnover")
821
731
  }
822
732
  )
@@ -844,7 +754,7 @@ function BusinessFinancingLegalInformation(props) {
844
754
  { id: "otherLegalMeasures", name: i18n.get("otherLegalMeasures") },
845
755
  { id: "iDontKnow", name: i18n.get("iDontKnow") }
846
756
  ];
847
- const showLegalProceedingsDateField = (data == null ? void 0 : data.legalInformationInsolvency) && !["noLegalActionsTaken", "iDontKnow"].includes(data == null ? void 0 : data.legalInformationInsolvency);
757
+ const showLegalProceedingsDateField = data?.legalInformationInsolvency && !["noLegalActionsTaken", "iDontKnow"].includes(data?.legalInformationInsolvency);
848
758
  return /* @__PURE__ */ jsxs(Fragment, { children: [
849
759
  /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: i18n.get(sectionHeading || "legalInformation") }),
850
760
  /* @__PURE__ */ jsx(
@@ -857,7 +767,7 @@ function BusinessFinancingLegalInformation(props) {
857
767
  errors,
858
768
  fieldValidationErrors
859
769
  ),
860
- isValid: valid == null ? void 0 : valid.legalInformationInsolvency,
770
+ isValid: valid?.legalInformationInsolvency,
861
771
  children: (childProps) => /* @__PURE__ */ jsx(
862
772
  Select,
863
773
  {
@@ -865,10 +775,10 @@ function BusinessFinancingLegalInformation(props) {
865
775
  onChange: handleFieldChange("legalInformationInsolvency", "blur"),
866
776
  name: "legalInformationInsolvency",
867
777
  placeholder: i18n.get("selectOne"),
868
- selected: data == null ? void 0 : data.legalInformationInsolvency,
778
+ selected: data?.legalInformationInsolvency,
869
779
  items: legalInformationInsolvencyItems,
870
780
  "aria-required": true,
871
- "aria-invalid": !(valid == null ? void 0 : valid.legalInformationInsolvency)
781
+ "aria-invalid": !valid?.legalInformationInsolvency
872
782
  }
873
783
  )
874
784
  }
@@ -883,7 +793,7 @@ function BusinessFinancingLegalInformation(props) {
883
793
  errors,
884
794
  fieldValidationErrors
885
795
  ),
886
- isValid: valid == null ? void 0 : valid.legalProceedingsDate,
796
+ isValid: valid?.legalProceedingsDate,
887
797
  children: (childProps) => /* @__PURE__ */ jsx(
888
798
  InputDate,
889
799
  {
@@ -893,7 +803,7 @@ function BusinessFinancingLegalInformation(props) {
893
803
  onInput: handleFieldChange("legalProceedingsDate", "input"),
894
804
  onBlur: handleFieldChange("legalProceedingsDate", "blur"),
895
805
  "aria-required": true,
896
- "aria-invalid": !(valid == null ? void 0 : valid.legalProceedingsDate),
806
+ "aria-invalid": !valid?.legalProceedingsDate,
897
807
  max: TODAY_DATE
898
808
  }
899
809
  )
@@ -921,7 +831,7 @@ function BusinessFinancingOwnershipStructure(props) {
921
831
  name: "isCompanyOwnedByAnotherCompany",
922
832
  classNameModifiers: ["highExposureBusinessInformation"],
923
833
  label: i18n.get("isCompanyOwnedByAnotherCompany", {
924
- values: { company: (legalEntity == null ? void 0 : legalEntity.organization) ? legalEntity.organization.legalName : "" }
834
+ values: { company: legalEntity?.organization ? legalEntity.organization.legalName : "" }
925
835
  }),
926
836
  errorMessage: formUtils.getErrorMessage(
927
837
  "isCompanyOwnedByAnotherCompany",
@@ -935,16 +845,16 @@ function BusinessFinancingOwnershipStructure(props) {
935
845
  ...childProps,
936
846
  name: "isCompanyOwnedByAnotherCompany",
937
847
  items: businessFinancingRadioItems,
938
- value: data == null ? void 0 : data.isCompanyOwnedByAnotherCompany,
848
+ value: data?.isCompanyOwnedByAnotherCompany,
939
849
  disabled: false,
940
850
  onChange: handleFieldChange("isCompanyOwnedByAnotherCompany"),
941
851
  "aria-required": true,
942
- "aria-invalid": !(valid == null ? void 0 : valid.isCompanyOwnedByAnotherCompany)
852
+ "aria-invalid": !valid?.isCompanyOwnedByAnotherCompany
943
853
  }
944
854
  )
945
855
  }
946
856
  ),
947
- (data == null ? void 0 : data.isCompanyOwnedByAnotherCompany) === "Yes" && /* @__PURE__ */ jsx(
857
+ data?.isCompanyOwnedByAnotherCompany === "Yes" && /* @__PURE__ */ jsx(
948
858
  Field,
949
859
  {
950
860
  el: "fieldset",
@@ -953,7 +863,7 @@ function BusinessFinancingOwnershipStructure(props) {
953
863
  label: formUtils.getLabel("isParentOwnedByAnotherCompany"),
954
864
  helper: /* @__PURE__ */ jsx(Typography, { el: "div", variant: "body", color: "secondary", children: /* @__PURE__ */ jsx("span", { children: i18n.get("thisMeansYouHaveAnUltimateParentCompany") }) }),
955
865
  errorMessage: formUtils.getErrorMessage(
956
- "isCompanyOwnedByAnotherCompany",
866
+ "isParentOwnedByAnotherCompany",
957
867
  errors,
958
868
  fieldValidationErrors
959
869
  ),
@@ -965,9 +875,9 @@ function BusinessFinancingOwnershipStructure(props) {
965
875
  items: businessFinancingRadioItems,
966
876
  value: data.isParentOwnedByAnotherCompany,
967
877
  disabled: false,
968
- onChange: handleFieldChange("isCompanyOwnedByAnotherCompany"),
878
+ onChange: handleFieldChange("isParentOwnedByAnotherCompany"),
969
879
  "aria-required": true,
970
- "aria-invalid": !(valid == null ? void 0 : valid.isParentOwnedByAnotherCompany)
880
+ "aria-invalid": !valid?.isParentOwnedByAnotherCompany
971
881
  }
972
882
  )
973
883
  }
@@ -979,7 +889,7 @@ function AdditionalFieldsForBusinessFinancingCompany(props) {
979
889
  const {
980
890
  form: { handleChangeFor, data }
981
891
  } = useFormContext();
982
- const { country, formVerificationErrors, legalEntity } = props;
892
+ const { country, formVerificationErrors, legalEntity, fieldValidationErrors } = props;
983
893
  const formUtils = createFormUtils(props, i18n);
984
894
  const handleChange = (fieldName, mode) => handleChangeFor(fieldName, "company", mode);
985
895
  const ownershipStructureProps = getFieldProps(props, ownershipStructureFields);
@@ -993,7 +903,7 @@ function AdditionalFieldsForBusinessFinancingCompany(props) {
993
903
  ErrorPanel,
994
904
  {
995
905
  verificationErrors: formVerificationErrors,
996
- validationErrors: props == null ? void 0 : props.fieldValidationErrors,
906
+ validationErrors: fieldValidationErrors,
997
907
  formUtils,
998
908
  id: "ariaErrorField"
999
909
  }
@@ -1006,7 +916,7 @@ function AdditionalFieldsForBusinessFinancingCompany(props) {
1006
916
  country,
1007
917
  targetPage: BusinessFinancingPagesEnums.COMPANY_PAGE,
1008
918
  sectionHeading: "yourBusinessInformation",
1009
- data: formUtils.getFieldData((data == null ? void 0 : data.company) ?? {}, businessInformationFields)
919
+ data: formUtils.getFieldData(data?.company ?? {}, businessInformationFields)
1010
920
  }
1011
921
  ),
1012
922
  /* @__PURE__ */ jsx(
@@ -1015,7 +925,7 @@ function AdditionalFieldsForBusinessFinancingCompany(props) {
1015
925
  ...ownershipStructureProps,
1016
926
  legalEntity,
1017
927
  handleFieldChange: handleChange,
1018
- data: formUtils.getFieldData((data == null ? void 0 : data.company) ?? {}, ownershipStructureFields)
928
+ data: formUtils.getFieldData(data?.company ?? {}, ownershipStructureFields)
1019
929
  }
1020
930
  ),
1021
931
  isEeaCountry(country) && /* @__PURE__ */ jsx(
@@ -1025,7 +935,7 @@ function AdditionalFieldsForBusinessFinancingCompany(props) {
1025
935
  handleFieldChange: handleChange,
1026
936
  country,
1027
937
  targetPage: BusinessFinancingPagesEnums.COMPANY_PAGE,
1028
- data: formUtils.getFieldData((data == null ? void 0 : data.company) ?? {}, financialInformationFields)
938
+ data: formUtils.getFieldData(data?.company ?? {}, financialInformationFields)
1029
939
  }
1030
940
  ),
1031
941
  /* @__PURE__ */ jsx(
@@ -1036,7 +946,7 @@ function AdditionalFieldsForBusinessFinancingCompany(props) {
1036
946
  handleFieldChange: handleChange,
1037
947
  targetPage: BusinessFinancingPagesEnums.COMPANY_PAGE,
1038
948
  sectionHeading: "legalInformation",
1039
- data: formUtils.getFieldData((data == null ? void 0 : data.company) ?? {}, legalInformationFields)
949
+ data: formUtils.getFieldData(data?.company ?? {}, legalInformationFields)
1040
950
  }
1041
951
  )
1042
952
  ] });
@@ -1059,19 +969,19 @@ function BusinessFinancingBasicCompanyInformation(props) {
1059
969
  name: "legalName",
1060
970
  label: formUtils.getLabel("legalName", "legalName"),
1061
971
  errorMessage: formUtils.getErrorMessage("legalName", errors, fieldValidationErrors),
1062
- isValid: valid == null ? void 0 : valid.legalName,
972
+ isValid: valid?.legalName,
1063
973
  helper: i18n.get("legalNameIsUsedToIdentifyABusinessWithTheGovernment"),
1064
974
  children: (childProps) => /* @__PURE__ */ jsx(
1065
975
  InputText,
1066
976
  {
1067
977
  ...childProps,
1068
978
  name: "legalName",
1069
- value: data == null ? void 0 : data.legalName,
979
+ value: data?.legalName,
1070
980
  readonly: false,
1071
981
  onInput: handleFieldChange("legalName", "input"),
1072
982
  onBlur: handleFieldChange("legalName", "blur"),
1073
983
  "aria-required": true,
1074
- "aria-invalid": !(valid == null ? void 0 : valid.legalName)
984
+ "aria-invalid": !valid?.legalName
1075
985
  }
1076
986
  )
1077
987
  }
@@ -1084,7 +994,6 @@ const registeredAddressFields = [
1084
994
  "registrationAddress"
1085
995
  ];
1086
996
  function BusinessFinancingRegisteredAddress(props) {
1087
- var _a;
1088
997
  const {
1089
998
  data,
1090
999
  valid,
@@ -1099,7 +1008,7 @@ function BusinessFinancingRegisteredAddress(props) {
1099
1008
  } = props;
1100
1009
  const { i18n } = useI18nContext();
1101
1010
  const formUtils = createFormUtils(props, i18n);
1102
- const addressCountry = (_a = data == null ? void 0 : data.registrationAddress) == null ? void 0 : _a.country;
1011
+ const addressCountry = data?.registrationAddress?.country;
1103
1012
  const addressSchema = useMemo(() => {
1104
1013
  return getAddressSchemaForCountry(addressCountry).filter((field) => {
1105
1014
  if (addressCountry) {
@@ -1127,7 +1036,7 @@ function BusinessFinancingRegisteredAddress(props) {
1127
1036
  name: "isThisAddressTheMainHeadquarters",
1128
1037
  classNameModifiers: ["highExposureBusinessInformation"],
1129
1038
  label: i18n.get("isThisAddressTheMainHeadquarters", {
1130
- values: { company: (legalEntity == null ? void 0 : legalEntity.organization) ? legalEntity.organization.legalName : "" }
1039
+ values: { company: legalEntity?.organization ? legalEntity.organization.legalName : "" }
1131
1040
  }),
1132
1041
  errorMessage: formUtils.getErrorMessage(
1133
1042
  "isThisAddressTheMainHeadquarters",
@@ -1140,11 +1049,11 @@ function BusinessFinancingRegisteredAddress(props) {
1140
1049
  ...childProps,
1141
1050
  name: "isThisAddressTheMainHeadquarters",
1142
1051
  items: businessFinancingRadioItems,
1143
- value: data == null ? void 0 : data.isThisAddressTheMainHeadquarters,
1052
+ value: data?.isThisAddressTheMainHeadquarters,
1144
1053
  disabled: false,
1145
1054
  onChange: handleFieldChange("isThisAddressTheMainHeadquarters"),
1146
1055
  "aria-required": true,
1147
- "aria-invalid": !(valid == null ? void 0 : valid.isThisAddressTheMainHeadquarters)
1056
+ "aria-invalid": !valid?.isThisAddressTheMainHeadquarters
1148
1057
  }
1149
1058
  )
1150
1059
  }
@@ -1154,7 +1063,7 @@ function BusinessFinancingRegisteredAddress(props) {
1154
1063
  {
1155
1064
  id: formId,
1156
1065
  addressType: "registrationAddress",
1157
- data: { ...defaultData == null ? void 0 : defaultData.registrationAddress, country: addressCountry },
1066
+ data: { ...defaultData?.registrationAddress, country: addressCountry },
1158
1067
  labels: addressCountry ? getAddressSchemaLabelsByCountry(addressCountry) : void 0,
1159
1068
  countryCode: addressCountry,
1160
1069
  requiredFields: addressSchema,
@@ -1167,12 +1076,11 @@ function BusinessFinancingRegisteredAddress(props) {
1167
1076
  }
1168
1077
  const parentCompanyFormId$1 = businessFinancingForms.parentCompany.formId;
1169
1078
  function AdditionalFieldsForBusinessFinancingParentCompany(props) {
1170
- var _a, _b, _c, _d, _e, _f;
1171
1079
  const { i18n } = useI18nContext();
1172
1080
  const {
1173
1081
  form: { handleChangeFor, data }
1174
1082
  } = useFormContext();
1175
- const { country, formVerificationErrors } = props;
1083
+ const { country, formVerificationErrors, fieldValidationErrors } = props;
1176
1084
  const formUtils = createFormUtils(props, i18n);
1177
1085
  const handleChange = (fieldName, mode) => handleChangeFor(fieldName, "parentCompany", mode);
1178
1086
  const basicCompanyInformationProps = getFieldProps(props, basicInformationFields);
@@ -1187,7 +1095,7 @@ function AdditionalFieldsForBusinessFinancingParentCompany(props) {
1187
1095
  ErrorPanel,
1188
1096
  {
1189
1097
  verificationErrors: formVerificationErrors,
1190
- validationErrors: props == null ? void 0 : props.fieldValidationErrors,
1098
+ validationErrors: fieldValidationErrors,
1191
1099
  formUtils,
1192
1100
  id: "ariaErrorField"
1193
1101
  }
@@ -1198,7 +1106,7 @@ function AdditionalFieldsForBusinessFinancingParentCompany(props) {
1198
1106
  ...basicCompanyInformationProps,
1199
1107
  sectionHeading: "basicCompanyInformation",
1200
1108
  handleFieldChange: handleChange,
1201
- data: formUtils.getFieldData((data == null ? void 0 : data.parentCompany) ?? {}, basicInformationFields)
1109
+ data: formUtils.getFieldData(data?.parentCompany ?? {}, basicInformationFields)
1202
1110
  }
1203
1111
  ),
1204
1112
  /* @__PURE__ */ jsx(
@@ -1207,9 +1115,9 @@ function AdditionalFieldsForBusinessFinancingParentCompany(props) {
1207
1115
  ...registeredAddressProps,
1208
1116
  formId: parentCompanyFormId$1,
1209
1117
  sectionHeading: "registeredAddress",
1210
- defaultData: data == null ? void 0 : data.parentCompany,
1118
+ defaultData: data?.parentCompany,
1211
1119
  handleFieldChange: handleChange,
1212
- data: formUtils.getFieldData((data == null ? void 0 : data.parentCompany) ?? {}, registeredAddressFields)
1120
+ data: formUtils.getFieldData(data?.parentCompany ?? {}, registeredAddressFields)
1213
1121
  }
1214
1122
  ),
1215
1123
  /* @__PURE__ */ jsx(
@@ -1217,39 +1125,38 @@ function AdditionalFieldsForBusinessFinancingParentCompany(props) {
1217
1125
  {
1218
1126
  ...businessInformationProps,
1219
1127
  sectionHeading: "additionalCompanyInformation",
1220
- country: ((_b = (_a = data == null ? void 0 : data.parentCompany) == null ? void 0 : _a.registrationAddress) == null ? void 0 : _b.country) ?? country,
1128
+ country: data?.parentCompany?.registrationAddress?.country ?? country,
1221
1129
  targetPage: BusinessFinancingPagesEnums.PARENT_COMPANY_PAGE,
1222
1130
  handleFieldChange: handleChange,
1223
- data: formUtils.getFieldData((data == null ? void 0 : data.parentCompany) ?? {}, businessInformationFields)
1131
+ data: formUtils.getFieldData(data?.parentCompany ?? {}, businessInformationFields)
1224
1132
  }
1225
1133
  ),
1226
- isEeaCountry((_d = (_c = data == null ? void 0 : data.parentCompany) == null ? void 0 : _c.registrationAddress) == null ? void 0 : _d.country) && /* @__PURE__ */ jsx(
1134
+ isEeaCountry(data?.parentCompany?.registrationAddress?.country) && /* @__PURE__ */ jsx(
1227
1135
  BusinessFinancingFinancialInformation,
1228
1136
  {
1229
1137
  ...financialInformationProps,
1230
- country: ((_f = (_e = data == null ? void 0 : data.parentCompany) == null ? void 0 : _e.registrationAddress) == null ? void 0 : _f.country) ?? country,
1138
+ country: data?.parentCompany?.registrationAddress?.country ?? country,
1231
1139
  targetPage: BusinessFinancingPagesEnums.PARENT_COMPANY_PAGE,
1232
1140
  handleFieldChange: handleChange,
1233
- data: formUtils.getFieldData((data == null ? void 0 : data.parentCompany) ?? {}, financialInformationFields)
1141
+ data: formUtils.getFieldData(data?.parentCompany ?? {}, financialInformationFields)
1234
1142
  }
1235
1143
  ),
1236
1144
  /* @__PURE__ */ jsx(
1237
1145
  BusinessFinancingLegalInformation,
1238
1146
  {
1239
1147
  ...legalInformationProps,
1240
- country,
1148
+ country: data?.parentCompany?.registrationAddress?.country ?? country,
1241
1149
  targetPage: BusinessFinancingPagesEnums.PARENT_COMPANY_PAGE,
1242
1150
  sectionHeading: "legalInformation",
1243
1151
  handleFieldChange: handleChange,
1244
- data: formUtils.getFieldData((data == null ? void 0 : data.parentCompany) ?? {}, legalInformationFields)
1152
+ data: formUtils.getFieldData(data?.parentCompany ?? {}, legalInformationFields)
1245
1153
  }
1246
1154
  )
1247
1155
  ] });
1248
1156
  }
1249
1157
  const ultimateParentCompanyFormId$1 = businessFinancingForms.ultimateParentCompany.formId;
1250
1158
  function AdditionalFieldsForBusinessFinancingUltimateParentCompany(props) {
1251
- var _a, _b;
1252
- const { formVerificationErrors, country } = props;
1159
+ const { formVerificationErrors, country, fieldValidationErrors } = props;
1253
1160
  const { i18n } = useI18nContext();
1254
1161
  const formUtils = createFormUtils(props, i18n);
1255
1162
  const {
@@ -1268,7 +1175,7 @@ function AdditionalFieldsForBusinessFinancingUltimateParentCompany(props) {
1268
1175
  ErrorPanel,
1269
1176
  {
1270
1177
  verificationErrors: formVerificationErrors,
1271
- validationErrors: props == null ? void 0 : props.fieldValidationErrors,
1178
+ validationErrors: fieldValidationErrors,
1272
1179
  formUtils,
1273
1180
  id: "ariaErrorField"
1274
1181
  }
@@ -1279,7 +1186,7 @@ function AdditionalFieldsForBusinessFinancingUltimateParentCompany(props) {
1279
1186
  ...basicCompanyInformationProps,
1280
1187
  sectionHeading: "businessInformation",
1281
1188
  handleFieldChange: handleChange,
1282
- data: formUtils.getFieldData((data == null ? void 0 : data.ultimateParentCompany) ?? {}, basicInformationFields)
1189
+ data: formUtils.getFieldData(data?.ultimateParentCompany ?? {}, basicInformationFields)
1283
1190
  }
1284
1191
  ),
1285
1192
  /* @__PURE__ */ jsx(
@@ -1288,9 +1195,9 @@ function AdditionalFieldsForBusinessFinancingUltimateParentCompany(props) {
1288
1195
  ...registeredAddressProps,
1289
1196
  formId: ultimateParentCompanyFormId$1,
1290
1197
  sectionHeading: "registeredAddress",
1291
- defaultData: data == null ? void 0 : data.ultimateParentCompany,
1198
+ defaultData: data?.ultimateParentCompany,
1292
1199
  handleFieldChange: handleChange,
1293
- data: formUtils.getFieldData((data == null ? void 0 : data.ultimateParentCompany) ?? {}, registeredAddressFields)
1200
+ data: formUtils.getFieldData(data?.ultimateParentCompany ?? {}, registeredAddressFields)
1294
1201
  }
1295
1202
  ),
1296
1203
  /* @__PURE__ */ jsx(
@@ -1298,21 +1205,21 @@ function AdditionalFieldsForBusinessFinancingUltimateParentCompany(props) {
1298
1205
  {
1299
1206
  ...businessInformationProps,
1300
1207
  sectionHeading: "additionalCompanyInformation",
1301
- country,
1208
+ country: data?.ultimateParentCompany?.registrationAddress?.country ?? country,
1302
1209
  targetPage: BusinessFinancingPagesEnums.ULTIMATE_PARENT_COMPANY_PAGE,
1303
1210
  handleFieldChange: handleChange,
1304
- data: formUtils.getFieldData((data == null ? void 0 : data.ultimateParentCompany) ?? {}, businessInformationFields)
1211
+ data: formUtils.getFieldData(data?.ultimateParentCompany ?? {}, businessInformationFields)
1305
1212
  }
1306
1213
  ),
1307
- isEeaCountry((_b = (_a = data == null ? void 0 : data.ultimateParentCompany) == null ? void 0 : _a.registrationAddress) == null ? void 0 : _b.country) && /* @__PURE__ */ jsx(
1214
+ isEeaCountry(data?.ultimateParentCompany?.registrationAddress?.country) && /* @__PURE__ */ jsx(
1308
1215
  BusinessFinancingFinancialInformation,
1309
1216
  {
1310
1217
  ...financialInformationProps,
1311
- country,
1218
+ country: data?.ultimateParentCompany?.registrationAddress?.country ?? country,
1312
1219
  targetPage: BusinessFinancingPagesEnums.ULTIMATE_PARENT_COMPANY_PAGE,
1313
1220
  handleFieldChange: handleChange,
1314
1221
  data: formUtils.getFieldData(
1315
- (data == null ? void 0 : data.ultimateParentCompany) ?? {},
1222
+ data?.ultimateParentCompany ?? {},
1316
1223
  financialInformationFields
1317
1224
  )
1318
1225
  }
@@ -1321,22 +1228,22 @@ function AdditionalFieldsForBusinessFinancingUltimateParentCompany(props) {
1321
1228
  BusinessFinancingLegalInformation,
1322
1229
  {
1323
1230
  ...legalInformationProps,
1324
- country,
1231
+ country: data?.ultimateParentCompany?.registrationAddress?.country ?? country,
1325
1232
  sectionHeading: "legalInformation",
1326
1233
  targetPage: BusinessFinancingPagesEnums.ULTIMATE_PARENT_COMPANY_PAGE,
1327
1234
  handleFieldChange: handleChange,
1328
- data: formUtils.getFieldData((data == null ? void 0 : data.ultimateParentCompany) ?? {}, legalInformationFields)
1235
+ data: formUtils.getFieldData(data?.ultimateParentCompany ?? {}, legalInformationFields)
1329
1236
  }
1330
1237
  )
1331
1238
  ] });
1332
1239
  }
1333
1240
  const getOrgAnalyticsData = (prefix, details) => {
1334
- const org = details == null ? void 0 : details.organization;
1241
+ const org = details?.organization;
1335
1242
  if (!org) return {};
1336
1243
  return {
1337
- [`${prefix}--economicSector`]: (org == null ? void 0 : org.economicSector) ?? "",
1338
- [`${prefix}--legalForm`]: (org == null ? void 0 : org.legalForm) ?? "",
1339
- [`${prefix}--statusOfLegalProceeding`]: (org == null ? void 0 : org.statusOfLegalProceeding) ?? ""
1244
+ [`${prefix}--economicSector`]: org?.economicSector ?? "",
1245
+ [`${prefix}--legalForm`]: org?.legalForm ?? "",
1246
+ [`${prefix}--statusOfLegalProceeding`]: org?.statusOfLegalProceeding ?? ""
1340
1247
  };
1341
1248
  };
1342
1249
  const businessFinancingFormsRequiredFields = {
@@ -1348,7 +1255,6 @@ const parentCompanyFormId = businessFinancingForms.parentCompany.formId;
1348
1255
  const companyFormId = businessFinancingForms.company.formId;
1349
1256
  const ultimateParentCompanyFormId = businessFinancingForms.ultimateParentCompany.formId;
1350
1257
  function BusinessFinancingDropin(props) {
1351
- var _a, _b;
1352
1258
  const {
1353
1259
  country,
1354
1260
  rootLegalEntity,
@@ -1458,7 +1364,7 @@ function BusinessFinancingDropin(props) {
1458
1364
  parentCompanyBusinessFinancingDetails,
1459
1365
  createLegalEntity,
1460
1366
  updateLegalEntity,
1461
- parentCompanyBusinessFinancingDetails == null ? void 0 : parentCompanyBusinessFinancingDetails.id
1367
+ parentCompanyBusinessFinancingDetails?.id
1462
1368
  );
1463
1369
  promises.push(parentCompanyPromise);
1464
1370
  }
@@ -1468,7 +1374,7 @@ function BusinessFinancingDropin(props) {
1468
1374
  ultimateParentCompanyBusinessFinancingDetails,
1469
1375
  createLegalEntity,
1470
1376
  updateLegalEntity,
1471
- ultimateParentCompanyBusinessFinancingDetails == null ? void 0 : ultimateParentCompanyBusinessFinancingDetails.id
1377
+ ultimateParentCompanyBusinessFinancingDetails?.id
1472
1378
  );
1473
1379
  promises.push(ultimateParentCompanyPromise);
1474
1380
  }
@@ -1526,7 +1432,7 @@ function BusinessFinancingDropin(props) {
1526
1432
  companyBusinessFinancingDetails,
1527
1433
  createLegalEntity,
1528
1434
  updateLegalEntity,
1529
- companyBusinessFinancingDetails == null ? void 0 : companyBusinessFinancingDetails.id
1435
+ companyBusinessFinancingDetails?.id
1530
1436
  );
1531
1437
  userEvents.addTaskEvent("Success", {
1532
1438
  actionType: "submit",
@@ -1537,7 +1443,7 @@ function BusinessFinancingDropin(props) {
1537
1443
  if (showBusinessFinancingFirst || isStandaloneComponent) {
1538
1444
  setShowEndState(true);
1539
1445
  } else {
1540
- externalOnSubmit == null ? void 0 : externalOnSubmit({ ...umfData });
1446
+ externalOnSubmit?.({ ...umfData });
1541
1447
  }
1542
1448
  } catch (e) {
1543
1449
  showToast({ label: i18n.get("failedToUpdateDetails"), variant: "error" });
@@ -1564,8 +1470,8 @@ function BusinessFinancingDropin(props) {
1564
1470
  setProblems((prevProblems) => ({
1565
1471
  ...prevProblems,
1566
1472
  validationErrors: {
1567
- ...prevProblems == null ? void 0 : prevProblems.validationErrors,
1568
- [businessFinancingType]: (validationErrors == null ? void 0 : validationErrors[businessFinancingType]) ?? {}
1473
+ ...prevProblems?.validationErrors,
1474
+ [businessFinancingType]: validationErrors?.[businessFinancingType] ?? {}
1569
1475
  }
1570
1476
  }));
1571
1477
  } else if (isMaintenanceModeError(error)) {
@@ -1588,11 +1494,10 @@ function BusinessFinancingDropin(props) {
1588
1494
  defaultData: derivedData,
1589
1495
  rules: businessFinancingMultiformRules
1590
1496
  });
1591
- const { data: umfData = derivedData } = form;
1497
+ const { data: umfData = derivedData, isValid, errors, valid } = form;
1592
1498
  useEffect(() => {
1593
- var _a2, _b2;
1594
- const showParentCompany = ((_a2 = umfData == null ? void 0 : umfData.company) == null ? void 0 : _a2.isCompanyOwnedByAnotherCompany) === "Yes";
1595
- const showUltimateParentCompany = ((_b2 = umfData == null ? void 0 : umfData.company) == null ? void 0 : _b2.isParentOwnedByAnotherCompany) === "Yes";
1499
+ const showParentCompany = umfData?.company?.isCompanyOwnedByAnotherCompany === "Yes";
1500
+ const showUltimateParentCompany = umfData?.company?.isParentOwnedByAnotherCompany === "Yes";
1596
1501
  let updateForms = {
1597
1502
  company: { ...businessFinancingForms.company }
1598
1503
  };
@@ -1607,11 +1512,11 @@ function BusinessFinancingDropin(props) {
1607
1512
  }
1608
1513
  setBusinessFinancingRequiredForms(updateForms);
1609
1514
  }, [
1610
- (_a = umfData == null ? void 0 : umfData.company) == null ? void 0 : _a.isCompanyOwnedByAnotherCompany,
1611
- (_b = umfData == null ? void 0 : umfData.company) == null ? void 0 : _b.isParentOwnedByAnotherCompany
1515
+ umfData?.company?.isCompanyOwnedByAnotherCompany,
1516
+ umfData?.company?.isParentOwnedByAnotherCompany
1612
1517
  ]);
1613
1518
  useEffect(() => {
1614
- const reqs = getBusinessFinancingRequiredFields(umfData);
1519
+ const reqs = getBusinessFinancingRequiredFields(country, umfData);
1615
1520
  setRequiredFields(reqs);
1616
1521
  }, [umfData]);
1617
1522
  const forms = useMemo(() => {
@@ -1620,13 +1525,8 @@ function BusinessFinancingDropin(props) {
1620
1525
  businessFinancingFormsRequiredFields,
1621
1526
  {}
1622
1527
  );
1623
- return addValidityToForms(requiredForms, form.isValid, problems);
1624
- }, [
1625
- businessFinancingRequiredForms,
1626
- form.isValid,
1627
- businessFinancingFormsRequiredFields,
1628
- problems
1629
- ]);
1528
+ return addValidityToForms(requiredForms, isValid, problems);
1529
+ }, [businessFinancingRequiredForms, isValid, businessFinancingFormsRequiredFields, problems]);
1630
1530
  const {
1631
1531
  handleNextClick,
1632
1532
  handleBackClick,
@@ -1656,57 +1556,54 @@ function BusinessFinancingDropin(props) {
1656
1556
  toForm: "home",
1657
1557
  label: "home"
1658
1558
  });
1659
- handleHomeClick == null ? void 0 : handleHomeClick();
1660
- };
1661
- const renderActiveForm = (selectedForm) => {
1662
- var _a2, _b2, _c, _d, _e, _f;
1663
- return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-wrapper", children: [
1664
- selectedForm.formId === companyFormId && /* @__PURE__ */ jsx(
1665
- AdditionalFieldsForBusinessFinancingCompany,
1666
- {
1667
- data: defaultData == null ? void 0 : defaultData.company,
1668
- legalEntity: rootLegalEntity,
1669
- heading: i18n.get("additionalInformationForBusinessFinancing"),
1670
- id: companyFormId,
1671
- country,
1672
- shouldValidate,
1673
- fieldValidationErrors: (_a2 = problems == null ? void 0 : problems.validationErrors) == null ? void 0 : _a2[selectedForm == null ? void 0 : selectedForm.formId],
1674
- formVerificationErrors: (_b2 = problems == null ? void 0 : problems.verificationErrors) == null ? void 0 : _b2[selectedForm == null ? void 0 : selectedForm.formId],
1675
- errors: (_c = form.errors) == null ? void 0 : _c.company,
1676
- valid: (_d = form.valid) == null ? void 0 : _d.company
1677
- }
1678
- ),
1679
- selectedForm.formId === parentCompanyFormId && /* @__PURE__ */ jsx(
1680
- AdditionalFieldsForBusinessFinancingParentCompany,
1681
- {
1682
- data: defaultData == null ? void 0 : defaultData.parentCompany,
1683
- heading: i18n.get("parentCompanyInformation"),
1684
- id: companyFormId,
1685
- country,
1686
- shouldValidate,
1687
- errors: (_e = form.errors) == null ? void 0 : _e.parentCompany
1688
- }
1689
- ),
1690
- selectedForm.formId === ultimateParentCompanyFormId && /* @__PURE__ */ jsx(
1691
- AdditionalFieldsForBusinessFinancingUltimateParentCompany,
1692
- {
1693
- data: defaultData == null ? void 0 : defaultData.ultimateParentCompany,
1694
- heading: i18n.get("ultimateParentCompanyInformation"),
1695
- id: companyFormId,
1696
- country,
1697
- shouldValidate,
1698
- errors: (_f = form.errors) == null ? void 0 : _f.ultimateParentCompany
1699
- }
1700
- )
1701
- ] });
1559
+ handleHomeClick?.();
1702
1560
  };
1703
- if (!(defaultData == null ? void 0 : defaultData.company)) {
1561
+ const renderActiveForm = (selectedForm) => /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-wrapper", children: [
1562
+ selectedForm.formId === companyFormId && /* @__PURE__ */ jsx(
1563
+ AdditionalFieldsForBusinessFinancingCompany,
1564
+ {
1565
+ data: defaultData?.company,
1566
+ legalEntity: rootLegalEntity,
1567
+ heading: i18n.get("additionalInformationForBusinessFinancing"),
1568
+ id: companyFormId,
1569
+ country,
1570
+ shouldValidate,
1571
+ fieldValidationErrors: problems?.validationErrors?.[selectedForm?.formId],
1572
+ formVerificationErrors: problems?.verificationErrors?.[selectedForm?.formId],
1573
+ errors: errors?.company,
1574
+ valid: valid?.company
1575
+ }
1576
+ ),
1577
+ selectedForm.formId === parentCompanyFormId && /* @__PURE__ */ jsx(
1578
+ AdditionalFieldsForBusinessFinancingParentCompany,
1579
+ {
1580
+ data: defaultData?.parentCompany,
1581
+ heading: i18n.get("parentCompanyInformation"),
1582
+ id: companyFormId,
1583
+ country,
1584
+ shouldValidate,
1585
+ errors: errors?.parentCompany
1586
+ }
1587
+ ),
1588
+ selectedForm.formId === ultimateParentCompanyFormId && /* @__PURE__ */ jsx(
1589
+ AdditionalFieldsForBusinessFinancingUltimateParentCompany,
1590
+ {
1591
+ data: defaultData?.ultimateParentCompany,
1592
+ heading: i18n.get("ultimateParentCompanyInformation"),
1593
+ id: companyFormId,
1594
+ country,
1595
+ shouldValidate,
1596
+ errors: errors?.ultimateParentCompany
1597
+ }
1598
+ )
1599
+ ] });
1600
+ if (!defaultData?.company) {
1704
1601
  return /* @__PURE__ */ jsx(Loader, {});
1705
1602
  }
1706
1603
  return showEndState ? /* @__PURE__ */ jsxs(FormEndState, { variant: "success", children: [
1707
1604
  /* @__PURE__ */ jsx("template", { slot: "title", children: i18n.get("applicationSubmittedSuccessfully") }),
1708
1605
  /* @__PURE__ */ jsx("template", { slot: "icon", children: /* @__PURE__ */ jsx(Icon, { name: "checkmark" }) }),
1709
- /* @__PURE__ */ jsx("template", { slot: "actions", children: externalOnSubmit && !showBusinessFinancingFirst && /* @__PURE__ */ jsx(Button, { onClick: () => externalOnSubmit == null ? void 0 : externalOnSubmit({ ...umfData }), children: externalOnSubmitLabel || i18n.get("finish") }) }),
1606
+ /* @__PURE__ */ jsx("template", { slot: "actions", children: externalOnSubmit && !showBusinessFinancingFirst && /* @__PURE__ */ jsx(Button, { onClick: () => externalOnSubmit?.({ ...umfData }), children: externalOnSubmitLabel || i18n.get("finish") }) }),
1710
1607
  /* @__PURE__ */ jsx("div", { children: i18n.get("yourLoanApplicationHasBeenReceived") })
1711
1608
  ] }) : /* @__PURE__ */ jsx(FormContextProvider, { form, children: /* @__PURE__ */ jsx(
1712
1609
  FormFlow,