@remoteoss/remote-flows 1.17.0 → 1.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. package/dist/CountryFieldDefault-KSVYDH5T.js +2 -0
  2. package/dist/DatePickerFieldDefault-TZEI446Y.js +2 -0
  3. package/dist/RadioGroupFieldDefault-U44JTO4O.js +2 -0
  4. package/dist/chunk-2IA5ZHU4.js +6 -0
  5. package/dist/chunk-2IA5ZHU4.js.map +1 -0
  6. package/dist/{chunk-WEAO46EO.js → chunk-36MJ5ORQ.js} +2 -2
  7. package/dist/{chunk-LJIJ6UKB.js → chunk-3GYINB3B.js} +2 -2
  8. package/dist/{chunk-MLVB5MYU.js → chunk-545OW3ET.js} +2 -2
  9. package/dist/{chunk-6MAQMAY5.js → chunk-5BBQUGAN.js} +2 -2
  10. package/dist/{chunk-UMVMNUPH.js → chunk-5D4AKL3N.js} +2 -2
  11. package/dist/{chunk-EDLQ3JNY.js → chunk-5L2ELV4L.js} +2 -2
  12. package/dist/{chunk-R7BHA5RA.js → chunk-6P53J6DA.js} +2 -2
  13. package/dist/{chunk-A232PIG7.js → chunk-AK4FXJFO.js} +2 -2
  14. package/dist/{chunk-NAH5PAUK.js → chunk-BCO3C476.js} +2 -2
  15. package/dist/{chunk-VBQVXR4U.js → chunk-C6ND527K.js} +2 -2
  16. package/dist/{chunk-XHAJ544L.js → chunk-CPXEQRNG.js} +2 -2
  17. package/dist/{chunk-B7EJ2OAA.js → chunk-CUANSH3E.js} +2 -2
  18. package/dist/chunk-DAXHNASW.js +2 -0
  19. package/dist/{chunk-3NB2BN46.js.map → chunk-DAXHNASW.js.map} +1 -1
  20. package/dist/{chunk-AJIDQALB.js → chunk-DM5RRWPM.js} +2 -2
  21. package/dist/{chunk-PHPCCABU.js → chunk-EKJK34DS.js} +2 -2
  22. package/dist/{chunk-4HPV2VMI.js → chunk-EQVUP5ZR.js} +2 -2
  23. package/dist/{chunk-OB2J5WSO.js → chunk-FBWPGUBC.js} +2 -2
  24. package/dist/chunk-FHYOWPXB.js +2 -0
  25. package/dist/chunk-FHYOWPXB.js.map +1 -0
  26. package/dist/{chunk-UB6PYKNX.js → chunk-FJ6WBG3H.js} +2 -2
  27. package/dist/{chunk-BG66XH5L.js → chunk-FQHFTFUZ.js} +2 -2
  28. package/dist/chunk-GCBEPX4V.js +2 -0
  29. package/dist/chunk-GCBEPX4V.js.map +1 -0
  30. package/dist/{chunk-O6IBNOQU.js → chunk-GCVM3FO4.js} +2 -2
  31. package/dist/{chunk-B2CNIT3P.js → chunk-GDJP7TMP.js} +2 -2
  32. package/dist/{chunk-W4ECFBIA.js → chunk-I2NE5CCG.js} +2 -2
  33. package/dist/{chunk-ERSP6CZ3.js → chunk-J6HS3UVY.js} +2 -2
  34. package/dist/{chunk-IMVVZZFZ.js → chunk-JPA3IMPE.js} +2 -2
  35. package/dist/{chunk-3474OEAS.js → chunk-K5S6JRYY.js} +2 -2
  36. package/dist/{chunk-HFI3LXZ2.js → chunk-L4P7572F.js} +2 -2
  37. package/dist/{chunk-RYQQDPI7.js → chunk-M53HKCJ5.js} +2 -2
  38. package/dist/{chunk-DFAY4TWC.js → chunk-MCWXQT7A.js} +2 -2
  39. package/dist/{chunk-4UO7KLRK.js → chunk-N3Q636ZK.js} +2 -2
  40. package/dist/{chunk-62O3CKKH.js → chunk-NAGIFFJS.js} +2 -2
  41. package/dist/{chunk-6SSDV2GX.js → chunk-NNW7S5AY.js} +2 -2
  42. package/dist/{chunk-YPUP5LNV.js → chunk-OHCA7HXR.js} +2 -2
  43. package/dist/{chunk-4N4MQECC.js → chunk-OXAEJWEQ.js} +2 -2
  44. package/dist/{chunk-TPGN6QTL.js → chunk-OZKZKV5C.js} +2 -2
  45. package/dist/{chunk-JI4CYPLW.js → chunk-PGVAOMQU.js} +2 -2
  46. package/dist/{chunk-LVXV3GHT.js → chunk-QGGPXNVY.js} +2 -2
  47. package/dist/{chunk-MHAY555P.js → chunk-QI6E2NJU.js} +2 -2
  48. package/dist/{chunk-3B6XXK5H.js → chunk-QNWTCGRD.js} +2 -2
  49. package/dist/{chunk-HOR3KPOZ.js → chunk-SAKDBD4P.js} +2 -2
  50. package/dist/chunk-SD3LBJUH.js +2 -0
  51. package/dist/{chunk-246D2A55.js.map → chunk-SD3LBJUH.js.map} +1 -1
  52. package/dist/{chunk-TAHMDXUS.js → chunk-SJ5IZCJP.js} +2 -2
  53. package/dist/{chunk-SLLDKJ7K.js → chunk-SNRZPCZ7.js} +2 -2
  54. package/dist/{chunk-HYYILYKU.js → chunk-T3GSGHZJ.js} +2 -2
  55. package/dist/{chunk-TPGM3OIU.js → chunk-TMWN4PEK.js} +2 -2
  56. package/dist/{chunk-NMLBGBK2.js → chunk-UPJDLAKU.js} +2 -2
  57. package/dist/{chunk-YOIXPHGR.js → chunk-URJI6IZB.js} +2 -2
  58. package/dist/{chunk-BVFQ6LFD.js → chunk-V6LOIP27.js} +2 -2
  59. package/dist/{chunk-7WGZGAQY.js → chunk-V74BLD3D.js} +2 -2
  60. package/dist/{chunk-FERWQW33.js → chunk-VKE3F6V7.js} +2 -2
  61. package/dist/{chunk-YWZHBXEI.js → chunk-WH6BDFVD.js} +2 -2
  62. package/dist/{chunk-37RMY44V.js → chunk-WOH5UQMK.js} +2 -2
  63. package/dist/chunk-WUFJP4GG.js +2 -0
  64. package/dist/chunk-WUFJP4GG.js.map +1 -0
  65. package/dist/{chunk-BGRX3DBF.js → chunk-X6ZOK7H5.js} +2 -2
  66. package/dist/{chunk-CARPUKT7.js → chunk-XFDNQDDA.js} +2 -2
  67. package/dist/{chunk-G6QGYKPO.js → chunk-XFGSO4WQ.js} +2 -2
  68. package/dist/chunk-XOK42FJS.js +2 -0
  69. package/dist/chunk-XOK42FJS.js.map +1 -0
  70. package/dist/{chunk-NEKE5PRJ.js → chunk-YRC6EEM3.js} +2 -2
  71. package/dist/{chunk-4EMAROPQ.js → chunk-ZTKZWB7I.js} +2 -2
  72. package/dist/chunk-ZVUQDK2E.js +2 -0
  73. package/dist/default-components.d.ts +2 -2
  74. package/dist/default-components.js +1 -1
  75. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
  76. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +3 -3
  77. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  78. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
  79. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  80. package/dist/flows/ContractAmendment/context.d.ts +3 -3
  81. package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
  82. package/dist/flows/ContractAmendment/hooks.js +1 -1
  83. package/dist/flows/ContractAmendment/index.d.ts +3 -3
  84. package/dist/flows/ContractAmendment/index.js +1 -1
  85. package/dist/flows/ContractAmendment/types.d.ts +2 -2
  86. package/dist/flows/ContractAmendment/utils.d.ts +2 -2
  87. package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +5 -5
  88. package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
  89. package/dist/flows/ContractorOnboarding/api.d.ts +3 -2
  90. package/dist/flows/ContractorOnboarding/api.js +1 -1
  91. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
  92. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
  93. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +5 -5
  94. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
  95. package/dist/flows/ContractorOnboarding/components/ContractPreviewHeader.d.ts +2 -2
  96. package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.d.ts +2 -2
  97. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +5 -5
  98. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
  99. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +5 -5
  100. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
  101. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.d.ts +5 -5
  102. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.js +1 -1
  103. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
  104. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
  105. package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +5 -5
  106. package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
  107. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
  108. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
  109. package/dist/flows/ContractorOnboarding/context.d.ts +6 -5
  110. package/dist/flows/ContractorOnboarding/hooks.d.ts +5 -5
  111. package/dist/flows/ContractorOnboarding/hooks.js +1 -1
  112. package/dist/flows/ContractorOnboarding/index.d.ts +5 -5
  113. package/dist/flows/ContractorOnboarding/index.js +1 -1
  114. package/dist/flows/ContractorOnboarding/jsfModify.d.ts +5 -5
  115. package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
  116. package/dist/flows/ContractorOnboarding/types.d.ts +5 -5
  117. package/dist/flows/ContractorOnboarding/utils.d.ts +4 -4
  118. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
  119. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  120. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
  121. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  122. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +2 -2
  123. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  124. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +2 -2
  125. package/dist/flows/CostCalculator/api.d.ts +2 -2
  126. package/dist/flows/CostCalculator/api.js +1 -1
  127. package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
  128. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  129. package/dist/flows/CostCalculator/context.d.ts +3 -3
  130. package/dist/flows/CostCalculator/hooks.d.ts +3 -3
  131. package/dist/flows/CostCalculator/hooks.js +1 -1
  132. package/dist/flows/CostCalculator/index.d.ts +3 -3
  133. package/dist/flows/CostCalculator/index.js +1 -1
  134. package/dist/flows/CostCalculator/types.d.ts +2 -2
  135. package/dist/flows/CostCalculator/utils.d.ts +3 -3
  136. package/dist/flows/CostCalculator/utils.js +1 -1
  137. package/dist/flows/CreateCompany/CreateCompany.d.ts +4 -4
  138. package/dist/flows/CreateCompany/CreateCompany.js +1 -1
  139. package/dist/flows/CreateCompany/api.d.ts +2 -2
  140. package/dist/flows/CreateCompany/api.js +1 -1
  141. package/dist/flows/CreateCompany/components/AddressDetailsStep.d.ts +4 -4
  142. package/dist/flows/CreateCompany/components/AddressDetailsStep.js +1 -1
  143. package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.d.ts +4 -4
  144. package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.js +1 -1
  145. package/dist/flows/CreateCompany/components/CreateCompanyForm.d.ts +2 -2
  146. package/dist/flows/CreateCompany/components/CreateCompanyForm.js +1 -1
  147. package/dist/flows/CreateCompany/context.d.ts +4 -4
  148. package/dist/flows/CreateCompany/hooks.d.ts +4 -4
  149. package/dist/flows/CreateCompany/hooks.js +1 -1
  150. package/dist/flows/CreateCompany/index.d.ts +4 -4
  151. package/dist/flows/CreateCompany/index.js +1 -1
  152. package/dist/flows/CreateCompany/types.d.ts +4 -4
  153. package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
  154. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  155. package/dist/flows/Onboarding/api.d.ts +13 -5
  156. package/dist/flows/Onboarding/api.js +1 -1
  157. package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
  158. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  159. package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +4 -4
  160. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  161. package/dist/flows/Onboarding/components/BenefitsStep.d.ts +4 -4
  162. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  163. package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +4 -4
  164. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  165. package/dist/flows/Onboarding/components/OnboardingForm.d.ts +4 -4
  166. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  167. package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
  168. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  169. package/dist/flows/Onboarding/components/ReviewStep.d.ts +4 -4
  170. package/dist/flows/Onboarding/components/ReviewStep.js +1 -1
  171. package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
  172. package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +4 -4
  173. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  174. package/dist/flows/Onboarding/context.d.ts +5 -4
  175. package/dist/flows/Onboarding/hooks.d.ts +4 -4
  176. package/dist/flows/Onboarding/hooks.js +1 -1
  177. package/dist/flows/Onboarding/index.d.ts +4 -4
  178. package/dist/flows/Onboarding/index.js +1 -1
  179. package/dist/flows/Onboarding/types.d.ts +4 -4
  180. package/dist/flows/Onboarding/utils.d.ts +4 -4
  181. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -4
  182. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  183. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +4 -4
  184. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  185. package/dist/flows/Termination/PaidTimeOffForm.d.ts +4 -4
  186. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  187. package/dist/flows/Termination/TerminationDetailsForm.d.ts +4 -4
  188. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  189. package/dist/flows/Termination/TerminationFlow.d.ts +4 -4
  190. package/dist/flows/Termination/TerminationFlow.js +1 -1
  191. package/dist/flows/Termination/TerminationForm.d.ts +4 -4
  192. package/dist/flows/Termination/TerminationForm.js +1 -1
  193. package/dist/flows/Termination/api.d.ts +5 -5
  194. package/dist/flows/Termination/api.js +1 -1
  195. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
  196. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +6 -6
  197. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +6 -6
  198. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
  199. package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +6 -6
  200. package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
  201. package/dist/flows/Termination/context.d.ts +4 -4
  202. package/dist/flows/Termination/hooks.d.ts +4 -4
  203. package/dist/flows/Termination/hooks.js +1 -1
  204. package/dist/flows/Termination/index.d.ts +6 -6
  205. package/dist/flows/Termination/index.js +1 -1
  206. package/dist/flows/Termination/json-schemas/jsonSchema.js +1 -1
  207. package/dist/flows/Termination/json-schemas/schema.d.ts +4 -4
  208. package/dist/flows/Termination/json-schemas/schema.js +1 -1
  209. package/dist/flows/Termination/types.d.ts +4 -4
  210. package/dist/flows/Termination/utils.d.ts +4 -4
  211. package/dist/flows/types.d.ts +2 -2
  212. package/dist/index.css +1 -1
  213. package/dist/index.css.map +1 -1
  214. package/dist/index.d.ts +11 -11
  215. package/dist/index.js +2 -2
  216. package/dist/internals.d.ts +3 -3
  217. package/dist/{mutations-Cqu0sBct.d.ts → mutations-C70g1hf2.d.ts} +1 -1
  218. package/dist/{remoteFlows-Dq_HhlrK.d.ts → remoteFlows-S2ZmIMR3.d.ts} +1 -1
  219. package/dist/styles.css +1 -1
  220. package/dist/styles.css.map +1 -1
  221. package/dist/{types-Cspu8sBY.d.ts → types-Bt3Nvzma.d.ts} +1 -1
  222. package/dist/{types-C4ZurZsm.d.ts → types-DAJZFuKz.d.ts} +5 -4
  223. package/dist/{types-CpquG01D.d.ts → types-DP9U0M1b.d.ts} +3 -3
  224. package/dist/{types-BxDv4R-M.d.ts → types-DXC7D8qf.d.ts} +8 -3
  225. package/dist/{types-6I1B0MOG.d.ts → types-Dq-2OENN.d.ts} +2 -2
  226. package/dist/{types.gen-DOfO2pGp.d.ts → types.gen-BSxAhJ_V.d.ts} +5 -1
  227. package/dist/{utils-DOln70Os.d.ts → utils-BaHnOWNw.d.ts} +1 -1
  228. package/package.json +1 -4
  229. package/dist/CountryFieldDefault-JZDE75HS.js +0 -2
  230. package/dist/DatePickerFieldDefault-LJV4QSEP.js +0 -2
  231. package/dist/RadioGroupFieldDefault-CXY33ONT.js +0 -2
  232. package/dist/chunk-246D2A55.js +0 -2
  233. package/dist/chunk-3NB2BN46.js +0 -2
  234. package/dist/chunk-5FTC6HMG.js +0 -2
  235. package/dist/chunk-5FTC6HMG.js.map +0 -1
  236. package/dist/chunk-7ENB7H4E.js +0 -6
  237. package/dist/chunk-7ENB7H4E.js.map +0 -1
  238. package/dist/chunk-MTYN4AM3.js +0 -2
  239. package/dist/chunk-OENTT2KT.js +0 -2
  240. package/dist/chunk-OENTT2KT.js.map +0 -1
  241. package/dist/chunk-SLD227LM.js +0 -2
  242. package/dist/chunk-SLD227LM.js.map +0 -1
  243. package/dist/chunk-Z7WBY27D.js +0 -2
  244. package/dist/chunk-Z7WBY27D.js.map +0 -1
  245. /package/dist/{CountryFieldDefault-JZDE75HS.js.map → CountryFieldDefault-KSVYDH5T.js.map} +0 -0
  246. /package/dist/{DatePickerFieldDefault-LJV4QSEP.js.map → DatePickerFieldDefault-TZEI446Y.js.map} +0 -0
  247. /package/dist/{RadioGroupFieldDefault-CXY33ONT.js.map → RadioGroupFieldDefault-U44JTO4O.js.map} +0 -0
  248. /package/dist/{chunk-WEAO46EO.js.map → chunk-36MJ5ORQ.js.map} +0 -0
  249. /package/dist/{chunk-LJIJ6UKB.js.map → chunk-3GYINB3B.js.map} +0 -0
  250. /package/dist/{chunk-MLVB5MYU.js.map → chunk-545OW3ET.js.map} +0 -0
  251. /package/dist/{chunk-6MAQMAY5.js.map → chunk-5BBQUGAN.js.map} +0 -0
  252. /package/dist/{chunk-UMVMNUPH.js.map → chunk-5D4AKL3N.js.map} +0 -0
  253. /package/dist/{chunk-EDLQ3JNY.js.map → chunk-5L2ELV4L.js.map} +0 -0
  254. /package/dist/{chunk-R7BHA5RA.js.map → chunk-6P53J6DA.js.map} +0 -0
  255. /package/dist/{chunk-A232PIG7.js.map → chunk-AK4FXJFO.js.map} +0 -0
  256. /package/dist/{chunk-NAH5PAUK.js.map → chunk-BCO3C476.js.map} +0 -0
  257. /package/dist/{chunk-VBQVXR4U.js.map → chunk-C6ND527K.js.map} +0 -0
  258. /package/dist/{chunk-XHAJ544L.js.map → chunk-CPXEQRNG.js.map} +0 -0
  259. /package/dist/{chunk-B7EJ2OAA.js.map → chunk-CUANSH3E.js.map} +0 -0
  260. /package/dist/{chunk-AJIDQALB.js.map → chunk-DM5RRWPM.js.map} +0 -0
  261. /package/dist/{chunk-PHPCCABU.js.map → chunk-EKJK34DS.js.map} +0 -0
  262. /package/dist/{chunk-4HPV2VMI.js.map → chunk-EQVUP5ZR.js.map} +0 -0
  263. /package/dist/{chunk-OB2J5WSO.js.map → chunk-FBWPGUBC.js.map} +0 -0
  264. /package/dist/{chunk-UB6PYKNX.js.map → chunk-FJ6WBG3H.js.map} +0 -0
  265. /package/dist/{chunk-BG66XH5L.js.map → chunk-FQHFTFUZ.js.map} +0 -0
  266. /package/dist/{chunk-O6IBNOQU.js.map → chunk-GCVM3FO4.js.map} +0 -0
  267. /package/dist/{chunk-B2CNIT3P.js.map → chunk-GDJP7TMP.js.map} +0 -0
  268. /package/dist/{chunk-W4ECFBIA.js.map → chunk-I2NE5CCG.js.map} +0 -0
  269. /package/dist/{chunk-ERSP6CZ3.js.map → chunk-J6HS3UVY.js.map} +0 -0
  270. /package/dist/{chunk-IMVVZZFZ.js.map → chunk-JPA3IMPE.js.map} +0 -0
  271. /package/dist/{chunk-3474OEAS.js.map → chunk-K5S6JRYY.js.map} +0 -0
  272. /package/dist/{chunk-HFI3LXZ2.js.map → chunk-L4P7572F.js.map} +0 -0
  273. /package/dist/{chunk-RYQQDPI7.js.map → chunk-M53HKCJ5.js.map} +0 -0
  274. /package/dist/{chunk-DFAY4TWC.js.map → chunk-MCWXQT7A.js.map} +0 -0
  275. /package/dist/{chunk-4UO7KLRK.js.map → chunk-N3Q636ZK.js.map} +0 -0
  276. /package/dist/{chunk-62O3CKKH.js.map → chunk-NAGIFFJS.js.map} +0 -0
  277. /package/dist/{chunk-6SSDV2GX.js.map → chunk-NNW7S5AY.js.map} +0 -0
  278. /package/dist/{chunk-YPUP5LNV.js.map → chunk-OHCA7HXR.js.map} +0 -0
  279. /package/dist/{chunk-4N4MQECC.js.map → chunk-OXAEJWEQ.js.map} +0 -0
  280. /package/dist/{chunk-TPGN6QTL.js.map → chunk-OZKZKV5C.js.map} +0 -0
  281. /package/dist/{chunk-JI4CYPLW.js.map → chunk-PGVAOMQU.js.map} +0 -0
  282. /package/dist/{chunk-LVXV3GHT.js.map → chunk-QGGPXNVY.js.map} +0 -0
  283. /package/dist/{chunk-MHAY555P.js.map → chunk-QI6E2NJU.js.map} +0 -0
  284. /package/dist/{chunk-3B6XXK5H.js.map → chunk-QNWTCGRD.js.map} +0 -0
  285. /package/dist/{chunk-HOR3KPOZ.js.map → chunk-SAKDBD4P.js.map} +0 -0
  286. /package/dist/{chunk-TAHMDXUS.js.map → chunk-SJ5IZCJP.js.map} +0 -0
  287. /package/dist/{chunk-SLLDKJ7K.js.map → chunk-SNRZPCZ7.js.map} +0 -0
  288. /package/dist/{chunk-HYYILYKU.js.map → chunk-T3GSGHZJ.js.map} +0 -0
  289. /package/dist/{chunk-TPGM3OIU.js.map → chunk-TMWN4PEK.js.map} +0 -0
  290. /package/dist/{chunk-NMLBGBK2.js.map → chunk-UPJDLAKU.js.map} +0 -0
  291. /package/dist/{chunk-YOIXPHGR.js.map → chunk-URJI6IZB.js.map} +0 -0
  292. /package/dist/{chunk-BVFQ6LFD.js.map → chunk-V6LOIP27.js.map} +0 -0
  293. /package/dist/{chunk-7WGZGAQY.js.map → chunk-V74BLD3D.js.map} +0 -0
  294. /package/dist/{chunk-FERWQW33.js.map → chunk-VKE3F6V7.js.map} +0 -0
  295. /package/dist/{chunk-YWZHBXEI.js.map → chunk-WH6BDFVD.js.map} +0 -0
  296. /package/dist/{chunk-37RMY44V.js.map → chunk-WOH5UQMK.js.map} +0 -0
  297. /package/dist/{chunk-BGRX3DBF.js.map → chunk-X6ZOK7H5.js.map} +0 -0
  298. /package/dist/{chunk-CARPUKT7.js.map → chunk-XFDNQDDA.js.map} +0 -0
  299. /package/dist/{chunk-G6QGYKPO.js.map → chunk-XFGSO4WQ.js.map} +0 -0
  300. /package/dist/{chunk-NEKE5PRJ.js.map → chunk-YRC6EEM3.js.map} +0 -0
  301. /package/dist/{chunk-4EMAROPQ.js.map → chunk-ZTKZWB7I.js.map} +0 -0
  302. /package/dist/{chunk-MTYN4AM3.js.map → chunk-ZVUQDK2E.js.map} +0 -0
