@remoteoss/remote-flows 1.40.1 → 1.41.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 (342) hide show
  1. package/dist/CheckboxFieldDefault-OBDOMMWQ.js +2 -0
  2. package/dist/CountryFieldDefault-NEFHRUUS.js +2 -0
  3. package/dist/DatePickerFieldDefault-NYHK6I2G.js +2 -0
  4. package/dist/RadioGroupFieldDefault-GF4XVARF.js +2 -0
  5. package/dist/TextAreaFieldDefault-HPEUG5UI.js +2 -0
  6. package/dist/{chunk-V62JQXIC.js → chunk-2PMYCCWO.js} +2 -2
  7. package/dist/{chunk-W7MCRAQ4.js → chunk-3D7HWCNX.js} +2 -2
  8. package/dist/{chunk-TOOCSXXQ.js → chunk-3PYZQWDY.js} +2 -2
  9. package/dist/{chunk-KN2Q5NOL.js → chunk-4WBEA4IY.js} +2 -2
  10. package/dist/{chunk-7FCKRGGD.js → chunk-57G3ZAX3.js} +2 -2
  11. package/dist/{chunk-4TNJXIDB.js → chunk-6YBDMERC.js} +2 -2
  12. package/dist/{chunk-UOYIAURS.js → chunk-7EKNQYS5.js} +2 -2
  13. package/dist/{chunk-YD54NZIX.js → chunk-7KMXTQ4C.js} +2 -2
  14. package/dist/{chunk-V5EBEJON.js → chunk-7R7AQHV2.js} +2 -2
  15. package/dist/{chunk-W2WHWA5J.js → chunk-B3OYZQSP.js} +2 -2
  16. package/dist/{chunk-NG562U46.js → chunk-B5KAHNYW.js} +2 -2
  17. package/dist/{chunk-Y34DKDJI.js → chunk-BLCINT3L.js} +2 -2
  18. package/dist/{chunk-M5ARBNKW.js → chunk-FAJ5I4Q4.js} +2 -2
  19. package/dist/{chunk-AC4MDLIM.js → chunk-FEWMPYBF.js} +2 -2
  20. package/dist/{chunk-33VF3QHP.js → chunk-FOUXLCEA.js} +2 -2
  21. package/dist/{chunk-VYZOGC65.js → chunk-FXJM54I4.js} +2 -2
  22. package/dist/{chunk-6Y5WCCMH.js → chunk-GGULUMOP.js} +2 -2
  23. package/dist/{chunk-DNAPYU5I.js → chunk-GJV6HJ3D.js} +2 -2
  24. package/dist/{chunk-JSTCIALQ.js → chunk-GTU6MTZH.js} +2 -2
  25. package/dist/{chunk-HAACNERA.js → chunk-HADEU7QX.js} +2 -2
  26. package/dist/{chunk-54Z4QJ3Q.js → chunk-HGIMRQIZ.js} +2 -2
  27. package/dist/{chunk-34U3WJ75.js → chunk-HHFDREGB.js} +2 -2
  28. package/dist/{chunk-5DGTMYWR.js → chunk-I7JKBQHL.js} +2 -2
  29. package/dist/{chunk-LIPJXO2R.js → chunk-INPMEOFL.js} +2 -2
  30. package/dist/{chunk-UEPT6OBL.js → chunk-KBUBBK2E.js} +2 -2
  31. package/dist/{chunk-MF3W2PJ7.js → chunk-KEYWBQH2.js} +2 -2
  32. package/dist/{chunk-6P536SW2.js → chunk-KFFTPU6V.js} +2 -2
  33. package/dist/{chunk-MUXNVLZO.js → chunk-KH4DEFZT.js} +2 -2
  34. package/dist/{chunk-ELM6CPRT.js → chunk-KRZGFZUS.js} +2 -2
  35. package/dist/{chunk-GZUP2IE6.js → chunk-KWIWHDBS.js} +2 -2
  36. package/dist/chunk-KWIWHDBS.js.map +1 -0
  37. package/dist/{chunk-3YTML5RG.js → chunk-MBOKEWSX.js} +2 -2
  38. package/dist/{chunk-R2JJUSD3.js → chunk-MQTRTRV6.js} +2 -2
  39. package/dist/{chunk-QIAK5VU7.js → chunk-MZXFOY5T.js} +2 -2
  40. package/dist/{chunk-JBQOE3XL.js → chunk-MZZFNRW5.js} +2 -2
  41. package/dist/{chunk-PTPNWD53.js → chunk-NIDRVYUJ.js} +2 -2
  42. package/dist/{chunk-4VEUIX5E.js → chunk-NJNJACVL.js} +2 -2
  43. package/dist/{chunk-QI4MWDJS.js → chunk-O3KGCVBO.js} +2 -2
  44. package/dist/{chunk-XNDOPTDJ.js → chunk-OKSKBEIR.js} +2 -2
  45. package/dist/{chunk-YYJH3TPJ.js → chunk-OVU2VJM6.js} +2 -2
  46. package/dist/{chunk-2Q462FT7.js → chunk-P6H7QMKK.js} +2 -2
  47. package/dist/{chunk-ENV2K73V.js → chunk-PET4EGTM.js} +2 -2
  48. package/dist/{chunk-DPXSK2UQ.js → chunk-PIIWY632.js} +2 -2
  49. package/dist/{chunk-ITDU6XPR.js → chunk-PJPYUB2R.js} +2 -2
  50. package/dist/{chunk-PJ6KPGIE.js → chunk-PMRAJKJ5.js} +2 -2
  51. package/dist/{chunk-VTWVHO4F.js → chunk-QV7CEES3.js} +2 -2
  52. package/dist/chunk-RATFUMTL.js +2 -0
  53. package/dist/chunk-RATFUMTL.js.map +1 -0
  54. package/dist/{chunk-QZFKUU4A.js → chunk-S7DDWZOR.js} +2 -2
  55. package/dist/{chunk-LLHJODMO.js → chunk-SHOGXN3C.js} +2 -2
  56. package/dist/{chunk-TBGXSWRX.js → chunk-SKQZ6BPK.js} +2 -2
  57. package/dist/chunk-UAMKMIHP.js +2 -0
  58. package/dist/chunk-UAMKMIHP.js.map +1 -0
  59. package/dist/{chunk-75XZ4KIX.js → chunk-UBBUH2DE.js} +2 -2
  60. package/dist/{chunk-UW3TUDJR.js → chunk-UD24LBJ6.js} +2 -2
  61. package/dist/{chunk-W5MWHAAI.js → chunk-UELAVKG5.js} +2 -2
  62. package/dist/{chunk-VNHXMVTF.js → chunk-UFAQ7CQH.js} +2 -2
  63. package/dist/{chunk-3EYFXA3W.js → chunk-VMZQN4WU.js} +2 -2
  64. package/dist/chunk-VPFGVFXE.js +2 -0
  65. package/dist/chunk-VPFGVFXE.js.map +1 -0
  66. package/dist/{chunk-WMJP2BO5.js → chunk-VV3LCB77.js} +2 -2
  67. package/dist/{chunk-TCFTRE7G.js → chunk-W2WMUANF.js} +2 -2
  68. package/dist/{chunk-ODXNPBKO.js → chunk-W5QXZPMY.js} +2 -2
  69. package/dist/{chunk-KXQVUSLI.js → chunk-WRCHICCJ.js} +2 -2
  70. package/dist/{chunk-YQOONCKH.js → chunk-XE6HQVLQ.js} +2 -2
  71. package/dist/{chunk-76VZ4ARW.js → chunk-XFQS2BVE.js} +2 -2
  72. package/dist/{chunk-YWJS3RL5.js → chunk-XLURXRQT.js} +2 -2
  73. package/dist/{chunk-KY4PEPYW.js → chunk-YOFPHSYV.js} +2 -2
  74. package/dist/{chunk-UQMZU7HM.js → chunk-YQQHCS4S.js} +2 -2
  75. package/dist/{chunk-XV7SBFS5.js → chunk-YXHSALDR.js} +2 -2
  76. package/dist/chunk-ZBIXHOET.js +2 -0
  77. package/dist/chunk-ZBIXHOET.js.map +1 -0
  78. package/dist/{chunk-UYGDMJF2.js → chunk-ZMQTQ4UQ.js} +2 -2
  79. package/dist/{chunk-DRAQLW6C.js → chunk-ZSN43HMP.js} +2 -2
  80. package/dist/{chunk-AXDL47BE.js → chunk-ZTNH2YIM.js} +2 -2
  81. package/dist/{chunk-HSVLNS27.js → chunk-ZY7RAGEL.js} +2 -2
  82. package/dist/default-components.d.ts +2 -2
  83. package/dist/default-components.js +1 -1
  84. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
  85. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +3 -3
  86. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  87. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
  88. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  89. package/dist/flows/ContractAmendment/context.d.ts +3 -3
  90. package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
  91. package/dist/flows/ContractAmendment/hooks.js +1 -1
  92. package/dist/flows/ContractAmendment/index.d.ts +3 -3
  93. package/dist/flows/ContractAmendment/index.js +1 -1
  94. package/dist/flows/ContractAmendment/types.d.ts +2 -2
  95. package/dist/flows/ContractAmendment/utils.d.ts +2 -2
  96. package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +6 -6
  97. package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
  98. package/dist/flows/ContractorOnboarding/api.d.ts +10 -3
  99. package/dist/flows/ContractorOnboarding/api.js +1 -1
  100. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +5 -5
  101. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
  102. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +6 -6
  103. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
  104. package/dist/flows/ContractorOnboarding/components/ContractPreviewHeader.d.ts +2 -2
  105. package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.d.ts +2 -2
  106. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +6 -6
  107. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
  108. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +6 -6
  109. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
  110. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.d.ts +6 -6
  111. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.js +1 -1
  112. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
  113. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
  114. package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +6 -6
  115. package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
  116. package/dist/flows/ContractorOnboarding/components/SaveDraftButton.d.ts +3 -3
  117. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +5 -5
  118. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
  119. package/dist/flows/ContractorOnboarding/context.d.ts +8 -6
  120. package/dist/flows/ContractorOnboarding/hooks.d.ts +6 -6
  121. package/dist/flows/ContractorOnboarding/hooks.js +1 -1
  122. package/dist/flows/ContractorOnboarding/index.d.ts +6 -6
  123. package/dist/flows/ContractorOnboarding/index.js +1 -1
  124. package/dist/flows/ContractorOnboarding/jsfModify.d.ts +6 -6
  125. package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
  126. package/dist/flows/ContractorOnboarding/types.d.ts +6 -6
  127. package/dist/flows/ContractorOnboarding/utils.d.ts +5 -5
  128. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
  129. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  130. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
  131. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  132. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +2 -2
  133. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  134. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +2 -2
  135. package/dist/flows/CostCalculator/api.d.ts +2 -2
  136. package/dist/flows/CostCalculator/api.js +1 -1
  137. package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
  138. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  139. package/dist/flows/CostCalculator/context.d.ts +3 -3
  140. package/dist/flows/CostCalculator/hooks.d.ts +3 -3
  141. package/dist/flows/CostCalculator/hooks.js +1 -1
  142. package/dist/flows/CostCalculator/index.d.ts +3 -3
  143. package/dist/flows/CostCalculator/index.js +1 -1
  144. package/dist/flows/CostCalculator/types.d.ts +2 -2
  145. package/dist/flows/CostCalculator/utils.d.ts +3 -3
  146. package/dist/flows/CostCalculator/utils.js +1 -1
  147. package/dist/flows/CreateCompany/CreateCompany.d.ts +4 -4
  148. package/dist/flows/CreateCompany/CreateCompany.js +1 -1
  149. package/dist/flows/CreateCompany/api.d.ts +2 -2
  150. package/dist/flows/CreateCompany/api.js +1 -1
  151. package/dist/flows/CreateCompany/components/AddressDetailsStep.d.ts +4 -4
  152. package/dist/flows/CreateCompany/components/AddressDetailsStep.js +1 -1
  153. package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.d.ts +4 -4
  154. package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.js +1 -1
  155. package/dist/flows/CreateCompany/components/CreateCompanyForm.d.ts +2 -2
  156. package/dist/flows/CreateCompany/components/CreateCompanyForm.js +1 -1
  157. package/dist/flows/CreateCompany/context.d.ts +4 -4
  158. package/dist/flows/CreateCompany/hooks.d.ts +4 -4
  159. package/dist/flows/CreateCompany/hooks.js +1 -1
  160. package/dist/flows/CreateCompany/index.d.ts +4 -4
  161. package/dist/flows/CreateCompany/index.js +1 -1
  162. package/dist/flows/CreateCompany/types.d.ts +4 -4
  163. package/dist/flows/Onboarding/OnboardingFlow.d.ts +5 -5
  164. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  165. package/dist/flows/Onboarding/api.d.ts +7 -267
  166. package/dist/flows/Onboarding/api.js +1 -1
  167. package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
  168. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  169. package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +5 -5
  170. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  171. package/dist/flows/Onboarding/components/BenefitsStep.d.ts +5 -5
  172. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  173. package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +5 -5
  174. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  175. package/dist/flows/Onboarding/components/EmploymentAgreementInfoContent.js +1 -1
  176. package/dist/flows/Onboarding/components/EngagementAgreementDetailsStep.d.ts +5 -5
  177. package/dist/flows/Onboarding/components/EngagementAgreementDetailsStep.js +1 -1
  178. package/dist/flows/Onboarding/components/OnboardingForm.d.ts +5 -5
  179. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  180. package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
  181. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  182. package/dist/flows/Onboarding/components/PreOnboardingRequirements.d.ts +15 -30
  183. package/dist/flows/Onboarding/components/PreOnboardingRequirements.js +1 -1
  184. package/dist/flows/Onboarding/components/PreviewEmploymentAgreementStep.js +1 -1
  185. package/dist/flows/Onboarding/components/ReviewStep.d.ts +5 -5
  186. package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
  187. package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +5 -5
  188. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  189. package/dist/flows/Onboarding/context.d.ts +8 -5
  190. package/dist/flows/Onboarding/hooks.d.ts +5 -5
  191. package/dist/flows/Onboarding/hooks.js +1 -1
  192. package/dist/flows/Onboarding/index.d.ts +5 -5
  193. package/dist/flows/Onboarding/index.js +1 -1
  194. package/dist/flows/Onboarding/types.d.ts +5 -5
  195. package/dist/flows/Onboarding/utils.d.ts +5 -5
  196. package/dist/flows/PayrollAdminOnboarding/PayrollAdminOnboardingFlow.d.ts +3 -3
  197. package/dist/flows/PayrollAdminOnboarding/PayrollAdminOnboardingFlow.js +1 -1
  198. package/dist/flows/PayrollAdminOnboarding/context.d.ts +3 -3
  199. package/dist/flows/PayrollAdminOnboarding/hooks.d.ts +3 -3
  200. package/dist/flows/PayrollAdminOnboarding/hooks.js +1 -1
  201. package/dist/flows/PayrollAdminOnboarding/index.d.ts +3 -3
  202. package/dist/flows/PayrollAdminOnboarding/index.js +1 -1
  203. package/dist/flows/PayrollAdminOnboarding/types.d.ts +3 -3
  204. package/dist/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.d.ts +3 -3
  205. package/dist/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.js +1 -1
  206. package/dist/flows/PayrollEmployeeOnboarding/context.d.ts +3 -3
  207. package/dist/flows/PayrollEmployeeOnboarding/hooks.d.ts +3 -3
  208. package/dist/flows/PayrollEmployeeOnboarding/hooks.js +1 -1
  209. package/dist/flows/PayrollEmployeeOnboarding/index.d.ts +3 -3
  210. package/dist/flows/PayrollEmployeeOnboarding/index.js +1 -1
  211. package/dist/flows/PayrollEmployeeOnboarding/types.d.ts +3 -3
  212. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -4
  213. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  214. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +4 -4
  215. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  216. package/dist/flows/Termination/PaidTimeOffForm.d.ts +4 -4
  217. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  218. package/dist/flows/Termination/TerminationDetailsForm.d.ts +4 -4
  219. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  220. package/dist/flows/Termination/TerminationFlow.d.ts +4 -4
  221. package/dist/flows/Termination/TerminationFlow.js +1 -1
  222. package/dist/flows/Termination/TerminationForm.d.ts +4 -4
  223. package/dist/flows/Termination/TerminationForm.js +1 -1
  224. package/dist/flows/Termination/api.d.ts +5 -6
  225. package/dist/flows/Termination/api.js +1 -1
  226. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
  227. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +6 -7
  228. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +6 -7
  229. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
  230. package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +6 -7
  231. package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
  232. package/dist/flows/Termination/context.d.ts +4 -4
  233. package/dist/flows/Termination/hooks.d.ts +4 -4
  234. package/dist/flows/Termination/hooks.js +1 -1
  235. package/dist/flows/Termination/index.d.ts +6 -7
  236. package/dist/flows/Termination/index.js +1 -1
  237. package/dist/flows/Termination/json-schemas/schema.d.ts +4 -4
  238. package/dist/flows/Termination/types.d.ts +4 -4
  239. package/dist/flows/Termination/utils.d.ts +4 -4
  240. package/dist/flows/types.d.ts +2 -2
  241. package/dist/flows/utils.d.ts +2 -2
  242. package/dist/index.d.ts +13 -14
  243. package/dist/index.js +2 -2
  244. package/dist/internals.d.ts +3 -3
  245. package/dist/internals.js +1 -1
  246. package/dist/{mutations-DZjKx4tI.d.ts → mutations-m4qazTov.d.ts} +1 -1
  247. package/dist/{remoteFlows-C4Vv3_7t.d.ts → remoteFlows-C2zCZMFB.d.ts} +1 -1
  248. package/dist/{types-BcjbPv3W.d.ts → types-6XtKFWen.d.ts} +14 -4
  249. package/dist/{types-CBE9Gstk.d.ts → types-B9XgAugQ.d.ts} +296 -7
  250. package/dist/{types-DS-m0rPG.d.ts → types-BdAf8qBk.d.ts} +1 -1
  251. package/dist/{types-De7SaR2_.d.ts → types-CS5H5ZXt.d.ts} +3 -3
  252. package/dist/{types-CgDgP-h7.d.ts → types-CXORFHbV.d.ts} +2 -2
  253. package/dist/{types-CTjgSFHY.d.ts → types-MJCCG0Lf.d.ts} +1 -1
  254. package/dist/{types-BydTmx76.d.ts → types-TE7ZVOnO.d.ts} +1 -1
  255. package/dist/{types.gen-CTQ9C-mR.d.ts → types.gen-ByDz5nJy.d.ts} +23 -1
  256. package/dist/{utils-B2zQN-4q.d.ts → utils-D2hJxOb4.d.ts} +1 -1
  257. package/package.json +1 -1
  258. package/dist/CheckboxFieldDefault-H6DFZZRM.js +0 -2
  259. package/dist/CountryFieldDefault-ZPDRAEWF.js +0 -2
  260. package/dist/DatePickerFieldDefault-BSMELDX2.js +0 -2
  261. package/dist/RadioGroupFieldDefault-SGZXCPSL.js +0 -2
  262. package/dist/TextAreaFieldDefault-TTCPVIBZ.js +0 -2
  263. package/dist/chunk-36IU27QH.js +0 -2
  264. package/dist/chunk-36IU27QH.js.map +0 -1
  265. package/dist/chunk-EFC4EDTM.js +0 -2
  266. package/dist/chunk-EFC4EDTM.js.map +0 -1
  267. package/dist/chunk-GZUP2IE6.js.map +0 -1
  268. package/dist/chunk-IZIKQFAC.js +0 -2
  269. package/dist/chunk-IZIKQFAC.js.map +0 -1
  270. package/dist/chunk-LD5KN4ZF.js +0 -2
  271. package/dist/chunk-LD5KN4ZF.js.map +0 -1
  272. /package/dist/{CheckboxFieldDefault-H6DFZZRM.js.map → CheckboxFieldDefault-OBDOMMWQ.js.map} +0 -0
  273. /package/dist/{CountryFieldDefault-ZPDRAEWF.js.map → CountryFieldDefault-NEFHRUUS.js.map} +0 -0
  274. /package/dist/{DatePickerFieldDefault-BSMELDX2.js.map → DatePickerFieldDefault-NYHK6I2G.js.map} +0 -0
  275. /package/dist/{RadioGroupFieldDefault-SGZXCPSL.js.map → RadioGroupFieldDefault-GF4XVARF.js.map} +0 -0
  276. /package/dist/{TextAreaFieldDefault-TTCPVIBZ.js.map → TextAreaFieldDefault-HPEUG5UI.js.map} +0 -0
  277. /package/dist/{chunk-V62JQXIC.js.map → chunk-2PMYCCWO.js.map} +0 -0
  278. /package/dist/{chunk-W7MCRAQ4.js.map → chunk-3D7HWCNX.js.map} +0 -0
  279. /package/dist/{chunk-TOOCSXXQ.js.map → chunk-3PYZQWDY.js.map} +0 -0
  280. /package/dist/{chunk-KN2Q5NOL.js.map → chunk-4WBEA4IY.js.map} +0 -0
  281. /package/dist/{chunk-7FCKRGGD.js.map → chunk-57G3ZAX3.js.map} +0 -0
  282. /package/dist/{chunk-4TNJXIDB.js.map → chunk-6YBDMERC.js.map} +0 -0
  283. /package/dist/{chunk-UOYIAURS.js.map → chunk-7EKNQYS5.js.map} +0 -0
  284. /package/dist/{chunk-YD54NZIX.js.map → chunk-7KMXTQ4C.js.map} +0 -0
  285. /package/dist/{chunk-V5EBEJON.js.map → chunk-7R7AQHV2.js.map} +0 -0
  286. /package/dist/{chunk-W2WHWA5J.js.map → chunk-B3OYZQSP.js.map} +0 -0
  287. /package/dist/{chunk-NG562U46.js.map → chunk-B5KAHNYW.js.map} +0 -0
  288. /package/dist/{chunk-Y34DKDJI.js.map → chunk-BLCINT3L.js.map} +0 -0
  289. /package/dist/{chunk-M5ARBNKW.js.map → chunk-FAJ5I4Q4.js.map} +0 -0
  290. /package/dist/{chunk-AC4MDLIM.js.map → chunk-FEWMPYBF.js.map} +0 -0
  291. /package/dist/{chunk-33VF3QHP.js.map → chunk-FOUXLCEA.js.map} +0 -0
  292. /package/dist/{chunk-VYZOGC65.js.map → chunk-FXJM54I4.js.map} +0 -0
  293. /package/dist/{chunk-6Y5WCCMH.js.map → chunk-GGULUMOP.js.map} +0 -0
  294. /package/dist/{chunk-DNAPYU5I.js.map → chunk-GJV6HJ3D.js.map} +0 -0
  295. /package/dist/{chunk-JSTCIALQ.js.map → chunk-GTU6MTZH.js.map} +0 -0
  296. /package/dist/{chunk-HAACNERA.js.map → chunk-HADEU7QX.js.map} +0 -0
  297. /package/dist/{chunk-54Z4QJ3Q.js.map → chunk-HGIMRQIZ.js.map} +0 -0
  298. /package/dist/{chunk-34U3WJ75.js.map → chunk-HHFDREGB.js.map} +0 -0
  299. /package/dist/{chunk-5DGTMYWR.js.map → chunk-I7JKBQHL.js.map} +0 -0
  300. /package/dist/{chunk-LIPJXO2R.js.map → chunk-INPMEOFL.js.map} +0 -0
  301. /package/dist/{chunk-UEPT6OBL.js.map → chunk-KBUBBK2E.js.map} +0 -0
  302. /package/dist/{chunk-MF3W2PJ7.js.map → chunk-KEYWBQH2.js.map} +0 -0
  303. /package/dist/{chunk-6P536SW2.js.map → chunk-KFFTPU6V.js.map} +0 -0
  304. /package/dist/{chunk-MUXNVLZO.js.map → chunk-KH4DEFZT.js.map} +0 -0
  305. /package/dist/{chunk-ELM6CPRT.js.map → chunk-KRZGFZUS.js.map} +0 -0
  306. /package/dist/{chunk-3YTML5RG.js.map → chunk-MBOKEWSX.js.map} +0 -0
  307. /package/dist/{chunk-R2JJUSD3.js.map → chunk-MQTRTRV6.js.map} +0 -0
  308. /package/dist/{chunk-QIAK5VU7.js.map → chunk-MZXFOY5T.js.map} +0 -0
  309. /package/dist/{chunk-JBQOE3XL.js.map → chunk-MZZFNRW5.js.map} +0 -0
  310. /package/dist/{chunk-PTPNWD53.js.map → chunk-NIDRVYUJ.js.map} +0 -0
  311. /package/dist/{chunk-4VEUIX5E.js.map → chunk-NJNJACVL.js.map} +0 -0
  312. /package/dist/{chunk-QI4MWDJS.js.map → chunk-O3KGCVBO.js.map} +0 -0
  313. /package/dist/{chunk-XNDOPTDJ.js.map → chunk-OKSKBEIR.js.map} +0 -0
  314. /package/dist/{chunk-YYJH3TPJ.js.map → chunk-OVU2VJM6.js.map} +0 -0
  315. /package/dist/{chunk-2Q462FT7.js.map → chunk-P6H7QMKK.js.map} +0 -0
  316. /package/dist/{chunk-ENV2K73V.js.map → chunk-PET4EGTM.js.map} +0 -0
  317. /package/dist/{chunk-DPXSK2UQ.js.map → chunk-PIIWY632.js.map} +0 -0
  318. /package/dist/{chunk-ITDU6XPR.js.map → chunk-PJPYUB2R.js.map} +0 -0
  319. /package/dist/{chunk-PJ6KPGIE.js.map → chunk-PMRAJKJ5.js.map} +0 -0
  320. /package/dist/{chunk-VTWVHO4F.js.map → chunk-QV7CEES3.js.map} +0 -0
  321. /package/dist/{chunk-QZFKUU4A.js.map → chunk-S7DDWZOR.js.map} +0 -0
  322. /package/dist/{chunk-LLHJODMO.js.map → chunk-SHOGXN3C.js.map} +0 -0
  323. /package/dist/{chunk-TBGXSWRX.js.map → chunk-SKQZ6BPK.js.map} +0 -0
  324. /package/dist/{chunk-75XZ4KIX.js.map → chunk-UBBUH2DE.js.map} +0 -0
  325. /package/dist/{chunk-UW3TUDJR.js.map → chunk-UD24LBJ6.js.map} +0 -0
  326. /package/dist/{chunk-W5MWHAAI.js.map → chunk-UELAVKG5.js.map} +0 -0
  327. /package/dist/{chunk-VNHXMVTF.js.map → chunk-UFAQ7CQH.js.map} +0 -0
  328. /package/dist/{chunk-3EYFXA3W.js.map → chunk-VMZQN4WU.js.map} +0 -0
  329. /package/dist/{chunk-WMJP2BO5.js.map → chunk-VV3LCB77.js.map} +0 -0
  330. /package/dist/{chunk-TCFTRE7G.js.map → chunk-W2WMUANF.js.map} +0 -0
  331. /package/dist/{chunk-ODXNPBKO.js.map → chunk-W5QXZPMY.js.map} +0 -0
  332. /package/dist/{chunk-KXQVUSLI.js.map → chunk-WRCHICCJ.js.map} +0 -0
  333. /package/dist/{chunk-YQOONCKH.js.map → chunk-XE6HQVLQ.js.map} +0 -0
  334. /package/dist/{chunk-76VZ4ARW.js.map → chunk-XFQS2BVE.js.map} +0 -0
  335. /package/dist/{chunk-YWJS3RL5.js.map → chunk-XLURXRQT.js.map} +0 -0
  336. /package/dist/{chunk-KY4PEPYW.js.map → chunk-YOFPHSYV.js.map} +0 -0
  337. /package/dist/{chunk-UQMZU7HM.js.map → chunk-YQQHCS4S.js.map} +0 -0
  338. /package/dist/{chunk-XV7SBFS5.js.map → chunk-YXHSALDR.js.map} +0 -0
  339. /package/dist/{chunk-UYGDMJF2.js.map → chunk-ZMQTQ4UQ.js.map} +0 -0
  340. /package/dist/{chunk-DRAQLW6C.js.map → chunk-ZSN43HMP.js.map} +0 -0
  341. /package/dist/{chunk-AXDL47BE.js.map → chunk-ZTNH2YIM.js.map} +0 -0
  342. /package/dist/{chunk-HSVLNS27.js.map → chunk-ZY7RAGEL.js.map} +0 -0
