@remoteoss/remote-flows 1.9.0 → 1.11.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 (442) hide show
  1. package/dist/ButtonDefault-W7RPNNTH.js +2 -0
  2. package/dist/CheckboxFieldDefault-JXZ6UY5T.js +2 -0
  3. package/dist/CountryFieldDefault-V7LUYGQV.js +2 -0
  4. package/dist/DatePickerFieldDefault-OMSU42DG.js +2 -0
  5. package/dist/DrawerDefault-V3GEL6Z5.js +2 -0
  6. package/dist/EmailFieldDefault-A3D5VQPS.js +2 -0
  7. package/dist/FieldsetToggleButtonDefault-BKIDTISL.js +2 -0
  8. package/dist/FileUploadFieldDefault-OQ4FGPDM.js +2 -0
  9. package/dist/MultiSelectFieldDefault-EZA25KXD.js +2 -0
  10. package/dist/NumberFieldDefault-BDSRZWXH.js +2 -0
  11. package/dist/PDFPreviewDefault-TV775MOQ.js +2 -0
  12. package/dist/RadioGroupFieldDefault-4IA7HESJ.js +2 -0
  13. package/dist/SelectFieldDefault-3XQ5FPO2.js +2 -0
  14. package/dist/StatementDefault-CCLTSJLJ.js +2 -0
  15. package/dist/TableFieldDefault-ADKV3M23.js +2 -0
  16. package/dist/TextAreaFieldDefault-LVZXGUKB.js +2 -0
  17. package/dist/TextFieldDefault-YQMWGOV2.js +2 -0
  18. package/dist/WorkScheduleFieldDefault-IW4VDBCH.js +2 -0
  19. package/dist/ZendeskDrawerDefault-DKSZSN6N.js +2 -0
  20. package/dist/{chunk-VC6X3C2I.js → chunk-2O6Z2KGG.js} +2 -2
  21. package/dist/{chunk-JKEUTGPQ.js → chunk-2Q57B73D.js} +2 -2
  22. package/dist/{chunk-6ZEZZZFB.js → chunk-2RBFD5MM.js} +2 -2
  23. package/dist/{chunk-ML56EPFW.js → chunk-2YNDS45E.js} +2 -2
  24. package/dist/{chunk-VKYP2MQQ.js → chunk-3JQROVRG.js} +2 -2
  25. package/dist/chunk-3KD533T6.js +2 -0
  26. package/dist/chunk-3KD533T6.js.map +1 -0
  27. package/dist/{chunk-HBPFTEHZ.js → chunk-3LZR4D3V.js} +2 -2
  28. package/dist/{chunk-EW36MHXP.js → chunk-43RCLG2R.js} +2 -2
  29. package/dist/{chunk-SBQYUJFI.js → chunk-4APMRCE7.js} +2 -2
  30. package/dist/{chunk-FJZPATKO.js → chunk-4ECYU3L5.js} +2 -2
  31. package/dist/chunk-4ECYU3L5.js.map +1 -0
  32. package/dist/{chunk-3UJC7KHD.js → chunk-4JIHEEKX.js} +2 -2
  33. package/dist/{chunk-7SYE5KEV.js → chunk-4V6AV3DC.js} +2 -2
  34. package/dist/{chunk-VIQQ3IHI.js → chunk-4XJEVGPI.js} +2 -2
  35. package/dist/{chunk-D4FBB5XW.js → chunk-4XV4INW5.js} +2 -2
  36. package/dist/{chunk-IEXTH6YO.js → chunk-4YAFRXR5.js} +2 -2
  37. package/dist/{chunk-I6Y6AWYE.js → chunk-55QKFWY5.js} +2 -2
  38. package/dist/{chunk-BJJTAQPT.js → chunk-5FUJICAO.js} +2 -2
  39. package/dist/{chunk-SVYPDGZN.js → chunk-5PVNZ6VO.js} +2 -2
  40. package/dist/{chunk-3UAJX23Y.js → chunk-64D4GLTO.js} +2 -2
  41. package/dist/chunk-6AXMBMQI.js +2 -0
  42. package/dist/chunk-6AXMBMQI.js.map +1 -0
  43. package/dist/{chunk-FJPY27YJ.js → chunk-6MJ5MIUI.js} +2 -2
  44. package/dist/{chunk-7QP5TRMH.js → chunk-6SVKW2DC.js} +2 -2
  45. package/dist/{chunk-XIEA775Q.js → chunk-7EMWT6EU.js} +2 -2
  46. package/dist/{chunk-CEHS4AFO.js → chunk-7G4JI6ZU.js} +2 -2
  47. package/dist/{chunk-WHROCBHG.js → chunk-7V3YVPIK.js} +2 -2
  48. package/dist/{chunk-C4NXXY3X.js → chunk-A3TXUJUO.js} +2 -2
  49. package/dist/{chunk-PGRQG254.js → chunk-AU376LE2.js} +2 -2
  50. package/dist/chunk-BDJLITVT.js +2 -0
  51. package/dist/chunk-BDJLITVT.js.map +1 -0
  52. package/dist/chunk-BHXCYFC4.js +2 -0
  53. package/dist/chunk-BHXCYFC4.js.map +1 -0
  54. package/dist/{chunk-NCELDZXG.js → chunk-C36DEJTU.js} +2 -2
  55. package/dist/{chunk-7QRAEME3.js → chunk-CCE3EAVC.js} +2 -2
  56. package/dist/{chunk-F2VYTYIQ.js → chunk-CMFZEZEK.js} +2 -2
  57. package/dist/{chunk-ZOPKBLGA.js → chunk-DAE2FMZ5.js} +2 -2
  58. package/dist/{chunk-CWQQA3P4.js → chunk-E7JOGKEV.js} +2 -2
  59. package/dist/{chunk-JQ2ESL5O.js → chunk-EGDWVDXM.js} +2 -2
  60. package/dist/{chunk-AN5U7FWW.js → chunk-ERPXDFKC.js} +2 -2
  61. package/dist/{chunk-UMOL4GLZ.js → chunk-FC2V3NUT.js} +2 -2
  62. package/dist/{chunk-5G5UBS6W.js → chunk-FUPQCC4B.js} +2 -2
  63. package/dist/{chunk-GLNDB4KG.js → chunk-G6BR4JI6.js} +2 -2
  64. package/dist/{chunk-CNCOVTDL.js → chunk-GINFFWVY.js} +2 -2
  65. package/dist/{chunk-DG34PSAO.js → chunk-GK3QRXNY.js} +2 -2
  66. package/dist/{chunk-XSG4QXPY.js → chunk-GOEEA34E.js} +2 -2
  67. package/dist/{chunk-WT6E5LO4.js → chunk-GRWTCP42.js} +2 -2
  68. package/dist/{chunk-KXF27FC4.js → chunk-GTJMTF2R.js} +2 -2
  69. package/dist/{chunk-MZNUCWQU.js → chunk-GWR2JBG2.js} +2 -2
  70. package/dist/chunk-GZ2JKPBY.js +2 -0
  71. package/dist/chunk-GZ2JKPBY.js.map +1 -0
  72. package/dist/chunk-H5CNWMEM.js +2 -0
  73. package/dist/{chunk-3QNS3IZB.js.map → chunk-H5CNWMEM.js.map} +1 -1
  74. package/dist/{chunk-ZNV46UUP.js → chunk-H5LGAIMM.js} +2 -2
  75. package/dist/{chunk-ZTBFYRNL.js → chunk-HYVK643F.js} +2 -2
  76. package/dist/{chunk-OZWDFGLQ.js → chunk-I3KFOOF6.js} +2 -2
  77. package/dist/{chunk-YMLXE6OO.js → chunk-IVUCPXEC.js} +2 -2
  78. package/dist/chunk-J63QA2JC.js +2 -0
  79. package/dist/chunk-J63QA2JC.js.map +1 -0
  80. package/dist/{chunk-THPH57GK.js → chunk-JAHRIQVL.js} +2 -2
  81. package/dist/{chunk-HLSVMRWX.js → chunk-JZWOMKR3.js} +2 -2
  82. package/dist/{chunk-YHD2RXJC.js → chunk-KESYJ5QG.js} +2 -2
  83. package/dist/{chunk-S6OVT37M.js → chunk-KFWZDRDD.js} +2 -2
  84. package/dist/chunk-KXOVDXNX.js +2 -0
  85. package/dist/chunk-KXOVDXNX.js.map +1 -0
  86. package/dist/{chunk-CKA37AR5.js → chunk-L53XOWY6.js} +2 -2
  87. package/dist/{chunk-UXUZA7XH.js → chunk-LGIHVJA5.js} +2 -2
  88. package/dist/{chunk-JTSHX4RB.js → chunk-MIK6GCO2.js} +2 -2
  89. package/dist/{chunk-4JOZ4VIJ.js → chunk-N6XY7NC3.js} +2 -2
  90. package/dist/{chunk-MM5K3XXY.js → chunk-NB3TN7O3.js} +2 -2
  91. package/dist/{chunk-ILX4QHHH.js → chunk-NIQXQZ6X.js} +2 -2
  92. package/dist/{chunk-COAGOVMZ.js → chunk-NVX4O45S.js} +2 -2
  93. package/dist/chunk-O3G6HQ3B.js +2 -0
  94. package/dist/chunk-O3G6HQ3B.js.map +1 -0
  95. package/dist/{chunk-5XHL6B25.js → chunk-PJ6ZEFWD.js} +5 -5
  96. package/dist/chunk-PJ6ZEFWD.js.map +1 -0
  97. package/dist/{chunk-VLP6L77E.js → chunk-PKXMKBP4.js} +2 -2
  98. package/dist/{chunk-A54D24NT.js → chunk-PV7FROZ7.js} +2 -2
  99. package/dist/chunk-Q445EJX6.js +2 -0
  100. package/dist/chunk-Q445EJX6.js.map +1 -0
  101. package/dist/{chunk-TZPHBNNS.js → chunk-QE76JNNE.js} +2 -2
  102. package/dist/{chunk-GBETAH3G.js → chunk-QLB4FSLX.js} +2 -2
  103. package/dist/{chunk-YUQ3GDQI.js → chunk-QPJFFMXN.js} +2 -2
  104. package/dist/{chunk-IG5LQPUN.js → chunk-QSOCKFUS.js} +2 -2
  105. package/dist/{chunk-YHIADGM3.js → chunk-RBJ5MFDE.js} +2 -2
  106. package/dist/{chunk-FJLSVTBJ.js → chunk-SBUJLXJH.js} +2 -2
  107. package/dist/{chunk-P45OX5YT.js → chunk-SIP2BFZJ.js} +2 -2
  108. package/dist/chunk-STF3NTPS.js +2 -0
  109. package/dist/chunk-STF3NTPS.js.map +1 -0
  110. package/dist/{chunk-IPITD7UK.js → chunk-SUWJZ3QR.js} +2 -2
  111. package/dist/chunk-TCLY24DF.js +2 -0
  112. package/dist/chunk-TCLY24DF.js.map +1 -0
  113. package/dist/{chunk-XQUHG7HJ.js → chunk-THBDZR3D.js} +2 -2
  114. package/dist/{chunk-3JJEKIQ2.js → chunk-TXVEFBFM.js} +2 -2
  115. package/dist/{chunk-G5DVMK4E.js → chunk-U7MQPLGK.js} +2 -2
  116. package/dist/{chunk-2SN7VPBR.js → chunk-U7PGN7TL.js} +2 -2
  117. package/dist/{chunk-EYHFPHIA.js → chunk-UAACHXXX.js} +2 -2
  118. package/dist/{chunk-WTQ6PTMB.js → chunk-UFTA5ATE.js} +2 -2
  119. package/dist/{chunk-FLW5LACO.js → chunk-UNBAXL4W.js} +2 -2
  120. package/dist/chunk-UYUPSPOE.js +1 -0
  121. package/dist/chunk-VH4D3E42.js +2 -0
  122. package/dist/chunk-VH4D3E42.js.map +1 -0
  123. package/dist/{chunk-DWTKSHQJ.js → chunk-VNN6IP6P.js} +2 -2
  124. package/dist/chunk-WOW74M7R.js +2 -0
  125. package/dist/chunk-WOW74M7R.js.map +1 -0
  126. package/dist/{chunk-OVTH3ZHO.js → chunk-WQSCAHR6.js} +2 -2
  127. package/dist/{chunk-JIZKHO7L.js → chunk-XDILBY5Y.js} +2 -2
  128. package/dist/{chunk-H5VA2OWQ.js → chunk-XJDX3ZH6.js} +2 -2
  129. package/dist/{chunk-LDJW2CBF.js → chunk-XJILW6K3.js} +2 -2
  130. package/dist/{chunk-XDZFLJ5F.js → chunk-XNRPT3WP.js} +2 -2
  131. package/dist/{chunk-IEX4KZUY.js → chunk-XSNWW3V4.js} +2 -2
  132. package/dist/{chunk-CKTFJUGZ.js → chunk-XSUQM562.js} +2 -2
  133. package/dist/{chunk-NXDG32BY.js → chunk-XYO67D3V.js} +2 -2
  134. package/dist/{chunk-5IHRUTHD.js → chunk-XZLVP6EN.js} +2 -2
  135. package/dist/{chunk-H2OBH7SK.js → chunk-YUYHK6WD.js} +2 -2
  136. package/dist/{chunk-C2NROAMW.js → chunk-Z4JMMKSU.js} +2 -2
  137. package/dist/{chunk-BMVPIRKX.js → chunk-ZL6FKICW.js} +2 -2
  138. package/dist/{chunk-UHO6CCVA.js → chunk-ZWO4HX27.js} +2 -2
  139. package/dist/default-components.d.ts +2 -2
  140. package/dist/default-components.js +1 -1
  141. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
  142. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +1 -1
  143. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +3 -3
  144. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  145. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
  146. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  147. package/dist/flows/ContractAmendment/context.d.ts +4 -4
  148. package/dist/flows/ContractAmendment/hooks.d.ts +4 -4
  149. package/dist/flows/ContractAmendment/hooks.js +1 -1
  150. package/dist/flows/ContractAmendment/index.d.ts +3 -3
  151. package/dist/flows/ContractAmendment/index.js +1 -1
  152. package/dist/flows/ContractAmendment/types.d.ts +2 -2
  153. package/dist/flows/ContractAmendment/utils.d.ts +2 -2
  154. package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +5 -5
  155. package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
  156. package/dist/flows/ContractorOnboarding/api.d.ts +2 -2
  157. package/dist/flows/ContractorOnboarding/api.js +1 -1
  158. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
  159. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
  160. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +5 -5
  161. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
  162. package/dist/flows/ContractorOnboarding/components/ContractPreviewHeader.d.ts +2 -2
  163. package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.d.ts +2 -2
  164. package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.js +1 -1
  165. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +5 -5
  166. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
  167. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +5 -5
  168. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
  169. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
  170. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
  171. package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +5 -5
  172. package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
  173. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
  174. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
  175. package/dist/flows/ContractorOnboarding/components/StatementOfWorkDisclaimer.js +1 -1
  176. package/dist/flows/ContractorOnboarding/constants.d.ts +38 -1
  177. package/dist/flows/ContractorOnboarding/constants.js +1 -1
  178. package/dist/flows/ContractorOnboarding/context.d.ts +7 -6
  179. package/dist/flows/ContractorOnboarding/hooks.d.ts +5 -5
  180. package/dist/flows/ContractorOnboarding/hooks.js +1 -1
  181. package/dist/flows/ContractorOnboarding/index.d.ts +6 -5
  182. package/dist/flows/ContractorOnboarding/index.js +1 -1
  183. package/dist/flows/ContractorOnboarding/jsfModify.d.ts +5 -5
  184. package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
  185. package/dist/flows/ContractorOnboarding/types.d.ts +5 -5
  186. package/dist/flows/ContractorOnboarding/utils.js +1 -1
  187. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
  188. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  189. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
  190. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  191. package/dist/flows/CostCalculator/CostCalculatorResetButton.js +1 -1
  192. package/dist/flows/CostCalculator/CostCalculatorSubmitButton.js +1 -1
  193. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +2 -2
  194. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  195. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +2 -2
  196. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.js +1 -1
  197. package/dist/flows/CostCalculator/api.d.ts +2 -2
  198. package/dist/flows/CostCalculator/api.js +1 -1
  199. package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
  200. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  201. package/dist/flows/CostCalculator/context.d.ts +3 -3
  202. package/dist/flows/CostCalculator/hooks.d.ts +3 -3
  203. package/dist/flows/CostCalculator/hooks.js +1 -1
  204. package/dist/flows/CostCalculator/index.d.ts +3 -3
  205. package/dist/flows/CostCalculator/index.js +1 -1
  206. package/dist/flows/CostCalculator/types.d.ts +2 -2
  207. package/dist/flows/CostCalculator/utils.d.ts +3 -3
  208. package/dist/flows/CostCalculator/utils.js +1 -1
  209. package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
  210. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  211. package/dist/flows/Onboarding/api.d.ts +5 -5
  212. package/dist/flows/Onboarding/api.js +1 -1
  213. package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
  214. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  215. package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +4 -4
  216. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  217. package/dist/flows/Onboarding/components/BenefitsStep.d.ts +4 -4
  218. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  219. package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +4 -4
  220. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  221. package/dist/flows/Onboarding/components/OnboardingForm.d.ts +4 -4
  222. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  223. package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
  224. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  225. package/dist/flows/Onboarding/components/ReviewStep.d.ts +4 -4
  226. package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
  227. package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +4 -4
  228. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  229. package/dist/flows/Onboarding/context.d.ts +5 -5
  230. package/dist/flows/Onboarding/hooks.d.ts +4 -4
  231. package/dist/flows/Onboarding/hooks.js +1 -1
  232. package/dist/flows/Onboarding/index.d.ts +4 -4
  233. package/dist/flows/Onboarding/index.js +1 -1
  234. package/dist/flows/Onboarding/types.d.ts +4 -4
  235. package/dist/flows/Onboarding/utils.d.ts +4 -4
  236. package/dist/flows/Onboarding/utils.js +1 -1
  237. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -4
  238. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  239. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +4 -4
  240. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  241. package/dist/flows/Termination/PaidTimeOffForm.d.ts +4 -4
  242. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  243. package/dist/flows/Termination/TerminationDetailsForm.d.ts +4 -4
  244. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  245. package/dist/flows/Termination/TerminationFlow.d.ts +4 -4
  246. package/dist/flows/Termination/TerminationFlow.js +1 -1
  247. package/dist/flows/Termination/TerminationForm.d.ts +4 -4
  248. package/dist/flows/Termination/TerminationForm.js +1 -1
  249. package/dist/flows/Termination/api.d.ts +5 -5
  250. package/dist/flows/Termination/api.js +1 -1
  251. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformation.js +1 -1
  252. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
  253. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +6 -6
  254. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.js +1 -1
  255. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +6 -6
  256. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
  257. package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +6 -6
  258. package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
  259. package/dist/flows/Termination/components/TerminationReasonsDetailContent/TerminationReasonsDetailContent.js +1 -1
  260. package/dist/flows/Termination/context.d.ts +4 -4
  261. package/dist/flows/Termination/hooks.d.ts +4 -4
  262. package/dist/flows/Termination/hooks.js +1 -1
  263. package/dist/flows/Termination/index.d.ts +6 -6
  264. package/dist/flows/Termination/index.js +1 -1
  265. package/dist/flows/Termination/json-schemas/schema.d.ts +4 -4
  266. package/dist/flows/Termination/types.d.ts +4 -4
  267. package/dist/flows/Termination/utils.d.ts +4 -4
  268. package/dist/flows/Termination/utils.js +1 -1
  269. package/dist/flows/types.d.ts +2 -2
  270. package/dist/index.css +1 -1
  271. package/dist/index.css.map +1 -1
  272. package/dist/index.d.ts +38 -23
  273. package/dist/index.js +2 -2
  274. package/dist/index.js.map +1 -1
  275. package/dist/internals.d.ts +3 -3
  276. package/dist/internals.js +1 -1
  277. package/dist/{mutations-D1eQrIJS.d.ts → mutations-CSKL2ADz.d.ts} +1 -1
  278. package/dist/{remoteFlows-DtWy_kl6.d.ts → remoteFlows-8JqicJKg.d.ts} +23 -2
  279. package/dist/styles.css +1 -1
  280. package/dist/styles.css.map +1 -1
  281. package/dist/{types-uiKCaHsn.d.ts → types-BL_cUn9Q.d.ts} +11 -6
  282. package/dist/{types-CoznD6fc.d.ts → types-Ch9BHKQe.d.ts} +1 -1
  283. package/dist/{types-C73xHbIf.d.ts → types-P-Kidj6s.d.ts} +7 -8
  284. package/dist/{types-CYEQpq5z.d.ts → types-ixtOeG_U.d.ts} +2 -2
  285. package/dist/{types.gen-Dg6qF5i1.d.ts → types.gen-BBKMFRSu.d.ts} +42 -1
  286. package/dist/{utils-DNGgpT60.d.ts → utils-Cfo-6z-L.d.ts} +1 -1
  287. package/package.json +1 -1
  288. package/dist/ButtonDefault-NLDQHAWN.js +0 -2
  289. package/dist/CheckboxFieldDefault-QXABRJXG.js +0 -2
  290. package/dist/CountryFieldDefault-VJM3C6WE.js +0 -2
  291. package/dist/DatePickerFieldDefault-3MBSCS3W.js +0 -2
  292. package/dist/DrawerDefault-5EYKRPS7.js +0 -2
  293. package/dist/EmailFieldDefault-3ES7SMDC.js +0 -2
  294. package/dist/FieldsetToggleButtonDefault-TPLNRX3E.js +0 -2
  295. package/dist/FileUploadFieldDefault-PNM6H64X.js +0 -2
  296. package/dist/MultiSelectFieldDefault-THD7TDWF.js +0 -2
  297. package/dist/NumberFieldDefault-PCH6RRDK.js +0 -2
  298. package/dist/PDFPreviewDefault-474JH3KB.js +0 -2
  299. package/dist/RadioGroupFieldDefault-CM33F3EP.js +0 -2
  300. package/dist/SelectFieldDefault-NHDJRM5H.js +0 -2
  301. package/dist/StatementDefault-CSHXL3G2.js +0 -2
  302. package/dist/TableFieldDefault-N7MO2QJI.js +0 -2
  303. package/dist/TextAreaFieldDefault-OG4UM4DG.js +0 -2
  304. package/dist/TextFieldDefault-FECR4GRK.js +0 -2
  305. package/dist/WorkScheduleFieldDefault-G2MR2DBY.js +0 -2
  306. package/dist/ZendeskDrawerDefault-W3RCTVCH.js +0 -2
  307. package/dist/chunk-3QNS3IZB.js +0 -2
  308. package/dist/chunk-5XHL6B25.js.map +0 -1
  309. package/dist/chunk-634DTN72.js +0 -2
  310. package/dist/chunk-634DTN72.js.map +0 -1
  311. package/dist/chunk-CEM3JUSV.js +0 -2
  312. package/dist/chunk-CEM3JUSV.js.map +0 -1
  313. package/dist/chunk-D3XDJFE3.js +0 -2
  314. package/dist/chunk-D3XDJFE3.js.map +0 -1
  315. package/dist/chunk-DKFUZO5P.js +0 -1
  316. package/dist/chunk-EFLWMMG5.js +0 -2
  317. package/dist/chunk-EFLWMMG5.js.map +0 -1
  318. package/dist/chunk-EIFXWGXM.js +0 -2
  319. package/dist/chunk-EIFXWGXM.js.map +0 -1
  320. package/dist/chunk-FJZPATKO.js.map +0 -1
  321. package/dist/chunk-GCWEOZBS.js +0 -2
  322. package/dist/chunk-GCWEOZBS.js.map +0 -1
  323. package/dist/chunk-H6YNMT4M.js +0 -2
  324. package/dist/chunk-H6YNMT4M.js.map +0 -1
  325. package/dist/chunk-LNWBGEKE.js +0 -2
  326. package/dist/chunk-LNWBGEKE.js.map +0 -1
  327. package/dist/chunk-N4W7JU2D.js +0 -2
  328. package/dist/chunk-N4W7JU2D.js.map +0 -1
  329. package/dist/chunk-PO57BOOY.js +0 -2
  330. package/dist/chunk-PO57BOOY.js.map +0 -1
  331. package/dist/chunk-RLRSNB77.js +0 -2
  332. package/dist/chunk-RLRSNB77.js.map +0 -1
  333. package/dist/chunk-RQUNEKD2.js +0 -2
  334. package/dist/chunk-RQUNEKD2.js.map +0 -1
  335. package/dist/chunk-UBRRCAAI.js +0 -2
  336. package/dist/chunk-UBRRCAAI.js.map +0 -1
  337. /package/dist/{ButtonDefault-NLDQHAWN.js.map → ButtonDefault-W7RPNNTH.js.map} +0 -0
  338. /package/dist/{CheckboxFieldDefault-QXABRJXG.js.map → CheckboxFieldDefault-JXZ6UY5T.js.map} +0 -0
  339. /package/dist/{CountryFieldDefault-VJM3C6WE.js.map → CountryFieldDefault-V7LUYGQV.js.map} +0 -0
  340. /package/dist/{DatePickerFieldDefault-3MBSCS3W.js.map → DatePickerFieldDefault-OMSU42DG.js.map} +0 -0
  341. /package/dist/{DrawerDefault-5EYKRPS7.js.map → DrawerDefault-V3GEL6Z5.js.map} +0 -0
  342. /package/dist/{EmailFieldDefault-3ES7SMDC.js.map → EmailFieldDefault-A3D5VQPS.js.map} +0 -0
  343. /package/dist/{FieldsetToggleButtonDefault-TPLNRX3E.js.map → FieldsetToggleButtonDefault-BKIDTISL.js.map} +0 -0
  344. /package/dist/{FileUploadFieldDefault-PNM6H64X.js.map → FileUploadFieldDefault-OQ4FGPDM.js.map} +0 -0
  345. /package/dist/{MultiSelectFieldDefault-THD7TDWF.js.map → MultiSelectFieldDefault-EZA25KXD.js.map} +0 -0
  346. /package/dist/{NumberFieldDefault-PCH6RRDK.js.map → NumberFieldDefault-BDSRZWXH.js.map} +0 -0
  347. /package/dist/{PDFPreviewDefault-474JH3KB.js.map → PDFPreviewDefault-TV775MOQ.js.map} +0 -0
  348. /package/dist/{RadioGroupFieldDefault-CM33F3EP.js.map → RadioGroupFieldDefault-4IA7HESJ.js.map} +0 -0
  349. /package/dist/{SelectFieldDefault-NHDJRM5H.js.map → SelectFieldDefault-3XQ5FPO2.js.map} +0 -0
  350. /package/dist/{StatementDefault-CSHXL3G2.js.map → StatementDefault-CCLTSJLJ.js.map} +0 -0
  351. /package/dist/{TableFieldDefault-N7MO2QJI.js.map → TableFieldDefault-ADKV3M23.js.map} +0 -0
  352. /package/dist/{TextAreaFieldDefault-OG4UM4DG.js.map → TextAreaFieldDefault-LVZXGUKB.js.map} +0 -0
  353. /package/dist/{TextFieldDefault-FECR4GRK.js.map → TextFieldDefault-YQMWGOV2.js.map} +0 -0
  354. /package/dist/{WorkScheduleFieldDefault-G2MR2DBY.js.map → WorkScheduleFieldDefault-IW4VDBCH.js.map} +0 -0
  355. /package/dist/{ZendeskDrawerDefault-W3RCTVCH.js.map → ZendeskDrawerDefault-DKSZSN6N.js.map} +0 -0
  356. /package/dist/{chunk-VC6X3C2I.js.map → chunk-2O6Z2KGG.js.map} +0 -0
  357. /package/dist/{chunk-JKEUTGPQ.js.map → chunk-2Q57B73D.js.map} +0 -0
  358. /package/dist/{chunk-6ZEZZZFB.js.map → chunk-2RBFD5MM.js.map} +0 -0
  359. /package/dist/{chunk-ML56EPFW.js.map → chunk-2YNDS45E.js.map} +0 -0
  360. /package/dist/{chunk-VKYP2MQQ.js.map → chunk-3JQROVRG.js.map} +0 -0
  361. /package/dist/{chunk-HBPFTEHZ.js.map → chunk-3LZR4D3V.js.map} +0 -0
  362. /package/dist/{chunk-EW36MHXP.js.map → chunk-43RCLG2R.js.map} +0 -0
  363. /package/dist/{chunk-SBQYUJFI.js.map → chunk-4APMRCE7.js.map} +0 -0
  364. /package/dist/{chunk-3UJC7KHD.js.map → chunk-4JIHEEKX.js.map} +0 -0
  365. /package/dist/{chunk-7SYE5KEV.js.map → chunk-4V6AV3DC.js.map} +0 -0
  366. /package/dist/{chunk-VIQQ3IHI.js.map → chunk-4XJEVGPI.js.map} +0 -0
  367. /package/dist/{chunk-D4FBB5XW.js.map → chunk-4XV4INW5.js.map} +0 -0
  368. /package/dist/{chunk-IEXTH6YO.js.map → chunk-4YAFRXR5.js.map} +0 -0
  369. /package/dist/{chunk-I6Y6AWYE.js.map → chunk-55QKFWY5.js.map} +0 -0
  370. /package/dist/{chunk-BJJTAQPT.js.map → chunk-5FUJICAO.js.map} +0 -0
  371. /package/dist/{chunk-SVYPDGZN.js.map → chunk-5PVNZ6VO.js.map} +0 -0
  372. /package/dist/{chunk-3UAJX23Y.js.map → chunk-64D4GLTO.js.map} +0 -0
  373. /package/dist/{chunk-FJPY27YJ.js.map → chunk-6MJ5MIUI.js.map} +0 -0
  374. /package/dist/{chunk-7QP5TRMH.js.map → chunk-6SVKW2DC.js.map} +0 -0
  375. /package/dist/{chunk-XIEA775Q.js.map → chunk-7EMWT6EU.js.map} +0 -0
  376. /package/dist/{chunk-CEHS4AFO.js.map → chunk-7G4JI6ZU.js.map} +0 -0
  377. /package/dist/{chunk-WHROCBHG.js.map → chunk-7V3YVPIK.js.map} +0 -0
  378. /package/dist/{chunk-C4NXXY3X.js.map → chunk-A3TXUJUO.js.map} +0 -0
  379. /package/dist/{chunk-PGRQG254.js.map → chunk-AU376LE2.js.map} +0 -0
  380. /package/dist/{chunk-NCELDZXG.js.map → chunk-C36DEJTU.js.map} +0 -0
  381. /package/dist/{chunk-7QRAEME3.js.map → chunk-CCE3EAVC.js.map} +0 -0
  382. /package/dist/{chunk-F2VYTYIQ.js.map → chunk-CMFZEZEK.js.map} +0 -0
  383. /package/dist/{chunk-ZOPKBLGA.js.map → chunk-DAE2FMZ5.js.map} +0 -0
  384. /package/dist/{chunk-CWQQA3P4.js.map → chunk-E7JOGKEV.js.map} +0 -0
  385. /package/dist/{chunk-JQ2ESL5O.js.map → chunk-EGDWVDXM.js.map} +0 -0
  386. /package/dist/{chunk-AN5U7FWW.js.map → chunk-ERPXDFKC.js.map} +0 -0
  387. /package/dist/{chunk-UMOL4GLZ.js.map → chunk-FC2V3NUT.js.map} +0 -0
  388. /package/dist/{chunk-5G5UBS6W.js.map → chunk-FUPQCC4B.js.map} +0 -0
  389. /package/dist/{chunk-GLNDB4KG.js.map → chunk-G6BR4JI6.js.map} +0 -0
  390. /package/dist/{chunk-CNCOVTDL.js.map → chunk-GINFFWVY.js.map} +0 -0
  391. /package/dist/{chunk-DG34PSAO.js.map → chunk-GK3QRXNY.js.map} +0 -0
  392. /package/dist/{chunk-XSG4QXPY.js.map → chunk-GOEEA34E.js.map} +0 -0
  393. /package/dist/{chunk-WT6E5LO4.js.map → chunk-GRWTCP42.js.map} +0 -0
  394. /package/dist/{chunk-KXF27FC4.js.map → chunk-GTJMTF2R.js.map} +0 -0
  395. /package/dist/{chunk-MZNUCWQU.js.map → chunk-GWR2JBG2.js.map} +0 -0
  396. /package/dist/{chunk-ZNV46UUP.js.map → chunk-H5LGAIMM.js.map} +0 -0
  397. /package/dist/{chunk-ZTBFYRNL.js.map → chunk-HYVK643F.js.map} +0 -0
  398. /package/dist/{chunk-OZWDFGLQ.js.map → chunk-I3KFOOF6.js.map} +0 -0
  399. /package/dist/{chunk-YMLXE6OO.js.map → chunk-IVUCPXEC.js.map} +0 -0
  400. /package/dist/{chunk-THPH57GK.js.map → chunk-JAHRIQVL.js.map} +0 -0
  401. /package/dist/{chunk-HLSVMRWX.js.map → chunk-JZWOMKR3.js.map} +0 -0
  402. /package/dist/{chunk-YHD2RXJC.js.map → chunk-KESYJ5QG.js.map} +0 -0
  403. /package/dist/{chunk-S6OVT37M.js.map → chunk-KFWZDRDD.js.map} +0 -0
  404. /package/dist/{chunk-CKA37AR5.js.map → chunk-L53XOWY6.js.map} +0 -0
  405. /package/dist/{chunk-UXUZA7XH.js.map → chunk-LGIHVJA5.js.map} +0 -0
  406. /package/dist/{chunk-JTSHX4RB.js.map → chunk-MIK6GCO2.js.map} +0 -0
  407. /package/dist/{chunk-4JOZ4VIJ.js.map → chunk-N6XY7NC3.js.map} +0 -0
  408. /package/dist/{chunk-MM5K3XXY.js.map → chunk-NB3TN7O3.js.map} +0 -0
  409. /package/dist/{chunk-ILX4QHHH.js.map → chunk-NIQXQZ6X.js.map} +0 -0
  410. /package/dist/{chunk-COAGOVMZ.js.map → chunk-NVX4O45S.js.map} +0 -0
  411. /package/dist/{chunk-VLP6L77E.js.map → chunk-PKXMKBP4.js.map} +0 -0
  412. /package/dist/{chunk-A54D24NT.js.map → chunk-PV7FROZ7.js.map} +0 -0
  413. /package/dist/{chunk-TZPHBNNS.js.map → chunk-QE76JNNE.js.map} +0 -0
  414. /package/dist/{chunk-GBETAH3G.js.map → chunk-QLB4FSLX.js.map} +0 -0
  415. /package/dist/{chunk-YUQ3GDQI.js.map → chunk-QPJFFMXN.js.map} +0 -0
  416. /package/dist/{chunk-IG5LQPUN.js.map → chunk-QSOCKFUS.js.map} +0 -0
  417. /package/dist/{chunk-YHIADGM3.js.map → chunk-RBJ5MFDE.js.map} +0 -0
  418. /package/dist/{chunk-FJLSVTBJ.js.map → chunk-SBUJLXJH.js.map} +0 -0
  419. /package/dist/{chunk-P45OX5YT.js.map → chunk-SIP2BFZJ.js.map} +0 -0
  420. /package/dist/{chunk-IPITD7UK.js.map → chunk-SUWJZ3QR.js.map} +0 -0
  421. /package/dist/{chunk-XQUHG7HJ.js.map → chunk-THBDZR3D.js.map} +0 -0
  422. /package/dist/{chunk-3JJEKIQ2.js.map → chunk-TXVEFBFM.js.map} +0 -0
  423. /package/dist/{chunk-G5DVMK4E.js.map → chunk-U7MQPLGK.js.map} +0 -0
  424. /package/dist/{chunk-2SN7VPBR.js.map → chunk-U7PGN7TL.js.map} +0 -0
  425. /package/dist/{chunk-EYHFPHIA.js.map → chunk-UAACHXXX.js.map} +0 -0
  426. /package/dist/{chunk-WTQ6PTMB.js.map → chunk-UFTA5ATE.js.map} +0 -0
  427. /package/dist/{chunk-FLW5LACO.js.map → chunk-UNBAXL4W.js.map} +0 -0
  428. /package/dist/{chunk-DKFUZO5P.js.map → chunk-UYUPSPOE.js.map} +0 -0
  429. /package/dist/{chunk-DWTKSHQJ.js.map → chunk-VNN6IP6P.js.map} +0 -0
  430. /package/dist/{chunk-OVTH3ZHO.js.map → chunk-WQSCAHR6.js.map} +0 -0
  431. /package/dist/{chunk-JIZKHO7L.js.map → chunk-XDILBY5Y.js.map} +0 -0
  432. /package/dist/{chunk-H5VA2OWQ.js.map → chunk-XJDX3ZH6.js.map} +0 -0
  433. /package/dist/{chunk-LDJW2CBF.js.map → chunk-XJILW6K3.js.map} +0 -0
  434. /package/dist/{chunk-XDZFLJ5F.js.map → chunk-XNRPT3WP.js.map} +0 -0
  435. /package/dist/{chunk-IEX4KZUY.js.map → chunk-XSNWW3V4.js.map} +0 -0
  436. /package/dist/{chunk-CKTFJUGZ.js.map → chunk-XSUQM562.js.map} +0 -0
  437. /package/dist/{chunk-NXDG32BY.js.map → chunk-XYO67D3V.js.map} +0 -0
  438. /package/dist/{chunk-5IHRUTHD.js.map → chunk-XZLVP6EN.js.map} +0 -0
  439. /package/dist/{chunk-H2OBH7SK.js.map → chunk-YUYHK6WD.js.map} +0 -0
  440. /package/dist/{chunk-C2NROAMW.js.map → chunk-Z4JMMKSU.js.map} +0 -0
  441. /package/dist/{chunk-BMVPIRKX.js.map → chunk-ZL6FKICW.js.map} +0 -0
  442. /package/dist/{chunk-UHO6CCVA.js.map → chunk-ZWO4HX27.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-XQUHG7HJ.js";import{b as s}from"./chunk-PGWKJ6FK.js";import{b as n}from"./chunk-3X36ZFNP.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function S({onSubmit:d,onError:a,onSuccess:m}){let{onboardingBag:r}=s(),c=t(async i=>{try{let e=await r.parseFormValues(i);await d?.(e);let o=await r.onSubmit(i);if(o?.data){await m?.(o.data),r?.next();return}if(o?.error){let p=n(o?.fieldErrors||[],r.meta?.fields?.contract_details);a?.({error:o.error,rawError:o.rawError,fieldErrors:p})}}catch(e){a?.({error:e,rawError:e,fieldErrors:[]})}},"handleSubmit");return E(l,{defaultValues:r.stepState.values?.contract_details||r.initialValues.contract_details,onSubmit:c})}t(S,"ContractDetailsStep");export{S as a};
2
- //# sourceMappingURL=chunk-3UAJX23Y.js.map
1
+ import{a as l}from"./chunk-THBDZR3D.js";import{b as s}from"./chunk-PGWKJ6FK.js";import{b as n}from"./chunk-3X36ZFNP.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function S({onSubmit:d,onError:a,onSuccess:m}){let{onboardingBag:r}=s(),c=t(async i=>{try{let e=await r.parseFormValues(i);await d?.(e);let o=await r.onSubmit(i);if(o?.data){await m?.(o.data),r?.next();return}if(o?.error){let p=n(o?.fieldErrors||[],r.meta?.fields?.contract_details);a?.({error:o.error,rawError:o.rawError,fieldErrors:p})}}catch(e){a?.({error:e,rawError:e,fieldErrors:[]})}},"handleSubmit");return E(l,{defaultValues:r.stepState.values?.contract_details||r.initialValues.contract_details,onSubmit:c})}t(S,"ContractDetailsStep");export{S as a};
2
+ //# sourceMappingURL=chunk-64D4GLTO.js.map
@@ -0,0 +1,2 @@
1
+ import{a as U}from"./chunk-6DHV4GT6.js";import{a as W}from"./chunk-KFWZDRDD.js";import{a as Y}from"./chunk-5FUJICAO.js";import{a as Q}from"./chunk-2YNDS45E.js";import{a as J}from"./chunk-5PVNZ6VO.js";import{a as H}from"./chunk-YRC6EEM3.js";import{a as q,b as B,c as L,d as z}from"./chunk-XSNWW3V4.js";import{g as Z,h as K}from"./chunk-UFTA5ATE.js";import{a as R}from"./chunk-ZXGAFQXW.js";import{a as S}from"./chunk-XDILBY5Y.js";import{a as N}from"./chunk-Q445EJX6.js";import{a as E}from"./chunk-EUSCQL4H.js";import{e as _}from"./chunk-T7O3YYOG.js";import{a as u,b as v}from"./chunk-BDJLITVT.js";import{n as $}from"./chunk-PJ6ZEFWD.js";import{a as D}from"./chunk-J63QA2JC.js";import{a as w}from"./chunk-3X36ZFNP.js";import{a as A}from"./chunk-5BRMLRS7.js";import{a as I}from"./chunk-Z5WMKCRJ.js";import{d as O}from"./chunk-KQPDXXG3.js";import{a as o}from"./chunk-P37U34EQ.js";import xe from"lodash.omitby";import je from"lodash.isnull";import{format as x,isFuture as Ve,parseISO as j,subDays as Pe}from"date-fns";import{useMemo as V}from"react";import be from"lodash.omit";import{useQuery as Fe}from"@tanstack/react-query";var G=o(({query:t,options:e})=>{let{client:y}=O();return Fe({queryKey:["payroll-calendars"],queryFn:o(()=>$({client:y,query:{year:t?.year,country_code:t?.countryCode}}),"queryFn"),enabled:e?.enabled,select:o(c=>c.data?.data?.payroll_calendars?.[0],"select")})},"usePayrollCalendars");import{isFuture as Me,isToday as ge,parseISO as Se}from"date-fns";var X=o(t=>{if(!t)return!1;let e=Se(t);return Me(e)||ge(e)},"isInProbationPeriod");import{Fragment as ke,jsx as m,jsxs as Ce}from"react/jsx-runtime";var lo=o(({employmentId:t,options:e,initialValues:y})=>{let{fieldValues:c,setFieldValues:ee,stepState:l,previousStep:oe,nextStep:ie}=A(q),{data:n,isLoading:te}=N({employmentId:t,queryParams:{exclude_files:!0}}),{data:ne}=G({query:{year:new Date().getFullYear().toString(),countryCode:n?.country?.code},options:{enabled:!!n?.country?.code}}),T=X(n?.probation_period_end_date),F=B(ne),P=V(()=>T?x(new Date,"yyyy-MM-dd"):x(F,"yyyy-MM-dd"),[T,F]),M=!!(n?.provisional_start_date&&Ve(j(n.provisional_start_date))),ae={personal_email:n?.basic_information?.email},g=z({...ae,...y,...l.values?.employee_communication,...l.values?.termination_details,...l.values?.paid_time_off,...l.values?.additional_information},M),d=V(()=>({...g,...c}),[c,g]),b=L({minTerminationDate:F,isEmployeeInProbationPeriod:T,selectedDate:j(d.proposed_termination_date)}),re=V(()=>{let s=R.data.schema.properties.termination_reason.oneOf,a=M?s.filter(i=>i.const==="cancellation_before_start_date"):s.filter(i=>i.const!=="cancellation_before_start_date");return{fields:{risk_assesment_info:S("Offboarding risk assessment","Employees may be protected from termination if they fall into certain categories. To help avoid claims from employees, let us know if the employee is part of one or more of these categories. Select all that apply.",{className:e?.jsfModify?.fields?.risk_assesment_info?.["x-jsf-presentation"]?.className}),termination_reason:{...e?.jsfModify?.fields?.termination_reason,oneOf:a},proposed_termination_date_info:S("Proposed termination date",Ce(ke,{children:["In most cases, Remote must provide notice to the employee before termination. The required notice period depends on local labor laws, the employment agreement, and other factors. We'll use those factors to determine the required notice period.",m(v,{external:!0,zendeskId:u.terminationNoticePeriods,className:D("text-sm",e?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.zendeskTriggerButtonClassName),children:"Learn about notice periods"})]}),{className:e?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.className}),proposed_termination_date:{...e?.jsfModify?.fields?.proposed_termination_date,"x-jsf-presentation":{...e?.jsfModify?.fields?.proposed_termination_date?.["x-jsf-presentation"],minDate:P,...d.termination_reason==="cancellation_before_start_date"&&n?.provisional_start_date?{maxDate:x(Pe(j(n.provisional_start_date),1),"yyyy-MM-dd")}:{},...b},...d.termination_reason==="cancellation_before_start_date"?{"x-jsf-errorMessage":{maximum:"The proposed termination date must be before the employee's start date."}}:{}},paid_time_off_info:{...e?.jsfModify?.fields?.paid_time_off_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.paid_time_off_info?.["x-jsf-presentation"],Component:o(()=>{let i=e?.jsfModify?.fields?.paid_time_off_info?.["x-jsf-presentation"]?.Component;return m(J,{employeeName:n?.basic_information?.name,proposedTerminationDate:d.proposed_termination_date,employmentId:t,employment:n,render:r=>i?m(i,{...r}):m(Q,{...r})})},"Component")}},acknowledge_termination_procedure_info:{...e?.jsfModify?.fields?.acknowledge_termination_procedure_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.acknowledge_termination_procedure_info?.["x-jsf-presentation"],Component:o(()=>{let i=e?.jsfModify?.fields?.acknowledge_termination_procedure_info?.["x-jsf-presentation"]?.Component;return m(U,{render:r=>i?m(i,{...r}):m(W,{...r})})},"Component")}},acknowledge_termination_procedure_fees_info:{...e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info?.["x-jsf-presentation"],Component:o(()=>{let i={involuntaryOffboardingServiceChargeZendeskId:u.involuntaryOffboardingServiceCharge,reconciliationInvoiceZendeskId:u.reconciliationInvoice},r=e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info?.["x-jsf-presentation"]?.Component;return r?m(r,{...i}):m(Y,{...i})},"Component")}}}}},[n,t,d.proposed_termination_date,d.termination_reason,M,P,e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info,e?.jsfModify?.fields?.acknowledge_termination_procedure_info,e?.jsfModify?.fields?.paid_time_off_info,e?.jsfModify?.fields?.proposed_termination_date,e?.jsfModify?.fields?.proposed_termination_date_info,e?.jsfModify?.fields?.risk_assesment_info,e?.jsfModify?.fields?.termination_reason,b]),{data:f,isLoading:se}=K({formValues:d,jsfModify:{...e?.jsfModify,fields:{...e?.jsfModify?.fields,...re?.fields}},step:l.currentStep.name}),me=E(H.data.schema),k=Z(),{mutateAsync:de}=w(k);async function fe(s){if(!t)throw new Error("Employment id is missing");if(f){let a=await C(s,!0),{customer_informed_employee:i}=a,r=i==="yes"?{employee_awareness:{date:a.customer_informed_employee_date,note:a.customer_informed_employee_description}}:void 0,ue=await I(a,["agrees_to_pto_amount","confidential","customer_informed_employee","will_challenge_termination"]),_e=be(ue,"customer_informed_employee_date","customer_informed_employee_description"),ye=xe({..._e,...r},je),p=a.timesheet_file??[],h=Array.isArray(p)&&p.length>0?{content:p[0].content,name:p[0].name}:void 0,Te={employment_id:t,termination_details:{...ye,timesheet_file:h||void 0},type:"termination"};return de(Te)}}o(fe,"onSubmit");function le(){oe()}o(le,"back");function ce(){ie()}o(ce,"next");let pe=Object.keys(c).length>0,C=o(async(s,a=!1)=>a?await _(s,me.fields,{isPartialValidation:!0}):f?await _(s,f?.fields,{isPartialValidation:!0}):{},"parseFormValues");return{employmentId:t,employment:n,fieldValues:d,isDirty:pe,stepState:l,fields:f?.fields||[],isLoading:se||te,isSubmitting:k.isPending,initialValues:g,handleValidation:o(async s=>{if(f){let a=await _(s,f?.fields);return f?.handleValidation(a)}return null},"handleValidation"),checkFieldUpdates:ee,parseFormValues:C,onSubmit:fe,back:le,next:ce}},"useTermination");export{lo as a};
2
+ //# sourceMappingURL=chunk-6AXMBMQI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/Termination/hooks.tsx","../src/common/api/payroll-calendars.ts","../src/common/employment.ts"],"sourcesContent":["import { $TSFixMe } from '@/src/types/remoteFlows';\nimport { createHeadlessForm } from '@/src/common/createHeadlessForm';\nimport omitBy from 'lodash.omitby';\nimport isNull from 'lodash.isnull';\nimport { format, isFuture, parseISO, subDays } from 'date-fns';\nimport { useMemo } from 'react';\nimport {\n CreateOffboardingParams,\n TerminationDetailsParams,\n} from '@/src/client';\nimport { mutationToPromise } from '@/src/lib/mutations';\nimport { parseJSFToValidate } from '@/src/components/form/utils';\nimport {\n EmployeeCommunicationFormValues,\n PaidTimeOffFormValues,\n TerminationDetailsFormValues,\n TerminationFlowProps,\n TerminationFormValues,\n} from '@/src/flows/Termination/types';\nimport omit from 'lodash.omit';\nimport { parseFormRadioValues } from '@/src/flows/utils';\nimport { useStepState } from '@/src/flows/useStepState';\nimport {\n buildInitialValues,\n calculateMinTerminationDate,\n calculateProposedTerminationDateStatement,\n STEPS,\n} from '@/src/flows/Termination/utils';\nimport { jsonSchema } from '@/src/flows/Termination/json-schemas/jsonSchema';\nimport { terminationDetailsSchema } from '@/src/flows/Termination/json-schemas/terminationDetails';\nimport {\n useCreateTermination,\n useTerminationSchema,\n} from '@/src/flows/Termination/api';\nimport { createInformationField } from '@/src/components/form/jsf-utils/createFields';\nimport { cn } from '@/src/internals';\nimport { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\nimport { PaidTimeOff } from '@/src/flows/Termination/components/PaidTimeOff/PaidTimeOff';\nimport { PaidTimeOffContainer } from '@/src/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer';\nimport { useEmploymentQuery } from '@/src/common/api/employment';\nimport { AcknowledgeInformationContainer } from '@/src/flows/Termination/components/AcknowledgeInformation/AcknowledgeInfomationContainer';\nimport { AcknowledgeInformation } from '@/src/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformation';\nimport { AcknowledgeInformationFees } from '@/src/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees';\nimport { usePayrollCalendars } from '@/src/common/api/payroll-calendars';\nimport { isInProbationPeriod } from '@/src/common/employment';\nimport { ZendeskTriggerButton } from '@/src/components/shared/zendesk-drawer/ZendeskTriggerButton';\n\ntype TerminationHookProps = Omit<TerminationFlowProps, 'render'>;\n\nexport const useTermination = ({\n employmentId,\n options,\n initialValues: terminationInitialValues,\n}: TerminationHookProps) => {\n const { fieldValues, setFieldValues, stepState, previousStep, nextStep } =\n useStepState<keyof typeof STEPS, TerminationFormValues>(STEPS);\n\n const { data: employment, isLoading: isLoadingEmployment } =\n useEmploymentQuery({ employmentId, queryParams: { exclude_files: true } });\n\n const { data: payrollCalendars } = usePayrollCalendars({\n query: {\n year: new Date().getFullYear().toString(),\n countryCode: employment?.country?.code,\n },\n options: {\n enabled: Boolean(employment?.country?.code),\n },\n });\n\n const isEmployeeInProbationPeriod = isInProbationPeriod(\n employment?.probation_period_end_date,\n );\n\n const minTerminationDate = calculateMinTerminationDate(payrollCalendars);\n const minDate = useMemo(\n () =>\n isEmployeeInProbationPeriod\n ? format(new Date(), 'yyyy-MM-dd')\n : format(minTerminationDate, 'yyyy-MM-dd'),\n [isEmployeeInProbationPeriod, minTerminationDate],\n );\n\n const hasFutureStartDate = Boolean(\n employment?.provisional_start_date &&\n isFuture(parseISO(employment.provisional_start_date)),\n );\n\n const employmentValues = {\n personal_email: employment?.basic_information?.email as string,\n } as Partial<TerminationFormValues>;\n\n const initialValues = buildInitialValues(\n {\n ...employmentValues,\n ...terminationInitialValues,\n ...stepState.values?.employee_communication,\n ...stepState.values?.termination_details,\n ...stepState.values?.paid_time_off,\n ...stepState.values?.additional_information,\n },\n hasFutureStartDate,\n );\n\n const formValues = useMemo(\n () => ({\n ...initialValues,\n ...fieldValues,\n }),\n [fieldValues, initialValues],\n );\n\n const proposedTerminationDateStatement =\n calculateProposedTerminationDateStatement({\n minTerminationDate,\n isEmployeeInProbationPeriod,\n selectedDate: parseISO(formValues.proposed_termination_date),\n });\n\n const customFields = useMemo(() => {\n const originalTerminationReasonOptions =\n terminationDetailsSchema.data.schema.properties.termination_reason.oneOf;\n\n const terminationReasonOptions = hasFutureStartDate\n ? originalTerminationReasonOptions.filter(\n (option: $TSFixMe) =>\n option.const === 'cancellation_before_start_date',\n )\n : originalTerminationReasonOptions.filter(\n (option: $TSFixMe) =>\n option.const !== 'cancellation_before_start_date',\n );\n\n return {\n fields: {\n risk_assesment_info: createInformationField(\n 'Offboarding risk assessment',\n 'Employees may be protected from termination if they fall into certain categories. To help avoid claims from employees, let us know if the employee is part of one or more of these categories. Select all that apply.',\n {\n className: (\n options?.jsfModify?.fields?.risk_assesment_info as $TSFixMe\n )?.['x-jsf-presentation']?.className,\n },\n ),\n termination_reason: {\n ...(options?.jsfModify?.fields?.termination_reason as $TSFixMe),\n oneOf: terminationReasonOptions,\n },\n proposed_termination_date_info: createInformationField(\n 'Proposed termination date',\n <>\n In most cases, Remote must provide notice to the employee before\n termination. The required notice period depends on local labor laws,\n the employment agreement, and other factors. We'll use those factors\n to determine the required notice period.\n <ZendeskTriggerButton\n external\n zendeskId={zendeskArticles.terminationNoticePeriods}\n className={cn(\n 'text-sm',\n (\n options?.jsfModify?.fields\n ?.proposed_termination_date_info as $TSFixMe\n )?.['x-jsf-presentation']?.zendeskTriggerButtonClassName,\n )}\n >\n Learn about notice periods\n </ZendeskTriggerButton>\n </>,\n {\n className: (\n options?.jsfModify?.fields\n ?.proposed_termination_date_info as $TSFixMe\n )?.['x-jsf-presentation']?.className,\n },\n ),\n proposed_termination_date: {\n ...(options?.jsfModify?.fields\n ?.proposed_termination_date as $TSFixMe),\n 'x-jsf-presentation': {\n ...(\n options?.jsfModify?.fields?.proposed_termination_date as $TSFixMe\n )?.['x-jsf-presentation'],\n minDate: minDate,\n ...(formValues.termination_reason ===\n 'cancellation_before_start_date' &&\n employment?.provisional_start_date\n ? {\n maxDate: format(\n subDays(parseISO(employment.provisional_start_date), 1),\n 'yyyy-MM-dd',\n ),\n }\n : {}),\n ...proposedTerminationDateStatement,\n },\n ...(formValues.termination_reason === 'cancellation_before_start_date'\n ? {\n 'x-jsf-errorMessage': {\n maximum:\n \"The proposed termination date must be before the employee's start date.\",\n },\n }\n : {}),\n },\n paid_time_off_info: {\n ...(options?.jsfModify?.fields?.paid_time_off_info as $TSFixMe),\n 'x-jsf-presentation': {\n ...(options?.jsfModify?.fields?.paid_time_off_info as $TSFixMe)?.[\n 'x-jsf-presentation'\n ],\n Component: () => {\n const CustomComponent = (\n options?.jsfModify?.fields?.paid_time_off_info as $TSFixMe\n )?.['x-jsf-presentation']?.Component;\n\n return (\n <PaidTimeOffContainer\n employeeName={employment?.basic_information?.name as string}\n proposedTerminationDate={formValues.proposed_termination_date}\n employmentId={employmentId}\n employment={employment}\n render={(props) => {\n if (CustomComponent) {\n return <CustomComponent {...props} />;\n }\n return <PaidTimeOff {...props} />;\n }}\n />\n );\n },\n },\n },\n acknowledge_termination_procedure_info: {\n ...(options?.jsfModify?.fields\n ?.acknowledge_termination_procedure_info as $TSFixMe),\n 'x-jsf-presentation': {\n ...(\n options?.jsfModify?.fields\n ?.acknowledge_termination_procedure_info as $TSFixMe\n )?.['x-jsf-presentation'],\n Component: () => {\n const CustomComponent = (\n options?.jsfModify?.fields\n ?.acknowledge_termination_procedure_info as $TSFixMe\n )?.['x-jsf-presentation']?.Component;\n\n return (\n <AcknowledgeInformationContainer\n render={(props) => {\n if (CustomComponent) {\n return <CustomComponent {...props} />;\n }\n return <AcknowledgeInformation {...props} />;\n }}\n />\n );\n },\n },\n },\n acknowledge_termination_procedure_fees_info: {\n ...(options?.jsfModify?.fields\n ?.acknowledge_termination_procedure_fees_info as $TSFixMe),\n 'x-jsf-presentation': {\n ...(\n options?.jsfModify?.fields\n ?.acknowledge_termination_procedure_fees_info as $TSFixMe\n )?.['x-jsf-presentation'],\n Component: () => {\n const zendeskIds = {\n involuntaryOffboardingServiceChargeZendeskId:\n zendeskArticles.involuntaryOffboardingServiceCharge,\n reconciliationInvoiceZendeskId:\n zendeskArticles.reconciliationInvoice,\n };\n\n const CustomComponent = (\n options?.jsfModify?.fields\n ?.acknowledge_termination_procedure_fees_info as $TSFixMe\n )?.['x-jsf-presentation']?.Component;\n\n if (CustomComponent) {\n return <CustomComponent {...zendeskIds} />;\n }\n\n return <AcknowledgeInformationFees {...zendeskIds} />;\n },\n },\n },\n },\n };\n }, [\n employment,\n employmentId,\n formValues.proposed_termination_date,\n formValues.termination_reason,\n hasFutureStartDate,\n minDate,\n options?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info,\n options?.jsfModify?.fields?.acknowledge_termination_procedure_info,\n options?.jsfModify?.fields?.paid_time_off_info,\n options?.jsfModify?.fields?.proposed_termination_date,\n options?.jsfModify?.fields?.proposed_termination_date_info,\n options?.jsfModify?.fields?.risk_assesment_info,\n options?.jsfModify?.fields?.termination_reason,\n proposedTerminationDateStatement,\n ]);\n\n const { data: terminationHeadlessForm, isLoading: isLoadingTermination } =\n useTerminationSchema({\n formValues: formValues,\n jsfModify: {\n ...options?.jsfModify,\n fields: {\n ...options?.jsfModify?.fields,\n ...customFields?.fields,\n },\n },\n step: stepState.currentStep.name,\n });\n\n const entireTerminationSchema = createHeadlessForm(jsonSchema.data.schema);\n\n const createTermination = useCreateTermination();\n const { mutateAsync } = mutationToPromise(createTermination);\n\n async function onSubmit(values: TerminationFormValues) {\n if (!employmentId) {\n throw new Error('Employment id is missing');\n }\n\n if (terminationHeadlessForm) {\n const parsedValues = (await parseFormValues(\n values,\n true,\n )) as TerminationFormValues;\n\n const { customer_informed_employee: customerInformedEmployee } =\n parsedValues;\n\n const employeeAwareness =\n customerInformedEmployee === 'yes'\n ? {\n employee_awareness: {\n date: parsedValues.customer_informed_employee_date,\n note: parsedValues.customer_informed_employee_description,\n },\n }\n : undefined;\n\n const radioFieldKeys = [\n 'agrees_to_pto_amount',\n 'confidential',\n 'customer_informed_employee',\n 'will_challenge_termination',\n ];\n\n const parsedRadioValues = await parseFormRadioValues(\n parsedValues,\n radioFieldKeys,\n );\n\n const normalizedValues = omit(\n parsedRadioValues,\n 'customer_informed_employee_date',\n 'customer_informed_employee_description',\n );\n\n const terminationDetails: TerminationDetailsParams = omitBy(\n {\n ...normalizedValues,\n ...employeeAwareness,\n },\n isNull,\n ) as unknown as TerminationDetailsParams;\n\n const files = (parsedValues.timesheet_file as $TSFixMe) ?? [];\n const timesheetFile =\n Array.isArray(files) && files.length > 0\n ? { content: files[0].content, name: files[0].name }\n : undefined;\n\n const terminationPayload: CreateOffboardingParams = {\n employment_id: employmentId,\n termination_details: {\n ...terminationDetails,\n timesheet_file: timesheetFile ? timesheetFile : undefined,\n },\n type: 'termination',\n };\n\n return mutateAsync(terminationPayload);\n }\n\n return;\n }\n\n function back() {\n previousStep();\n }\n\n function next() {\n nextStep();\n }\n\n const isDirty = Boolean(Object.keys(fieldValues).length > 0);\n\n const parseFormValues = async (\n values: TerminationFormValues,\n includeAllFields: boolean = false,\n ): Promise<\n | EmployeeCommunicationFormValues\n | TerminationDetailsFormValues\n | PaidTimeOffFormValues\n | TerminationFormValues\n > => {\n if (includeAllFields) {\n return (await parseJSFToValidate(values, entireTerminationSchema.fields, {\n isPartialValidation: true,\n })) as TerminationFormValues;\n }\n\n if (terminationHeadlessForm) {\n return (await parseJSFToValidate(\n values,\n terminationHeadlessForm?.fields,\n {\n isPartialValidation: true,\n },\n )) as\n | EmployeeCommunicationFormValues\n | TerminationDetailsFormValues\n | PaidTimeOffFormValues;\n }\n return {} as $TSFixMe;\n };\n\n return {\n /**\n * Employment id passed useful to be used between components\n */\n employmentId,\n /**\n * Employment data\n */\n employment,\n\n /**\n * Current form field values, we use formValues to let the user know about all the current form values\n */\n fieldValues: formValues,\n\n /**\n * Indicates if the form is dirty\n */\n isDirty,\n /**\n * Current step state containing the current step and total number of steps\n */\n stepState,\n /**\n * Array of form fields from the contract amendment schema\n */\n fields: terminationHeadlessForm?.fields || [],\n /**\n * Loading state indicating if the termination schema is being fetched\n */\n isLoading: isLoadingTermination || isLoadingEmployment,\n /**\n * Loading state indicating if a contract amendment mutation is in progress\n */\n isSubmitting: createTermination.isPending,\n /**\n * Initial form values\n */\n initialValues: initialValues,\n /**\n * Function to validate form values against the contract amendment schema\n * @param values - Form values to validate\n * @returns Validation result or null if no schema is available\n */\n handleValidation: async (values: TerminationFormValues) => {\n if (terminationHeadlessForm) {\n const parsedValues = await parseJSFToValidate(\n values,\n terminationHeadlessForm?.fields,\n );\n return terminationHeadlessForm?.handleValidation(parsedValues);\n }\n return null;\n },\n /**\n * Function to update the current form field values\n * @param values - New form values to set\n */\n checkFieldUpdates: setFieldValues,\n /**\n * Function to parse form values before submission\n * @param values - Form values to parse\n * @returns Parsed form values\n */\n parseFormValues,\n /**\n * Function to handle form submission\n * @param values - Form values to submit\n * @returns Promise resolving to the mutation result\n */\n onSubmit,\n\n /**\n * Function to handle going back to the previous step\n * @returns {void}\n */\n back,\n\n /**\n * Function to handle going to the next step\n * @returns {void}\n */\n next,\n };\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { getIndexEorPayrollCalendar } from '@/src/client';\nimport { useClient } from '@/src/context';\nimport { Client } from '@/src/client/client';\n\nexport const usePayrollCalendars = ({\n query,\n options,\n}: {\n query?: {\n year?: string;\n countryCode?: string;\n };\n options?: {\n enabled?: boolean;\n };\n}) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['payroll-calendars'],\n queryFn: () =>\n getIndexEorPayrollCalendar({\n client: client as Client,\n query: {\n year: query?.year,\n country_code: query?.countryCode,\n },\n }),\n enabled: options?.enabled,\n select: (data) => data.data?.data?.payroll_calendars?.[0],\n });\n};\n","import { isFuture, isToday, parseISO } from 'date-fns';\n\nexport const isInProbationPeriod = (probationEndDate: string | undefined) => {\n if (!probationEndDate) return false;\n\n const parsedProbationEndDate = parseISO(probationEndDate);\n\n return isFuture(parsedProbationEndDate) || isToday(parsedProbationEndDate);\n};\n"],"mappings":"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","names":["omitBy","isNull","format","isFuture","parseISO","subDays","useMemo","omit","useQuery","usePayrollCalendars","__name","query","options","client","useClient","useQuery","getIndexEorPayrollCalendar","data","isFuture","isToday","parseISO","isInProbationPeriod","__name","probationEndDate","parsedProbationEndDate","parseISO","isFuture","isToday","Fragment","jsx","jsxs","useTermination","__name","employmentId","options","terminationInitialValues","fieldValues","setFieldValues","stepState","previousStep","nextStep","useStepState","STEPS","employment","isLoadingEmployment","useEmploymentQuery","payrollCalendars","usePayrollCalendars","isEmployeeInProbationPeriod","isInProbationPeriod","minTerminationDate","calculateMinTerminationDate","minDate","useMemo","format","hasFutureStartDate","isFuture","parseISO","employmentValues","initialValues","buildInitialValues","formValues","proposedTerminationDateStatement","calculateProposedTerminationDateStatement","customFields","originalTerminationReasonOptions","terminationDetailsSchema","terminationReasonOptions","option","createInformationField","ZendeskTriggerButton","zendeskArticles","cn","subDays","CustomComponent","PaidTimeOffContainer","props","PaidTimeOff","AcknowledgeInformationContainer","AcknowledgeInformation","zendeskIds","AcknowledgeInformationFees","terminationHeadlessForm","isLoadingTermination","useTerminationSchema","entireTerminationSchema","createHeadlessForm","jsonSchema","createTermination","useCreateTermination","mutateAsync","mutationToPromise","onSubmit","values","parsedValues","parseFormValues","customerInformedEmployee","employeeAwareness","parsedRadioValues","parseFormRadioValues","normalizedValues","omit","terminationDetails","omitBy","isNull","files","timesheetFile","terminationPayload","back","next","isDirty","includeAllFields","parseJSFToValidate"]}
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-GCWEOZBS.js";import{a}from"./chunk-P37U34EQ.js";import{cva as n}from"class-variance-authority";import{jsx as i}from"react/jsx-runtime";var o=n("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-card bg-warning border-warning-border [&>svg]:text-current"}},defaultVariants:{variant:"default"}});function c({className:t,variant:r,...s}){return i("div",{"data-slot":"alert",role:"alert",className:e(o({variant:r}),t),...s})}a(c,"Alert");function g({className:t,...r}){return i("div",{"data-slot":"alert-title",className:e("col-start-2 min-h-4 font-medium tracking-tight",t),...r})}a(g,"AlertTitle");function p({className:t,...r}){return i("div",{"data-slot":"alert-description",className:e("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed inline-block",t),...r})}a(p,"AlertDescription");export{c as a,g as b,p as c};
2
- //# sourceMappingURL=chunk-FJPY27YJ.js.map
1
+ import{a as e}from"./chunk-J63QA2JC.js";import{a}from"./chunk-P37U34EQ.js";import{cva as n}from"class-variance-authority";import{jsx as i}from"react/jsx-runtime";var o=n("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-card bg-warning border-warning-border [&>svg]:text-current"}},defaultVariants:{variant:"default"}});function c({className:t,variant:r,...s}){return i("div",{"data-slot":"alert",role:"alert",className:e(o({variant:r}),t),...s})}a(c,"Alert");function g({className:t,...r}){return i("div",{"data-slot":"alert-title",className:e("col-start-2 min-h-4 font-medium tracking-tight",t),...r})}a(g,"AlertTitle");function p({className:t,...r}){return i("div",{"data-slot":"alert-description",className:e("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed inline-block",t),...r})}a(p,"AlertDescription");export{c as a,g as b,p as c};
2
+ //# sourceMappingURL=chunk-6MJ5MIUI.js.map
@@ -1,2 +1,2 @@
1
- import{a as f}from"./chunk-UXUZA7XH.js";import{a as s}from"./chunk-3UAJX23Y.js";import{a as m}from"./chunk-KRJETP7I.js";import{a}from"./chunk-NCELDZXG.js";import{a as i}from"./chunk-W7YC2IO2.js";import{a as c}from"./chunk-Z7WBY27D.js";import{a as S}from"./chunk-YIMWF5GR.js";import{a as n}from"./chunk-UHO6CCVA.js";import{a as p}from"./chunk-GBETAH3G.js";import{a as r}from"./chunk-PGWKJ6FK.js";import{c as e}from"./chunk-RLRSNB77.js";import{a as t}from"./chunk-P37U34EQ.js";import{useId as D,useState as P}from"react";import{jsx as R}from"react/jsx-runtime";var L=t(({employmentId:d,companyId:u,countryCode:b,type:l="employee",externalId:v,skipSteps:g,initialValues:B,render:I,options:O})=>{let w=D(),o=e({companyId:u,countryCode:b,employmentId:d,type:l,options:O,skipSteps:g,externalId:v,initialValues:B}),[C,h]=P({showReserveInvoice:!1,showInviteSuccessful:!1});return R(r.Provider,{value:{formId:w,onboardingBag:o,creditScore:C,setCreditScore:h},children:I({onboardingBag:o,components:{BasicInformationStep:n,ContractDetailsStep:s,BenefitsStep:p,SubmitButton:i,SaveDraftButton:S,BackButton:m,OnboardingInvite:a,SelectCountryStep:f,ReviewStep:c}})})},"OnboardingFlow");export{L as a};
2
- //# sourceMappingURL=chunk-7QP5TRMH.js.map
1
+ import{a as f}from"./chunk-LGIHVJA5.js";import{a as s}from"./chunk-64D4GLTO.js";import{a as m}from"./chunk-KRJETP7I.js";import{a}from"./chunk-C36DEJTU.js";import{a as i}from"./chunk-W7YC2IO2.js";import{a as c}from"./chunk-Z7WBY27D.js";import{a as S}from"./chunk-YIMWF5GR.js";import{a as n}from"./chunk-ZWO4HX27.js";import{a as p}from"./chunk-QLB4FSLX.js";import{a as r}from"./chunk-PGWKJ6FK.js";import{c as e}from"./chunk-3KD533T6.js";import{a as t}from"./chunk-P37U34EQ.js";import{useId as D,useState as P}from"react";import{jsx as R}from"react/jsx-runtime";var L=t(({employmentId:d,companyId:u,countryCode:b,type:l="employee",externalId:v,skipSteps:g,initialValues:B,render:I,options:O})=>{let w=D(),o=e({companyId:u,countryCode:b,employmentId:d,type:l,options:O,skipSteps:g,externalId:v,initialValues:B}),[C,h]=P({showReserveInvoice:!1,showInviteSuccessful:!1});return R(r.Provider,{value:{formId:w,onboardingBag:o,creditScore:C,setCreditScore:h},children:I({onboardingBag:o,components:{BasicInformationStep:n,ContractDetailsStep:s,BenefitsStep:p,SubmitButton:i,SaveDraftButton:S,BackButton:m,OnboardingInvite:a,SelectCountryStep:f,ReviewStep:c}})})},"OnboardingFlow");export{L as a};
2
+ //# sourceMappingURL=chunk-6SVKW2DC.js.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-GCWEOZBS.js";import{a as n}from"./chunk-P37U34EQ.js";import{Fragment as s,jsx as o,jsxs as t}from"react/jsx-runtime";var a=[{label:"Misconduct",description:"The employee is being dismissed due to unacceptable or improper behavior."},{label:"Performance",description:"When dismissing an employee for poor performance, employers are required by law to do so fairly. This means giving the employee reasonable opportunity to improve their performance prior to termination."},{label:"Workforce reduction",description:"The employee\u2019s position is being made redundant, and a layoff is underway."},{label:"Values",description:"The employee is misaligned with the company\u2019s values."},{label:"Compliance issue",description:"Use this option if the employee violated key policies, processes or procedures. For example, they failed to comply with their employment agreement\u2019s confidentiality clause."},{label:"Incapacity to perform inherent duties",description:"Use this option if the employee is physically or mentally unable to fulfill the work requirements of their role."},{label:"Mutual agreement",description:"Employee and employer made a mutual decision to end the relationship."},{label:"Decision to cancel hiring before the employee started",description:"Use this option only if the employee has not started work yet."},{label:"Job abandonment",description:"The employee has failed to appear for work; the Employer has been unsuccessful in establishing communications with the employee and does not know the employee\u2019s whereabouts."},{label:"Dissatisfaction with EOR service",description:t("span",{children:["We\u2019re sorry to see you go. If there is anything we can do to improve or if there is any remaining feedback you want to give us, please reach out to"," ",o("a",{href:"mailto:help@remote.com",target:"_blank",rel:"noopener noreferrer",children:"help@remote.com"}),"."]})},{label:"End of fixed-term contract",description:"Use this option when the employee fixed-term contract is coming to an end and will not be renewed or extended."}],r=n(()=>t(s,{children:[t("h3",{className:e("RemoteFlows__TerminationReasonsDetailContent__Title"),children:[" ","Why is this important?"]}),o("p",{className:e("RemoteFlows__TerminationReasonsDetailContent__Description"),children:"We're here to help you follow all applicable labor laws when terminating an employee. Here are all the legal reasons for termination. Please read them to make sure you enter the correct reason in the platform."}),o("h4",{className:e("RemoteFlows__TerminationReasonsDetailContent__Subtitle"),children:"Termination Reasons"}),o("ul",{className:e("RemoteFlows__TerminationReasonsDetailContent__List list-disc list-inside"),children:a.map(i=>t("li",{className:e("RemoteFlows__TerminationReasonsDetailContent__ListItem"),children:[o("span",{className:e("RemoteFlows__TerminationReasonsDetailContent__ListItemLabel"),children:i.label}),o("span",{className:e("RemoteFlows__TerminationReasonsDetailContent__ListItemDescription"),children:i.description})]},i.label))})]}),"TerminationReasonsDetailContent");export{r as a};
2
- //# sourceMappingURL=chunk-XIEA775Q.js.map
1
+ import{a as e}from"./chunk-J63QA2JC.js";import{a as n}from"./chunk-P37U34EQ.js";import{Fragment as s,jsx as o,jsxs as t}from"react/jsx-runtime";var a=[{label:"Misconduct",description:"The employee is being dismissed due to unacceptable or improper behavior."},{label:"Performance",description:"When dismissing an employee for poor performance, employers are required by law to do so fairly. This means giving the employee reasonable opportunity to improve their performance prior to termination."},{label:"Workforce reduction",description:"The employee\u2019s position is being made redundant, and a layoff is underway."},{label:"Values",description:"The employee is misaligned with the company\u2019s values."},{label:"Compliance issue",description:"Use this option if the employee violated key policies, processes or procedures. For example, they failed to comply with their employment agreement\u2019s confidentiality clause."},{label:"Incapacity to perform inherent duties",description:"Use this option if the employee is physically or mentally unable to fulfill the work requirements of their role."},{label:"Mutual agreement",description:"Employee and employer made a mutual decision to end the relationship."},{label:"Decision to cancel hiring before the employee started",description:"Use this option only if the employee has not started work yet."},{label:"Job abandonment",description:"The employee has failed to appear for work; the Employer has been unsuccessful in establishing communications with the employee and does not know the employee\u2019s whereabouts."},{label:"Dissatisfaction with EOR service",description:t("span",{children:["We\u2019re sorry to see you go. If there is anything we can do to improve or if there is any remaining feedback you want to give us, please reach out to"," ",o("a",{href:"mailto:help@remote.com",target:"_blank",rel:"noopener noreferrer",children:"help@remote.com"}),"."]})},{label:"End of fixed-term contract",description:"Use this option when the employee fixed-term contract is coming to an end and will not be renewed or extended."}],r=n(()=>t(s,{children:[t("h3",{className:e("RemoteFlows__TerminationReasonsDetailContent__Title"),children:[" ","Why is this important?"]}),o("p",{className:e("RemoteFlows__TerminationReasonsDetailContent__Description"),children:"We're here to help you follow all applicable labor laws when terminating an employee. Here are all the legal reasons for termination. Please read them to make sure you enter the correct reason in the platform."}),o("h4",{className:e("RemoteFlows__TerminationReasonsDetailContent__Subtitle"),children:"Termination Reasons"}),o("ul",{className:e("RemoteFlows__TerminationReasonsDetailContent__List list-disc list-inside"),children:a.map(i=>t("li",{className:e("RemoteFlows__TerminationReasonsDetailContent__ListItem"),children:[o("span",{className:e("RemoteFlows__TerminationReasonsDetailContent__ListItemLabel"),children:i.label}),o("span",{className:e("RemoteFlows__TerminationReasonsDetailContent__ListItemDescription"),children:i.description})]},i.label))})]}),"TerminationReasonsDetailContent");export{r as a};
2
+ //# sourceMappingURL=chunk-7EMWT6EU.js.map
@@ -1,2 +1,2 @@
1
- import{a as _,b as g}from"./chunk-HBPFTEHZ.js";import{a as F}from"./chunk-EYHFPHIA.js";import{g as S}from"./chunk-T7O3YYOG.js";import{b as T}from"./chunk-CEM3JUSV.js";import{c}from"./chunk-3QNS3IZB.js";import{e as m}from"./chunk-GCWEOZBS.js";import{a as i}from"./chunk-P37U34EQ.js";import{Fragment as x}from"react";var d={..._,fieldset:g,"fieldset-flat":g};import{useEffect as P}from"react";import{Fragment as R,jsx as p,jsxs as h}from"react/jsx-runtime";var C=i(({name:e,description:a,helpCenter:n})=>h("span",{children:[p("span",{className:`text-xs RemoteFlows__ForcedValue__Description__${e}`,dangerouslySetInnerHTML:{__html:m(a)}}),n?.callToAction&&n?.id&&p(T,{className:"RemoteFlows__ForcedValue__HelpCenterLink",zendeskId:n.id,children:n.callToAction})]}),"Description");function k({name:e,value:a,description:n,statement:r,label:u,helpCenter:l}){let{setValue:t}=c(),s=m(r?.description||n);return P(()=>{t(e,a)},[]),p("div",{children:r?h(R,{children:[p("p",{className:`text-sm RemoteFlows__ForcedValue__Title__${e}`,dangerouslySetInnerHTML:{__html:m(r?.title||u)}}),p(C,{name:e,description:m(r?.description||n),helpCenter:l})]}):p(C,{name:e,description:s,helpCenter:l})})}i(k,"ForcedValueField");import{Fragment as M,jsx as o,jsxs as y}from"react/jsx-runtime";function J(e){return e.const!==void 0&&e.const===e.default&&e.inputType!=="checkbox"&&e.inputType!=="hidden"}i(J,"checkFieldHasForcedValue");var G=i(({fields:e,fieldsets:a,fieldValues:n,components:r})=>{let{setValue:u}=c();if(!e||e.length===0)return null;let l=a&&n?S({fields:e,fieldsets:a,values:n}):e;return o(M,{children:l.map(t=>{if(t.calculateDynamicProperties&&(t={...t,...t.calculateDynamicProperties(n,t)||{}}),t.isVisible===!1||t.deprecated||t.hidden)return null;if(J(t))return o(k,{name:t.name,description:t.description,value:t.const,statement:t.statement,label:t.label,helpCenter:t.meta?.helpCenter},t.name);if(t.Component){let{Component:b}=t;return y(x,{children:[o(b,{setValue:V=>u(t.name,V),...t}),t.statement?o(F,{...t.statement}):null,t.extra?t.extra:null]},t.name)}let s=d[t.inputType];return s?t.inputType==="fieldset"?o(s,{...t,components:r},t.name):t.inputType==="fieldset-flat"?o(s,{...t,components:r,isFlatFieldset:!0},t.name):(t.inputType==="select"&&t.multiple&&(s=d["multi-select"]),y(x,{children:[o(s,{...t,component:r&&r[t.inputType]}),t.statement?o(F,{...t.statement}):null,t.extra?t.extra:null]},t.name)):y("p",{className:"error",children:["Field type ",t.inputType," not supported"]})})})},"JSONSchemaFormFields");export{G as a};
2
- //# sourceMappingURL=chunk-CEHS4AFO.js.map
1
+ import{a as _,b as g}from"./chunk-3LZR4D3V.js";import{a as F}from"./chunk-UAACHXXX.js";import{g as S}from"./chunk-T7O3YYOG.js";import{b as T}from"./chunk-BDJLITVT.js";import{c}from"./chunk-H5CNWMEM.js";import{e as m}from"./chunk-J63QA2JC.js";import{a as i}from"./chunk-P37U34EQ.js";import{Fragment as x}from"react";var d={..._,fieldset:g,"fieldset-flat":g};import{useEffect as P}from"react";import{Fragment as R,jsx as p,jsxs as h}from"react/jsx-runtime";var C=i(({name:e,description:a,helpCenter:n})=>h("span",{children:[p("span",{className:`text-xs RemoteFlows__ForcedValue__Description__${e}`,dangerouslySetInnerHTML:{__html:m(a)}}),n?.callToAction&&n?.id&&p(T,{className:"RemoteFlows__ForcedValue__HelpCenterLink",zendeskId:n.id,children:n.callToAction})]}),"Description");function k({name:e,value:a,description:n,statement:r,label:u,helpCenter:l}){let{setValue:t}=c(),s=m(r?.description||n);return P(()=>{t(e,a)},[]),p("div",{children:r?h(R,{children:[p("p",{className:`text-sm RemoteFlows__ForcedValue__Title__${e}`,dangerouslySetInnerHTML:{__html:m(r?.title||u)}}),p(C,{name:e,description:m(r?.description||n),helpCenter:l})]}):p(C,{name:e,description:s,helpCenter:l})})}i(k,"ForcedValueField");import{Fragment as M,jsx as o,jsxs as y}from"react/jsx-runtime";function J(e){return e.const!==void 0&&e.const===e.default&&e.inputType!=="checkbox"&&e.inputType!=="hidden"}i(J,"checkFieldHasForcedValue");var G=i(({fields:e,fieldsets:a,fieldValues:n,components:r})=>{let{setValue:u}=c();if(!e||e.length===0)return null;let l=a&&n?S({fields:e,fieldsets:a,values:n}):e;return o(M,{children:l.map(t=>{if(t.calculateDynamicProperties&&(t={...t,...t.calculateDynamicProperties(n,t)||{}}),t.isVisible===!1||t.deprecated||t.hidden)return null;if(J(t))return o(k,{name:t.name,description:t.description,value:t.const,statement:t.statement,label:t.label,helpCenter:t.meta?.helpCenter},t.name);if(t.Component){let{Component:b}=t;return y(x,{children:[o(b,{setValue:V=>u(t.name,V),...t}),t.statement?o(F,{...t.statement}):null,t.extra?t.extra:null]},t.name)}let s=d[t.inputType];return s?t.inputType==="fieldset"?o(s,{...t,components:r},t.name):t.inputType==="fieldset-flat"?o(s,{...t,components:r,isFlatFieldset:!0},t.name):(t.inputType==="select"&&t.multiple&&(s=d["multi-select"]),y(x,{children:[o(s,{...t,component:r&&r[t.inputType]}),t.statement?o(F,{...t.statement}):null,t.extra?t.extra:null]},t.name)):y("p",{className:"error",children:["Field type ",t.inputType," not supported"]})})})},"JSONSchemaFormFields");export{G as a};
2
+ //# sourceMappingURL=chunk-7G4JI6ZU.js.map
@@ -1,2 +1,2 @@
1
- import{e as a}from"./chunk-T7O3YYOG.js";import{f as n,g as m}from"./chunk-3QNS3IZB.js";import{b as i}from"./chunk-TVZAFTPT.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function R({onSubmit:d,onError:c,onSuccess:l}){let{contractAmendment:{stepState:u,isSubmitting:f,onSubmit:C,fields:p},formId:A}=i(),e=n({defaultValues:u.values?.form}),F=o(async r=>{let S=await a(r,p,{isPartialValidation:!1});await d?.(S);let t=await C(r);t.error?c?.(t.error):await l?.(t.data)},"handleSubmit");return f?null:s(m,{...e,children:s("form",{id:A,onSubmit:e.handleSubmit(F),className:"RemoteFlows__ContractAmendmentConfirmationForm"})})}o(R,"ContractAmendmentConfirmationForm");export{R as a};
2
- //# sourceMappingURL=chunk-WHROCBHG.js.map
1
+ import{e as a}from"./chunk-T7O3YYOG.js";import{f as n,g as m}from"./chunk-H5CNWMEM.js";import{b as i}from"./chunk-TVZAFTPT.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function R({onSubmit:d,onError:c,onSuccess:l}){let{contractAmendment:{stepState:u,isSubmitting:f,onSubmit:C,fields:p},formId:A}=i(),e=n({defaultValues:u.values?.form}),F=o(async r=>{let S=await a(r,p,{isPartialValidation:!1});await d?.(S);let t=await C(r);t.error?c?.(t.error):await l?.(t.data)},"handleSubmit");return f?null:s(m,{...e,children:s("form",{id:A,onSubmit:e.handleSubmit(F),className:"RemoteFlows__ContractAmendmentConfirmationForm"})})}o(R,"ContractAmendmentConfirmationForm");export{R as a};
2
+ //# sourceMappingURL=chunk-7V3YVPIK.js.map
@@ -1,2 +1,2 @@
1
- import{b as a}from"./chunk-H2OBH7SK.js";import{a as r}from"./chunk-P37U34EQ.js";import{useState as l}from"react";import{Document as b,Page as h,pdfjs as p}from"react-pdf";import{jsx as e,jsxs as o}from"react/jsx-runtime";p.GlobalWorkerOptions.workerSrc=`//unpkg.com/pdfjs-dist@${p.version}/build/pdf.worker.min.mjs`;function L({base64Data:s,fileName:m="document.pdf"}){let[n,g]=l(0),[i,c]=l(1),[f,u]=l(!0),[d,v]=l(""),x=r(({numPages:t})=>{g(t),u(!1),v("")},"onDocumentLoadSuccess"),P=r(t=>{console.error("Error loading PDF:",t),v("Failed to load PDF document"),u(!1)},"onDocumentLoadError"),N=r(()=>{c(t=>Math.max(1,t-1))},"goToPrevPage"),w=r(()=>{c(t=>Math.min(n,t+1))},"goToNextPage");return s?o("div",{className:"w-full space-y-4",children:[o("div",{children:[o("div",{className:"flex justify-center items-center min-h-[600px] p-4 bg-gray-50",children:[f&&o("div",{className:"text-center",children:[e("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-gray-900 mx-auto mb-4"}),e("p",{className:"text-gray-600",children:"Loading PDF..."})]}),d&&o("div",{className:"text-center space-y-4",children:[e("p",{className:"text-red-600",children:d}),e(a,{asChild:!0,children:e("a",{href:s,download:m,children:"Download PDF Instead"})})]}),!d&&e(b,{file:s,onLoadSuccess:x,onLoadError:P,loading:"",className:"flex flex-col items-center",children:e(h,{pageNumber:i,renderTextLayer:!0,renderAnnotationLayer:!0,className:"shadow-lg",width:Math.min(window.innerWidth-100,800)})})]}),n>0&&!d&&e("div",{className:"border-t bg-white px-4 py-3",children:o("div",{className:"flex items-center justify-between",children:[e(a,{onClick:N,disabled:i<=1,variant:"outline",size:"sm",children:"\u2190 Previous"}),o("div",{className:"text-sm text-gray-600",children:["Page ",i," of ",n]}),e(a,{onClick:w,disabled:i>=n,variant:"outline",size:"sm",children:"Next \u2192"})]})})]}),o("div",{className:"flex justify-between items-center text-sm",children:[e("p",{className:"text-gray-600",children:m}),e(a,{variant:"link",size:"link",asChild:!0,children:o("a",{href:s,download:m,className:"flex items-center gap-1",children:[e("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Download PDF"]})})]})]}):e("div",{className:"w-full border rounded p-8 text-center bg-gray-50",children:e("p",{className:"text-gray-500",children:"No PDF data available"})})}r(L,"PDFPreviewDefault");export{L as a};
2
- //# sourceMappingURL=chunk-C4NXXY3X.js.map
1
+ import{b as a}from"./chunk-YUYHK6WD.js";import{a as r}from"./chunk-P37U34EQ.js";import{useState as l}from"react";import{Document as b,Page as h,pdfjs as p}from"react-pdf";import{jsx as e,jsxs as o}from"react/jsx-runtime";p.GlobalWorkerOptions.workerSrc=`//unpkg.com/pdfjs-dist@${p.version}/build/pdf.worker.min.mjs`;function L({base64Data:s,fileName:m="document.pdf"}){let[n,g]=l(0),[i,c]=l(1),[f,u]=l(!0),[d,v]=l(""),x=r(({numPages:t})=>{g(t),u(!1),v("")},"onDocumentLoadSuccess"),P=r(t=>{console.error("Error loading PDF:",t),v("Failed to load PDF document"),u(!1)},"onDocumentLoadError"),N=r(()=>{c(t=>Math.max(1,t-1))},"goToPrevPage"),w=r(()=>{c(t=>Math.min(n,t+1))},"goToNextPage");return s?o("div",{className:"w-full space-y-4",children:[o("div",{children:[o("div",{className:"flex justify-center items-center min-h-[600px] p-4 bg-gray-50",children:[f&&o("div",{className:"text-center",children:[e("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-gray-900 mx-auto mb-4"}),e("p",{className:"text-gray-600",children:"Loading PDF..."})]}),d&&o("div",{className:"text-center space-y-4",children:[e("p",{className:"text-red-600",children:d}),e(a,{asChild:!0,children:e("a",{href:s,download:m,children:"Download PDF Instead"})})]}),!d&&e(b,{file:s,onLoadSuccess:x,onLoadError:P,loading:"",className:"flex flex-col items-center",children:e(h,{pageNumber:i,renderTextLayer:!0,renderAnnotationLayer:!0,className:"shadow-lg",width:Math.min(window.innerWidth-100,800)})})]}),n>0&&!d&&e("div",{className:"border-t bg-white px-4 py-3",children:o("div",{className:"flex items-center justify-between",children:[e(a,{onClick:N,disabled:i<=1,variant:"outline",size:"sm",children:"\u2190 Previous"}),o("div",{className:"text-sm text-gray-600",children:["Page ",i," of ",n]}),e(a,{onClick:w,disabled:i>=n,variant:"outline",size:"sm",children:"Next \u2192"})]})})]}),o("div",{className:"flex justify-between items-center text-sm",children:[e("p",{className:"text-gray-600",children:m}),e(a,{variant:"link",size:"link",asChild:!0,children:o("a",{href:s,download:m,className:"flex items-center gap-1",children:[e("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Download PDF"]})})]})]}):e("div",{className:"w-full border rounded p-8 text-center bg-gray-50",children:e("p",{className:"text-gray-500",children:"No PDF data available"})})}r(L,"PDFPreviewDefault");export{L as a};
2
+ //# sourceMappingURL=chunk-A3TXUJUO.js.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-GCWEOZBS.js";import{a as e}from"./chunk-P37U34EQ.js";import{Slot as i}from"@radix-ui/react-slot";import{cva as d}from"class-variance-authority";import{jsx as u}from"react/jsx-runtime";var s=d("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-badge text-badge-foreground rounded-full [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground rounded-full [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white rounded-full [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",outline:"text-foreground rounded-full [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function g({className:t,variant:a,asChild:o=!1,...n}){return u(o?i:"span",{"data-slot":"badge",className:r(s({variant:a}),t),...n})}e(g,"Badge");export{s as a,g as b};
2
- //# sourceMappingURL=chunk-PGRQG254.js.map
1
+ import{a as r}from"./chunk-J63QA2JC.js";import{a as e}from"./chunk-P37U34EQ.js";import{Slot as i}from"@radix-ui/react-slot";import{cva as d}from"class-variance-authority";import{jsx as u}from"react/jsx-runtime";var s=d("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-badge text-badge-foreground rounded-full [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground rounded-full [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white rounded-full [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",outline:"text-foreground rounded-full [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function g({className:t,variant:a,asChild:o=!1,...n}){return u(o?i:"span",{"data-slot":"badge",className:r(s({variant:a}),t),...n})}e(g,"Badge");export{s as a,g as b};
2
+ //# sourceMappingURL=chunk-AU376LE2.js.map
@@ -0,0 +1,2 @@
1
+ import{h as g}from"./chunk-PJ6ZEFWD.js";import{a as m,f as u}from"./chunk-J63QA2JC.js";import{b as f,d as b}from"./chunk-KQPDXXG3.js";import{a as e}from"./chunk-P37U34EQ.js";var P={disclaimerCostCalculator:4668194326797,engagingContractors:43161434169613,employeeOnboardingTimeline:4411262104589,extraPayments:4466822781709,internationalPricing:4410698586893,pricingPlanOptions:43161720465421,ir35Status:42810224523917,remoteFxRate:33271144977421,terminationEmployeeCommunication:4411585179661,terminationNoticePeriods:5831900985613,involuntaryOffboardingServiceCharge:4406932229133,reconciliationInvoice:17604014808589},l=e(r=>`https://support.remote.com/hc/en-us/articles/${r}`,"buildZendeskURL");import{useQuery as y}from"@tanstack/react-query";var k=e((r,t)=>{let{client:i}=b();return y({queryKey:["zendesk-article",r],queryFn:e(async()=>{let n=await g({client:i,path:{id:Number(r)}});if(n.error)throw new Error(n.error.message||"Failed to fetch article");return n},"queryFn"),select:e(n=>{let o=n.data?.data.help_center_article;return o&&{...o,body:u(o.body||"")}},"select"),retry:!1,...t})},"useZendeskArticle");import{jsx as R}from"react/jsx-runtime";var C=e(({Trigger:r,zendeskId:t,open:i,onClose:n})=>{let{components:o}=f(),c=l(t),s=e(()=>{n?.()},"handleClose"),{data:a,isLoading:h,error:w}=k(t,{enabled:i}),p=o?.zendeskDrawer;if(!p)throw new Error("Zendesk drawer component not found");return R(p,{open:i,onClose:s,data:a,isLoading:h,error:w,zendeskURL:c,Trigger:r})},"ZendeskDrawer");import{useState as x}from"react";import{jsx as d}from"react/jsx-runtime";var Z="RemoteFlows__ZendeskTriggerButton text-blue-500 hover:underline inline-block text-xs bg-transparent border-none cursor-pointer p-0";function Q({zendeskId:r,className:t,onClick:i,children:n,external:o=!1}){let[c,s]=x(!1),a=e(()=>{o||s(!0),i?.(r)},"handleClick");return o?d("a",{href:l(r),target:"_blank",rel:"noopener noreferrer",onClick:a,className:m(Z,t),children:n}):d(C,{zendeskId:r,open:c,onClose:()=>s(!1),Trigger:d("button",{onClick:a,className:m(Z,t),children:n})})}e(Q,"ZendeskTriggerButton");export{P as a,Q as b};
2
+ //# sourceMappingURL=chunk-BDJLITVT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/shared/zendesk-drawer/utils.ts","../src/components/shared/zendesk-drawer/api.ts","../src/components/shared/zendesk-drawer/ZendeskDrawer.tsx","../src/components/shared/zendesk-drawer/ZendeskTriggerButton.tsx"],"sourcesContent":["export const zendeskArticles = {\n /**\n * Disclaimer for Cost Calculator\n * Access: Private (Need Remote account to access)\n * https://support.remote.com/hc/en-us/articles/4668194326797\n */\n disclaimerCostCalculator: 4668194326797,\n /**\n * Guide for engaging contractors\n * Access: private (Need Remote account to access)\n * https://support.remote.com/hc/en-us/articles/43161434169613\n */\n engagingContractors: 43161434169613,\n /**\n * Employee Onboarding Timeline\n * Access: Private (Need Remote account to access)\n * https://support.remote.com/hc/en-us/articles/4411262104589\n */\n employeeOnboardingTimeline: 4411262104589,\n /**\n * Extra Payments\n * Access: Public (Everyone can access)\n * https://support.remote.com/hc/en-us/articles/4466822781709\n */\n extraPayments: 4466822781709,\n /**\n * International Pricing\n * Access: Public (Everyone can access)\n * https://support.remote.com/hc/en-us/articles/4410698586893\n */\n internationalPricing: 4410698586893,\n /**\n * Pricing Plan Options\n * Access: Private (Need Remote account to access)\n * https://support.remote.com/hc/en-us/articles/43161720465421\n */\n pricingPlanOptions: 43161720465421,\n /**\n * IR35 Status\n * Access: Private (Need Remote account to access)\n * https://support.remote.com/hc/en-us/articles/42810224523917\n */\n ir35Status: 42810224523917,\n /**\n * Remote FX Rate\n * Access: Public (Everyone can access)\n * https://support.remote.com/hc/en-us/articles/33271144977421\n */\n remoteFxRate: 33271144977421,\n /**\n * Employee Communication for Terminations\n * Access: Public (Everyone can access)\n * https://support.remote.com/hc/en-us/articles/4411585179661\n */\n terminationEmployeeCommunication: 4411585179661,\n /**\n * Notice Period for Terminations by Country\n * Access: Public (Everyone can access)\n * https://support.remote.com/hc/en-us/articles/5831900985613\n */\n terminationNoticePeriods: 5831900985613,\n /**\n * Involuntary Offboarding Service Charge\n * Access: Private (Need Remote account to access)\n * https://support.remote.com/hc/en-us/articles/4406932229133\n */\n involuntaryOffboardingServiceCharge: 4406932229133,\n /**\n * Reconciliation Invoice\n * Access: Public (Everyone can access)\n * https://support.remote.com/hc/en-us/articles/17604014808589\n */\n reconciliationInvoice: 17604014808589,\n};\n\nexport const buildZendeskURL = (zendeskId: number) => {\n return `https://support.remote.com/hc/en-us/articles/${zendeskId}`;\n};\n","import { getShowHelpCenterArticle } from '@/src/client';\nimport { useClient } from '@/src/context';\nimport { sanitizeHtmlWithImageErrorHandling } from '@/src/lib/utils';\nimport { Client } from '@/src/client/client';\nimport { useQuery } from '@tanstack/react-query';\n\nexport const useZendeskArticle = (\n zendeskId: number | null,\n queryOptions?: { enabled?: boolean },\n) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['zendesk-article', zendeskId],\n queryFn: async () => {\n const response = await getShowHelpCenterArticle({\n client: client as Client,\n path: {\n id: Number(zendeskId),\n },\n });\n\n if (response.error) {\n throw new Error(response.error.message || 'Failed to fetch article');\n }\n\n return response;\n },\n select: (data) => {\n const article = data.data?.data.help_center_article;\n if (article) {\n return {\n ...article,\n body: sanitizeHtmlWithImageErrorHandling(article.body || ''),\n };\n }\n return article;\n },\n retry: false,\n ...queryOptions,\n });\n};\n","import { useZendeskArticle } from '@/src/components/shared/zendesk-drawer/api';\nimport { useFormFields } from '@/src/context';\nimport { buildZendeskURL } from '@/src/components/shared/zendesk-drawer/utils';\n\nexport type ZendeskDrawerProps = {\n Trigger: React.ReactElement;\n zendeskId: number;\n open: boolean;\n onClose: () => void;\n};\n\nexport const ZendeskDrawer = ({\n Trigger,\n zendeskId,\n open,\n onClose,\n}: ZendeskDrawerProps) => {\n const { components } = useFormFields();\n const zendeskURL = buildZendeskURL(zendeskId);\n\n const handleClose = () => {\n onClose?.();\n };\n\n const { data, isLoading, error } = useZendeskArticle(zendeskId, {\n enabled: open,\n });\n\n const CustomZendeskDrawer = components?.zendeskDrawer;\n\n if (!CustomZendeskDrawer) {\n throw new Error(`Zendesk drawer component not found`);\n }\n\n return (\n <CustomZendeskDrawer\n open={open}\n onClose={handleClose}\n data={data}\n isLoading={isLoading}\n error={error}\n zendeskURL={zendeskURL}\n Trigger={Trigger}\n />\n );\n};\n","import { cn } from '@/src/lib/utils';\nimport { ZendeskDrawer } from './ZendeskDrawer';\nimport { buildZendeskURL } from './utils';\nimport { useState } from 'react';\n\ninterface ZendeskTriggerButtonProps {\n /**\n * The Zendesk ID for the help article\n */\n zendeskId: number;\n /**\n * The class name for the button\n */\n className?: string;\n /**\n * The callback function to be called when the button is clicked\n */\n onClick?: (zendeskId: number) => void;\n /**\n * The children to be rendered inside the button\n */\n children?: React.ReactNode;\n /**\n * Whether to open the help article in a new tab\n */\n external?: boolean;\n}\n\nconst baseClassName =\n 'RemoteFlows__ZendeskTriggerButton text-blue-500 hover:underline inline-block text-xs bg-transparent border-none cursor-pointer p-0';\n\nexport function ZendeskTriggerButton({\n zendeskId,\n className,\n onClick,\n children,\n external = false,\n}: ZendeskTriggerButtonProps) {\n const [isOpen, setIsOpen] = useState(false);\n\n const handleClick = () => {\n if (!external) {\n setIsOpen(true);\n }\n onClick?.(zendeskId);\n };\n\n if (external) {\n return (\n <a\n href={buildZendeskURL(zendeskId)}\n target='_blank'\n rel='noopener noreferrer'\n onClick={handleClick}\n className={cn(baseClassName, className)}\n >\n {children}\n </a>\n );\n }\n\n return (\n <ZendeskDrawer\n zendeskId={zendeskId}\n open={isOpen}\n onClose={() => setIsOpen(false)}\n Trigger={\n <button onClick={handleClick} className={cn(baseClassName, className)}>\n {children}\n </button>\n }\n />\n );\n}\n"],"mappings":"8KAAO,IAAMA,EAAkB,CAM7B,yBAA0B,cAM1B,oBAAqB,eAMrB,2BAA4B,cAM5B,cAAe,cAMf,qBAAsB,cAMtB,mBAAoB,eAMpB,WAAY,eAMZ,aAAc,eAMd,iCAAkC,cAMlC,yBAA0B,cAM1B,oCAAqC,cAMrC,sBAAuB,cACzB,EAEaC,EAAkBC,EAACC,GACvB,gDAAgDA,CAAS,GADnC,mBCvE/B,OAAS,YAAAC,MAAgB,wBAElB,IAAMC,EAAoBC,EAAA,CAC/BC,EACAC,IACG,CACH,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAU,EAC7B,OAAOC,EAAS,CACd,SAAU,CAAC,kBAAmBJ,CAAS,EACvC,QAASD,EAAA,SAAY,CACnB,IAAMM,EAAW,MAAMC,EAAyB,CAC9C,OAAQJ,EACR,KAAM,CACJ,GAAI,OAAOF,CAAS,CACtB,CACF,CAAC,EAED,GAAIK,EAAS,MACX,MAAM,IAAI,MAAMA,EAAS,MAAM,SAAW,yBAAyB,EAGrE,OAAOA,CACT,EAbS,WAcT,OAAQN,EAACQ,GAAS,CAChB,IAAMC,EAAUD,EAAK,MAAM,KAAK,oBAChC,OAAIC,GACK,CACL,GAAGA,EACH,KAAMC,EAAmCD,EAAQ,MAAQ,EAAE,CAC7D,CAGJ,EATQ,UAUR,MAAO,GACP,GAAGP,CACL,CAAC,CACH,EAlCiC,qBC6B7B,cAAAS,MAAA,oBAxBG,IAAMC,EAAgBC,EAAA,CAAC,CAC5B,QAAAC,EACA,UAAAC,EACA,KAAAC,EACA,QAAAC,CACF,IAA0B,CACxB,GAAM,CAAE,WAAAC,CAAW,EAAIC,EAAc,EAC/BC,EAAaC,EAAgBN,CAAS,EAEtCO,EAAcT,EAAA,IAAM,CACxBI,IAAU,CACZ,EAFoB,eAId,CAAE,KAAAM,EAAM,UAAAC,EAAW,MAAAC,CAAM,EAAIC,EAAkBX,EAAW,CAC9D,QAASC,CACX,CAAC,EAEKW,EAAsBT,GAAY,cAExC,GAAI,CAACS,EACH,MAAM,IAAI,MAAM,oCAAoC,EAGtD,OACEhB,EAACgB,EAAA,CACC,KAAMX,EACN,QAASM,EACT,KAAMC,EACN,UAAWC,EACX,MAAOC,EACP,WAAYL,EACZ,QAASN,EACX,CAEJ,EAlC6B,iBCR7B,OAAS,YAAAc,MAAgB,QA8CnB,cAAAC,MAAA,oBArBN,IAAMC,EACJ,qIAEK,SAASC,EAAqB,CACnC,UAAAC,EACA,UAAAC,EACA,QAAAC,EACA,SAAAC,EACA,SAAAC,EAAW,EACb,EAA8B,CAC5B,GAAM,CAACC,EAAQC,CAAS,EAAIC,EAAS,EAAK,EAEpCC,EAAcC,EAAA,IAAM,CACnBL,GACHE,EAAU,EAAI,EAEhBJ,IAAUF,CAAS,CACrB,EALoB,eAOpB,OAAII,EAEAP,EAAC,KACC,KAAMa,EAAgBV,CAAS,EAC/B,OAAO,SACP,IAAI,sBACJ,QAASQ,EACT,UAAWG,EAAGb,EAAeG,CAAS,EAErC,SAAAE,EACH,EAKFN,EAACe,EAAA,CACC,UAAWZ,EACX,KAAMK,EACN,QAAS,IAAMC,EAAU,EAAK,EAC9B,QACET,EAAC,UAAO,QAASW,EAAa,UAAWG,EAAGb,EAAeG,CAAS,EACjE,SAAAE,EACH,EAEJ,CAEJ,CA1CgBM,EAAAV,EAAA","names":["zendeskArticles","buildZendeskURL","__name","zendeskId","useQuery","useZendeskArticle","__name","zendeskId","queryOptions","client","useClient","useQuery","response","getShowHelpCenterArticle","data","article","sanitizeHtmlWithImageErrorHandling","jsx","ZendeskDrawer","__name","Trigger","zendeskId","open","onClose","components","useFormFields","zendeskURL","buildZendeskURL","handleClose","data","isLoading","error","useZendeskArticle","CustomZendeskDrawer","useState","jsx","baseClassName","ZendeskTriggerButton","zendeskId","className","onClick","children","external","isOpen","setIsOpen","useState","handleClick","__name","buildZendeskURL","cn","ZendeskDrawer"]}
@@ -0,0 +1,2 @@
1
+ import{a as g}from"./chunk-Q445EJX6.js";import{a as d,b as w}from"./chunk-EAF6XPH6.js";import{a as E}from"./chunk-EUSCQL4H.js";import{e as C}from"./chunk-T7O3YYOG.js";import{J as F,d as _,u as P}from"./chunk-PJ6ZEFWD.js";import{a as h}from"./chunk-3X36ZFNP.js";import{a as j}from"./chunk-5BRMLRS7.js";import{d as c}from"./chunk-KQPDXXG3.js";import{a as e}from"./chunk-P37U34EQ.js";import{useMutation as b,useQuery as I}from"@tanstack/react-query";var B=e(({countryCode:n,employment:r,fieldValues:a,options:t})=>{let{client:u}=c(),m=t?.jsonSchemaVersion?.contract_amendments?{json_schema_version:t.jsonSchemaVersion.contract_amendments}:{};return I({queryKey:["contract-amendment-schema"],retry:!1,queryFn:e(async()=>{let o=await _({client:u,headers:{Authorization:""},query:{employment_id:r?.id,country_code:n,...m}});if(o.error||!o.data)throw new Error("Failed to fetch contract amendment schema");return o},"queryFn"),enabled:!!r,select:e(({data:o})=>{let l=o?.data||{};return E(l,a,t)},"select")})},"useContractAmendmentSchemaQuery"),J=e(n=>{let{client:r}=c(),a=n?.jsonSchemaVersion?.contract_amendments?{json_schema_version:n.jsonSchemaVersion.contract_amendments}:{};return b({mutationFn:e(t=>P({client:r,headers:{Authorization:""},body:t,query:{...a}}),"mutationFn")})},"useCreateContractAmendmentMutation"),K=e(n=>{let{client:r}=c(),a=n?.jsonSchemaVersion?.contract_amendments?{json_schema_version:n.jsonSchemaVersion.contract_amendments}:{};return b({mutationFn:e(t=>F({client:r,headers:{Authorization:""},body:t,query:{...a}}),"mutationFn")})},"useAutomatableContractAmendmentMutation"),te=e(({employmentId:n,countryCode:r,options:a})=>{let{fieldValues:t,setFieldValues:u,stepState:m,nextStep:o,previousStep:l}=j(d),{data:i,isLoading:v,isError:q,error:Q}=g({employmentId:n,queryParams:{exclude_files:!0}}),{data:s,isLoading:L,isError:M,error:T}=B({employment:i,countryCode:r,fieldValues:{...m.values?.[m.currentStep.name],...t},options:a}),k=w(i,s?.fields),S=J(a),A=K(a);async function x(p){let f=await C(p,s?.fields||[],{isPartialValidation:!1}),V={employment_id:i?.id,amendment_contract_id:i?.active_contract_id,contract_amendment:{...f}};switch(m.currentStep.name){case d.form.name:{let{mutateAsync:y}=h(A),H=await y(V);return o(),H}case d.confirmation_form.name:{let{mutateAsync:y}=h(S);return y(V)}default:throw new Error("Invalid step state")}}e(x,"onSubmit");async function z(p){if(s){let f=await C(p,s?.fields);return s?.handleValidation(f)}return null}e(z,"handleValidation");function O(){l()}return e(O,"back"),{stepState:m,fields:s?.fields||[],isLoading:v||L,isError:q||M,error:Q||T,isSubmitting:A.isPending||S.isPending,initialValues:k,values:t,handleValidation:z,checkFieldUpdates:u,onSubmit:x,back:O}},"useContractAmendment");export{te as a};
2
+ //# sourceMappingURL=chunk-BHXCYFC4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/ContractAmendment/hooks.ts"],"sourcesContent":["import { FieldValues } from 'react-hook-form';\nimport { useMutation, useQuery } from '@tanstack/react-query';\nimport {\n CreateContractAmendmentParams,\n Employment,\n getShowContractAmendmentSchema,\n postAutomatableContractAmendment,\n postCreateContractAmendment,\n} from '@/src/client';\nimport { parseJSFToValidate } from '@/src/components/form/utils';\nimport { mutationToPromise } from '@/src/lib/mutations';\nimport { Client } from '@/src/client/client';\nimport { createHeadlessForm } from '@/src/common/createHeadlessForm';\nimport { useEmploymentQuery } from '@/src/common/api/employment';\nimport { useClient } from '@/src/context';\nimport { ContractAmendmentParams } from './types';\nimport { useStepState } from '../useStepState';\nimport { buildInitialValues, STEPS } from './utils';\nimport { FlowOptions } from '@/src/flows/types';\n\ntype ContractAmendmentSchemaParams = {\n countryCode: string;\n employment: Employment | undefined;\n fieldValues: FieldValues | undefined;\n options?: ContractAmendmentParams['options'];\n};\n\nconst useContractAmendmentSchemaQuery = ({\n countryCode,\n employment,\n fieldValues,\n options,\n}: ContractAmendmentSchemaParams) => {\n const { client } = useClient();\n const jsonSchemaQueryParam = options?.jsonSchemaVersion?.contract_amendments\n ? {\n json_schema_version: options.jsonSchemaVersion.contract_amendments,\n }\n : {};\n return useQuery({\n queryKey: ['contract-amendment-schema'],\n retry: false,\n queryFn: async () => {\n const response = await getShowContractAmendmentSchema({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n query: {\n employment_id: employment?.id as string,\n country_code: countryCode,\n ...jsonSchemaQueryParam,\n },\n });\n\n // If response status is 404 or other error, throw an error to trigger isError\n if (response.error || !response.data) {\n throw new Error('Failed to fetch contract amendment schema');\n }\n\n return response;\n },\n enabled: Boolean(employment),\n select: ({ data }) => {\n const jsfSchema = data?.data || {};\n\n return createHeadlessForm(jsfSchema, fieldValues, options);\n },\n });\n};\n\nconst useCreateContractAmendmentMutation = (options?: FlowOptions) => {\n const { client } = useClient();\n const jsonSchemaQueryParam = options?.jsonSchemaVersion?.contract_amendments\n ? {\n json_schema_version: options.jsonSchemaVersion.contract_amendments,\n }\n : {};\n return useMutation({\n mutationFn: (payload: CreateContractAmendmentParams) => {\n return postCreateContractAmendment({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n body: payload,\n query: {\n ...jsonSchemaQueryParam,\n },\n });\n },\n });\n};\n\nconst useAutomatableContractAmendmentMutation = (options?: FlowOptions) => {\n const { client } = useClient();\n const jsonSchemaQueryParam = options?.jsonSchemaVersion?.contract_amendments\n ? {\n json_schema_version: options.jsonSchemaVersion.contract_amendments,\n }\n : {};\n return useMutation({\n mutationFn: (payload: CreateContractAmendmentParams) => {\n return postAutomatableContractAmendment({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n body: payload,\n query: {\n ...jsonSchemaQueryParam,\n },\n });\n },\n });\n};\n\nexport const useContractAmendment = ({\n employmentId,\n countryCode,\n options,\n}: ContractAmendmentParams) => {\n const { fieldValues, setFieldValues, stepState, nextStep, previousStep } =\n useStepState<keyof typeof STEPS>(STEPS);\n\n const {\n data: employment,\n isLoading: isLoadingEmployment,\n isError: isErrorEmployment,\n error: errorEmployment,\n } = useEmploymentQuery({\n employmentId,\n queryParams: {\n exclude_files: true,\n },\n });\n\n const {\n data: contractAmendmentHeadlessForm,\n isLoading: isLoadingContractAmendments,\n isError: isErrorContractAmendmentSchema,\n error: errorContractAmendmentSchema,\n } = useContractAmendmentSchemaQuery({\n employment,\n countryCode,\n // In case the user is navigating back to the form step, we need to\n // pass the previous field values, so that the schema can be\n // generated with the correct values.\n fieldValues: {\n ...stepState.values?.[stepState.currentStep.name], // Restore values for the current step\n ...fieldValues,\n },\n options,\n });\n\n const initialValues = buildInitialValues(\n employment,\n contractAmendmentHeadlessForm?.fields,\n );\n\n const createContractAmendmentMutation =\n useCreateContractAmendmentMutation(options);\n const automatableContractAmendmentMutation =\n useAutomatableContractAmendmentMutation(options);\n\n async function onSubmit(values: FieldValues) {\n const parsedValues = await parseJSFToValidate(\n values,\n contractAmendmentHeadlessForm?.fields || [],\n {\n isPartialValidation: false,\n },\n );\n\n const payload = {\n employment_id: employment?.id as string,\n amendment_contract_id: employment?.active_contract_id as string,\n contract_amendment: {\n ...parsedValues,\n },\n };\n\n switch (stepState.currentStep.name) {\n case STEPS.form.name: {\n const { mutateAsync } = mutationToPromise(\n automatableContractAmendmentMutation,\n );\n\n const automatableContractAmendment = await mutateAsync(payload);\n\n nextStep();\n\n return automatableContractAmendment;\n }\n case STEPS.confirmation_form.name: {\n const { mutateAsync } = mutationToPromise(\n createContractAmendmentMutation,\n );\n\n return mutateAsync(payload);\n }\n\n default:\n throw new Error('Invalid step state');\n }\n }\n\n async function handleValidation(values: FieldValues) {\n if (contractAmendmentHeadlessForm) {\n const parsedValues = await parseJSFToValidate(\n values,\n contractAmendmentHeadlessForm?.fields,\n );\n\n return contractAmendmentHeadlessForm?.handleValidation(parsedValues);\n }\n return null;\n }\n\n function back() {\n previousStep();\n }\n\n return {\n /**\n * Current step state containing the current step and total number of steps\n */\n stepState,\n /**\n * Array of form fields from the contract amendment schema\n */\n fields: contractAmendmentHeadlessForm?.fields || [],\n /**\n * Loading state indicating if either employment or contract amendment data is being fetched\n */\n isLoading: isLoadingEmployment || isLoadingContractAmendments,\n /**\n * Error state indicating if there was an error fetching either employment or contract amendment data\n */\n isError: isErrorEmployment || isErrorContractAmendmentSchema,\n /**\n * Error object containing details about any errors that occurred during data fetching\n */\n error: errorEmployment || errorContractAmendmentSchema,\n /**\n * Loading state indicating if a contract amendment mutation is in progress\n */\n isSubmitting:\n automatableContractAmendmentMutation.isPending ||\n createContractAmendmentMutation.isPending,\n /**\n * Initial form values built from employment data and contract amendment fields\n */\n initialValues,\n /**\n * Current form field values\n */\n values: fieldValues,\n /**\n * Function to validate form values against the contract amendment schema\n * @param values - Form values to validate\n * @returns Validation result or null if no schema is available\n */\n handleValidation,\n /**\n * Function to update the current form field values\n * @param values - New form values to set\n */\n checkFieldUpdates: setFieldValues,\n /**\n * Function to handle form submission\n * @param values - Form values to submit\n * @returns Promise resolving to the mutation result\n */\n onSubmit,\n /**\n * Function to handle going back to the previous step\n * @returns {void}\n */\n back,\n };\n};\n"],"mappings":"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","names":["useMutation","useQuery","useContractAmendmentSchemaQuery","__name","countryCode","employment","fieldValues","options","client","useClient","jsonSchemaQueryParam","useQuery","response","getShowContractAmendmentSchema","data","jsfSchema","createHeadlessForm","useCreateContractAmendmentMutation","useMutation","payload","postCreateContractAmendment","useAutomatableContractAmendmentMutation","postAutomatableContractAmendment","useContractAmendment","employmentId","setFieldValues","stepState","nextStep","previousStep","useStepState","STEPS","isLoadingEmployment","isErrorEmployment","errorEmployment","useEmploymentQuery","contractAmendmentHeadlessForm","isLoadingContractAmendments","isErrorContractAmendmentSchema","errorContractAmendmentSchema","initialValues","buildInitialValues","createContractAmendmentMutation","automatableContractAmendmentMutation","onSubmit","values","parsedValues","parseJSFToValidate","mutateAsync","mutationToPromise","automatableContractAmendment","handleValidation","back"]}
@@ -1,2 +1,2 @@
1
- import{b as v}from"./chunk-PGWKJ6FK.js";import{d as p,e as y}from"./chunk-FJZPATKO.js";import{a as s}from"./chunk-3X36ZFNP.js";import{b as l}from"./chunk-KQPDXXG3.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as b}from"react/jsx-runtime";function O({onSubmit:w,onSuccess:a,onError:t,render:f,...o}){let{components:E}=l(),{onboardingBag:r,setCreditScore:m}=v(),d=p(),u=y(),{mutateAsync:R}=s(d),{mutateAsync:g}=s(u),S=i(async()=>{try{if(await w?.(),r.creditRiskStatus==="deposit_required"&&r.employmentId&&r.employment?.status&&!r.isEmploymentReadOnly){let e=await g({employment_slug:r.employmentId});if(e.data){await a?.({data:e.data,employmentStatus:"created_awaiting_reserve"}),m?.(n=>({...n,showReserveInvoice:!0})),r.refetchEmployment();return}e.error&&t?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}else if(r.employmentId){let e=await R({employment_id:r.employmentId});if(e.data){await a?.({data:e.data,employmentStatus:"invited"}),m?.(n=>({...n,showInviteSuccessful:!0})),r.refetchEmployment();return}e.error&&t?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}}catch(e){t?.({error:e,rawError:e,fieldErrors:[]})}},"handleSubmit"),I=r.creditRiskStatus==="deposit_required"&&r.employment?.status&&!r.isEmploymentReadOnly,c=E?.button;if(!c)throw new Error("Button component not found");return b(c,{...o,disabled:d.isPending||u.isPending||o.disabled,onClick:e=>{S(),o.onClick?.(e)},children:f({employmentStatus:I?"created_awaiting_reserve":"invited"})})}i(O,"OnboardingInvite");export{O as a};
2
- //# sourceMappingURL=chunk-NCELDZXG.js.map
1
+ import{b as v}from"./chunk-PGWKJ6FK.js";import{d as p,e as y}from"./chunk-4ECYU3L5.js";import{a as s}from"./chunk-3X36ZFNP.js";import{b as l}from"./chunk-KQPDXXG3.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as b}from"react/jsx-runtime";function O({onSubmit:w,onSuccess:a,onError:t,render:f,...o}){let{components:E}=l(),{onboardingBag:r,setCreditScore:m}=v(),d=p(),u=y(),{mutateAsync:R}=s(d),{mutateAsync:g}=s(u),S=i(async()=>{try{if(await w?.(),r.creditRiskStatus==="deposit_required"&&r.employmentId&&r.employment?.status&&!r.isEmploymentReadOnly){let e=await g({employment_slug:r.employmentId});if(e.data){await a?.({data:e.data,employmentStatus:"created_awaiting_reserve"}),m?.(n=>({...n,showReserveInvoice:!0})),r.refetchEmployment();return}e.error&&t?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}else if(r.employmentId){let e=await R({employment_id:r.employmentId});if(e.data){await a?.({data:e.data,employmentStatus:"invited"}),m?.(n=>({...n,showInviteSuccessful:!0})),r.refetchEmployment();return}e.error&&t?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}}catch(e){t?.({error:e,rawError:e,fieldErrors:[]})}},"handleSubmit"),I=r.creditRiskStatus==="deposit_required"&&r.employment?.status&&!r.isEmploymentReadOnly,c=E?.button;if(!c)throw new Error("Button component not found");return b(c,{...o,disabled:d.isPending||u.isPending||o.disabled,onClick:e=>{S(),o.onClick?.(e)},children:f({employmentStatus:I?"created_awaiting_reserve":"invited"})})}i(O,"OnboardingInvite");export{O as a};
2
+ //# sourceMappingURL=chunk-C36DEJTU.js.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-GCWEOZBS.js";import{a as i}from"./chunk-P37U34EQ.js";import*as o from"@radix-ui/react-dialog";import{XIcon as s}from"lucide-react";import{jsx as a,jsxs as l}from"react/jsx-runtime";function p({...t}){return a(o.Root,{"data-slot":"dialog",...t})}i(p,"Dialog");function f({...t}){return a(o.Trigger,{"data-slot":"dialog-trigger",...t})}i(f,"DialogTrigger");function g({...t}){return a(o.Portal,{"data-slot":"dialog-portal",...t})}i(g,"DialogPortal");function d({className:t,...e}){return a(o.Overlay,{"data-slot":"dialog-overlay",className:n("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...e})}i(d,"DialogOverlay");function u({className:t,children:e,...r}){return l(g,{"data-slot":"dialog-portal",children:[a(d,{}),l(o.Content,{"data-slot":"dialog-content",className:n("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...r,children:[e,l(o.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 RemoteFlows__Dialog__Close",children:[a(s,{}),a("span",{className:"sr-only",children:"Close"})]})]})]})}i(u,"DialogContent");function v({className:t,...e}){return a("div",{"data-slot":"dialog-header",className:n("flex flex-col gap-2 text-center sm:text-left",t),...e})}i(v,"DialogHeader");function D({className:t,...e}){return a("div",{"data-slot":"dialog-footer",className:n("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...e})}i(D,"DialogFooter");function P({className:t,...e}){return a(o.Title,{"data-slot":"dialog-title",className:n("text-lg leading-none font-semibold",t),...e})}i(P,"DialogTitle");function C({className:t,...e}){return a(o.Description,{"data-slot":"dialog-description",className:n("text-muted-foreground text-sm",t),...e})}i(C,"DialogDescription");export{p as a,f as b,u as c,v as d,D as e,P as f,C as g};
2
- //# sourceMappingURL=chunk-7QRAEME3.js.map
1
+ import{a as n}from"./chunk-J63QA2JC.js";import{a as i}from"./chunk-P37U34EQ.js";import*as o from"@radix-ui/react-dialog";import{XIcon as s}from"lucide-react";import{jsx as a,jsxs as l}from"react/jsx-runtime";function p({...t}){return a(o.Root,{"data-slot":"dialog",...t})}i(p,"Dialog");function f({...t}){return a(o.Trigger,{"data-slot":"dialog-trigger",...t})}i(f,"DialogTrigger");function g({...t}){return a(o.Portal,{"data-slot":"dialog-portal",...t})}i(g,"DialogPortal");function d({className:t,...e}){return a(o.Overlay,{"data-slot":"dialog-overlay",className:n("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...e})}i(d,"DialogOverlay");function u({className:t,children:e,...r}){return l(g,{"data-slot":"dialog-portal",children:[a(d,{}),l(o.Content,{"data-slot":"dialog-content",className:n("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t),...r,children:[e,l(o.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 RemoteFlows__Dialog__Close",children:[a(s,{}),a("span",{className:"sr-only",children:"Close"})]})]})]})}i(u,"DialogContent");function v({className:t,...e}){return a("div",{"data-slot":"dialog-header",className:n("flex flex-col gap-2 text-center sm:text-left",t),...e})}i(v,"DialogHeader");function D({className:t,...e}){return a("div",{"data-slot":"dialog-footer",className:n("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...e})}i(D,"DialogFooter");function P({className:t,...e}){return a(o.Title,{"data-slot":"dialog-title",className:n("text-lg leading-none font-semibold",t),...e})}i(P,"DialogTitle");function C({className:t,...e}){return a(o.Description,{"data-slot":"dialog-description",className:n("text-muted-foreground text-sm",t),...e})}i(C,"DialogDescription");export{p as a,f as b,u as c,v as d,D as e,P as f,C as g};
2
+ //# sourceMappingURL=chunk-CCE3EAVC.js.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-GCWEOZBS.js";import{a as r}from"./chunk-P37U34EQ.js";import*as e from"@radix-ui/react-select";import{CheckIcon as m,ChevronDownIcon as s,ChevronUpIcon as d}from"lucide-react";import{jsx as t,jsxs as n}from"react/jsx-runtime";function S({...i}){return t(e.Root,{"data-slot":"select",...i})}r(S,"Select");function P({...i}){return t(e.Group,{"data-slot":"select-group",...i})}r(P,"SelectGroup");function g({...i}){return t(e.Value,{"data-slot":"select-value",...i})}r(g,"SelectValue");function x({className:i,children:o,...a}){return n(e.Trigger,{"data-slot":"select-trigger",className:l("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex w-full items-center justify-between rounded-xl border bg-transparent px-4 py-7 text-sm whitespace-nowrap transition-[color] outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","focus-visible:border-focused",i),...a,children:[o,t(e.Icon,{asChild:!0,className:"absolute right-4",children:t(s,{className:"size-4"})})]})}r(x,"SelectTrigger");function b({className:i,children:o,position:a="popper",...c}){return t(e.Portal,{children:n(e.Content,{"data-slot":"select-content",className:l("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-xl border",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",i),position:a,...c,children:[t(p,{}),t(e.Viewport,{className:l(a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:o}),t(u,{})]})})}r(b,"SelectContent");function y({className:i,children:o,...a}){return n(e.Item,{"data-slot":"select-item",className:l("focus:bg-accent focus:text-accent-foreground min-h-11 justify-between [&_svg:not([class*='text-'])]:text-muted-foreground flex w-full cursor-default items-center gap-2 py-2 px-4 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",i),...a,children:[t(e.ItemText,{children:o}),t("span",{className:"flex size-3.5 items-center justify-center",children:t(e.ItemIndicator,{children:t(m,{className:"size-4"})})})]})}r(y,"SelectItem");function p({className:i,...o}){return t(e.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:l("flex cursor-default items-center justify-center py-1",i),...o,children:t(d,{className:"size-4"})})}r(p,"SelectScrollUpButton");function u({className:i,...o}){return t(e.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:l("flex cursor-default items-center justify-center py-1",i),...o,children:t(s,{className:"size-4"})})}r(u,"SelectScrollDownButton");export{S as a,P as b,g as c,x as d,b as e,y as f};
2
- //# sourceMappingURL=chunk-F2VYTYIQ.js.map
1
+ import{a as l}from"./chunk-J63QA2JC.js";import{a as r}from"./chunk-P37U34EQ.js";import*as e from"@radix-ui/react-select";import{CheckIcon as m,ChevronDownIcon as s,ChevronUpIcon as d}from"lucide-react";import{jsx as t,jsxs as n}from"react/jsx-runtime";function S({...i}){return t(e.Root,{"data-slot":"select",...i})}r(S,"Select");function P({...i}){return t(e.Group,{"data-slot":"select-group",...i})}r(P,"SelectGroup");function g({...i}){return t(e.Value,{"data-slot":"select-value",...i})}r(g,"SelectValue");function x({className:i,children:o,...a}){return n(e.Trigger,{"data-slot":"select-trigger",className:l("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex w-full items-center justify-between rounded-xl border bg-transparent px-4 py-7 text-sm whitespace-nowrap transition-[color] outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","focus-visible:border-focused",i),...a,children:[o,t(e.Icon,{asChild:!0,className:"absolute right-4",children:t(s,{className:"size-4"})})]})}r(x,"SelectTrigger");function b({className:i,children:o,position:a="popper",...c}){return t(e.Portal,{children:n(e.Content,{"data-slot":"select-content",className:l("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-xl border",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",i),position:a,...c,children:[t(p,{}),t(e.Viewport,{className:l(a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:o}),t(u,{})]})})}r(b,"SelectContent");function y({className:i,children:o,...a}){return n(e.Item,{"data-slot":"select-item",className:l("focus:bg-accent focus:text-accent-foreground min-h-11 justify-between [&_svg:not([class*='text-'])]:text-muted-foreground flex w-full cursor-default items-center gap-2 py-2 px-4 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",i),...a,children:[t(e.ItemText,{children:o}),t("span",{className:"flex size-3.5 items-center justify-center",children:t(e.ItemIndicator,{children:t(m,{className:"size-4"})})})]})}r(y,"SelectItem");function p({className:i,...o}){return t(e.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:l("flex cursor-default items-center justify-center py-1",i),...o,children:t(d,{className:"size-4"})})}r(p,"SelectScrollUpButton");function u({className:i,...o}){return t(e.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:l("flex cursor-default items-center justify-center py-1",i),...o,children:t(s,{className:"size-4"})})}r(u,"SelectScrollDownButton");export{S as a,P as b,g as c,x as d,b as e,y as f};
2
+ //# sourceMappingURL=chunk-CMFZEZEK.js.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-WHROCBHG.js";import{a as r}from"./chunk-IG5LQPUN.js";import{a}from"./chunk-U6LRMWRI.js";import{a as c}from"./chunk-PO57BOOY.js";import{a as e}from"./chunk-D5AR26AI.js";import{a as o}from"./chunk-TVZAFTPT.js";import{a as n}from"./chunk-P37U34EQ.js";import{useId as f}from"react";import{jsx as s}from"react/jsx-runtime";function k({employmentId:d,countryCode:C,options:p,render:A}){let t=c({employmentId:d,countryCode:C,options:p}),i=f();return s(o.Provider,{value:{formId:i,contractAmendmentBag:t},children:A({contractAmendmentBag:t,components:{Form:r,SubmitButton:a,ConfirmationForm:m,BackButton:e}})})}n(k,"ContractAmendmentFlow");export{k as a};
2
- //# sourceMappingURL=chunk-ZOPKBLGA.js.map
1
+ import{a as m}from"./chunk-7V3YVPIK.js";import{a as r}from"./chunk-QSOCKFUS.js";import{a}from"./chunk-U6LRMWRI.js";import{a as c}from"./chunk-BHXCYFC4.js";import{a as e}from"./chunk-D5AR26AI.js";import{a as o}from"./chunk-TVZAFTPT.js";import{a as n}from"./chunk-P37U34EQ.js";import{useId as f}from"react";import{jsx as s}from"react/jsx-runtime";function k({employmentId:d,countryCode:C,options:p,render:A}){let t=c({employmentId:d,countryCode:C,options:p}),i=f();return s(o.Provider,{value:{formId:i,contractAmendmentBag:t},children:A({contractAmendmentBag:t,components:{Form:r,SubmitButton:a,ConfirmationForm:m,BackButton:e}})})}n(k,"ContractAmendmentFlow");export{k as a};
2
+ //# sourceMappingURL=chunk-DAE2FMZ5.js.map
@@ -1,2 +1,2 @@
1
- import{l as J}from"./chunk-FJZPATKO.js";import{b as G,c as M,d as L}from"./chunk-T7O3YYOG.js";import{a as k}from"./chunk-MZNUCWQU.js";import{c as B,l as A}from"./chunk-3QNS3IZB.js";import{b as H}from"./chunk-KQPDXXG3.js";import{a as n,b as d,c as qe}from"./chunk-P37U34EQ.js";var D=d((En,U)=>{"use strict";function we(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}n(we,"isObject");U.exports=we});var X=d((In,V)=>{"use strict";var Fe=typeof global=="object"&&global&&global.Object===Object&&global;V.exports=Fe});var _=d((qn,z)=>{"use strict";var Pe=X(),ke=typeof self=="object"&&self&&self.Object===Object&&self,Me=Pe||ke||Function("return this")();z.exports=Me});var Q=d((wn,K)=>{"use strict";var Le=_(),De=n(function(){return Le.Date.now()},"now");K.exports=De});var Z=d((Pn,Y)=>{"use strict";var _e=/\s/;function $e(e){for(var t=e.length;t--&&_e.test(e.charAt(t)););return t}n($e,"trimmedEndIndex");Y.exports=$e});var ne=d((Mn,ee)=>{"use strict";var Ne=Z(),We=/^\s+/;function Be(e){return e&&e.slice(0,Ne(e)+1).replace(We,"")}n(Be,"baseTrim");ee.exports=Be});var $=d((Dn,te)=>{"use strict";var Ae=_(),He=Ae.Symbol;te.exports=He});var se=d((_n,ie)=>{"use strict";var re=$(),oe=Object.prototype,Ge=oe.hasOwnProperty,Je=oe.toString,O=re?re.toStringTag:void 0;function Ue(e){var t=Ge.call(e,O),r=e[O];try{e[O]=void 0;var i=!0}catch{}var u=Je.call(e);return i&&(t?e[O]=r:delete e[O]),u}n(Ue,"getRawTag");ie.exports=Ue});var ce=d((Nn,ae)=>{"use strict";var Ve=Object.prototype,Xe=Ve.toString;function ze(e){return Xe.call(e)}n(ze,"objectToString");ae.exports=ze});var le=d((Bn,de)=>{"use strict";var ue=$(),Ke=se(),Qe=ce(),Ye="[object Null]",Ze="[object Undefined]",fe=ue?ue.toStringTag:void 0;function en(e){return e==null?e===void 0?Ze:Ye:fe&&fe in Object(e)?Ke(e):Qe(e)}n(en,"baseGetTag");de.exports=en});var pe=d((Hn,me)=>{"use strict";function nn(e){return e!=null&&typeof e=="object"}n(nn,"isObjectLike");me.exports=nn});var be=d((Jn,ge)=>{"use strict";var tn=le(),rn=pe(),on="[object Symbol]";function sn(e){return typeof e=="symbol"||rn(e)&&tn(e)==on}n(sn,"isSymbol");ge.exports=sn});var Ce=d((Vn,xe)=>{"use strict";var an=ne(),ve=D(),cn=be(),ye=NaN,un=/^[-+]0x[0-9a-f]+$/i,fn=/^0b[01]+$/i,dn=/^0o[0-7]+$/i,ln=parseInt;function mn(e){if(typeof e=="number")return e;if(cn(e))return ye;if(ve(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ve(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=an(e);var r=fn.test(e);return r||dn.test(e)?ln(e.slice(2),r?2:8):un.test(e)?ye:+e}n(mn,"toNumber");xe.exports=mn});var Se=d((zn,Te)=>{"use strict";var pn=D(),N=Q(),he=Ce(),gn="Expected a function",bn=Math.max,vn=Math.min;function yn(e,t,r){var i,u,b,l,s,a,p=0,E=!1,f=!1,x=!0;if(typeof e!="function")throw new TypeError(gn);t=he(t)||0,pn(r)&&(E=!!r.leading,f="maxWait"in r,b=f?bn(he(r.maxWait)||0,t):b,x="trailing"in r?!!r.trailing:x);function C(o){var g=i,y=u;return i=u=void 0,p=o,l=e.apply(y,g),l}n(C,"invokeFunc");function R(o){return p=o,s=setTimeout(m,t),E?C(o):l}n(R,"leadingEdge");function q(o){var g=o-a,y=o-p,c=t-g;return f?vn(c,b-y):c}n(q,"remainingWait");function T(o){var g=o-a,y=o-p;return a===void 0||g>=t||g<0||f&&y>=b}n(T,"shouldInvoke");function m(){var o=N();if(T(o))return S(o);s=setTimeout(m,q(o))}n(m,"timerExpired");function S(o){return s=void 0,x&&i?C(o):(i=u=void 0,l)}n(S,"trailingEdge");function I(){s!==void 0&&clearTimeout(s),p=0,i=a=u=s=void 0}n(I,"cancel");function w(){return s===void 0?l:S(N())}n(w,"flush");function j(){var o=N(),g=T(o);if(i=arguments,u=this,a=o,g){if(s===void 0)return R(a);if(f)return clearTimeout(s),s=setTimeout(m,t),C(a)}return s===void 0&&(s=setTimeout(m,t)),l}return n(j,"debounced"),j.cancel=I,j.flush=w,j}n(yn,"debounce");Te.exports=yn});import{useState as hn,useCallback as Tn,useEffect as Ee,useRef as Sn}from"react";var Oe=qe(Se(),1);import{useCallback as xn,useEffect as Cn,useRef as je}from"react";function W(e,t){let r=je(e);Cn(()=>{r.current=e},[e]);let i=je((0,Oe.default)(u=>{r.current(u)},t)).current;return xn(u=>{i(u)},[i])}n(W,"useDebounce");import{Fragment as On,jsx as h,jsxs as Re}from"react/jsx-runtime";var jn=n(({description:e,showConversion:t,targetCurrency:r,className:i,onClick:u})=>{let{components:b}=H(),l=t?`Hide ${r} conversion`:`Show ${r} conversion`,s=b?.button;if(!s)throw new Error("Button component not found");return Re("span",{className:i,children:[h(A,{as:"span",children:e})," ",h(s,{className:`${i.replace("-description","-button")}`,"data-type":"inline",onClick:u,children:l})]})},"DescriptionWithConversion"),ut=n(({sourceCurrency:e,targetCurrency:t,mainFieldName:r,conversionFieldName:i,conversionProperties:u,classNamePrefix:b,description:l,conversionType:s="spread",...a})=>{let[p,E]=hn(!1),{setValue:f,watch:x}=B(),C=x(r||a.name),R=Sn(!0),q=e&&t&&e!==t,{mutateAsync:T}=J({type:s}),m=`${a.name}_converted`;Ee(()=>{f(m,r||a.name)},[f,r,a.name,m]),Ee(()=>{if(R.current){R.current=!1;return}f(i,"")},[e,i,f]);let S=Tn(async(c,v,F)=>{if(!(!c||isNaN(c)||c<=0))return T({source_currency:v,target_currency:F,amount:c})},[T]),I=W(async c=>{let v=M(c),P=1/((await S(v,t,e))?.data?.data.conversion_data?.exchange_rate??1),Ie=G(Number(v)*P);f(i,L(Ie))},500),w=W(async c=>{let v=M(c),P=(await S(v,t,e))?.data?.data.conversion_data.target_amount;f(r||a.name,L(P))},500),j=n(c=>{f(m,r||a.name),p&&I(c.target.value)},"handleMainFieldChange"),o=n(c=>{f(m,i),w(c.target.value)},"handleConversionFieldChange"),g=n(c=>{c.preventDefault(),E(v=>!v),!p&&C&&I(C)},"toggleConversion"),y=q?h(jn,{targetCurrency:t,description:l,showConversion:p,className:`${b}-description`,onClick:g}):l;return Re(On,{children:[h(k,{...a,name:r||a.name,additionalProps:{currency:e},description:y,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:j}),p&&h(k,{additionalProps:{currency:t},name:i,label:u?.label||"Conversion",description:u?.description,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:o}),h("input",{type:"hidden",name:m,value:x(m)||r||a.name})]})},"CurrencyConversionField");export{ut as a};
2
- //# sourceMappingURL=chunk-CWQQA3P4.js.map
1
+ import{l as J}from"./chunk-4ECYU3L5.js";import{b as G,c as M,d as L}from"./chunk-T7O3YYOG.js";import{a as k}from"./chunk-GWR2JBG2.js";import{c as B,l as A}from"./chunk-H5CNWMEM.js";import{b as H}from"./chunk-KQPDXXG3.js";import{a as n,b as d,c as qe}from"./chunk-P37U34EQ.js";var D=d((En,U)=>{"use strict";function we(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}n(we,"isObject");U.exports=we});var X=d((In,V)=>{"use strict";var Fe=typeof global=="object"&&global&&global.Object===Object&&global;V.exports=Fe});var _=d((qn,z)=>{"use strict";var Pe=X(),ke=typeof self=="object"&&self&&self.Object===Object&&self,Me=Pe||ke||Function("return this")();z.exports=Me});var Q=d((wn,K)=>{"use strict";var Le=_(),De=n(function(){return Le.Date.now()},"now");K.exports=De});var Z=d((Pn,Y)=>{"use strict";var _e=/\s/;function $e(e){for(var t=e.length;t--&&_e.test(e.charAt(t)););return t}n($e,"trimmedEndIndex");Y.exports=$e});var ne=d((Mn,ee)=>{"use strict";var Ne=Z(),We=/^\s+/;function Be(e){return e&&e.slice(0,Ne(e)+1).replace(We,"")}n(Be,"baseTrim");ee.exports=Be});var $=d((Dn,te)=>{"use strict";var Ae=_(),He=Ae.Symbol;te.exports=He});var se=d((_n,ie)=>{"use strict";var re=$(),oe=Object.prototype,Ge=oe.hasOwnProperty,Je=oe.toString,O=re?re.toStringTag:void 0;function Ue(e){var t=Ge.call(e,O),r=e[O];try{e[O]=void 0;var i=!0}catch{}var u=Je.call(e);return i&&(t?e[O]=r:delete e[O]),u}n(Ue,"getRawTag");ie.exports=Ue});var ce=d((Nn,ae)=>{"use strict";var Ve=Object.prototype,Xe=Ve.toString;function ze(e){return Xe.call(e)}n(ze,"objectToString");ae.exports=ze});var le=d((Bn,de)=>{"use strict";var ue=$(),Ke=se(),Qe=ce(),Ye="[object Null]",Ze="[object Undefined]",fe=ue?ue.toStringTag:void 0;function en(e){return e==null?e===void 0?Ze:Ye:fe&&fe in Object(e)?Ke(e):Qe(e)}n(en,"baseGetTag");de.exports=en});var pe=d((Hn,me)=>{"use strict";function nn(e){return e!=null&&typeof e=="object"}n(nn,"isObjectLike");me.exports=nn});var be=d((Jn,ge)=>{"use strict";var tn=le(),rn=pe(),on="[object Symbol]";function sn(e){return typeof e=="symbol"||rn(e)&&tn(e)==on}n(sn,"isSymbol");ge.exports=sn});var Ce=d((Vn,xe)=>{"use strict";var an=ne(),ve=D(),cn=be(),ye=NaN,un=/^[-+]0x[0-9a-f]+$/i,fn=/^0b[01]+$/i,dn=/^0o[0-7]+$/i,ln=parseInt;function mn(e){if(typeof e=="number")return e;if(cn(e))return ye;if(ve(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ve(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=an(e);var r=fn.test(e);return r||dn.test(e)?ln(e.slice(2),r?2:8):un.test(e)?ye:+e}n(mn,"toNumber");xe.exports=mn});var Se=d((zn,Te)=>{"use strict";var pn=D(),N=Q(),he=Ce(),gn="Expected a function",bn=Math.max,vn=Math.min;function yn(e,t,r){var i,u,b,l,s,a,p=0,E=!1,f=!1,x=!0;if(typeof e!="function")throw new TypeError(gn);t=he(t)||0,pn(r)&&(E=!!r.leading,f="maxWait"in r,b=f?bn(he(r.maxWait)||0,t):b,x="trailing"in r?!!r.trailing:x);function C(o){var g=i,y=u;return i=u=void 0,p=o,l=e.apply(y,g),l}n(C,"invokeFunc");function R(o){return p=o,s=setTimeout(m,t),E?C(o):l}n(R,"leadingEdge");function q(o){var g=o-a,y=o-p,c=t-g;return f?vn(c,b-y):c}n(q,"remainingWait");function T(o){var g=o-a,y=o-p;return a===void 0||g>=t||g<0||f&&y>=b}n(T,"shouldInvoke");function m(){var o=N();if(T(o))return S(o);s=setTimeout(m,q(o))}n(m,"timerExpired");function S(o){return s=void 0,x&&i?C(o):(i=u=void 0,l)}n(S,"trailingEdge");function I(){s!==void 0&&clearTimeout(s),p=0,i=a=u=s=void 0}n(I,"cancel");function w(){return s===void 0?l:S(N())}n(w,"flush");function j(){var o=N(),g=T(o);if(i=arguments,u=this,a=o,g){if(s===void 0)return R(a);if(f)return clearTimeout(s),s=setTimeout(m,t),C(a)}return s===void 0&&(s=setTimeout(m,t)),l}return n(j,"debounced"),j.cancel=I,j.flush=w,j}n(yn,"debounce");Te.exports=yn});import{useState as hn,useCallback as Tn,useEffect as Ee,useRef as Sn}from"react";var Oe=qe(Se(),1);import{useCallback as xn,useEffect as Cn,useRef as je}from"react";function W(e,t){let r=je(e);Cn(()=>{r.current=e},[e]);let i=je((0,Oe.default)(u=>{r.current(u)},t)).current;return xn(u=>{i(u)},[i])}n(W,"useDebounce");import{Fragment as On,jsx as h,jsxs as Re}from"react/jsx-runtime";var jn=n(({description:e,showConversion:t,targetCurrency:r,className:i,onClick:u})=>{let{components:b}=H(),l=t?`Hide ${r} conversion`:`Show ${r} conversion`,s=b?.button;if(!s)throw new Error("Button component not found");return Re("span",{className:i,children:[h(A,{as:"span",children:e})," ",h(s,{className:`${i.replace("-description","-button")}`,"data-type":"inline",onClick:u,children:l})]})},"DescriptionWithConversion"),ut=n(({sourceCurrency:e,targetCurrency:t,mainFieldName:r,conversionFieldName:i,conversionProperties:u,classNamePrefix:b,description:l,conversionType:s="spread",...a})=>{let[p,E]=hn(!1),{setValue:f,watch:x}=B(),C=x(r||a.name),R=Sn(!0),q=e&&t&&e!==t,{mutateAsync:T}=J({type:s}),m=`${a.name}_converted`;Ee(()=>{f(m,r||a.name)},[f,r,a.name,m]),Ee(()=>{if(R.current){R.current=!1;return}f(i,"")},[e,i,f]);let S=Tn(async(c,v,F)=>{if(!(!c||isNaN(c)||c<=0))return T({source_currency:v,target_currency:F,amount:c})},[T]),I=W(async c=>{let v=M(c),P=1/((await S(v,t,e))?.data?.data.conversion_data?.exchange_rate??1),Ie=G(Number(v)*P);f(i,L(Ie))},500),w=W(async c=>{let v=M(c),P=(await S(v,t,e))?.data?.data.conversion_data.target_amount;f(r||a.name,L(P))},500),j=n(c=>{f(m,r||a.name),p&&I(c.target.value)},"handleMainFieldChange"),o=n(c=>{f(m,i),w(c.target.value)},"handleConversionFieldChange"),g=n(c=>{c.preventDefault(),E(v=>!v),!p&&C&&I(C)},"toggleConversion"),y=q?h(jn,{targetCurrency:t,description:l,showConversion:p,className:`${b}-description`,onClick:g}):l;return Re(On,{children:[h(k,{...a,name:r||a.name,additionalProps:{currency:e},description:y,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:j}),p&&h(k,{additionalProps:{currency:t},name:i,label:u?.label||"Conversion",description:u?.description,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:o}),h("input",{type:"hidden",name:m,value:x(m)||r||a.name})]})},"CurrencyConversionField");export{ut as a};
2
+ //# sourceMappingURL=chunk-E7JOGKEV.js.map
@@ -1,2 +1,2 @@
1
- import{b as t}from"./chunk-H2OBH7SK.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as r}from"react/jsx-runtime";var u=n(p=>{let{"data-type":e,...o}=p;return e==="inline"?r(t,{size:"link",variant:"link",...o}):r(t,{...o})},"ButtonDefault");export{u as a};
2
- //# sourceMappingURL=chunk-JQ2ESL5O.js.map
1
+ import{b as t}from"./chunk-YUYHK6WD.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as r}from"react/jsx-runtime";var u=n(p=>{let{"data-type":e,...o}=p;return e==="inline"?r(t,{size:"link",variant:"link",...o}):r(t,{...o})},"ButtonDefault");export{u as a};
2
+ //# sourceMappingURL=chunk-EGDWVDXM.js.map
@@ -1,2 +1,2 @@
1
- import{b as e}from"./chunk-H2OBH7SK.js";import{a as t}from"./chunk-GCWEOZBS.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as p}from"react/jsx-runtime";var s=o(({isExpanded:l,onToggle:n,className:m,...i})=>p(e,{type:"button",className:t("RemoteFlows__Button RemoteFlows__FieldSetField__ToggleButton",m),variant:"default",onClick:n,...i,children:l?"Remove":"Define"}),"FieldsetToggleButtonDefault");export{s as a};
2
- //# sourceMappingURL=chunk-AN5U7FWW.js.map
1
+ import{b as e}from"./chunk-YUYHK6WD.js";import{a as t}from"./chunk-J63QA2JC.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as p}from"react/jsx-runtime";var s=o(({isExpanded:l,onToggle:n,className:m,...i})=>p(e,{type:"button",className:t("RemoteFlows__Button RemoteFlows__FieldSetField__ToggleButton",m),variant:"default",onClick:n,...i,children:l?"Remove":"Define"}),"FieldsetToggleButtonDefault");export{s as a};
2
+ //# sourceMappingURL=chunk-ERPXDFKC.js.map
@@ -1,2 +1,2 @@
1
- import{a as i,b as r}from"./chunk-N4W7JU2D.js";import{a as n}from"./chunk-P37U34EQ.js";var d={select_country:{index:0,name:"select_country"},basic_information:{index:1,name:"basic_information"},pricing_plan:{index:2,name:"pricing_plan"},contract_details:{index:3,name:"contract_details"},contract_preview:{index:4,name:"contract_preview"},review:{index:5,name:"review"}},s={basic_information:{index:0,name:"basic_information"},pricing_plan:{index:1,name:"pricing_plan"},contract_details:{index:2,name:"contract_details"},contract_preview:{index:3,name:"contract_preview"},review:{index:4,name:"review"}},p=n((e,t)=>{if(e&&t&&e!==t)return`When the contractor will start providing service to your company. ${`This date does not match the date you provided in the Basic Information step - ${e} - and will override it only when both parties have signed the contract.`}`},"calculateProvisionalStartDateDescription"),_=n(e=>e===i||e===r,"isCMOrCMPlus");export{d as a,s as b,p as c,_ as d};
2
- //# sourceMappingURL=chunk-UMOL4GLZ.js.map
1
+ import{a as i,b as r}from"./chunk-O3G6HQ3B.js";import{a as n}from"./chunk-P37U34EQ.js";var d={select_country:{index:0,name:"select_country"},basic_information:{index:1,name:"basic_information"},pricing_plan:{index:2,name:"pricing_plan"},contract_details:{index:3,name:"contract_details"},contract_preview:{index:4,name:"contract_preview"},review:{index:5,name:"review"}},s={basic_information:{index:0,name:"basic_information"},pricing_plan:{index:1,name:"pricing_plan"},contract_details:{index:2,name:"contract_details"},contract_preview:{index:3,name:"contract_preview"},review:{index:4,name:"review"}},p=n((e,t)=>{if(e&&t&&e!==t)return`When the contractor will start providing service to your company. ${`This date does not match the date you provided in the Basic Information step - ${e} - and will override it only when both parties have signed the contract.`}`},"calculateProvisionalStartDateDescription"),_=n(e=>e===i||e===r,"isCMOrCMPlus");export{d as a,s as b,p as c,_ as d};
2
+ //# sourceMappingURL=chunk-FC2V3NUT.js.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-FJLSVTBJ.js";import{b as e}from"./chunk-MRYRNB7Y.js";import{a as m}from"./chunk-P37U34EQ.js";import{jsx as u}from"react/jsx-runtime";function p({onSubmit:n}){let{terminationBag:o}=e(),a=m(async t=>{let r=await o?.parseFormValues(t);await n?.(r),o?.next()},"handleSubmit");return u(i,{defaultValues:o.fieldValues,onSubmit:a})}m(p,"EmployeeCommunicationForm");export{p as a};
2
- //# sourceMappingURL=chunk-5G5UBS6W.js.map
1
+ import{a as i}from"./chunk-SBUJLXJH.js";import{b as e}from"./chunk-MRYRNB7Y.js";import{a as m}from"./chunk-P37U34EQ.js";import{jsx as u}from"react/jsx-runtime";function p({onSubmit:n}){let{terminationBag:o}=e(),a=m(async t=>{let r=await o?.parseFormValues(t);await n?.(r),o?.next()},"handleSubmit");return u(i,{defaultValues:o.fieldValues,onSubmit:a})}m(p,"EmployeeCommunicationForm");export{p as a};
2
+ //# sourceMappingURL=chunk-FUPQCC4B.js.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-WR5DSTKP.js";import{a}from"./chunk-DWTKSHQJ.js";import{a as r}from"./chunk-MJQUJZCD.js";import{a as t}from"./chunk-D3XDJFE3.js";import{a as f}from"./chunk-MM5K3XXY.js";import{a as e}from"./chunk-5G5UBS6W.js";import{a as p}from"./chunk-COAGOVMZ.js";import{a as m}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{useId as c}from"react";import{jsx as F}from"react/jsx-runtime";var k=i(({employmentId:l,render:T,options:d,initialValues:s})=>{let u=c(),o=t({employmentId:l,options:d,initialValues:s});return F(m.Provider,{value:{formId:u,terminationBag:o},children:T({terminationBag:o,components:{SubmitButton:r,Back:n,EmployeeComunicationStep:e,TerminationDetailsStep:a,PaidTimeOffStep:p,AdditionalDetailsStep:f}})})},"TerminationFlow");export{k as a};
2
- //# sourceMappingURL=chunk-GLNDB4KG.js.map
1
+ import{a as n}from"./chunk-WR5DSTKP.js";import{a}from"./chunk-VNN6IP6P.js";import{a as r}from"./chunk-MJQUJZCD.js";import{a as t}from"./chunk-6AXMBMQI.js";import{a as f}from"./chunk-NB3TN7O3.js";import{a as e}from"./chunk-FUPQCC4B.js";import{a as p}from"./chunk-NVX4O45S.js";import{a as m}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{useId as c}from"react";import{jsx as F}from"react/jsx-runtime";var k=i(({employmentId:l,render:T,options:d,initialValues:s})=>{let u=c(),o=t({employmentId:l,options:d,initialValues:s});return F(m.Provider,{value:{formId:u,terminationBag:o},children:T({terminationBag:o,components:{SubmitButton:r,Back:n,EmployeeComunicationStep:e,TerminationDetailsStep:a,PaidTimeOffStep:p,AdditionalDetailsStep:f}})})},"TerminationFlow");export{k as a};
2
+ //# sourceMappingURL=chunk-G6BR4JI6.js.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-GCWEOZBS.js";import{a as d}from"./chunk-P37U34EQ.js";import*as r from"react";import{jsx as o}from"react/jsx-runtime";var i=r.forwardRef(({className:a,...e},t)=>o("div",{className:"relative w-full overflow-auto",children:o("table",{ref:t,className:l("w-full caption-bottom text-sm",a),...e})}));i.displayName="Table";var c=r.forwardRef(({className:a,...e},t)=>o("thead",{ref:t,className:l("[&_tr]:border-b",a),...e}));c.displayName="TableHeader";var n=r.forwardRef(({className:a,...e},t)=>o("tbody",{ref:t,className:l("[&_tr:last-child]:border-0",a),...e}));n.displayName="TableBody";var M=r.forwardRef(({className:a,...e},t)=>o("tfoot",{ref:t,className:l("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",a),...e}));M.displayName="TableFooter";var m=r.forwardRef(({className:a,...e},t)=>o("tr",{ref:t,className:l("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",a),...e}));m.displayName="TableRow";var f=r.forwardRef(({className:a,...e},t)=>o("th",{ref:t,className:l("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...e}));f.displayName="TableHead";var p=r.forwardRef(({className:a,...e},t)=>o("td",{ref:t,className:l("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...e}));p.displayName="TableCell";var L=r.forwardRef(({className:a,...e},t)=>o("caption",{ref:t,className:l("mt-4 text-sm text-muted-foreground",a),...e}));L.displayName="TableCaption";import{jsx as s,jsxs as N}from"react/jsx-runtime";var g=d(({data:a,columns:e,className:t,ref:H})=>N(i,{ref:H,className:l("RemoteFlows__Table",t),children:[s(c,{children:s(m,{children:e.map(b=>s(f,{className:l("RemoteFlows__TableHead",b.className),children:b.label},String(b.id)))})}),s(n,{children:a?.map((b,R)=>s(m,{children:e.map(T=>s(p,{className:l("RemoteFlows__TableCell",T.className,T.cellClassName),children:T.render?T.render(b[T.id],b,R):b[T.id]},String(T.id)))},y(b,R)))})]}),"TableFieldDefault");function y(a,e){return String(a.id??e)}d(y,"getRowKey");export{g as a};
2
- //# sourceMappingURL=chunk-CNCOVTDL.js.map
1
+ import{a as l}from"./chunk-J63QA2JC.js";import{a as d}from"./chunk-P37U34EQ.js";import*as r from"react";import{jsx as o}from"react/jsx-runtime";var i=r.forwardRef(({className:a,...e},t)=>o("div",{className:"relative w-full overflow-auto",children:o("table",{ref:t,className:l("w-full caption-bottom text-sm",a),...e})}));i.displayName="Table";var c=r.forwardRef(({className:a,...e},t)=>o("thead",{ref:t,className:l("[&_tr]:border-b",a),...e}));c.displayName="TableHeader";var n=r.forwardRef(({className:a,...e},t)=>o("tbody",{ref:t,className:l("[&_tr:last-child]:border-0",a),...e}));n.displayName="TableBody";var M=r.forwardRef(({className:a,...e},t)=>o("tfoot",{ref:t,className:l("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",a),...e}));M.displayName="TableFooter";var m=r.forwardRef(({className:a,...e},t)=>o("tr",{ref:t,className:l("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",a),...e}));m.displayName="TableRow";var f=r.forwardRef(({className:a,...e},t)=>o("th",{ref:t,className:l("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...e}));f.displayName="TableHead";var p=r.forwardRef(({className:a,...e},t)=>o("td",{ref:t,className:l("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...e}));p.displayName="TableCell";var L=r.forwardRef(({className:a,...e},t)=>o("caption",{ref:t,className:l("mt-4 text-sm text-muted-foreground",a),...e}));L.displayName="TableCaption";import{jsx as s,jsxs as N}from"react/jsx-runtime";var g=d(({data:a,columns:e,className:t,ref:H})=>N(i,{ref:H,className:l("RemoteFlows__Table",t),children:[s(c,{children:s(m,{children:e.map(b=>s(f,{className:l("RemoteFlows__TableHead",b.className),children:b.label},String(b.id)))})}),s(n,{children:a?.map((b,R)=>s(m,{children:e.map(T=>s(p,{className:l("RemoteFlows__TableCell",T.className,T.cellClassName),children:T.render?T.render(b[T.id],b,R):b[T.id]},String(T.id)))},y(b,R)))})]}),"TableFieldDefault");function y(a,e){return String(a.id??e)}d(y,"getRowKey");export{g as a};
2
+ //# sourceMappingURL=chunk-GINFFWVY.js.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-2SN7VPBR.js";import{b as e}from"./chunk-Q3ALCPJN.js";import{j as t}from"./chunk-GCWEOZBS.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as u}from"react/jsx-runtime";function E({components:l,onSubmit:p,onSuccess:c,onError:m}){let{contractorOnboardingBag:r}=e(),d=i(async a=>{try{let n=await r.parseFormValues(a);await p?.(n);let o=await r.onSubmit(a);if(o?.data){await c?.(o?.data),r?.next();return}}catch(n){let o=t(n,r.meta?.fields?.pricing_plan);m?.(o)}},"handleSubmit"),P=r.stepState.values?.pricing_plan||r.initialValues.pricing_plan;return u(s,{components:l,defaultValues:P,onSubmit:d})}i(E,"PricingPlanStep");export{E as a};
2
- //# sourceMappingURL=chunk-DG34PSAO.js.map
1
+ import{a as s}from"./chunk-U7PGN7TL.js";import{b as e}from"./chunk-Q3ALCPJN.js";import{j as t}from"./chunk-J63QA2JC.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as u}from"react/jsx-runtime";function E({components:l,onSubmit:p,onSuccess:c,onError:m}){let{contractorOnboardingBag:r}=e(),d=i(async a=>{try{let n=await r.parseFormValues(a);await p?.(n);let o=await r.onSubmit(a);if(o?.data){await c?.(o?.data),r?.next();return}}catch(n){let o=t(n,r.meta?.fields?.pricing_plan);m?.(o)}},"handleSubmit"),P=r.stepState.values?.pricing_plan||r.initialValues.pricing_plan;return u(s,{components:l,defaultValues:P,onSubmit:d})}i(E,"PricingPlanStep");export{E as a};
2
+ //# sourceMappingURL=chunk-GK3QRXNY.js.map
@@ -1,2 +1,2 @@
1
- import{i as C,j as a,k as d,l as i,m as u}from"./chunk-3QNS3IZB.js";import{a as c}from"./chunk-VIQQ3IHI.js";import{a as h}from"./chunk-GCWEOZBS.js";import{a as _}from"./chunk-P37U34EQ.js";import{Fragment as v,jsx as o,jsxs as r}from"react/jsx-runtime";var L=_(({field:l,fieldState:k,fieldData:p})=>{let{name:m,label:s,description:n,options:t,multiple:F}=p;return r(C,{"data-field":m,className:h(`RemoteFlows__CheckBoxField__Item__${m}`),children:[o(d,{children:r(v,{children:[t&&F?o(a,{children:s}):null,t&&F?t.map(e=>r("div",{className:"flex space-x-2",children:[o(c,{id:e.value,onCheckedChange:b=>{l.onChange(b===!0,e.value)},checked:l.value?.includes(e.value),className:"RemoteFlows__CheckBox__Input"}),o(a,{htmlFor:e.value,className:"mb-0 RemoteFlows__CheckBox__Label",children:e.label})]},e.value)):r("div",{className:"flex space-x-2",children:[o(c,{id:m,onCheckedChange:e=>{l.onChange(e===!0,null)},checked:l.value,className:"RemoteFlows__CheckBox__Input"}),o(a,{htmlFor:m,className:"mb-0 RemoteFlows__CheckBox__Label",children:s})]})]})}),n&&o(i,{children:n}),k.error&&o(u,{})]})},"CheckboxFieldDefault");export{L as a};
2
- //# sourceMappingURL=chunk-XSG4QXPY.js.map
1
+ import{i as C,j as a,k as d,l as i,m as u}from"./chunk-H5CNWMEM.js";import{a as c}from"./chunk-4XJEVGPI.js";import{a as h}from"./chunk-J63QA2JC.js";import{a as _}from"./chunk-P37U34EQ.js";import{Fragment as v,jsx as o,jsxs as r}from"react/jsx-runtime";var L=_(({field:l,fieldState:k,fieldData:p})=>{let{name:m,label:s,description:n,options:t,multiple:F}=p;return r(C,{"data-field":m,className:h(`RemoteFlows__CheckBoxField__Item__${m}`),children:[o(d,{children:r(v,{children:[t&&F?o(a,{children:s}):null,t&&F?t.map(e=>r("div",{className:"flex space-x-2",children:[o(c,{id:e.value,onCheckedChange:b=>{l.onChange(b===!0,e.value)},checked:l.value?.includes(e.value),className:"RemoteFlows__CheckBox__Input"}),o(a,{htmlFor:e.value,className:"mb-0 RemoteFlows__CheckBox__Label",children:e.label})]},e.value)):r("div",{className:"flex space-x-2",children:[o(c,{id:m,onCheckedChange:e=>{l.onChange(e===!0,null)},checked:l.value,className:"RemoteFlows__CheckBox__Input"}),o(a,{htmlFor:m,className:"mb-0 RemoteFlows__CheckBox__Label",children:s})]})]})}),n&&o(i,{children:n}),k.error&&o(u,{})]})},"CheckboxFieldDefault");export{L as a};
2
+ //# sourceMappingURL=chunk-GOEEA34E.js.map
@@ -1,2 +1,2 @@
1
- import{a as n,b as m,c as a}from"./chunk-FJPY27YJ.js";import{a as r}from"./chunk-P37U34EQ.js";import{CheckIcon as p,FileText as s}from"lucide-react";import{jsx as t,jsxs as i}from"react/jsx-runtime";var P=r(({reviewCompleted:l,label:e,description:o})=>i(n,{variant:"default",children:[l?t(p,{className:"h-4 w-4"}):t(s,{className:"h-4 w-4"}),e&&t(m,{dangerouslySetInnerHTML:{__html:e}}),o&&t(a,{dangerouslySetInnerHTML:{__html:o}})]}),"ContractPreviewStatement");export{P as a};
2
- //# sourceMappingURL=chunk-WT6E5LO4.js.map
1
+ import{a as n,b as m,c as a}from"./chunk-6MJ5MIUI.js";import{a as r}from"./chunk-P37U34EQ.js";import{CheckIcon as p,FileText as s}from"lucide-react";import{jsx as t,jsxs as i}from"react/jsx-runtime";var P=r(({reviewCompleted:l,label:e,description:o})=>i(n,{variant:"default",children:[l?t(p,{className:"h-4 w-4"}):t(s,{className:"h-4 w-4"}),e&&t(m,{dangerouslySetInnerHTML:{__html:e}}),o&&t(a,{dangerouslySetInnerHTML:{__html:o}})]}),"ContractPreviewStatement");export{P as a};
2
+ //# sourceMappingURL=chunk-GRWTCP42.js.map
@@ -1,2 +1,2 @@
1
- import{i as c,j as i,k as n,l as _,m as F}from"./chunk-3QNS3IZB.js";import{a as d,b as S,c as p,d as u,e as g,f as b}from"./chunk-F2VYTYIQ.js";import{a as s}from"./chunk-P37U34EQ.js";import{jsx as e,jsxs as v}from"react/jsx-runtime";function R({field:t,fieldState:a,fieldData:C}){let{name:r,label:o,description:m,options:N}=C;return v(c,{"data-field":r,className:`RemoteFlows__SelectField__Item__${r}`,children:[e(i,{className:"RemoteFlows__SelectField__Label",children:o}),e(n,{children:e("div",{className:"relative",children:v(d,{value:t.value||"",onValueChange:l=>{t.onChange(l)},children:[e(u,{className:"RemoteFlows__SelectField__Trigger","aria-invalid":!!a.error,"aria-label":o,children:e("span",{className:"absolute",children:e(p,{placeholder:o})})}),e(g,{className:"RemoteFlows__SelectField__Content",children:e(S,{className:"RemoteFlows__SelectField__Group",children:N?.map(l=>e(b,{value:l.value,className:"RemoteFlows__SelectField__SelectItem",disabled:l.disabled,children:l.label},l.value))})})]})})}),m&&e(_,{children:m}),a.error&&e(F,{})]})}s(R,"SelectFieldDefault");export{R as a};
2
- //# sourceMappingURL=chunk-KXF27FC4.js.map
1
+ import{i as c,j as i,k as n,l as _,m as F}from"./chunk-H5CNWMEM.js";import{a as d,b as S,c as p,d as u,e as g,f as b}from"./chunk-CMFZEZEK.js";import{a as s}from"./chunk-P37U34EQ.js";import{jsx as e,jsxs as v}from"react/jsx-runtime";function R({field:t,fieldState:a,fieldData:C}){let{name:r,label:o,description:m,options:N}=C;return v(c,{"data-field":r,className:`RemoteFlows__SelectField__Item__${r}`,children:[e(i,{className:"RemoteFlows__SelectField__Label",children:o}),e(n,{children:e("div",{className:"relative",children:v(d,{value:t.value||"",onValueChange:l=>{t.onChange(l)},children:[e(u,{className:"RemoteFlows__SelectField__Trigger","aria-invalid":!!a.error,"aria-label":o,children:e("span",{className:"absolute",children:e(p,{placeholder:o})})}),e(g,{className:"RemoteFlows__SelectField__Content",children:e(S,{className:"RemoteFlows__SelectField__Group",children:N?.map(l=>e(b,{value:l.value,className:"RemoteFlows__SelectField__SelectItem",disabled:l.disabled,children:l.label},l.value))})})]})})}),m&&e(_,{children:m}),a.error&&e(F,{})]})}s(R,"SelectFieldDefault");export{R as a};
2
+ //# sourceMappingURL=chunk-GTJMTF2R.js.map
@@ -1,2 +1,2 @@
1
- import{c as p,h as s}from"./chunk-3QNS3IZB.js";import{b as a}from"./chunk-KQPDXXG3.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as m}from"react/jsx-runtime";function D({name:o,description:d,label:l,type:F,onChange:e,component:c,includeErrorMessage:f=!0,additionalProps:u={},maxLength:x,...C}){let{components:P}=a(),{control:T}=p();return m(s,{control:T,name:o,render:({field:n,fieldState:g})=>{let r=c||P?.text;if(!r)throw new Error(`Text component not found for field ${o}`);let y={name:o,description:d,label:l,type:F,onChange:e,metadata:u,maxLength:x,includeErrorMessage:f,...C};return m(r,{field:{...n,onChange:t(i=>{n.onChange(i),e?.(i)},"onChange")},fieldState:g,fieldData:y})}})}t(D,"TextField");export{D as a};
2
- //# sourceMappingURL=chunk-MZNUCWQU.js.map
1
+ import{c as p,h as s}from"./chunk-H5CNWMEM.js";import{b as a}from"./chunk-KQPDXXG3.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as m}from"react/jsx-runtime";function D({name:o,description:d,label:l,type:F,onChange:e,component:c,includeErrorMessage:f=!0,additionalProps:u={},maxLength:x,...C}){let{components:P}=a(),{control:T}=p();return m(s,{control:T,name:o,render:({field:n,fieldState:g})=>{let r=c||P?.text;if(!r)throw new Error(`Text component not found for field ${o}`);let y={name:o,description:d,label:l,type:F,onChange:e,metadata:u,maxLength:x,includeErrorMessage:f,...C};return m(r,{field:{...n,onChange:t(i=>{n.onChange(i),e?.(i)},"onChange")},fieldState:g,fieldData:y})}})}t(D,"TextField");export{D as a};
2
+ //# sourceMappingURL=chunk-GWR2JBG2.js.map
@@ -0,0 +1,2 @@
1
+ import{a as R,b as x,c as N,d as A}from"./chunk-XZLVP6EN.js";import{a as w,b as f}from"./chunk-BDJLITVT.js";import{a as C}from"./chunk-KESYJ5QG.js";import{b as B}from"./chunk-YUYHK6WD.js";import{a as i,b as t,e as F}from"./chunk-J63QA2JC.js";import{a as m}from"./chunk-P37U34EQ.js";import{MoreHorizontal as P}from"lucide-react";import{useState as U}from"react";import{Fragment as $,jsx as g,jsxs as T}from"react/jsx-runtime";function E({actions:e=[],className:n,label:a,"data-testid":l}){let[_,d]=U(!1);return T("div",{className:i("relative",n),children:[g(B,{"data-testid":l,variant:"ghost","aria-label":a,className:"h-8 w-8 p-0",onClick:()=>d(!_),children:g(P,{className:"h-4 w-4"})}),_&&T($,{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(E,"ActionsDropdown");import{ChevronDown as O,Info as Z}from"lucide-react";import K from"react-flagpack";import{useState as z}from"react";import{jsx as j,jsxs as L}from"react/jsx-runtime";var I=m(({children:e,content:n})=>L("div",{className:"relative inline-block group",children:[e,L("div",{className:"absolute bottom-full right-0 mb-2 px-3 py-2 bg-gray-900 text-white text-xs rounded-md opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50 w-64 whitespace-normal break-words",children:[n,j("div",{className:"absolute top-full right-3 border-4 border-transparent border-t-gray-900"})]})]}),"BasicTooltip");import{Fragment as b,jsx as o,jsxs as r}from"react/jsx-runtime";var V={GB:"GB-UKM"},Y=m(({title:e,country:n,region:a,annualGrossSalary:l,onDelete:_,onExportPdf:d,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:d},{label:"Delete",onClick:_}];return r("div",{className:"RemoteFlows__EstimationResults__Header flex justify-between",children:[r("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(K,{code:V[n.alpha_2_code]||n.alpha_2_code})}),r("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}),r("p",{className:"RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]",children:[n.name," ",a?` (${a.name})`:""]}),r("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(E,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),q=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 J({minimumOnboardingDays:e,data:n,className:a}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",a),children:r(x,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4",children:r("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&&r("span",{className:"RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4",children:[e," days"]})]})}),r(A,{className:"px-0 pb-4",children:[o("ul",{className:"RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2",children:n.steps.map(l=>r("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:l.title})," ","- ",l.description]},l.id))}),r("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[n.helpText,n.zendeskArticleId&&o(f,{zendeskId:n.zendeskArticleId,children:"Learn more"})]})]})]})})}m(J,"OnboardingTimeline");function Q({className:e,countryBenefitsUrl:n,countryGuideUrl:a,country:l}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__HiringSection w-full",e),children:r(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:r("span",{className:"text-base font-medium text-[#0F172A]",children:["Hiring in ",l.name]})})}),o(A,{children:r("div",{className:"flex flex-col gap-1",children:[a&&o("a",{href:a,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),n&&o("a",{href:n,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}m(Q,"HiringSection");function W({isMultipleCurrency:e,className:n}){return r("div",{className:i("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",n),children:[o("span",{"aria-hidden":!0}),e?r(b,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):r(b,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}m(W,"EstimationHeaders");function S({label:e,amounts:n,className:a,children:l}){let[_,d]=z(!0);return r("div",{className:i("RemoteFlows__EstimationResults__Row",a),children:[r("div",{className:"RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center",children:[r("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(O,{className:`h-4 w-4 text-muted-foreground transition-transform ${_?"rotate-180":""}`})})]}),Array.isArray(n)?n.map((c,u)=>o("span",{className:i("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:c},u)):r(b,{children:[o("span",{}),o("span",{className:i("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:n})]})]}),_&&l&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:l})]})}m(S,"EstimationRow");function X({item:e,isMultipleCurrency:n,level:a=0}){let[l,_]=z(!1),d=e.children&&e.children.length>0,c=a>0,u=e.isCollapsible||d;return r("li",{className:i("RemoteFlows__BreakdownList__Item pb-3",c&&"pb-1"),children:[r("div",{className:i(n?"RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between":"RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between"),children:[r("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?r("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(O,{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(I,{content:r(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(Z,{className:i("RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground",c?"h-3 w-3":"h-4 w-4")})})})]}),n?r(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(h,{items:e.children,isMultipleCurrency:n,level:a+1})})]})}m(X,"BreakdownListItem");function h({items:e,isMultipleCurrency:n,className:a,level:l}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",a),children:e.map((_,d)=>o(X,{item:_,isMultipleCurrency:n,level:l},d))})}m(h,"BreakdownList");var Re=m(({estimation:e,title:n,components:a,onDelete:l,onExportPdf:_,onEdit:d})=>{let c=a?.HiringSection||Q,u=a?.OnboardingTimeline||J,H=a?.Header||Y,v=a?.Footer,D=q(),p=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,k=e.employer_currency_costs.monthly_management_fee,M=e.region.code!==e.country.code,G=t(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code);return r(C,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(H,{title:n,annualGrossSalary:G,region:M?e.region:void 0,country:e.country,onDelete:l,onExportPdf:_,onEdit:d})}),r("div",{className:"RemoteFlows__Separator",children:[o(W,{isMultipleCurrency:p,className:"mb-3"}),o(S,{label:"Monthly total cost",amounts:p?[t(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),t(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.code)]:t(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),children:o(h,{items:[{label:"Gross monthly salary",regionalAmount:t(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.code),employerAmount:t(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:t(e.regional_currency_costs.monthly_contributions_total,e.regional_currency_costs.currency.code),employerAmount:t(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:t(e.regional_currency_costs.monthly_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:t(e.regional_currency_costs.monthly_benefits_total,e.regional_currency_costs.currency.code),employerAmount:t(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:t(e.regional_currency_costs.monthly_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...k?[{label:"Monthly fee",regionalAmount:t(e.regional_currency_costs.monthly_management_fee,e.regional_currency_costs.currency.code),employerAmount:t(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(S,{label:"Annual total cost",amounts:p?[t(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),t(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.code)]:t(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),children:o(h,{items:[{label:"Gross annual salary",dataSelector:"annual-gross-salary",regionalAmount:t(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.code)},{label:"Mandatory employer costs",regionalAmount:t(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.code),employerAmount:t(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:t(e.regional_currency_costs.annual_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:t(e.regional_currency_costs.annual_benefits_total,e.regional_currency_costs.currency.code),employerAmount:t(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:t(e.regional_currency_costs.annual_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(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:t(e.regional_currency_costs.extra_statutory_payments_total,e.regional_currency_costs.currency.code),employerAmount:t(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:t(e.regional_currency_costs.extra_statutory_payments_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...k?[{label:"Annual fee",regionalAmount:t(e.regional_currency_costs.annual_management_fee,e.regional_currency_costs.currency.code),employerAmount:t(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:D})}),o(c,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),v&&o(v,{})]})},"EstimationResults");export{Re as a};
2
+ //# sourceMappingURL=chunk-GZ2JKPBY.js.map