@remoteoss/remote-flows 1.50.0 → 1.51.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 (647) hide show
  1. package/dist/CheckboxFieldDefault-23VE43PP.js +2 -0
  2. package/dist/CountryFieldDefault-FVAAL55P.js +2 -0
  3. package/dist/DatePickerFieldDefault-KXEMGK5B.js +2 -0
  4. package/dist/EmailFieldDefault-OFHDLOOT.js +2 -0
  5. package/dist/FileUploadFieldDefault-GX22C22E.js +2 -0
  6. package/dist/ForcedValueFieldDefault-ESITCZWK.js +2 -0
  7. package/dist/MultiSelectFieldDefault-DAUBH5JV.js +2 -0
  8. package/dist/NumberFieldDefault-MXZD7YVE.js +2 -0
  9. package/dist/PDFPreviewDefault-T6YPWXGY.js +2 -0
  10. package/dist/RadioGroupFieldDefault-QFUUJGSR.js +2 -0
  11. package/dist/SelectFieldDefault-3QTJE222.js +2 -0
  12. package/dist/TelFieldDefault-5U5X37LI.js +2 -0
  13. package/dist/TextAreaFieldDefault-JX2MVJVY.js +2 -0
  14. package/dist/TextFieldDefault-WCUD6XYS.js +2 -0
  15. package/dist/TimeFieldDefault-UNF7PKLT.js +2 -0
  16. package/dist/WorkScheduleFieldDefault-2A2RCDXV.js +2 -0
  17. package/dist/{chunk-SLRPDXK6.js → chunk-235XZBTZ.js} +2 -2
  18. package/dist/chunk-2EXX7BNU.js +2 -0
  19. package/dist/{chunk-PUK2TIQX.js.map → chunk-2EXX7BNU.js.map} +1 -1
  20. package/dist/chunk-2KA6NZOQ.js +2 -0
  21. package/dist/chunk-2KA6NZOQ.js.map +1 -0
  22. package/dist/chunk-2L6AB46E.js +2 -0
  23. package/dist/{chunk-A7U3KJIP.js.map → chunk-2L6AB46E.js.map} +1 -1
  24. package/dist/{chunk-VVZTXCX2.js → chunk-2SD75ZFL.js} +2 -2
  25. package/dist/{chunk-GE74QKS6.js → chunk-335N2CVQ.js} +2 -2
  26. package/dist/chunk-36DZMQHH.js +2 -0
  27. package/dist/{chunk-DDMXUBCN.js.map → chunk-36DZMQHH.js.map} +1 -1
  28. package/dist/{chunk-STHZZZRL.js → chunk-3BDWVNHX.js} +2 -2
  29. package/dist/chunk-3CGFAN3F.js +2 -0
  30. package/dist/{chunk-DP6L72YF.js.map → chunk-3CGFAN3F.js.map} +1 -1
  31. package/dist/{chunk-ZREW7KZA.js → chunk-3DOSHTJS.js} +2 -2
  32. package/dist/{chunk-SZI67IXU.js → chunk-3HMBTPH7.js} +2 -2
  33. package/dist/{chunk-NTPHMYYC.js → chunk-3NC2JJM3.js} +2 -2
  34. package/dist/{chunk-ED35NFA6.js → chunk-3OHORFIX.js} +2 -2
  35. package/dist/{chunk-WGO25FWG.js → chunk-3WRO57UF.js} +2 -2
  36. package/dist/{chunk-4CNDASPA.js → chunk-4AQMMGXK.js} +2 -2
  37. package/dist/{chunk-G6EKGJBB.js → chunk-4BFGSBOK.js} +2 -2
  38. package/dist/{chunk-FSCAWXCB.js → chunk-57QHHIWL.js} +2 -2
  39. package/dist/{chunk-RZL44CPH.js → chunk-57Y5XQ3D.js} +2 -2
  40. package/dist/{chunk-P6FFLJDP.js → chunk-5DPOL3DT.js} +2 -2
  41. package/dist/{chunk-FV6NNYDP.js → chunk-5FST4WDH.js} +2 -2
  42. package/dist/chunk-5NN5RWBG.js +2 -0
  43. package/dist/chunk-5NN5RWBG.js.map +1 -0
  44. package/dist/{chunk-46BOEYFO.js → chunk-6OLV37C2.js} +2 -2
  45. package/dist/{chunk-UGQNOBQH.js → chunk-6UCTTR3O.js} +2 -2
  46. package/dist/{chunk-SUYI33NX.js → chunk-6X4SQPQF.js} +2 -2
  47. package/dist/{chunk-D6PMXNBM.js → chunk-72EMS5WI.js} +2 -2
  48. package/dist/{chunk-VKUGCD5J.js → chunk-72ZOHLOK.js} +2 -2
  49. package/dist/chunk-74ZX4KQG.js +2 -0
  50. package/dist/chunk-74ZX4KQG.js.map +1 -0
  51. package/dist/{chunk-EVUTX6TJ.js → chunk-77LDJPXF.js} +2 -2
  52. package/dist/chunk-7UVH4WE2.js +2 -0
  53. package/dist/chunk-7UVH4WE2.js.map +1 -0
  54. package/dist/{chunk-OWOIDZHI.js → chunk-7Y4NHODP.js} +2 -2
  55. package/dist/{chunk-5PUW4YCY.js → chunk-AAHPOX44.js} +2 -2
  56. package/dist/{chunk-GBVBMT3H.js → chunk-ADL2ZH54.js} +2 -2
  57. package/dist/{chunk-UZFEJMO6.js → chunk-AFTFDGSD.js} +2 -2
  58. package/dist/chunk-ANPNVWCB.js +2 -0
  59. package/dist/{chunk-E5ATCB4A.js → chunk-AOE6FXVP.js} +2 -2
  60. package/dist/{chunk-E5ATCB4A.js.map → chunk-AOE6FXVP.js.map} +1 -1
  61. package/dist/{chunk-L2YOD4GP.js → chunk-APSKAXM2.js} +2 -2
  62. package/dist/chunk-BQGTMOIQ.js +2 -0
  63. package/dist/{chunk-53QBSOMG.js.map → chunk-BQGTMOIQ.js.map} +1 -1
  64. package/dist/chunk-BQVCM5DQ.js +2 -0
  65. package/dist/chunk-BQVCM5DQ.js.map +1 -0
  66. package/dist/{chunk-WKWL57L6.js → chunk-BYD4TSDD.js} +2 -2
  67. package/dist/{chunk-CUO7OGD5.js → chunk-C3MUUZC6.js} +2 -2
  68. package/dist/chunk-C7KVPEVX.js +2 -0
  69. package/dist/chunk-C7KVPEVX.js.map +1 -0
  70. package/dist/{chunk-3G4HOZCM.js → chunk-CWKXQZRT.js} +2 -2
  71. package/dist/chunk-D7F3QKN5.js +2 -0
  72. package/dist/chunk-D7F3QKN5.js.map +1 -0
  73. package/dist/chunk-DAUDKN32.js +8 -0
  74. package/dist/{chunk-QQV5REGG.js.map → chunk-DAUDKN32.js.map} +1 -1
  75. package/dist/{chunk-LXGL7HF5.js → chunk-DIPYFRXX.js} +2 -2
  76. package/dist/chunk-DSJXT5ZP.js +2 -0
  77. package/dist/chunk-DSJXT5ZP.js.map +1 -0
  78. package/dist/{chunk-JLZFNUBH.js → chunk-E7Y3YBZH.js} +2 -2
  79. package/dist/chunk-EOV3JMUQ.js +2 -0
  80. package/dist/chunk-EOV3JMUQ.js.map +1 -0
  81. package/dist/chunk-EP3BNRH3.js +2 -0
  82. package/dist/chunk-EP3BNRH3.js.map +1 -0
  83. package/dist/{chunk-GTS7KFEM.js → chunk-EQOOVJ7K.js} +2 -2
  84. package/dist/{chunk-LADLAP2S.js → chunk-ESXBCNJM.js} +2 -2
  85. package/dist/chunk-EUQLCVA5.js +2 -0
  86. package/dist/chunk-EUQLCVA5.js.map +1 -0
  87. package/dist/{chunk-R4ZUOFYN.js → chunk-FF5OB2GF.js} +2 -2
  88. package/dist/{chunk-H47XUL2L.js → chunk-FFRROEPQ.js} +2 -2
  89. package/dist/chunk-FYCOEJEZ.js +2 -0
  90. package/dist/chunk-FYCOEJEZ.js.map +1 -0
  91. package/dist/{chunk-N7HCQXUM.js → chunk-G3BWBRCE.js} +2 -2
  92. package/dist/{chunk-MXAFJYLQ.js → chunk-GGTV6IQ3.js} +2 -2
  93. package/dist/{chunk-BTCC6PNG.js → chunk-GGVW6SG6.js} +2 -2
  94. package/dist/{chunk-P2WUHKEU.js → chunk-GIBD2ZCJ.js} +2 -2
  95. package/dist/{chunk-XDLVDPQ7.js → chunk-GNVGW65D.js} +2 -2
  96. package/dist/{chunk-4IGLIHGF.js → chunk-GRLZH65T.js} +2 -2
  97. package/dist/chunk-GSUGHAHA.js +2 -0
  98. package/dist/{chunk-4BHEQMZV.js.map → chunk-GSUGHAHA.js.map} +1 -1
  99. package/dist/{chunk-CCGAAOXN.js → chunk-H4NJGAN4.js} +2 -2
  100. package/dist/chunk-HDFAFTHC.js +2 -0
  101. package/dist/chunk-HDFAFTHC.js.map +1 -0
  102. package/dist/{chunk-CD6H4MBI.js → chunk-HRVJCCWJ.js} +2 -2
  103. package/dist/{chunk-MEYX4D5K.js → chunk-I53YCEOC.js} +2 -2
  104. package/dist/{chunk-V3AVEPNA.js → chunk-I5NW7AQZ.js} +2 -2
  105. package/dist/{chunk-YME2HZZJ.js → chunk-I65OXH33.js} +2 -2
  106. package/dist/{chunk-ICYCECFS.js → chunk-IBQVGZMF.js} +2 -2
  107. package/dist/{chunk-ICYCECFS.js.map → chunk-IBQVGZMF.js.map} +1 -1
  108. package/dist/{chunk-TX6RWQUR.js → chunk-IJS67A57.js} +2 -2
  109. package/dist/{chunk-Z7XLK4JL.js → chunk-ILPI4AFS.js} +2 -2
  110. package/dist/{chunk-FQBOMXMX.js → chunk-J244N33S.js} +2 -2
  111. package/dist/chunk-JKNE2D47.js +2 -0
  112. package/dist/{chunk-VRPZ4GHN.js.map → chunk-JKNE2D47.js.map} +1 -1
  113. package/dist/{chunk-ILMRP364.js → chunk-JUSQGITN.js} +2 -2
  114. package/dist/{chunk-GMSYO53D.js → chunk-KD7UBTZG.js} +2 -2
  115. package/dist/chunk-KF52YXGI.js +2 -0
  116. package/dist/chunk-KF52YXGI.js.map +1 -0
  117. package/dist/{chunk-VYTUM3RI.js → chunk-KFIUXU6I.js} +2 -2
  118. package/dist/chunk-KJRHRVFI.js +2 -0
  119. package/dist/chunk-KJRHRVFI.js.map +1 -0
  120. package/dist/chunk-KSSQR2CS.js +2 -0
  121. package/dist/chunk-KSSQR2CS.js.map +1 -0
  122. package/dist/{chunk-G75LPZV5.js → chunk-L7FN3XPX.js} +2 -2
  123. package/dist/{chunk-KGNLBYM5.js → chunk-LJ32QPJF.js} +2 -2
  124. package/dist/chunk-LXABE3VR.js +2 -0
  125. package/dist/chunk-LXABE3VR.js.map +1 -0
  126. package/dist/chunk-LY5PCHQ2.js +2 -0
  127. package/dist/{chunk-B4O5YUYL.js.map → chunk-LY5PCHQ2.js.map} +1 -1
  128. package/dist/{chunk-7FKNXW2I.js → chunk-M7PZAJTR.js} +2 -2
  129. package/dist/{chunk-V6PPOGPT.js → chunk-NVOUXFGX.js} +2 -2
  130. package/dist/chunk-OEKL7QGO.js +2 -0
  131. package/dist/{chunk-EMMFAZZC.js.map → chunk-OEKL7QGO.js.map} +1 -1
  132. package/dist/{chunk-WVE2IOLY.js → chunk-OFFUVHQJ.js} +2 -2
  133. package/dist/{chunk-4WSYC3Q5.js → chunk-OJ4TXF6G.js} +2 -2
  134. package/dist/{chunk-C7MVEDVY.js → chunk-OT5JE2SM.js} +2 -2
  135. package/dist/{chunk-ZOTKZZ67.js → chunk-P3TTGECC.js} +2 -2
  136. package/dist/{chunk-RYZ7TJVS.js → chunk-PAYZRCKY.js} +2 -2
  137. package/dist/{chunk-QFTBKRUI.js → chunk-PJAHLEOR.js} +2 -2
  138. package/dist/{chunk-AAXPKULB.js → chunk-PKORRCMX.js} +2 -2
  139. package/dist/chunk-QATHYZUV.js +2 -0
  140. package/dist/chunk-QATHYZUV.js.map +1 -0
  141. package/dist/chunk-QIV5OKOI.js +2 -0
  142. package/dist/chunk-QIV5OKOI.js.map +1 -0
  143. package/dist/{chunk-TJZ5BJV3.js → chunk-QUJBIRNY.js} +2 -2
  144. package/dist/{chunk-OKBPMWVB.js → chunk-R23HFBV4.js} +2 -2
  145. package/dist/{chunk-5HDMU73I.js → chunk-R2XDTYPZ.js} +2 -2
  146. package/dist/chunk-R4E37FVX.js +2 -0
  147. package/dist/{chunk-R5ADEPLC.js.map → chunk-R4E37FVX.js.map} +1 -1
  148. package/dist/{chunk-BB3M25A3.js → chunk-R6VNUDBK.js} +2 -2
  149. package/dist/{chunk-XEVHXHHC.js → chunk-ROVMQ5NT.js} +2 -2
  150. package/dist/{chunk-6CBC5OAQ.js → chunk-SDPYDCS7.js} +2 -2
  151. package/dist/chunk-SRLBVFNQ.js +2 -0
  152. package/dist/chunk-SRLBVFNQ.js.map +1 -0
  153. package/dist/{chunk-NFWKD7UR.js → chunk-SUGZPBET.js} +2 -2
  154. package/dist/{chunk-7B3ATY3M.js → chunk-SYZIGZ2F.js} +2 -2
  155. package/dist/{chunk-7B3ATY3M.js.map → chunk-SYZIGZ2F.js.map} +1 -1
  156. package/dist/{chunk-ITCWBZDM.js → chunk-UNBTPLJ6.js} +2 -2
  157. package/dist/{chunk-RFMYNPR7.js → chunk-URNFXEOZ.js} +2 -2
  158. package/dist/{chunk-XMVV6S77.js → chunk-UWIUECXU.js} +2 -2
  159. package/dist/{chunk-JVZ5LUV4.js → chunk-VEQWK7QQ.js} +2 -2
  160. package/dist/{chunk-JVZ5LUV4.js.map → chunk-VEQWK7QQ.js.map} +1 -1
  161. package/dist/chunk-VKORYYED.js +2 -0
  162. package/dist/chunk-VKORYYED.js.map +1 -0
  163. package/dist/chunk-VSK4KV55.js +2 -0
  164. package/dist/chunk-VSK4KV55.js.map +1 -0
  165. package/dist/{chunk-JI3PAIMV.js → chunk-WHY2WNWH.js} +2 -2
  166. package/dist/{chunk-77AA65OH.js → chunk-WNOQNNRR.js} +2 -2
  167. package/dist/{chunk-77AA65OH.js.map → chunk-WNOQNNRR.js.map} +1 -1
  168. package/dist/{chunk-JVXI4RZU.js → chunk-WU66SHVJ.js} +2 -2
  169. package/dist/{chunk-PKJZ2N4C.js → chunk-XLHTMWJ3.js} +2 -2
  170. package/dist/{chunk-ZODT3MJM.js → chunk-XPLWBO73.js} +2 -2
  171. package/dist/{chunk-BLKWR77C.js → chunk-XS5NKKW4.js} +2 -2
  172. package/dist/{chunk-25MUO3XP.js → chunk-XTZJKL3C.js} +2 -2
  173. package/dist/chunk-XWCE5BU6.js +2 -0
  174. package/dist/{chunk-CONMRDRL.js.map → chunk-XWCE5BU6.js.map} +1 -1
  175. package/dist/{chunk-YHZZHQP5.js → chunk-XXBQQH47.js} +2 -2
  176. package/dist/{chunk-5JXLXWTD.js → chunk-Y6FOZXIU.js} +2 -2
  177. package/dist/{chunk-DOPQK5RP.js → chunk-YANQP45B.js} +2 -2
  178. package/dist/{chunk-PKQG25GH.js → chunk-YE6NRJ2L.js} +2 -2
  179. package/dist/{chunk-PKQG25GH.js.map → chunk-YE6NRJ2L.js.map} +1 -1
  180. package/dist/{chunk-XMIVJW5E.js → chunk-YWLAZIIO.js} +2 -2
  181. package/dist/{chunk-ILEO7LN4.js → chunk-YYIAA47F.js} +2 -2
  182. package/dist/{chunk-ERBEPQJP.js → chunk-ZHFGV2GB.js} +2 -2
  183. package/dist/{chunk-2UH6Y56R.js → chunk-ZJ55AKB6.js} +2 -2
  184. package/dist/chunk-ZRD3M74X.js +2 -0
  185. package/dist/{chunk-NYR6FVCU.js.map → chunk-ZRD3M74X.js.map} +1 -1
  186. package/dist/{chunk-GHZABLDV.js → chunk-ZULOHKU6.js} +2 -2
  187. package/dist/default-components.d.ts +2 -2
  188. package/dist/default-components.js +1 -1
  189. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
  190. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +1 -1
  191. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +3 -3
  192. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  193. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
  194. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  195. package/dist/flows/ContractAmendment/context.d.ts +3 -3
  196. package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
  197. package/dist/flows/ContractAmendment/hooks.js +1 -1
  198. package/dist/flows/ContractAmendment/index.d.ts +3 -3
  199. package/dist/flows/ContractAmendment/index.js +1 -1
  200. package/dist/flows/ContractAmendment/types.d.ts +3 -3
  201. package/dist/flows/ContractAmendment/utils.d.ts +2 -2
  202. package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +7 -5
  203. package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
  204. package/dist/flows/ContractorOnboarding/api.d.ts +311 -14
  205. package/dist/flows/ContractorOnboarding/api.js +1 -1
  206. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
  207. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
  208. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +7 -5
  209. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
  210. package/dist/flows/ContractorOnboarding/components/ContractOriginStep.d.ts +3 -3
  211. package/dist/flows/ContractorOnboarding/components/ContractOriginStep.js +1 -1
  212. package/dist/flows/ContractorOnboarding/components/ContractPreviewHeader.d.ts +2 -2
  213. package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.d.ts +2 -2
  214. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +7 -5
  215. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
  216. package/dist/flows/ContractorOnboarding/components/ContractReviewButton.js +1 -1
  217. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +7 -5
  218. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
  219. package/dist/flows/ContractorOnboarding/components/CreateInvoiceScheduleStep.d.ts +3 -3
  220. package/dist/flows/ContractorOnboarding/components/CreateInvoiceScheduleStep.js +1 -1
  221. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.d.ts +7 -5
  222. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.js +1 -1
  223. package/dist/flows/ContractorOnboarding/components/InvoiceScheduleStep.d.ts +7 -5
  224. package/dist/flows/ContractorOnboarding/components/InvoiceScheduleStep.js +1 -1
  225. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
  226. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
  227. package/dist/flows/ContractorOnboarding/components/PreviewInvoiceButton.d.ts +29 -27
  228. package/dist/flows/ContractorOnboarding/components/PreviewInvoiceButton.js +1 -1
  229. package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +7 -5
  230. package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
  231. package/dist/flows/ContractorOnboarding/components/SaveDraftButton.d.ts +3 -3
  232. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
  233. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
  234. package/dist/flows/ContractorOnboarding/components/SkipInvoiceScheduleButton.d.ts +3 -3
  235. package/dist/flows/ContractorOnboarding/context.d.ts +7 -5
  236. package/dist/flows/ContractorOnboarding/hooks.d.ts +7 -5
  237. package/dist/flows/ContractorOnboarding/hooks.js +1 -1
  238. package/dist/flows/ContractorOnboarding/index.d.ts +7 -5
  239. package/dist/flows/ContractorOnboarding/index.js +1 -1
  240. package/dist/flows/ContractorOnboarding/jsfModify.d.ts +7 -5
  241. package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
  242. package/dist/flows/ContractorOnboarding/json-schemas/createInvoiceSchedule.d.ts +177 -1
  243. package/dist/flows/ContractorOnboarding/json-schemas/createInvoiceSchedule.js +1 -1
  244. package/dist/flows/ContractorOnboarding/types.d.ts +7 -5
  245. package/dist/flows/ContractorOnboarding/utils.d.ts +4 -4
  246. package/dist/flows/ContractorOnboarding/utils.js +1 -1
  247. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
  248. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  249. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
  250. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  251. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +3 -3
  252. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  253. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +3 -3
  254. package/dist/flows/CostCalculator/api.d.ts +3 -3
  255. package/dist/flows/CostCalculator/api.js +1 -1
  256. package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
  257. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  258. package/dist/flows/CostCalculator/context.d.ts +3 -3
  259. package/dist/flows/CostCalculator/hooks.d.ts +3 -3
  260. package/dist/flows/CostCalculator/hooks.js +1 -1
  261. package/dist/flows/CostCalculator/index.d.ts +3 -3
  262. package/dist/flows/CostCalculator/index.js +1 -1
  263. package/dist/flows/CostCalculator/jsonSchema.d.ts +3 -0
  264. package/dist/flows/CostCalculator/jsonSchema.js +1 -1
  265. package/dist/flows/CostCalculator/types.d.ts +3 -3
  266. package/dist/flows/CostCalculator/utils.d.ts +3 -3
  267. package/dist/flows/CostCalculator/utils.js +1 -1
  268. package/dist/flows/CreateCompany/CreateCompany.d.ts +4 -4
  269. package/dist/flows/CreateCompany/CreateCompany.js +1 -1
  270. package/dist/flows/CreateCompany/api.d.ts +3 -3
  271. package/dist/flows/CreateCompany/api.js +1 -1
  272. package/dist/flows/CreateCompany/components/AddressDetailsStep.d.ts +4 -4
  273. package/dist/flows/CreateCompany/components/AddressDetailsStep.js +1 -1
  274. package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.d.ts +4 -4
  275. package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.js +1 -1
  276. package/dist/flows/CreateCompany/components/CreateCompanyForm.d.ts +2 -2
  277. package/dist/flows/CreateCompany/components/CreateCompanyForm.js +1 -1
  278. package/dist/flows/CreateCompany/context.d.ts +4 -4
  279. package/dist/flows/CreateCompany/hooks.d.ts +4 -4
  280. package/dist/flows/CreateCompany/hooks.js +1 -1
  281. package/dist/flows/CreateCompany/index.d.ts +4 -4
  282. package/dist/flows/CreateCompany/index.js +1 -1
  283. package/dist/flows/CreateCompany/types.d.ts +4 -4
  284. package/dist/flows/InvoiceSchedule/InvoiceScheduleFlow.d.ts +8 -16
  285. package/dist/flows/InvoiceSchedule/InvoiceScheduleFlow.js +1 -1
  286. package/dist/flows/InvoiceSchedule/InvoiceScheduleForm.d.ts +3 -7
  287. package/dist/flows/InvoiceSchedule/InvoiceScheduleForm.js +1 -1
  288. package/dist/flows/InvoiceSchedule/InvoiceSchedulePreviewButton.d.ts +33 -0
  289. package/dist/flows/InvoiceSchedule/InvoiceSchedulePreviewButton.js +2 -0
  290. package/dist/flows/InvoiceSchedule/InvoiceScheduleSubmitButton.js +1 -1
  291. package/dist/flows/InvoiceSchedule/context.d.ts +10 -20
  292. package/dist/flows/InvoiceSchedule/hooks.d.ts +33 -41
  293. package/dist/flows/InvoiceSchedule/hooks.js +1 -1
  294. package/dist/flows/InvoiceSchedule/index.d.ts +6 -8
  295. package/dist/flows/InvoiceSchedule/index.js +1 -1
  296. package/dist/flows/InvoiceSchedule/types.d.ts +8 -35
  297. package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundFlow.d.ts +3 -3
  298. package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundFlow.js +1 -1
  299. package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundForm.d.ts +3 -3
  300. package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundForm.js +1 -1
  301. package/dist/flows/JsonSchemaPlayground/context.d.ts +3 -3
  302. package/dist/flows/JsonSchemaPlayground/hooks.d.ts +3 -3
  303. package/dist/flows/JsonSchemaPlayground/hooks.js +1 -1
  304. package/dist/flows/JsonSchemaPlayground/index.d.ts +3 -3
  305. package/dist/flows/JsonSchemaPlayground/index.js +1 -1
  306. package/dist/flows/JsonSchemaPlayground/types.d.ts +3 -3
  307. package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
  308. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  309. package/dist/flows/Onboarding/api.d.ts +4 -4
  310. package/dist/flows/Onboarding/api.js +1 -1
  311. package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
  312. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  313. package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +4 -4
  314. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  315. package/dist/flows/Onboarding/components/BenefitsStep.d.ts +4 -4
  316. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  317. package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +4 -4
  318. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  319. package/dist/flows/Onboarding/components/DailySchedule/DailySchedule.d.ts +11 -0
  320. package/dist/flows/Onboarding/components/DailySchedule/DailySchedule.js +2 -0
  321. package/dist/flows/Onboarding/components/DailySchedule/DailyScheduleContainer.d.ts +16 -0
  322. package/dist/flows/Onboarding/components/DailySchedule/DailyScheduleContainer.js +2 -0
  323. package/dist/flows/Onboarding/components/DailySchedule/DailyScheduleContainer.js.map +1 -0
  324. package/dist/flows/Onboarding/components/DailySchedule/types.d.ts +68 -0
  325. package/dist/flows/Onboarding/components/DailySchedule/types.js +1 -0
  326. package/dist/flows/Onboarding/components/DailySchedule/types.js.map +1 -0
  327. package/dist/flows/Onboarding/components/DailySchedule/utils.d.ts +21 -0
  328. package/dist/flows/Onboarding/components/DailySchedule/utils.js +2 -0
  329. package/dist/flows/Onboarding/components/DailySchedule/utils.js.map +1 -0
  330. package/dist/flows/Onboarding/components/EmploymentAgreementInfoContent.js +1 -1
  331. package/dist/flows/Onboarding/components/EngagementAgreementDetailsStep.d.ts +4 -4
  332. package/dist/flows/Onboarding/components/EngagementAgreementDetailsStep.js +1 -1
  333. package/dist/flows/Onboarding/components/OnboardingForm.d.ts +4 -4
  334. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  335. package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
  336. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  337. package/dist/flows/Onboarding/components/PreOnboardingRequirements.d.ts +4 -4
  338. package/dist/flows/Onboarding/components/PreOnboardingRequirements.js +1 -1
  339. package/dist/flows/Onboarding/components/PreviewEmploymentAgreementStep.js +1 -1
  340. package/dist/flows/Onboarding/components/ReviewStep.d.ts +4 -4
  341. package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
  342. package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +4 -4
  343. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  344. package/dist/flows/Onboarding/context.d.ts +5 -5
  345. package/dist/flows/Onboarding/hooks.d.ts +4 -4
  346. package/dist/flows/Onboarding/hooks.js +1 -1
  347. package/dist/flows/Onboarding/index.d.ts +4 -4
  348. package/dist/flows/Onboarding/index.js +1 -1
  349. package/dist/flows/Onboarding/json-schemas/selectCountryStep.d.ts +3 -0
  350. package/dist/flows/Onboarding/json-schemas/selectCountryStep.js +1 -1
  351. package/dist/flows/Onboarding/types.d.ts +4 -4
  352. package/dist/flows/Onboarding/utils.d.ts +4 -4
  353. package/dist/flows/PayrollAdminOnboarding/PayrollAdminOnboardingFlow.d.ts +5 -5
  354. package/dist/flows/PayrollAdminOnboarding/PayrollAdminOnboardingFlow.js +1 -1
  355. package/dist/flows/PayrollAdminOnboarding/api.d.ts +2 -2
  356. package/dist/flows/PayrollAdminOnboarding/api.js +1 -1
  357. package/dist/flows/PayrollAdminOnboarding/components/AdministrativeDetailsStep.d.ts +3 -3
  358. package/dist/flows/PayrollAdminOnboarding/components/AdministrativeDetailsStep.js +1 -1
  359. package/dist/flows/PayrollAdminOnboarding/components/ContractDetailsStep.d.ts +3 -3
  360. package/dist/flows/PayrollAdminOnboarding/components/ContractDetailsStep.js +1 -1
  361. package/dist/flows/PayrollAdminOnboarding/components/InvitationStep.d.ts +3 -3
  362. package/dist/flows/PayrollAdminOnboarding/components/InvitationStep.js +1 -1
  363. package/dist/flows/PayrollAdminOnboarding/components/PayrollAdminForm.d.ts +2 -2
  364. package/dist/flows/PayrollAdminOnboarding/components/PayrollAdminForm.js +1 -1
  365. package/dist/flows/PayrollAdminOnboarding/components/SelectCountryStep.d.ts +3 -3
  366. package/dist/flows/PayrollAdminOnboarding/components/SelectCountryStep.js +1 -1
  367. package/dist/flows/PayrollAdminOnboarding/components/useStepSubmitHandler.d.ts +3 -3
  368. package/dist/flows/PayrollAdminOnboarding/context.d.ts +5 -5
  369. package/dist/flows/PayrollAdminOnboarding/hooks.d.ts +5 -5
  370. package/dist/flows/PayrollAdminOnboarding/hooks.js +1 -1
  371. package/dist/flows/PayrollAdminOnboarding/index.d.ts +5 -5
  372. package/dist/flows/PayrollAdminOnboarding/index.js +1 -1
  373. package/dist/flows/PayrollAdminOnboarding/json-schemas/selectCountryStep.d.ts +3 -0
  374. package/dist/flows/PayrollAdminOnboarding/json-schemas/selectCountryStep.js +1 -1
  375. package/dist/flows/PayrollAdminOnboarding/types.d.ts +5 -5
  376. package/dist/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.d.ts +5 -5
  377. package/dist/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.js +1 -1
  378. package/dist/flows/PayrollEmployeeOnboarding/api.d.ts +3 -3
  379. package/dist/flows/PayrollEmployeeOnboarding/api.js +1 -1
  380. package/dist/flows/PayrollEmployeeOnboarding/components/BankAccountStep.d.ts +3 -3
  381. package/dist/flows/PayrollEmployeeOnboarding/components/BankAccountStep.js +1 -1
  382. package/dist/flows/PayrollEmployeeOnboarding/components/FederalTaxesStep.d.ts +3 -3
  383. package/dist/flows/PayrollEmployeeOnboarding/components/FederalTaxesStep.js +1 -1
  384. package/dist/flows/PayrollEmployeeOnboarding/components/HomeAddressStep.d.ts +3 -3
  385. package/dist/flows/PayrollEmployeeOnboarding/components/HomeAddressStep.js +1 -1
  386. package/dist/flows/PayrollEmployeeOnboarding/components/PayrollEmployeeForm.d.ts +2 -2
  387. package/dist/flows/PayrollEmployeeOnboarding/components/PayrollEmployeeForm.js +1 -1
  388. package/dist/flows/PayrollEmployeeOnboarding/components/PersonalDetailsStep.d.ts +3 -3
  389. package/dist/flows/PayrollEmployeeOnboarding/components/PersonalDetailsStep.js +1 -1
  390. package/dist/flows/PayrollEmployeeOnboarding/components/StateTaxesStep.d.ts +3 -3
  391. package/dist/flows/PayrollEmployeeOnboarding/components/StateTaxesStep.js +1 -1
  392. package/dist/flows/PayrollEmployeeOnboarding/components/useEmployeeStepSubmitHandler.d.ts +3 -3
  393. package/dist/flows/PayrollEmployeeOnboarding/context.d.ts +5 -5
  394. package/dist/flows/PayrollEmployeeOnboarding/hooks.d.ts +5 -5
  395. package/dist/flows/PayrollEmployeeOnboarding/hooks.js +1 -1
  396. package/dist/flows/PayrollEmployeeOnboarding/index.d.ts +5 -5
  397. package/dist/flows/PayrollEmployeeOnboarding/index.js +1 -1
  398. package/dist/flows/PayrollEmployeeOnboarding/types.d.ts +5 -5
  399. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -4
  400. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  401. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +4 -4
  402. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  403. package/dist/flows/Termination/PaidTimeOffForm.d.ts +4 -4
  404. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  405. package/dist/flows/Termination/TerminationDetailsForm.d.ts +4 -4
  406. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  407. package/dist/flows/Termination/TerminationFlow.d.ts +4 -4
  408. package/dist/flows/Termination/TerminationFlow.js +1 -1
  409. package/dist/flows/Termination/TerminationForm.d.ts +4 -4
  410. package/dist/flows/Termination/TerminationForm.js +1 -1
  411. package/dist/flows/Termination/api.d.ts +5 -5
  412. package/dist/flows/Termination/api.js +1 -1
  413. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
  414. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +6 -6
  415. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +6 -6
  416. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
  417. package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +6 -6
  418. package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
  419. package/dist/flows/Termination/context.d.ts +4 -4
  420. package/dist/flows/Termination/hooks.d.ts +4 -4
  421. package/dist/flows/Termination/hooks.js +1 -1
  422. package/dist/flows/Termination/index.d.ts +6 -6
  423. package/dist/flows/Termination/index.js +1 -1
  424. package/dist/flows/Termination/json-schemas/additionalInformation.d.ts +1 -1
  425. package/dist/flows/Termination/json-schemas/additionalInformation.js +1 -1
  426. package/dist/flows/Termination/json-schemas/defaultSchema.d.ts +1 -1
  427. package/dist/flows/Termination/json-schemas/defaultSchema.js +1 -1
  428. package/dist/flows/Termination/json-schemas/employeeComunication.d.ts +1 -1
  429. package/dist/flows/Termination/json-schemas/employeeComunication.js +1 -1
  430. package/dist/flows/Termination/json-schemas/jsonSchema.d.ts +1 -1
  431. package/dist/flows/Termination/json-schemas/jsonSchema.js +1 -1
  432. package/dist/flows/Termination/json-schemas/paidTimeOff.d.ts +1 -1
  433. package/dist/flows/Termination/json-schemas/paidTimeOff.js +1 -1
  434. package/dist/flows/Termination/json-schemas/schema.d.ts +4 -4
  435. package/dist/flows/Termination/json-schemas/schema.js +1 -1
  436. package/dist/flows/Termination/json-schemas/terminationDetails.d.ts +1 -1
  437. package/dist/flows/Termination/json-schemas/terminationDetails.js +1 -1
  438. package/dist/flows/Termination/types.d.ts +4 -4
  439. package/dist/flows/Termination/utils.d.ts +4 -4
  440. package/dist/flows/types.d.ts +3 -3
  441. package/dist/flows/utils.d.ts +2 -2
  442. package/dist/index.css +1 -1
  443. package/dist/index.css.map +1 -1
  444. package/dist/index.d.ts +18 -17
  445. package/dist/index.js +2 -2
  446. package/dist/internals.d.ts +4 -4
  447. package/dist/internals.js +1 -1
  448. package/dist/{mutations-Dg60ZjS0.d.ts → mutations-BGNKrV99.d.ts} +1 -1
  449. package/dist/{remoteFlows-7WBvzlJt.d.ts → remoteFlows-2MK_3sLb.d.ts} +2 -2
  450. package/dist/styles.css +1 -1
  451. package/dist/styles.css.map +1 -1
  452. package/dist/{types-CI8Tx4se.d.ts → types-B2bPNE86.d.ts} +3 -3
  453. package/dist/{types-CT7w2kHS.d.ts → types-BOB-WNJe.d.ts} +2 -2
  454. package/dist/{types-CgNwKzZf.d.ts → types-BPLbQPfI.d.ts} +3 -3
  455. package/dist/{types--IwjF9ei.d.ts → types-BZ58yiMu.d.ts} +7 -37
  456. package/dist/{types-1IycaCkN.d.ts → types-CJocMMvX.d.ts} +5 -5
  457. package/dist/{types-DmvLgred.d.ts → types-DvJ4fXde.d.ts} +1 -1
  458. package/dist/types-DvsjrBmu.d.ts +15 -0
  459. package/dist/{types-DPlWZa2M.d.ts → types-Ke3uSWQH.d.ts} +3 -3
  460. package/dist/{types-CJHW5xRl.d.ts → types-g4Cxg_cb.d.ts} +1 -1
  461. package/dist/{types.gen-TcbORUL-.d.ts → types.gen-ByX93X_n.d.ts} +1 -1
  462. package/dist/{utils-DSHROBN2.d.ts → utils-Douv08HR.d.ts} +1 -1
  463. package/package.json +4 -3
  464. package/dist/CheckboxFieldDefault-JOUZXB4Y.js +0 -2
  465. package/dist/CountryFieldDefault-IZQOFNX5.js +0 -2
  466. package/dist/DatePickerFieldDefault-AWV7LUPI.js +0 -2
  467. package/dist/EmailFieldDefault-QVKXB67I.js +0 -2
  468. package/dist/FileUploadFieldDefault-NZ33IMPU.js +0 -2
  469. package/dist/ForcedValueFieldDefault-RY5AN7O6.js +0 -2
  470. package/dist/MultiSelectFieldDefault-DOZQUBEE.js +0 -2
  471. package/dist/NumberFieldDefault-O7OKTFG4.js +0 -2
  472. package/dist/PDFPreviewDefault-HSSMYKV5.js +0 -2
  473. package/dist/RadioGroupFieldDefault-GFDO56LK.js +0 -2
  474. package/dist/SelectFieldDefault-E4KFZBJ7.js +0 -2
  475. package/dist/TelFieldDefault-2EPAKDTW.js +0 -2
  476. package/dist/TextAreaFieldDefault-WZIVM4RZ.js +0 -2
  477. package/dist/TextFieldDefault-YVXZO4AN.js +0 -2
  478. package/dist/TimeFieldDefault-JN4MDIO6.js +0 -2
  479. package/dist/WorkScheduleFieldDefault-23WY3SVD.js +0 -2
  480. package/dist/chunk-3OKB5OHA.js +0 -2
  481. package/dist/chunk-3OKB5OHA.js.map +0 -1
  482. package/dist/chunk-4BHEQMZV.js +0 -2
  483. package/dist/chunk-53QBSOMG.js +0 -2
  484. package/dist/chunk-5YI7MY5T.js +0 -2
  485. package/dist/chunk-5YI7MY5T.js.map +0 -1
  486. package/dist/chunk-A7U3KJIP.js +0 -2
  487. package/dist/chunk-AUPAAQUT.js +0 -2
  488. package/dist/chunk-AUPAAQUT.js.map +0 -1
  489. package/dist/chunk-B4O5YUYL.js +0 -2
  490. package/dist/chunk-CONMRDRL.js +0 -2
  491. package/dist/chunk-DDMXUBCN.js +0 -2
  492. package/dist/chunk-DP6L72YF.js +0 -2
  493. package/dist/chunk-DYIMRD6T.js +0 -2
  494. package/dist/chunk-DYIMRD6T.js.map +0 -1
  495. package/dist/chunk-EMMFAZZC.js +0 -2
  496. package/dist/chunk-GIZQZBHB.js +0 -2
  497. package/dist/chunk-GIZQZBHB.js.map +0 -1
  498. package/dist/chunk-HMJ4PIDI.js +0 -2
  499. package/dist/chunk-HMJ4PIDI.js.map +0 -1
  500. package/dist/chunk-I4DU34BA.js +0 -2
  501. package/dist/chunk-I4DU34BA.js.map +0 -1
  502. package/dist/chunk-IHGCXP2X.js +0 -2
  503. package/dist/chunk-IHGCXP2X.js.map +0 -1
  504. package/dist/chunk-LSUBNZ64.js +0 -2
  505. package/dist/chunk-LSUBNZ64.js.map +0 -1
  506. package/dist/chunk-NAFECQWK.js +0 -2
  507. package/dist/chunk-NYR6FVCU.js +0 -2
  508. package/dist/chunk-PUK2TIQX.js +0 -2
  509. package/dist/chunk-QQPF2DUF.js +0 -2
  510. package/dist/chunk-QQPF2DUF.js.map +0 -1
  511. package/dist/chunk-QQV5REGG.js +0 -8
  512. package/dist/chunk-R5ADEPLC.js +0 -2
  513. package/dist/chunk-ROO2IFBF.js +0 -2
  514. package/dist/chunk-ROO2IFBF.js.map +0 -1
  515. package/dist/chunk-SVU7GWUR.js +0 -2
  516. package/dist/chunk-SVU7GWUR.js.map +0 -1
  517. package/dist/chunk-SVVZOMLQ.js +0 -2
  518. package/dist/chunk-SVVZOMLQ.js.map +0 -1
  519. package/dist/chunk-T5H35HYL.js +0 -2
  520. package/dist/chunk-T5H35HYL.js.map +0 -1
  521. package/dist/chunk-TRDNTXE7.js +0 -2
  522. package/dist/chunk-TRDNTXE7.js.map +0 -1
  523. package/dist/chunk-U4H7URYB.js +0 -2
  524. package/dist/chunk-U4H7URYB.js.map +0 -1
  525. package/dist/chunk-UWHJF45X.js +0 -2
  526. package/dist/chunk-UWHJF45X.js.map +0 -1
  527. package/dist/chunk-VFRHMNLJ.js +0 -2
  528. package/dist/chunk-VFRHMNLJ.js.map +0 -1
  529. package/dist/chunk-VRPZ4GHN.js +0 -2
  530. package/dist/chunk-WRTUY6K3.js +0 -2
  531. package/dist/chunk-WRTUY6K3.js.map +0 -1
  532. package/dist/chunk-WVJDCDGZ.js +0 -2
  533. package/dist/chunk-WVJDCDGZ.js.map +0 -1
  534. package/dist/chunk-ZD4H63AL.js +0 -2
  535. package/dist/chunk-ZD4H63AL.js.map +0 -1
  536. package/dist/createInvoiceSchedule-BweQB6DI.d.ts +0 -195
  537. package/dist/flows/InvoiceSchedule/api.d.ts +0 -47
  538. package/dist/flows/InvoiceSchedule/api.js +0 -2
  539. package/dist/flows/InvoiceSchedule/components/ContractorSelectField.d.ts +0 -20
  540. package/dist/flows/InvoiceSchedule/components/ContractorSelectField.js +0 -2
  541. package/dist/types.gen-Dtb8ECVb.d.ts +0 -308
  542. /package/dist/{CheckboxFieldDefault-JOUZXB4Y.js.map → CheckboxFieldDefault-23VE43PP.js.map} +0 -0
  543. /package/dist/{CountryFieldDefault-IZQOFNX5.js.map → CountryFieldDefault-FVAAL55P.js.map} +0 -0
  544. /package/dist/{DatePickerFieldDefault-AWV7LUPI.js.map → DatePickerFieldDefault-KXEMGK5B.js.map} +0 -0
  545. /package/dist/{EmailFieldDefault-QVKXB67I.js.map → EmailFieldDefault-OFHDLOOT.js.map} +0 -0
  546. /package/dist/{FileUploadFieldDefault-NZ33IMPU.js.map → FileUploadFieldDefault-GX22C22E.js.map} +0 -0
  547. /package/dist/{ForcedValueFieldDefault-RY5AN7O6.js.map → ForcedValueFieldDefault-ESITCZWK.js.map} +0 -0
  548. /package/dist/{MultiSelectFieldDefault-DOZQUBEE.js.map → MultiSelectFieldDefault-DAUBH5JV.js.map} +0 -0
  549. /package/dist/{NumberFieldDefault-O7OKTFG4.js.map → NumberFieldDefault-MXZD7YVE.js.map} +0 -0
  550. /package/dist/{PDFPreviewDefault-HSSMYKV5.js.map → PDFPreviewDefault-T6YPWXGY.js.map} +0 -0
  551. /package/dist/{RadioGroupFieldDefault-GFDO56LK.js.map → RadioGroupFieldDefault-QFUUJGSR.js.map} +0 -0
  552. /package/dist/{SelectFieldDefault-E4KFZBJ7.js.map → SelectFieldDefault-3QTJE222.js.map} +0 -0
  553. /package/dist/{TelFieldDefault-2EPAKDTW.js.map → TelFieldDefault-5U5X37LI.js.map} +0 -0
  554. /package/dist/{TextAreaFieldDefault-WZIVM4RZ.js.map → TextAreaFieldDefault-JX2MVJVY.js.map} +0 -0
  555. /package/dist/{TextFieldDefault-YVXZO4AN.js.map → TextFieldDefault-WCUD6XYS.js.map} +0 -0
  556. /package/dist/{TimeFieldDefault-JN4MDIO6.js.map → TimeFieldDefault-UNF7PKLT.js.map} +0 -0
  557. /package/dist/{WorkScheduleFieldDefault-23WY3SVD.js.map → WorkScheduleFieldDefault-2A2RCDXV.js.map} +0 -0
  558. /package/dist/{chunk-SLRPDXK6.js.map → chunk-235XZBTZ.js.map} +0 -0
  559. /package/dist/{chunk-VVZTXCX2.js.map → chunk-2SD75ZFL.js.map} +0 -0
  560. /package/dist/{chunk-GE74QKS6.js.map → chunk-335N2CVQ.js.map} +0 -0
  561. /package/dist/{chunk-STHZZZRL.js.map → chunk-3BDWVNHX.js.map} +0 -0
  562. /package/dist/{chunk-ZREW7KZA.js.map → chunk-3DOSHTJS.js.map} +0 -0
  563. /package/dist/{chunk-SZI67IXU.js.map → chunk-3HMBTPH7.js.map} +0 -0
  564. /package/dist/{chunk-NTPHMYYC.js.map → chunk-3NC2JJM3.js.map} +0 -0
  565. /package/dist/{chunk-ED35NFA6.js.map → chunk-3OHORFIX.js.map} +0 -0
  566. /package/dist/{chunk-WGO25FWG.js.map → chunk-3WRO57UF.js.map} +0 -0
  567. /package/dist/{chunk-4CNDASPA.js.map → chunk-4AQMMGXK.js.map} +0 -0
  568. /package/dist/{chunk-G6EKGJBB.js.map → chunk-4BFGSBOK.js.map} +0 -0
  569. /package/dist/{chunk-FSCAWXCB.js.map → chunk-57QHHIWL.js.map} +0 -0
  570. /package/dist/{chunk-RZL44CPH.js.map → chunk-57Y5XQ3D.js.map} +0 -0
  571. /package/dist/{chunk-P6FFLJDP.js.map → chunk-5DPOL3DT.js.map} +0 -0
  572. /package/dist/{chunk-FV6NNYDP.js.map → chunk-5FST4WDH.js.map} +0 -0
  573. /package/dist/{chunk-46BOEYFO.js.map → chunk-6OLV37C2.js.map} +0 -0
  574. /package/dist/{chunk-UGQNOBQH.js.map → chunk-6UCTTR3O.js.map} +0 -0
  575. /package/dist/{chunk-SUYI33NX.js.map → chunk-6X4SQPQF.js.map} +0 -0
  576. /package/dist/{chunk-D6PMXNBM.js.map → chunk-72EMS5WI.js.map} +0 -0
  577. /package/dist/{chunk-VKUGCD5J.js.map → chunk-72ZOHLOK.js.map} +0 -0
  578. /package/dist/{chunk-EVUTX6TJ.js.map → chunk-77LDJPXF.js.map} +0 -0
  579. /package/dist/{chunk-OWOIDZHI.js.map → chunk-7Y4NHODP.js.map} +0 -0
  580. /package/dist/{chunk-5PUW4YCY.js.map → chunk-AAHPOX44.js.map} +0 -0
  581. /package/dist/{chunk-GBVBMT3H.js.map → chunk-ADL2ZH54.js.map} +0 -0
  582. /package/dist/{chunk-UZFEJMO6.js.map → chunk-AFTFDGSD.js.map} +0 -0
  583. /package/dist/{chunk-NAFECQWK.js.map → chunk-ANPNVWCB.js.map} +0 -0
  584. /package/dist/{chunk-L2YOD4GP.js.map → chunk-APSKAXM2.js.map} +0 -0
  585. /package/dist/{chunk-WKWL57L6.js.map → chunk-BYD4TSDD.js.map} +0 -0
  586. /package/dist/{chunk-CUO7OGD5.js.map → chunk-C3MUUZC6.js.map} +0 -0
  587. /package/dist/{chunk-3G4HOZCM.js.map → chunk-CWKXQZRT.js.map} +0 -0
  588. /package/dist/{chunk-LXGL7HF5.js.map → chunk-DIPYFRXX.js.map} +0 -0
  589. /package/dist/{chunk-JLZFNUBH.js.map → chunk-E7Y3YBZH.js.map} +0 -0
  590. /package/dist/{chunk-GTS7KFEM.js.map → chunk-EQOOVJ7K.js.map} +0 -0
  591. /package/dist/{chunk-LADLAP2S.js.map → chunk-ESXBCNJM.js.map} +0 -0
  592. /package/dist/{chunk-R4ZUOFYN.js.map → chunk-FF5OB2GF.js.map} +0 -0
  593. /package/dist/{chunk-H47XUL2L.js.map → chunk-FFRROEPQ.js.map} +0 -0
  594. /package/dist/{chunk-N7HCQXUM.js.map → chunk-G3BWBRCE.js.map} +0 -0
  595. /package/dist/{chunk-MXAFJYLQ.js.map → chunk-GGTV6IQ3.js.map} +0 -0
  596. /package/dist/{chunk-BTCC6PNG.js.map → chunk-GGVW6SG6.js.map} +0 -0
  597. /package/dist/{chunk-P2WUHKEU.js.map → chunk-GIBD2ZCJ.js.map} +0 -0
  598. /package/dist/{chunk-XDLVDPQ7.js.map → chunk-GNVGW65D.js.map} +0 -0
  599. /package/dist/{chunk-4IGLIHGF.js.map → chunk-GRLZH65T.js.map} +0 -0
  600. /package/dist/{chunk-CCGAAOXN.js.map → chunk-H4NJGAN4.js.map} +0 -0
  601. /package/dist/{chunk-CD6H4MBI.js.map → chunk-HRVJCCWJ.js.map} +0 -0
  602. /package/dist/{chunk-MEYX4D5K.js.map → chunk-I53YCEOC.js.map} +0 -0
  603. /package/dist/{chunk-V3AVEPNA.js.map → chunk-I5NW7AQZ.js.map} +0 -0
  604. /package/dist/{chunk-YME2HZZJ.js.map → chunk-I65OXH33.js.map} +0 -0
  605. /package/dist/{chunk-TX6RWQUR.js.map → chunk-IJS67A57.js.map} +0 -0
  606. /package/dist/{chunk-Z7XLK4JL.js.map → chunk-ILPI4AFS.js.map} +0 -0
  607. /package/dist/{chunk-FQBOMXMX.js.map → chunk-J244N33S.js.map} +0 -0
  608. /package/dist/{chunk-ILMRP364.js.map → chunk-JUSQGITN.js.map} +0 -0
  609. /package/dist/{chunk-GMSYO53D.js.map → chunk-KD7UBTZG.js.map} +0 -0
  610. /package/dist/{chunk-VYTUM3RI.js.map → chunk-KFIUXU6I.js.map} +0 -0
  611. /package/dist/{chunk-G75LPZV5.js.map → chunk-L7FN3XPX.js.map} +0 -0
  612. /package/dist/{chunk-KGNLBYM5.js.map → chunk-LJ32QPJF.js.map} +0 -0
  613. /package/dist/{chunk-7FKNXW2I.js.map → chunk-M7PZAJTR.js.map} +0 -0
  614. /package/dist/{chunk-V6PPOGPT.js.map → chunk-NVOUXFGX.js.map} +0 -0
  615. /package/dist/{chunk-WVE2IOLY.js.map → chunk-OFFUVHQJ.js.map} +0 -0
  616. /package/dist/{chunk-4WSYC3Q5.js.map → chunk-OJ4TXF6G.js.map} +0 -0
  617. /package/dist/{chunk-C7MVEDVY.js.map → chunk-OT5JE2SM.js.map} +0 -0
  618. /package/dist/{chunk-ZOTKZZ67.js.map → chunk-P3TTGECC.js.map} +0 -0
  619. /package/dist/{chunk-RYZ7TJVS.js.map → chunk-PAYZRCKY.js.map} +0 -0
  620. /package/dist/{chunk-QFTBKRUI.js.map → chunk-PJAHLEOR.js.map} +0 -0
  621. /package/dist/{chunk-AAXPKULB.js.map → chunk-PKORRCMX.js.map} +0 -0
  622. /package/dist/{chunk-TJZ5BJV3.js.map → chunk-QUJBIRNY.js.map} +0 -0
  623. /package/dist/{chunk-OKBPMWVB.js.map → chunk-R23HFBV4.js.map} +0 -0
  624. /package/dist/{chunk-5HDMU73I.js.map → chunk-R2XDTYPZ.js.map} +0 -0
  625. /package/dist/{chunk-BB3M25A3.js.map → chunk-R6VNUDBK.js.map} +0 -0
  626. /package/dist/{chunk-XEVHXHHC.js.map → chunk-ROVMQ5NT.js.map} +0 -0
  627. /package/dist/{chunk-6CBC5OAQ.js.map → chunk-SDPYDCS7.js.map} +0 -0
  628. /package/dist/{chunk-NFWKD7UR.js.map → chunk-SUGZPBET.js.map} +0 -0
  629. /package/dist/{chunk-ITCWBZDM.js.map → chunk-UNBTPLJ6.js.map} +0 -0
  630. /package/dist/{chunk-RFMYNPR7.js.map → chunk-URNFXEOZ.js.map} +0 -0
  631. /package/dist/{chunk-XMVV6S77.js.map → chunk-UWIUECXU.js.map} +0 -0
  632. /package/dist/{chunk-JI3PAIMV.js.map → chunk-WHY2WNWH.js.map} +0 -0
  633. /package/dist/{chunk-JVXI4RZU.js.map → chunk-WU66SHVJ.js.map} +0 -0
  634. /package/dist/{chunk-PKJZ2N4C.js.map → chunk-XLHTMWJ3.js.map} +0 -0
  635. /package/dist/{chunk-ZODT3MJM.js.map → chunk-XPLWBO73.js.map} +0 -0
  636. /package/dist/{chunk-BLKWR77C.js.map → chunk-XS5NKKW4.js.map} +0 -0
  637. /package/dist/{chunk-25MUO3XP.js.map → chunk-XTZJKL3C.js.map} +0 -0
  638. /package/dist/{chunk-YHZZHQP5.js.map → chunk-XXBQQH47.js.map} +0 -0
  639. /package/dist/{chunk-5JXLXWTD.js.map → chunk-Y6FOZXIU.js.map} +0 -0
  640. /package/dist/{chunk-DOPQK5RP.js.map → chunk-YANQP45B.js.map} +0 -0
  641. /package/dist/{chunk-XMIVJW5E.js.map → chunk-YWLAZIIO.js.map} +0 -0
  642. /package/dist/{chunk-ILEO7LN4.js.map → chunk-YYIAA47F.js.map} +0 -0
  643. /package/dist/{chunk-ERBEPQJP.js.map → chunk-ZHFGV2GB.js.map} +0 -0
  644. /package/dist/{chunk-2UH6Y56R.js.map → chunk-ZJ55AKB6.js.map} +0 -0
  645. /package/dist/{chunk-GHZABLDV.js.map → chunk-ZULOHKU6.js.map} +0 -0
  646. /package/dist/flows/InvoiceSchedule/{api.js.map → InvoiceSchedulePreviewButton.js.map} +0 -0
  647. /package/dist/flows/{InvoiceSchedule/components/ContractorSelectField.js.map → Onboarding/components/DailySchedule/DailySchedule.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/flows/Termination/json-schemas/terminationDetails.ts"],"sourcesContent":["import { FILE_TYPES, MAX_FILE_SIZE } from '@/src/lib/uploadConfig';\n\nexport const terminationDetailsSchema = {\n data: {\n version: 7,\n schema: {\n additionalProperties: false,\n allOf: [\n {\n if: {\n properties: {\n will_challenge_termination: {\n const: 'yes',\n },\n },\n required: ['will_challenge_termination'],\n },\n then: {\n properties: {\n will_challenge_termination_description: {\n type: 'string',\n },\n },\n required: ['will_challenge_termination_description'],\n },\n else: {\n properties: {\n will_challenge_termination_description: false,\n },\n },\n },\n ],\n properties: {\n termination_reason: {\n title: 'Termination reason',\n description:\n 'Make sure you choose an accurate termination reason to avoid unfair or unlawful dismissal claims.',\n type: 'string',\n oneOf: [\n {\n const: 'gross_misconduct',\n title: 'Gross misconduct',\n },\n {\n const: 'performance',\n title: 'Performance',\n },\n {\n const: 'workforce_reduction',\n title: 'Workforce Reduction',\n },\n {\n const: 'values',\n title: 'Values',\n },\n {\n const: 'compliance_issue',\n title: 'Compliance issue',\n },\n {\n const: 'incapacity_to_perform_inherent_duties',\n title: 'Incapacity To perform inherent duties',\n },\n {\n const: 'mutual_agreement',\n title: 'Mutual agreement',\n },\n {\n const: 'cancellation_before_start_date',\n title: 'Decision to cancel hiring before the employee starts',\n },\n {\n const: 'job_abandonment',\n title: 'Job abandonment',\n },\n {\n const: 'dissatisfaction_with_remote_service',\n title: 'Dissatisfaction with EOR service',\n },\n {\n const: 'end_of_fixed_term_contract_compliance_issue',\n title: 'End of fixed-term contract',\n },\n {\n const: 'other',\n title: 'Other',\n },\n ],\n 'x-jsf-presentation': {\n inputType: 'select',\n },\n },\n reason_description: {\n description: '',\n maxLength: 1000,\n title: 'Termination reason details',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'textarea',\n },\n },\n additional_comments: {\n description: '',\n maxLength: 1000,\n title: 'Additional details regarding this termination process.',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'textarea',\n },\n },\n termination_reason_files: {\n description:\n 'Please upload any supporting documents regarding the termination reason.',\n title: 'Termination reason files',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'file',\n accept: FILE_TYPES.document,\n multiple: true,\n maxSize: MAX_FILE_SIZE, // maxFileSize doesn't seem to work for some reason, found that this was fixed in @remoteoss/json-schema-form v1\n },\n },\n risk_assesment_info: {\n description: '',\n title: 'Risk assessment info',\n type: 'null',\n 'x-jsf-presentation': {\n inputType: 'hidden',\n },\n },\n risk_assessment_reasons: {\n description: '',\n title: 'This employee is...',\n type: 'array',\n items: {\n anyOf: [\n {\n const: 'sick_leave',\n title: 'Currently on or recently returned from sick leave',\n },\n {\n const: 'family_leave',\n title:\n 'Currently on or recently returned from maternity, paternity, or other family leave',\n },\n {\n const: 'pregnant_or_breastfeeding',\n title: 'Pregnant or breastfeeding',\n },\n {\n const: 'requested_medical_or_family_leave',\n title: 'Requested medical or family leave',\n },\n {\n const: 'disabled_or_health_condition',\n title: 'Disabled or has a health condition',\n },\n {\n const: 'member_of_union_or_works_council',\n title: 'A member of a union or works council',\n },\n {\n const: 'caring_responsibilities',\n title: 'Caring responsibilities',\n },\n {\n const: 'reported_concerns_with_workplace',\n title:\n 'Reported any wrongdoing; raised any allegations of discrimination, harassment, retaliation, etc.; or asserted their employment rights or raised complaints about their working conditions',\n },\n {\n const: 'none_of_these',\n title:\n 'To the best of my knowledge, I am not aware of any of these',\n },\n ],\n },\n 'x-jsf-presentation': {\n inputType: 'checkbox',\n direction: 'column',\n },\n },\n will_challenge_termination: {\n description: '',\n oneOf: [\n {\n const: 'yes',\n description: '',\n title: 'Yes',\n },\n {\n const: 'no',\n description: '',\n title: 'No',\n },\n ],\n title:\n 'Do you consider it is likely that the employee will challenge their termination?',\n type: 'string',\n 'x-jsf-presentation': {\n direction: 'column',\n inputType: 'radio',\n },\n },\n will_challenge_termination_description: {\n description: '',\n maxLength: 1000,\n title:\n 'Please explain how the employee will challenge their termination',\n type: ['string', 'null'],\n 'x-jsf-presentation': {\n inputType: 'textarea',\n },\n },\n proposed_termination_date_info: {\n description: '',\n title: 'Proposed termination date info',\n type: 'null',\n 'x-jsf-presentation': {\n inputType: 'hidden',\n },\n },\n proposed_termination_date: {\n description:\n 'Please note that we cannot commit to a termination date until we conduct a full review of the information you submit.',\n format: 'date',\n maxLength: 255,\n title: 'Proposed termination date',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'date',\n },\n },\n },\n required: [\n 'termination_reason',\n 'reason_description',\n 'risk_assessment_reasons',\n 'will_challenge_termination',\n 'proposed_termination_date',\n ],\n type: 'object',\n 'x-jsf-order': [\n 'termination_reason',\n 'reason_description',\n 'additional_comments',\n 'termination_reason_files',\n 'risk_assesment_info',\n 'risk_assessment_reasons',\n 'will_challenge_termination',\n 'will_challenge_termination_description',\n 'proposed_termination_date_info',\n 'proposed_termination_date',\n ],\n 'x-rmt-meta': {\n jsfVersion: '1',\n },\n },\n },\n};\n"],"mappings":"wCAEO,IAAMA,EAA2B,CACtC,KAAM,CACJ,QAAS,EACT,OAAQ,CACN,qBAAsB,GACtB,MAAO,CACL,CACE,GAAI,CACF,WAAY,CACV,2BAA4B,CAC1B,MAAO,KACT,CACF,EACA,SAAU,CAAC,4BAA4B,CACzC,EACA,KAAM,CACJ,WAAY,CACV,uCAAwC,CACtC,KAAM,QACR,CACF,EACA,SAAU,CAAC,wCAAwC,CACrD,EACA,KAAM,CACJ,WAAY,CACV,uCAAwC,EAC1C,CACF,CACF,CACF,EACA,WAAY,CACV,mBAAoB,CAClB,MAAO,qBACP,YACE,oGACF,KAAM,SACN,MAAO,CACL,CACE,MAAO,mBACP,MAAO,kBACT,EACA,CACE,MAAO,cACP,MAAO,aACT,EACA,CACE,MAAO,sBACP,MAAO,qBACT,EACA,CACE,MAAO,SACP,MAAO,QACT,EACA,CACE,MAAO,mBACP,MAAO,kBACT,EACA,CACE,MAAO,wCACP,MAAO,uCACT,EACA,CACE,MAAO,mBACP,MAAO,kBACT,EACA,CACE,MAAO,iCACP,MAAO,sDACT,EACA,CACE,MAAO,kBACP,MAAO,iBACT,EACA,CACE,MAAO,sCACP,MAAO,kCACT,EACA,CACE,MAAO,8CACP,MAAO,4BACT,EACA,CACE,MAAO,QACP,MAAO,OACT,CACF,EACA,qBAAsB,CACpB,UAAW,QACb,CACF,EACA,mBAAoB,CAClB,YAAa,GACb,UAAW,IACX,MAAO,6BACP,KAAM,SACN,qBAAsB,CACpB,UAAW,UACb,CACF,EACA,oBAAqB,CACnB,YAAa,GACb,UAAW,IACX,MAAO,yDACP,KAAM,SACN,qBAAsB,CACpB,UAAW,UACb,CACF,EACA,yBAA0B,CACxB,YACE,2EACF,MAAO,2BACP,KAAM,SACN,qBAAsB,CACpB,UAAW,OACX,OAAQC,EAAW,SACnB,SAAU,GACV,QAAS,QACX,CACF,EACA,oBAAqB,CACnB,YAAa,GACb,MAAO,uBACP,KAAM,OACN,qBAAsB,CACpB,UAAW,QACb,CACF,EACA,wBAAyB,CACvB,YAAa,GACb,MAAO,sBACP,KAAM,QACN,MAAO,CACL,MAAO,CACL,CACE,MAAO,aACP,MAAO,mDACT,EACA,CACE,MAAO,eACP,MACE,oFACJ,EACA,CACE,MAAO,4BACP,MAAO,2BACT,EACA,CACE,MAAO,oCACP,MAAO,mCACT,EACA,CACE,MAAO,+BACP,MAAO,oCACT,EACA,CACE,MAAO,mCACP,MAAO,sCACT,EACA,CACE,MAAO,0BACP,MAAO,yBACT,EACA,CACE,MAAO,mCACP,MACE,2LACJ,EACA,CACE,MAAO,gBACP,MACE,6DACJ,CACF,CACF,EACA,qBAAsB,CACpB,UAAW,WACX,UAAW,QACb,CACF,EACA,2BAA4B,CAC1B,YAAa,GACb,MAAO,CACL,CACE,MAAO,MACP,YAAa,GACb,MAAO,KACT,EACA,CACE,MAAO,KACP,YAAa,GACb,MAAO,IACT,CACF,EACA,MACE,mFACF,KAAM,SACN,qBAAsB,CACpB,UAAW,SACX,UAAW,OACb,CACF,EACA,uCAAwC,CACtC,YAAa,GACb,UAAW,IACX,MACE,mEACF,KAAM,CAAC,SAAU,MAAM,EACvB,qBAAsB,CACpB,UAAW,UACb,CACF,EACA,+BAAgC,CAC9B,YAAa,GACb,MAAO,iCACP,KAAM,OACN,qBAAsB,CACpB,UAAW,QACb,CACF,EACA,0BAA2B,CACzB,YACE,wHACF,OAAQ,OACR,UAAW,IACX,MAAO,4BACP,KAAM,SACN,qBAAsB,CACpB,UAAW,MACb,CACF,CACF,EACA,SAAU,CACR,qBACA,qBACA,0BACA,6BACA,2BACF,EACA,KAAM,SACN,cAAe,CACb,qBACA,qBACA,sBACA,2BACA,sBACA,0BACA,6BACA,yCACA,iCACA,2BACF,EACA,aAAc,CACZ,WAAY,GACd,CACF,CACF,CACF","names":["terminationDetailsSchema","FILE_TYPES"]}
1
+ {"version":3,"sources":["../src/flows/Termination/json-schemas/terminationDetails.ts"],"sourcesContent":["import { FILE_TYPES, MAX_FILE_SIZE } from '@/src/lib/uploadConfig';\n\nexport const terminationDetailsSchema = {\n data: {\n version: 7,\n schema: {\n additionalProperties: false,\n allOf: [\n {\n if: {\n properties: {\n will_challenge_termination: {\n const: 'yes',\n },\n },\n required: ['will_challenge_termination'],\n },\n then: {\n properties: {\n will_challenge_termination_description: {\n type: 'string',\n },\n },\n required: ['will_challenge_termination_description'],\n },\n else: {\n properties: {\n will_challenge_termination_description: false,\n },\n },\n },\n ],\n properties: {\n termination_reason: {\n title: 'Termination reason',\n description:\n 'Make sure you choose an accurate termination reason to avoid unfair or unlawful dismissal claims.',\n type: 'string',\n oneOf: [\n {\n const: 'gross_misconduct',\n title: 'Gross misconduct',\n },\n {\n const: 'performance',\n title: 'Performance',\n },\n {\n const: 'workforce_reduction',\n title: 'Workforce Reduction',\n },\n {\n const: 'values',\n title: 'Values',\n },\n {\n const: 'compliance_issue',\n title: 'Compliance issue',\n },\n {\n const: 'incapacity_to_perform_inherent_duties',\n title: 'Incapacity To perform inherent duties',\n },\n {\n const: 'mutual_agreement',\n title: 'Mutual agreement',\n },\n {\n const: 'cancellation_before_start_date',\n title: 'Decision to cancel hiring before the employee starts',\n },\n {\n const: 'job_abandonment',\n title: 'Job abandonment',\n },\n {\n const: 'dissatisfaction_with_remote_service',\n title: 'Dissatisfaction with EOR service',\n },\n {\n const: 'end_of_fixed_term_contract_compliance_issue',\n title: 'End of fixed-term contract',\n },\n {\n const: 'other',\n title: 'Other',\n },\n ],\n 'x-jsf-presentation': {\n inputType: 'select',\n },\n },\n reason_description: {\n description: '',\n maxLength: 1000,\n title: 'Termination reason details',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'textarea',\n },\n },\n additional_comments: {\n description: '',\n maxLength: 1000,\n title: 'Additional details regarding this termination process.',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'textarea',\n },\n },\n termination_reason_files: {\n description:\n 'Please upload any supporting documents regarding the termination reason.',\n title: 'Termination reason files',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'file',\n accept: FILE_TYPES.document,\n multiple: true,\n maxSize: MAX_FILE_SIZE, // maxFileSize doesn't seem to work for some reason, found that this was fixed in @remoteoss/json-schema-form v1\n },\n },\n risk_assesment_info: {\n description: '',\n title: 'Risk assessment info',\n type: 'null',\n 'x-jsf-presentation': {\n inputType: 'hidden',\n },\n },\n risk_assessment_reasons: {\n description: '',\n title: 'This employee is...',\n type: 'array',\n items: {\n anyOf: [\n {\n const: 'sick_leave',\n title: 'Currently on or recently returned from sick leave',\n },\n {\n const: 'family_leave',\n title:\n 'Currently on or recently returned from maternity, paternity, or other family leave',\n },\n {\n const: 'pregnant_or_breastfeeding',\n title: 'Pregnant or breastfeeding',\n },\n {\n const: 'requested_medical_or_family_leave',\n title: 'Requested medical or family leave',\n },\n {\n const: 'disabled_or_health_condition',\n title: 'Disabled or has a health condition',\n },\n {\n const: 'member_of_union_or_works_council',\n title: 'A member of a union or works council',\n },\n {\n const: 'caring_responsibilities',\n title: 'Caring responsibilities',\n },\n {\n const: 'reported_concerns_with_workplace',\n title:\n 'Reported any wrongdoing; raised any allegations of discrimination, harassment, retaliation, etc.; or asserted their employment rights or raised complaints about their working conditions',\n },\n {\n const: 'none_of_these',\n title:\n 'To the best of my knowledge, I am not aware of any of these',\n },\n ],\n },\n 'x-jsf-presentation': {\n inputType: 'checkbox',\n direction: 'column',\n },\n },\n will_challenge_termination: {\n description: '',\n oneOf: [\n {\n const: 'yes',\n description: '',\n title: 'Yes',\n },\n {\n const: 'no',\n description: '',\n title: 'No',\n },\n ],\n title:\n 'Do you consider it is likely that the employee will challenge their termination?',\n type: 'string',\n 'x-jsf-presentation': {\n direction: 'column',\n inputType: 'radio',\n },\n },\n will_challenge_termination_description: {\n description: '',\n maxLength: 1000,\n title:\n 'Please explain how the employee will challenge their termination',\n type: ['string', 'null'],\n 'x-jsf-presentation': {\n inputType: 'textarea',\n },\n },\n proposed_termination_date_info: {\n description: '',\n title: 'Proposed termination date info',\n type: 'null',\n 'x-jsf-presentation': {\n inputType: 'hidden',\n },\n },\n proposed_termination_date: {\n description:\n 'Please note that we cannot commit to a termination date until we conduct a full review of the information you submit.',\n format: 'date',\n maxLength: 255,\n title: 'Proposed termination date',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'date',\n },\n },\n },\n required: [\n 'termination_reason',\n 'reason_description',\n 'risk_assessment_reasons',\n 'will_challenge_termination',\n 'proposed_termination_date',\n ],\n type: 'object',\n 'x-jsf-order': [\n 'termination_reason',\n 'reason_description',\n 'additional_comments',\n 'termination_reason_files',\n 'risk_assesment_info',\n 'risk_assessment_reasons',\n 'will_challenge_termination',\n 'will_challenge_termination_description',\n 'proposed_termination_date_info',\n 'proposed_termination_date',\n ],\n 'x-rmt-meta': {\n jsfOldVersion: true,\n },\n },\n },\n};\n"],"mappings":"wCAEO,IAAMA,EAA2B,CACtC,KAAM,CACJ,QAAS,EACT,OAAQ,CACN,qBAAsB,GACtB,MAAO,CACL,CACE,GAAI,CACF,WAAY,CACV,2BAA4B,CAC1B,MAAO,KACT,CACF,EACA,SAAU,CAAC,4BAA4B,CACzC,EACA,KAAM,CACJ,WAAY,CACV,uCAAwC,CACtC,KAAM,QACR,CACF,EACA,SAAU,CAAC,wCAAwC,CACrD,EACA,KAAM,CACJ,WAAY,CACV,uCAAwC,EAC1C,CACF,CACF,CACF,EACA,WAAY,CACV,mBAAoB,CAClB,MAAO,qBACP,YACE,oGACF,KAAM,SACN,MAAO,CACL,CACE,MAAO,mBACP,MAAO,kBACT,EACA,CACE,MAAO,cACP,MAAO,aACT,EACA,CACE,MAAO,sBACP,MAAO,qBACT,EACA,CACE,MAAO,SACP,MAAO,QACT,EACA,CACE,MAAO,mBACP,MAAO,kBACT,EACA,CACE,MAAO,wCACP,MAAO,uCACT,EACA,CACE,MAAO,mBACP,MAAO,kBACT,EACA,CACE,MAAO,iCACP,MAAO,sDACT,EACA,CACE,MAAO,kBACP,MAAO,iBACT,EACA,CACE,MAAO,sCACP,MAAO,kCACT,EACA,CACE,MAAO,8CACP,MAAO,4BACT,EACA,CACE,MAAO,QACP,MAAO,OACT,CACF,EACA,qBAAsB,CACpB,UAAW,QACb,CACF,EACA,mBAAoB,CAClB,YAAa,GACb,UAAW,IACX,MAAO,6BACP,KAAM,SACN,qBAAsB,CACpB,UAAW,UACb,CACF,EACA,oBAAqB,CACnB,YAAa,GACb,UAAW,IACX,MAAO,yDACP,KAAM,SACN,qBAAsB,CACpB,UAAW,UACb,CACF,EACA,yBAA0B,CACxB,YACE,2EACF,MAAO,2BACP,KAAM,SACN,qBAAsB,CACpB,UAAW,OACX,OAAQC,EAAW,SACnB,SAAU,GACV,QAAS,QACX,CACF,EACA,oBAAqB,CACnB,YAAa,GACb,MAAO,uBACP,KAAM,OACN,qBAAsB,CACpB,UAAW,QACb,CACF,EACA,wBAAyB,CACvB,YAAa,GACb,MAAO,sBACP,KAAM,QACN,MAAO,CACL,MAAO,CACL,CACE,MAAO,aACP,MAAO,mDACT,EACA,CACE,MAAO,eACP,MACE,oFACJ,EACA,CACE,MAAO,4BACP,MAAO,2BACT,EACA,CACE,MAAO,oCACP,MAAO,mCACT,EACA,CACE,MAAO,+BACP,MAAO,oCACT,EACA,CACE,MAAO,mCACP,MAAO,sCACT,EACA,CACE,MAAO,0BACP,MAAO,yBACT,EACA,CACE,MAAO,mCACP,MACE,2LACJ,EACA,CACE,MAAO,gBACP,MACE,6DACJ,CACF,CACF,EACA,qBAAsB,CACpB,UAAW,WACX,UAAW,QACb,CACF,EACA,2BAA4B,CAC1B,YAAa,GACb,MAAO,CACL,CACE,MAAO,MACP,YAAa,GACb,MAAO,KACT,EACA,CACE,MAAO,KACP,YAAa,GACb,MAAO,IACT,CACF,EACA,MACE,mFACF,KAAM,SACN,qBAAsB,CACpB,UAAW,SACX,UAAW,OACb,CACF,EACA,uCAAwC,CACtC,YAAa,GACb,UAAW,IACX,MACE,mEACF,KAAM,CAAC,SAAU,MAAM,EACvB,qBAAsB,CACpB,UAAW,UACb,CACF,EACA,+BAAgC,CAC9B,YAAa,GACb,MAAO,iCACP,KAAM,OACN,qBAAsB,CACpB,UAAW,QACb,CACF,EACA,0BAA2B,CACzB,YACE,wHACF,OAAQ,OACR,UAAW,IACX,MAAO,4BACP,KAAM,SACN,qBAAsB,CACpB,UAAW,MACb,CACF,CACF,EACA,SAAU,CACR,qBACA,qBACA,0BACA,6BACA,2BACF,EACA,KAAM,SACN,cAAe,CACb,qBACA,qBACA,sBACA,2BACA,sBACA,0BACA,6BACA,yCACA,iCACA,2BACF,EACA,aAAc,CACZ,cAAe,EACjB,CACF,CACF,CACF","names":["terminationDetailsSchema","FILE_TYPES"]}
@@ -1,2 +1,2 @@
1
- import{a as ee}from"./chunk-CONMRDRL.js";import{a as C}from"./chunk-HN5HLFTB.js";import{a as z}from"./chunk-VFRHMNLJ.js";import{a as W,b as X,c as Y,f as Z}from"./chunk-NYR6FVCU.js";import{a as I}from"./chunk-KFYWUBRS.js";import{c as te}from"./chunk-DYIMRD6T.js";import{a as Q}from"./chunk-XFVXRCMH.js";import{b as G,h as M}from"./chunk-C4HFMTSB.js";import{a as o}from"./chunk-P37U34EQ.js";import{number as Te,object as le}from"yup";import{useCallback as we,useEffect as ne,useMemo as Re,useRef as Pe,useState as j}from"react";import{string as re,ValidationError as ie}from"yup";import{jsx as ae}from"react/jsx-runtime";var O={title:"Estimation",includeBenefits:!1,includeCostBreakdowns:!1,includePremiumBenefits:!1,enableCurrencyConversion:!1,includeEstimationTitle:!1,includeManagementFee:!1},xe=o(t=>Q(z.data.schema,void 0,t),"useStaticSchema");function Be(t,i){if(typeof t=="object"&&t!==null&&"title"in t){let l=t.title;if(l)return l}return i==="my_hiring_budget"?"Hiring budget":"Employee's annual salary"}o(Be,"getSalaryTitle");var Qe=o(({defaultRegion:t,defaultCurrency:i,defaultSalary:l,estimationOptions:s,options:n,version:a}={estimationOptions:O})=>{let c=Pe({fields:{}}),[k,h]=j(t),[w,R]=j(),[m,q]=j(),[H,ce]=j(),{data:_,isLoading:ue}=W({includePremiumBenefits:s.includePremiumBenefits}),{data:d,isLoading:me}=X(),de=k||w?.value,{data:P,isLoading:fe}=Z(de,{includePremiumBenefits:s.includePremiumBenefits,options:n}),U=Y(),{mutateAsync:ge}=G(U),b=w?.currency,p=n?.jsfModify?.fields?.salary,F=p&&typeof p=="object"&&"presentation"in p?p.presentation:void 0,L=we(()=>{let e=b&&m?b!==m:!1;return b!==m?{from:m,to:b,shouldSwapOrder:e}:{from:b,to:m,shouldSwapOrder:e}},[b,m]),D=s.showManagementFee,J=s.includeEstimationTitle,$=n?.features?.includes("split_salary_description")??!1,ye=Re(()=>{let{from:e,to:r,shouldSwapOrder:u}=L(),g=Be(p,H);return{fields:{salary:{...p,title:g,presentation:{salary_conversion_properties:{label:F?.salary_conversion_properties?.label,description:F?.salary_conversion_properties?.description},currencies:{from:e,to:r},Component:o(y=>ae(ee,{...y,shouldSwapOrder:u,conversionType:a==="marketing"?"no_spread":"spread",defaultValue:l,splitDescription:$}),"Component")}},hiring_budget:{...n?.jsfModify?.fields?.hiring_budget,presentation:{hidden:a=="marketing"}},management:{...n?.jsfModify?.fields?.management,properties:{...n?.jsfModify?.fields?.management?.properties,management_fee:{...n?.jsfModify?.fields?.management?.properties?.management_fee,"x-jsf-presentation":{inputType:"money",additionalProps:{currency:m||"USD"}}}},presentation:{...typeof n?.jsfModify?.fields?.management=="object"?(n?.jsfModify?.fields?.management)["x-jsf-presentation"]:{},hidden:!D,Component:o(y=>ae(te,{...y,variant:"inset",features:{toggle:{enabled:!0,stateField:"management._expanded",labels:{expand:"Define",collapse:"Remove"}}}}),"Component")}},estimation_title:{...n?.jsfModify?.fields?.estimation_title,"x-jsf-presentation":{hidden:!J}}}}},[L,p,H,F?.salary_conversion_properties?.label,F?.salary_conversion_properties?.description,n?.jsfModify?.fields?.hiring_budget,n?.jsfModify?.fields?.management,n?.jsfModify?.fields?.estimation_title,a,m,D,J,l,$]),f=xe({jsfModify:{fields:{...n?.jsfModify?.fields,...ye?.fields}}});ne(()=>{if(t&&_){let e=_.find(({value:r})=>r===t);e&&R(e)}},[t,_]),ne(()=>{if(i&&d){let e=d.find(({value:r})=>r===i);e&&q(e.label)}},[i,d]);async function pe(e){return ge(se(e,s,a))}o(pe,"onSubmit");function Ce(e){let r=_?.find(({value:u})=>u===e);r&&r.childRegions.length===0&&r.hasAdditionalFields?h(r.regionSlug):h(void 0),R(r)}o(Ce,"onCountryChange");function _e(e){h(e)}o(_e,"onRegionChange");function be(e){ce(e.target.value)}o(be,"onHiringBudgetChange");function Se(e){let r=d?.find(u=>u.value===e)?.label;q(r),n?.onCurrencyChange?.(r||"")}o(Se,"onChangeCurrency");let S=f.fields.find(e=>e.name==="region");if(S){let e=w?.childRegions.map(r=>({value:r.slug,label:r.name}))??[];S.options=e,S.isVisible=e.length>0,S.required=e.length>0,S.onChange=_e,S.schema=e.length>0?re().transform(r=>typeof r=="string"?r:"").required("Region is required"):re()}if(d){let e=f.fields.find(r=>r.name==="currency");e&&(e.options=d,e.onChange=Se)}let v=f.fields.find(e=>e.name==="hiring_budget");if(v&&(v.onChange=be),_){let e=f.fields.find(r=>r.name==="country");e&&(e.options=_,e.onChange=Ce)}let Ee=o(()=>{R(void 0),h(t)},"resetForm"),N=[...f.fields.filter(e=>e.name!=="management"),...P?.fields||[],...f.fields.filter(e=>e.name==="management")],K=oe(f.fields,m||"USD",s.includeEstimationTitle);async function he(e){let r=null;n?.onValidation?.(e);let u=await M(e,N);try{await K.validate(u,{abortEarly:!1}),r={formErrors:{},yupError:new ie([],e)}}catch(E){let B=I(E);r={formErrors:Object.entries(B).reduce((T,[A,V])=>({...T,[A]:V.message}),{}),yupError:E}}let g=P?.handleValidation(u),y=[...r?.yupError.inner||[],...g?.yupError?.inner||[]],x={...r?.yupError?.value||{},...g?.yupError?.value||{}};return{formErrors:{...r?.formErrors||{},...g?.formErrors||{}},yupError:new ie(y,x)}}return o(he,"handleValidation"),{stepState:{current:0,total:1,isLastStep:!0},fields:N,validationSchema:K,parseFormValues:o(async e=>{let{country:r,region:u,currency:g,salary_converted:y,hiring_budget:x,salary_conversion:E,management:B,estimation_title:T,...A}=e,V=e.salary;y==="salary_conversion"&&(V=E);let Fe=await M({country:r,region:u,salary:V,salary_converted:y,salary_conversion:E,hiring_budget:x,currency:g,management:B,estimation_title:T},f.fields),Ve=await M(A,P?.fields||[]),Me={currency_code:d?.find(je=>je.value===g)?.label};return{...Fe,...Ve,...Me}},"parseFormValues"),handleValidation:he,isSubmitting:U.isPending,isLoading:ue&&me&&fe,onSubmit:pe,resetForm:Ee,currencies:d,meta:{fields:c.current?.fields}}},"useCostCalculator");function oe(t,i,l){let s=t.reduce((n,a)=>(a.name==="salary"||a.name==="salary_conversion"?n[a.name]=a.schema.when("salary_converted",{is:o(c=>c===a.name,"is"),then:o(c=>c.required("Required field"),"then"),otherwise:o(c=>c.optional(),"otherwise")}):a.name==="management"?n[a.name]=le({management_fee:Te().transform(c=>isNaN(c)?void 0:c).min(0,"Management fee must be greater than or equal to 0").max(i?C[i]:C.USD,()=>`Management fee cannot exceed ${(i?C[i]:C.USD)/100} ${i}`)}):a.name==="estimation_title"&&l?n[a.name]=a.schema.required("Required field"):n[a.name]=a.schema,n),{});return le(s)}o(oe,"buildValidationSchema");function Ae(t){let i="benefit-";return Object.keys(t).reduce((l,s)=>{let n=t[s];if(n==="none")return l;let c={benefit_group_slug:s.replace(i,""),benefit_tier_slug:n};return[...l,c]},[])}o(Ae,"formatBenefits");function Oe(t,i,l){let s=Number(t.management?.management_fee),n=t.currency_code;return{...{region_slug:t.region||t.country,employment_term:t.contract_duration_type??"fixed",title:t.estimation_title||i.title,age:t.age??void 0,...t.benefits&&{benefits:Ae(t.benefits)},...i.includeManagementFee&&s&&{discount:{quoted_amount:i.showManagementFee?s:C[n]||C.USD,text:""}}},...ke(t,l)}}o(Oe,"mapValueToEmployment");function ke(t,i){let l=i==="marketing"||t.salary_converted==="salary_conversion",s=i==="standard"&&t.salary_converted==="salary",n=t.hiring_budget==="my_hiring_budget";if(l){let a=t.salary_converted==="salary_conversion";return n?{annual_total_cost_in_employer_currency:t.salary}:{[a?"annual_gross_salary_in_employer_currency":"annual_gross_salary"]:t.salary}}return s?n?{annual_total_cost:t.salary}:{annual_gross_salary:t.salary}:{}}o(ke,"getSalaryFields");function se(t,i=O,l="standard"){let s=Array.isArray(t)?t:[t];if(s.length===0)throw new Error("At least one employment value is required");return s.length>1&&new Set(s.map(a=>a.currency)).size>1&&console.warn("Multiple currencies detected in array. Using currency from first employment."),{employer_currency_slug:s[0].currency,include_benefits:i.includeBenefits,include_cost_breakdowns:i.includeCostBreakdowns,include_premium_benefits:i.includePremiumBenefits,include_management_fee:i.includeManagementFee,employments:s.map(n=>Oe(n,i,l))}}o(se,"buildPayload");export{oe as a,se as b,O as c,Qe as d};
2
- //# sourceMappingURL=chunk-ITCWBZDM.js.map
1
+ import{a as ee}from"./chunk-XWCE5BU6.js";import{a as z}from"./chunk-QATHYZUV.js";import{a as W,b as X,c as Y,f as Z}from"./chunk-ZRD3M74X.js";import{a as C}from"./chunk-HN5HLFTB.js";import{a as I}from"./chunk-KFYWUBRS.js";import{c as te}from"./chunk-KSSQR2CS.js";import{a as Q}from"./chunk-XFVXRCMH.js";import{b as G,h as M}from"./chunk-C4HFMTSB.js";import{a as o}from"./chunk-P37U34EQ.js";import{number as Te,object as le}from"yup";import{useCallback as we,useEffect as ne,useMemo as Re,useRef as Pe,useState as j}from"react";import{string as re,ValidationError as ie}from"yup";import{jsx as ae}from"react/jsx-runtime";var O={title:"Estimation",includeBenefits:!1,includeCostBreakdowns:!1,includePremiumBenefits:!1,enableCurrencyConversion:!1,includeEstimationTitle:!1,includeManagementFee:!1},xe=o(t=>Q(z.data.schema,void 0,t),"useStaticSchema");function Be(t,i){if(typeof t=="object"&&t!==null&&"title"in t){let l=t.title;if(l)return l}return i==="my_hiring_budget"?"Hiring budget":"Employee's annual salary"}o(Be,"getSalaryTitle");var Qe=o(({defaultRegion:t,defaultCurrency:i,defaultSalary:l,estimationOptions:s,options:n,version:a}={estimationOptions:O})=>{let c=Pe({fields:{}}),[k,h]=j(t),[w,R]=j(),[m,q]=j(),[H,ce]=j(),{data:_,isLoading:ue}=W({includePremiumBenefits:s.includePremiumBenefits}),{data:d,isLoading:me}=X(),de=k||w?.value,{data:P,isLoading:fe}=Z(de,{includePremiumBenefits:s.includePremiumBenefits,options:n}),U=Y(),{mutateAsync:ge}=G(U),b=w?.currency,p=n?.jsfModify?.fields?.salary,F=p&&typeof p=="object"&&"presentation"in p?p.presentation:void 0,L=we(()=>{let e=b&&m?b!==m:!1;return b!==m?{from:m,to:b,shouldSwapOrder:e}:{from:b,to:m,shouldSwapOrder:e}},[b,m]),D=s.showManagementFee,J=s.includeEstimationTitle,$=n?.features?.includes("split_salary_description")??!1,ye=Re(()=>{let{from:e,to:r,shouldSwapOrder:u}=L(),g=Be(p,H);return{fields:{salary:{...p,title:g,presentation:{salary_conversion_properties:{label:F?.salary_conversion_properties?.label,description:F?.salary_conversion_properties?.description},currencies:{from:e,to:r},Component:o(y=>ae(ee,{...y,shouldSwapOrder:u,conversionType:a==="marketing"?"no_spread":"spread",defaultValue:l,splitDescription:$}),"Component")}},hiring_budget:{...n?.jsfModify?.fields?.hiring_budget,presentation:{hidden:a=="marketing"}},management:{...n?.jsfModify?.fields?.management,properties:{...n?.jsfModify?.fields?.management?.properties,management_fee:{...n?.jsfModify?.fields?.management?.properties?.management_fee,"x-jsf-presentation":{inputType:"money",additionalProps:{currency:m||"USD"}}}},presentation:{...typeof n?.jsfModify?.fields?.management=="object"?(n?.jsfModify?.fields?.management)["x-jsf-presentation"]:{},hidden:!D,Component:o(y=>ae(te,{...y,variant:"inset",features:{toggle:{enabled:!0,stateField:"management._expanded",labels:{expand:"Define",collapse:"Remove"}}}}),"Component")}},estimation_title:{...n?.jsfModify?.fields?.estimation_title,"x-jsf-presentation":{hidden:!J}}}}},[L,p,H,F?.salary_conversion_properties?.label,F?.salary_conversion_properties?.description,n?.jsfModify?.fields?.hiring_budget,n?.jsfModify?.fields?.management,n?.jsfModify?.fields?.estimation_title,a,m,D,J,l,$]),f=xe({jsfModify:{fields:{...n?.jsfModify?.fields,...ye?.fields}}});ne(()=>{if(t&&_){let e=_.find(({value:r})=>r===t);e&&R(e)}},[t,_]),ne(()=>{if(i&&d){let e=d.find(({value:r})=>r===i);e&&q(e.label)}},[i,d]);async function pe(e){return ge(se(e,s,a))}o(pe,"onSubmit");function Ce(e){let r=_?.find(({value:u})=>u===e);r&&r.childRegions.length===0&&r.hasAdditionalFields?h(r.regionSlug):h(void 0),R(r)}o(Ce,"onCountryChange");function _e(e){h(e)}o(_e,"onRegionChange");function be(e){ce(e.target.value)}o(be,"onHiringBudgetChange");function Se(e){let r=d?.find(u=>u.value===e)?.label;q(r),n?.onCurrencyChange?.(r||"")}o(Se,"onChangeCurrency");let S=f.fields.find(e=>e.name==="region");if(S){let e=w?.childRegions.map(r=>({value:r.slug,label:r.name}))??[];S.options=e,S.isVisible=e.length>0,S.required=e.length>0,S.onChange=_e,S.schema=e.length>0?re().transform(r=>typeof r=="string"?r:"").required("Region is required"):re()}if(d){let e=f.fields.find(r=>r.name==="currency");e&&(e.options=d,e.onChange=Se)}let v=f.fields.find(e=>e.name==="hiring_budget");if(v&&(v.onChange=be),_){let e=f.fields.find(r=>r.name==="country");e&&(e.options=_,e.onChange=Ce)}let Ee=o(()=>{R(void 0),h(t)},"resetForm"),N=[...f.fields.filter(e=>e.name!=="management"),...P?.fields||[],...f.fields.filter(e=>e.name==="management")],K=oe(f.fields,m||"USD",s.includeEstimationTitle);async function he(e){let r=null;n?.onValidation?.(e);let u=await M(e,N);try{await K.validate(u,{abortEarly:!1}),r={formErrors:{},yupError:new ie([],e)}}catch(E){let B=I(E);r={formErrors:Object.entries(B).reduce((T,[A,V])=>({...T,[A]:V.message}),{}),yupError:E}}let g=P?.handleValidation(u),y=[...r?.yupError.inner||[],...g?.yupError?.inner||[]],x={...r?.yupError?.value||{},...g?.yupError?.value||{}};return{formErrors:{...r?.formErrors||{},...g?.formErrors||{}},yupError:new ie(y,x)}}return o(he,"handleValidation"),{stepState:{current:0,total:1,isLastStep:!0},fields:N,validationSchema:K,parseFormValues:o(async e=>{let{country:r,region:u,currency:g,salary_converted:y,hiring_budget:x,salary_conversion:E,management:B,estimation_title:T,...A}=e,V=e.salary;y==="salary_conversion"&&(V=E);let Fe=await M({country:r,region:u,salary:V,salary_converted:y,salary_conversion:E,hiring_budget:x,currency:g,management:B,estimation_title:T},f.fields),Ve=await M(A,P?.fields||[]),Me={currency_code:d?.find(je=>je.value===g)?.label};return{...Fe,...Ve,...Me}},"parseFormValues"),handleValidation:he,isSubmitting:U.isPending,isLoading:ue&&me&&fe,onSubmit:pe,resetForm:Ee,currencies:d,meta:{fields:c.current?.fields}}},"useCostCalculator");function oe(t,i,l){let s=t.reduce((n,a)=>(a.name==="salary"||a.name==="salary_conversion"?n[a.name]=a.schema.when("salary_converted",{is:o(c=>c===a.name,"is"),then:o(c=>c.required("Required field"),"then"),otherwise:o(c=>c.optional(),"otherwise")}):a.name==="management"?n[a.name]=le({management_fee:Te().transform(c=>isNaN(c)?void 0:c).min(0,"Management fee must be greater than or equal to 0").max(i?C[i]:C.USD,()=>`Management fee cannot exceed ${(i?C[i]:C.USD)/100} ${i}`)}):a.name==="estimation_title"&&l?n[a.name]=a.schema.required("Required field"):n[a.name]=a.schema,n),{});return le(s)}o(oe,"buildValidationSchema");function Ae(t){let i="benefit-";return Object.keys(t).reduce((l,s)=>{let n=t[s];if(n==="none")return l;let c={benefit_group_slug:s.replace(i,""),benefit_tier_slug:n};return[...l,c]},[])}o(Ae,"formatBenefits");function Oe(t,i,l){let s=Number(t.management?.management_fee),n=t.currency_code;return{...{region_slug:t.region||t.country,employment_term:t.contract_duration_type??"fixed",title:t.estimation_title||i.title,age:t.age??void 0,...t.benefits&&{benefits:Ae(t.benefits)},...i.includeManagementFee&&s&&{discount:{quoted_amount:i.showManagementFee?s:C[n]||C.USD,text:""}}},...ke(t,l)}}o(Oe,"mapValueToEmployment");function ke(t,i){let l=i==="marketing"||t.salary_converted==="salary_conversion",s=i==="standard"&&t.salary_converted==="salary",n=t.hiring_budget==="my_hiring_budget";if(l){let a=t.salary_converted==="salary_conversion";return n?{annual_total_cost_in_employer_currency:t.salary}:{[a?"annual_gross_salary_in_employer_currency":"annual_gross_salary"]:t.salary}}return s?n?{annual_total_cost:t.salary}:{annual_gross_salary:t.salary}:{}}o(ke,"getSalaryFields");function se(t,i=O,l="standard"){let s=Array.isArray(t)?t:[t];if(s.length===0)throw new Error("At least one employment value is required");return s.length>1&&new Set(s.map(a=>a.currency)).size>1&&console.warn("Multiple currencies detected in array. Using currency from first employment."),{employer_currency_slug:s[0].currency,include_benefits:i.includeBenefits,include_cost_breakdowns:i.includeCostBreakdowns,include_premium_benefits:i.includePremiumBenefits,include_management_fee:i.includeManagementFee,employments:s.map(n=>Oe(n,i,l))}}o(se,"buildPayload");export{oe as a,se as b,O as c,Qe as d};
2
+ //# sourceMappingURL=chunk-UNBTPLJ6.js.map
@@ -1,2 +1,2 @@
1
- import{a as R,b as x,c as N,d as A}from"./chunk-OV4ARZIX.js";import{a as T}from"./chunk-ZE3YT3Q6.js";import{a as C}from"./chunk-SWLNTVAX.js";import{b as B}from"./chunk-LKHRHBFP.js";import{a as f}from"./chunk-ED35NFA6.js";import{a as w}from"./chunk-GPWQPJQ7.js";import{n as i,o as n,r as F}from"./chunk-C4HFMTSB.js";import{a as m}from"./chunk-P37U34EQ.js";import{MoreHorizontal as G}from"lucide-react";import{useState as P}from"react";import{Fragment as U,jsx as g,jsxs as E}from"react/jsx-runtime";function L({actions:e=[],className:r,label:a,"data-testid":l}){let[_,d]=P(!1);return E("div",{className:i("relative",r),children:[g(B,{"data-testid":l,variant:"ghost","aria-label":a,className:"h-8 w-8 p-0",onClick:()=>d(!_),children:g(G,{className:"h-4 w-4"})}),_&&E(U,{children:[g("div",{className:"fixed inset-0 z-40",onClick:()=>d(!1)}),g("div",{className:"absolute right-0 top-1/2 mt-1 bg-white border border-gray-200 rounded-md shadow-lg z-50 min-w-[120px]",children:e.map((c,u)=>g("button",{"data-testid":`${l}-${c.label.toLowerCase().replace(" ","-")}`,className:i("w-full text-left px-2 py-1.5 text-sm hover:bg-gray-100",c.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>{c.onClick(),d(!1)},disabled:c.disabled,children:c.label},u))})]})]})}m(L,"ActionsDropdown");import{ChevronDown as S,Info as $}from"lucide-react";import j from"react-flagpack";import{useState as O}from"react";import{Fragment as b,jsx as o,jsxs as t}from"react/jsx-runtime";var Z={GB:"GB-UKM"},K=m(({title:e,country:r,region:a,annualGrossSalary:l,onDelete:_,onExportPdf:d,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:d},{label:"Delete",onClick:_}];return t("div",{className:"RemoteFlows__EstimationResults__Header flex justify-between",children:[t("div",{className:"flex flex-row items-center gap-6",children:[o("div",{className:"RemoteFlows__EstimationResultsHeader__FlagContainer flex h-16 w-16 items-center justify-center rounded-lg bg-[#F4F4F5]",children:o(j,{code:Z[r.alpha_2_code]||r.alpha_2_code})}),t("div",{className:"space-y-1",children:[o("h2",{"data-testid":"estimation-results-header-title",className:"RemoteFlows__EstimationResultsHeader__Title text-lg font-medium leading-none text-[#181818]",children:e}),t("p",{className:"RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]",children:[r.name," ",a?` (${a.name})`:""]}),t("p",{"data-testid":"estimation-results-header-annual-gross-salary",className:"RemoteFlows__EstimationResultsHeader__AnnualGrossSalary text-xs text-[#71717A]",children:[o("span",{className:"text-[#181818]",children:"Employee annual gross salary:"})," ",l]})]})]}),o(L,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),V=m(()=>({steps:[{id:"add-employment-details",title:"Add employment details",description:"You add employee employments details."},{id:"invite-employee",title:"Invite employee",description:"Hire receives an email invitation from Remote to start the self-enrollment process."},{id:"verify-information",title:"Verify information",description:"Remote prepares the Employment Agreement and verifies all the information."},{id:"sign-contract",title:"Sign contract",description:"All parties sign the Employment Agreement and are ready to start. \u{1F389}"}],helpText:"For customers who accept Remote's Terms of Service (ToS), the employee onboarding timeline starts once the employee has been invited to the platform and completed self enrollment.",zendeskArticleId:w.employeeOnboardingTimeline}),"getOnboardingTimelineData");function Y({minimumOnboardingDays:e,data:r,className:a}){return o(R,{collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",a),children:t(x,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4",children:t("div",{className:"flex items-center justify-between w-full",children:[o("span",{className:"RemoteFlows__OnboardingTimeline__Title text-base font-medium text-[#0F172A]",children:"Onboarding timeline"}),e!=null&&t("span",{className:"RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4",children:[e," days"]})]})}),t(A,{className:"px-0 pb-4",children:[o("ul",{className:"RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2",children:r.steps.map(l=>t("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:l.title})," ","- ",l.description]},l.id))}),t("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[r.helpText,r.zendeskArticleId&&o(f,{zendeskId:r.zendeskArticleId,children:"Learn more"})]})]})]})})}m(Y,"OnboardingTimeline");function q({className:e,countryBenefitsUrl:r,countryGuideUrl:a,country:l}){return o(R,{collapsible:!0,className:i("RemoteFlows__EstimationResults__HiringSection w-full",e),children:t(x,{value:"timeline",className:"RemoteFlows__HiringSection__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__HiringSection__AccordionTrigger hover:no-underline px-0 py-4",children:o("div",{className:"flex items-center justify-between w-full",children:t("span",{className:"text-base font-medium text-[#0F172A]",children:["Hiring in ",l.name]})})}),o(A,{children:t("div",{className:"flex flex-col gap-1",children:[a&&o("a",{href:a,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),r&&o("a",{href:r,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}m(q,"HiringSection");function J({isMultipleCurrency:e,className:r}){return t("div",{className:i("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",r),children:[o("span",{"aria-hidden":!0}),e?t(b,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):t(b,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}m(J,"EstimationHeaders");function I({label:e,amounts:r,className:a,children:l}){let[_,d]=O(!0);return t("div",{className:i("RemoteFlows__EstimationResults__Row",a),children:[t("div",{className:"RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center",children:[t("div",{className:"RemoteFlows__EstimationRow__LabelContainer flex items-center gap-2",children:[o("span",{className:i("RemoteFlows__EstimationRow__Title min-w-[140px] font-medium text-[#09090B]"),children:e}),o("button",{onClick:()=>d(!_),className:"RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded",children:o(S,{className:`h-4 w-4 text-muted-foreground transition-transform ${_?"rotate-180":""}`})})]}),Array.isArray(r)?r.map((c,u)=>o("span",{className:i("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:c},u)):t(b,{children:[o("span",{}),o("span",{className:i("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:r})]})]}),_&&l&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:l})]})}m(I,"EstimationRow");function Q({item:e,isMultipleCurrency:r,level:a=0}){let[l,_]=O(!1),d=e.children&&e.children.length>0,c=a>0,u=e.isCollapsible||d;return t("li",{className:i("RemoteFlows__BreakdownList__Item pb-3",c&&"pb-1"),children:[t("div",{className:i(r?"RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between":"RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between"),children:[t("div",{className:i("RemoteFlows__BreakdownList__LabelContainer flex items-center gap-2",c&&"pl-3"),children:[!c&&o("span",{className:"RemoteFlows__BreakdownList__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0","aria-hidden":"true"}),u?t("button",{onClick:()=>_(!l),className:"RemoteFlows__BreakdownList__CollapseButton flex items-center gap-2 hover:bg-gray-100 rounded p-1",children:[o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B]"),children:e.label}),o(S,{className:`RemoteFlows__BreakdownList__ChevronDown h-3 w-3 text-muted-foreground transition-transform ${l?"rotate-180":""}`})]}):o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B] p-1"),children:e.label}),e.tooltip&&o(T,{content:t(b,{children:[o("span",{dangerouslySetInnerHTML:{__html:F(e.tooltip)}})," ",e.zendeskId&&o(f,{zendeskId:Number(e.zendeskId),children:"Learn more"})]}),children:o("button",{className:"RemoteFlows__BreakdownList__InfoButton p-1 hover:bg-gray-100 rounded",children:o($,{className:i("RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground",c?"h-3 w-3":"h-4 w-4")})})})]}),r?t(b,{children:[o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employee-amount",className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"}),o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employer-amount",className:i("RemoteFlows__BreakdownList__EmployerAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__EmployerAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__EmployerAmountText--NotNested text-[#09090B]"),children:e.employerAmount||"\u2014"})]}):o("span",{"data-testid":e.dataSelector,className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"})]}),d&&l&&o("div",{className:"mt-1",children:o(k,{items:e.children,isMultipleCurrency:r,level:a+1})})]})}m(Q,"BreakdownListItem");function k({items:e,isMultipleCurrency:r,className:a,level:l}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",a),children:e.map((_,d)=>o(Q,{item:_,isMultipleCurrency:r,level:l},d))})}m(k,"BreakdownList");var pe=m(({estimation:e,title:r,components:a,onDelete:l,onExportPdf:_,onEdit:d})=>{let c=a?.HiringSection||q,u=a?.OnboardingTimeline||Y,z=a?.Header||K,h=a?.Footer,H=V(),p=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,v=e.employer_currency_costs.monthly_management_fee,D=e.region.code!==e.country.code,M=n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code);return t(C,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(z,{title:r,annualGrossSalary:M,region:D?e.region:void 0,country:e.country,onDelete:l,onExportPdf:_,onEdit:d})}),t("div",{className:"RemoteFlows__Separator",children:[o(J,{isMultipleCurrency:p,className:"mb-3"}),o(I,{label:"Monthly total cost",amounts:p?[n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),n(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.code)]:n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),children:o(k,{items:[{label:"Gross monthly salary",regionalAmount:n(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_gross_salary,e.employer_currency_costs.currency.code),zendeskId:w.extraPayments.toString(),tooltip:"This country respects extra payments on top of the gross salary."},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.monthly_contributions_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_contributions_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.monthly_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.monthly_benefits_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_benefits_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.monthly_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Monthly fee",regionalAmount:n(e.regional_currency_costs.monthly_management_fee,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_management_fee,e.employer_currency_costs.currency.code),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})]}),o("div",{className:"RemoteFlows__Separator",children:o(I,{label:"Annual total cost",amounts:p?[n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),n(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.code)]:n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),children:o(k,{items:[{label:"Gross annual salary",dataSelector:"annual-gross-salary",regionalAmount:n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.code)},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_contributions_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.annual_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.annual_benefits_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_benefits_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.annual_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Extra statutory payments",regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.extra_statutory_payments_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.extra_statutory_payments_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Annual fee",regionalAmount:n(e.regional_currency_costs.annual_management_fee,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_management_fee,e.employer_currency_costs.currency.code),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})}),o("div",{className:"RemoteFlows__Separator",children:o(u,{minimumOnboardingDays:e.minimum_onboarding_time,data:H})}),o(c,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),h&&o(h,{})]})},"EstimationResults");export{pe as a};
2
- //# sourceMappingURL=chunk-RFMYNPR7.js.map
1
+ import{a as R,b as x,c as N,d as A}from"./chunk-OV4ARZIX.js";import{a as T}from"./chunk-ZE3YT3Q6.js";import{a as C}from"./chunk-SWLNTVAX.js";import{b as B}from"./chunk-LKHRHBFP.js";import{a as f}from"./chunk-3OHORFIX.js";import{a as w}from"./chunk-GPWQPJQ7.js";import{n as i,o as n,r as F}from"./chunk-C4HFMTSB.js";import{a as m}from"./chunk-P37U34EQ.js";import{MoreHorizontal as G}from"lucide-react";import{useState as P}from"react";import{Fragment as U,jsx as g,jsxs as E}from"react/jsx-runtime";function L({actions:e=[],className:r,label:a,"data-testid":l}){let[_,d]=P(!1);return E("div",{className:i("relative",r),children:[g(B,{"data-testid":l,variant:"ghost","aria-label":a,className:"h-8 w-8 p-0",onClick:()=>d(!_),children:g(G,{className:"h-4 w-4"})}),_&&E(U,{children:[g("div",{className:"fixed inset-0 z-40",onClick:()=>d(!1)}),g("div",{className:"absolute right-0 top-1/2 mt-1 bg-white border border-gray-200 rounded-md shadow-lg z-50 min-w-[120px]",children:e.map((c,u)=>g("button",{"data-testid":`${l}-${c.label.toLowerCase().replace(" ","-")}`,className:i("w-full text-left px-2 py-1.5 text-sm hover:bg-gray-100",c.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>{c.onClick(),d(!1)},disabled:c.disabled,children:c.label},u))})]})]})}m(L,"ActionsDropdown");import{ChevronDown as S,Info as $}from"lucide-react";import j from"react-flagpack";import{useState as O}from"react";import{Fragment as b,jsx as o,jsxs as t}from"react/jsx-runtime";var Z={GB:"GB-UKM"},K=m(({title:e,country:r,region:a,annualGrossSalary:l,onDelete:_,onExportPdf:d,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:d},{label:"Delete",onClick:_}];return t("div",{className:"RemoteFlows__EstimationResults__Header flex justify-between",children:[t("div",{className:"flex flex-row items-center gap-6",children:[o("div",{className:"RemoteFlows__EstimationResultsHeader__FlagContainer flex h-16 w-16 items-center justify-center rounded-lg bg-[#F4F4F5]",children:o(j,{code:Z[r.alpha_2_code]||r.alpha_2_code})}),t("div",{className:"space-y-1",children:[o("h2",{"data-testid":"estimation-results-header-title",className:"RemoteFlows__EstimationResultsHeader__Title text-lg font-medium leading-none text-[#181818]",children:e}),t("p",{className:"RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]",children:[r.name," ",a?` (${a.name})`:""]}),t("p",{"data-testid":"estimation-results-header-annual-gross-salary",className:"RemoteFlows__EstimationResultsHeader__AnnualGrossSalary text-xs text-[#71717A]",children:[o("span",{className:"text-[#181818]",children:"Employee annual gross salary:"})," ",l]})]})]}),o(L,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),V=m(()=>({steps:[{id:"add-employment-details",title:"Add employment details",description:"You add employee employments details."},{id:"invite-employee",title:"Invite employee",description:"Hire receives an email invitation from Remote to start the self-enrollment process."},{id:"verify-information",title:"Verify information",description:"Remote prepares the Employment Agreement and verifies all the information."},{id:"sign-contract",title:"Sign contract",description:"All parties sign the Employment Agreement and are ready to start. \u{1F389}"}],helpText:"For customers who accept Remote's Terms of Service (ToS), the employee onboarding timeline starts once the employee has been invited to the platform and completed self enrollment.",zendeskArticleId:w.employeeOnboardingTimeline}),"getOnboardingTimelineData");function Y({minimumOnboardingDays:e,data:r,className:a}){return o(R,{collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",a),children:t(x,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4",children:t("div",{className:"flex items-center justify-between w-full",children:[o("span",{className:"RemoteFlows__OnboardingTimeline__Title text-base font-medium text-[#0F172A]",children:"Onboarding timeline"}),e!=null&&t("span",{className:"RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4",children:[e," days"]})]})}),t(A,{className:"px-0 pb-4",children:[o("ul",{className:"RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2",children:r.steps.map(l=>t("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:l.title})," ","- ",l.description]},l.id))}),t("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[r.helpText,r.zendeskArticleId&&o(f,{zendeskId:r.zendeskArticleId,children:"Learn more"})]})]})]})})}m(Y,"OnboardingTimeline");function q({className:e,countryBenefitsUrl:r,countryGuideUrl:a,country:l}){return o(R,{collapsible:!0,className:i("RemoteFlows__EstimationResults__HiringSection w-full",e),children:t(x,{value:"timeline",className:"RemoteFlows__HiringSection__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__HiringSection__AccordionTrigger hover:no-underline px-0 py-4",children:o("div",{className:"flex items-center justify-between w-full",children:t("span",{className:"text-base font-medium text-[#0F172A]",children:["Hiring in ",l.name]})})}),o(A,{children:t("div",{className:"flex flex-col gap-1",children:[a&&o("a",{href:a,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),r&&o("a",{href:r,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}m(q,"HiringSection");function J({isMultipleCurrency:e,className:r}){return t("div",{className:i("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",r),children:[o("span",{"aria-hidden":!0}),e?t(b,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):t(b,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}m(J,"EstimationHeaders");function I({label:e,amounts:r,className:a,children:l}){let[_,d]=O(!0);return t("div",{className:i("RemoteFlows__EstimationResults__Row",a),children:[t("div",{className:"RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center",children:[t("div",{className:"RemoteFlows__EstimationRow__LabelContainer flex items-center gap-2",children:[o("span",{className:i("RemoteFlows__EstimationRow__Title min-w-[140px] font-medium text-[#09090B]"),children:e}),o("button",{onClick:()=>d(!_),className:"RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded",children:o(S,{className:`h-4 w-4 text-muted-foreground transition-transform ${_?"rotate-180":""}`})})]}),Array.isArray(r)?r.map((c,u)=>o("span",{className:i("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:c},u)):t(b,{children:[o("span",{}),o("span",{className:i("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:r})]})]}),_&&l&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:l})]})}m(I,"EstimationRow");function Q({item:e,isMultipleCurrency:r,level:a=0}){let[l,_]=O(!1),d=e.children&&e.children.length>0,c=a>0,u=e.isCollapsible||d;return t("li",{className:i("RemoteFlows__BreakdownList__Item pb-3",c&&"pb-1"),children:[t("div",{className:i(r?"RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between":"RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between"),children:[t("div",{className:i("RemoteFlows__BreakdownList__LabelContainer flex items-center gap-2",c&&"pl-3"),children:[!c&&o("span",{className:"RemoteFlows__BreakdownList__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0","aria-hidden":"true"}),u?t("button",{onClick:()=>_(!l),className:"RemoteFlows__BreakdownList__CollapseButton flex items-center gap-2 hover:bg-gray-100 rounded p-1",children:[o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B]"),children:e.label}),o(S,{className:`RemoteFlows__BreakdownList__ChevronDown h-3 w-3 text-muted-foreground transition-transform ${l?"rotate-180":""}`})]}):o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B] p-1"),children:e.label}),e.tooltip&&o(T,{content:t(b,{children:[o("span",{dangerouslySetInnerHTML:{__html:F(e.tooltip)}})," ",e.zendeskId&&o(f,{zendeskId:Number(e.zendeskId),children:"Learn more"})]}),children:o("button",{className:"RemoteFlows__BreakdownList__InfoButton p-1 hover:bg-gray-100 rounded",children:o($,{className:i("RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground",c?"h-3 w-3":"h-4 w-4")})})})]}),r?t(b,{children:[o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employee-amount",className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"}),o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employer-amount",className:i("RemoteFlows__BreakdownList__EmployerAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__EmployerAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__EmployerAmountText--NotNested text-[#09090B]"),children:e.employerAmount||"\u2014"})]}):o("span",{"data-testid":e.dataSelector,className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"})]}),d&&l&&o("div",{className:"mt-1",children:o(k,{items:e.children,isMultipleCurrency:r,level:a+1})})]})}m(Q,"BreakdownListItem");function k({items:e,isMultipleCurrency:r,className:a,level:l}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",a),children:e.map((_,d)=>o(Q,{item:_,isMultipleCurrency:r,level:l},d))})}m(k,"BreakdownList");var pe=m(({estimation:e,title:r,components:a,onDelete:l,onExportPdf:_,onEdit:d})=>{let c=a?.HiringSection||q,u=a?.OnboardingTimeline||Y,z=a?.Header||K,h=a?.Footer,H=V(),p=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,v=e.employer_currency_costs.monthly_management_fee,D=e.region.code!==e.country.code,M=n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code);return t(C,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(z,{title:r,annualGrossSalary:M,region:D?e.region:void 0,country:e.country,onDelete:l,onExportPdf:_,onEdit:d})}),t("div",{className:"RemoteFlows__Separator",children:[o(J,{isMultipleCurrency:p,className:"mb-3"}),o(I,{label:"Monthly total cost",amounts:p?[n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),n(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.code)]:n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),children:o(k,{items:[{label:"Gross monthly salary",regionalAmount:n(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_gross_salary,e.employer_currency_costs.currency.code),zendeskId:w.extraPayments.toString(),tooltip:"This country respects extra payments on top of the gross salary."},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.monthly_contributions_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_contributions_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.monthly_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.monthly_benefits_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_benefits_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.monthly_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Monthly fee",regionalAmount:n(e.regional_currency_costs.monthly_management_fee,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_management_fee,e.employer_currency_costs.currency.code),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})]}),o("div",{className:"RemoteFlows__Separator",children:o(I,{label:"Annual total cost",amounts:p?[n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),n(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.code)]:n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),children:o(k,{items:[{label:"Gross annual salary",dataSelector:"annual-gross-salary",regionalAmount:n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.code)},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_contributions_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.annual_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.annual_benefits_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_benefits_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.annual_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Extra statutory payments",regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.extra_statutory_payments_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.extra_statutory_payments_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Annual fee",regionalAmount:n(e.regional_currency_costs.annual_management_fee,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_management_fee,e.employer_currency_costs.currency.code),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})}),o("div",{className:"RemoteFlows__Separator",children:o(u,{minimumOnboardingDays:e.minimum_onboarding_time,data:H})}),o(c,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),h&&o(h,{})]})},"EstimationResults");export{pe as a};
2
+ //# sourceMappingURL=chunk-URNFXEOZ.js.map
@@ -1,2 +1,2 @@
1
- import{b as f}from"./chunk-PGWKJ6FK.js";import{a as l}from"./chunk-UZFEJMO6.js";import{a as d}from"./chunk-I4DU34BA.js";import{h as m}from"./chunk-AUPAAQUT.js";import{c as s}from"./chunk-C4HFMTSB.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as k}from"react";import{jsx as c}from"react/jsx-runtime";import{createElement as w}from"react";function R({defaultValues:p,onSubmit:F,components:u}){let{formId:S,onboardingBag:e}=f(),r=l({handleValidation:e.handleValidation,defaultValues:p,checkFieldUpdates:e.checkFieldUpdates});k(()=>{e.employmentId&&e?.checkFieldUpdates(r.getValues())},[]);let g=t(async(a,y)=>{let n=y?.nativeEvent;if(n?.isDraftSubmission){let{onSuccess:E,onError:i}=n.draftCallbacks;try{let o=await e.onSubmit(a);if(o?.data)E?.();else if(o?.error){let b=e.stepState.currentStep.name,h=e.meta?.fields?.[b],P=s(o?.fieldErrors||[],h);i?.({error:o.error,rawError:o.rawError,fieldErrors:P})}}catch(o){i?.({error:o,rawError:o,fieldErrors:[]})}}else await F(a)},"handleSubmit");return w(m,{...r,key:`form-${e.stepState.currentStep.name}`},c("form",{id:S,onSubmit:r.handleSubmit(g),className:"space-y-4 RemoteFlows__OnboardingForm",children:c(d,{components:u,fields:e.fields,fieldsets:e.meta.fieldsets,fieldValues:e.fieldValues})}))}t(R,"OnboardingForm");export{R as a};
2
- //# sourceMappingURL=chunk-XMVV6S77.js.map
1
+ import{b as f}from"./chunk-PGWKJ6FK.js";import{a as l}from"./chunk-AFTFDGSD.js";import{a as d}from"./chunk-5NN5RWBG.js";import{b as m}from"./chunk-C7KVPEVX.js";import{c as s}from"./chunk-C4HFMTSB.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as k}from"react";import{jsx as c}from"react/jsx-runtime";import{createElement as w}from"react";function R({defaultValues:p,onSubmit:F,components:u}){let{formId:S,onboardingBag:e}=f(),r=l({handleValidation:e.handleValidation,defaultValues:p,checkFieldUpdates:e.checkFieldUpdates});k(()=>{e.employmentId&&e?.checkFieldUpdates(r.getValues())},[]);let g=t(async(a,y)=>{let n=y?.nativeEvent;if(n?.isDraftSubmission){let{onSuccess:E,onError:i}=n.draftCallbacks;try{let o=await e.onSubmit(a);if(o?.data)E?.();else if(o?.error){let b=e.stepState.currentStep.name,h=e.meta?.fields?.[b],P=s(o?.fieldErrors||[],h);i?.({error:o.error,rawError:o.rawError,fieldErrors:P})}}catch(o){i?.({error:o,rawError:o,fieldErrors:[]})}}else await F(a)},"handleSubmit");return w(m,{...r,key:`form-${e.stepState.currentStep.name}`},c("form",{id:S,onSubmit:r.handleSubmit(g),className:"space-y-4 RemoteFlows__OnboardingForm",children:c(d,{components:u,fields:e.fields,fieldsets:e.meta.fieldsets,fieldValues:e.fieldValues})}))}t(R,"OnboardingForm");export{R as a};
2
+ //# sourceMappingURL=chunk-UWIUECXU.js.map
@@ -1,2 +1,2 @@
1
- var e={data:{version:7,schema:{additionalProperties:!1,allOf:[],properties:{acknowledge_termination_procedure_info:{type:"null",title:"Acknowledge termination procedure info","x-jsf-presentation":{inputType:"hidden"},meta:{ignoreValue:!0}},acknowledge_termination_procedure:{description:"",title:"I agree to the procedures in this form",type:"boolean","x-jsf-presentation":{direction:"column",inputType:"checkbox"}},acknowledge_termination_procedure_fees_info:{type:"null",title:"Acknowledge termination procedure fees info","x-jsf-presentation":{inputType:"hidden"}}},required:["acknowledge_termination_procedure"],type:"object","x-jsf-order":["acknowledge_termination_procedure_info","acknowledge_termination_procedure","acknowledge_termination_procedure_fees_info"],"x-rmt-meta":{jsfVersion:"1"}}}};export{e as a};
2
- //# sourceMappingURL=chunk-JVZ5LUV4.js.map
1
+ var e={data:{version:7,schema:{additionalProperties:!1,allOf:[],properties:{acknowledge_termination_procedure_info:{type:"null",title:"Acknowledge termination procedure info","x-jsf-presentation":{inputType:"hidden"},meta:{ignoreValue:!0}},acknowledge_termination_procedure:{description:"",title:"I agree to the procedures in this form",type:"boolean","x-jsf-presentation":{direction:"column",inputType:"checkbox"}},acknowledge_termination_procedure_fees_info:{type:"null",title:"Acknowledge termination procedure fees info","x-jsf-presentation":{inputType:"hidden"}}},required:["acknowledge_termination_procedure"],type:"object","x-jsf-order":["acknowledge_termination_procedure_info","acknowledge_termination_procedure","acknowledge_termination_procedure_fees_info"],"x-rmt-meta":{jsfOldVersion:!0}}}};export{e as a};
2
+ //# sourceMappingURL=chunk-VEQWK7QQ.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/flows/Termination/json-schemas/additionalInformation.ts"],"sourcesContent":["export const additionalInformationSchema = {\n data: {\n version: 7,\n schema: {\n additionalProperties: false,\n allOf: [],\n properties: {\n acknowledge_termination_procedure_info: {\n type: 'null',\n title: 'Acknowledge termination procedure info',\n 'x-jsf-presentation': {\n inputType: 'hidden',\n },\n meta: {\n ignoreValue: true,\n },\n },\n acknowledge_termination_procedure: {\n description: '',\n title: 'I agree to the procedures in this form',\n type: 'boolean',\n 'x-jsf-presentation': {\n direction: 'column',\n inputType: 'checkbox',\n },\n },\n acknowledge_termination_procedure_fees_info: {\n type: 'null',\n title: 'Acknowledge termination procedure fees info',\n 'x-jsf-presentation': {\n inputType: 'hidden',\n },\n },\n },\n required: ['acknowledge_termination_procedure'],\n type: 'object',\n 'x-jsf-order': [\n 'acknowledge_termination_procedure_info',\n 'acknowledge_termination_procedure',\n 'acknowledge_termination_procedure_fees_info',\n ],\n 'x-rmt-meta': {\n jsfVersion: '1',\n },\n },\n },\n};\n"],"mappings":"AAAO,IAAMA,EAA8B,CACzC,KAAM,CACJ,QAAS,EACT,OAAQ,CACN,qBAAsB,GACtB,MAAO,CAAC,EACR,WAAY,CACV,uCAAwC,CACtC,KAAM,OACN,MAAO,yCACP,qBAAsB,CACpB,UAAW,QACb,EACA,KAAM,CACJ,YAAa,EACf,CACF,EACA,kCAAmC,CACjC,YAAa,GACb,MAAO,yCACP,KAAM,UACN,qBAAsB,CACpB,UAAW,SACX,UAAW,UACb,CACF,EACA,4CAA6C,CAC3C,KAAM,OACN,MAAO,8CACP,qBAAsB,CACpB,UAAW,QACb,CACF,CACF,EACA,SAAU,CAAC,mCAAmC,EAC9C,KAAM,SACN,cAAe,CACb,yCACA,oCACA,6CACF,EACA,aAAc,CACZ,WAAY,GACd,CACF,CACF,CACF","names":["additionalInformationSchema"]}
1
+ {"version":3,"sources":["../src/flows/Termination/json-schemas/additionalInformation.ts"],"sourcesContent":["export const additionalInformationSchema = {\n data: {\n version: 7,\n schema: {\n additionalProperties: false,\n allOf: [],\n properties: {\n acknowledge_termination_procedure_info: {\n type: 'null',\n title: 'Acknowledge termination procedure info',\n 'x-jsf-presentation': {\n inputType: 'hidden',\n },\n meta: {\n ignoreValue: true,\n },\n },\n acknowledge_termination_procedure: {\n description: '',\n title: 'I agree to the procedures in this form',\n type: 'boolean',\n 'x-jsf-presentation': {\n direction: 'column',\n inputType: 'checkbox',\n },\n },\n acknowledge_termination_procedure_fees_info: {\n type: 'null',\n title: 'Acknowledge termination procedure fees info',\n 'x-jsf-presentation': {\n inputType: 'hidden',\n },\n },\n },\n required: ['acknowledge_termination_procedure'],\n type: 'object',\n 'x-jsf-order': [\n 'acknowledge_termination_procedure_info',\n 'acknowledge_termination_procedure',\n 'acknowledge_termination_procedure_fees_info',\n ],\n 'x-rmt-meta': {\n jsfOldVersion: true,\n },\n },\n },\n};\n"],"mappings":"AAAO,IAAMA,EAA8B,CACzC,KAAM,CACJ,QAAS,EACT,OAAQ,CACN,qBAAsB,GACtB,MAAO,CAAC,EACR,WAAY,CACV,uCAAwC,CACtC,KAAM,OACN,MAAO,yCACP,qBAAsB,CACpB,UAAW,QACb,EACA,KAAM,CACJ,YAAa,EACf,CACF,EACA,kCAAmC,CACjC,YAAa,GACb,MAAO,yCACP,KAAM,UACN,qBAAsB,CACpB,UAAW,SACX,UAAW,UACb,CACF,EACA,4CAA6C,CAC3C,KAAM,OACN,MAAO,8CACP,qBAAsB,CACpB,UAAW,QACb,CACF,CACF,EACA,SAAU,CAAC,mCAAmC,EAC9C,KAAM,SACN,cAAe,CACb,yCACA,oCACA,6CACF,EACA,aAAc,CACZ,cAAe,EACjB,CACF,CACF,CACF","names":["additionalInformationSchema"]}
@@ -0,0 +1,2 @@
1
+ import{a as V}from"./chunk-E7Y3YBZH.js";import{n as X}from"./chunk-ZHFGV2GB.js";import{a as L}from"./chunk-2L6AB46E.js";import{i as U}from"./chunk-C7KVPEVX.js";import{e as A}from"./chunk-SRLBVFNQ.js";import{e as G,f as N,g as D}from"./chunk-C4HFMTSB.js";import{b as J}from"./chunk-H2O4CVKF.js";import{a as n,b as u,c as ke}from"./chunk-P37U34EQ.js";var _=u((Fn,z)=>{"use strict";function Me(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}n(Me,"isObject");z.exports=Me});var Q=u((Mn,K)=>{"use strict";var Ne=typeof global=="object"&&global&&global.Object===Object&&global;K.exports=Ne});var $=u((Nn,Y)=>{"use strict";var De=Q(),Le=typeof self=="object"&&self&&self.Object===Object&&self,_e=De||Le||Function("return this")();Y.exports=_e});var ee=u((Dn,Z)=>{"use strict";var $e=$(),He=n(function(){return $e.Date.now()},"now");Z.exports=He});var te=u((_n,ne)=>{"use strict";var We=/\s/;function Be(e){for(var t=e.length;t--&&We.test(e.charAt(t)););return t}n(Be,"trimmedEndIndex");ne.exports=Be});var oe=u((Hn,re)=>{"use strict";var Ae=te(),Ge=/^\s+/;function Je(e){return e&&e.slice(0,Ae(e)+1).replace(Ge,"")}n(Je,"baseTrim");re.exports=Je});var H=u((Bn,ie)=>{"use strict";var Ue=$(),Ve=Ue.Symbol;ie.exports=Ve});var ue=u((An,ce)=>{"use strict";var se=H(),ae=Object.prototype,Xe=ae.hasOwnProperty,ze=ae.toString,R=se?se.toStringTag:void 0;function Ke(e){var t=Xe.call(e,R),r=e[R];try{e[R]=void 0;var o=!0}catch{}var s=ze.call(e);return o&&(t?e[R]=r:delete e[R]),s}n(Ke,"getRawTag");ce.exports=Ke});var fe=u((Jn,le)=>{"use strict";var Qe=Object.prototype,Ye=Qe.toString;function Ze(e){return Ye.call(e)}n(Ze,"objectToString");le.exports=Ze});var ge=u((Vn,pe)=>{"use strict";var de=H(),en=ue(),nn=fe(),tn="[object Null]",rn="[object Undefined]",me=de?de.toStringTag:void 0;function on(e){return e==null?e===void 0?rn:tn:me&&me in Object(e)?en(e):nn(e)}n(on,"baseGetTag");pe.exports=on});var be=u((zn,ve)=>{"use strict";function sn(e){return e!=null&&typeof e=="object"}n(sn,"isObjectLike");ve.exports=sn});var ye=u((Qn,Ce)=>{"use strict";var an=ge(),cn=be(),un="[object Symbol]";function ln(e){return typeof e=="symbol"||cn(e)&&an(e)==un}n(ln,"isSymbol");Ce.exports=ln});var Se=u((Zn,xe)=>{"use strict";var fn=oe(),he=_(),dn=ye(),Te=NaN,mn=/^[-+]0x[0-9a-f]+$/i,pn=/^0b[01]+$/i,gn=/^0o[0-7]+$/i,vn=parseInt;function bn(e){if(typeof e=="number")return e;if(dn(e))return Te;if(he(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=he(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=fn(e);var r=pn.test(e);return r||gn.test(e)?vn(e.slice(2),r?2:8):mn.test(e)?Te:+e}n(bn,"toNumber");xe.exports=bn});var Ee=u((nt,Oe)=>{"use strict";var Cn=_(),W=ee(),je=Se(),yn="Expected a function",hn=Math.max,Tn=Math.min;function xn(e,t,r){var o,s,p,l,a,f,h=0,d=!1,g=!1,j=!0;if(typeof e!="function")throw new TypeError(yn);t=je(t)||0,Cn(r)&&(d=!!r.leading,g="maxWait"in r,p=g?hn(je(r.maxWait)||0,t):p,j="trailing"in r?!!r.trailing:j);function m(i){var v=o,T=s;return o=s=void 0,h=i,l=e.apply(T,v),l}n(m,"invokeFunc");function P(i){return h=i,a=setTimeout(x,t),d?m(i):l}n(P,"leadingEdge");function I(i){var v=i-f,T=i-h,w=t-v;return g?Tn(w,p-T):w}n(I,"remainingWait");function O(i){var v=i-f,T=i-h;return f===void 0||v>=t||v<0||g&&T>=p}n(O,"shouldInvoke");function x(){var i=W();if(O(i))return E(i);a=setTimeout(x,I(i))}n(x,"timerExpired");function E(i){return a=void 0,j&&o?m(i):(o=s=void 0,l)}n(E,"trailingEdge");function b(){a!==void 0&&clearTimeout(a),h=0,o=f=s=a=void 0}n(b,"cancel");function q(){return a===void 0?l:E(W())}n(q,"flush");function S(){var i=W(),v=O(i);if(o=arguments,s=this,f=i,v){if(a===void 0)return P(f);if(g)return clearTimeout(a),a=setTimeout(x,t),m(f)}return a===void 0&&(a=setTimeout(x,t)),l}return n(S,"debounced"),S.cancel=b,S.flush=q,S}n(xn,"debounce");Oe.exports=xn});import{useState as On,useCallback as En,useEffect as Ie,useRef as Rn}from"react";import Pn from"lodash.omit";var Pe=ke(Ee(),1);import{useCallback as Sn,useEffect as jn,useRef as Re}from"react";function B(e,t){let r=Re(e);jn(()=>{r.current=e},[e]);let o=Re((0,Pe.default)(s=>{r.current(s)},t)).current;return Sn(s=>{o(s)},[o])}n(B,"useDebounce");import{Fragment as wn,jsx as y,jsxs as qe}from"react/jsx-runtime";var In=n(({description:e,helpCenter:t,toggle:r,className:o})=>qe("span",{className:o,children:[y(U,{as:"span",helpCenter:t,children:e})," ",r]}),"DescriptionWithConversion"),qn=n(({showConversion:e,targetCurrency:t,className:r,onClick:o})=>{let{components:s}=J(),p=e?`Hide ${t} conversion`:`Show ${t} conversion`,l=s?.button;if(!l)throw new Error("Button component not found");return y(l,{className:r,"data-type":"inline",onClick:o,children:p})},"ConversionToggle"),bt=n(({sourceCurrency:e,targetCurrency:t,mainFieldName:r,conversionFieldName:o,conversionProperties:s,classNamePrefix:p,description:l,conversionType:a="spread",meta:f,splitDescription:h=!1,...d})=>{let[g,j]=On(!1),{setValue:m,watch:P}=A(),I=P(r||d.name),O=Rn(!0),x=e&&t&&e!==t,{mutateAsync:E}=X({type:a}),b=`${d.name}_converted`;Ie(()=>{m(b,r||d.name)},[m,r,d.name,b]),Ie(()=>{if(O.current){O.current=!1;return}m(o,"")},[e,o,m]);let q=En(async(c,C,k)=>{if(!(!c||isNaN(c)||c<=0))return E({source_currency:C,target_currency:k,amount:c})},[E]),S=B(async c=>{let C=N(c),M=1/((await q(C,t,e))?.data?.data.conversion_data?.exchange_rate??1),Fe=G(Number(C)*M);m(o,D(Fe))},500),i=B(async c=>{let C=N(c),M=(await q(C,t,e))?.data?.data.conversion_data.target_amount;m(r||d.name,D(M))},500),v=n(c=>{m(b,r||d.name),g&&S(c.target.value)},"handleMainFieldChange"),T=n(c=>{m(b,o),i(c.target.value)},"handleConversionFieldChange"),w=n(c=>{c.preventDefault(),j(C=>!C),!g&&I&&S(I)},"toggleConversion"),F=x?y(qn,{targetCurrency:t,showConversion:g,className:`${p}-button`,onClick:w}):null,we=h?{meta:f,description:l,descriptionSuffix:F}:{meta:F?Pn(f,"helpCenter"):f,description:F?y(In,{description:l,helpCenter:y(V,{helpCenter:f?.helpCenter}),toggle:F,className:`${p}-description`}):l};return qe(wn,{children:[y(L,{...d,...we,name:r||d.name,additionalProps:{currency:e},type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:v}),g&&y(L,{additionalProps:{currency:t},name:o,label:s?.label||"Conversion",description:s?.description,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:T}),y("input",{type:"hidden",name:b,value:P(b)||r||d.name})]})},"CurrencyConversionField");export{bt as a};
2
+ //# sourceMappingURL=chunk-VKORYYED.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../node_modules/lodash/isObject.js","../node_modules/lodash/_freeGlobal.js","../node_modules/lodash/_root.js","../node_modules/lodash/now.js","../node_modules/lodash/_trimmedEndIndex.js","../node_modules/lodash/_baseTrim.js","../node_modules/lodash/_Symbol.js","../node_modules/lodash/_getRawTag.js","../node_modules/lodash/_objectToString.js","../node_modules/lodash/_baseGetTag.js","../node_modules/lodash/isObjectLike.js","../node_modules/lodash/isSymbol.js","../node_modules/lodash/toNumber.js","../node_modules/lodash/debounce.js","../src/components/form/fields/CurrencyConversionField.tsx","../src/common/hooks.ts"],"sourcesContent":["/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","import { ReactNode, useState, useCallback, useEffect, useRef } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport omit from 'lodash.omit';\nimport { TextField } from '@/src/components/form/fields/TextField';\nimport { useConvertCurrency } from '@/src/flows/Onboarding/api';\nimport { JSFField } from '@/src/types/remoteFlows';\nimport { HelpCenterDataProps } from '@/src/types/fields';\nimport { useFormFields } from '@/src/context';\nimport { useDebounce } from '@/src/common/hooks';\nimport { FormDescription } from '@/src/components/ui/form';\nimport { HelpCenter } from '@/src/components/shared/zendesk-drawer/HelpCenter';\nimport {\n convertFromCents,\n convertToCents,\n round,\n} from '@/src/components/form/utils';\n\ntype DescriptionWithConversionProps = {\n description: ReactNode;\n helpCenter: ReactNode;\n toggle: ReactNode;\n className: string;\n};\n\nconst DescriptionWithConversion = ({\n description,\n helpCenter,\n toggle,\n className,\n}: DescriptionWithConversionProps) => (\n <span className={className}>\n <FormDescription as='span' helpCenter={helpCenter}>\n {description}\n </FormDescription>{' '}\n {toggle}\n </span>\n);\n\ntype ConversionToggleProps = {\n showConversion: boolean;\n targetCurrency: string;\n className: string;\n onClick: (evt: React.MouseEvent<HTMLButtonElement>) => void;\n};\n\nconst ConversionToggle = ({\n showConversion,\n targetCurrency,\n className,\n onClick,\n}: ConversionToggleProps) => {\n const { components } = useFormFields();\n const label = showConversion\n ? `Hide ${targetCurrency} conversion`\n : `Show ${targetCurrency} conversion`;\n\n const CustomButton = components?.button;\n if (!CustomButton) {\n throw new Error(`Button component not found`);\n }\n\n return (\n <CustomButton className={className} data-type='inline' onClick={onClick}>\n {label}\n </CustomButton>\n );\n};\n\nexport type CurrencyConversionFieldProps = JSFField & {\n sourceCurrency: string;\n targetCurrency: string;\n mainFieldName?: string;\n conversionFieldName: string;\n conversionProperties?: {\n label?: string;\n description?: ReactNode;\n };\n useProxy?: boolean;\n classNamePrefix: string;\n conversionType?: 'spread' | 'no_spread';\n meta?: {\n helpCenter?: HelpCenterDataProps;\n };\n /**\n * Enabled by the 'split_salary_description' feature flag. When on, the description, the help\n * center link and the conversion toggle are handed to the text component as three separate\n * slots instead of being packed into the description node.\n */\n splitDescription?: boolean;\n};\n\nexport const CurrencyConversionField = ({\n sourceCurrency,\n targetCurrency,\n mainFieldName,\n conversionFieldName,\n conversionProperties,\n classNamePrefix,\n description,\n conversionType = 'spread',\n meta,\n splitDescription = false,\n ...props\n}: CurrencyConversionFieldProps) => {\n const [showConversion, setShowConversion] = useState(false);\n const { setValue, watch } = useFormContext();\n const fieldValue = watch(mainFieldName || props.name);\n const isFirstRender = useRef(true);\n\n const canShowConversion =\n sourceCurrency && targetCurrency && sourceCurrency !== targetCurrency;\n\n const { mutateAsync: convertCurrency } = useConvertCurrency({\n type: conversionType,\n });\n\n // we keep track of the last input the user used, so we can make sure\n // we keep consistent currency rates\n const lastInputFieldName = `${props.name}_converted`;\n useEffect(() => {\n setValue(lastInputFieldName, mainFieldName || props.name);\n }, [setValue, mainFieldName, props.name, lastInputFieldName]);\n\n useEffect(() => {\n if (isFirstRender.current) {\n isFirstRender.current = false;\n return;\n }\n\n // when source currency changes, reset the conversion field\n setValue(conversionFieldName, '');\n }, [sourceCurrency, conversionFieldName, setValue]);\n\n const convertCurrencyCallback = useCallback(\n async (amount: number | null, fromCurrency: string, toCurrency: string) => {\n if (!amount || isNaN(amount) || amount <= 0) return;\n\n return convertCurrency({\n source_currency: fromCurrency,\n target_currency: toCurrency,\n amount,\n });\n },\n [convertCurrency],\n );\n\n const debouncedConvertCurrency = useDebounce(async (value: string) => {\n // The SDK sets the employer billing currency in the salary field, but internally we don't do it like this, is set based on the employee billing currency\n // That's why we need to do 1 / exchange rate to get the correct amount, if currencies were different, it would be done in the debouncedConvertCurrencyReverse\n // THE BE always transforms from the target currency to the source currency\n const amountInCents = convertToCents(value);\n const conversion = await convertCurrencyCallback(\n amountInCents,\n targetCurrency,\n sourceCurrency,\n );\n\n const exchangeRate =\n 1 / (conversion?.data?.data.conversion_data?.exchange_rate ?? 1);\n\n const amount = round(Number(amountInCents) * exchangeRate);\n\n setValue(conversionFieldName, convertFromCents(amount));\n }, 500);\n\n const debouncedConvertCurrencyReverse = useDebounce(async (value: string) => {\n const amount = convertToCents(value);\n const conversion = await convertCurrencyCallback(\n amount,\n targetCurrency,\n sourceCurrency,\n );\n\n const conversionAmount =\n conversion?.data?.data.conversion_data.target_amount;\n\n setValue(mainFieldName || props.name, convertFromCents(conversionAmount));\n }, 500);\n\n const handleMainFieldChange = (evt: React.ChangeEvent<HTMLInputElement>) => {\n setValue(lastInputFieldName, mainFieldName || props.name);\n if (showConversion) {\n debouncedConvertCurrency(evt.target.value);\n }\n };\n\n const handleConversionFieldChange = (\n evt: React.ChangeEvent<HTMLInputElement>,\n ) => {\n setValue(lastInputFieldName, conversionFieldName);\n debouncedConvertCurrencyReverse(evt.target.value);\n };\n\n const toggleConversion = (evt: React.MouseEvent<HTMLButtonElement>) => {\n evt.preventDefault();\n setShowConversion((prev) => !prev);\n\n if (!showConversion && fieldValue) {\n debouncedConvertCurrency(fieldValue);\n }\n };\n\n const conversionToggle = canShowConversion ? (\n <ConversionToggle\n targetCurrency={targetCurrency}\n showConversion={showConversion}\n className={`${classNamePrefix}-button`}\n onClick={toggleConversion}\n />\n ) : null;\n\n // With the split_salary_description feature, the toggle is handed over as a separate slot so the\n // text component stays free to render the description, the help center link and the toggle\n // however it wants. Without it, we keep packing them into the description node: it's the only\n // slot every text component is known to render, so the toggle can't get lost. The help center\n // link is then rendered by us and stripped from the meta we forward, to avoid rendering it twice\n // (FormDescription appends it after its children, which would put it after the toggle).\n const descriptionProps = splitDescription\n ? { meta, description, descriptionSuffix: conversionToggle }\n : {\n meta: conversionToggle ? omit(meta, 'helpCenter') : meta,\n description: conversionToggle ? (\n <DescriptionWithConversion\n description={description}\n helpCenter={<HelpCenter helpCenter={meta?.helpCenter} />}\n toggle={conversionToggle}\n className={`${classNamePrefix}-description`}\n />\n ) : (\n description\n ),\n };\n\n return (\n <>\n <TextField\n {...props}\n {...descriptionProps}\n name={mainFieldName || props.name}\n additionalProps={{ currency: sourceCurrency }}\n type='text'\n inputMode='decimal'\n pattern='^[0-9.]*$'\n maxLength={15}\n onChange={handleMainFieldChange}\n />\n {showConversion && (\n <TextField\n additionalProps={{ currency: targetCurrency }}\n name={conversionFieldName}\n label={conversionProperties?.label || 'Conversion'}\n description={conversionProperties?.description}\n type='text'\n inputMode='decimal'\n pattern='^[0-9.]*$'\n maxLength={15}\n onChange={handleConversionFieldChange}\n />\n )}\n <input\n type='hidden'\n name={lastInputFieldName}\n value={watch(lastInputFieldName) || mainFieldName || props.name}\n />\n </>\n );\n};\n","import { useCallback, useEffect, useRef } from 'react';\nimport debounce from 'lodash/debounce';\n\nexport function useDebounce(\n callback: (value: string) => Promise<void>,\n delay: number,\n) {\n const callbackRef = useRef(callback);\n\n useEffect(() => {\n callbackRef.current = callback;\n }, [callback]);\n\n const debouncedFn = useRef(\n // WE NEED TO FIX: react-hooks/refs - Passing a ref to a function may read its value during render\n // oxlint-disable-next-line react-hooks/refs\n debounce((value: string) => {\n callbackRef.current(value);\n }, delay),\n ).current;\n\n return useCallback(\n (value: string) => {\n debouncedFn(value);\n },\n [debouncedFn],\n );\n}\n"],"mappings":"6VAAA,IAAAA,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cAyBA,SAASC,GAASC,EAAO,CACvB,IAAIC,EAAO,OAAOD,EAClB,OAAOA,GAAS,OAASC,GAAQ,UAAYA,GAAQ,WACvD,CAHSC,EAAAH,GAAA,YAKTD,EAAO,QAAUC,KC9BjB,IAAAI,EAAAC,EAAA,CAAAC,GAAAC,IAAA,cACA,IAAIC,GAAa,OAAO,QAAU,UAAY,QAAU,OAAO,SAAW,QAAU,OAEpFD,EAAO,QAAUC,KCHjB,IAAAC,EAAAC,EAAA,CAAAC,GAAAC,IAAA,kBAAIC,GAAa,IAGbC,GAAW,OAAO,MAAQ,UAAY,MAAQ,KAAK,SAAW,QAAU,KAGxEC,GAAOF,IAAcC,IAAY,SAAS,aAAa,EAAE,EAE7DF,EAAO,QAAUG,KCRjB,IAAAC,GAAAC,EAAA,CAAAC,GAAAC,IAAA,kBAAIC,GAAO,IAkBPC,GAAMC,EAAA,UAAW,CACnB,OAAOF,GAAK,KAAK,IAAI,CACvB,EAFU,OAIVD,EAAO,QAAUE,KCtBjB,IAAAE,GAAAC,EAAA,CAAAC,GAAAC,KAAA,cACA,IAAIC,GAAe,KAUnB,SAASC,GAAgBC,EAAQ,CAG/B,QAFIC,EAAQD,EAAO,OAEZC,KAAWH,GAAa,KAAKE,EAAO,OAAOC,CAAK,CAAC,GAAG,CAC3D,OAAOA,CACT,CALSC,EAAAH,GAAA,mBAOTF,GAAO,QAAUE,KClBjB,IAAAI,GAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAkB,KAGlBC,GAAc,OASlB,SAASC,GAASC,EAAQ,CACxB,OAAOA,GACHA,EAAO,MAAM,EAAGH,GAAgBG,CAAM,EAAI,CAAC,EAAE,QAAQF,GAAa,EAAE,CAE1E,CAJSG,EAAAF,GAAA,YAMTH,GAAO,QAAUG,KClBjB,IAAAG,EAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAO,IAGPC,GAASD,GAAK,OAElBD,GAAO,QAAUE,KCLjB,IAAAC,GAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAS,IAGTC,GAAc,OAAO,UAGrBC,GAAiBD,GAAY,eAO7BE,GAAuBF,GAAY,SAGnCG,EAAiBJ,GAASA,GAAO,YAAc,OASnD,SAASK,GAAUC,EAAO,CACxB,IAAIC,EAAQL,GAAe,KAAKI,EAAOF,CAAc,EACjDI,EAAMF,EAAMF,CAAc,EAE9B,GAAI,CACFE,EAAMF,CAAc,EAAI,OACxB,IAAIK,EAAW,EACjB,MAAY,CAAC,CAEb,IAAIC,EAASP,GAAqB,KAAKG,CAAK,EAC5C,OAAIG,IACEF,EACFD,EAAMF,CAAc,EAAII,EAExB,OAAOF,EAAMF,CAAc,GAGxBM,CACT,CAlBSC,EAAAN,GAAA,aAoBTN,GAAO,QAAUM,KC7CjB,IAAAO,GAAAC,EAAA,CAAAC,GAAAC,KAAA,cACA,IAAIC,GAAc,OAAO,UAOrBC,GAAuBD,GAAY,SASvC,SAASE,GAAeC,EAAO,CAC7B,OAAOF,GAAqB,KAAKE,CAAK,CACxC,CAFSC,EAAAF,GAAA,kBAITH,GAAO,QAAUG,KCrBjB,IAAAG,GAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAS,IACTC,GAAY,KACZC,GAAiB,KAGjBC,GAAU,gBACVC,GAAe,qBAGfC,GAAiBL,GAASA,GAAO,YAAc,OASnD,SAASM,GAAWC,EAAO,CACzB,OAAIA,GAAS,KACJA,IAAU,OAAYH,GAAeD,GAEtCE,IAAkBA,MAAkB,OAAOE,CAAK,EACpDN,GAAUM,CAAK,EACfL,GAAeK,CAAK,CAC1B,CAPSC,EAAAF,GAAA,cASTP,GAAO,QAAUO,KC3BjB,IAAAG,GAAAC,EAAA,CAAAC,GAAAC,KAAA,cAwBA,SAASC,GAAaC,EAAO,CAC3B,OAAOA,GAAS,MAAQ,OAAOA,GAAS,QAC1C,CAFSC,EAAAF,GAAA,gBAITD,GAAO,QAAUC,KC5BjB,IAAAG,GAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAa,KACbC,GAAe,KAGfC,GAAY,kBAmBhB,SAASC,GAASC,EAAO,CACvB,OAAO,OAAOA,GAAS,UACpBH,GAAaG,CAAK,GAAKJ,GAAWI,CAAK,GAAKF,EACjD,CAHSG,EAAAF,GAAA,YAKTJ,GAAO,QAAUI,KC5BjB,IAAAG,GAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAW,KACXC,GAAW,IACXC,GAAW,KAGXC,GAAM,IAGNC,GAAa,qBAGbC,GAAa,aAGbC,GAAY,cAGZC,GAAe,SAyBnB,SAASC,GAASC,EAAO,CACvB,GAAI,OAAOA,GAAS,SAClB,OAAOA,EAET,GAAIP,GAASO,CAAK,EAChB,OAAON,GAET,GAAIF,GAASQ,CAAK,EAAG,CACnB,IAAIC,EAAQ,OAAOD,EAAM,SAAW,WAAaA,EAAM,QAAQ,EAAIA,EACnEA,EAAQR,GAASS,CAAK,EAAKA,EAAQ,GAAMA,CAC3C,CACA,GAAI,OAAOD,GAAS,SAClB,OAAOA,IAAU,EAAIA,EAAQ,CAACA,EAEhCA,EAAQT,GAASS,CAAK,EACtB,IAAIE,EAAWN,GAAW,KAAKI,CAAK,EACpC,OAAQE,GAAYL,GAAU,KAAKG,CAAK,EACpCF,GAAaE,EAAM,MAAM,CAAC,EAAGE,EAAW,EAAI,CAAC,EAC5CP,GAAW,KAAKK,CAAK,EAAIN,GAAM,CAACM,CACvC,CAnBSG,EAAAJ,GAAA,YAqBTT,GAAO,QAAUS,KC/DjB,IAAAK,GAAAC,EAAA,CAAAC,GAAAC,KAAA,kBAAIC,GAAW,IACXC,EAAM,KACNC,GAAW,KAGXC,GAAkB,sBAGlBC,GAAY,KAAK,IACjBC,GAAY,KAAK,IAwDrB,SAASC,GAASC,EAAMC,EAAMC,EAAS,CACrC,IAAIC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EAAiB,EACjBC,EAAU,GACVC,EAAS,GACTC,EAAW,GAEf,GAAI,OAAOZ,GAAQ,WACjB,MAAM,IAAI,UAAUJ,EAAe,EAErCK,EAAON,GAASM,CAAI,GAAK,EACrBR,GAASS,CAAO,IAClBQ,EAAU,CAAC,CAACR,EAAQ,QACpBS,EAAS,YAAaT,EACtBG,EAAUM,EAASd,GAAUF,GAASO,EAAQ,OAAO,GAAK,EAAGD,CAAI,EAAII,EACrEO,EAAW,aAAcV,EAAU,CAAC,CAACA,EAAQ,SAAWU,GAG1D,SAASC,EAAWC,EAAM,CACxB,IAAIC,EAAOZ,EACPa,EAAUZ,EAEd,OAAAD,EAAWC,EAAW,OACtBK,EAAiBK,EACjBR,EAASN,EAAK,MAAMgB,EAASD,CAAI,EAC1BT,CACT,CARSW,EAAAJ,EAAA,cAUT,SAASK,EAAYJ,EAAM,CAEzB,OAAAL,EAAiBK,EAEjBP,EAAU,WAAWY,EAAclB,CAAI,EAEhCS,EAAUG,EAAWC,CAAI,EAAIR,CACtC,CAPSW,EAAAC,EAAA,eAST,SAASE,EAAcN,EAAM,CAC3B,IAAIO,EAAoBP,EAAON,EAC3Bc,EAAsBR,EAAOL,EAC7Bc,EAActB,EAAOoB,EAEzB,OAAOV,EACHb,GAAUyB,EAAalB,EAAUiB,CAAmB,EACpDC,CACN,CARSN,EAAAG,EAAA,iBAUT,SAASI,EAAaV,EAAM,CAC1B,IAAIO,EAAoBP,EAAON,EAC3Bc,EAAsBR,EAAOL,EAKjC,OAAQD,IAAiB,QAAca,GAAqBpB,GACzDoB,EAAoB,GAAOV,GAAUW,GAAuBjB,CACjE,CATSY,EAAAO,EAAA,gBAWT,SAASL,GAAe,CACtB,IAAIL,EAAOpB,EAAI,EACf,GAAI8B,EAAaV,CAAI,EACnB,OAAOW,EAAaX,CAAI,EAG1BP,EAAU,WAAWY,EAAcC,EAAcN,CAAI,CAAC,CACxD,CAPSG,EAAAE,EAAA,gBAST,SAASM,EAAaX,EAAM,CAK1B,OAJAP,EAAU,OAINK,GAAYT,EACPU,EAAWC,CAAI,GAExBX,EAAWC,EAAW,OACfE,EACT,CAVSW,EAAAQ,EAAA,gBAYT,SAASC,GAAS,CACZnB,IAAY,QACd,aAAaA,CAAO,EAEtBE,EAAiB,EACjBN,EAAWK,EAAeJ,EAAWG,EAAU,MACjD,CANSU,EAAAS,EAAA,UAQT,SAASC,GAAQ,CACf,OAAOpB,IAAY,OAAYD,EAASmB,EAAa/B,EAAI,CAAC,CAC5D,CAFSuB,EAAAU,EAAA,SAIT,SAASC,GAAY,CACnB,IAAId,EAAOpB,EAAI,EACXmC,EAAaL,EAAaV,CAAI,EAMlC,GAJAX,EAAW,UACXC,EAAW,KACXI,EAAeM,EAEXe,EAAY,CACd,GAAItB,IAAY,OACd,OAAOW,EAAYV,CAAY,EAEjC,GAAIG,EAEF,oBAAaJ,CAAO,EACpBA,EAAU,WAAWY,EAAclB,CAAI,EAChCY,EAAWL,CAAY,CAElC,CACA,OAAID,IAAY,SACdA,EAAU,WAAWY,EAAclB,CAAI,GAElCK,CACT,CAvBS,OAAAW,EAAAW,EAAA,aAwBTA,EAAU,OAASF,EACnBE,EAAU,MAAQD,EACXC,CACT,CA3HSX,EAAAlB,GAAA,YA6HTP,GAAO,QAAUO,KC9LjB,OAAoB,YAAA+B,GAAU,eAAAC,GAAa,aAAAC,GAAW,UAAAC,OAAc,QAEpE,OAAOC,OAAU,cCDjB,IAAAC,GAAqB,WADrB,OAAS,eAAAC,GAAa,aAAAC,GAAW,UAAAC,OAAc,QAGxC,SAASC,EACdC,EACAC,EACA,CACA,IAAMC,EAAcC,GAAOH,CAAQ,EAEnCI,GAAU,IAAM,CACdF,EAAY,QAAUF,CACxB,EAAG,CAACA,CAAQ,CAAC,EAEb,IAAMK,EAAcF,MAGlB,GAAAG,SAAUC,GAAkB,CAC1BL,EAAY,QAAQK,CAAK,CAC3B,EAAGN,CAAK,CACV,EAAE,QAEF,OAAOO,GACJD,GAAkB,CACjBF,EAAYE,CAAK,CACnB,EACA,CAACF,CAAW,CACd,CACF,CAxBgBI,EAAAV,EAAA,eD2Bd,OA4ME,YAAAW,GA3MA,OAAAC,EADF,QAAAC,OAAA,oBANF,IAAMC,GAA4BC,EAAA,CAAC,CACjC,YAAAC,EACA,WAAAC,EACA,OAAAC,EACA,UAAAC,CACF,IACEN,GAAC,QAAK,UAAWM,EACf,UAAAP,EAACQ,EAAA,CAAgB,GAAG,OAAO,WAAYH,EACpC,SAAAD,EACH,EAAmB,IAClBE,GACH,EAXgC,6BAqB5BG,GAAmBN,EAAA,CAAC,CACxB,eAAAO,EACA,eAAAC,EACA,UAAAJ,EACA,QAAAK,CACF,IAA6B,CAC3B,GAAM,CAAE,WAAAC,CAAW,EAAIC,EAAc,EAC/BC,EAAQL,EACV,QAAQC,CAAc,cACtB,QAAQA,CAAc,cAEpBK,EAAeH,GAAY,OACjC,GAAI,CAACG,EACH,MAAM,IAAI,MAAM,4BAA4B,EAG9C,OACEhB,EAACgB,EAAA,CAAa,UAAWT,EAAW,YAAU,SAAS,QAASK,EAC7D,SAAAG,EACH,CAEJ,EArByB,oBA8CZE,GAA0Bd,EAAA,CAAC,CACtC,eAAAe,EACA,eAAAP,EACA,cAAAQ,EACA,oBAAAC,EACA,qBAAAC,EACA,gBAAAC,EACA,YAAAlB,EACA,eAAAmB,EAAiB,SACjB,KAAAC,EACA,iBAAAC,EAAmB,GACnB,GAAGC,CACL,IAAoC,CAClC,GAAM,CAAChB,EAAgBiB,CAAiB,EAAIC,GAAS,EAAK,EACpD,CAAE,SAAAC,EAAU,MAAAC,CAAM,EAAIC,EAAe,EACrCC,EAAaF,EAAMX,GAAiBO,EAAM,IAAI,EAC9CO,EAAgBC,GAAO,EAAI,EAE3BC,EACJjB,GAAkBP,GAAkBO,IAAmBP,EAEnD,CAAE,YAAayB,CAAgB,EAAIC,EAAmB,CAC1D,KAAMd,CACR,CAAC,EAIKe,EAAqB,GAAGZ,EAAM,IAAI,aACxCa,GAAU,IAAM,CACdV,EAASS,EAAoBnB,GAAiBO,EAAM,IAAI,CAC1D,EAAG,CAACG,EAAUV,EAAeO,EAAM,KAAMY,CAAkB,CAAC,EAE5DC,GAAU,IAAM,CACd,GAAIN,EAAc,QAAS,CACzBA,EAAc,QAAU,GACxB,MACF,CAGAJ,EAAST,EAAqB,EAAE,CAClC,EAAG,CAACF,EAAgBE,EAAqBS,CAAQ,CAAC,EAElD,IAAMW,EAA0BC,GAC9B,MAAOC,EAAuBC,EAAsBC,IAAuB,CACzE,GAAI,GAACF,GAAU,MAAMA,CAAM,GAAKA,GAAU,GAE1C,OAAON,EAAgB,CACrB,gBAAiBO,EACjB,gBAAiBC,EACjB,OAAAF,CACF,CAAC,CACH,EACA,CAACN,CAAe,CAClB,EAEMS,EAA2BC,EAAY,MAAOC,GAAkB,CAIpE,IAAMC,EAAgBC,EAAeF,CAAK,EAOpCG,EACJ,IAPiB,MAAMV,EACvBQ,EACArC,EACAO,CACF,IAGmB,MAAM,KAAK,iBAAiB,eAAiB,GAE1DwB,GAASS,EAAM,OAAOH,CAAa,EAAIE,CAAY,EAEzDrB,EAAST,EAAqBgC,EAAiBV,EAAM,CAAC,CACxD,EAAG,GAAG,EAEAW,EAAkCP,EAAY,MAAOC,GAAkB,CAC3E,IAAML,EAASO,EAAeF,CAAK,EAO7BO,GANa,MAAMd,EACvBE,EACA/B,EACAO,CACF,IAGc,MAAM,KAAK,gBAAgB,cAEzCW,EAASV,GAAiBO,EAAM,KAAM0B,EAAiBE,CAAgB,CAAC,CAC1E,EAAG,GAAG,EAEAC,EAAwBpD,EAACqD,GAA6C,CAC1E3B,EAASS,EAAoBnB,GAAiBO,EAAM,IAAI,EACpDhB,GACFmC,EAAyBW,EAAI,OAAO,KAAK,CAE7C,EAL8B,yBAOxBC,EAA8BtD,EAClCqD,GACG,CACH3B,EAASS,EAAoBlB,CAAmB,EAChDiC,EAAgCG,EAAI,OAAO,KAAK,CAClD,EALoC,+BAO9BE,EAAmBvD,EAACqD,GAA6C,CACrEA,EAAI,eAAe,EACnB7B,EAAmBgC,GAAS,CAACA,CAAI,EAE7B,CAACjD,GAAkBsB,GACrBa,EAAyBb,CAAU,CAEvC,EAPyB,oBASnB4B,EAAmBzB,EACvBnC,EAACS,GAAA,CACC,eAAgBE,EAChB,eAAgBD,EAChB,UAAW,GAAGY,CAAe,UAC7B,QAASoC,EACX,EACE,KAQEG,GAAmBpC,EACrB,CAAE,KAAAD,EAAM,YAAApB,EAAa,kBAAmBwD,CAAiB,EACzD,CACE,KAAMA,EAAmBE,GAAKtC,EAAM,YAAY,EAAIA,EACpD,YAAaoC,EACX5D,EAACE,GAAA,CACC,YAAaE,EACb,WAAYJ,EAAC+D,EAAA,CAAW,WAAYvC,GAAM,WAAY,EACtD,OAAQoC,EACR,UAAW,GAAGtC,CAAe,eAC/B,EAEAlB,CAEJ,EAEJ,OACEH,GAAAF,GAAA,CACE,UAAAC,EAACgE,EAAA,CACE,GAAGtC,EACH,GAAGmC,GACJ,KAAM1C,GAAiBO,EAAM,KAC7B,gBAAiB,CAAE,SAAUR,CAAe,EAC5C,KAAK,OACL,UAAU,UACV,QAAQ,YACR,UAAW,GACX,SAAUqC,EACZ,EACC7C,GACCV,EAACgE,EAAA,CACC,gBAAiB,CAAE,SAAUrD,CAAe,EAC5C,KAAMS,EACN,MAAOC,GAAsB,OAAS,aACtC,YAAaA,GAAsB,YACnC,KAAK,OACL,UAAU,UACV,QAAQ,YACR,UAAW,GACX,SAAUoC,EACZ,EAEFzD,EAAC,SACC,KAAK,SACL,KAAMsC,EACN,MAAOR,EAAMQ,CAAkB,GAAKnB,GAAiBO,EAAM,KAC7D,GACF,CAEJ,EA/KuC","names":["require_isObject","__commonJSMin","exports","module","isObject","value","type","__name","require_freeGlobal","__commonJSMin","exports","module","freeGlobal","require_root","__commonJSMin","exports","module","freeGlobal","freeSelf","root","require_now","__commonJSMin","exports","module","root","now","__name","require_trimmedEndIndex","__commonJSMin","exports","module","reWhitespace","trimmedEndIndex","string","index","__name","require_baseTrim","__commonJSMin","exports","module","trimmedEndIndex","reTrimStart","baseTrim","string","__name","require_Symbol","__commonJSMin","exports","module","root","Symbol","require_getRawTag","__commonJSMin","exports","module","Symbol","objectProto","hasOwnProperty","nativeObjectToString","symToStringTag","getRawTag","value","isOwn","tag","unmasked","result","__name","require_objectToString","__commonJSMin","exports","module","objectProto","nativeObjectToString","objectToString","value","__name","require_baseGetTag","__commonJSMin","exports","module","Symbol","getRawTag","objectToString","nullTag","undefinedTag","symToStringTag","baseGetTag","value","__name","require_isObjectLike","__commonJSMin","exports","module","isObjectLike","value","__name","require_isSymbol","__commonJSMin","exports","module","baseGetTag","isObjectLike","symbolTag","isSymbol","value","__name","require_toNumber","__commonJSMin","exports","module","baseTrim","isObject","isSymbol","NAN","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","toNumber","value","other","isBinary","__name","require_debounce","__commonJSMin","exports","module","isObject","now","toNumber","FUNC_ERROR_TEXT","nativeMax","nativeMin","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","args","thisArg","__name","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","useState","useCallback","useEffect","useRef","omit","import_debounce","useCallback","useEffect","useRef","useDebounce","callback","delay","callbackRef","useRef","useEffect","debouncedFn","debounce","value","useCallback","__name","Fragment","jsx","jsxs","DescriptionWithConversion","__name","description","helpCenter","toggle","className","FormDescription","ConversionToggle","showConversion","targetCurrency","onClick","components","useFormFields","label","CustomButton","CurrencyConversionField","sourceCurrency","mainFieldName","conversionFieldName","conversionProperties","classNamePrefix","conversionType","meta","splitDescription","props","setShowConversion","useState","setValue","watch","useFormContext","fieldValue","isFirstRender","useRef","canShowConversion","convertCurrency","useConvertCurrency","lastInputFieldName","useEffect","convertCurrencyCallback","useCallback","amount","fromCurrency","toCurrency","debouncedConvertCurrency","useDebounce","value","amountInCents","convertToCents","exchangeRate","round","convertFromCents","debouncedConvertCurrencyReverse","conversionAmount","handleMainFieldChange","evt","handleConversionFieldChange","toggleConversion","prev","conversionToggle","descriptionProps","omit","HelpCenter","TextField"]}
@@ -0,0 +1,2 @@
1
+ var e={"x-rmt-meta":{jsfOldVersion:!0},additionalProperties:!1,properties:{country_code:{title:"Country",description:"",type:"string",oneOf:[],"x-jsf-presentation":{inputType:"select"}}},required:["country_code"],type:"object","x-jsf-order":["country_code"]};export{e as a};
2
+ //# sourceMappingURL=chunk-VSK4KV55.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/PayrollAdminOnboarding/json-schemas/selectCountryStep.ts"],"sourcesContent":["export const gpSelectCountrySchema = {\n 'x-rmt-meta': { jsfOldVersion: true },\n additionalProperties: false,\n properties: {\n country_code: {\n title: 'Country',\n description: '',\n type: 'string',\n oneOf: [] as Array<{ const: string; title: string }>,\n 'x-jsf-presentation': { inputType: 'select' },\n },\n },\n required: ['country_code'],\n type: 'object',\n 'x-jsf-order': ['country_code'],\n};\n"],"mappings":"AAAO,IAAMA,EAAwB,CACnC,aAAc,CAAE,cAAe,EAAK,EACpC,qBAAsB,GACtB,WAAY,CACV,aAAc,CACZ,MAAO,UACP,YAAa,GACb,KAAM,SACN,MAAO,CAAC,EACR,qBAAsB,CAAE,UAAW,QAAS,CAC9C,CACF,EACA,SAAU,CAAC,cAAc,EACzB,KAAM,SACN,cAAe,CAAC,cAAc,CAChC","names":["gpSelectCountrySchema"]}
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-XDLVDPQ7.js";import{b as a}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function d({onSubmit:m}){let{terminationBag:o}=a(),r=i(async t=>{let n=await o?.parseFormValues(t);await m?.(n),o?.next()},"handleSubmit");return s(e,{defaultValues:o.fieldValues,onSubmit:r})}i(d,"PaidTimeOffForm");export{d as a};
2
- //# sourceMappingURL=chunk-JI3PAIMV.js.map
1
+ import{a as e}from"./chunk-GNVGW65D.js";import{b as a}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function d({onSubmit:m}){let{terminationBag:o}=a(),r=i(async t=>{let n=await o?.parseFormValues(t);await m?.(n),o?.next()},"handleSubmit");return s(e,{defaultValues:o.fieldValues,onSubmit:r})}i(d,"PaidTimeOffForm");export{d as a};
2
+ //# sourceMappingURL=chunk-WHY2WNWH.js.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-PKQG25GH.js";import{a as t}from"./chunk-7B3ATY3M.js";import{a}from"./chunk-JVZ5LUV4.js";import{a as e}from"./chunk-E5ATCB4A.js";var i={data:{version:7,schema:{additionalProperties:!1,allOf:[...e.data.schema.allOf,...t.data.schema.allOf,...r.data.schema.allOf,...a.data.schema.allOf],properties:{...e.data.schema.properties,...t.data.schema.properties,...r.data.schema.properties,...a.data.schema.properties},required:[...e.data.schema.required,...t.data.schema.required,...r.data.schema.required,...a.data.schema.required],type:"object","x-jsf-order":[...e.data.schema["x-jsf-order"],...t.data.schema["x-jsf-order"],...r.data.schema["x-jsf-order"],...a.data.schema["x-jsf-order"]],"x-rmt-meta":{jsfVersion:"1"}}}};export{i as a};
2
- //# sourceMappingURL=chunk-77AA65OH.js.map
1
+ import{a as r}from"./chunk-YE6NRJ2L.js";import{a as t}from"./chunk-SYZIGZ2F.js";import{a}from"./chunk-VEQWK7QQ.js";import{a as e}from"./chunk-AOE6FXVP.js";var i={data:{version:7,schema:{additionalProperties:!1,allOf:[...e.data.schema.allOf,...t.data.schema.allOf,...r.data.schema.allOf,...a.data.schema.allOf],properties:{...e.data.schema.properties,...t.data.schema.properties,...r.data.schema.properties,...a.data.schema.properties},required:[...e.data.schema.required,...t.data.schema.required,...r.data.schema.required,...a.data.schema.required],type:"object","x-jsf-order":[...e.data.schema["x-jsf-order"],...t.data.schema["x-jsf-order"],...r.data.schema["x-jsf-order"],...a.data.schema["x-jsf-order"]],"x-rmt-meta":{jsfOldVersion:!0}}}};export{i as a};
2
+ //# sourceMappingURL=chunk-WNOQNNRR.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/flows/Termination/json-schemas/jsonSchema.ts"],"sourcesContent":["import { additionalInformationSchema } from '@/src/flows/Termination/json-schemas/additionalInformation';\nimport { employeeComunicationSchema } from '@/src/flows/Termination/json-schemas/employeeComunication';\nimport { paidTimeOffSchema } from '@/src/flows/Termination/json-schemas/paidTimeOff';\nimport { terminationDetailsSchema } from '@/src/flows/Termination/json-schemas/terminationDetails';\n\nexport const jsonSchema = {\n data: {\n version: 7,\n schema: {\n additionalProperties: false,\n allOf: [\n ...employeeComunicationSchema.data.schema.allOf,\n ...terminationDetailsSchema.data.schema.allOf,\n ...paidTimeOffSchema.data.schema.allOf,\n ...additionalInformationSchema.data.schema.allOf,\n ],\n properties: {\n ...employeeComunicationSchema.data.schema.properties,\n ...terminationDetailsSchema.data.schema.properties,\n ...paidTimeOffSchema.data.schema.properties,\n ...additionalInformationSchema.data.schema.properties,\n },\n required: [\n ...employeeComunicationSchema.data.schema.required,\n ...terminationDetailsSchema.data.schema.required,\n ...paidTimeOffSchema.data.schema.required,\n ...additionalInformationSchema.data.schema.required,\n ],\n type: 'object',\n 'x-jsf-order': [\n ...employeeComunicationSchema.data.schema['x-jsf-order'],\n ...terminationDetailsSchema.data.schema['x-jsf-order'],\n ...paidTimeOffSchema.data.schema['x-jsf-order'],\n ...additionalInformationSchema.data.schema['x-jsf-order'],\n ],\n 'x-rmt-meta': {\n jsfVersion: '1',\n },\n },\n },\n};\n"],"mappings":"2JAKO,IAAMA,EAAa,CACxB,KAAM,CACJ,QAAS,EACT,OAAQ,CACN,qBAAsB,GACtB,MAAO,CACL,GAAGC,EAA2B,KAAK,OAAO,MAC1C,GAAGC,EAAyB,KAAK,OAAO,MACxC,GAAGC,EAAkB,KAAK,OAAO,MACjC,GAAGC,EAA4B,KAAK,OAAO,KAC7C,EACA,WAAY,CACV,GAAGH,EAA2B,KAAK,OAAO,WAC1C,GAAGC,EAAyB,KAAK,OAAO,WACxC,GAAGC,EAAkB,KAAK,OAAO,WACjC,GAAGC,EAA4B,KAAK,OAAO,UAC7C,EACA,SAAU,CACR,GAAGH,EAA2B,KAAK,OAAO,SAC1C,GAAGC,EAAyB,KAAK,OAAO,SACxC,GAAGC,EAAkB,KAAK,OAAO,SACjC,GAAGC,EAA4B,KAAK,OAAO,QAC7C,EACA,KAAM,SACN,cAAe,CACb,GAAGH,EAA2B,KAAK,OAAO,aAAa,EACvD,GAAGC,EAAyB,KAAK,OAAO,aAAa,EACrD,GAAGC,EAAkB,KAAK,OAAO,aAAa,EAC9C,GAAGC,EAA4B,KAAK,OAAO,aAAa,CAC1D,EACA,aAAc,CACZ,WAAY,GACd,CACF,CACF,CACF","names":["jsonSchema","employeeComunicationSchema","terminationDetailsSchema","paidTimeOffSchema","additionalInformationSchema"]}
1
+ {"version":3,"sources":["../src/flows/Termination/json-schemas/jsonSchema.ts"],"sourcesContent":["import { additionalInformationSchema } from '@/src/flows/Termination/json-schemas/additionalInformation';\nimport { employeeComunicationSchema } from '@/src/flows/Termination/json-schemas/employeeComunication';\nimport { paidTimeOffSchema } from '@/src/flows/Termination/json-schemas/paidTimeOff';\nimport { terminationDetailsSchema } from '@/src/flows/Termination/json-schemas/terminationDetails';\n\nexport const jsonSchema = {\n data: {\n version: 7,\n schema: {\n additionalProperties: false,\n allOf: [\n ...employeeComunicationSchema.data.schema.allOf,\n ...terminationDetailsSchema.data.schema.allOf,\n ...paidTimeOffSchema.data.schema.allOf,\n ...additionalInformationSchema.data.schema.allOf,\n ],\n properties: {\n ...employeeComunicationSchema.data.schema.properties,\n ...terminationDetailsSchema.data.schema.properties,\n ...paidTimeOffSchema.data.schema.properties,\n ...additionalInformationSchema.data.schema.properties,\n },\n required: [\n ...employeeComunicationSchema.data.schema.required,\n ...terminationDetailsSchema.data.schema.required,\n ...paidTimeOffSchema.data.schema.required,\n ...additionalInformationSchema.data.schema.required,\n ],\n type: 'object',\n 'x-jsf-order': [\n ...employeeComunicationSchema.data.schema['x-jsf-order'],\n ...terminationDetailsSchema.data.schema['x-jsf-order'],\n ...paidTimeOffSchema.data.schema['x-jsf-order'],\n ...additionalInformationSchema.data.schema['x-jsf-order'],\n ],\n 'x-rmt-meta': {\n jsfOldVersion: true,\n },\n },\n },\n};\n"],"mappings":"2JAKO,IAAMA,EAAa,CACxB,KAAM,CACJ,QAAS,EACT,OAAQ,CACN,qBAAsB,GACtB,MAAO,CACL,GAAGC,EAA2B,KAAK,OAAO,MAC1C,GAAGC,EAAyB,KAAK,OAAO,MACxC,GAAGC,EAAkB,KAAK,OAAO,MACjC,GAAGC,EAA4B,KAAK,OAAO,KAC7C,EACA,WAAY,CACV,GAAGH,EAA2B,KAAK,OAAO,WAC1C,GAAGC,EAAyB,KAAK,OAAO,WACxC,GAAGC,EAAkB,KAAK,OAAO,WACjC,GAAGC,EAA4B,KAAK,OAAO,UAC7C,EACA,SAAU,CACR,GAAGH,EAA2B,KAAK,OAAO,SAC1C,GAAGC,EAAyB,KAAK,OAAO,SACxC,GAAGC,EAAkB,KAAK,OAAO,SACjC,GAAGC,EAA4B,KAAK,OAAO,QAC7C,EACA,KAAM,SACN,cAAe,CACb,GAAGH,EAA2B,KAAK,OAAO,aAAa,EACvD,GAAGC,EAAyB,KAAK,OAAO,aAAa,EACrD,GAAGC,EAAkB,KAAK,OAAO,aAAa,EAC9C,GAAGC,EAA4B,KAAK,OAAO,aAAa,CAC1D,EACA,aAAc,CACZ,cAAe,EACjB,CACF,CACF,CACF","names":["jsonSchema","employeeComunicationSchema","terminationDetailsSchema","paidTimeOffSchema","additionalInformationSchema"]}
@@ -1,2 +1,2 @@
1
- import{b as s}from"./chunk-SS2SYDCB.js";import{a as t}from"./chunk-UZFEJMO6.js";import{a as l}from"./chunk-I4DU34BA.js";import{h as m}from"./chunk-AUPAAQUT.js";import{a as r}from"./chunk-P37U34EQ.js";import{jsx as i}from"react/jsx-runtime";import{createElement as p}from"react";function c({onSubmit:a,defaultValues:n}){let{formId:d,employeeBag:e}=s(),o=t({handleValidation:e.handleValidation,defaultValues:n??{},checkFieldUpdates:e.setFieldValues});return p(m,{...o,key:`form-${e.stepState.currentStep.name}`},i("form",{id:d,onSubmit:o.handleSubmit(f=>a(f,o)),className:"space-y-4 RemoteFlows__PayrollEmployeeForm",children:i(l,{fields:e.fields,fieldsets:e.meta["x-jsf-fieldsets"],fieldValues:e.fieldValues})}))}r(c,"PayrollEmployeeForm");export{c as a};
2
- //# sourceMappingURL=chunk-JVXI4RZU.js.map
1
+ import{b as s}from"./chunk-SS2SYDCB.js";import{a as t}from"./chunk-AFTFDGSD.js";import{a as l}from"./chunk-5NN5RWBG.js";import{b as m}from"./chunk-C7KVPEVX.js";import{a as r}from"./chunk-P37U34EQ.js";import{jsx as i}from"react/jsx-runtime";import{createElement as p}from"react";function c({onSubmit:a,defaultValues:n}){let{formId:d,employeeBag:e}=s(),o=t({handleValidation:e.handleValidation,defaultValues:n??{},checkFieldUpdates:e.setFieldValues});return p(m,{...o,key:`form-${e.stepState.currentStep.name}`},i("form",{id:d,onSubmit:o.handleSubmit(f=>a(f,o)),className:"space-y-4 RemoteFlows__PayrollEmployeeForm",children:i(l,{fields:e.fields,fieldsets:e.meta["x-jsf-fieldsets"],fieldValues:e.fieldValues})}))}r(c,"PayrollEmployeeForm");export{c as a};
2
+ //# sourceMappingURL=chunk-WU66SHVJ.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-H47XUL2L.js";import{b as i}from"./chunk-Q3ALCPJN.js";import{x as n}from"./chunk-C4HFMTSB.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as y}from"react/jsx-runtime";function E({onSubmit:c,onSuccess:s,onError:u}){let{contractorOnboardingBag:r}=i(),l=t(async(e,d)=>{try{await c?.({countryCode:e.country});let o=await r.onSubmit(e);if(o?.data){await s?.(o?.data),r?.next();return}}catch(o){let S=n(o,r.meta?.fields?.select_country,d);u?.(S)}},"handleSubmit"),m=r.stepState.values?.select_country||r.initialValues.select_country;return y(a,{defaultValues:m,onSubmit:l})}t(E,"SelectCountryStep");export{E as a};
2
- //# sourceMappingURL=chunk-PKJZ2N4C.js.map
1
+ import{a}from"./chunk-FFRROEPQ.js";import{b as i}from"./chunk-Q3ALCPJN.js";import{x as n}from"./chunk-C4HFMTSB.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as y}from"react/jsx-runtime";function E({onSubmit:c,onSuccess:s,onError:u}){let{contractorOnboardingBag:r}=i(),l=t(async(e,d)=>{try{await c?.({countryCode:e.country});let o=await r.onSubmit(e);if(o?.data){await s?.(o?.data),r?.next();return}}catch(o){let S=n(o,r.meta?.fields?.select_country,d);u?.(S)}},"handleSubmit"),m=r.stepState.values?.select_country||r.initialValues.select_country;return y(a,{defaultValues:m,onSubmit:l})}t(E,"SelectCountryStep");export{E as a};
2
+ //# sourceMappingURL=chunk-XLHTMWJ3.js.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-JVXI4RZU.js";import{a as o}from"./chunk-YPBPOUGX.js";import{b as a}from"./chunk-SS2SYDCB.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as n}from"react/jsx-runtime";function u(r){let{employeeBag:e}=a(),s=o(r);return e.taxStepsAvailability.federal_taxes.isAvailable?n(l,{onSubmit:s,defaultValues:{...e.initialValues?.federal_taxes,...e.stepState.values?.federal_taxes}}):null}t(u,"FederalTaxesStep");export{u as a};
2
- //# sourceMappingURL=chunk-ZODT3MJM.js.map
1
+ import{a as o}from"./chunk-YPBPOUGX.js";import{a as l}from"./chunk-WU66SHVJ.js";import{b as a}from"./chunk-SS2SYDCB.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as n}from"react/jsx-runtime";function u(r){let{employeeBag:e}=a(),s=o(r);return e.taxStepsAvailability.federal_taxes.isAvailable?n(l,{onSubmit:s,defaultValues:{...e.initialValues?.federal_taxes,...e.stepState.values?.federal_taxes}}):null}t(u,"FederalTaxesStep");export{u as a};
2
+ //# sourceMappingURL=chunk-XPLWBO73.js.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-L2YOD4GP.js";import{a as d}from"./chunk-KGSH67IW.js";import{a}from"./chunk-MEYX4D5K.js";import{a as p}from"./chunk-JK4CPPN4.js";import{a as m}from"./chunk-CCGAAOXN.js";import{a as l}from"./chunk-UGQNOBQH.js";import{a as t}from"./chunk-ILEO7LN4.js";import{a as n}from"./chunk-WCJZAOZR.js";import{a as r}from"./chunk-P37U34EQ.js";import{useId as c}from"react";import{jsx as u}from"react/jsx-runtime";var D=r(({companyId:e,legalEntityId:s,countryCode:f,employmentId:P,initialValues:y,options:b,render:g})=>{let A=c(),o=t({companyId:e,legalEntityId:s,countryCode:f,employmentId:P,initialValues:y,options:b});return u(n.Provider,{value:{formId:A,adminBag:o},children:g({adminBag:o,components:{SelectCountryStep:i,ContractDetailsStep:m,AdministrativeDetailsStep:a,InvitationStep:l,SubmitButton:d,BackButton:p}})})},"PayrollAdminOnboardingFlow");export{D as a};
2
- //# sourceMappingURL=chunk-BLKWR77C.js.map
1
+ import{a as d}from"./chunk-KGSH67IW.js";import{a}from"./chunk-I53YCEOC.js";import{a as p}from"./chunk-JK4CPPN4.js";import{a as m}from"./chunk-H4NJGAN4.js";import{a as l}from"./chunk-6UCTTR3O.js";import{a as i}from"./chunk-APSKAXM2.js";import{a as t}from"./chunk-YYIAA47F.js";import{a as n}from"./chunk-WCJZAOZR.js";import{a as r}from"./chunk-P37U34EQ.js";import{useId as c}from"react";import{jsx as u}from"react/jsx-runtime";var D=r(({companyId:e,legalEntityId:s,countryCode:f,employmentId:P,initialValues:y,options:b,render:g})=>{let A=c(),o=t({companyId:e,legalEntityId:s,countryCode:f,employmentId:P,initialValues:y,options:b});return u(n.Provider,{value:{formId:A,adminBag:o},children:g({adminBag:o,components:{SelectCountryStep:i,ContractDetailsStep:m,AdministrativeDetailsStep:a,InvitationStep:l,SubmitButton:d,BackButton:p}})})},"PayrollAdminOnboardingFlow");export{D as a};
2
+ //# sourceMappingURL=chunk-XS5NKKW4.js.map
@@ -1,2 +1,2 @@
1
- import{a as cn,b as ln,c as un}from"./chunk-R4ZUOFYN.js";import{a as At,b as Bt,c as xt,d as Nt,e as Qt,f as Jt,g as Ut,i as Kt,j as Gt,k as $t,l as Ht,m as zt,n as Wt,o as Xt,p as Yt,q as Zt,r as en,s as tn,t as nn,u as on,v as rn,w as an,x as sn}from"./chunk-BTCC6PNG.js";import{a as vt,b as St,d as Ct,e as wt,f as Pt,g as It,h as Vt}from"./chunk-LSUBNZ64.js";import{a as kt,b as Tt,f as Rt,g as qt,h as Lt,i as jt}from"./chunk-TDKKCSKV.js";import{a as N,b as pe,c as S,d as Ft,g as Dt}from"./chunk-PB6UQ4A4.js";import{a as Et,b as Mt}from"./chunk-OKBPMWVB.js";import{f as gt,i as ht,j as bt}from"./chunk-ERBEPQJP.js";import{_ as yt}from"./chunk-QQV5REGG.js";import{a as pt,b,d as mt,h as p,i as C,t as ft,u as L,v}from"./chunk-C4HFMTSB.js";import{a as Ot}from"./chunk-M3TA5X2H.js";import{e as _t}from"./chunk-H2O4CVKF.js";import{a as _}from"./chunk-P37U34EQ.js";import{useCallback as pn,useEffect as E,useMemo as a,useRef as mn,useState as w}from"react";import fn from"lodash.omit";import{useQuery as Ei}from"@tanstack/react-query";var Mi=_(()=>{let{client:$}=_t(),{data:Q}=Bt(),y=xt(Q)?Q?.company?.id??"":"";return Ei({queryKey:["legal-entities",y],queryFn:_(()=>yt({client:$,path:{company_id:y},query:{page_size:100}}),"queryFn"),select:_(J=>J.data?.data?.legal_entities,"select"),enabled:!!y})},"useLegalEntities"),dn=_(()=>{let{data:$}=Mi();return $?.find(Q=>Q.is_default)},"useDefaultLegalEntity");var Oi={select_country:null,basic_information:"employment_basic_information",contract_origin:null,invoice_schedule:null,create_invoice_schedule:null,contract_details:null,eligibility_questionnaire:null,pricing_plan:null,contract_preview:null,review:null},Fi={employment_basic_information:"basic_information"},_n={remote_contract:"provided_by_remote"},Di={provided_by_remote:"remote_contract"},ao=_(({countryCode:$,externalId:Q,employmentId:y,skipSteps:J,options:d,initialValues:c})=>{let yn=d?.excludeProducts||[],Ee=mn(d?.onContractReviewed);E(()=>{Ee.current=d?.onContractReviewed},[d?.onContractReviewed]);let[m,Me]=w($||null),[o,gn]=w(y),[P,Oe]=w(void 0),re=mn({select_country:{},basic_information:{},contract_origin:{},invoice_schedule:{},create_invoice_schedule:{},contract_details:{},contract_preview:{},pricing_plan:{},eligibility_questionnaire:{}}),[H,hn]=w(void 0),[Fe,De]=w(!1),[Ae,bn]=w(!0),[ke,vn]=w(!0),[Te,Sn]=w(!0),[j,Cn]=w(!1),[Re,qe]=w(!1),[me,Le]=w(null),{steps:wn,stepsArray:Pn}=a(()=>kt({includeSelectCountry:!J?.includes("select_country"),includeContractOrigin:Te,includeInvoiceSchedule:j,includeCreateInvoiceSchedule:Re,includeEligibilityQuestionnaire:Fe,includeContractDetails:ke,includeContractPreview:Ae}),[Te,j,Re,Fe,ke,Ae,J]),{fieldValues:l,stepState:t,setFieldValues:fe,previousStep:In,nextStep:Vn,goToStep:U,setStepValues:_e}=Ot(wn);E(()=>{me&&(U(me),Le(null))},[me,U]);let{data:u,isLoading:En,refetch:je}=Et({employmentId:o,queryParams:{exclude_files:!0}}),{data:ae,refetch:Mn}=Mt({employmentId:o,enabled:!!o}),On=dn(),{data:Be}=sn({options:{queryOptions:{enabled:t.currentStep.name==="review"}}}),{status:B}=u||{},R=B&&Rt.includes(B),Fn=B&&!qt.includes(B),Dn=a(()=>B&&["invited","initiated"].includes(B)?"invited":"not_invited",[B]),xe=ht(),Ne=bt(m,d),ye=Gt(),Qe=At(),{mutateAsync:Je}=zt(ye,Qe,l),Ue=Zt(),Ke=en(),Ge=nn(),$e=wt(),He=Pt(),ze=It(),We=Vt(),{mutateAsyncOrThrow:An}=b(Ne),Xe=Qt(),Ye=Kt(),Ze=tn(),{mutateAsyncOrThrow:kn}=b(xe),{mutateAsyncOrThrow:Tn}=b(ye),{mutateAsyncOrThrow:Rn}=b(Xe),{mutateAsyncOrThrow:et}=b(Ye),{mutateAsyncOrThrow:qn}=b(Ue),{mutateAsyncOrThrow:tt}=b(Ke),{mutateAsyncOrThrow:Ln}=b(Ze),{mutateAsyncOrThrow:jn}=b(Ge),{mutateAsyncOrThrow:Bn}=b($e),{mutateAsyncOrThrow:xn}=b(He),{mutateAsyncOrThrow:Nn}=b(ze),{mutateAsyncOrThrow:Qn}=b(We);y&&u?.country?.code&&!m&&Me(u.country.code);let{selectCountryForm:K,isLoading:Jn,countries:nt}=an({jsfModify:d?.jsfModify?.select_country}),ge=a(()=>nt?.find(e=>e.value===m),[nt,m]),Un=a(()=>ge?.label,[ge]),Kn=t.currentStep.name==="pricing_plan"||!!y&&R,{form:M,isLoading:Gn,contractorSubscriptions:se,filteredContractorSubscriptions:z,refetch:he,isEligibilityQuestionnaireBlocked:W}=Ht(o,ge,{jsonSchemaVersion:d?.jsonSchemaVersion,queryOptions:{enabled:Kn},excludeProducts:yn,jsfModify:d?.jsfModify?.pricing_plan}),x=a(()=>!!se?.find(e=>e.product.identifier===S)?.eligibility_questionnaire?.submitted_at,[se]),it=a(()=>x?!1:H===S,[x,H]),ot=u?.contractor_type!=="cor",rt=(t.currentStep.name==="contract_origin"?l.contract_origin:void 0)??t.values?.contract_origin?.contract_origin??ae?.contract_origin,$n=_n[rt]??rt,G=H===N&&$n==="provided_by_customer";E(()=>{vn(!G)},[G]),E(()=>{De(!G&&it)},[G,it]),E(()=>{bn(!G&&ot)},[G,ot]);let ce=a(()=>se?.find(e=>e.product.identifier===S)?.eligibility_questionnaire?.responses,[se]),Hn=Oi[t.currentStep.name]||"contractor_basic_information",zn=Fi[Hn],Wn=u?.[zn]||{},Xn=_(({form:e,options:n={},query:r={},jsonSchemaVersion:s})=>{let q=Object.keys(l).length>0?{...c,...t.values?.[t.currentStep.name],...l}:{...c,...Wn};return gt({countryCode:m,form:e,fieldValues:q,query:r,options:{...n,queryOptions:{enabled:n.queryOptions?.enabled??!0}},jsonSchemaVersion:s})},"useJSONSchema"),Yn=!!(m&&(t.currentStep.name==="basic_information"||y)),Zn=!!(m==="GBR"&&y&&t.currentStep.name==="basic_information"),{data:X,isLoading:ei}=Wt(y,{enabled:Zn}),{data:le,isLoading:ti}=Xt(o,{enabled:!!o});E(()=>{le&&le.length>0&&!P&&Oe(le[0].id)},[le,P]);let{data:I,isLoading:ni}=Xn({form:"contractor_basic_information",options:{jsfModify:ln(m,Un,d),queryOptions:{enabled:Yn}},jsonSchemaVersion:jt(d)}),ii=a(()=>Tt(u?.basic_information?.provisional_start_date,l?.service_duration?.provisional_start_date),[u?.basic_information?.provisional_start_date,l?.service_duration?.provisional_start_date]),h=a(()=>{let e={standard:N,plus:pe,cor:S};if(l.subscription)return l.subscription;let n=t.values?.pricing_plan?.subscription;if(n&&!W)return n;if(x&&!W)return S;if(W&&x)return N;if(z&&z.length>0)return e[u?.contractor_type]||N},[l,t.values,x,u?.contractor_type,W,z]);E(()=>{h&&h!==H&&hn(h)},[h,H]),E(()=>{Sn(!J?.includes("contract_origin")&&h===N)},[J,h]),E(()=>{Cn(d?.features?.includes("create_invoice_schedule")??!1)},[d?.features]);let oi=a(()=>({...ce,...c,...t.values?.eligibility_questionnaire,...l}),[ce,c,t.values?.eligibility_questionnaire,l]),ri=a(()=>h===S&&t.currentStep.name==="eligibility_questionnaire"||!!y&&R&&h===S,[h,t.currentStep.name,y,R]),{data:O,isLoading:ai}=Yt({options:{queryOptions:{enabled:ri},jsfModify:d?.jsfModify?.eligibility_questionnaire},fieldValues:oi}),si=!!(m&&t.currentStep.name==="contract_details"||R),{data:V,isLoading:ci}=vt({countryCode:m,fieldValues:l,employmentId:o,options:{queryOptions:{enabled:si},jsfModify:cn(d?.jsfModify?.contract_details,ii,h,l,h===S)}}),li=a(()=>t.currentStep.name==="contract_preview"||!!y&&R,[t.currentStep.name,y,R]),{data:F}=Nt({fieldValues:l,options:{queryOptions:{enabled:li},jsfModify:un(d,l)}}),{data:D}=on({fieldValues:l,options:{jsfModify:d?.jsfModify?.contract_origin}}),A=rn({enabled:j&&t.currentStep.name==="invoice_schedule",jsfModify:d?.jsfModify?.invoice_schedule}),{data:f,isLoading:ui,refetch:be}=Ct({employmentId:o,options:{queryOptions:{enabled:j&&!!o&&t.currentStep.name==="invoice_schedule"}}}),{data:k,isLoading:di}=St({enabled:j&&t.currentStep.name==="create_invoice_schedule",employmentId:o,jsfModify:d?.jsfModify?.create_invoice_schedule,fieldValues:l}),{data:ve,isLoading:pi,refetch:mi}=Jt({employmentId:o,contractDocumentId:P,options:{queryOptions:{enabled:!!P}}}),{hasCompanySignedContract:fi}=Ut({employmentId:o,contractDocumentId:P,options:{queryOptions:{enabled:!!P}}}),i=a(()=>({select_country:K?.fields||[],basic_information:I?.fields||[],contract_origin:D?.fields||[],invoice_schedule:A?.fields||[],create_invoice_schedule:k?.fields||[],pricing_plan:M?.fields||[],eligibility_questionnaire:O?.fields||[],contract_details:V?.fields||[],contract_preview:F?.fields||[],review:[]}),[K?.fields,I?.fields,D?.fields,A?.fields,k?.fields,M?.fields,V?.fields,F?.fields,O?.fields]),_i={select_country:null,basic_information:I?.meta["x-jsf-fieldsets"],contract_origin:null,invoice_schedule:null,create_invoice_schedule:null,pricing_plan:null,contract_details:V?.meta["x-jsf-fieldsets"],eligibility_questionnaire:null,contract_preview:null,review:null},yi={select_country:K?.meta?.["x-jsf-presentation"],basic_information:I?.meta?.["x-jsf-presentation"],contract_origin:D?.meta?.["x-jsf-presentation"],invoice_schedule:A?.meta?.["x-jsf-presentation"],create_invoice_schedule:k?.meta?.["x-jsf-presentation"],pricing_plan:M?.meta?.["x-jsf-presentation"],eligibility_questionnaire:O?.meta?.["x-jsf-presentation"],contract_details:V?.meta?.["x-jsf-presentation"],contract_preview:F?.meta?.["x-jsf-presentation"],review:null},{country:gi,basic_information:ue={},contract_details:at={}}=u||{},st=gi?.code,Y=a(()=>C(i.select_country,{country:m||st||""}),[i.select_country,m,st]),Se=a(()=>X?.content?mt(X.content,X.name):null,[X?.content,X?.name]),Z=a(()=>{let e={...c,...ue,ir35:u?.contract_details?.ir_35,nationality_status:u?.contract_details?.nationality,...Se&&{ir35_sds_file:[Se]}};return C(i.basic_information,e)},[c,ue,u?.contract_details?.ir_35,u?.contract_details?.nationality,Se,i.basic_information]),ct=a(()=>{let e={...c,contract_origin:_n[ae?.contract_origin]??ae?.contract_origin};return C(i.contract_origin,e)},[i.contract_origin,c,ae?.contract_origin]),lt=a(()=>{let e={...c,...f&&{invoice_schedule_preference:"schedule"}};return C(i.invoice_schedule,e)},[i.invoice_schedule,c,f]),ut=a(()=>{if(f){let n={currency:f.currency,periodicity:f.periodicity,start_date:f.start_date,number:f.number,note:f.note,nr_occurrences:f.nr_occurrences};return f.items?.forEach((r,s)=>{let g=s+1;n[`item_${g}_description`]=r.description,n[`item_${g}_amount`]=r.amount}),C(i.create_invoice_schedule,n)}let e={...c};return C(i.create_invoice_schedule,e)},[i.create_invoice_schedule,c,f]),ee=a(()=>{let n={...{service_duration:{provisional_start_date:ue.provisional_start_date}},...c,...at};return C(i.contract_details,n)},[i.contract_details,at,c,ue]),te=a(()=>{let e=ve?.contract_document?.signatories?.find(r=>r.type==="company"),n={...c,signature:e?.signature};return C(i.contract_preview,n)},[i.contract_preview,c,ve]),ne=a(()=>{let n={...{subscription:h},...c};return C(i.pricing_plan,n)},[i.pricing_plan,c,h]),ie=a(()=>{let e={...c,...ce};return C(i.eligibility_questionnaire,e)},[i.eligibility_questionnaire,c,ce]),hi=a(()=>({select_country:Y,basic_information:Z,contract_origin:ct,invoice_schedule:lt,create_invoice_schedule:ut,contract_details:ee,contract_preview:te,pricing_plan:ne,eligibility_questionnaire:ie}),[Y,Z,ct,lt,ut,ee,te,ne,ie]),Ce=!!(y&&R&&t.currentStep.name!=="review"),we=Jn||ni||En||ci||Gn||pi||ei||ti||ai||di||ui,dt=a(()=>{let n=u?.contractor_type==="cor"||i.contract_preview.length>0;return!!(Ce&&!we&&P&&i.basic_information.length>0&&i.contract_details.length>0&&n)},[Ce,we,P,i.basic_information.length,i.contract_details.length,i.contract_preview.length,u?.contractor_type]);E(()=>{dt&&(re.current={select_country:L(Y,i.select_country,{skipMoneyConversion:!0}),basic_information:L(Z,i.basic_information,{skipMoneyConversion:!0}),contract_origin:{},invoice_schedule:{},create_invoice_schedule:{},contract_details:L(ee,i.contract_details,{skipMoneyConversion:!0}),contract_preview:L(te,i.contract_preview,{skipMoneyConversion:!0}),pricing_plan:L(ne,i.pricing_plan,{skipMoneyConversion:!0}),eligibility_questionnaire:L(ie,i.eligibility_questionnaire,{skipMoneyConversion:!0})},_e({select_country:Y,basic_information:Z,contract_origin:{},invoice_schedule:{},create_invoice_schedule:{},contract_details:ee,contract_preview:te,pricing_plan:ne,eligibility_questionnaire:ie,review:{}}),U("review"))},[dt,U,Y,Z,ee,_e,i.select_country,i.basic_information,i.contract_details,i.pricing_plan,ne,i.contract_preview,te,i.eligibility_questionnaire,ie]);let bi=_(e=>{U(e)},"goTo"),Pe=_(async e=>K&&t.currentStep.name==="select_country"?e:I&&t.currentStep.name==="basic_information"?await p(e,I?.fields,{isPartialValidation:!1}):V&&t.currentStep.name==="contract_details"?await p(e,V?.fields,{isPartialValidation:!1}):F&&t.currentStep.name==="contract_preview"?await p(e,F?.fields,{isPartialValidation:!1}):M&&t.currentStep.name==="pricing_plan"?await p(e,M?.fields,{isPartialValidation:!1}):O&&t.currentStep.name==="eligibility_questionnaire"?await p(e,O?.fields,{isPartialValidation:!1}):D&&t.currentStep.name==="contract_origin"?await p(e,D?.fields,{isPartialValidation:!1}):A&&t.currentStep.name==="invoice_schedule"?await p(e,A?.fields,{isPartialValidation:!1}):k&&t.currentStep.name==="create_invoice_schedule"?await p(e,k?.fields,{isPartialValidation:!1}):{},"parseFormValues"),vi=_(e=>{if(!pt(e))return null;let n=e.normalizedErrors.services_and_deliverables,r=Array.isArray(n)?n[0]:n;return r?.source===Dt?{error:r.error,source:r.source,skippable:r.skippable}:null},"extractAiValidationError");async function Si(e){let n=t.currentStep.name,r=await Pe(e);switch(n in re.current&&(re.current[n]=L(r,i[n])),t.currentStep.name){case"select_country":return Me(r.country),Promise.resolve({data:{countryCode:r.country}});case"basic_information":{let s=!o&&m,g=o&&m&&u?.country&&u?.country.code!==m;if(s||g){let Ve={basic_information:fn(r,"nationality_status","ir35","ir35_sds_file"),type:"contractor",country_code:m,external_id:Q},de=await kn(Ve),T=de?.data?.employment?.id;if(!T)throw v("Employment ID not found");return await Je({employmentId:T}),gn(T),de}else if(o){let q=fn(r,"nationality_status","ir35","ir35_sds_file");return await Je({employmentId:o}),An({employmentId:o,basic_information:q})}return}case"contract_details":{let{services_and_deliverables_ai_warning:s,services_and_deliverables_error_skippable:g,...q}=r,Ve=l.services_and_deliverables_error_skippable===!0,de={contract_document:q,skip_ai_checks:Ve};try{let T=await Tn({employmentId:o,payload:de}),oe=T?.data?.contract_document?.id;if(!oe)throw v("Contract document ID not found");return Oe(oe),T}catch(T){let oe=vi(T);throw oe&&fe({...e,services_and_deliverables_ai_warning:Lt(h===S),services_and_deliverables_error_skippable:oe.skippable}),T}}case"contract_preview":{if(fi)return Promise.resolve({data:{contract_document:{id:P}}});let s=await Rn({employmentId:o,contractDocumentId:P,payload:{signature:r.signature}});return await mi(),s}case"pricing_plan":{if(e.subscription===Ft)return Promise.resolve({data:{subscription:e.subscription}});if(z.length===0)throw v("No available subscriptions.");if(!e.subscription&&z.length>0)throw v("Please select a subscription plan.");if(W&&[S,pe].includes(e.subscription))throw v(`This individual is not eligible for ${$t[e.subscription]}.`);if(x&&e.subscription!==S)try{await Ln({employmentId:o}),await he()}catch(g){if(g?.response?.status!==404)throw g;await he()}if(e.subscription==N)return et({employmentId:o,payload:{operation:"downgrade"}});if(e.subscription==pe)return et({employmentId:o,payload:{operation:"upgrade"}});if(e.subscription==S)return x&&u?.contractor_type!=="cor"?tt({employmentId:o}):Promise.resolve({data:{subscription:e.subscription}});throw v("invalid selection")}case"contract_origin":{let s=Di[r.contract_origin]??r.contract_origin,g=r.contract_origin==="provided_by_customer"?"contractor_agreement":"contractor_services_agreement";return await jn({employmentId:o,contractOrigin:s,templateType:g}),await Mn(),{data:{contractOrigin:e.contract_origin}}}case"invoice_schedule":{let s=e.invoice_schedule_preference==="schedule";return qe(s),{data:{invoiceSchedulePreference:e.invoice_schedule_preference}}}case"create_invoice_schedule":{if(!o)throw v("Employment ID is required");if(f?.id){let q=await xn({scheduleId:f.id,values:r});return await be(),q}let s=await Bn({employmentId:o,values:r}),g=s?.data?.failures;if(g&&g.length>0)throw v("Failed to create invoice schedule");return await be(),s}case"eligibility_questionnaire":try{if((await qn({employmentId:o,payload:r}))?.data?.is_blocking)throw De(!1),Le("pricing_plan"),v("This individual is not eligible for Contractor of Record.");return await tt({employmentId:o})}finally{await he()}default:throw v("Invalid step state")}}_(Si,"onSubmit");let Ci=_(()=>{Ee.current?.()},"markContractAsReviewed"),wi=_(async()=>{if(!f?.id)throw v("No invoice schedule to skip");await Nn({scheduleId:f.id}),await be(),qe(!1),_e({...t.values,invoice_schedule:{},create_invoice_schedule:{}}),U("invoice_schedule")},"skipInvoiceSchedule"),Pi=_(async e=>{if(!o)throw v("Employment ID is required");let n=await Pe(e),s=(await Qn({employmentId:o,values:n}))?.data?.contractor_invoice_preview;if(s)return{...s,content:ft(s.content)}},"previewContractorInvoice"),Ii=_(()=>{o&&je(),Vn()},"handleNextStep"),Ie=pn(async e=>{if(t.currentStep.name==="select_country")return K.handleValidation(e);if(I&&t.currentStep.name==="basic_information"){let n=await p(e,I?.fields,{isPartialValidation:!1});return I?.handleValidation(n)}if(V&&t.currentStep.name==="contract_details"){let n=await p(e,V?.fields,{isPartialValidation:!1});return V?.handleValidation(n)}if(F&&t.currentStep.name==="contract_preview"){let n=await p(e,F?.fields,{isPartialValidation:!0});return F?.handleValidation(n)}if(M&&t.currentStep.name==="pricing_plan"){let n=await p(e,M?.fields,{isPartialValidation:!1});return M?.handleValidation(n)}if(O&&t.currentStep.name==="eligibility_questionnaire"){let n=await p(e,O?.fields,{isPartialValidation:!1});return O?.handleValidation(n)}if(D&&t.currentStep.name==="contract_origin"){let n=await p(e,D?.fields,{isPartialValidation:!1});return D?.handleValidation(n)}if(A&&t.currentStep.name==="invoice_schedule"){let n=await p(e,A?.fields,{isPartialValidation:!1});return A?.handleValidation(n)}if(k&&t.currentStep.name==="create_invoice_schedule"){let n=await p(e,k?.fields,{isPartialValidation:!1});return k?.handleValidation(n)}return null},[t.currentStep.name,K,I,V,F,M,O,D,A,k]),Vi=pn(async e=>{fe(e),j&&["invoice_schedule","create_invoice_schedule"].includes(t.currentStep.name)&&await Ie(e)},[fe,j,t,Ie]);return{isLoading:we||Ce,fieldValues:l,stepState:t,checkFieldUpdates:Vi,markContractAsReviewed:Ci,existingInvoiceSchedule:f,skipInvoiceSchedule:wi,isSkippingInvoiceSchedule:ze.isPending,previewContractorInvoice:Pi,isPreviewingInvoiceSchedule:We.isPending,back:In,next:Ii,goTo:bi,onSubmit:Si,fields:i[t.currentStep.name],meta:{fields:re.current,fieldsets:_i[t.currentStep.name],presentation:yi[t.currentStep.name]},parseFormValues:Pe,canSkipAiValidation:l.services_and_deliverables_error_skippable===!0,handleValidation:Ie,initialValues:hi,employmentId:o,refetchEmployment:je,isSubmitting:xe.isPending||Ne.isPending||ye.isPending||Xe.isPending||Ye.isPending||Qe.isPending||Ue.isPending||Ke.isPending||Ze.isPending||Ge.isPending||$e.isPending||He.isPending,documentPreviewPdf:ve,canInvite:Fn,isEmploymentReadOnly:R,invitedStatus:Dn,employment:u,defaultLegalEntity:On,needsCompanyVerification:Be?.some(e=>e.type==="verify_company")??!1,needsRemotePaymentsSetup:Be?.some(e=>e.type==="setup_remote_payments")??!1,steps:Pn}},"useContractorOnboarding");export{ao as a};
2
- //# sourceMappingURL=chunk-25MUO3XP.js.map
1
+ import{a as cn,b as ln,c as un}from"./chunk-FF5OB2GF.js";import{a as At,b as Bt,c as xt,d as Nt,e as Qt,f as Jt,g as Ut,i as Kt,j as Gt,k as $t,l as Ht,m as zt,n as Wt,o as Xt,p as Yt,q as Zt,r as en,s as tn,t as nn,u as on,v as rn,w as an,x as sn}from"./chunk-GGVW6SG6.js";import{a as vt,b as St,d as Ct,e as wt,f as Pt,g as It,h as Vt}from"./chunk-FYCOEJEZ.js";import{a as kt,b as Tt,f as Rt,g as qt,h as Lt,i as jt}from"./chunk-TDKKCSKV.js";import{a as N,b as pe,c as S,d as Ft,g as Dt}from"./chunk-PB6UQ4A4.js";import{a as Et,b as Mt}from"./chunk-R23HFBV4.js";import{f as gt,i as ht,j as bt}from"./chunk-ZHFGV2GB.js";import{Z as yt}from"./chunk-DAUDKN32.js";import{a as pt,b,d as mt,h as p,i as C,t as ft,u as L,v}from"./chunk-C4HFMTSB.js";import{a as Ot}from"./chunk-M3TA5X2H.js";import{e as _t}from"./chunk-H2O4CVKF.js";import{a as _}from"./chunk-P37U34EQ.js";import{useCallback as pn,useEffect as E,useMemo as a,useRef as mn,useState as w}from"react";import fn from"lodash.omit";import{useQuery as Ei}from"@tanstack/react-query";var Mi=_(()=>{let{client:$}=_t(),{data:Q}=Bt(),y=xt(Q)?Q?.company?.id??"":"";return Ei({queryKey:["legal-entities",y],queryFn:_(()=>yt({client:$,path:{company_id:y},query:{page_size:100}}),"queryFn"),select:_(J=>J.data?.data?.legal_entities,"select"),enabled:!!y})},"useLegalEntities"),dn=_(()=>{let{data:$}=Mi();return $?.find(Q=>Q.is_default)},"useDefaultLegalEntity");var Oi={select_country:null,basic_information:"employment_basic_information",contract_origin:null,invoice_schedule:null,create_invoice_schedule:null,contract_details:null,eligibility_questionnaire:null,pricing_plan:null,contract_preview:null,review:null},Fi={employment_basic_information:"basic_information"},_n={remote_contract:"provided_by_remote"},Di={provided_by_remote:"remote_contract"},ao=_(({countryCode:$,externalId:Q,employmentId:y,skipSteps:J,options:d,initialValues:c})=>{let yn=d?.excludeProducts||[],Ee=mn(d?.onContractReviewed);E(()=>{Ee.current=d?.onContractReviewed},[d?.onContractReviewed]);let[m,Me]=w($||null),[o,gn]=w(y),[P,Oe]=w(void 0),re=mn({select_country:{},basic_information:{},contract_origin:{},invoice_schedule:{},create_invoice_schedule:{},contract_details:{},contract_preview:{},pricing_plan:{},eligibility_questionnaire:{}}),[H,hn]=w(void 0),[Fe,De]=w(!1),[Ae,bn]=w(!0),[ke,vn]=w(!0),[Te,Sn]=w(!0),[j,Cn]=w(!1),[Re,qe]=w(!1),[me,Le]=w(null),{steps:wn,stepsArray:Pn}=a(()=>kt({includeSelectCountry:!J?.includes("select_country"),includeContractOrigin:Te,includeInvoiceSchedule:j,includeCreateInvoiceSchedule:Re,includeEligibilityQuestionnaire:Fe,includeContractDetails:ke,includeContractPreview:Ae}),[Te,j,Re,Fe,ke,Ae,J]),{fieldValues:l,stepState:t,setFieldValues:fe,previousStep:In,nextStep:Vn,goToStep:U,setStepValues:_e}=Ot(wn);E(()=>{me&&(U(me),Le(null))},[me,U]);let{data:u,isLoading:En,refetch:je}=Et({employmentId:o,queryParams:{exclude_files:!0}}),{data:ae,refetch:Mn}=Mt({employmentId:o,enabled:!!o}),On=dn(),{data:Be}=sn({options:{queryOptions:{enabled:t.currentStep.name==="review"}}}),{status:B}=u||{},R=B&&Rt.includes(B),Fn=B&&!qt.includes(B),Dn=a(()=>B&&["invited","initiated"].includes(B)?"invited":"not_invited",[B]),xe=ht(),Ne=bt(m,d),ye=Gt(),Qe=At(),{mutateAsync:Je}=zt(ye,Qe,l),Ue=Zt(),Ke=en(),Ge=nn(),$e=wt(),He=Pt(),ze=It(),We=Vt(),{mutateAsyncOrThrow:An}=b(Ne),Xe=Qt(),Ye=Kt(),Ze=tn(),{mutateAsyncOrThrow:kn}=b(xe),{mutateAsyncOrThrow:Tn}=b(ye),{mutateAsyncOrThrow:Rn}=b(Xe),{mutateAsyncOrThrow:et}=b(Ye),{mutateAsyncOrThrow:qn}=b(Ue),{mutateAsyncOrThrow:tt}=b(Ke),{mutateAsyncOrThrow:Ln}=b(Ze),{mutateAsyncOrThrow:jn}=b(Ge),{mutateAsyncOrThrow:Bn}=b($e),{mutateAsyncOrThrow:xn}=b(He),{mutateAsyncOrThrow:Nn}=b(ze),{mutateAsyncOrThrow:Qn}=b(We);y&&u?.country?.code&&!m&&Me(u.country.code);let{selectCountryForm:K,isLoading:Jn,countries:nt}=an({jsfModify:d?.jsfModify?.select_country}),ge=a(()=>nt?.find(e=>e.value===m),[nt,m]),Un=a(()=>ge?.label,[ge]),Kn=t.currentStep.name==="pricing_plan"||!!y&&R,{form:M,isLoading:Gn,contractorSubscriptions:se,filteredContractorSubscriptions:z,refetch:he,isEligibilityQuestionnaireBlocked:W}=Ht(o,ge,{jsonSchemaVersion:d?.jsonSchemaVersion,queryOptions:{enabled:Kn},excludeProducts:yn,jsfModify:d?.jsfModify?.pricing_plan}),x=a(()=>!!se?.find(e=>e.product.identifier===S)?.eligibility_questionnaire?.submitted_at,[se]),it=a(()=>x?!1:H===S,[x,H]),ot=u?.contractor_type!=="cor",rt=(t.currentStep.name==="contract_origin"?l.contract_origin:void 0)??t.values?.contract_origin?.contract_origin??ae?.contract_origin,$n=_n[rt]??rt,G=H===N&&$n==="provided_by_customer";E(()=>{vn(!G)},[G]),E(()=>{De(!G&&it)},[G,it]),E(()=>{bn(!G&&ot)},[G,ot]);let ce=a(()=>se?.find(e=>e.product.identifier===S)?.eligibility_questionnaire?.responses,[se]),Hn=Oi[t.currentStep.name]||"contractor_basic_information",zn=Fi[Hn],Wn=u?.[zn]||{},Xn=_(({form:e,options:n={},query:r={},jsonSchemaVersion:s})=>{let q=Object.keys(l).length>0?{...c,...t.values?.[t.currentStep.name],...l}:{...c,...Wn};return gt({countryCode:m,form:e,fieldValues:q,query:r,options:{...n,queryOptions:{enabled:n.queryOptions?.enabled??!0}},jsonSchemaVersion:s})},"useJSONSchema"),Yn=!!(m&&(t.currentStep.name==="basic_information"||y)),Zn=!!(m==="GBR"&&y&&t.currentStep.name==="basic_information"),{data:X,isLoading:ei}=Wt(y,{enabled:Zn}),{data:le,isLoading:ti}=Xt(o,{enabled:!!o});E(()=>{le&&le.length>0&&!P&&Oe(le[0].id)},[le,P]);let{data:I,isLoading:ni}=Xn({form:"contractor_basic_information",options:{jsfModify:ln(m,Un,d),queryOptions:{enabled:Yn}},jsonSchemaVersion:jt(d)}),ii=a(()=>Tt(u?.basic_information?.provisional_start_date,l?.service_duration?.provisional_start_date),[u?.basic_information?.provisional_start_date,l?.service_duration?.provisional_start_date]),h=a(()=>{let e={standard:N,plus:pe,cor:S};if(l.subscription)return l.subscription;let n=t.values?.pricing_plan?.subscription;if(n&&!W)return n;if(x&&!W)return S;if(W&&x)return N;if(z&&z.length>0)return e[u?.contractor_type]||N},[l,t.values,x,u?.contractor_type,W,z]);E(()=>{h&&h!==H&&hn(h)},[h,H]),E(()=>{Sn(!J?.includes("contract_origin")&&h===N)},[J,h]),E(()=>{Cn(d?.features?.includes("create_invoice_schedule")??!1)},[d?.features]);let oi=a(()=>({...ce,...c,...t.values?.eligibility_questionnaire,...l}),[ce,c,t.values?.eligibility_questionnaire,l]),ri=a(()=>h===S&&t.currentStep.name==="eligibility_questionnaire"||!!y&&R&&h===S,[h,t.currentStep.name,y,R]),{data:O,isLoading:ai}=Yt({options:{queryOptions:{enabled:ri},jsfModify:d?.jsfModify?.eligibility_questionnaire},fieldValues:oi}),si=!!(m&&t.currentStep.name==="contract_details"||R),{data:V,isLoading:ci}=vt({countryCode:m,fieldValues:l,employmentId:o,options:{queryOptions:{enabled:si},jsfModify:cn(d?.jsfModify?.contract_details,ii,h,l,h===S)}}),li=a(()=>t.currentStep.name==="contract_preview"||!!y&&R,[t.currentStep.name,y,R]),{data:F}=Nt({fieldValues:l,options:{queryOptions:{enabled:li},jsfModify:un(d,l)}}),{data:D}=on({fieldValues:l,options:{jsfModify:d?.jsfModify?.contract_origin}}),A=rn({enabled:j&&t.currentStep.name==="invoice_schedule",jsfModify:d?.jsfModify?.invoice_schedule}),{data:f,isLoading:ui,refetch:be}=Ct({employmentId:o,options:{queryOptions:{enabled:j&&!!o&&t.currentStep.name==="invoice_schedule"}}}),{data:k,isLoading:di}=St({enabled:j&&t.currentStep.name==="create_invoice_schedule",employmentId:o,jsfModify:d?.jsfModify?.create_invoice_schedule,fieldValues:l}),{data:ve,isLoading:pi,refetch:mi}=Jt({employmentId:o,contractDocumentId:P,options:{queryOptions:{enabled:!!P}}}),{hasCompanySignedContract:fi}=Ut({employmentId:o,contractDocumentId:P,options:{queryOptions:{enabled:!!P}}}),i=a(()=>({select_country:K?.fields||[],basic_information:I?.fields||[],contract_origin:D?.fields||[],invoice_schedule:A?.fields||[],create_invoice_schedule:k?.fields||[],pricing_plan:M?.fields||[],eligibility_questionnaire:O?.fields||[],contract_details:V?.fields||[],contract_preview:F?.fields||[],review:[]}),[K?.fields,I?.fields,D?.fields,A?.fields,k?.fields,M?.fields,V?.fields,F?.fields,O?.fields]),_i={select_country:null,basic_information:I?.meta["x-jsf-fieldsets"],contract_origin:null,invoice_schedule:null,create_invoice_schedule:null,pricing_plan:null,contract_details:V?.meta["x-jsf-fieldsets"],eligibility_questionnaire:null,contract_preview:null,review:null},yi={select_country:K?.meta?.["x-jsf-presentation"],basic_information:I?.meta?.["x-jsf-presentation"],contract_origin:D?.meta?.["x-jsf-presentation"],invoice_schedule:A?.meta?.["x-jsf-presentation"],create_invoice_schedule:k?.meta?.["x-jsf-presentation"],pricing_plan:M?.meta?.["x-jsf-presentation"],eligibility_questionnaire:O?.meta?.["x-jsf-presentation"],contract_details:V?.meta?.["x-jsf-presentation"],contract_preview:F?.meta?.["x-jsf-presentation"],review:null},{country:gi,basic_information:ue={},contract_details:at={}}=u||{},st=gi?.code,Y=a(()=>C(i.select_country,{country:m||st||""}),[i.select_country,m,st]),Se=a(()=>X?.content?mt(X.content,X.name):null,[X?.content,X?.name]),Z=a(()=>{let e={...c,...ue,ir35:u?.contract_details?.ir_35,nationality_status:u?.contract_details?.nationality,...Se&&{ir35_sds_file:[Se]}};return C(i.basic_information,e)},[c,ue,u?.contract_details?.ir_35,u?.contract_details?.nationality,Se,i.basic_information]),ct=a(()=>{let e={...c,contract_origin:_n[ae?.contract_origin]??ae?.contract_origin};return C(i.contract_origin,e)},[i.contract_origin,c,ae?.contract_origin]),lt=a(()=>{let e={...c,...f&&{invoice_schedule_preference:"schedule"}};return C(i.invoice_schedule,e)},[i.invoice_schedule,c,f]),ut=a(()=>{if(f){let n={currency:f.currency,periodicity:f.periodicity,start_date:f.start_date,number:f.number,note:f.note,nr_occurrences:f.nr_occurrences};return f.items?.forEach((r,s)=>{let g=s+1;n[`item_${g}_description`]=r.description,n[`item_${g}_amount`]=r.amount}),C(i.create_invoice_schedule,n)}let e={...c};return C(i.create_invoice_schedule,e)},[i.create_invoice_schedule,c,f]),ee=a(()=>{let n={...{service_duration:{provisional_start_date:ue.provisional_start_date}},...c,...at};return C(i.contract_details,n)},[i.contract_details,at,c,ue]),te=a(()=>{let e=ve?.contract_document?.signatories?.find(r=>r.type==="company"),n={...c,signature:e?.signature};return C(i.contract_preview,n)},[i.contract_preview,c,ve]),ne=a(()=>{let n={...{subscription:h},...c};return C(i.pricing_plan,n)},[i.pricing_plan,c,h]),ie=a(()=>{let e={...c,...ce};return C(i.eligibility_questionnaire,e)},[i.eligibility_questionnaire,c,ce]),hi=a(()=>({select_country:Y,basic_information:Z,contract_origin:ct,invoice_schedule:lt,create_invoice_schedule:ut,contract_details:ee,contract_preview:te,pricing_plan:ne,eligibility_questionnaire:ie}),[Y,Z,ct,lt,ut,ee,te,ne,ie]),Ce=!!(y&&R&&t.currentStep.name!=="review"),we=Jn||ni||En||ci||Gn||pi||ei||ti||ai||di||ui,dt=a(()=>{let n=u?.contractor_type==="cor"||i.contract_preview.length>0;return!!(Ce&&!we&&P&&i.basic_information.length>0&&i.contract_details.length>0&&n)},[Ce,we,P,i.basic_information.length,i.contract_details.length,i.contract_preview.length,u?.contractor_type]);E(()=>{dt&&(re.current={select_country:L(Y,i.select_country,{skipMoneyConversion:!0}),basic_information:L(Z,i.basic_information,{skipMoneyConversion:!0}),contract_origin:{},invoice_schedule:{},create_invoice_schedule:{},contract_details:L(ee,i.contract_details,{skipMoneyConversion:!0}),contract_preview:L(te,i.contract_preview,{skipMoneyConversion:!0}),pricing_plan:L(ne,i.pricing_plan,{skipMoneyConversion:!0}),eligibility_questionnaire:L(ie,i.eligibility_questionnaire,{skipMoneyConversion:!0})},_e({select_country:Y,basic_information:Z,contract_origin:{},invoice_schedule:{},create_invoice_schedule:{},contract_details:ee,contract_preview:te,pricing_plan:ne,eligibility_questionnaire:ie,review:{}}),U("review"))},[dt,U,Y,Z,ee,_e,i.select_country,i.basic_information,i.contract_details,i.pricing_plan,ne,i.contract_preview,te,i.eligibility_questionnaire,ie]);let bi=_(e=>{U(e)},"goTo"),Pe=_(async e=>K&&t.currentStep.name==="select_country"?e:I&&t.currentStep.name==="basic_information"?await p(e,I?.fields,{isPartialValidation:!1}):V&&t.currentStep.name==="contract_details"?await p(e,V?.fields,{isPartialValidation:!1}):F&&t.currentStep.name==="contract_preview"?await p(e,F?.fields,{isPartialValidation:!1}):M&&t.currentStep.name==="pricing_plan"?await p(e,M?.fields,{isPartialValidation:!1}):O&&t.currentStep.name==="eligibility_questionnaire"?await p(e,O?.fields,{isPartialValidation:!1}):D&&t.currentStep.name==="contract_origin"?await p(e,D?.fields,{isPartialValidation:!1}):A&&t.currentStep.name==="invoice_schedule"?await p(e,A?.fields,{isPartialValidation:!1}):k&&t.currentStep.name==="create_invoice_schedule"?await p(e,k?.fields,{isPartialValidation:!1}):{},"parseFormValues"),vi=_(e=>{if(!pt(e))return null;let n=e.normalizedErrors.services_and_deliverables,r=Array.isArray(n)?n[0]:n;return r?.source===Dt?{error:r.error,source:r.source,skippable:r.skippable}:null},"extractAiValidationError");async function Si(e){let n=t.currentStep.name,r=await Pe(e);switch(n in re.current&&(re.current[n]=L(r,i[n])),t.currentStep.name){case"select_country":return Me(r.country),Promise.resolve({data:{countryCode:r.country}});case"basic_information":{let s=!o&&m,g=o&&m&&u?.country&&u?.country.code!==m;if(s||g){let Ve={basic_information:fn(r,"nationality_status","ir35","ir35_sds_file"),type:"contractor",country_code:m,external_id:Q},de=await kn(Ve),T=de?.data?.employment?.id;if(!T)throw v("Employment ID not found");return await Je({employmentId:T}),gn(T),de}else if(o){let q=fn(r,"nationality_status","ir35","ir35_sds_file");return await Je({employmentId:o}),An({employmentId:o,basic_information:q})}return}case"contract_details":{let{services_and_deliverables_ai_warning:s,services_and_deliverables_error_skippable:g,...q}=r,Ve=l.services_and_deliverables_error_skippable===!0,de={contract_document:q,skip_ai_checks:Ve};try{let T=await Tn({employmentId:o,payload:de}),oe=T?.data?.contract_document?.id;if(!oe)throw v("Contract document ID not found");return Oe(oe),T}catch(T){let oe=vi(T);throw oe&&fe({...e,services_and_deliverables_ai_warning:Lt(h===S),services_and_deliverables_error_skippable:oe.skippable}),T}}case"contract_preview":{if(fi)return Promise.resolve({data:{contract_document:{id:P}}});let s=await Rn({employmentId:o,contractDocumentId:P,payload:{signature:r.signature}});return await mi(),s}case"pricing_plan":{if(e.subscription===Ft)return Promise.resolve({data:{subscription:e.subscription}});if(z.length===0)throw v("No available subscriptions.");if(!e.subscription&&z.length>0)throw v("Please select a subscription plan.");if(W&&[S,pe].includes(e.subscription))throw v(`This individual is not eligible for ${$t[e.subscription]}.`);if(x&&e.subscription!==S)try{await Ln({employmentId:o}),await he()}catch(g){if(g?.response?.status!==404)throw g;await he()}if(e.subscription==N)return et({employmentId:o,payload:{operation:"downgrade"}});if(e.subscription==pe)return et({employmentId:o,payload:{operation:"upgrade"}});if(e.subscription==S)return x&&u?.contractor_type!=="cor"?tt({employmentId:o}):Promise.resolve({data:{subscription:e.subscription}});throw v("invalid selection")}case"contract_origin":{let s=Di[r.contract_origin]??r.contract_origin,g=r.contract_origin==="provided_by_customer"?"contractor_agreement":"contractor_services_agreement";return await jn({employmentId:o,contractOrigin:s,templateType:g}),await Mn(),{data:{contractOrigin:e.contract_origin}}}case"invoice_schedule":{let s=e.invoice_schedule_preference==="schedule";return qe(s),{data:{invoiceSchedulePreference:e.invoice_schedule_preference}}}case"create_invoice_schedule":{if(!o)throw v("Employment ID is required");if(f?.id){let q=await xn({scheduleId:f.id,values:r});return await be(),q}let s=await Bn({employmentId:o,values:r}),g=s?.data?.failures;if(g&&g.length>0)throw v("Failed to create invoice schedule");return await be(),s}case"eligibility_questionnaire":try{if((await qn({employmentId:o,payload:r}))?.data?.is_blocking)throw De(!1),Le("pricing_plan"),v("This individual is not eligible for Contractor of Record.");return await tt({employmentId:o})}finally{await he()}default:throw v("Invalid step state")}}_(Si,"onSubmit");let Ci=_(()=>{Ee.current?.()},"markContractAsReviewed"),wi=_(async()=>{if(!f?.id)throw v("No invoice schedule to skip");await Nn({scheduleId:f.id}),await be(),qe(!1),_e({...t.values,invoice_schedule:{},create_invoice_schedule:{}}),U("invoice_schedule")},"skipInvoiceSchedule"),Pi=_(async e=>{if(!o)throw v("Employment ID is required");let n=await Pe(e),s=(await Qn({employmentId:o,values:n}))?.data?.contractor_invoice_preview;if(s)return{...s,content:ft(s.content)}},"previewContractorInvoice"),Ii=_(()=>{o&&je(),Vn()},"handleNextStep"),Ie=pn(async e=>{if(t.currentStep.name==="select_country")return K.handleValidation(e);if(I&&t.currentStep.name==="basic_information"){let n=await p(e,I?.fields,{isPartialValidation:!1});return I?.handleValidation(n)}if(V&&t.currentStep.name==="contract_details"){let n=await p(e,V?.fields,{isPartialValidation:!1});return V?.handleValidation(n)}if(F&&t.currentStep.name==="contract_preview"){let n=await p(e,F?.fields,{isPartialValidation:!0});return F?.handleValidation(n)}if(M&&t.currentStep.name==="pricing_plan"){let n=await p(e,M?.fields,{isPartialValidation:!1});return M?.handleValidation(n)}if(O&&t.currentStep.name==="eligibility_questionnaire"){let n=await p(e,O?.fields,{isPartialValidation:!1});return O?.handleValidation(n)}if(D&&t.currentStep.name==="contract_origin"){let n=await p(e,D?.fields,{isPartialValidation:!1});return D?.handleValidation(n)}if(A&&t.currentStep.name==="invoice_schedule"){let n=await p(e,A?.fields,{isPartialValidation:!1});return A?.handleValidation(n)}if(k&&t.currentStep.name==="create_invoice_schedule"){let n=await p(e,k?.fields,{isPartialValidation:!1});return k?.handleValidation(n)}return null},[t.currentStep.name,K,I,V,F,M,O,D,A,k]),Vi=pn(async e=>{fe(e),j&&["invoice_schedule","create_invoice_schedule"].includes(t.currentStep.name)&&await Ie(e)},[fe,j,t,Ie]);return{isLoading:we||Ce,fieldValues:l,stepState:t,checkFieldUpdates:Vi,markContractAsReviewed:Ci,existingInvoiceSchedule:f,skipInvoiceSchedule:wi,isSkippingInvoiceSchedule:ze.isPending,previewContractorInvoice:Pi,isPreviewingInvoiceSchedule:We.isPending,back:In,next:Ii,goTo:bi,onSubmit:Si,fields:i[t.currentStep.name],meta:{fields:re.current,fieldsets:_i[t.currentStep.name],presentation:yi[t.currentStep.name]},parseFormValues:Pe,canSkipAiValidation:l.services_and_deliverables_error_skippable===!0,handleValidation:Ie,initialValues:hi,employmentId:o,refetchEmployment:je,isSubmitting:xe.isPending||Ne.isPending||ye.isPending||Xe.isPending||Ye.isPending||Qe.isPending||Ue.isPending||Ke.isPending||Ze.isPending||Ge.isPending||$e.isPending||He.isPending,documentPreviewPdf:ve,canInvite:Fn,isEmploymentReadOnly:R,invitedStatus:Dn,employment:u,defaultLegalEntity:On,needsCompanyVerification:Be?.some(e=>e.type==="verify_company")??!1,needsRemotePaymentsSetup:Be?.some(e=>e.type==="setup_remote_payments")??!1,steps:Pn}},"useContractorOnboarding");export{ao as a};
2
+ //# sourceMappingURL=chunk-XTZJKL3C.js.map
@@ -0,0 +1,2 @@
1
+ import{a as y}from"./chunk-VKORYYED.js";import{a as m}from"./chunk-3OHORFIX.js";import{a as l}from"./chunk-GPWQPJQ7.js";import{e as c}from"./chunk-SRLBVFNQ.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as p}from"react";import{Fragment as N,jsx as v,jsxs as C}from"react/jsx-runtime";var R=t(({currencies:{from:d,to:F},shouldSwapOrder:s,salary_conversion_properties:a,conversionType:_="no_spread",defaultValue:r,splitDescription:f,...e})=>{let{setValue:n,getValues:i}=c(),g={label:a?.label||"Salary conversion",description:a?.description||C(N,{children:["The conversion is based on the Remote FX rate."," ",v(m,{className:"text-sm",zendeskId:l.remoteFxRate,children:"Learn more \u2197"})]})},u=s?"salary_conversion":e.name,b=s?e.name:"salary_conversion";return p(()=>{if(s){let o=i(e.name);o?(n("salary_conversion",o),n("salary_converted","salary_conversion")):r&&(n("salary_conversion",r),n("salary_converted","salary_conversion"))}else{let o=i("salary_conversion");o?(n(e.name,o),n("salary_converted",e.name)):r&&(n(e.name,r),n("salary_converted",e.name))}},[s,r,n,i,e.name]),v(y,{...e,sourceCurrency:d,targetCurrency:F,mainFieldName:u,conversionFieldName:b,conversionProperties:g,classNamePrefix:"RemoteFlows-Salary",conversionType:_,splitDescription:f})},"SalaryField");export{R as a};
2
+ //# sourceMappingURL=chunk-XWCE5BU6.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/flows/CostCalculator/components/SalaryField.tsx"],"sourcesContent":["import { CurrencyConversionField } from '@/src/components/form/fields/CurrencyConversionField';\nimport { ZendeskTriggerButton } from '@/src/components/shared/zendesk-drawer/ZendeskTriggerButton';\nimport { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\nimport { JSFField } from '@/src/types/remoteFlows';\nimport { useEffect } from 'react';\nimport { useFormContext } from 'react-hook-form';\n\ntype SalaryFieldProps = JSFField & {\n currencies: {\n from: string;\n to: string;\n };\n salary_conversion_properties?: {\n label?: string;\n description?: string;\n };\n conversionType?: 'spread' | 'no_spread';\n shouldSwapOrder: boolean;\n defaultValue?: string;\n splitDescription?: boolean;\n};\n\nexport const SalaryField = ({\n currencies: { from, to },\n shouldSwapOrder,\n salary_conversion_properties,\n conversionType = 'no_spread',\n defaultValue,\n splitDescription,\n ...props\n}: SalaryFieldProps) => {\n const { setValue, getValues } = useFormContext();\n\n const conversionProperties = {\n label: salary_conversion_properties?.label || 'Salary conversion',\n description: salary_conversion_properties?.description || (\n <>\n The conversion is based on the Remote FX rate.{' '}\n <ZendeskTriggerButton\n className='text-sm'\n zendeskId={zendeskArticles.remoteFxRate}\n >\n Learn more ↗\n </ZendeskTriggerButton>\n </>\n ),\n };\n\n const mainFieldName = shouldSwapOrder ? 'salary_conversion' : props.name;\n const conversionFieldName = shouldSwapOrder\n ? props.name\n : 'salary_conversion';\n\n useEffect(() => {\n if (shouldSwapOrder) {\n const currentValue = getValues(props.name);\n\n if (currentValue) {\n setValue('salary_conversion', currentValue);\n setValue('salary_converted', 'salary_conversion');\n } else if (defaultValue) {\n // Fallback to defaultValue if no current value\n setValue('salary_conversion', defaultValue);\n setValue('salary_converted', 'salary_conversion');\n }\n } else {\n const conversionValue = getValues('salary_conversion');\n\n if (conversionValue) {\n setValue(props.name, conversionValue);\n setValue('salary_converted', props.name);\n } else if (defaultValue) {\n // Fallback to defaultValue if no conversion value\n setValue(props.name, defaultValue);\n setValue('salary_converted', props.name);\n }\n }\n }, [shouldSwapOrder, defaultValue, setValue, getValues, props.name]);\n return (\n <CurrencyConversionField\n {...props}\n sourceCurrency={from}\n targetCurrency={to}\n mainFieldName={mainFieldName}\n conversionFieldName={conversionFieldName}\n conversionProperties={conversionProperties}\n classNamePrefix='RemoteFlows-Salary'\n conversionType={conversionType}\n splitDescription={splitDescription}\n />\n );\n};\n"],"mappings":"mMAIA,OAAS,aAAAA,MAAiB,QAgCpB,mBAAAC,EAEE,OAAAC,EAFF,QAAAC,MAAA,oBAdC,IAAMC,EAAcC,EAAA,CAAC,CAC1B,WAAY,CAAE,KAAAC,EAAM,GAAAC,CAAG,EACvB,gBAAAC,EACA,6BAAAC,EACA,eAAAC,EAAiB,YACjB,aAAAC,EACA,iBAAAC,EACA,GAAGC,CACL,IAAwB,CACtB,GAAM,CAAE,SAAAC,EAAU,UAAAC,CAAU,EAAIC,EAAe,EAEzCC,EAAuB,CAC3B,MAAOR,GAA8B,OAAS,oBAC9C,YAAaA,GAA8B,aACzCN,EAAAF,EAAA,CAAE,2DAC+C,IAC/CC,EAACgB,EAAA,CACC,UAAU,UACV,UAAWC,EAAgB,aAC5B,6BAED,GACF,CAEJ,EAEMC,EAAgBZ,EAAkB,oBAAsBK,EAAM,KAC9DQ,EAAsBb,EACxBK,EAAM,KACN,oBAEJ,OAAAS,EAAU,IAAM,CACd,GAAId,EAAiB,CACnB,IAAMe,EAAeR,EAAUF,EAAM,IAAI,EAErCU,GACFT,EAAS,oBAAqBS,CAAY,EAC1CT,EAAS,mBAAoB,mBAAmB,GACvCH,IAETG,EAAS,oBAAqBH,CAAY,EAC1CG,EAAS,mBAAoB,mBAAmB,EAEpD,KAAO,CACL,IAAMU,EAAkBT,EAAU,mBAAmB,EAEjDS,GACFV,EAASD,EAAM,KAAMW,CAAe,EACpCV,EAAS,mBAAoBD,EAAM,IAAI,GAC9BF,IAETG,EAASD,EAAM,KAAMF,CAAY,EACjCG,EAAS,mBAAoBD,EAAM,IAAI,EAE3C,CACF,EAAG,CAACL,EAAiBG,EAAcG,EAAUC,EAAWF,EAAM,IAAI,CAAC,EAEjEX,EAACuB,EAAA,CACE,GAAGZ,EACJ,eAAgBP,EAChB,eAAgBC,EAChB,cAAea,EACf,oBAAqBC,EACrB,qBAAsBJ,EACtB,gBAAgB,qBAChB,eAAgBP,EAChB,iBAAkBE,EACpB,CAEJ,EArE2B","names":["useEffect","Fragment","jsx","jsxs","SalaryField","__name","from","to","shouldSwapOrder","salary_conversion_properties","conversionType","defaultValue","splitDescription","props","setValue","getValues","useFormContext","conversionProperties","ZendeskTriggerButton","zendeskArticles","mainFieldName","conversionFieldName","useEffect","currentValue","conversionValue","CurrencyConversionField"]}
1
+ {"version":3,"sources":["../src/flows/CostCalculator/components/SalaryField.tsx"],"sourcesContent":["import { CurrencyConversionField } from '@/src/components/form/fields/CurrencyConversionField';\nimport { ZendeskTriggerButton } from '@/src/components/shared/zendesk-drawer/ZendeskTriggerButton';\nimport { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\nimport { JSFField } from '@/src/types/remoteFlows';\nimport { useEffect } from 'react';\nimport { useFormContext } from 'react-hook-form';\n\ntype SalaryFieldProps = JSFField & {\n currencies: {\n from: string;\n to: string;\n };\n salary_conversion_properties?: {\n label?: string;\n description?: string;\n };\n conversionType?: 'spread' | 'no_spread';\n shouldSwapOrder: boolean;\n defaultValue?: string;\n splitDescription?: boolean;\n};\n\nexport const SalaryField = ({\n currencies: { from, to },\n shouldSwapOrder,\n salary_conversion_properties,\n conversionType = 'no_spread',\n defaultValue,\n splitDescription,\n ...props\n}: SalaryFieldProps) => {\n const { setValue, getValues } = useFormContext();\n\n const conversionProperties = {\n label: salary_conversion_properties?.label || 'Salary conversion',\n description: salary_conversion_properties?.description || (\n <>\n The conversion is based on the Remote FX rate.{' '}\n <ZendeskTriggerButton\n className='text-sm'\n zendeskId={zendeskArticles.remoteFxRate}\n >\n Learn more ↗\n </ZendeskTriggerButton>\n </>\n ),\n };\n\n const mainFieldName = shouldSwapOrder ? 'salary_conversion' : props.name;\n const conversionFieldName = shouldSwapOrder\n ? props.name\n : 'salary_conversion';\n\n useEffect(() => {\n if (shouldSwapOrder) {\n const currentValue = getValues(props.name);\n\n if (currentValue) {\n setValue('salary_conversion', currentValue);\n setValue('salary_converted', 'salary_conversion');\n } else if (defaultValue) {\n // Fallback to defaultValue if no current value\n setValue('salary_conversion', defaultValue);\n setValue('salary_converted', 'salary_conversion');\n }\n } else {\n const conversionValue = getValues('salary_conversion');\n\n if (conversionValue) {\n setValue(props.name, conversionValue);\n setValue('salary_converted', props.name);\n } else if (defaultValue) {\n // Fallback to defaultValue if no conversion value\n setValue(props.name, defaultValue);\n setValue('salary_converted', props.name);\n }\n }\n }, [shouldSwapOrder, defaultValue, setValue, getValues, props.name]);\n return (\n <CurrencyConversionField\n {...props}\n sourceCurrency={from}\n targetCurrency={to}\n mainFieldName={mainFieldName}\n conversionFieldName={conversionFieldName}\n conversionProperties={conversionProperties}\n classNamePrefix='RemoteFlows-Salary'\n conversionType={conversionType}\n splitDescription={splitDescription}\n />\n );\n};\n"],"mappings":"wMAIA,OAAS,aAAAA,MAAiB,QAgCpB,mBAAAC,EAEE,OAAAC,EAFF,QAAAC,MAAA,oBAdC,IAAMC,EAAcC,EAAA,CAAC,CAC1B,WAAY,CAAE,KAAAC,EAAM,GAAAC,CAAG,EACvB,gBAAAC,EACA,6BAAAC,EACA,eAAAC,EAAiB,YACjB,aAAAC,EACA,iBAAAC,EACA,GAAGC,CACL,IAAwB,CACtB,GAAM,CAAE,SAAAC,EAAU,UAAAC,CAAU,EAAIC,EAAe,EAEzCC,EAAuB,CAC3B,MAAOR,GAA8B,OAAS,oBAC9C,YAAaA,GAA8B,aACzCN,EAAAF,EAAA,CAAE,2DAC+C,IAC/CC,EAACgB,EAAA,CACC,UAAU,UACV,UAAWC,EAAgB,aAC5B,6BAED,GACF,CAEJ,EAEMC,EAAgBZ,EAAkB,oBAAsBK,EAAM,KAC9DQ,EAAsBb,EACxBK,EAAM,KACN,oBAEJ,OAAAS,EAAU,IAAM,CACd,GAAId,EAAiB,CACnB,IAAMe,EAAeR,EAAUF,EAAM,IAAI,EAErCU,GACFT,EAAS,oBAAqBS,CAAY,EAC1CT,EAAS,mBAAoB,mBAAmB,GACvCH,IAETG,EAAS,oBAAqBH,CAAY,EAC1CG,EAAS,mBAAoB,mBAAmB,EAEpD,KAAO,CACL,IAAMU,EAAkBT,EAAU,mBAAmB,EAEjDS,GACFV,EAASD,EAAM,KAAMW,CAAe,EACpCV,EAAS,mBAAoBD,EAAM,IAAI,GAC9BF,IAETG,EAASD,EAAM,KAAMF,CAAY,EACjCG,EAAS,mBAAoBD,EAAM,IAAI,EAE3C,CACF,EAAG,CAACL,EAAiBG,EAAcG,EAAUC,EAAWF,EAAM,IAAI,CAAC,EAEjEX,EAACuB,EAAA,CACE,GAAGZ,EACJ,eAAgBP,EAChB,eAAgBC,EAChB,cAAea,EACf,oBAAqBC,EACrB,qBAAsBJ,EACtB,gBAAgB,qBAChB,eAAgBP,EAChB,iBAAkBE,EACpB,CAEJ,EArE2B","names":["useEffect","Fragment","jsx","jsxs","SalaryField","__name","from","to","shouldSwapOrder","salary_conversion_properties","conversionType","defaultValue","splitDescription","props","setValue","getValues","useFormContext","conversionProperties","ZendeskTriggerButton","zendeskArticles","mainFieldName","conversionFieldName","useEffect","currentValue","conversionValue","CurrencyConversionField"]}