@@ -1,17 +1,18 @@
1
- import { d as EmploymentCreationResponse, e as EmploymentResponse, S as SuccessResponse, U as UnprocessableEntityResponse, T as TooManyRequestsResponse, z as ConflictResponse, B as BadRequestResponse, t as ForbiddenResponse, N as NotFoundResponse, E as Employment$1, F as File, A as EmploymentCreateParams, G as EmploymentEngagementAgreementDetailsParams } from './types.gen-CTQ9C-mR.js';
1
+ import { d as EmploymentCreationResponse, e as EmploymentResponse, S as SuccessResponse, U as UnprocessableEntityResponse, T as TooManyRequestsResponse, v as ConflictResponse, B as BadRequestResponse, F as ForbiddenResponse, N as NotFoundResponse, E as Employment$1, w as File, ab as PreOnboardingDocumentRequirement, a8 as Company, a as UnauthorizedResponse, ac as EmploymentCreateParams, ad as EmploymentFullParams, ae as EmploymentEngagementAgreementDetailsParams, af as UnifiedEmploymentUpsertBenefitOffersRequest, ag as ConvertCurrencyResponse, ah as ConvertCurrencyParams, ai as CreateContractEligibilityParams, aj as CreatePreOnboardingDocumentResponse, ak as FindOrCreatePreOnboardingDocumentParams, f as Signatory, g as ContractorContractDocumentStatus } from './types.gen-ByDz5nJy.js';
2
2
  import * as React$1 from 'react';