@@ -1,2 +0,0 @@
1
- import{a as H}from"./chunk-AP56UUME.js";import{a as z}from"./chunk-IJCTN52C.js";import{a as N}from"./chunk-WVJDCDGZ.js";import{a as W}from"./chunk-UB6PYKNX.js";import{e as E}from"./chunk-IZGJP7OI.js";import{a as P,b as Y,c as X,d as _,f as q}from"./chunk-LHEF2FN7.js";import{a as b}from"./chunk-EUSCQL4H.js";import{d as x}from"./chunk-T7O3YYOG.js";import{A as v,E as U,M as J,P as K,R as j,T as A,U as G,V,W as k,Z as $,_ as B,f as I,h as M,o as D,q as T,r as L,s as Q}from"./chunk-7ENB7H4E.js";import{g as w}from"./chunk-VIGKOVHP.js";import{a as O}from"./chunk-X6ZAR7ZL.js";import{d as a}from"./chunk-KQPDXXG3.js";import{a as n}from"./chunk-P37U34EQ.js";import{useMemo as be}from"react";import{useMutation as f,useQuery as p}from"@tanstack/react-query";import{useMutation as de,useQuery as Z}from"@tanstack/react-query";var Re=n(()=>{let{client:e}=a();return de({mutationFn:n(t=>j({client:e,body:t,headers:{Authorization:""}}),"mutationFn")})},"useUploadFile"),ee=n(e=>{let{client:t}=a();return Z({queryKey:["download-file",e],queryFn:n(async()=>{let o=await v({client:t,path:{id:e}});if(o.error)throw o.error;return o.data},"queryFn"),select:n(({data:o})=>o?.file,"select"),enabled:!!e})},"useDownloadFile"),te=n((e,t,o)=>{let{client:r}=a();return Z({queryKey:["employment-files",e],queryFn:n(async()=>{let i=await K({client:r,path:{employment_id:e},query:t});if(i.error)throw i.error;return i.data},"queryFn"),...o})},"useEmploymentFiles");import{useQuery as me}from"@tanstack/react-query";import{useQuery as pe}from"@tanstack/react-query";var ne=n(()=>{let{client:e}=a();return pe({queryKey:["identity"],queryFn:n(()=>G({client:e,headers:{Authorization:""}}),"queryFn"),select:n(t=>t.data?.data,"select")})},"useIdentity");function ye(e){return e!=null&&"company"in e}n(ye,"hasCompany");var oe=n((e={enabled:!0})=>{let{data:t}=ne(),o=ye(t)?t?.company?.id??"":"",{client:r}=a();return me({queryKey:["pricing-plans",o],queryFn:n(()=>I({client:r,path:{company_id:o}}),"queryFn"),select:n(i=>i.data?.data?.pricing_plans,"select"),enabled:!!e?.enabled&&!!o})},"useCompanyPricingPlans");var fe=n(({employmentId:e,options:t})=>{let{client:o}=a();return p({queryKey:["contractor-currencies",e],queryFn:n(async()=>Q({client:o,path:{employment_id:e},query:{restrict_to_guaranteed_pay_out_currencies:!1}}),"queryFn"),enabled:t?.queryOptions?.enabled,select:n(({data:r})=>r?.data,"select")})},"useContractorCurrencies"),yt=n(({fieldValues:e,options:t})=>p({queryKey:["contract-document-signature",e.review_completed,t?.jsfModify],queryFn:n(async()=>b(z,e,{jsfModify:t?.jsfModify}),"queryFn"),enabled:t?.queryOptions?.enabled}),"useGetContractDocumentSignatureSchema"),bt=n(()=>{let{client:e}=a();return f({mutationFn:n(async({employmentId:t,contractDocumentId:o,payload:r})=>A({client:e,body:r,path:{employment_id:t,contract_document_id:o}}),"mutationFn")})},"useSignContractDocument"),ft=n(({employmentId:e,contractDocumentId:t,options:o})=>{let{client:r}=a();return p({queryKey:["contract-document",e,t],queryFn:n(async()=>T({client:r,path:{employment_id:e,id:t}}),"queryFn"),enabled:o?.queryOptions?.enabled,select:n(({data:i})=>({...i?.data,contract_document:{...i?.data?.contract_document,content:w(i?.data?.contract_document?.content)}}),"select")})},"useGetShowContractDocument"),Ce=n(({employmentId:e,options:t})=>{let{client:o}=a();return p({queryKey:["contractor-subscriptions",e],queryFn:n(async()=>D({client:o,path:{employment_id:e}}),"queryFn"),enabled:t?.queryOptions?.enabled,select:n(({data:r})=>r?.data,"select")})},"useGetContractorSubscriptions"),Ct=n(()=>{let{client:e}=a();return f({mutationFn:n(async({employmentId:t,payload:o})=>k({client:e,body:o,path:{employment_id:t}}),"mutationFn")})},"usePostManageContractorSubscriptions"),gt=n(()=>{let{client:e}=a();return f({mutationFn:n(async({employmentId:t,payload:o})=>J({client:e,body:o,path:{employment_id:t}}),"mutationFn")})},"useCreateContractorContractDocument"),ge=n(({countryCode:e,employmentId:t,fieldValues:o,options:r})=>{let{client:i}=a();return p({queryKey:["contractor-onboarding-details-schema",e,t],retry:!1,queryFn:n(async()=>M({client:i,path:{country_code:e},query:{json_schema_version:1,employment_id:t}}),"queryFn"),enabled:r?.queryOptions?.enabled,select:n(({data:s})=>{let c=s?.data?.schema||{};return b(c,o,r)},"select")})},"useContractorOnboardingDetailsSchema"),Fe={[P]:"Contractor Management",[Y]:"Contractor Management Plus",[X]:"Contractor of Record"},Se=n(e=>{let{data:t,isLoading:o}=oe({enabled:e?.enabled}),r=t?.find(s=>s.product.name==="EOR Monthly");return{eorSubscription:{product:{identifier:_,short_name:"EOR"},currency:r?.price.currency,price:{amount:x(r?.price.amount??0)},features:["Contract between Remote and employee","Remote manages onboarding, payroll, and compliance","Manages taxes, benefits, and time-off tracking","Handles contracts, transfers, and terminations"],description:"Enables hiring in countries without a local entity",label:"Employer of Record",value:_},isLoading:o}},"useEorSubscription"),he=n((e,t,o)=>(E(_,o)&&e.push({label:t.label,value:t.value,description:t.description,meta:{features:t.features,price:{amount:t.price.amount,currencyCode:t.currency?.code??""}},disabled:!1}),e),"addEorToFieldOptions"),Ft=n((e,t,o)=>{let{data:r,isLoading:i,refetch:s}=Ce({employmentId:e,options:{queryOptions:o?.queryOptions}}),c=r?.length===0,u=r?.length===1,l=r?.find(S=>S.product.short_name==="COR")?.eligibility_questionnaire?.is_blocking,d=(u||l===!0||c)&&t?.eor_onboarding,{eorSubscription:C,isLoading:re}=Se({enabled:d}),R=b(H.data.schema,{},o);if(r){let S=R.fields.find(h=>h.name==="subscription");if(S){let h=r.filter(m=>E(m.product.identifier??"",o?.excludeProducts)).map(m=>{let y=m.product,ie=m.price.amount,ae=m.currency.code,se=Fe[y.identifier]??"",ce=y.identifier??"",le=y.description??"",ue={features:y.features??[],price:{amount:x(ie),currencyCode:ae}};return{label:se,value:ce,description:le,meta:ue,disabled:l&&y.identifier!==P}});h.sort((m,y)=>m.label.localeCompare(y.label));let g=[];d&&(he(g,C,o?.excludeProducts),g.length>0&&(g[0].meta={...g[0].meta,groupSeparator:{show:!0}})),S.options=[...h,...g]}}return{isLoading:i||re,form:R,contractorSubscriptions:r,refetch:s,isEligibilityQuestionnaireBlocked:l}},"useContractorSubscriptionSchemaField"),St=n((e,t,o)=>{let{mutateAsyncOrThrow:r}=O(t),{mutateAsyncOrThrow:i}=O(e);return{mutateAsync:n(async({employmentId:s})=>{let{nationality_status:c,ir35:u,ir35_sds_file:F}=o,l={contract_document:{ir_35:u}},d={contract_document:{nationality:c}};return u?(await i({employmentId:s,payload:l}),F?r({employment_id:s,file:F,sub_type:q}):Promise.resolve()):c?i({employmentId:s,payload:d}):Promise.resolve()},"mutateAsync")}},"useUpdateUKandSaudiFields"),ht=n((e,t)=>{let{data:o,isLoading:r}=te(e,{sub_type:q},{...t,select:n(({data:c})=>c?.files?.filter(u=>u.sub_type===q),"select")}),i=o?.[0]?.id,s=ee(i);return{...s,isLoading:r||s.isLoading}},"useGetIR35File"),_t=n((e,t)=>{let{client:o}=a();return p({queryKey:["contract-documents",e],queryFn:n(async()=>L({client:o,path:{employment_id:e}}),"queryFn"),enabled:t?.enabled,select:n(({data:r})=>r?.data?.contract_documents,"select")})},"useGetContractDocuments"),qt=n(({options:e,fieldValues:t})=>{let{client:o}=a();return p({queryKey:["eligibility-questionnaire"],queryFn:n(async()=>{let r=await V({client:o,query:{type:"contractor_of_record",json_schema_version:1}});if(r.error)throw new Error("Failed to fetch eligibility questionnaire");return r.data.data},"queryFn"),select:n(r=>{let i=r?.schema||{};return b(i,t,{jsfModify:e?.jsfModify})},"select"),enabled:e?.queryOptions?.enabled})},"useGetEligibilityQuestionnaire"),Ot=n(()=>{let{client:e}=a();return f({mutationFn:n(async({employmentId:t,payload:o})=>U({client:e,body:{employment_slug:t,responses:o,type:"contractor_of_record"},query:{json_schema_version:1}}),"mutationFn")})},"usePostCreateEligibilityQuestionnaire"),xt=n(()=>{let{client:e}=a();return f({mutationFn:n(async({employmentId:t})=>B({client:e,path:{employment_id:t}}),"mutationFn")})},"usePostManageContractorCorSubscription"),Pt=n(()=>{let{client:e}=a();return f({mutationFn:n(async({employmentId:t})=>$({client:e,path:{employment_id:t}}),"mutationFn")})},"useDeleteContractorCorSubscription"),Et=n(e=>{let{client:t}=a(),{data:o,isLoading:r}=p({...W(t,"contractor-onboarding-countries"),select:n(s=>s.data?.data?.map(c=>({label:c.name,value:c.code,eor_onboarding:c.eor_onboarding,contractor_products_available:c.contractor_products_available}))||[],"select"),enabled:e?.queryOptions?.enabled}),i=b(N.data.schema,{},e);if(o){let s=i.fields.find(c=>c.name==="country");s&&(s.options=o)}return{isLoading:r,selectCountryForm:i,countries:o}},"useCountriesSchemaField"),Rt=n(({countryCode:e,employmentId:t,fieldValues:o,options:r})=>{let i=ge({countryCode:e,employmentId:t,fieldValues:o,options:r}),{data:s,isLoading:c}=fe({employmentId:t,options:{queryOptions:{enabled:r?.queryOptions?.enabled}}}),u=be(()=>!i.data||!s?i.data:{...i.data,fields:i.data.fields.map(l=>l.name!=="payment_terms"?l:{...l,fields:l.fields?.map(d=>d.name!=="compensation_currency_code"?d:{...d,options:s.map(C=>({label:C.code,value:C.code,meta:{source:C.source}}))})})},[i.data,s]);return{...i,data:u,isLoading:i.isLoading||c}},"useContractorOnboardingDetailsSchemaWithCurrencies");export{Re as a,ne as b,ye as c,yt as d,bt as e,ft as f,Ce as g,Ct as h,gt as i,Fe as j,Ft as k,St as l,ht as m,_t as n,qt as o,Ot as p,xt as q,Pt as r,Et as s,Rt as t};
2
- //# sourceMappingURL=chunk-3NB2BN46.js.map
@@ -1,2 +0,0 @@
1
- import{a as De}from"./chunk-MHAY555P.js";import{a as Be}from"./chunk-VAIBLWOY.js";import{b as Ve,c as Pe,f as xe,g as Oe,h as Me,i as we,j as Te,k as Re,m as Le}from"./chunk-SLD227LM.js";import{a as ge,b as Ee,c as Ce,d as Fe,f as he}from"./chunk-STF3NTPS.js";import{a as ve}from"./chunk-JI4CYPLW.js";import{e as C,f as L,h as $}from"./chunk-T7O3YYOG.js";import{h as M}from"./chunk-VIGKOVHP.js";import{a as R}from"./chunk-X6ZAR7ZL.js";import{a as ke}from"./chunk-TSPDJUGG.js";import{a as o}from"./chunk-P37U34EQ.js";import{useCallback as gt,useEffect as Et,useMemo as p,useRef as Ct,useState as Ae}from"react";import Ft from"lodash.mergewith";import{createContext as mt,useContext as ft,useMemo as pt,useCallback as yt,useRef as _t}from"react";import{jsx as St}from"react/jsx-runtime";var qe=mt(void 0);function wt({children:r}){let u=_t({}),c=yt(i=>{u.current={...u.current,...i}},[]),F=pt(()=>({errorContextRef:u,updateContext:c}),[c]);return St(qe.Provider,{value:F,children:r})}o(wt,"ErrorContextProvider");var Je=o(()=>{let r=ft(qe);if(!r)throw new Error("useErrorContext must be used within ErrorContextProvider");return r},"useErrorContext");import{useEffect as je,useMemo as bt}from"react";function Ne(r){let{updateContext:u,errorContextRef:c}=Je();return je(()=>{r&&(c.current=r)},[]),je(()=>()=>{c.current={}},[c]),{...bt(()=>({updateErrorContext:o(i=>{u(i)},"updateErrorContext"),clearErrorContext:o(()=>{c.current={}},"clearErrorContext")}),[]),errorContext:c}}o(Ne,"useErrorReporting");import{jsx as Ie}from"react/jsx-runtime";var ht={employment_basic_information:"basic_information",contract_details:"contract_details"},Vt={select_country:null,basic_information:"employment_basic_information",contract_details:"contract_details",benefits:null,review:null},Pt=o(({isLoadingBasicInformationForm:r,isLoadingContractDetailsForm:u,isLoadingEmployment:c,isLoadingBenefitsOffersSchema:F,isLoadingBenefitOffers:i,isLoadingCompany:N,isLoadingCountries:w,employmentStatus:s,employmentId:v,currentStepName:A,basicInformationFields:I,contractDetailsFields:y})=>{let t=r||u||c||F||i||N||w,k=s&&Ce.includes(s),U=s&&!Fe.includes(s),D=!!(v&&k&&A!=="review"),T=t||D,B=!!(D&&!t&&I.length>0&&y.length>0);return{isLoading:T,isNavigatingToReview:B,isEmploymentReadOnly:k,canInvite:U}},"getLoadingStates"),Qt=o(({employmentId:r,companyId:u,countryCode:c,type:F,options:i,skipSteps:N,externalId:w,initialValues:s})=>{let{updateErrorContext:v}=Ne({flow:"onboarding",metadata:{employmentId:r,companyId:u,isUpdating:!!r}}),A=N?.includes("select_country")?Ee:ge,I=gt(e=>{v({step:e.name})},[v]),{fieldValues:y,stepState:t,setFieldValues:k,previousStep:U,nextStep:D,goToStep:T,setStepValues:B}=ke(A,I),q=Ct({select_country:{},basic_information:{},contract_details:{},benefits:{}}),[d,Ue]=Ae(r),[l,z]=Ae(c||null),{data:m,isLoading:K,refetch:He}=ve({employmentId:d,queryParams:{exclude_files:!0}});r&&m?.country?.code&&!l&&z(m.country.code);let{data:Q,isLoading:Y}=Pe(d),{data:J,isLoading:X,refetch:We}=Ve(u),{selectCountryForm:j,isLoading:Z}=Re({jsfModify:i?.jsfModify?.select_country,queryOptions:{enabled:t.currentStep.name==="select_country"}}),ee=Me(),te=we(l,i),ne=Te(i),oe=Le(),{mutateAsync:Ge}=R(ee),{mutateAsync:re}=R(te),{mutateAsync:$e}=R(ne),{mutateAsync:ze}=R(oe),Ke=Vt[t.currentStep.name]||"employment_basic_information",Qe=ht[Ke],Ye=m?.[Qe]||{},ie=o(({form:e,options:a={},query:f={},jsonSchemaVersion:O})=>{let W=Object.keys(y).length>0?{...s,...t.values?.[t.currentStep.name],...y}:{...s,...Ye};return xe({countryCode:l,form:e,fieldValues:W,query:f,options:{...a,queryOptions:{enabled:a.queryOptions?.enabled??!0}},jsonSchemaVersion:O})},"useJSONSchema"),Xe=!!(l&&(t.currentStep.name==="basic_information"||r)),Ze=!!(l&&(t.currentStep.name==="contract_details"||r)),{data:_,isLoading:ae}=ie({form:"employment_basic_information",options:{jsfModify:i?.jsfModify?.basic_information,queryOptions:{enabled:Xe}},jsonSchemaVersion:1}),h=i?.jsfModify?.contract_details?.fields?.annual_gross_salary,H=h&&typeof h=="object"&&"presentation"in h?h.presentation:void 0,se=i?.jsfModify?.contract_details?.fields?.equity_compensation,et=p(()=>({fields:{annual_gross_salary:{...h,presentation:{annual_gross_salary_conversion_properties:{label:H?.annual_gross_salary_conversion_properties?.label,description:H?.annual_gross_salary_conversion_properties?.description},desiredCurrency:J?.desired_currency,Component:o(e=>Ie(De,{desiredCurrency:J?.desired_currency||"",...e}),"Component")}},equity_compensation:{...se,presentation:{calculateDynamicProperties:o((e,a)=>{let f=e.equity_compensation?.offer_equity_compensation,O=a?.meta?.cost;return{extra:Ie(Be,{offerEquity:f,equityCost:O})}},"calculateDynamicProperties")}}}}),[h,H,J?.desired_currency,se]),tt=he(i,l),{data:S,isLoading:ce}=ie({form:"contract_details",query:{employment_id:d},options:{jsfModify:{...i?.jsfModify?.contract_details,fields:{...i?.jsfModify?.contract_details?.fields,...et.fields}},queryOptions:{enabled:Ze}},jsonSchemaVersion:tt}),{data:g,isLoading:le}=Oe(d,y,i),de=p(()=>{if(t.currentStep.name==="benefits"){let e={...t.values?.[t.currentStep.name],...y};return Ft({},Q,e)}return{}},[t.currentStep.name,Q,t.values,y]),n=p(()=>({select_country:j?.fields||[],basic_information:_?.fields||[],contract_details:S?.fields||[],benefits:g?.fields||[],review:[]}),[j?.fields,_?.fields,S?.fields,g?.fields]),nt={select_country:null,basic_information:_?.meta["x-jsf-fieldsets"],contract_details:S?.meta["x-jsf-fieldsets"],benefits:null,review:null},{country:ot,basic_information:ue={},contract_details:me={},status:fe}=m||{},pe=ot?.code,ye=t.currentStep.name,V=p(()=>L(n.select_country,{country:l||pe||""}),[n.select_country,l,pe]),P=p(()=>{let e={...s,...ue};return L(n.basic_information,e)},[n.basic_information,ue,s]),E=p(()=>{let e={...s,...me};return L(n.contract_details,e)},[n.contract_details,me,s]),x=p(()=>{let e={...s,...de};return L(n.benefits,e)},[n.benefits,de,s]),rt=p(()=>m?{select_country:V,basic_information:$(n.basic_information,P),contract_details:m?.contract_details!==null?$(n.contract_details,E):E,benefits:x}:{select_country:V,basic_information:P,contract_details:E,benefits:x},[V,P,E,x,m,n]),{isLoading:it,isNavigatingToReview:_e,isEmploymentReadOnly:at,canInvite:st}=p(()=>Pt({isLoadingBasicInformationForm:ae,isLoadingContractDetailsForm:ce,isLoadingEmployment:K,isLoadingBenefitsOffersSchema:le,isLoadingBenefitOffers:Y,isLoadingCompany:X,isLoadingCountries:Z,employmentId:r,employmentStatus:fe,basicInformationFields:n.basic_information,contractDetailsFields:n.contract_details,currentStepName:ye}),[ae,ce,K,le,Y,X,Z,r,fe,n.basic_information,n.contract_details,ye]);Et(()=>{_e&&(q.current={select_country:M(V,n.select_country),basic_information:M(P,n.basic_information),contract_details:M(E,n.contract_details),benefits:M(x,n.benefits)},B({select_country:V,basic_information:P,contract_details:E,benefits:x,review:{}}),T("review"))},[P,x,E,T,_e,V,B,n.basic_information,n.benefits,n.contract_details,n.select_country]);let Se=o(async e=>j&&t.currentStep.name==="select_country"?e:_&&t.currentStep.name==="basic_information"?await C(e,_?.fields,{isPartialValidation:!1}):S&&t.currentStep.name==="contract_details"?await C(e,S?.fields,{isPartialValidation:!1}):g&&t.currentStep.name==="benefits"?await C(e,g?.fields,{isPartialValidation:!1}):{},"parseFormValues");async function ct(e){let a=t.currentStep.name;a in q.current&&(q.current[a]=M(e,n[a]));let f=await Se(e);switch(We(),t.currentStep.name){case"select_country":return z(f.country),Promise.resolve({data:{countryCode:f.country}});case"basic_information":{let O=!d&&l,be=d&&l&&m?.country&&m?.country.code!==l;if(O||be){let W={basic_information:f,type:F,country_code:l,external_id:w};try{let b=await Ge(W);if(b.error)return b;if(b.data){let G=b.data?.data?.employment?.id;return G&&(Ue(G),await ze({employmentId:G,eligible_to_work_in_residing_country:"citizen",employer_or_work_restrictions:!1})),b}}catch(b){throw console.error("Error creating onboarding:",b),b}}else if(d)return re({employmentId:d,basic_information:f,pricing_plan_details:{frequency:"monthly"},external_id:w});return}case"contract_details":return re({employmentId:d,external_id:w,...{contract_details:f,pricing_plan_details:{frequency:"monthly"}}});case"benefits":return $e({employmentId:d,...f})}}o(ct,"onSubmit");function lt(){U()}o(lt,"back");function dt(){D()}o(dt,"next");function ut(e){T(e)}return o(ut,"goTo"),{employmentId:d,creditRiskStatus:J?.default_legal_entity_credit_risk_status,fieldValues:y,stepState:t,fields:n[t.currentStep.name],isLoading:it,isSubmitting:ee.isPending||te.isPending||ne.isPending||oe.isPending,initialValues:rt,handleValidation:o(async e=>{if(t.currentStep.name==="select_country")return j.handleValidation(e);if(t.currentStep.name==="benefits"&&g){let a=await C(e,g?.fields,{isPartialValidation:!1});return g?.handleValidation(a)}if(_&&t.currentStep.name==="basic_information"){let a=await C(e,_?.fields,{isPartialValidation:!1});return _?.handleValidation(a)}if(S&&t.currentStep.name==="contract_details"){let a=await C(e,S?.fields,{isPartialValidation:!1});return S?.handleValidation(a)}return null},"handleValidation"),checkFieldUpdates:k,parseFormValues:Se,onSubmit:ct,back:lt,next:dt,goTo:ut,meta:{fields:q.current,fieldsets:nt[t.currentStep.name]},refetchEmployment:He,employment:m,isEmploymentReadOnly:at,canInvite:st}},"useOnboarding");export{qe as a,wt as b,Qt as c};
2
- //# sourceMappingURL=chunk-5FTC6HMG.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/flows/Onboarding/hooks.tsx","../src/components/error-handling/ErrorContext.tsx","../src/components/error-handling/useErrorReporting.ts"],"sourcesContent":["import { ValidationResult } from '@remoteoss/remote-json-schema-form-kit';\nimport {\n Employment,\n EmploymentCreateParams,\n EmploymentFullParams,\n} from '@/src/client';\nimport { JSFFields } from '@/src/types/remoteFlows';\nimport { useStepState, Step } from '@/src/flows/useStepState';\nimport {\n disabledInviteButtonEmploymentStatus,\n getContractDetailsSchemaVersion,\n reviewStepAllowedEmploymentStatus,\n STEPS,\n STEPS_WITHOUT_SELECT_COUNTRY,\n} from '@/src/flows/Onboarding/utils';\nimport { prettifyFormValues } from '@/src/lib/utils';\nimport {\n getInitialValues,\n enableAckFields,\n parseJSFToValidate,\n} from '@/src/components/form/utils';\nimport { mutationToPromise } from '@/src/lib/mutations';\nimport { FieldValues } from 'react-hook-form';\nimport { OnboardingFlowProps } from '@/src/flows/Onboarding/types';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport mergeWith from 'lodash.mergewith';\nimport {\n useBenefitOffers,\n useBenefitOffersSchema,\n useCompany,\n useCountriesSchemaField,\n useCreateEmployment,\n useJSONSchemaForm,\n useUpdateBenefitsOffers,\n useUpdateEmployment,\n useUpsertContractEligibility,\n} from '@/src/flows/Onboarding/api';\nimport { JSFModify, JSONSchemaFormType } from '@/src/flows/types';\nimport { AnnualGrossSalary } from '@/src/flows/Onboarding/components/AnnualGrossSalary';\nimport { $TSFixMe, JSFField, JSFFieldset, Meta } from '@/src/types/remoteFlows';\nimport { EquityPriceDetails } from '@/src/flows/Onboarding/components/EquityPriceDetails';\nimport { useErrorReporting } from '@/src/components/error-handling/useErrorReporting';\nimport { useEmploymentQuery } from '@/src/common/api/employment';\n\ntype OnboardingHookProps = Omit<OnboardingFlowProps, 'render'>;\n\nconst jsonSchemaToEmployment: Partial<\n Record<JSONSchemaFormType, keyof Employment>\n> = {\n employment_basic_information: 'basic_information',\n contract_details: 'contract_details',\n};\n\nconst stepToFormSchemaMap: Record<\n keyof typeof STEPS,\n JSONSchemaFormType | null\n> = {\n select_country: null,\n basic_information: 'employment_basic_information',\n contract_details: 'contract_details',\n benefits: null,\n review: null,\n};\n\nconst getLoadingStates = ({\n isLoadingBasicInformationForm,\n isLoadingContractDetailsForm,\n isLoadingEmployment,\n isLoadingBenefitsOffersSchema,\n isLoadingBenefitOffers,\n isLoadingCompany,\n isLoadingCountries,\n employmentStatus,\n employmentId,\n currentStepName,\n basicInformationFields,\n contractDetailsFields,\n}: {\n isLoadingBasicInformationForm: boolean;\n isLoadingContractDetailsForm: boolean;\n isLoadingEmployment: boolean;\n isLoadingBenefitsOffersSchema: boolean;\n isLoadingBenefitOffers: boolean;\n isLoadingCompany: boolean;\n isLoadingCountries: boolean;\n employmentStatus?: Employment['status'];\n employmentId?: string;\n currentStepName: string;\n basicInformationFields: JSFFields;\n contractDetailsFields: JSFFields;\n}) => {\n const initialLoading =\n isLoadingBasicInformationForm ||\n isLoadingContractDetailsForm ||\n isLoadingEmployment ||\n isLoadingBenefitsOffersSchema ||\n isLoadingBenefitOffers ||\n isLoadingCompany ||\n isLoadingCountries;\n\n const isEmploymentReadOnly =\n employmentStatus &&\n reviewStepAllowedEmploymentStatus.includes(employmentStatus);\n\n const canInvite =\n employmentStatus &&\n !disabledInviteButtonEmploymentStatus.includes(employmentStatus);\n\n const shouldHandleReadOnlyEmployment = Boolean(\n employmentId && isEmploymentReadOnly && currentStepName !== 'review',\n );\n\n const isLoading = initialLoading || shouldHandleReadOnlyEmployment;\n\n const isNavigatingToReview = Boolean(\n shouldHandleReadOnlyEmployment &&\n !initialLoading &&\n basicInformationFields.length > 0 &&\n contractDetailsFields.length > 0,\n );\n\n return {\n isLoading,\n isNavigatingToReview,\n isEmploymentReadOnly,\n canInvite,\n };\n};\n\nexport const useOnboarding = ({\n employmentId,\n companyId,\n countryCode,\n type,\n options,\n skipSteps,\n externalId,\n initialValues: onboardingInitialValues,\n}: OnboardingHookProps) => {\n const { updateErrorContext } = useErrorReporting({\n flow: 'onboarding',\n metadata: {\n employmentId,\n companyId,\n isUpdating: Boolean(employmentId),\n },\n });\n const stepsToUse = skipSteps?.includes('select_country')\n ? STEPS_WITHOUT_SELECT_COUNTRY\n : STEPS;\n\n const onStepChange = useCallback(\n (step: Step<keyof typeof STEPS>) => {\n updateErrorContext({\n step: step.name,\n });\n },\n [updateErrorContext],\n );\n\n const {\n fieldValues,\n stepState,\n setFieldValues,\n previousStep,\n nextStep,\n goToStep,\n setStepValues,\n } = useStepState(\n stepsToUse as Record<keyof typeof STEPS, Step<keyof typeof STEPS>>,\n onStepChange,\n );\n\n const fieldsMetaRef = useRef<{\n select_country: Meta;\n basic_information: Meta;\n contract_details: Meta;\n benefits: Meta;\n }>({\n select_country: {},\n basic_information: {},\n contract_details: {},\n benefits: {},\n });\n const [internalEmploymentId, setInternalEmploymentId] = useState<\n string | undefined\n >(employmentId);\n const [internalCountryCode, setInternalCountryCode] = useState<string | null>(\n countryCode || null,\n );\n const {\n data: employment,\n isLoading: isLoadingEmployment,\n refetch: refetchEmployment,\n } = useEmploymentQuery({\n employmentId: internalEmploymentId as string,\n queryParams: { exclude_files: true },\n });\n\n // if the employment is loaded, country code has not been set yet\n // we set the internal country code with the employment country code\n if (employmentId && employment?.country?.code && !internalCountryCode) {\n setInternalCountryCode(employment.country.code);\n }\n\n const { data: benefitOffers, isLoading: isLoadingBenefitOffers } =\n useBenefitOffers(internalEmploymentId);\n\n const {\n data: company,\n isLoading: isLoadingCompany,\n refetch: refetchCompany,\n } = useCompany(companyId);\n\n const { selectCountryForm, isLoading: isLoadingCountries } =\n useCountriesSchemaField({\n jsfModify: options?.jsfModify?.select_country,\n queryOptions: {\n enabled: stepState.currentStep.name === 'select_country',\n },\n });\n\n const createEmploymentMutation = useCreateEmployment();\n const updateEmploymentMutation = useUpdateEmployment(\n internalCountryCode as string,\n options,\n );\n const updateBenefitsOffersMutation = useUpdateBenefitsOffers(options);\n const updateContractEligibilityMutation = useUpsertContractEligibility();\n const { mutateAsync: createEmploymentMutationAsync } = mutationToPromise(\n createEmploymentMutation,\n );\n const { mutateAsync: updateEmploymentMutationAsync } = mutationToPromise(\n updateEmploymentMutation,\n );\n const { mutateAsync: updateBenefitsOffersMutationAsync } = mutationToPromise(\n updateBenefitsOffersMutation,\n );\n const { mutateAsync: updateContractEligibilityMutationAsync } =\n mutationToPromise(updateContractEligibilityMutation);\n\n const formType =\n stepToFormSchemaMap[stepState.currentStep.name] ||\n 'employment_basic_information';\n const employmentKey = jsonSchemaToEmployment[formType] as keyof Employment;\n const serverEmploymentData = (employment?.[employmentKey] || {}) as Record<\n string,\n unknown\n >;\n\n const useJSONSchema = ({\n form,\n options: jsonSchemaOptions = {},\n query = {},\n jsonSchemaVersion,\n }: {\n form: JSONSchemaFormType;\n options?: {\n jsfModify?: JSFModify;\n queryOptions?: { enabled?: boolean };\n };\n query?: Record<string, string>;\n jsonSchemaVersion?: number | 'latest';\n }) => {\n const hasUserEnteredAnyValues = Object.keys(fieldValues).length > 0;\n // when you write on the fields, the values are stored in the fieldValues state\n // when values are stored in the stepState is when the user has navigated to the step\n // and then we have the values from the server and the onboardingInitialValues that the user can inject,\n const mergedFormValues = hasUserEnteredAnyValues\n ? {\n ...onboardingInitialValues,\n ...stepState.values?.[stepState.currentStep.name], // Restore values for the current step\n ...fieldValues,\n }\n : {\n ...onboardingInitialValues,\n ...serverEmploymentData,\n };\n\n return useJSONSchemaForm({\n countryCode: internalCountryCode as string,\n form: form,\n fieldValues: mergedFormValues,\n query,\n options: {\n ...jsonSchemaOptions,\n queryOptions: {\n enabled: jsonSchemaOptions.queryOptions?.enabled ?? true,\n },\n },\n jsonSchemaVersion,\n });\n };\n\n const isBasicInformationDetailsEnabled = Boolean(\n internalCountryCode &&\n (stepState.currentStep.name === 'basic_information' ||\n Boolean(employmentId)),\n );\n\n const isContractDetailsEnabled = Boolean(\n internalCountryCode &&\n (stepState.currentStep.name === 'contract_details' ||\n Boolean(employmentId)),\n );\n\n const {\n data: basicInformationForm,\n isLoading: isLoadingBasicInformationForm,\n } = useJSONSchema({\n form: 'employment_basic_information',\n options: {\n jsfModify: options?.jsfModify?.basic_information,\n queryOptions: {\n enabled: isBasicInformationDetailsEnabled,\n },\n },\n jsonSchemaVersion: 1,\n });\n\n const annualGrossSalaryField =\n options?.jsfModify?.contract_details?.fields?.annual_gross_salary;\n const annualSalaryFieldPresentation =\n annualGrossSalaryField &&\n typeof annualGrossSalaryField === 'object' &&\n 'presentation' in annualGrossSalaryField\n ? (\n annualGrossSalaryField as {\n presentation?: {\n annual_gross_salary_conversion_properties?: {\n label?: string;\n description?: string;\n };\n };\n }\n ).presentation\n : undefined;\n\n const equityCompensationField =\n options?.jsfModify?.contract_details?.fields?.equity_compensation;\n\n const contractDetailsCustomFields = useMemo(\n () => ({\n fields: {\n annual_gross_salary: {\n ...annualGrossSalaryField,\n presentation: {\n annual_gross_salary_conversion_properties: {\n label:\n annualSalaryFieldPresentation\n ?.annual_gross_salary_conversion_properties?.label,\n description:\n annualSalaryFieldPresentation\n ?.annual_gross_salary_conversion_properties?.description,\n },\n desiredCurrency: company?.desired_currency,\n Component: (props: JSFField & { currency: string }) => {\n return (\n <AnnualGrossSalary\n desiredCurrency={company?.desired_currency || ''}\n {...props}\n />\n );\n },\n },\n },\n equity_compensation: {\n ...equityCompensationField,\n presentation: {\n calculateDynamicProperties: (\n values: FieldValues,\n field: JSFField,\n ) => {\n const offerEquity =\n values.equity_compensation?.offer_equity_compensation;\n const equityCost = field?.meta?.cost;\n\n return {\n extra: (\n <EquityPriceDetails\n offerEquity={offerEquity}\n equityCost={equityCost as $TSFixMe}\n />\n ),\n };\n },\n },\n },\n },\n }),\n [\n annualGrossSalaryField,\n annualSalaryFieldPresentation,\n company?.desired_currency,\n equityCompensationField,\n ],\n );\n\n const effectiveContractDetailsJsonSchemaVersion =\n getContractDetailsSchemaVersion(options, internalCountryCode);\n\n const { data: contractDetailsForm, isLoading: isLoadingContractDetailsForm } =\n useJSONSchema({\n form: 'contract_details',\n query: {\n employment_id: internalEmploymentId as string,\n },\n options: {\n jsfModify: {\n ...options?.jsfModify?.contract_details,\n fields: {\n ...options?.jsfModify?.contract_details?.fields,\n ...contractDetailsCustomFields.fields,\n },\n },\n queryOptions: {\n enabled: isContractDetailsEnabled,\n },\n },\n jsonSchemaVersion: effectiveContractDetailsJsonSchemaVersion,\n });\n\n const {\n data: benefitOffersSchema,\n isLoading: isLoadingBenefitsOffersSchema,\n } = useBenefitOffersSchema(\n internalEmploymentId as string,\n fieldValues,\n options,\n );\n\n const initialValuesBenefitOffers = useMemo(() => {\n if (stepState.currentStep.name === 'benefits') {\n const benefitsFormValues = {\n ...stepState.values?.[stepState.currentStep.name as keyof typeof STEPS], // Restore values for the current step\n ...fieldValues,\n };\n return mergeWith({}, benefitOffers, benefitsFormValues);\n }\n return {};\n }, [\n stepState.currentStep.name,\n benefitOffers,\n stepState.values,\n fieldValues,\n ]);\n\n const stepFields: Record<keyof typeof STEPS, JSFFields> = useMemo(\n () => ({\n select_country: selectCountryForm?.fields || [],\n basic_information: basicInformationForm?.fields || [],\n contract_details: contractDetailsForm?.fields || [],\n benefits: benefitOffersSchema?.fields || [],\n review: [],\n }),\n [\n selectCountryForm?.fields,\n basicInformationForm?.fields,\n contractDetailsForm?.fields,\n benefitOffersSchema?.fields,\n ],\n );\n\n const stepFieldsWithFlatFieldsets: Record<\n keyof typeof STEPS,\n JSFFieldset | null | undefined\n > = {\n select_country: null,\n basic_information: basicInformationForm?.meta['x-jsf-fieldsets'],\n contract_details: contractDetailsForm?.meta['x-jsf-fieldsets'],\n benefits: null,\n review: null,\n };\n\n const {\n country,\n basic_information: employmentBasicInformation = {},\n contract_details: employmentContractDetails = {},\n status: employmentStatus,\n } = employment || {};\n\n const employmentCountryCode = country?.code;\n const currentStepName = stepState.currentStep.name;\n\n const selectCountryInitialValues = useMemo(\n () =>\n getInitialValues(stepFields.select_country, {\n country: internalCountryCode || employmentCountryCode || '',\n }),\n [stepFields.select_country, internalCountryCode, employmentCountryCode],\n );\n\n const basicInformationInitialValues = useMemo(() => {\n const initialValues = {\n ...onboardingInitialValues,\n ...employmentBasicInformation,\n };\n\n return getInitialValues(stepFields.basic_information, initialValues);\n }, [\n stepFields.basic_information,\n employmentBasicInformation,\n onboardingInitialValues,\n ]);\n\n const contractDetailsInitialValues = useMemo(() => {\n const initialValues = {\n ...onboardingInitialValues,\n ...employmentContractDetails,\n };\n\n return getInitialValues(stepFields.contract_details, initialValues);\n }, [\n stepFields.contract_details,\n employmentContractDetails,\n onboardingInitialValues,\n ]);\n\n const benefitsInitialValues = useMemo(() => {\n const initialValues = {\n ...onboardingInitialValues,\n ...initialValuesBenefitOffers,\n };\n\n return getInitialValues(stepFields.benefits, initialValues);\n }, [\n stepFields.benefits,\n initialValuesBenefitOffers,\n onboardingInitialValues,\n ]);\n\n const initialValues = useMemo(() => {\n if (employment) {\n return {\n select_country: selectCountryInitialValues,\n // We don't store ack fields in the db, eg \"ack_start_date_ammendment\" for Argentina, and therefore is not returned in the employment response\n // So when an employmentId exists, it means that the user has already started the onboarding process, and we need to enable the ack fields\n basic_information: enableAckFields(\n stepFields['basic_information'],\n basicInformationInitialValues,\n ),\n contract_details:\n // if contract details is null, it means it has not been filled yet, so we can't enable the ack fields\n employment?.contract_details !== null\n ? enableAckFields(\n stepFields['contract_details'],\n contractDetailsInitialValues,\n )\n : contractDetailsInitialValues,\n benefits: benefitsInitialValues,\n };\n }\n return {\n select_country: selectCountryInitialValues,\n basic_information: basicInformationInitialValues,\n contract_details: contractDetailsInitialValues,\n benefits: benefitsInitialValues,\n };\n }, [\n selectCountryInitialValues,\n basicInformationInitialValues,\n contractDetailsInitialValues,\n benefitsInitialValues,\n employment,\n stepFields,\n ]);\n\n const { isLoading, isNavigatingToReview, isEmploymentReadOnly, canInvite } =\n useMemo(\n () =>\n getLoadingStates({\n isLoadingBasicInformationForm,\n isLoadingContractDetailsForm,\n isLoadingEmployment,\n isLoadingBenefitsOffersSchema,\n isLoadingBenefitOffers,\n isLoadingCompany,\n isLoadingCountries,\n employmentId,\n employmentStatus: employmentStatus,\n basicInformationFields: stepFields.basic_information,\n contractDetailsFields: stepFields.contract_details,\n currentStepName: currentStepName,\n }),\n [\n isLoadingBasicInformationForm,\n isLoadingContractDetailsForm,\n isLoadingEmployment,\n isLoadingBenefitsOffersSchema,\n isLoadingBenefitOffers,\n isLoadingCompany,\n isLoadingCountries,\n employmentId,\n employmentStatus,\n stepFields.basic_information,\n stepFields.contract_details,\n currentStepName,\n ],\n );\n\n useEffect(() => {\n if (isNavigatingToReview) {\n fieldsMetaRef.current = {\n select_country: prettifyFormValues(\n selectCountryInitialValues,\n stepFields.select_country,\n ),\n basic_information: prettifyFormValues(\n basicInformationInitialValues,\n stepFields.basic_information,\n ),\n contract_details: prettifyFormValues(\n contractDetailsInitialValues,\n stepFields.contract_details,\n ),\n benefits: prettifyFormValues(\n benefitsInitialValues,\n stepFields.benefits,\n ),\n };\n\n setStepValues({\n select_country: selectCountryInitialValues,\n basic_information: basicInformationInitialValues,\n contract_details: contractDetailsInitialValues,\n benefits: benefitsInitialValues,\n review: {},\n });\n\n goToStep('review');\n }\n }, [\n basicInformationInitialValues,\n benefitsInitialValues,\n contractDetailsInitialValues,\n goToStep,\n isNavigatingToReview,\n selectCountryInitialValues,\n setStepValues,\n stepFields.basic_information,\n stepFields.benefits,\n stepFields.contract_details,\n stepFields.select_country,\n ]);\n\n const parseFormValues = async (values: FieldValues) => {\n if (selectCountryForm && stepState.currentStep.name === 'select_country') {\n return values;\n }\n if (\n basicInformationForm &&\n stepState.currentStep.name === 'basic_information'\n ) {\n return await parseJSFToValidate(values, basicInformationForm?.fields, {\n isPartialValidation: false,\n });\n }\n\n if (\n contractDetailsForm &&\n stepState.currentStep.name === 'contract_details'\n ) {\n return await parseJSFToValidate(values, contractDetailsForm?.fields, {\n isPartialValidation: false,\n });\n }\n\n if (benefitOffersSchema && stepState.currentStep.name === 'benefits') {\n return await parseJSFToValidate(values, benefitOffersSchema?.fields, {\n isPartialValidation: false,\n });\n }\n\n return {};\n };\n\n async function onSubmit(values: FieldValues) {\n // Prettify values for the current step\n const currentStepName = stepState.currentStep.name;\n if (currentStepName in fieldsMetaRef.current) {\n fieldsMetaRef.current[\n currentStepName as keyof typeof fieldsMetaRef.current\n ] = prettifyFormValues(values, stepFields[currentStepName]);\n }\n\n const parsedValues = await parseFormValues(values);\n refetchCompany();\n switch (stepState.currentStep.name) {\n case 'select_country': {\n setInternalCountryCode(parsedValues.country);\n return Promise.resolve({ data: { countryCode: parsedValues.country } });\n }\n case 'basic_information': {\n const isEmploymentNotLoaded =\n !internalEmploymentId && internalCountryCode;\n const hasChangedCountry =\n internalEmploymentId &&\n internalCountryCode &&\n employment?.country &&\n employment?.country.code !== internalCountryCode;\n if (isEmploymentNotLoaded || hasChangedCountry) {\n const payload: EmploymentCreateParams = {\n basic_information: parsedValues,\n type: type,\n country_code: internalCountryCode,\n external_id: externalId,\n };\n try {\n const response = await createEmploymentMutationAsync(payload);\n\n if (response.error) {\n return response;\n }\n\n if (response.data) {\n // @ts-expect-error the types from the response are not matching\n const employmentId = response.data?.data?.employment?.id;\n if (employmentId) {\n setInternalEmploymentId(employmentId);\n await updateContractEligibilityMutationAsync({\n employmentId: employmentId,\n eligible_to_work_in_residing_country: 'citizen',\n employer_or_work_restrictions: false,\n });\n }\n\n return response;\n }\n } catch (error) {\n console.error('Error creating onboarding:', error);\n throw error;\n }\n } else if (internalEmploymentId) {\n return updateEmploymentMutationAsync({\n employmentId: internalEmploymentId,\n basic_information: parsedValues,\n pricing_plan_details: {\n frequency: 'monthly',\n },\n external_id: externalId,\n });\n }\n\n return;\n }\n case 'contract_details': {\n const payload: EmploymentFullParams = {\n contract_details: parsedValues,\n pricing_plan_details: {\n frequency: 'monthly',\n },\n };\n return updateEmploymentMutationAsync({\n employmentId: internalEmploymentId as string,\n external_id: externalId,\n ...payload,\n });\n }\n\n case 'benefits': {\n return updateBenefitsOffersMutationAsync({\n employmentId: internalEmploymentId as string,\n ...parsedValues,\n });\n }\n }\n return;\n }\n\n function back() {\n previousStep();\n }\n\n function next() {\n nextStep();\n }\n\n function goTo(step: keyof typeof STEPS) {\n goToStep(step);\n }\n\n return {\n /**\n * Employment id passed useful to be used between components\n */\n employmentId: internalEmploymentId,\n\n /**\n * Credit risk status of the company, useful to know what to to show in the review step\n * The possible values are:\n * - not_started\n * - ready\n * - in_progress\n * - referred\n * - fail\n * - deposit_required\n * - no_deposit_required\n */\n\n creditRiskStatus: company?.default_legal_entity_credit_risk_status,\n /**\n * Current state of the form fields for the current step.\n */\n fieldValues,\n /**\n * Current step state containing the current step and total number of steps\n */\n stepState,\n /**\n * Array of form fields from the onboarding schema\n */\n fields: stepFields[stepState.currentStep.name],\n /**\n * Loading state indicating if the onboarding schema is being fetched\n */\n isLoading: isLoading,\n /**\n * Loading state indicating if the onboarding mutation is in progress\n */\n isSubmitting:\n createEmploymentMutation.isPending ||\n updateEmploymentMutation.isPending ||\n updateBenefitsOffersMutation.isPending ||\n updateContractEligibilityMutation.isPending,\n /**\n * Initial form values\n */\n initialValues,\n /**\n * Function to validate form values against the onboarding schema\n * @param values - Form values to validate\n * @returns Validation result or null if no schema is available\n */\n handleValidation: async (\n values: FieldValues,\n ): Promise<ValidationResult | null> => {\n if (stepState.currentStep.name === 'select_country') {\n return selectCountryForm.handleValidation(values);\n }\n if (stepState.currentStep.name === 'benefits' && benefitOffersSchema) {\n const parsedValues = await parseJSFToValidate(\n values,\n benefitOffersSchema?.fields,\n { isPartialValidation: false },\n );\n\n return benefitOffersSchema?.handleValidation(parsedValues);\n }\n if (\n basicInformationForm &&\n stepState.currentStep.name === 'basic_information'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n basicInformationForm?.fields,\n { isPartialValidation: false },\n );\n return basicInformationForm?.handleValidation(parsedValues);\n }\n\n if (\n contractDetailsForm &&\n stepState.currentStep.name === 'contract_details'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n contractDetailsForm?.fields,\n { isPartialValidation: false },\n );\n return contractDetailsForm?.handleValidation(parsedValues);\n }\n\n return null;\n },\n /**\n * Function to update the current form field values\n * @param values - New form values to set\n */\n checkFieldUpdates: setFieldValues,\n\n /**\n * Function to parse form values before submission\n * @param values - Form values to parse\n * @returns Parsed form values\n */\n parseFormValues,\n\n /**\n * Function to handle form submission\n * @param values - Form values to submit\n * @returns Promise resolving to the mutation result\n */\n onSubmit,\n\n /**\n * Function to handle going back to the previous step\n * @returns {void}\n */\n back,\n\n /**\n * Function to handle going to the next step\n * @returns {void}\n */\n next,\n\n /**\n * Function to handle going to a specific step\n * @param step The step to go to.\n * @returns {void}\n */\n goTo,\n\n /**\n * Fields metadata for each step\n */\n meta: {\n fields: fieldsMetaRef.current,\n fieldsets: stepFieldsWithFlatFieldsets[stepState.currentStep.name],\n },\n\n /**\n * Function to refetch the employment data\n * @returns {void}\n */\n refetchEmployment,\n /**\n * Employment data\n */\n employment,\n\n /**\n * let's the user know that the employment cannot be edited, happens when employment.status is invited, created_awaiting_reserve or created_reserve_paid\n * @returns {boolean}\n */\n isEmploymentReadOnly,\n\n /**\n * let's the user know if the company can invite employees\n * @returns {boolean}\n */\n canInvite,\n };\n};\n","import {\n createContext,\n useContext,\n ReactNode,\n useMemo,\n useCallback,\n useRef,\n RefObject,\n} from 'react';\nimport type { ErrorContextData } from './types';\n\nexport type ErrorContextValue = {\n errorContextRef: RefObject<ErrorContextData>;\n updateContext: (updates: Partial<ErrorContextData>) => void;\n};\n\nexport const ErrorContext = createContext<ErrorContextValue | undefined>(\n undefined,\n);\n\nexport function ErrorContextProvider({ children }: { children: ReactNode }) {\n const errorContextRef = useRef<ErrorContextData>({});\n\n const updateContext = useCallback((updates: Partial<ErrorContextData>) => {\n errorContextRef.current = { ...errorContextRef.current, ...updates };\n }, []);\n\n // Memoize the value object to prevent unnecessary re-renders\n // Note: setContext is stable from useState and doesn't need to be in deps\n const value = useMemo(\n () => ({\n errorContextRef,\n updateContext,\n }),\n [updateContext],\n );\n\n return (\n <ErrorContext.Provider value={value}>{children}</ErrorContext.Provider>\n );\n}\n\nexport const useErrorContext = () => {\n const ctx = useContext(ErrorContext);\n if (!ctx) {\n throw new Error('useErrorContext must be used within ErrorContextProvider');\n }\n return ctx;\n};\n","import { useErrorContext } from '@/src/components/error-handling/ErrorContext';\nimport { ErrorContextData } from '@/src/components/error-handling/types';\nimport { useEffect, useMemo } from 'react';\n\nexport function useErrorReporting(initialContext: ErrorContextData) {\n const { updateContext, errorContextRef } = useErrorContext();\n\n // Set initial context on mount\n useEffect(() => {\n if (initialContext) {\n errorContextRef.current = initialContext;\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n // Clear context on unmount\n useEffect(() => {\n return () => {\n errorContextRef.current = {};\n };\n }, [errorContextRef]);\n\n // Note: setContext and updateContext are stable, don't need to be in deps\n const handlers = useMemo(\n () => ({\n updateErrorContext: (updates: Partial<ErrorContextData>) => {\n updateContext(updates);\n },\n\n clearErrorContext: () => {\n errorContextRef.current = {};\n },\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [],\n );\n\n return {\n ...handlers,\n /**\n * @internal For unit testing only - we access the errorContext in the error boundary directly\n * Use updateErrorContext() and clearErrorContext() handlers instead.\n */\n errorContext: errorContextRef,\n };\n}\n"],"mappings":"ogBAwBA,OAAS,eAAAA,GAAa,aAAAC,GAAW,WAAAC,EAAS,UAAAC,GAAQ,YAAAC,OAAgB,QAClE,OAAOC,OAAe,mBCzBtB,OACE,iBAAAC,GACA,cAAAC,GAEA,WAAAC,GACA,eAAAC,G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E,GAA4BvE,EAAU,YAAY,IAAI,CACnE,EAMA,kBAAAe,GAIA,WAAAD,EAMA,qBAAAtC,GAMA,UAAAE,EACF,CACF,EA9yB6B","names":["useCallback","useEffect","useMemo","useRef","useState","mergeWith","createContext","useContext","useMemo","useCallback","useRef","jsx","ErrorContext","createContext","ErrorContextProvider","children","errorContextRef","useRef","updateContext","useCallback","updates","value","useMemo","__name","useErrorContext","ctx","useContext","useEffect","useMemo","useErrorReporting","initialContext","updateContext","errorContextRef","useErrorContext","useEffect","useMemo","__name","updates","jsx","jsonSchemaToEmployment","stepToFormSchemaMap","getLoadingStates","__name","isLoadingBasicInformationForm","isLoadingContractDetailsForm","isLoadingEmployment","isLoadingBenefitsOffersSchema","isLoadingBenefitOffers","isLoadingCompany","isLoadingCountries","employmentStatus","employmentId","currentStepName","basicInformationFields","contractDetailsFields","initialLoading","isEmploymentReadOnly","reviewStepAllowedEmploymentStatus","canInvite","disabledInviteButtonEmploymentStatus","shouldHandleReadOnlyEmployment","isLoading","isNavigatingToReview","useOnboarding","companyId","countryCode","type","options","skipSteps","externalId","onboardingInitialValues","updateErrorContext","useErrorReporting","stepsToUse","STEPS_WITHOUT_SELECT_COUNTRY","STEPS","onStepChange","useCallback","step","fieldValues","stepState","setFieldValues","previousStep","nextStep","goToStep","setStepValues","useStepState","fieldsMetaRef","useRef","internalEmploymentId","setInternalEmploymentId","useState","internalCountryCode","setInternalCountryCode","employment","refetchEmployment","useEmploymentQuery","benefitOffers","useBenefitOffers","company","refetchCompany","useCompany","selectCountryForm","useCountriesSchemaField","createEmploymentMutation","useCreateEmployment","updateEmploymentMutation","useUpdateEmployment","updateBenefitsOffersMutation","useUpdateBenefitsOffers","updateContractEligibilityMutation","useUpsertContractEligibility","createEmploymentMutationAsync","mutationToPromise","updateEmploymentMutationAsync","updateBenefitsOffersMutationAsync","updateContractEligibilityMutationAsync","formType","employmentKey","serverEmploymentData","useJSONSchema","form","jsonSchemaOptions","query","jsonSchemaVersion","mergedFormValues","useJSONSchemaForm","isBasicInformationDetailsEnabled","isContractDetailsEnabled","basicInformationForm","annualGrossSalaryField","annualSalaryFieldPresentation","equityCompensationField","contractDetailsCustomFields","useMemo","props","AnnualGrossSalary","values","field","offerEquity","equityCost","EquityPriceDetails","effectiveContractDetailsJsonSchemaVersion","getContractDetailsSchemaVersion","contractDetailsForm","benefitOffersSchema","useBenefitOffersSchema","initialValuesBenefitOffers","benefitsFormValues","mergeWith","stepFields","stepFieldsWithFlatFieldsets","country","employmentBasicInformation","employmentContractDetails","employmentCountryCode","selectCountryInitialValues","getInitialValues","basicInformationInitialValues","initialValues","contractDetailsInitialValues","benefitsInitialValues","enableAckFields","useEffect","prettifyFormValues","parseFormValues","parseJSFToValidate","onSubmit","parsedValues","isEmploymentNotLoaded","hasChangedCountry","payload","response","error","back","next","goTo"]}
@@ -1,6 +0,0 @@
1
- import{a as t}from"./chunk-P37U34EQ.js";var N=t((e,r,o)=>{typeof o=="string"||o instanceof Blob?e.append(r,o):o instanceof Date?e.append(r,o.toISOString()):e.append(r,JSON.stringify(o))},"serializeFormDataPair");var B={bodySerializer:t(e=>{let r=new FormData;return Object.entries(e).forEach(([o,a])=>{a!=null&&(Array.isArray(a)?a.forEach(i=>N(r,o,i)):N(r,o,a))}),r},"bodySerializer")},j={bodySerializer:t(e=>JSON.stringify(e,(r,o)=>typeof o=="bigint"?o.toString():o),"bodySerializer")};var Q=t(({onRequest:e,onSseError:r,onSseEvent:o,responseTransformer:a,responseValidator:i,sseDefaultRetryDelay:h,sseMaxRetryAttempts:c,sseMaxRetryDelay:p,sseSleepFn:l,url:d,...s})=>{let E,g=l??(m=>new Promise(C=>setTimeout(C,m)));return{stream:t(async function*(){let m=h??3e3,C=0,T=s.signal??new AbortController().signal;for(;!T.aborted;){C++;let D=s.headers instanceof Headers?s.headers:new Headers(s.headers);E!==void 0&&D.set("Last-Event-ID",E);try{let x={redirect:"follow",...s,body:s.serializedBody,headers:D,signal:T},O=new Request(d,x);e&&(O=await e(d,x));let u=await(s.fetch??globalThis.fetch)(O);if(!u.ok)throw new Error(`SSE failed: ${u.status} ${u.statusText}`);if(!u.body)throw new Error("No body in SSE response");let w=u.body.pipeThrough(new TextDecoderStream).getReader(),A="",W=t(()=>{try{w.cancel()}catch{}},"abortHandler");T.addEventListener("abort",W);try{for(;;){let{done:te,value:re}=await w.read();if(te)break;A+=re;let F=A.split(`
2
-
3
- `);A=F.pop()??"";for(let oe of F){let ne=oe.split(`
4
- `),v=[],V;for(let b of ne)if(b.startsWith("data:"))v.push(b.replace(/^data:\s*/,""));else if(b.startsWith("event:"))V=b.replace(/^event:\s*/,"");else if(b.startsWith("id:"))E=b.replace(/^id:\s*/,"");else if(b.startsWith("retry:")){let H=Number.parseInt(b.replace(/^retry:\s*/,""),10);Number.isNaN(H)||(m=H)}let P,M=!1;if(v.length){let b=v.join(`
5
- `);try{P=JSON.parse(b),M=!0}catch{P=b}}M&&(i&&await i(P),a&&(P=await a(P))),o?.({data:P,event:V,id:E,retry:m}),v.length&&(yield P)}}}finally{T.removeEventListener("abort",W),w.releaseLock()}break}catch(x){if(r?.(x),c!==void 0&&C>=c)break;let O=Math.min(m*2**(C-1),p??3e4);await g(O)}}},"createStream")()}},"createSseClient");var se=t(e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},"separatorArrayExplode"),ae=t(e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},"separatorArrayNoExplode"),ie=t(e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},"separatorObjectExplode"),k=t(({allowReserved:e,explode:r,name:o,style:a,value:i})=>{if(!r){let p=(e?i:i.map(l=>encodeURIComponent(l))).join(ae(a));switch(a){case"label":return`.${p}`;case"matrix":return`;${o}=${p}`;case"simple":return p;default:return`${o}=${p}`}}let h=se(a),c=i.map(p=>a==="label"||a==="simple"?e?p:encodeURIComponent(p):R({allowReserved:e,name:o,value:p})).join(h);return a==="label"||a==="matrix"?h+c:c},"serializeArrayParam"),R=t(({allowReserved:e,name:r,value:o})=>{if(o==null)return"";if(typeof o=="object")throw new Error("Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these.");return`${r}=${e?o:encodeURIComponent(o)}`},"serializePrimitiveParam"),U=t(({allowReserved:e,explode:r,name:o,style:a,value:i,valueOnly:h})=>{if(i instanceof Date)return h?i.toISOString():`${o}=${i.toISOString()}`;if(a!=="deepObject"&&!r){let l=[];Object.entries(i).forEach(([s,E])=>{l=[...l,s,e?E:encodeURIComponent(E)]});let d=l.join(",");switch(a){case"form":return`${o}=${d}`;case"label":return`.${d}`;case"matrix":return`;${o}=${d}`;default:return d}}let c=ie(a),p=Object.entries(i).map(([l,d])=>R({allowReserved:e,name:a==="deepObject"?`${o}[${l}]`:l,value:d})).join(c);return a==="label"||a==="matrix"?c+p:p},"serializeObjectParam");var pe=/\{[^{}]+\}/g,ce=t(({path:e,url:r})=>{let o=r,a=r.match(pe);if(a)for(let i of a){let h=!1,c=i.substring(1,i.length-1),p="simple";c.endsWith("*")&&(h=!0,c=c.substring(0,c.length-1)),c.startsWith(".")?(c=c.substring(1),p="label"):c.startsWith(";")&&(c=c.substring(1),p="matrix");let l=e[c];if(l==null)continue;if(Array.isArray(l)){o=o.replace(i,k({explode:h,name:c,style:p,value:l}));continue}if(typeof l=="object"){o=o.replace(i,U({explode:h,name:c,style:p,value:l,valueOnly:!0}));continue}if(p==="matrix"){o=o.replace(i,`;${R({name:c,value:l})}`);continue}let d=encodeURIComponent(p==="label"?`.${l}`:l);o=o.replace(i,d)}return o},"defaultPathSerializer"),$=t(({baseUrl:e,path:r,query:o,querySerializer:a,url:i})=>{let h=i.startsWith("/")?i:`/${i}`,c=(e??"")+h;r&&(c=ce({path:r,url:c}));let p=o?a(o):"";return p.startsWith("?")&&(p=p.substring(1)),p&&(c+=`?${p}`),c},"getUrl");function J(e){let r=e.body!==void 0;if(r&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(r)return e.body}t(J,"getValidRequestBody");var K=t(async(e,r)=>{let o=typeof r=="function"?await r(e):r;if(o)return e.scheme==="bearer"?`Bearer ${o}`:e.scheme==="basic"?`Basic ${btoa(o)}`:o},"getAuthToken");var X=t(({parameters:e={},...r}={})=>t(a=>{let i=[];if(a&&typeof a=="object")for(let h in a){let c=a[h];if(c==null)continue;let p=e[h]||r;if(Array.isArray(c)){let l=k({allowReserved:p.allowReserved,explode:!0,name:h,style:"form",value:c,...p.array});l&&i.push(l)}else if(typeof c=="object"){let l=U({allowReserved:p.allowReserved,explode:!0,name:h,style:"deepObject",value:c,...p.object});l&&i.push(l)}else{let l=R({allowReserved:p.allowReserved,name:h,value:c});l&&i.push(l)}}return i.join("&")},"querySerializer"),"createQuerySerializer"),Y=t(e=>{if(!e)return"stream";let r=e.split(";")[0]?.trim();if(r){if(r.startsWith("application/json")||r.endsWith("+json"))return"json";if(r==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(o=>r.startsWith(o)))return"blob";if(r.startsWith("text/"))return"text"}},"getParseAs"),le=t((e,r)=>r?!!(e.headers.has(r)||e.query?.[r]||e.headers.get("Cookie")?.includes(`${r}=`)):!1,"checkForExistence"),Z=t(async({security:e,...r})=>{for(let o of e){if(le(r,o.name))continue;let a=await K(o,r.auth);if(!a)continue;let i=o.name??"Authorization";switch(o.in){case"query":r.query||(r.query={}),r.query[i]=a;break;case"cookie":r.headers.append("Cookie",`${i}=${a}`);break;case"header":default:r.headers.set(i,a);break}}},"setAuthParams"),z=t(e=>$({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:X(e.querySerializer),url:e.url}),"buildUrl"),_=t((e,r)=>{let o={...e,...r};return o.baseUrl?.endsWith("/")&&(o.baseUrl=o.baseUrl.substring(0,o.baseUrl.length-1)),o.headers=q(e.headers,r.headers),o},"mergeConfigs"),he=t(e=>{let r=[];return e.forEach((o,a)=>{r.push([a,o])}),r},"headersEntries"),q=t((...e)=>{let r=new Headers;for(let o of e){if(!o)continue;let a=o instanceof Headers?he(o):Object.entries(o);for(let[i,h]of a)if(h===null)r.delete(i);else if(Array.isArray(h))for(let c of h)r.append(i,c);else h!==void 0&&r.set(i,typeof h=="object"?JSON.stringify(h):h)}return r},"mergeHeaders"),G=class{static{t(this,"Interceptors")}fns=[];clear(){this.fns=[]}eject(r){let o=this.getInterceptorIndex(r);this.fns[o]&&(this.fns[o]=null)}exists(r){let o=this.getInterceptorIndex(r);return!!this.fns[o]}getInterceptorIndex(r){return typeof r=="number"?this.fns[r]?r:-1:this.fns.indexOf(r)}update(r,o){let a=this.getInterceptorIndex(r);return this.fns[a]?(this.fns[a]=o,r):!1}use(r){return this.fns.push(r),this.fns.length-1}},ee=t(()=>({error:new G,request:new G,response:new G}),"createInterceptors"),me=X({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),de={"Content-Type":"application/json"},S=t((e={})=>({...j,headers:de,parseAs:"auto",querySerializer:me,...e}),"createConfig");var L=t((e={})=>{let r=_(S(),e),o=t(()=>({...r}),"getConfig"),a=t(d=>(r=_(r,d),o()),"setConfig"),i=ee(),h=t(async d=>{let s={...r,...d,fetch:d.fetch??r.fetch??globalThis.fetch,headers:q(r.headers,d.headers),serializedBody:void 0};s.security&&await Z({...s,security:s.security}),s.requestValidator&&await s.requestValidator(s),s.body!==void 0&&s.bodySerializer&&(s.serializedBody=s.bodySerializer(s.body)),(s.body===void 0||s.serializedBody==="")&&s.headers.delete("Content-Type");let E=z(s);return{opts:s,url:E}},"beforeRequest"),c=t(async d=>{let{opts:s,url:E}=await h(d),g={redirect:"follow",...s,body:J(s)},f=new Request(E,g);for(let y of i.request.fns)y&&(f=await y(f,s));let I=s.fetch,m;try{m=await I(f)}catch(y){let u=y;for(let w of i.error.fns)w&&(u=await w(y,void 0,f,s));if(u=u||{},s.throwOnError)throw u;return s.responseStyle==="data"?void 0:{error:u,request:f,response:void 0}}for(let y of i.response.fns)y&&(m=await y(m,f,s));let C={request:f,response:m};if(m.ok){let y=(s.parseAs==="auto"?Y(m.headers.get("Content-Type")):s.parseAs)??"json";if(m.status===204||m.headers.get("Content-Length")==="0"){let w;switch(y){case"arrayBuffer":case"blob":case"text":w=await m[y]();break;case"formData":w=new FormData;break;case"stream":w=m.body;break;case"json":default:w={};break}return s.responseStyle==="data"?w:{data:w,...C}}let u;switch(y){case"arrayBuffer":case"blob":case"formData":case"json":case"text":u=await m[y]();break;case"stream":return s.responseStyle==="data"?m.body:{data:m.body,...C}}return y==="json"&&(s.responseValidator&&await s.responseValidator(u),s.responseTransformer&&(u=await s.responseTransformer(u))),s.responseStyle==="data"?u:{data:u,...C}}let T=await m.text(),D;try{D=JSON.parse(T)}catch{}let x=D??T,O=x;for(let y of i.error.fns)y&&(O=await y(x,m,f,s));if(O=O||{},s.throwOnError)throw O;return s.responseStyle==="data"?void 0:{error:O,...C}},"request"),p=t(d=>s=>c({...s,method:d}),"makeMethodFn"),l=t(d=>async s=>{let{opts:E,url:g}=await h(s);return Q({...E,body:E.body,headers:E.headers,method:d,onRequest:t(async(f,I)=>{let m=new Request(f,I);for(let C of i.request.fns)C&&(m=await C(m,E));return m},"onRequest"),url:g})},"makeSseFn");return{buildUrl:z,connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),getConfig:o,head:p("HEAD"),interceptors:i,options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),request:c,setConfig:a,sse:{connect:l("CONNECT"),delete:l("DELETE"),get:l("GET"),head:l("HEAD"),options:l("OPTIONS"),patch:l("PATCH"),post:l("POST"),put:l("PUT"),trace:l("TRACE")},trace:p("TRACE")}},"createClient");var n=L(S({baseUrl:"https://gateway.remote.com/"}));var He=t(e=>(e?.client??n).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/offboardings",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateOffboarding");var Ne=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/cancel-onboarding/{employment_id}",...e}),"postUpdateCancelOnboarding"),Qe=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contract-amendments/schema",...e}),"getShowContractAmendmentSchema");var $e=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/companies/{company_id}/pricing-plans",...e}),"getIndexCompanyPricingPlan");var Je=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/currency-converter/raw",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postConvertRawCurrencyConverter"),Ke=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/countries/{country_code}/contractor-contract-details",...e}),"getShowContractorContractDetailsCountry");var Xe=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postCreateEmployment2"),Ye=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/help-center-articles/{id}",...e}),"getShowHelpCenterArticle");var Ze=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/sdk/telemetry-errors",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postReportErrorsTelemetry");var et=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/estimation",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postCreateEstimation");var tt=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/benefit-offers",...e}),"getIndexBenefitOffer"),rt=t(e=>(e.client??n).put({security:[{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/benefit-offers",...e,headers:{"Content-Type":"application/json",...e.headers}}),"putUpdateBenefitOffer");var ot=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/employments/{employment_id}/contractor-subscriptions",...e}),"getIndexSubscription");var nt=t(e=>(e?.client??n).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/payroll-calendars",...e}),"getIndexEorPayrollCalendar");var st=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/employments/{employment_id}/contract-documents/{id}",...e}),"getShowContractDocument"),at=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/contract-documents",...e}),"getIndexEmploymentContractDocument");var it=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/employments/{employment_id}/contractor-currencies",...e}),"getIndexContractorCurrency");var pt=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/magic-link",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postGenerateMagicLink");var ct=t(e=>(e?.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/estimation-pdf",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateEstimationPdf");var lt=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/risk-reserve",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postCreateRiskReserve");var ht=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/companies/{company_id}",...e}),"getShowCompany"),mt=t(e=>(e.client??n).patch({security:[{scheme:"bearer",type:"http"}],url:"/v1/companies/{company_id}",...e,headers:{"Content-Type":"application/json",...e.headers}}),"patchUpdateCompany2");var dt=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contract-amendments",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postCreateContractAmendment");var yt=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/countries/{country_code}/{form}",...e}),"getShowFormCountry"),ut=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/files/{id}",...e}),"getShowFile");var Et=t(e=>(e?.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/countries",...e}),"getIndexCountry");var Ct=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/leave-policies/summary/{employment_id}",...e}),"getIndexLeavePoliciesSummary");var wt=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/benefit-offers/schema",...e}),"getShowSchema"),ft=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/eligibility-questionnaire",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postCreateEligibilityQuestionnaire");var bt=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}",...e}),"getShowEmployment"),Ot=t(e=>(e.client??n).patch({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}",...e,headers:{"Content-Type":"application/json",...e.headers}}),"patchUpdateEmployment2");var Tt=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/regions/{slug}/fields",...e}),"getShowRegionField");var xt=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/contract-eligibility",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postCreateContractEligibility"),Pt=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/countries",...e}),"getSupportedCountry");var Rt=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/companies/{company_id}/legal-entities",...e}),"getIndexCompanyLegalEntities");var gt=t(e=>(e?.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/estimation-csv",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateEstimationCsv"),Dt=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/employments/{employment_id}/contract-documents",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postCreateContractDocument");var Gt=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/currency-converter/effective",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postConvertWithSpreadCurrencyConverter");var St=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contract-amendments/automatable",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postAutomatableContractAmendment");var It=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/files",...e}),"getIndexEmploymentFile");var vt=t(e=>(e?.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/company-currencies",...e}),"getIndexCompanyCurrency");var kt=t(e=>(e.client??n).post({...B,security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/documents",...e,headers:{"Content-Type":null,...e.headers}}),"postUploadEmployeeFileFile"),Ut=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/invite",...e}),"postInviteEmploymentInvitation");var qt=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/employments/{employment_id}/contract-documents/{contract_document_id}/sign",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postSignContractDocument"),At=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/identity/current",...e}),"getCurrentIdentity");var Bt=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/schemas/eligibility-questionnaire",...e}),"getShowEligibilityQuestionnaire");var jt=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/employments/{employment_id}/contractor-plus-subscription",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postManageContractorPlusSubscriptionSubscription"),zt=t(e=>(e.client??n).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/timeoff",...e}),"getIndexTimeoff");var _t=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/companies",...e,headers:{"Content-Type":"application/json",...e.headers}}),"postCreateCompany");var Lt=t(e=>(e.client??n).delete({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/employments/{employment_id}/contractor-cor-subscription",...e}),"deleteDeleteContractorCorSubscriptionSubscription"),Wt=t(e=>(e.client??n).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/employments/{employment_id}/contractor-cor-subscription",...e}),"postManageContractorCorSubscriptionSubscription");export{L as a,n as b,He as c,Ne as d,Qe as e,$e as f,Je as g,Ke as h,Xe as i,Ye as j,Ze as k,et as l,tt as m,rt as n,ot as o,nt as p,st as q,at as r,it as s,pt as t,ct as u,lt as v,ht as w,mt as x,dt as y,yt as z,ut as A,Et as B,Ct as C,wt as D,ft as E,bt as F,Ot as G,Tt as H,xt as I,Pt as J,Rt as K,gt as L,Dt as M,Gt as N,St as O,It as P,vt as Q,kt as R,Ut as S,qt as T,At as U,Bt as V,jt as W,zt as X,_t as Y,Lt as Z,Wt as _};
6
- //# sourceMappingURL=chunk-7ENB7H4E.js.map