3
3
  import { OnboardingBack } from './flows/Onboarding/components/OnboardingBack.js';
4
4
  import { OnboardingInvite } from './flows/Onboarding/components/OnboardingInvite.js';
5
- import { N as NormalizedFieldError, S as SuccessResponse$1, E as ErrorResponse } from './mutations-DZjKx4tI.js';
5
+ import { N as NormalizedFieldError, S as SuccessResponse$1, E as ErrorResponse } from './mutations-m4qazTov.js';
6
6
  import { OnboardingSubmit } from './flows/Onboarding/components/OnboardingSubmit.js';
7
- import { C as Components, J as JSFFields, N as NestedMeta, a as JSFFieldset } from './remoteFlows-C4Vv3_7t.js';
7
+ import { C as Components, J as JSFFields, N as NestedMeta, a as JSFFieldset } from './remoteFlows-C2zCZMFB.js';
8
8
  import * as _tanstack_query_core from '@tanstack/query-core';
9
9
  import { ValidationResult } from '@remoteoss/remote-json-schema-form-kit';
10
10
  import { Step } from './flows/useStepState.js';
11
11
  import { FieldValues } from 'react-hook-form';
12
- import { FlowOptions, JSFModify } from './flows/types.js';
12
+ import { JSONSchemaFormType, FlowOptions, JSONSchemaFormResultWithFieldsets, JSFModify } from './flows/types.js';
13
13
  import { SaveDraftButton } from './flows/Onboarding/components/SaveDraftButton.js';
14
- import { PreOnboardingRequirements } from './flows/Onboarding/components/PreOnboardingRequirements.js';
14
+ import * as _tanstack_react_query from '@tanstack/react-query';
15
+ import { UseQueryResult } from '@tanstack/react-query';
15
16
  import { PreviewEmploymentAgreementStep } from './flows/Onboarding/components/PreviewEmploymentAgreementStep.js';
16
17
 
17
18
  type BasicInformationStepProps = {
@@ -121,6 +122,12 @@ declare const useOnboarding: ({ employmentId, companyId, countryCode, type, opti
121
122
  * Employment id passed useful to be used between components
122
123
  */
123
124
  employmentId: string | undefined;
125
+ /**
126
+ * Onboarding flow options (feature flags)
127
+ */
128
+ options: {
129
+ features: ("onboarding_reserves" | "dynamic_steps" | "ea_preview" | "pre_onboarding_requirements")[] | undefined;
130
+ };
124
131
  /**
125
132
  * Credit risk status of the company, useful to know what to to show in the review step
126
133
  * The possible values are:
@@ -391,6 +398,288 @@ type EngagementAgreementDetailsStepProps = {
391
398
  };
392
399
  declare function EngagementAgreementDetailsStep({ onSubmit, onSuccess, onError, }: EngagementAgreementDetailsStepProps): React$1.JSX.Element;
393
400
 
401
+ declare const useCompany: (companyId: string) => UseQueryResult<NoInfer<Company | undefined>, Error>;
402
+ declare const useBenefitOffers: (employmentId: string | undefined) => UseQueryResult<NoInfer<Record<string, {
403
+ value: string;
404
+ }>>, Error>;
405
+ declare const useEmploymentEngagementAgreementDetails: (employmentId: string | undefined, queryOptions?: {
406
+ enabled?: boolean;
407
+ }) => UseQueryResult<NoInfer<{
408
+ allowances_details?: Array<string> | null;
409
+ available_pto?: number | null;
410
+ break_time_per_day?: number | null;
411
+ business_expenses?: string | null;
412
+ cba?: string | null;
413
+ cba_document?: {
414
+ [key: string]: unknown;
415
+ } | null;
416
+ covenants?: Array<string> | null;
417
+ has_allowances?: string | null;
418
+ has_bonus?: string | null;
419
+ has_business_expenses?: string | null;
420
+ has_business_presence?: string;
421
+ has_cba?: string | null;
422
+ has_commissions?: string | null;
423
+ has_covenants?: string | null;
424
+ has_illness_remuneration?: string | null;
425
+ has_overtime_compensation?: string | null;
426
+ has_pension_scheme?: string | null;
427
+ has_signing_bonus?: string | null;
428
+ has_similar_roles?: string;
429
+ has_similar_work_conditions?: string | null;
430
+ illness_remuneration_details?: string | null;
431
+ max_annual_gross_salary?: number | null;
432
+ min_annual_gross_salary?: number | null;
433
+ overtime_compensation_begins?: number | null;
434
+ overtime_compensation_type?: string | null;
435
+ overtime_pay_percentage?: number | null;
436
+ pension_scheme?: string | null;
437
+ similar_roles?: string | null;
438
+ similar_work_conditions_details?: string | null;
439
+ work_hours_per_week?: number | null;
440
+ working_days?: Array<string> | null;
441
+ }>, Error>;
442
+ /**
443
+ * Use this hook to invite an employee to the onboarding flow
444
+ * @returns
445
+ */
446
+ declare const useEmploymentInvite: () => _tanstack_react_query.UseMutationResult<({
447
+ data: SuccessResponse;
448
+ error: undefined;
449
+ } | {
450
+ data: undefined;
451
+ error: UnprocessableEntityResponse | TooManyRequestsResponse | ConflictResponse | BadRequestResponse;
452
+ }) & {
453
+ request: Request;
454
+ response: Response;
455
+ }, Error, {
456
+ employment_id: string;
457
+ }, unknown>;
458
+ declare const useCreateReserveInvoice: () => _tanstack_react_query.UseMutationResult<({
459
+ data: SuccessResponse;
460
+ error: undefined;
461
+ } | {
462
+ data: undefined;
463
+ error: NotFoundResponse | UnprocessableEntityResponse | UnauthorizedResponse;
464
+ }) & {
465
+ request: Request;
466
+ response: Response;
467
+ }, Error, {
468
+ employment_slug: string;
469
+ }, unknown>;
470
+ /**
471
+ * Use this hook to get the JSON schema form for the onboarding flow
472
+ * @param param0
473
+ * @returns
474
+ */
475
+ declare const useJSONSchemaForm: ({ countryCode, form, fieldValues, options, query, jsonSchemaVersion, }: {
476
+ countryCode: string;
477
+ form: JSONSchemaFormType;
478
+ fieldValues: FieldValues;
479
+ options?: FlowOptions & {
480
+ queryOptions?: {
481
+ enabled?: boolean;
482
+ };
483
+ };
484
+ query?: Record<string, unknown>;
485
+ jsonSchemaVersion?: number | "latest";
486
+ }) => UseQueryResult<JSONSchemaFormResultWithFieldsets>;
487
+ declare const useBenefitOffersSchema: (employmentId: string, fieldValues: FieldValues, options: OnboardingFlowProps["options"]) => UseQueryResult<NoInfer<JSONSchemaFormResultWithFieldsets>, Error>;
488
+ /**
489
+ * Use this hook to create an employment
490
+ * @returns
491
+ */
492
+ declare const useCreateEmployment: (options?: OnboardingFlowProps["options"]) => _tanstack_react_query.UseMutationResult<({
493
+ data: EmploymentCreationResponse;
494
+ error: undefined;
495
+ } | {
496
+ data: undefined;
497
+ error: UnprocessableEntityResponse | TooManyRequestsResponse | ConflictResponse | BadRequestResponse | ForbiddenResponse;
498
+ }) & {
499
+ request: Request;
500
+ response: Response;
501
+ }, Error, EmploymentCreateParams, unknown>;
502
+ declare const useUpdateEmployment: (countryCode: string, options?: OnboardingFlowProps["options"]) => _tanstack_react_query.UseMutationResult<({
503
+ data: EmploymentResponse;
504
+ error: undefined;
505
+ } | {
506
+ data: undefined;
507
+ error: UnprocessableEntityResponse | TooManyRequestsResponse | ConflictResponse | BadRequestResponse | ForbiddenResponse;
508
+ }) & {
509
+ request: Request;
510
+ response: Response;
511
+ }, Error, EmploymentFullParams & {
512
+ employmentId: string;
513
+ }, unknown>;
514
+ declare const useUpdateEmploymentEngagementAgreementDetails: () => _tanstack_react_query.UseMutationResult<({
515
+ data: SuccessResponse;
516
+ error: undefined;
517
+ } | {
518
+ data: undefined;
519
+ error: NotFoundResponse | UnprocessableEntityResponse | TooManyRequestsResponse | ConflictResponse | BadRequestResponse | ForbiddenResponse;
520
+ }) & {
521
+ request: Request;
522
+ response: Response;
523
+ }, Error, EmploymentEngagementAgreementDetailsParams & {
524
+ employmentId: string;
525
+ }, unknown>;
526
+ declare const useUpdateBenefitsOffers: (options?: OnboardingFlowProps["options"]) => _tanstack_react_query.UseMutationResult<({
527
+ data: SuccessResponse;
528
+ error: undefined;
529
+ } | {
530
+ data: undefined;
531
+ error: NotFoundResponse | UnprocessableEntityResponse | UnauthorizedResponse | ForbiddenResponse;
532
+ }) & {
533
+ request: Request;
534
+ response: Response;
535
+ }, Error, UnifiedEmploymentUpsertBenefitOffersRequest & {
536
+ employmentId: string;
537
+ }, unknown>;
538
+ declare const useCountriesSchemaField: (options?: Omit<FlowOptions, "jsonSchemaVersion"> & {
539
+ queryOptions?: {
540
+ enabled?: boolean;
541
+ };
542
+ }) => {
543
+ isLoading: boolean;
544
+ selectCountryForm: JSONSchemaFormResultWithFieldsets;
545
+ countries: NoInfer<{
546
+ label: string;
547
+ value: string;
548
+ employment_agreement_preview_available: boolean | undefined;
549
+ }[]> | undefined;
550
+ };
551
+ declare const useConvertCurrency: ({ type, }: {
552
+ type?: "spread" | "no_spread";
553
+ }) => _tanstack_react_query.UseMutationResult<({
554
+ data: ConvertCurrencyResponse;
555
+ error: undefined;
556
+ } | {
557
+ data: undefined;
558
+ error: NotFoundResponse | UnprocessableEntityResponse | UnauthorizedResponse;
559
+ }) & {
560
+ request: Request;
561
+ response: Response;
562
+ }, Error, ConvertCurrencyParams, unknown>;
563
+ declare const useUpsertContractEligibility: () => _tanstack_react_query.UseMutationResult<({
564
+ data: SuccessResponse;
565
+ error: undefined;
566
+ } | {
567
+ data: undefined;
568
+ error: UnprocessableEntityResponse | TooManyRequestsResponse | BadRequestResponse;
569
+ }) & {
570
+ request: Request;
571
+ response: Response;
572
+ }, Error, {
573
+ employmentId: string;
574
+ } & CreateContractEligibilityParams, unknown>;
575
+ /**
576
+ * Hook to fetch onboarding reserves status for an employment
577
+ * @param companyId - Company ID
578
+ * @param employmentId - Employment ID
579
+ * @param enabled - Whether the query should be enabled
580
+ * @returns Query result with onboarding reserves status
581
+ */
582
+ declare const useEmploymentOnboardingReservesStatus: (companyId: string | undefined, employmentId: string | undefined, enabled?: boolean) => UseQueryResult<"not_started" | "ready" | "in_progress" | "referred" | "fail" | "deposit_required" | "no_deposit_required", Error>;
583
+ declare const useEngagementAgreementDetailsSchema: (countryCode: string, fieldValues: FieldValues, options?: {
584
+ jsfModify?: OnboardingJsfModify;
585
+ queryOptions?: {
586
+ enabled?: boolean;
587
+ };
588
+ }) => UseQueryResult<NoInfer<JSONSchemaFormResultWithFieldsets>, Error>;
589
+ /**
590
+ * Get pre-onboarding requirements for an employment
591
+ */
592
+ declare const useGetPreOnboardingRequirements: (employmentId: string, options?: {
593
+ queryOptions?: {
594
+ enabled?: boolean;
595
+ };
596
+ }) => UseQueryResult<NoInfer<PreOnboardingDocumentRequirement[]>, Error>;
597
+ /**
598
+ * Create a pre-onboarding document
599
+ */
600
+ declare const useCreatePreOnboardingDocument: () => _tanstack_react_query.UseMutationResult<({
601
+ data: CreatePreOnboardingDocumentResponse;
602
+ error: undefined;
603
+ } | {
604
+ data: undefined;
605
+ error: NotFoundResponse | UnprocessableEntityResponse | UnauthorizedResponse | ForbiddenResponse;
606
+ }) & {
607
+ request: Request;
608
+ response: Response;
609
+ }, Error, {
610
+ employmentId: string;
611
+ body: FindOrCreatePreOnboardingDocumentParams;
612
+ }, unknown>;
613
+ /**
614
+ * Get pre-onboarding document preview
615
+ */
616
+ declare const useGetPreOnboardingDocument: (employmentId: string, documentId: string | undefined, options?: {
617
+ queryOptions?: {
618
+ enabled?: boolean;
619
+ };
620
+ }) => UseQueryResult<NoInfer<{
621
+ pre_onboarding_document: {
622
+ content: Blob | File;
623
+ name: string;
624
+ signatories: Array<Signatory>;
625
+ status: ContractorContractDocumentStatus;
626
+ };
627
+ }>, Error>;
628
+ /**
629
+ * Sign a pre-onboarding document
630
+ */
631
+ declare const useSignPreOnboardingDocument: () => _tanstack_react_query.UseMutationResult<({
632
+ data: SuccessResponse;
633
+ error: undefined;
634
+ } | {
635
+ data: undefined;
636
+ error: NotFoundResponse | UnprocessableEntityResponse | BadRequestResponse | UnauthorizedResponse | ForbiddenResponse;
637
+ }) & {
638
+ request: Request;
639
+ response: Response;
640
+ }, Error, {
641
+ employmentId: string;
642
+ documentId: string;
643
+ signature: string;
644
+ }, unknown>;
645
+ /**
646
+ * Get employment agreement preview
647
+ */
648
+ declare const useEmploymentAgreementPreview: (employmentId: string | undefined, options?: {
649
+ queryOptions?: {
650
+ enabled?: boolean;
651
+ };
652
+ }) => UseQueryResult<NoInfer<{
653
+ content: Blob | File;
654
+ name: string;
655
+ }>, Error>;
656
+
657
+ declare const usePreOnboardingRequirements: ({ employmentId, }: {
658
+ employmentId: string;
659
+ options?: Parameters<typeof useGetPreOnboardingRequirements>[1];
660
+ }) => {
661
+ requirements: NoInfer<PreOnboardingDocumentRequirement[]> | undefined;
662
+ isLoadingRequirements: boolean;
663
+ documentPreview: NoInfer<{
664
+ pre_onboarding_document: {
665
+ content: Blob | File;
666
+ name: string;
667
+ signatories: Array<Signatory>;
668
+ status: ContractorContractDocumentStatus;
669
+ };
670
+ }> | undefined;
671
+ isLoadingDocumentPreview: boolean;
672
+ activeRequirementSlug: string | undefined;
673
+ isCreatingDocument: boolean;
674
+ isSigning: boolean;
675
+ onCreateDocument: (requirementSlug: string, constraintsAckAt?: string) => Promise<CreatePreOnboardingDocumentResponse | null | undefined>;
676
+ onSignDocument: (signature: string) => Promise<SuccessResponse | undefined>;
677
+ };
678
+ type PreOnboardingRequirementsBag = ReturnType<typeof usePreOnboardingRequirements>;
679
+ declare const PreOnboardingRequirements: ({ render, }: {
680
+ render: (bag: PreOnboardingRequirementsBag) => React.ReactNode;
681
+ }) => React$1.ReactNode;
682
+
394
683
  type OnboardingRenderProps = {
395
684
  /**
396
685
  * The onboarding bag returned by the useOnboarding hook.
@@ -431,7 +720,7 @@ type OnboardingRenderProps = {
431
720
  PreviewEmploymentAgreementStep: typeof PreviewEmploymentAgreementStep;
432
721
  };
433
722
  };
434
- type OnboardingFeatures = 'onboarding_reserves' | 'dynamic_steps' | 'ea_preview';
723
+ type OnboardingFeatures = 'onboarding_reserves' | 'dynamic_steps' | 'ea_preview' | 'pre_onboarding_requirements';
435
724
  /**
436
725
  * JSON schema version configuration for a specific country
437
726
  */
@@ -575,4 +864,4 @@ type Employment = Employment$1 & {
575
864
  };
576
865
  type CreditRiskState = 'deposit_required' | 'deposit_required_successful' | 'invite' | 'invite_successful' | 'referred' | null;
577
866
 
578
- export { type BenefitsFormPayload as B, type ContractDetailsFormPayload as C, DEFAULT_VERSION as D, type EngagementAgreementDetailsFormPayload as E, type OnboardingRenderProps as O, ReviewStep as R, type SelectCountryFormPayload as S, type BasicInformationFormPayload as a, type SelectCountrySuccess as b, type CreditRiskStatus as c, type Employment as d, type CreditRiskState as e, type OnboardingFlowProps as f, type OnboardingJsfModify as g, type StepKeys as h, SelectCountryStep as i, BasicInformationStep as j, ContractDetailsStep as k, BenefitsStep as l, buildSteps as m, disabledInviteButtonEmploymentStatus as n, getContractDetailsSchemaVersion as o, getBasicInformationSchemaVersion as p, getBenefitOffersSchemaVersion as q, reviewStepAllowedEmploymentStatus as r, EngagementAgreementDetailsStep as s, useOnboarding as u };
867
+ export { useCreateEmployment as A, type BenefitsFormPayload as B, type ContractDetailsFormPayload as C, DEFAULT_VERSION as D, type EngagementAgreementDetailsFormPayload as E, useUpdateEmployment as F, useUpdateEmploymentEngagementAgreementDetails as G, useUpdateBenefitsOffers as H, useCountriesSchemaField as I, useConvertCurrency as J, useUpsertContractEligibility as K, useEmploymentOnboardingReservesStatus as L, useEngagementAgreementDetailsSchema as M, useGetPreOnboardingRequirements as N, type OnboardingRenderProps as O, type PreOnboardingRequirementsBag as P, useCreatePreOnboardingDocument as Q, ReviewStep as R, type SelectCountryFormPayload as S, useGetPreOnboardingDocument as T, useSignPreOnboardingDocument as U, useEmploymentAgreementPreview as V, usePreOnboardingRequirements as W, PreOnboardingRequirements as X, type OnboardingJsfModify as Y, type BasicInformationFormPayload as a, type SelectCountrySuccess as b, type CreditRiskStatus as c, type Employment as d, type CreditRiskState as e, type OnboardingFlowProps as f, type StepKeys as g, SelectCountryStep as h, BasicInformationStep as i, ContractDetailsStep as j, BenefitsStep as k, buildSteps as l, disabledInviteButtonEmploymentStatus as m, getContractDetailsSchemaVersion as n, getBasicInformationSchemaVersion as o, getBenefitOffersSchemaVersion as p, EngagementAgreementDetailsStep as q, reviewStepAllowedEmploymentStatus as r, useCompany as s, useBenefitOffers as t, useOnboarding as u, useEmploymentEngagementAgreementDetails as v, useEmploymentInvite as w, useCreateReserveInvoice as x, useJSONSchemaForm as y, useBenefitOffersSchema as z };
@@ -1,4 +1,4 @@
1
- import { a9 as ListTimeoffResponse, aa as TimeoffStatus, ab as TimeoffType, ac as ListLeavePoliciesSummaryResponse, E as Employment } from './types.gen-CTQ9C-mR.js';
1
+ import { $ as ListTimeoffResponse, a0 as TimeoffStatus, a1 as TimeoffType, a2 as ListLeavePoliciesSummaryResponse, E as Employment } from './types.gen-ByDz5nJy.js';
2
2
  import * as _tanstack_react_query from '@tanstack/react-query';
3
3
  import { UseQueryResult } from '@tanstack/react-query';
4
4
  import { BookedTimeoffBeforeDateResponse, SummaryTimeOffDataResponse } from './flows/Termination/api.js';
@@ -1,8 +1,8 @@
1
- import { w as CompanyResponse, N as NotFoundResponse, U as UnprocessableEntityResponse, T as TooManyRequestsResponse, B as BadRequestResponse, a as UnauthorizedResponse } from './types.gen-CTQ9C-mR.js';
2
- import { F as FieldError, N as NormalizedFieldError } from './mutations-DZjKx4tI.js';
1
+ import { l as CompanyResponse, N as NotFoundResponse, U as UnprocessableEntityResponse, T as TooManyRequestsResponse, B as BadRequestResponse, a as UnauthorizedResponse } from './types.gen-ByDz5nJy.js';
2
+ import { F as FieldError, N as NormalizedFieldError } from './mutations-m4qazTov.js';
3
3
  import * as React$1 from 'react';
4
4
  import { FieldValues } from 'react-hook-form';
5
- import { J as JSFFields, M as Meta, a as JSFFieldset } from './remoteFlows-C4Vv3_7t.js';
5
+ import { J as JSFFields, M as Meta, a as JSFFieldset } from './remoteFlows-C2zCZMFB.js';
6
6
  import { ValidationResult } from '@remoteoss/remote-json-schema-form-kit';
7
7
  import { FlowOptions, JSFModify } from './flows/types.js';
8
8
  import { CreateCompanySubmit } from './flows/CreateCompany/components/CreateCompanySubmit.js';
@@ -1,6 +1,6 @@
1
- import { Q as OffboardingResponse, ai as PayrollCalendarEor, E as Employment, O as TerminationDetailsParams, N as NotFoundResponse, U as UnprocessableEntityResponse, T as TooManyRequestsResponse, B as BadRequestResponse, a as UnauthorizedResponse, R as RequestError } from './types.gen-CTQ9C-mR.js';
1
+ import { O as OffboardingResponse, a9 as PayrollCalendarEor, E as Employment, x as TerminationDetailsParams, N as NotFoundResponse, U as UnprocessableEntityResponse, T as TooManyRequestsResponse, B as BadRequestResponse, a as UnauthorizedResponse, R as RequestError } from './types.gen-ByDz5nJy.js';
2
2
  import * as React$1 from 'react';
3
- import { E as ErrorResponse, S as SuccessResponse } from './mutations-DZjKx4tI.js';
3
+ import { E as ErrorResponse, S as SuccessResponse } from './mutations-m4qazTov.js';
4
4
  import * as _remoteoss_json_schema_form from '@remoteoss/json-schema-form';
5
5
  import * as _remoteoss_json_schema_form_v0_deprecated from '@remoteoss/json-schema-form-v0-deprecated';
6
6
  import { Step } from './flows/useStepState.js';
@@ -1,6 +1,6 @@
1
1
  import { FlowOptions } from './flows/types.js';
2
2
  import * as _tanstack_query_core from '@tanstack/query-core';
3
- import { a7 as Step$1, a8 as SubStep } from './types.gen-CTQ9C-mR.js';
3
+ import { Z as Step$1, _ as SubStep } from './types.gen-ByDz5nJy.js';
4
4
  import * as react_hook_form from 'react-hook-form';
5
5
  import { Step } from './flows/useStepState.js';
6
6
 
@@ -1,7 +1,7 @@
1
1
  import { FlowOptions } from './flows/types.js';
2
2
  import * as _tanstack_query_core from '@tanstack/query-core';
3
3
  import * as React$1 from 'react';
4
- import { a7 as Step$1 } from './types.gen-CTQ9C-mR.js';
4
+ import { Z as Step$1 } from './types.gen-ByDz5nJy.js';
5
5
  import * as react_hook_form from 'react-hook-form';
6
6
  import { Step } from './flows/useStepState.js';
7
7
 
@@ -2453,6 +2453,25 @@ type BadRequestResponse = {
2453
2453
  type UnauthorizedResponse = {
2454
2454
  message: string;
2455
2455
  };
2456
+ /**
2457
+ * CompanyAction
2458
+ *
2459
+ * A pending company-level action (e.g. for Contractor Management Review-step banners).
2460
+ */
2461
+ type CompanyAction = {
2462
+ /**
2463
+ * The legal entity that needs Remote Payments setup. Present only for setup_remote_payments actions.
2464
+ */
2465
+ legal_entity_id?: string | null;
2466
+ /**
2467
+ * Whether the action must be completed.
2468
+ */
2469
+ required: boolean;
2470
+ /**
2471
+ * The action the company still needs to complete.
2472
+ */
2473
+ type: 'verify_company' | 'setup_remote_payments';
2474
+ };
2456
2475
  /**
2457
2476
  * PricingPlanDetails
2458
2477
  *
@@ -3005,6 +3024,9 @@ type FindOrCreatePreOnboardingDocumentParams = {
3005
3024
  * Timestamp when the customer acknowledged the hiring constraints. Required when the requirement has `needs_constraints_ack: true`.
3006
3025
  */
3007
3026
  constraints_ack_at?: string | null;
3027
+ /**
3028
+ * Slug of the pre-onboarding document requirement to fulfil. Obtain this from the `GET .../pre-onboarding-document-requirements` endpoint.
3029
+ */
3008
3030
  pre_onboarding_document_requirement_slug: UuidSlug;
3009
3031
  };
3010
3032
  /**
@@ -3076,4 +3098,4 @@ type PostV1ContractAmendmentsAutomatableErrors = {
3076
3098
  };
3077
3099
  type PostV1ContractAmendmentsAutomatableError = PostV1ContractAmendmentsAutomatableErrors[keyof PostV1ContractAmendmentsAutomatableErrors];
3078
3100
 
3079
- export type { CreateContractDocumentResponse as $, EmploymentCreateParams as A, BadRequestResponse as B, ContractAmendmentAutomatableResponse as C, EmploymentFullParams as D, Employment as E, File as F, EmploymentEngagementAgreementDetailsParams as G, UnifiedEmploymentUpsertBenefitOffersRequest as H, ConvertCurrencyResponse as I, ConvertCurrencyParams as J, CreateContractEligibilityParams as K, FindOrCreatePreOnboardingDocumentParams as L, MinimalRegion as M, NotFoundResponse as N, TerminationDetailsParams as O, PostV1ContractAmendmentsError as P, OffboardingResponse as Q, RequestError as R, SuccessResponse as S, TooManyRequestsResponse as T, UnprocessableEntityResponse as U, ValidationError as V, UploadFileResponse as W, FileParams as X, SignContractDocument as Y, ContractorSubscriptionsSummary as Z, ManageContractorPlusSubscriptionOperationsParams as _, UnauthorizedResponse as a, CreateContractDocument as a0, Country as a1, DateTimeIso8601 as a2, ContractDocumentItem as a3, EligibilityQuestionnaireResponse as a4, ConflictErrorResponse as a5, SubmitEligibilityQuestionnaireRequest as a6, Step as a7, SubStep as a8, ListTimeoffResponse as a9, TimeoffStatus as aa, TimeoffType as ab, ListLeavePoliciesSummaryResponse as ac, CreateOffboardingParams as ad, MagicLinkResponse as ae, MagicLinkParams as af, GetV1EmploymentsEmploymentIdResponse as ag, Currency as ah, PayrollCalendarEor as ai, HelpCenterArticle as aj, ContractAmendmentResponse as b, PostV1ContractAmendmentsAutomatableError as c, EmploymentCreationResponse as d, EmploymentResponse as e, Signatory as f, ContractorContractDocumentStatus as g, CompanyLegalEntity as h, CostCalculatorEstimateResponse as i, CostCalculatorEstimatePdfResponse as j, CostCalculatorEstimateParams as k, CostCalculatorEstimateCsvResponse as l, MinimalCountry as m, EmploymentTermType as n, CostCalculatorEmployment as o, PostV1CostCalculatorEstimationError as p, PreOnboardingDocumentRequirement as q, CreatePreOnboardingDocumentResponse as r, CompanyCreationResponse as s, ForbiddenResponse as t, CompanyCreationConflictErrorResponse as u, CreateCompanyParams as v, CompanyResponse as w, UpdateCompanyParams as x, Company as y, ConflictResponse as z };
3101
+ export type { ListTimeoffResponse as $, SignContractDocument as A, BadRequestResponse as B, ContractAmendmentAutomatableResponse as C, ContractorSubscriptionsSummary as D, Employment as E, ForbiddenResponse as F, ManageContractorPlusSubscriptionOperationsParams as G, CreateContractDocumentResponse as H, CreateContractDocument as I, Country as J, DateTimeIso8601 as K, ContractDocumentItem as L, MinimalRegion as M, NotFoundResponse as N, OffboardingResponse as O, PostV1ContractAmendmentsError as P, EligibilityQuestionnaireResponse as Q, RequestError as R, SuccessResponse as S, TooManyRequestsResponse as T, UnprocessableEntityResponse as U, ValidationError as V, ConflictErrorResponse as W, SubmitEligibilityQuestionnaireRequest as X, CompanyAction as Y, Step as Z, SubStep as _, UnauthorizedResponse as a, TimeoffStatus as a0, TimeoffType as a1, ListLeavePoliciesSummaryResponse as a2, CreateOffboardingParams as a3, MagicLinkResponse as a4, MagicLinkParams as a5, GetV1EmploymentsEmploymentIdResponse as a6, Currency as a7, Company as a8, PayrollCalendarEor as a9, HelpCenterArticle as aa, PreOnboardingDocumentRequirement as ab, EmploymentCreateParams as ac, EmploymentFullParams as ad, EmploymentEngagementAgreementDetailsParams as ae, UnifiedEmploymentUpsertBenefitOffersRequest as af, ConvertCurrencyResponse as ag, ConvertCurrencyParams as ah, CreateContractEligibilityParams as ai, CreatePreOnboardingDocumentResponse as aj, FindOrCreatePreOnboardingDocumentParams as ak, ContractAmendmentResponse as b, PostV1ContractAmendmentsAutomatableError as c, EmploymentCreationResponse as d, EmploymentResponse as e, Signatory as f, ContractorContractDocumentStatus as g, CompanyLegalEntity as h, CompanyCreationResponse as i, CompanyCreationConflictErrorResponse as j, CreateCompanyParams as k, CompanyResponse as l, UpdateCompanyParams as m, CostCalculatorEstimateResponse as n, CostCalculatorEstimatePdfResponse as o, CostCalculatorEstimateParams as p, CostCalculatorEstimateCsvResponse as q, MinimalCountry as r, EmploymentTermType as s, CostCalculatorEmployment as t, PostV1CostCalculatorEstimationError as u, ConflictResponse as v, File as w, TerminationDetailsParams as x, UploadFileResponse as y, FileParams as z };
@@ -1,6 +1,6 @@
1
1
  import { ClassValue } from 'clsx';
2
2
  import { ValidationError } from 'yup';
3
- import './remoteFlows-C4Vv3_7t.js';
3
+ import './remoteFlows-C2zCZMFB.js';
4
4
 
5
5
  declare function cn(...inputs: ClassValue[]): string;
6
6
  type YupError = Pick<ValidationError, 'type' | 'errors'> & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remoteoss/remote-flows",
3
- "version": "1.40.1",
3
+ "version": "1.41.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/remoteoss/remote-flows.git"
@@ -1,2 +0,0 @@
1
- import{a}from"./chunk-KY4PEPYW.js";import"./chunk-QJJZTAG2.js";import"./chunk-LLHJODMO.js";import"./chunk-2Q462FT7.js";import"./chunk-Y3CJRZLA.js";import"./chunk-GZUP2IE6.js";import"./chunk-G2LZFGZA.js";import"./chunk-H2O4CVKF.js";import"./chunk-P37U34EQ.js";export{a as CheckboxFieldDefault};
2
- //# sourceMappingURL=CheckboxFieldDefault-H6DFZZRM.js.map
@@ -1,2 +0,0 @@
1
- import{a}from"./chunk-UOYIAURS.js";import"./chunk-DJIQISA2.js";import"./chunk-3B6BHFDV.js";import"./chunk-MHIY35CK.js";import"./chunk-ZOTY3CAM.js";import"./chunk-LLHJODMO.js";import"./chunk-T5J2Z6ZR.js";import"./chunk-2Q462FT7.js";import"./chunk-Y3CJRZLA.js";import"./chunk-GZUP2IE6.js";import"./chunk-G2LZFGZA.js";import"./chunk-H2O4CVKF.js";import"./chunk-P37U34EQ.js";export{a as CountryFieldDefault};
2
- //# sourceMappingURL=CountryFieldDefault-ZPDRAEWF.js.map
@@ -1,2 +0,0 @@
1
- import{a}from"./chunk-HSVLNS27.js";import"./chunk-3B6BHFDV.js";import"./chunk-LLHJODMO.js";import"./chunk-T5J2Z6ZR.js";import"./chunk-2Q462FT7.js";import"./chunk-Y3CJRZLA.js";import"./chunk-GZUP2IE6.js";import"./chunk-G2LZFGZA.js";import"./chunk-H2O4CVKF.js";import"./chunk-P37U34EQ.js";export{a as DatePickerFieldDefault};
2
- //# sourceMappingURL=DatePickerFieldDefault-BSMELDX2.js.map
@@ -1,2 +0,0 @@
1
- import{a}from"./chunk-MF3W2PJ7.js";import"./chunk-3UBFABDS.js";import"./chunk-ZOTY3CAM.js";import"./chunk-LLHJODMO.js";import"./chunk-2Q462FT7.js";import"./chunk-Y3CJRZLA.js";import"./chunk-GZUP2IE6.js";import"./chunk-G2LZFGZA.js";import"./chunk-H2O4CVKF.js";import"./chunk-P37U34EQ.js";export{a as RadioGroupFieldDefault};
2
- //# sourceMappingURL=RadioGroupFieldDefault-SGZXCPSL.js.map
@@ -1,2 +0,0 @@
1
- import{a}from"./chunk-ITDU6XPR.js";import"./chunk-LLHJODMO.js";import"./chunk-2Q462FT7.js";import"./chunk-Y3CJRZLA.js";import"./chunk-GZUP2IE6.js";import"./chunk-G2LZFGZA.js";import"./chunk-H2O4CVKF.js";import"./chunk-P37U34EQ.js";export{a as TextAreaFieldDefault};
2
- //# sourceMappingURL=TextAreaFieldDefault-TTCPVIBZ.js.map
@@ -1,2 +0,0 @@
1
- import{a as Yt,b as re,c as oe,d as ae,e as se,f as ce,g as le,i as ue,j as de,k as pe,l as me,m as fe,n as ye,o as _e,p as ge,q as be,r as Se,s as Ce,t as we,u as ve}from"./chunk-IZIKQFAC.js";import{a as he,b as Pe,c as Ee}from"./chunk-UQMZU7HM.js";import{a as Zt,b as te,f as ee,g as ne,h as ie}from"./chunk-COAJUZSE.js";import{a as $,b as at,c as m,d as zt,g as Xt}from"./chunk-PB6UQ4A4.js";import{a as Wt}from"./chunk-PJ6KPGIE.js";import{f as Kt,h as Gt,i as Ht}from"./chunk-UYGDMJF2.js";import{Q as Ut}from"./chunk-GZUP2IE6.js";import{a as Nt,b as w,d as Qt,h as _,i as k,u as V,v}from"./chunk-G2LZFGZA.js";import{a as $t}from"./chunk-JDIKYCN6.js";import{e as Jt}from"./chunk-H2O4CVKF.js";import{a as d}from"./chunk-P37U34EQ.js";import{useEffect as A,useMemo as a,useRef as Me,useState as R}from"react";import Ve from"lodash.omit";import{useQuery as Pn}from"@tanstack/react-query";var En=d(()=>{let{client:T}=Jt(),{data:q}=re(),u=oe(q)?q?.company?.id??"":"";return Pn({queryKey:["legal-entities",u],queryFn:d(()=>Ut({client:T,path:{company_id:u},query:{page_size:100}}),"queryFn"),select:d(z=>z.data?.data?.legal_entities,"select"),enabled:!!u})},"useLegalEntities"),Fe=d(()=>{let{data:T}=En();return T?.find(q=>q.is_default)},"useDefaultLegalEntity");var Fn={select_country:null,basic_information:"employment_basic_information",contract_details:null,eligibility_questionnaire:null,pricing_plan:null,contract_preview:null,review:null},Mn={employment_basic_information:"basic_information"},ii=d(({countryCode:T,externalId:q,employmentId:u,skipSteps:z,options:f,initialValues:p})=>{let Oe=f?.excludeProducts||[],_t=Me(f?.onContractReviewed);A(()=>{_t.current=f?.onContractReviewed},[f?.onContractReviewed]);let[l,gt]=R(T||null),[r,De]=R(u),[g,bt]=R(void 0),X=Me({select_country:{},basic_information:{},contract_details:{},contract_preview:{},pricing_plan:{},eligibility_questionnaire:{}}),[Y,Ie]=R(void 0),[St,Z]=R(!1),[Ct,ke]=R(!0),[st,wt]=R(null),{steps:Ae,stepsArray:Re}=a(()=>Zt({includeSelectCountry:!z?.includes("select_country"),includeEligibilityQuestionnaire:St,includeContractPreview:Ct}),[St,Ct,z]),{fieldValues:c,stepState:e,setFieldValues:vt,previousStep:qe,nextStep:Te,goToStep:L,setStepValues:ht}=$t(Ae);A(()=>{st&&(L(st),wt(null))},[st,L]);let{data:o,isLoading:Le,refetch:Pt}=Wt({employmentId:r,queryParams:{exclude_files:!0}}),je=Fe(),{status:O}=o||{},h=O&&ee.includes(O),xe=O&&!ne.includes(O),Be=a(()=>O&&["invited","initiated"].includes(O)?"invited":"not_invited",[O]),Et=Gt(),Ft=Ht(l,f),ct=de(),Mt=Yt(),{mutateAsync:Vt}=fe(ct,Mt,c),Ot=be(),Dt=Se(),{mutateAsyncOrThrow:Ne}=w(Ft),It=se(),kt=ue(),At=Ce(),{mutateAsyncOrThrow:Qe}=w(Et),{mutateAsyncOrThrow:Je}=w(ct),{mutateAsyncOrThrow:Ue}=w(It),{mutateAsyncOrThrow:Rt}=w(kt),{mutateAsyncOrThrow:Ke}=w(Ot),{mutateAsyncOrThrow:qt}=w(Dt),{mutateAsyncOrThrow:Ge}=w(At);u&&o?.country?.code&&!l&&gt(o.country.code);let{selectCountryForm:j,isLoading:He,countries:Tt}=we({jsfModify:f?.jsfModify?.select_country}),lt=a(()=>Tt?.find(t=>t.value===l),[Tt,l]),We=a(()=>lt?.label,[lt]),$e=e.currentStep.name==="pricing_plan"||!!u&&h,{form:P,isLoading:ze,contractorSubscriptions:tt,filteredContractorSubscriptions:x,refetch:ut,isEligibilityQuestionnaireBlocked:B}=me(r,lt,{jsonSchemaVersion:f?.jsonSchemaVersion,queryOptions:{enabled:$e},excludeProducts:Oe,jsfModify:f?.jsfModify?.pricing_plan}),D=a(()=>!!tt?.find(t=>t.product.identifier===m)?.eligibility_questionnaire?.submitted_at,[tt]);A(()=>{if(D){Z(!1);return}else Z(Y===m)},[D,Y]),A(()=>{let t=o?.contractor_type==="cor";ke(!t)},[o?.contractor_type]);let et=a(()=>tt?.find(t=>t.product.identifier===m)?.eligibility_questionnaire?.responses,[tt]),Xe=Fn[e.currentStep.name]||"contractor_basic_information",Ye=Mn[Xe],Ze=o?.[Ye]||{},tn=d(({form:t,options:i={},query:s={}})=>{let M=Object.keys(c).length>0?{...p,...e.values?.[e.currentStep.name],...c}:{...p,...Ze};return Kt({countryCode:l,form:t,fieldValues:M,query:s,options:{...i,queryOptions:{enabled:i.queryOptions?.enabled??!0}}})},"useJSONSchema"),en=!!(l&&(e.currentStep.name==="basic_information"||u)),nn=!!(l==="GBR"&&u&&e.currentStep.name==="basic_information"),{data:N,isLoading:rn}=ye(u,{enabled:nn}),{data:nt,isLoading:on}=_e(r,{enabled:!!r});A(()=>{nt&&nt.length>0&&!g&&bt(nt[0].id)},[nt,g]);let{data:b,isLoading:an}=tn({form:"contractor_basic_information",options:{jsfModify:Pe(l,We,f),queryOptions:{enabled:en}}}),sn=a(()=>te(o?.basic_information?.provisional_start_date,c?.service_duration?.provisional_start_date),[o?.basic_information?.provisional_start_date,c?.service_duration?.provisional_start_date]),y=a(()=>{let t={standard:$,plus:at,cor:m};if(c.subscription)return c.subscription;let i=e.values?.pricing_plan?.subscription;if(i&&!B)return i;if(D&&!B)return m;if(B&&D)return $;if(x&&x.length>0)return t[o?.contractor_type]||$},[c,e.values,D,o?.contractor_type,B,x]);A(()=>{y&&y!==Y&&Ie(y)},[y,Y]);let cn=a(()=>({...et,...p,...e.values?.eligibility_questionnaire,...c}),[et,p,e.values?.eligibility_questionnaire,c]),ln=a(()=>y===m&&e.currentStep.name==="eligibility_questionnaire"||!!u&&h&&y===m,[y,e.currentStep.name,u,h]),{data:E,isLoading:un}=ge({options:{queryOptions:{enabled:ln},jsfModify:f?.jsfModify?.eligibility_questionnaire},fieldValues:cn}),dn=!!(l&&e.currentStep.name==="contract_details"||h),{data:S,isLoading:pn}=ve({countryCode:l,fieldValues:c,employmentId:r,options:{queryOptions:{enabled:dn},jsfModify:he(f?.jsfModify?.contract_details,sn,y,c,y===m)}}),mn=a(()=>e.currentStep.name==="contract_preview"||!!u&&h,[e.currentStep.name,u,h]),{data:F}=ae({fieldValues:c,options:{queryOptions:{enabled:mn},jsfModify:Ee(f,c)}}),{data:dt,isLoading:fn,refetch:yn}=ce({employmentId:r,contractDocumentId:g,options:{queryOptions:{enabled:!!g}}}),{hasCompanySignedContract:_n}=le({employmentId:r,contractDocumentId:g,options:{queryOptions:{enabled:!!g}}}),n=a(()=>({select_country:j?.fields||[],basic_information:b?.fields||[],pricing_plan:P?.fields||[],eligibility_questionnaire:E?.fields||[],contract_details:S?.fields||[],contract_preview:F?.fields||[],review:[]}),[j?.fields,b?.fields,P?.fields,S?.fields,F?.fields,E?.fields]),gn={select_country:null,basic_information:b?.meta["x-jsf-fieldsets"],pricing_plan:null,contract_details:S?.meta["x-jsf-fieldsets"],eligibility_questionnaire:null,contract_preview:null,review:null},bn={select_country:j?.meta?.["x-jsf-presentation"],basic_information:b?.meta?.["x-jsf-presentation"],pricing_plan:P?.meta?.["x-jsf-presentation"],eligibility_questionnaire:E?.meta?.["x-jsf-presentation"],contract_details:S?.meta?.["x-jsf-presentation"],contract_preview:F?.meta?.["x-jsf-presentation"],review:null},{country:Sn,basic_information:it={},contract_details:Lt={}}=o||{},jt=Sn?.code,Q=a(()=>k(n.select_country,{country:l||jt||""}),[n.select_country,l,jt]),pt=a(()=>N?.content?Qt(N.content,N.name):null,[N?.content,N?.name]),J=a(()=>{let t={...p,...it,ir35:o?.contract_details?.ir_35,nationality_status:o?.contract_details?.nationality,...pt&&{ir35_sds_file:[pt]}};return k(n.basic_information,t)},[p,it,o?.contract_details?.ir_35,o?.contract_details?.nationality,pt,n.basic_information]),U=a(()=>{let i={...{service_duration:{provisional_start_date:it.provisional_start_date}},...p,...Lt};return k(n.contract_details,i)},[n.contract_details,Lt,p,it]),K=a(()=>{let t=dt?.contract_document?.signatories?.find(s=>s.type==="company"),i={...p,signature:t?.signature};return k(n.contract_preview,i)},[n.contract_preview,p,dt]),G=a(()=>{let i={...{subscription:y},...p};return k(n.pricing_plan,i)},[n.pricing_plan,p,y]),H=a(()=>{let t={...p,...et};return k(n.eligibility_questionnaire,t)},[n.eligibility_questionnaire,p,et]),Cn=a(()=>({select_country:Q,basic_information:J,contract_details:U,contract_preview:K,pricing_plan:G,eligibility_questionnaire:H}),[Q,J,U,K,G,H]),mt=!!(u&&h&&e.currentStep.name!=="review"),ft=He||an||Le||pn||ze||fn||rn||on||un,xt=a(()=>{let i=o?.contractor_type==="cor"||n.contract_preview.length>0;return!!(mt&&!ft&&g&&n.basic_information.length>0&&n.contract_details.length>0&&i)},[mt,ft,g,n.basic_information.length,n.contract_details.length,n.contract_preview.length,o?.contractor_type]);A(()=>{xt&&(X.current={select_country:V(Q,n.select_country,{skipMoneyConversion:!0}),basic_information:V(J,n.basic_information,{skipMoneyConversion:!0}),contract_details:V(U,n.contract_details,{skipMoneyConversion:!0}),contract_preview:V(K,n.contract_preview,{skipMoneyConversion:!0}),pricing_plan:V(G,n.pricing_plan,{skipMoneyConversion:!0}),eligibility_questionnaire:V(H,n.eligibility_questionnaire,{skipMoneyConversion:!0})},ht({select_country:Q,basic_information:J,contract_details:U,contract_preview:K,pricing_plan:G,eligibility_questionnaire:H,review:{}}),L("review"))},[xt,L,Q,J,U,ht,n.select_country,n.basic_information,n.contract_details,n.pricing_plan,G,n.contract_preview,K,n.eligibility_questionnaire,H]);let wn=d(t=>{L(t)},"goTo"),Bt=d(async t=>j&&e.currentStep.name==="select_country"?t:b&&e.currentStep.name==="basic_information"?await _(t,b?.fields,{isPartialValidation:!1}):S&&e.currentStep.name==="contract_details"?await _(t,S?.fields,{isPartialValidation:!1}):F&&e.currentStep.name==="contract_preview"?await _(t,F?.fields,{isPartialValidation:!1}):P&&e.currentStep.name==="pricing_plan"?await _(t,P?.fields,{isPartialValidation:!1}):E&&e.currentStep.name==="eligibility_questionnaire"?await _(t,E?.fields,{isPartialValidation:!1}):{},"parseFormValues"),vn=d(t=>{if(!Nt(t))return null;let i=t.normalizedErrors.services_and_deliverables,s=Array.isArray(i)?i[0]:i;return s?.source===Xt?{error:s.error,source:s.source,skippable:s.skippable}:null},"extractAiValidationError");async function hn(t){let i=e.currentStep.name,s=await Bt(t);switch(i in X.current&&(X.current[i]=V(s,n[i])),e.currentStep.name){case"select_country":return gt(s.country),Promise.resolve({data:{countryCode:s.country}});case"basic_information":{let I=!r&&l,M=r&&l&&o?.country&&o?.country.code!==l;if(I||M){let yt={basic_information:Ve(s,"nationality_status","ir35","ir35_sds_file"),type:"contractor",country_code:l,external_id:q},ot=await Qe(yt),C=ot?.data?.employment?.id;if(!C)throw v("Employment ID not found");return await Vt({employmentId:C}),De(C),ot}else if(r){let rt=Ve(s,"nationality_status","ir35","ir35_sds_file");return await Vt({employmentId:r}),Ne({employmentId:r,basic_information:rt})}return}case"contract_details":{let{services_and_deliverables_ai_warning:I,services_and_deliverables_error_skippable:M,...rt}=s,yt=c.services_and_deliverables_error_skippable===!0,ot={contract_document:rt,skip_ai_checks:yt};try{let C=await Je({employmentId:r,payload:ot}),W=C?.data?.contract_document?.id;if(!W)throw v("Contract document ID not found");return bt(W),C}catch(C){let W=vn(C);throw W&&vt({...t,services_and_deliverables_ai_warning:ie(y===m),services_and_deliverables_error_skippable:W.skippable}),C}}case"contract_preview":{if(_n)return Promise.resolve({data:{contract_document:{id:g}}});let I=await Ue({employmentId:r,contractDocumentId:g,payload:{signature:s.signature}});return await yn(),I}case"pricing_plan":{if(t.subscription===zt)return Promise.resolve({data:{subscription:t.subscription}});if(x.length===0)throw v("No available subscriptions.");if(!t.subscription&&x.length>0)throw v("Please select a subscription plan.");if(B&&[m,at].includes(t.subscription))throw v(`This individual is not eligible for ${pe[t.subscription]}.`);if(D&&t.subscription!==m)try{await Ge({employmentId:r}),await ut()}catch(M){if(M?.response?.status!==404)throw M;await ut()}if(t.subscription==$)return Rt({employmentId:r,payload:{operation:"downgrade"}});if(t.subscription==at)return Rt({employmentId:r,payload:{operation:"upgrade"}});if(t.subscription==m)return D&&o?.contractor_type!=="cor"?qt({employmentId:r}):Promise.resolve({data:{subscription:t.subscription}});throw v("invalid selection")}case"eligibility_questionnaire":try{if((await Ke({employmentId:r,payload:s}))?.data?.is_blocking)throw Z(!1),wt("pricing_plan"),v("This individual is not eligible for Contractor of Record.");return await qt({employmentId:r})}finally{await ut()}default:throw v("Invalid step state")}}return d(hn,"onSubmit"),{isLoading:ft||mt,fieldValues:c,stepState:e,checkFieldUpdates:vt,markContractAsReviewed:d(()=>{_t.current?.()},"markContractAsReviewed"),back:qe,next:d(()=>{r&&Pt(),Te()},"handleNextStep"),goTo:wn,onSubmit:hn,fields:n[e.currentStep.name],meta:{fields:X.current,fieldsets:gn[e.currentStep.name],presentation:bn[e.currentStep.name]},parseFormValues:Bt,canSkipAiValidation:c.services_and_deliverables_error_skippable===!0,handleValidation:d(async t=>{if(e.currentStep.name==="select_country")return j.handleValidation(t);if(b&&e.currentStep.name==="basic_information"){let i=await _(t,b?.fields,{isPartialValidation:!1});return b?.handleValidation(i)}if(S&&e.currentStep.name==="contract_details"){let i=await _(t,S?.fields,{isPartialValidation:!1});return S?.handleValidation(i)}if(F&&e.currentStep.name==="contract_preview"){let i=await _(t,F?.fields,{isPartialValidation:!0});return F?.handleValidation(i)}if(P&&e.currentStep.name==="pricing_plan"){let i=await _(t,P?.fields,{isPartialValidation:!1});return P?.handleValidation(i)}if(E&&e.currentStep.name==="eligibility_questionnaire"){let i=await _(t,E?.fields,{isPartialValidation:!1});return E?.handleValidation(i)}return null},"handleValidation"),initialValues:Cn,employmentId:r,refetchEmployment:Pt,isSubmitting:Et.isPending||Ft.isPending||ct.isPending||It.isPending||kt.isPending||Mt.isPending||Ot.isPending||Dt.isPending||At.isPending,documentPreviewPdf:dt,canInvite:xe,isEmploymentReadOnly:h,invitedStatus:Be,employment:o,defaultLegalEntity:je,steps:Re}},"useContractorOnboarding");export{ii as a};
2
- //# sourceMappingURL=chunk-36IU27QH.js.map