@remoteoss/remote-flows 1.23.0 → 1.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (288) hide show
  1. package/README.md +0 -4
  2. package/dist/CheckboxFieldDefault-55JIXW4D.js +2 -0
  3. package/dist/CountryFieldDefault-NX5GNCKS.js +2 -0
  4. package/dist/DatePickerFieldDefault-PRJ4Z72O.js +2 -0
  5. package/dist/EmailFieldDefault-TFQ5SQVC.js +2 -0
  6. package/dist/FileUploadFieldDefault-7ETO2SEZ.js +2 -0
  7. package/dist/MultiSelectFieldDefault-5TL5SL7W.js +2 -0
  8. package/dist/NumberFieldDefault-L7J22NRQ.js +2 -0
  9. package/dist/RadioGroupFieldDefault-B2ZRFHJ4.js +2 -0
  10. package/dist/SelectFieldDefault-AT6LLZNX.js +2 -0
  11. package/dist/TextAreaFieldDefault-2TV3WHKH.js +2 -0
  12. package/dist/TextFieldDefault-2GEILZPU.js +2 -0
  13. package/dist/WorkScheduleFieldDefault-XH4AEXSM.js +2 -0
  14. package/dist/{chunk-3MLYDDLK.js → chunk-2AYGZ4RY.js} +2 -2
  15. package/dist/{chunk-ITTXYDGV.js → chunk-2K2RK7RF.js} +2 -2
  16. package/dist/{chunk-VXMLYWZ2.js → chunk-2V4CTIAG.js} +2 -2
  17. package/dist/{chunk-2PDHYTZ2.js → chunk-4FMQTOXJ.js} +2 -2
  18. package/dist/{chunk-HVOYAQHI.js → chunk-6GCLDEJP.js} +2 -2
  19. package/dist/chunk-6GCLDEJP.js.map +1 -0
  20. package/dist/{chunk-HJ7WOTV7.js → chunk-6H4634RG.js} +2 -2
  21. package/dist/{chunk-4Q2FKKQU.js → chunk-6QEF52IP.js} +2 -2
  22. package/dist/{chunk-RKGD6XC7.js → chunk-7BGANM2R.js} +2 -2
  23. package/dist/{chunk-X6CON4YE.js → chunk-7QXULBD7.js} +2 -2
  24. package/dist/{chunk-S42DBWAF.js → chunk-7SO6WCYM.js} +2 -2
  25. package/dist/{chunk-AKFNSADJ.js → chunk-7V2QPZ2F.js} +2 -2
  26. package/dist/{chunk-6ORP3EVR.js → chunk-7ZFZYZSP.js} +2 -2
  27. package/dist/{chunk-VHLCM6IM.js → chunk-ADTGWDQ7.js} +2 -2
  28. package/dist/{chunk-AOSXULKY.js → chunk-AS6KFUXS.js} +2 -2
  29. package/dist/{chunk-JVHQ5EG3.js → chunk-AS77PXWM.js} +2 -2
  30. package/dist/{chunk-TGQTFWAB.js → chunk-B4E43MXD.js} +2 -2
  31. package/dist/chunk-BI4RFXFL.js +2 -0
  32. package/dist/chunk-BI4RFXFL.js.map +1 -0
  33. package/dist/{chunk-EFRT6C7V.js → chunk-BNQFPYNQ.js} +2 -2
  34. package/dist/{chunk-D5ABWBC6.js → chunk-BZAO32QW.js} +2 -2
  35. package/dist/{chunk-O6H66UM2.js → chunk-C32W6TCT.js} +2 -2
  36. package/dist/chunk-C4MRFGQG.js +2 -0
  37. package/dist/chunk-C4MRFGQG.js.map +1 -0
  38. package/dist/{chunk-6PYJAPM2.js → chunk-CKVI2UDU.js} +2 -2
  39. package/dist/chunk-CWAFRJAQ.js +2 -0
  40. package/dist/chunk-CWAFRJAQ.js.map +1 -0
  41. package/dist/{chunk-JEGVULKU.js → chunk-D5AO6SOM.js} +2 -2
  42. package/dist/{chunk-JEGVULKU.js.map → chunk-D5AO6SOM.js.map} +1 -1
  43. package/dist/chunk-DZXU45AS.js +2 -0
  44. package/dist/chunk-DZXU45AS.js.map +1 -0
  45. package/dist/{chunk-MGY23P25.js → chunk-ECGWCDC3.js} +2 -2
  46. package/dist/chunk-FAIEJW57.js +2 -0
  47. package/dist/{chunk-YHQQSL4Q.js.map → chunk-FAIEJW57.js.map} +1 -1
  48. package/dist/{chunk-YHCH57B7.js → chunk-G5O2CM6V.js} +2 -2
  49. package/dist/{chunk-JIW2JK7J.js → chunk-GOTY4N6S.js} +2 -2
  50. package/dist/{chunk-WQ4H5V7U.js → chunk-H2RAK6F7.js} +1 -1
  51. package/dist/chunk-H2RAK6F7.js.map +1 -0
  52. package/dist/{chunk-DNVTXLTP.js → chunk-H5PRUDCX.js} +2 -2
  53. package/dist/chunk-H5QXOIKS.js +2 -0
  54. package/dist/{chunk-TFSRZOMP.js.map → chunk-H5QXOIKS.js.map} +1 -1
  55. package/dist/{chunk-D4TLSPX5.js → chunk-HDH5PEOK.js} +2 -2
  56. package/dist/chunk-HDH5PEOK.js.map +1 -0
  57. package/dist/{chunk-4J36XOH2.js → chunk-HIFEVMKP.js} +2 -2
  58. package/dist/{chunk-JNMD7SWN.js → chunk-HNCOYMS5.js} +2 -2
  59. package/dist/{chunk-KEFIHTZ2.js → chunk-IJ2BGCAF.js} +2 -2
  60. package/dist/{chunk-2MTSUYN6.js → chunk-JF3KLAB5.js} +2 -2
  61. package/dist/{chunk-U33Q35CB.js → chunk-JI5PQLWS.js} +2 -2
  62. package/dist/{chunk-CJG77FUT.js → chunk-JKB4KOVF.js} +2 -2
  63. package/dist/{chunk-H3HNBOAE.js → chunk-JQJBDHAL.js} +2 -2
  64. package/dist/{chunk-GRE4RCPB.js → chunk-JTMJKRH7.js} +2 -2
  65. package/dist/chunk-JTMJKRH7.js.map +1 -0
  66. package/dist/{chunk-TJHW5QSC.js → chunk-K4YQQMHD.js} +2 -2
  67. package/dist/{chunk-D5K4NBOG.js → chunk-K5Y67GIG.js} +2 -2
  68. package/dist/{chunk-4EFT4EBW.js → chunk-KKMW7Q42.js} +2 -2
  69. package/dist/{chunk-5MDNW5H7.js → chunk-KM7CQTD5.js} +2 -2
  70. package/dist/{chunk-OIBZ7VUR.js → chunk-KXT6ACFL.js} +2 -2
  71. package/dist/{chunk-JAZLNJM3.js → chunk-LSVH4U4W.js} +2 -2
  72. package/dist/{chunk-ZEJRVVLJ.js → chunk-MG4PHNSS.js} +2 -2
  73. package/dist/{chunk-YIOLMWB5.js → chunk-MSEHAEEK.js} +2 -2
  74. package/dist/{chunk-S5VSWHJY.js → chunk-NAF6LRSS.js} +2 -2
  75. package/dist/{chunk-JJMBP6FU.js → chunk-NKMO2WW3.js} +2 -2
  76. package/dist/{chunk-TV2NNJVO.js → chunk-NNFWLL7F.js} +2 -2
  77. package/dist/{chunk-FXTOBTW4.js → chunk-OK2NP3L5.js} +2 -2
  78. package/dist/{chunk-WWXX3PU7.js → chunk-OQ5WZBDA.js} +2 -2
  79. package/dist/{chunk-HFQAVCD2.js → chunk-OWUINMZP.js} +2 -2
  80. package/dist/{chunk-5QOEBELF.js → chunk-PZAYG2DF.js} +2 -2
  81. package/dist/{chunk-KO264IE2.js → chunk-QLYFMDLB.js} +2 -2
  82. package/dist/{chunk-UEDPRIG7.js → chunk-R3BBN7TV.js} +2 -2
  83. package/dist/{chunk-HNTEGDI2.js → chunk-RDYN6W2A.js} +2 -2
  84. package/dist/{chunk-V3ZGBTES.js → chunk-SADMJJDB.js} +2 -2
  85. package/dist/{chunk-GECXYMDU.js → chunk-SXKIRVA2.js} +2 -2
  86. package/dist/{chunk-UVBIRNQ4.js → chunk-SXM3GJ5M.js} +2 -2
  87. package/dist/{chunk-M7KQPXCS.js → chunk-T4YYYCSD.js} +2 -2
  88. package/dist/{chunk-7DRY6YCN.js → chunk-TNYFIB6U.js} +2 -2
  89. package/dist/{chunk-NI3CJNG3.js → chunk-UJXUKEQU.js} +2 -2
  90. package/dist/chunk-UMLRTS3B.js +2 -0
  91. package/dist/chunk-UMLRTS3B.js.map +1 -0
  92. package/dist/{chunk-DPRCPBRB.js → chunk-UOA5WU4S.js} +2 -2
  93. package/dist/{chunk-X6PTF3PD.js → chunk-UQBKFWUI.js} +2 -2
  94. package/dist/{chunk-SQPCNBJC.js → chunk-VB6KFDBL.js} +2 -2
  95. package/dist/{chunk-ROQYHTFQ.js → chunk-VK7T332E.js} +2 -2
  96. package/dist/{chunk-4EU3AWEX.js → chunk-VWBA3U4U.js} +2 -2
  97. package/dist/{chunk-IN74TK34.js → chunk-VY6W6W6F.js} +2 -2
  98. package/dist/chunk-W6OOI5NF.js +2 -0
  99. package/dist/{chunk-PVZTOW7Z.js.map → chunk-W6OOI5NF.js.map} +1 -1
  100. package/dist/{chunk-K5HZE7M6.js → chunk-WFZGKBFS.js} +2 -2
  101. package/dist/{chunk-TRBEYNRN.js → chunk-WRRTZ2AL.js} +2 -2
  102. package/dist/{chunk-R7G5G45H.js → chunk-XBPTFEGC.js} +2 -2
  103. package/dist/chunk-XGRFWXUU.js +2 -0
  104. package/dist/chunk-XGRFWXUU.js.map +1 -0
  105. package/dist/chunk-YMJ3HQTG.js +2 -0
  106. package/dist/chunk-YMJ3HQTG.js.map +1 -0
  107. package/dist/{chunk-VL5TI4XT.js → chunk-YOFBRZUZ.js} +2 -2
  108. package/dist/default-components.js +1 -1
  109. package/dist/default-components.js.map +1 -1
  110. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +1 -1
  111. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  112. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  113. package/dist/flows/ContractAmendment/hooks.js +1 -1
  114. package/dist/flows/ContractAmendment/index.js +1 -1
  115. package/dist/flows/ContractAmendment/utils.js +1 -1
  116. package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
  117. package/dist/flows/ContractorOnboarding/api.js +1 -1
  118. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
  119. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
  120. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
  121. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
  122. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.js +1 -1
  123. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
  124. package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
  125. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
  126. package/dist/flows/ContractorOnboarding/hooks.js +1 -1
  127. package/dist/flows/ContractorOnboarding/index.js +1 -1
  128. package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
  129. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  130. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  131. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  132. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.js +1 -1
  133. package/dist/flows/CostCalculator/api.js +1 -1
  134. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  135. package/dist/flows/CostCalculator/hooks.js +1 -1
  136. package/dist/flows/CostCalculator/index.js +1 -1
  137. package/dist/flows/CostCalculator/utils.js +1 -1
  138. package/dist/flows/CreateCompany/CreateCompany.js +1 -1
  139. package/dist/flows/CreateCompany/api.js +1 -1
  140. package/dist/flows/CreateCompany/components/AddressDetailsStep.js +1 -1
  141. package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.js +1 -1
  142. package/dist/flows/CreateCompany/components/CreateCompanyForm.js +1 -1
  143. package/dist/flows/CreateCompany/hooks.js +1 -1
  144. package/dist/flows/CreateCompany/index.js +1 -1
  145. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  146. package/dist/flows/Onboarding/api.js +1 -1
  147. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  148. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  149. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  150. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  151. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  152. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  153. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  154. package/dist/flows/Onboarding/hooks.js +1 -1
  155. package/dist/flows/Onboarding/index.js +1 -1
  156. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  157. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  158. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  159. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  160. package/dist/flows/Termination/TerminationFlow.js +1 -1
  161. package/dist/flows/Termination/TerminationForm.js +1 -1
  162. package/dist/flows/Termination/api.js +1 -1
  163. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformation.js +1 -1
  164. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
  165. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
  166. package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
  167. package/dist/flows/Termination/hooks.js +1 -1
  168. package/dist/flows/Termination/index.js +1 -1
  169. package/dist/index.css +1 -1
  170. package/dist/index.css.map +1 -1
  171. package/dist/index.js +2 -2
  172. package/dist/index.js.map +1 -1
  173. package/dist/internals.d.ts +4 -2
  174. package/dist/internals.js +1 -1
  175. package/dist/styles.css +1 -1
  176. package/dist/styles.css.map +1 -1
  177. package/package.json +12 -9
  178. package/dist/CheckboxFieldDefault-SZZQUVAM.js +0 -2
  179. package/dist/CountryFieldDefault-IBVQJVMW.js +0 -2
  180. package/dist/DatePickerFieldDefault-5LEOVIM2.js +0 -2
  181. package/dist/EmailFieldDefault-2PMSDIXF.js +0 -2
  182. package/dist/FileUploadFieldDefault-Y2ZYBSTV.js +0 -2
  183. package/dist/MultiSelectFieldDefault-UK7652MS.js +0 -2
  184. package/dist/NumberFieldDefault-C5V6POQ7.js +0 -2
  185. package/dist/RadioGroupFieldDefault-DNESPKMT.js +0 -2
  186. package/dist/SelectFieldDefault-4KQUV57C.js +0 -2
  187. package/dist/TextAreaFieldDefault-5P2MEQUR.js +0 -2
  188. package/dist/TextFieldDefault-PMCQSPPT.js +0 -2
  189. package/dist/WorkScheduleFieldDefault-SR3G37MN.js +0 -2
  190. package/dist/chunk-6AAV34CT.js +0 -2
  191. package/dist/chunk-6AAV34CT.js.map +0 -1
  192. package/dist/chunk-7EONM7HL.js +0 -2
  193. package/dist/chunk-7EONM7HL.js.map +0 -1
  194. package/dist/chunk-D4TLSPX5.js.map +0 -1
  195. package/dist/chunk-EOMVTXER.js +0 -2
  196. package/dist/chunk-EOMVTXER.js.map +0 -1
  197. package/dist/chunk-GRE4RCPB.js.map +0 -1
  198. package/dist/chunk-HVOYAQHI.js.map +0 -1
  199. package/dist/chunk-LU265KXN.js +0 -2
  200. package/dist/chunk-LU265KXN.js.map +0 -1
  201. package/dist/chunk-PVZTOW7Z.js +0 -2
  202. package/dist/chunk-RGLQY27T.js +0 -2
  203. package/dist/chunk-RGLQY27T.js.map +0 -1
  204. package/dist/chunk-TFSRZOMP.js +0 -2
  205. package/dist/chunk-U4QOJDBZ.js +0 -2
  206. package/dist/chunk-U4QOJDBZ.js.map +0 -1
  207. package/dist/chunk-UTLIN5S6.js +0 -2
  208. package/dist/chunk-UTLIN5S6.js.map +0 -1
  209. package/dist/chunk-VKQQKGGY.js +0 -2
  210. package/dist/chunk-VKQQKGGY.js.map +0 -1
  211. package/dist/chunk-WQ4H5V7U.js.map +0 -1
  212. package/dist/chunk-YHQQSL4Q.js +0 -2
  213. /package/dist/{CheckboxFieldDefault-SZZQUVAM.js.map → CheckboxFieldDefault-55JIXW4D.js.map} +0 -0
  214. /package/dist/{CountryFieldDefault-IBVQJVMW.js.map → CountryFieldDefault-NX5GNCKS.js.map} +0 -0
  215. /package/dist/{DatePickerFieldDefault-5LEOVIM2.js.map → DatePickerFieldDefault-PRJ4Z72O.js.map} +0 -0
  216. /package/dist/{EmailFieldDefault-2PMSDIXF.js.map → EmailFieldDefault-TFQ5SQVC.js.map} +0 -0
  217. /package/dist/{FileUploadFieldDefault-Y2ZYBSTV.js.map → FileUploadFieldDefault-7ETO2SEZ.js.map} +0 -0
  218. /package/dist/{MultiSelectFieldDefault-UK7652MS.js.map → MultiSelectFieldDefault-5TL5SL7W.js.map} +0 -0
  219. /package/dist/{NumberFieldDefault-C5V6POQ7.js.map → NumberFieldDefault-L7J22NRQ.js.map} +0 -0
  220. /package/dist/{RadioGroupFieldDefault-DNESPKMT.js.map → RadioGroupFieldDefault-B2ZRFHJ4.js.map} +0 -0
  221. /package/dist/{SelectFieldDefault-4KQUV57C.js.map → SelectFieldDefault-AT6LLZNX.js.map} +0 -0
  222. /package/dist/{TextAreaFieldDefault-5P2MEQUR.js.map → TextAreaFieldDefault-2TV3WHKH.js.map} +0 -0
  223. /package/dist/{TextFieldDefault-PMCQSPPT.js.map → TextFieldDefault-2GEILZPU.js.map} +0 -0
  224. /package/dist/{WorkScheduleFieldDefault-SR3G37MN.js.map → WorkScheduleFieldDefault-XH4AEXSM.js.map} +0 -0
  225. /package/dist/{chunk-3MLYDDLK.js.map → chunk-2AYGZ4RY.js.map} +0 -0
  226. /package/dist/{chunk-ITTXYDGV.js.map → chunk-2K2RK7RF.js.map} +0 -0
  227. /package/dist/{chunk-VXMLYWZ2.js.map → chunk-2V4CTIAG.js.map} +0 -0
  228. /package/dist/{chunk-2PDHYTZ2.js.map → chunk-4FMQTOXJ.js.map} +0 -0
  229. /package/dist/{chunk-HJ7WOTV7.js.map → chunk-6H4634RG.js.map} +0 -0
  230. /package/dist/{chunk-4Q2FKKQU.js.map → chunk-6QEF52IP.js.map} +0 -0
  231. /package/dist/{chunk-RKGD6XC7.js.map → chunk-7BGANM2R.js.map} +0 -0
  232. /package/dist/{chunk-X6CON4YE.js.map → chunk-7QXULBD7.js.map} +0 -0
  233. /package/dist/{chunk-S42DBWAF.js.map → chunk-7SO6WCYM.js.map} +0 -0
  234. /package/dist/{chunk-AKFNSADJ.js.map → chunk-7V2QPZ2F.js.map} +0 -0
  235. /package/dist/{chunk-6ORP3EVR.js.map → chunk-7ZFZYZSP.js.map} +0 -0
  236. /package/dist/{chunk-VHLCM6IM.js.map → chunk-ADTGWDQ7.js.map} +0 -0
  237. /package/dist/{chunk-AOSXULKY.js.map → chunk-AS6KFUXS.js.map} +0 -0
  238. /package/dist/{chunk-JVHQ5EG3.js.map → chunk-AS77PXWM.js.map} +0 -0
  239. /package/dist/{chunk-TGQTFWAB.js.map → chunk-B4E43MXD.js.map} +0 -0
  240. /package/dist/{chunk-EFRT6C7V.js.map → chunk-BNQFPYNQ.js.map} +0 -0
  241. /package/dist/{chunk-D5ABWBC6.js.map → chunk-BZAO32QW.js.map} +0 -0
  242. /package/dist/{chunk-O6H66UM2.js.map → chunk-C32W6TCT.js.map} +0 -0
  243. /package/dist/{chunk-6PYJAPM2.js.map → chunk-CKVI2UDU.js.map} +0 -0
  244. /package/dist/{chunk-MGY23P25.js.map → chunk-ECGWCDC3.js.map} +0 -0
  245. /package/dist/{chunk-YHCH57B7.js.map → chunk-G5O2CM6V.js.map} +0 -0
  246. /package/dist/{chunk-JIW2JK7J.js.map → chunk-GOTY4N6S.js.map} +0 -0
  247. /package/dist/{chunk-DNVTXLTP.js.map → chunk-H5PRUDCX.js.map} +0 -0
  248. /package/dist/{chunk-4J36XOH2.js.map → chunk-HIFEVMKP.js.map} +0 -0
  249. /package/dist/{chunk-JNMD7SWN.js.map → chunk-HNCOYMS5.js.map} +0 -0
  250. /package/dist/{chunk-KEFIHTZ2.js.map → chunk-IJ2BGCAF.js.map} +0 -0
  251. /package/dist/{chunk-2MTSUYN6.js.map → chunk-JF3KLAB5.js.map} +0 -0
  252. /package/dist/{chunk-U33Q35CB.js.map → chunk-JI5PQLWS.js.map} +0 -0
  253. /package/dist/{chunk-CJG77FUT.js.map → chunk-JKB4KOVF.js.map} +0 -0
  254. /package/dist/{chunk-H3HNBOAE.js.map → chunk-JQJBDHAL.js.map} +0 -0
  255. /package/dist/{chunk-TJHW5QSC.js.map → chunk-K4YQQMHD.js.map} +0 -0
  256. /package/dist/{chunk-D5K4NBOG.js.map → chunk-K5Y67GIG.js.map} +0 -0
  257. /package/dist/{chunk-4EFT4EBW.js.map → chunk-KKMW7Q42.js.map} +0 -0
  258. /package/dist/{chunk-5MDNW5H7.js.map → chunk-KM7CQTD5.js.map} +0 -0
  259. /package/dist/{chunk-OIBZ7VUR.js.map → chunk-KXT6ACFL.js.map} +0 -0
  260. /package/dist/{chunk-JAZLNJM3.js.map → chunk-LSVH4U4W.js.map} +0 -0
  261. /package/dist/{chunk-ZEJRVVLJ.js.map → chunk-MG4PHNSS.js.map} +0 -0
  262. /package/dist/{chunk-YIOLMWB5.js.map → chunk-MSEHAEEK.js.map} +0 -0
  263. /package/dist/{chunk-S5VSWHJY.js.map → chunk-NAF6LRSS.js.map} +0 -0
  264. /package/dist/{chunk-JJMBP6FU.js.map → chunk-NKMO2WW3.js.map} +0 -0
  265. /package/dist/{chunk-TV2NNJVO.js.map → chunk-NNFWLL7F.js.map} +0 -0
  266. /package/dist/{chunk-FXTOBTW4.js.map → chunk-OK2NP3L5.js.map} +0 -0
  267. /package/dist/{chunk-WWXX3PU7.js.map → chunk-OQ5WZBDA.js.map} +0 -0
  268. /package/dist/{chunk-HFQAVCD2.js.map → chunk-OWUINMZP.js.map} +0 -0
  269. /package/dist/{chunk-5QOEBELF.js.map → chunk-PZAYG2DF.js.map} +0 -0
  270. /package/dist/{chunk-KO264IE2.js.map → chunk-QLYFMDLB.js.map} +0 -0
  271. /package/dist/{chunk-UEDPRIG7.js.map → chunk-R3BBN7TV.js.map} +0 -0
  272. /package/dist/{chunk-HNTEGDI2.js.map → chunk-RDYN6W2A.js.map} +0 -0
  273. /package/dist/{chunk-V3ZGBTES.js.map → chunk-SADMJJDB.js.map} +0 -0
  274. /package/dist/{chunk-GECXYMDU.js.map → chunk-SXKIRVA2.js.map} +0 -0
  275. /package/dist/{chunk-UVBIRNQ4.js.map → chunk-SXM3GJ5M.js.map} +0 -0
  276. /package/dist/{chunk-M7KQPXCS.js.map → chunk-T4YYYCSD.js.map} +0 -0
  277. /package/dist/{chunk-7DRY6YCN.js.map → chunk-TNYFIB6U.js.map} +0 -0
  278. /package/dist/{chunk-NI3CJNG3.js.map → chunk-UJXUKEQU.js.map} +0 -0
  279. /package/dist/{chunk-DPRCPBRB.js.map → chunk-UOA5WU4S.js.map} +0 -0
  280. /package/dist/{chunk-X6PTF3PD.js.map → chunk-UQBKFWUI.js.map} +0 -0
  281. /package/dist/{chunk-SQPCNBJC.js.map → chunk-VB6KFDBL.js.map} +0 -0
  282. /package/dist/{chunk-ROQYHTFQ.js.map → chunk-VK7T332E.js.map} +0 -0
  283. /package/dist/{chunk-4EU3AWEX.js.map → chunk-VWBA3U4U.js.map} +0 -0
  284. /package/dist/{chunk-IN74TK34.js.map → chunk-VY6W6W6F.js.map} +0 -0
  285. /package/dist/{chunk-K5HZE7M6.js.map → chunk-WFZGKBFS.js.map} +0 -0
  286. /package/dist/{chunk-TRBEYNRN.js.map → chunk-WRRTZ2AL.js.map} +0 -0
  287. /package/dist/{chunk-R7G5G45H.js.map → chunk-XBPTFEGC.js.map} +0 -0
  288. /package/dist/{chunk-VL5TI4XT.js.map → chunk-YOFBRZUZ.js.map} +0 -0
package/README.md CHANGED
@@ -246,7 +246,3 @@ We have created an entry point in the package `@remoteoss/remote-flows/internals
246
246
  This entry endpoint exports internals utils and shadcn components to avoid duplicating these on the `example` folder.
247
247
 
248
248
  We don't guarantee `semver` compatiblity if you used them in your project.
249
-
250
- ```
251
-
252
- ```
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-YMJ3HQTG.js";import"./chunk-C4MRFGQG.js";import"./chunk-R4X2WQXX.js";import"./chunk-G5O2CM6V.js";import"./chunk-CWAFRJAQ.js";import"./chunk-VIGKOVHP.js";import"./chunk-H2RAK6F7.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as CheckboxFieldDefault};
2
+ //# sourceMappingURL=CheckboxFieldDefault-55JIXW4D.js.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-T4YYYCSD.js";import"./chunk-VPSESR6G.js";import"./chunk-C4MRFGQG.js";import"./chunk-MSBCYMSH.js";import"./chunk-6JTHV4QS.js";import"./chunk-547UHEDI.js";import"./chunk-MP3VDCI7.js";import"./chunk-G5O2CM6V.js";import"./chunk-CWAFRJAQ.js";import"./chunk-VIGKOVHP.js";import"./chunk-H2RAK6F7.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as CountryFieldDefault};
2
+ //# sourceMappingURL=CountryFieldDefault-NX5GNCKS.js.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-UOA5WU4S.js";import"./chunk-C4MRFGQG.js";import"./chunk-MSBCYMSH.js";import"./chunk-MP3VDCI7.js";import"./chunk-G5O2CM6V.js";import"./chunk-CWAFRJAQ.js";import"./chunk-VIGKOVHP.js";import"./chunk-H2RAK6F7.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as DatePickerFieldDefault};
2
+ //# sourceMappingURL=DatePickerFieldDefault-PRJ4Z72O.js.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-HIFEVMKP.js";import"./chunk-6H4634RG.js";import"./chunk-CWAFRJAQ.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as EmailFieldDefault};
2
+ //# sourceMappingURL=EmailFieldDefault-TFQ5SQVC.js.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-2V4CTIAG.js";import"./chunk-3NESYBEJ.js";import"./chunk-MP3VDCI7.js";import"./chunk-CWAFRJAQ.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-P37U34EQ.js";export{a as FileUploadFieldDefault};
2
+ //# sourceMappingURL=FileUploadFieldDefault-7ETO2SEZ.js.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-FAIEJW57.js";import"./chunk-VPSESR6G.js";import"./chunk-MSBCYMSH.js";import"./chunk-6JTHV4QS.js";import"./chunk-547UHEDI.js";import"./chunk-MP3VDCI7.js";import"./chunk-CWAFRJAQ.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-P37U34EQ.js";export{a as MultiSelectFieldDefault};
2
+ //# sourceMappingURL=MultiSelectFieldDefault-5TL5SL7W.js.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-NNFWLL7F.js";import"./chunk-6H4634RG.js";import"./chunk-CWAFRJAQ.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as NumberFieldDefault};
2
+ //# sourceMappingURL=NumberFieldDefault-L7J22NRQ.js.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-W6OOI5NF.js";import"./chunk-C4MRFGQG.js";import"./chunk-SNBAM7SA.js";import"./chunk-G5O2CM6V.js";import"./chunk-CWAFRJAQ.js";import"./chunk-VIGKOVHP.js";import"./chunk-H2RAK6F7.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as RadioGroupFieldDefault};
2
+ //# sourceMappingURL=RadioGroupFieldDefault-B2ZRFHJ4.js.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-CKVI2UDU.js";import"./chunk-DXIJUMLU.js";import"./chunk-CWAFRJAQ.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-P37U34EQ.js";export{a as SelectFieldDefault};
2
+ //# sourceMappingURL=SelectFieldDefault-AT6LLZNX.js.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-OWUINMZP.js";import"./chunk-CWAFRJAQ.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-P37U34EQ.js";export{a as TextAreaFieldDefault};
2
+ //# sourceMappingURL=TextAreaFieldDefault-2TV3WHKH.js.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-KXT6ACFL.js";import"./chunk-7G5JSUZU.js";import"./chunk-CWAFRJAQ.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-P37U34EQ.js";export{a as TextFieldDefault};
2
+ //# sourceMappingURL=TextFieldDefault-2GEILZPU.js.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-ECGWCDC3.js";import"./chunk-547UHEDI.js";import"./chunk-AS6KFUXS.js";import"./chunk-MP3VDCI7.js";import"./chunk-6H4634RG.js";import"./chunk-CWAFRJAQ.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as WorkScheduleFieldDefault};
2
+ //# sourceMappingURL=WorkScheduleFieldDefault-XH4AEXSM.js.map
@@ -1,2 +1,2 @@
1
- import{a as S}from"./chunk-RKGD6XC7.js";import{a as e}from"./chunk-VAWEOFUO.js";import{a as s}from"./chunk-D5K4NBOG.js";import{a as p}from"./chunk-WD5DNUSS.js";import{a as c}from"./chunk-ITTXYDGV.js";import{a as l}from"./chunk-DPVXSN7T.js";import{a as i}from"./chunk-DNVTXLTP.js";import{a as m}from"./chunk-ZEJRVVLJ.js";import{a as f}from"./chunk-VHLCM6IM.js";import{a as u}from"./chunk-D5ABWBC6.js";import{a as d}from"./chunk-P3QDMRCC.js";import{a as n}from"./chunk-Q3ALCPJN.js";import{a}from"./chunk-GRE4RCPB.js";import{a as t}from"./chunk-P37U34EQ.js";import{useId as I,useRef as F,useMemo as y}from"react";import{jsx as D}from"react/jsx-runtime";var J=t(({render:g,employmentId:C,externalId:b,countryCode:v,skipSteps:B,initialValues:O,options:w})=>{let P=I(),o=F(void 0),R=y(()=>({setValue:o}),[]),r=a({options:{...w,onContractReviewed:t(()=>{o.current&&o.current("review_completed",!0)},"onContractReviewed")},employmentId:C,externalId:b,countryCode:v,skipSteps:B,initialValues:O});return D(n.Provider,{value:{contractorOnboardingBag:r,formId:P,formRef:R},children:g({contractorOnboardingBag:r,components:{BasicInformationStep:m,SelectCountryStep:i,BackButton:e,SubmitButton:p,PricingPlanStep:c,EligibilityQuestionnaireStep:S,ContractDetailsStep:f,ContractPreviewStep:u,OnboardingInvite:s,ContractReviewButton:d,SaveDraftButton:l}})})},"ContractorOnboardingFlow");export{J as a};
2
- //# sourceMappingURL=chunk-3MLYDDLK.js.map
1
+ import{a as S}from"./chunk-7BGANM2R.js";import{a as e}from"./chunk-VAWEOFUO.js";import{a as s}from"./chunk-K5Y67GIG.js";import{a as p}from"./chunk-WD5DNUSS.js";import{a as c}from"./chunk-2K2RK7RF.js";import{a as l}from"./chunk-DPVXSN7T.js";import{a as i}from"./chunk-H5PRUDCX.js";import{a as m}from"./chunk-MG4PHNSS.js";import{a as f}from"./chunk-ADTGWDQ7.js";import{a as u}from"./chunk-BZAO32QW.js";import{a as d}from"./chunk-P3QDMRCC.js";import{a as n}from"./chunk-Q3ALCPJN.js";import{a}from"./chunk-JTMJKRH7.js";import{a as t}from"./chunk-P37U34EQ.js";import{useId as I,useRef as F,useMemo as y}from"react";import{jsx as D}from"react/jsx-runtime";var J=t(({render:g,employmentId:C,externalId:b,countryCode:v,skipSteps:B,initialValues:O,options:w})=>{let P=I(),o=F(void 0),R=y(()=>({setValue:o}),[]),r=a({options:{...w,onContractReviewed:t(()=>{o.current&&o.current("review_completed",!0)},"onContractReviewed")},employmentId:C,externalId:b,countryCode:v,skipSteps:B,initialValues:O});return D(n.Provider,{value:{contractorOnboardingBag:r,formId:P,formRef:R},children:g({contractorOnboardingBag:r,components:{BasicInformationStep:m,SelectCountryStep:i,BackButton:e,SubmitButton:p,PricingPlanStep:c,EligibilityQuestionnaireStep:S,ContractDetailsStep:f,ContractPreviewStep:u,OnboardingInvite:s,ContractReviewButton:d,SaveDraftButton:l}})})},"ContractorOnboardingFlow");export{J as a};
2
+ //# sourceMappingURL=chunk-2AYGZ4RY.js.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-K5HZE7M6.js";import{b as e}from"./chunk-Q3ALCPJN.js";import{k as t}from"./chunk-VIGKOVHP.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-ITTXYDGV.js.map
1
+ import{a as s}from"./chunk-WFZGKBFS.js";import{b as e}from"./chunk-Q3ALCPJN.js";import{k as t}from"./chunk-VIGKOVHP.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-2K2RK7RF.js.map
@@ -1,2 +1,2 @@
1
- import{i as a,j as i,k as s,l as p,m as F}from"./chunk-7EONM7HL.js";import{a as n}from"./chunk-3NESYBEJ.js";import{a as t}from"./chunk-VIGKOVHP.js";import{a as r}from"./chunk-P37U34EQ.js";import{jsx as e,jsxs as U}from"react/jsx-runtime";function b({field:o,fieldState:_,fieldData:c}){let{name:l,label:d,description:m,multiple:f,accept:u}=c;return U(a,{"data-field":l,className:`RemoteFlows__FileUpload__Item__${l}`,children:[e(i,{className:"RemoteFlows__FileUpload__Label",children:d}),e(s,{children:e(n,{onChange:o.onChange,multiple:f,className:t("RemoteFlows__FileUpload__Input"),accept:u,files:o.value})}),m&&e("div",{className:"flex items-center justify-between",children:e(p,{className:"RemoteFlows__FileUpload__Description",children:m})}),_.error&&e(F,{className:"RemoteFlows__FileUpload__Error"})]})}r(b,"FileUploadFieldDefault");export{b as a};
2
- //# sourceMappingURL=chunk-VXMLYWZ2.js.map
1
+ import{a as n}from"./chunk-3NESYBEJ.js";import{j as a,k as i,l as s,m as p,n as F}from"./chunk-CWAFRJAQ.js";import{a as t}from"./chunk-VIGKOVHP.js";import{a as r}from"./chunk-P37U34EQ.js";import{jsx as e,jsxs as U}from"react/jsx-runtime";function b({field:o,fieldState:_,fieldData:c}){let{name:l,label:d,description:m,multiple:f,accept:u}=c;return U(a,{"data-field":l,className:`RemoteFlows__FileUpload__Item__${l}`,children:[e(i,{className:"RemoteFlows__FileUpload__Label",children:d}),e(s,{children:e(n,{onChange:o.onChange,multiple:f,className:t("RemoteFlows__FileUpload__Input"),accept:u,files:o.value})}),m&&e("div",{className:"flex items-center justify-between",children:e(p,{className:"RemoteFlows__FileUpload__Description",children:m})}),_.error&&e(F,{className:"RemoteFlows__FileUpload__Error"})]})}r(b,"FileUploadFieldDefault");export{b as a};
2
+ //# sourceMappingURL=chunk-2V4CTIAG.js.map
@@ -1,2 +1,2 @@
1
- import{a as n}from"./chunk-KO264IE2.js";import{b as i}from"./chunk-76ZDXC2T.js";import{k as a}from"./chunk-VIGKOVHP.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as c}from"react/jsx-runtime";function C({onSubmit:m,onSuccess:l,onError:t}){let{createCompanyBag:e}=i(),p=o(async d=>{try{await m?.(d);let r=await e.onSubmit(d);if(r?.data){await l?.(r?.data);return}if(r?.error){let s=a(r,e.meta?.fields?.address_details);t?.(s)}}catch(r){let s=a(r,e.meta?.fields?.address_details);t?.(s)}},"handleSubmit"),u=e.stepState.values?.address_details||e.initialValues.address_details;return c(n,{defaultValues:u,onSubmit:p})}o(C,"AddressDetailsStep");export{C as a};
2
- //# sourceMappingURL=chunk-2PDHYTZ2.js.map
1
+ import{a as n}from"./chunk-QLYFMDLB.js";import{b as i}from"./chunk-76ZDXC2T.js";import{k as a}from"./chunk-VIGKOVHP.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as c}from"react/jsx-runtime";function C({onSubmit:m,onSuccess:l,onError:t}){let{createCompanyBag:e}=i(),p=o(async d=>{try{await m?.(d);let r=await e.onSubmit(d);if(r?.data){await l?.(r?.data);return}if(r?.error){let s=a(r,e.meta?.fields?.address_details);t?.(s)}}catch(r){let s=a(r,e.meta?.fields?.address_details);t?.(s)}},"handleSubmit"),u=e.stepState.values?.address_details||e.initialValues.address_details;return c(n,{defaultValues:u,onSubmit:p})}o(C,"AddressDetailsStep");export{C as a};
2
+ //# sourceMappingURL=chunk-4FMQTOXJ.js.map
@@ -1,2 +1,2 @@
1
- import{a as W}from"./chunk-TRBEYNRN.js";import{a as Y}from"./chunk-CJG77FUT.js";import{a as Q}from"./chunk-YWOJ4NKF.js";import{a as J}from"./chunk-VL5TI4XT.js";import{a as H}from"./chunk-IF42CZJH.js";import{a as U}from"./chunk-6DHV4GT6.js";import{a as q,b as B,c as L,d as z}from"./chunk-L5DII4MV.js";import{f as Z,g as K}from"./chunk-GECXYMDU.js";import{a as R}from"./chunk-ZXGAFQXW.js";import{a as S}from"./chunk-RAH453TV.js";import{a as N}from"./chunk-YIOLMWB5.js";import{a as E}from"./chunk-S5VSWHJY.js";import{e as _}from"./chunk-JEGVULKU.js";import{a as u,b as v}from"./chunk-YHCH57B7.js";import{q as $}from"./chunk-WQ4H5V7U.js";import{a as D}from"./chunk-VIGKOVHP.js";import{a as w}from"./chunk-X6ZAR7ZL.js";import{a as A}from"./chunk-TSPDJUGG.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-HVOYAQHI.js.map
1
+ import{a as W}from"./chunk-WRRTZ2AL.js";import{a as Y}from"./chunk-JKB4KOVF.js";import{a as Q}from"./chunk-YWOJ4NKF.js";import{a as J}from"./chunk-YOFBRZUZ.js";import{a as H}from"./chunk-IF42CZJH.js";import{a as U}from"./chunk-6DHV4GT6.js";import{a as q,b as B,c as L,d as z}from"./chunk-L5DII4MV.js";import{f as Z,g as K}from"./chunk-SXKIRVA2.js";import{a as R}from"./chunk-ZXGAFQXW.js";import{a as S}from"./chunk-RAH453TV.js";import{a as N}from"./chunk-MSEHAEEK.js";import{a as E}from"./chunk-NAF6LRSS.js";import{e as _}from"./chunk-D5AO6SOM.js";import{a as u,b as v}from"./chunk-G5O2CM6V.js";import{a as D}from"./chunk-VIGKOVHP.js";import{q as $}from"./chunk-H2RAK6F7.js";import{a as w}from"./chunk-X6ZAR7ZL.js";import{a as A}from"./chunk-TSPDJUGG.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-6GCLDEJP.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{c as p,h as s}from"./chunk-7EONM7HL.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-HJ7WOTV7.js.map
1
+ import{c as p,i as s}from"./chunk-CWAFRJAQ.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-6H4634RG.js.map
@@ -1,2 +1,2 @@
1
- import{b as w}from"./chunk-PGWKJ6FK.js";import{d as v,e as y}from"./chunk-U4QOJDBZ.js";import{a as i}from"./chunk-X6ZAR7ZL.js";import{b as l}from"./chunk-KQPDXXG3.js";import{a as s}from"./chunk-P37U34EQ.js";import{jsx as _}from"react/jsx-runtime";function P({onSubmit:f,onSuccess:a,onError:t,render:E,...o}){let{components:R}=l(),{onboardingBag:r,setCreditScore:m}=w(),d=v(),u=y(),{mutateAsync:g}=i(d),{mutateAsync:S}=i(u),c=r.creditRiskStatus==="deposit_required"||r.onboardingReservesStatus==="deposit_required",I=s(async()=>{try{if(await f?.(),c&&r.employmentId&&r.employment?.status&&!r.isEmploymentReadOnly){let e=await S({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 g({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"),b=c&&r.employment?.status&&!r.isEmploymentReadOnly,p=R?.button;if(!p)throw new Error("Button component not found");return _(p,{...o,disabled:d.isPending||u.isPending||o.disabled,onClick:e=>{I(),o.onClick?.(e)},children:E({employmentStatus:b?"created_awaiting_reserve":"invited"})})}s(P,"OnboardingInvite");export{P as a};
2
- //# sourceMappingURL=chunk-4Q2FKKQU.js.map
1
+ import{b as w}from"./chunk-PGWKJ6FK.js";import{d as v,e as y}from"./chunk-UMLRTS3B.js";import{a as i}from"./chunk-X6ZAR7ZL.js";import{b as l}from"./chunk-KQPDXXG3.js";import{a as s}from"./chunk-P37U34EQ.js";import{jsx as _}from"react/jsx-runtime";function P({onSubmit:f,onSuccess:a,onError:t,render:E,...o}){let{components:R}=l(),{onboardingBag:r,setCreditScore:m}=w(),d=v(),u=y(),{mutateAsync:g}=i(d),{mutateAsync:S}=i(u),c=r.creditRiskStatus==="deposit_required"||r.onboardingReservesStatus==="deposit_required",I=s(async()=>{try{if(await f?.(),c&&r.employmentId&&r.employment?.status&&!r.isEmploymentReadOnly){let e=await S({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 g({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"),b=c&&r.employment?.status&&!r.isEmploymentReadOnly,p=R?.button;if(!p)throw new Error("Button component not found");return _(p,{...o,disabled:d.isPending||u.isPending||o.disabled,onClick:e=>{I(),o.onClick?.(e)},children:E({employmentStatus:b?"created_awaiting_reserve":"invited"})})}s(P,"OnboardingInvite");export{P as a};
2
+ //# sourceMappingURL=chunk-6QEF52IP.js.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-K5HZE7M6.js";import{b as a}from"./chunk-Q3ALCPJN.js";import{k as n}from"./chunk-VIGKOVHP.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as b}from"react/jsx-runtime";function g({onSubmit:l,onSuccess:u,onError:d}){let{contractorOnboardingBag:i}=a(),m=e(async t=>{try{let o=await i.parseFormValues(t);await l?.(o);let r=await i.onSubmit(t);if(r?.data){await u?.(r?.data),r?._skipNextStep||i?.next();return}}catch(o){let r=n(o,i.meta?.fields?.eligibility_questionnaire);d?.(r)}},"handleSubmit"),p=i.stepState.values?.eligibility_questionnaire||i.initialValues.eligibility_questionnaire;return b(s,{defaultValues:p,onSubmit:m})}e(g,"EligibilityQuestionnaireStep");export{g as a};
2
- //# sourceMappingURL=chunk-RKGD6XC7.js.map
1
+ import{a as s}from"./chunk-WFZGKBFS.js";import{b as a}from"./chunk-Q3ALCPJN.js";import{k as n}from"./chunk-VIGKOVHP.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as b}from"react/jsx-runtime";function g({onSubmit:l,onSuccess:u,onError:d}){let{contractorOnboardingBag:i}=a(),m=e(async t=>{try{let o=await i.parseFormValues(t);await l?.(o);let r=await i.onSubmit(t);if(r?.data){await u?.(r?.data),r?._skipNextStep||i?.next();return}}catch(o){let r=n(o,i.meta?.fields?.eligibility_questionnaire);d?.(r)}},"handleSubmit"),p=i.stepState.values?.eligibility_questionnaire||i.initialValues.eligibility_questionnaire;return b(s,{defaultValues:p,onSubmit:m})}e(g,"EligibilityQuestionnaireStep");export{g as a};
2
+ //# sourceMappingURL=chunk-7BGANM2R.js.map
@@ -1,2 +1,2 @@
1
- import{a as n,b as i}from"./chunk-YHCH57B7.js";import{a as e}from"./chunk-VIGKOVHP.js";import{a as o}from"./chunk-P37U34EQ.js";import{Fragment as s,jsx as t,jsxs as r}from"react/jsx-runtime";var l=["You submit your termination request.","Remote reviews your request along with the employment agreement, local labor laws, and any collective bargaining agreements in place.","A lifecycle specialist contacts you if they need additional details. Sometimes they will request a call.","Depending on the country-specific laws and the terms of the employment agreement, Remote may need to seek additional legal advice. We\u2019ll let you know if there are additional charges before proceeding.","Terms and conditions for the termination are finalized.","You verbally communicate the termination to the employee.","Remote shares termination documents with the employee.","The employee signs the termination documents if required.","Remote processes the final salary and offboards the employee."],f=o(()=>r(s,{children:[t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__Title"),children:"Please read carefully before you continue"}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description"),children:"Please do not inform the employee of the termination. Remote will lead communication with them after you submit this form and they finalize the termination terms."}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription"),children:"If you already informed them, that's okay. Remote will ask for the details regarding that communication and they'll take it from there."}),t(i,{className:e("RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm"),zendeskId:n.terminationEmployeeCommunication,children:"Learn more about employee communication"}),t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessTitle"),children:"The termination process"}),t("ul",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessList list-disc list-inside"),children:l.map((a,m)=>t("li",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessListItem"),children:a},m))})]}),"TerminationDialogInfoContent");export{f as a};
2
- //# sourceMappingURL=chunk-X6CON4YE.js.map
1
+ import{a as n,b as i}from"./chunk-G5O2CM6V.js";import{a as e}from"./chunk-VIGKOVHP.js";import{a as o}from"./chunk-P37U34EQ.js";import{Fragment as s,jsx as t,jsxs as r}from"react/jsx-runtime";var l=["You submit your termination request.","Remote reviews your request along with the employment agreement, local labor laws, and any collective bargaining agreements in place.","A lifecycle specialist contacts you if they need additional details. Sometimes they will request a call.","Depending on the country-specific laws and the terms of the employment agreement, Remote may need to seek additional legal advice. We\u2019ll let you know if there are additional charges before proceeding.","Terms and conditions for the termination are finalized.","You verbally communicate the termination to the employee.","Remote shares termination documents with the employee.","The employee signs the termination documents if required.","Remote processes the final salary and offboards the employee."],f=o(()=>r(s,{children:[t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__Title"),children:"Please read carefully before you continue"}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description"),children:"Please do not inform the employee of the termination. Remote will lead communication with them after you submit this form and they finalize the termination terms."}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription"),children:"If you already informed them, that's okay. Remote will ask for the details regarding that communication and they'll take it from there."}),t(i,{className:e("RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm"),zendeskId:n.terminationEmployeeCommunication,children:"Learn more about employee communication"}),t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessTitle"),children:"The termination process"}),t("ul",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessList list-disc list-inside"),children:l.map((a,m)=>t("li",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessListItem"),children:a},m))})]}),"TerminationDialogInfoContent");export{f as a};
2
+ //# sourceMappingURL=chunk-7QXULBD7.js.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-HNTEGDI2.js";import{b as a}from"./chunk-PGWKJ6FK.js";import{f as t}from"./chunk-JEGVULKU.js";import{b as s}from"./chunk-X6ZAR7ZL.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function P({components:d,onSubmit:l,onError:i,onSuccess:f}){let{onboardingBag:o}=a(),p=o.fields??[],c=t(p,o.initialValues.benefits);return E(m,{defaultValues:c,components:d,onSubmit:e(async n=>{try{await l?.(n);let r=await o.onSubmit(n);if(r?.data){await f?.(r.data),o?.next();return}if(r?.error){let u=s(r?.fieldErrors||[],o.meta?.fields?.benefits);i?.({error:r.error,rawError:r.rawError,fieldErrors:u})}}catch(r){i?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit")})}e(P,"BenefitsStep");export{P as a};
2
- //# sourceMappingURL=chunk-S42DBWAF.js.map
1
+ import{a as m}from"./chunk-RDYN6W2A.js";import{b as a}from"./chunk-PGWKJ6FK.js";import{f as t}from"./chunk-D5AO6SOM.js";import{b as s}from"./chunk-X6ZAR7ZL.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function P({components:d,onSubmit:l,onError:i,onSuccess:f}){let{onboardingBag:o}=a(),p=o.fields??[],c=t(p,o.initialValues.benefits);return E(m,{defaultValues:c,components:d,onSubmit:e(async n=>{try{await l?.(n);let r=await o.onSubmit(n);if(r?.data){await f?.(r.data),o?.next();return}if(r?.error){let u=s(r?.fieldErrors||[],o.meta?.fields?.benefits);i?.({error:r.error,rawError:r.rawError,fieldErrors:u})}}catch(r){i?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit")})}e(P,"BenefitsStep");export{P as a};
2
+ //# sourceMappingURL=chunk-7SO6WCYM.js.map
@@ -1,2 +1,2 @@
1
- import{a as p}from"./chunk-S5VSWHJY.js";import{C as c,I as m,M as C,R as d,m as l,v as u}from"./chunk-WQ4H5V7U.js";import{d as o}from"./chunk-KQPDXXG3.js";import{a as t}from"./chunk-P37U34EQ.js";import{useMutation as a,useQuery as r}from"@tanstack/react-query";var h=t(({includePremiumBenefits:e})=>{let{client:i}=o();return r({queryKey:["cost-calculator-countries",e],queryFn:t(()=>c({client:i,query:{include_premium_benefits:e}}),"queryFn"),select:t(s=>s.data?.data.filter(n=>n.availability==="active").map(n=>({value:n.region_slug,label:n.name,childRegions:n.child_regions,hasAdditionalFields:n.has_additional_fields,regionSlug:n.region_slug,currency:n.currency.code})),"select")})},"useCostCalculatorCountries"),q=t(()=>{let{client:e}=o();return r({queryKey:["company-currencies"],queryFn:t(()=>d({client:e}),"queryFn"),select:t(i=>i.data?.data?.company_currencies.map(s=>({value:s.slug,label:s.code})),"select")})},"useCompanyCurrencies"),x=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>l({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimation"),P=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>u({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimationPdf"),v=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>C({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimationCsv"),S=t((e,{includePremiumBenefits:i,options:s})=>{let{client:n}=o();return r({queryKey:["cost-calculator-region-fields",e,i],queryFn:t(()=>m({client:n,path:{slug:e},query:{include_premium_benefits:i}}),"queryFn"),enabled:!!e,select:t(({data:f})=>{let y=f?.data?.schema||{};return p(y,void 0,s)},"select")})},"useRegionFields");export{h as a,q as b,x as c,P as d,v as e,S as f};
2
- //# sourceMappingURL=chunk-AKFNSADJ.js.map
1
+ import{a as p}from"./chunk-NAF6LRSS.js";import{C as c,I as m,M as C,R as d,m as l,v as u}from"./chunk-H2RAK6F7.js";import{d as o}from"./chunk-KQPDXXG3.js";import{a as t}from"./chunk-P37U34EQ.js";import{useMutation as a,useQuery as r}from"@tanstack/react-query";var h=t(({includePremiumBenefits:e})=>{let{client:i}=o();return r({queryKey:["cost-calculator-countries",e],queryFn:t(()=>c({client:i,query:{include_premium_benefits:e}}),"queryFn"),select:t(s=>s.data?.data.filter(n=>n.availability==="active").map(n=>({value:n.region_slug,label:n.name,childRegions:n.child_regions,hasAdditionalFields:n.has_additional_fields,regionSlug:n.region_slug,currency:n.currency.code})),"select")})},"useCostCalculatorCountries"),q=t(()=>{let{client:e}=o();return r({queryKey:["company-currencies"],queryFn:t(()=>d({client:e}),"queryFn"),select:t(i=>i.data?.data?.company_currencies.map(s=>({value:s.slug,label:s.code})),"select")})},"useCompanyCurrencies"),x=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>l({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimation"),P=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>u({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimationPdf"),v=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>C({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimationCsv"),S=t((e,{includePremiumBenefits:i,options:s})=>{let{client:n}=o();return r({queryKey:["cost-calculator-region-fields",e,i],queryFn:t(()=>m({client:n,path:{slug:e},query:{include_premium_benefits:i}}),"queryFn"),enabled:!!e,select:t(({data:f})=>{let y=f?.data?.schema||{};return p(y,void 0,s)},"select")})},"useRegionFields");export{h as a,q as b,x as c,P as d,v as e,S as f};
2
+ //# sourceMappingURL=chunk-7V2QPZ2F.js.map
@@ -1,2 +1,2 @@
1
- import{e as a}from"./chunk-JEGVULKU.js";import{f as n,g as m}from"./chunk-7EONM7HL.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-6ORP3EVR.js.map
1
+ import{e as a}from"./chunk-D5AO6SOM.js";import{f as n,h as m}from"./chunk-CWAFRJAQ.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-7ZFZYZSP.js.map
@@ -1,2 +1,2 @@
1
- import{a as d}from"./chunk-3C6N7DK6.js";import{a as c}from"./chunk-K5HZE7M6.js";import{b as s}from"./chunk-Q3ALCPJN.js";import{c as l}from"./chunk-AHRG5QCS.js";import{k as e}from"./chunk-VIGKOVHP.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as m,jsxs as g}from"react/jsx-runtime";function O({onSubmit:p,onSuccess:u,onError:S}){let{contractorOnboardingBag:r}=s(),C=a(async n=>{try{let t=await r.parseFormValues(n);await p?.(t);let o=await r.onSubmit(n);if(o?.data){await u?.(o?.data),r?.next();return}}catch(t){let o=e(t,r.meta?.fields?.contract_details);S?.(o)}},"handleSubmit"),f=r.stepState.values?.contract_details||r.initialValues.contract_details,i=r.stepState.values?.pricing_plan?.subscription,b=l(i);return g("div",{className:"space-y-4",children:[m(c,{defaultValues:f,onSubmit:C}),b&&m(d,{subscription:i})]})}a(O,"ContractDetailsStep");export{O as a};
2
- //# sourceMappingURL=chunk-VHLCM6IM.js.map
1
+ import{a as d}from"./chunk-3C6N7DK6.js";import{a as c}from"./chunk-WFZGKBFS.js";import{b as s}from"./chunk-Q3ALCPJN.js";import{c as l}from"./chunk-AHRG5QCS.js";import{k as e}from"./chunk-VIGKOVHP.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as m,jsxs as g}from"react/jsx-runtime";function O({onSubmit:p,onSuccess:u,onError:S}){let{contractorOnboardingBag:r}=s(),C=a(async n=>{try{let t=await r.parseFormValues(n);await p?.(t);let o=await r.onSubmit(n);if(o?.data){await u?.(o?.data),r?.next();return}}catch(t){let o=e(t,r.meta?.fields?.contract_details);S?.(o)}},"handleSubmit"),f=r.stepState.values?.contract_details||r.initialValues.contract_details,i=r.stepState.values?.pricing_plan?.subscription,b=l(i);return g("div",{className:"space-y-4",children:[m(c,{defaultValues:f,onSubmit:C}),b&&m(d,{subscription:i})]})}a(O,"ContractDetailsStep");export{O as a};
2
+ //# sourceMappingURL=chunk-ADTGWDQ7.js.map
@@ -1,2 +1,2 @@
1
- import{c as x,h as _}from"./chunk-7EONM7HL.js";import{b as C}from"./chunk-KQPDXXG3.js";import{a}from"./chunk-P37U34EQ.js";import D from"lodash.groupby";import $ from"lodash.capitalize";var S=60,F=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"];function M(e){if(e<60)return`${e}m`;let s=Math.floor(e/S),n=e%S;return n>0?`${s}h${n}m`:`${s}h`}a(M,"convertBreakDurationToHours");function O(e){let s=e.reduce((n,u)=>u.hours+n,0);return Number(s.toFixed(2))}a(O,"calculateTotalWorkHours");function H(e,s){let n=s.map(({day:c})=>c.toLowerCase()),u=n.indexOf(e),i=null;for(;u<n.length&&!i;){let c=n[u],k=n[u+1],r=F.indexOf(c)+1;F[r]===k||(i=c),u+=1}return i}a(H,"findLastConsecutiveDay");function N(e){return e.start_time&&e.end_time&&(typeof e.hours=="number"?e.hours:Number.parseInt(e.hours))>0}a(N,"shouldSummarizeSchedule");function T(e){return Number.parseInt(e.break_duration_minutes)>0}a(T,"shouldSummarizeBreaks");function I(e){let s=e.filter(N),n=D(s,r=>`${r.start_time}|${r.end_time}`),u=e.filter(T),i=D(u,"break_duration_minutes"),c=Object.keys(n).map(r=>{let o=n[r],y=o[0].day,[p,h]=r.split("|"),t=`from <span>${p.replace(":","h")}</span> to <span>${h.replace(":","h")}</span>`,d=H(y,o),m=(d?o.findIndex(f=>f.day===d):-1)===o.length-1;return o.length===1?`${$(y)}, ${t}`:!m||!d?o.reduce((f,b,v)=>{let g=$(b.day);return v===o.length-1?`${f}and ${g}, ${t}`:`${f}<span>${g}</span>, `},""):`<span>${$(y)}</span> to <span>${$(d)}</span>, ${t}`}),k=Object.keys(i).reverse().map((r,o)=>{let y=o===0,p=i[r],h=M(parseInt(r,10));if(Object.keys(i).length===1)return`With ${h} daily breaks`;if(p.length===1){let t=`${h} break on ${$(p[0].day)}.`;return y?`With ${t}`:t}return p.reduce((t,d,l)=>{let m=$(d.day);return l===0?`${t} ${m}`:l===p.length-1?`${t}, and ${m}.`:`${t}, ${m}`},y?`With ${h} break on`:`${h} break on`)});return{workHoursSummary:c,breakSummary:k}}a(I,"buildWorkScheduleSummary");function P(e){let{checked:s,start_time:n,end_time:u,break_duration_minutes:i}=e;if(!s)return 0;let[c,k]=n.split(":").map(Number),[r,o]=u.split(":").map(Number),y=c*60+k,t=(r*60+o-y-Number.parseInt(i||"0"))/60;return t===Math.floor(t)?t:Number(t.toFixed(2))}a(P,"calculateHours");var w={monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat",sunday:"Sun"};function R(e){return w[e]}a(R,"getShortWeekday");import{jsx as W}from"react/jsx-runtime";function U({name:e,defaultValue:s,description:n,label:u,onChange:i,multiple:c,options:k,component:r,...o}){let{components:y}=C(),{control:p}=x(),h=a((t,d,l)=>{if(c&&l){let m=t.value?[...t.value]:[];d?m.includes(l)||t.onChange([...m,l]):t.onChange(m.filter(f=>f!==l))}else t.onChange(d)},"handleCheckboxChange");return W(_,{control:p,name:e,defaultValue:s,render:({field:t,fieldState:d})=>{let l=r||y?.checkbox;if(!l)throw new Error(`Checkbox component not found for field ${e}`);let m={name:e,description:n,label:u,defaultValue:s,multiple:c,options:k,...o};return W(l,{field:{...t,onChange:a((f,b)=>{h(t,f,b),i?.(f,b)},"onChange")},fieldState:d,fieldData:m})}})}a(U,"CheckBoxField");export{F as a,O as b,I as c,P as d,R as e,U as f};
2
- //# sourceMappingURL=chunk-AOSXULKY.js.map
1
+ import{c as x,i as _}from"./chunk-CWAFRJAQ.js";import{b as C}from"./chunk-KQPDXXG3.js";import{a}from"./chunk-P37U34EQ.js";import D from"lodash.groupby";import $ from"lodash.capitalize";var S=60,F=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"];function M(e){if(e<60)return`${e}m`;let s=Math.floor(e/S),n=e%S;return n>0?`${s}h${n}m`:`${s}h`}a(M,"convertBreakDurationToHours");function O(e){let s=e.reduce((n,u)=>u.hours+n,0);return Number(s.toFixed(2))}a(O,"calculateTotalWorkHours");function H(e,s){let n=s.map(({day:c})=>c.toLowerCase()),u=n.indexOf(e),i=null;for(;u<n.length&&!i;){let c=n[u],k=n[u+1],r=F.indexOf(c)+1;F[r]===k||(i=c),u+=1}return i}a(H,"findLastConsecutiveDay");function N(e){return e.start_time&&e.end_time&&(typeof e.hours=="number"?e.hours:Number.parseInt(e.hours))>0}a(N,"shouldSummarizeSchedule");function T(e){return Number.parseInt(e.break_duration_minutes)>0}a(T,"shouldSummarizeBreaks");function I(e){let s=e.filter(N),n=D(s,r=>`${r.start_time}|${r.end_time}`),u=e.filter(T),i=D(u,"break_duration_minutes"),c=Object.keys(n).map(r=>{let o=n[r],y=o[0].day,[p,h]=r.split("|"),t=`from <span>${p.replace(":","h")}</span> to <span>${h.replace(":","h")}</span>`,d=H(y,o),m=(d?o.findIndex(f=>f.day===d):-1)===o.length-1;return o.length===1?`${$(y)}, ${t}`:!m||!d?o.reduce((f,b,v)=>{let g=$(b.day);return v===o.length-1?`${f}and ${g}, ${t}`:`${f}<span>${g}</span>, `},""):`<span>${$(y)}</span> to <span>${$(d)}</span>, ${t}`}),k=Object.keys(i).reverse().map((r,o)=>{let y=o===0,p=i[r],h=M(parseInt(r,10));if(Object.keys(i).length===1)return`With ${h} daily breaks`;if(p.length===1){let t=`${h} break on ${$(p[0].day)}.`;return y?`With ${t}`:t}return p.reduce((t,d,l)=>{let m=$(d.day);return l===0?`${t} ${m}`:l===p.length-1?`${t}, and ${m}.`:`${t}, ${m}`},y?`With ${h} break on`:`${h} break on`)});return{workHoursSummary:c,breakSummary:k}}a(I,"buildWorkScheduleSummary");function P(e){let{checked:s,start_time:n,end_time:u,break_duration_minutes:i}=e;if(!s)return 0;let[c,k]=n.split(":").map(Number),[r,o]=u.split(":").map(Number),y=c*60+k,t=(r*60+o-y-Number.parseInt(i||"0"))/60;return t===Math.floor(t)?t:Number(t.toFixed(2))}a(P,"calculateHours");var w={monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat",sunday:"Sun"};function R(e){return w[e]}a(R,"getShortWeekday");import{jsx as W}from"react/jsx-runtime";function U({name:e,defaultValue:s,description:n,label:u,onChange:i,multiple:c,options:k,component:r,...o}){let{components:y}=C(),{control:p}=x(),h=a((t,d,l)=>{if(c&&l){let m=t.value?[...t.value]:[];d?m.includes(l)||t.onChange([...m,l]):t.onChange(m.filter(f=>f!==l))}else t.onChange(d)},"handleCheckboxChange");return W(_,{control:p,name:e,defaultValue:s,render:({field:t,fieldState:d})=>{let l=r||y?.checkbox;if(!l)throw new Error(`Checkbox component not found for field ${e}`);let m={name:e,description:n,label:u,defaultValue:s,multiple:c,options:k,...o};return W(l,{field:{...t,onChange:a((f,b)=>{h(t,f,b),i?.(f,b)},"onChange")},fieldState:d,fieldData:m})}})}a(U,"CheckBoxField");export{F as a,O as b,I as c,P as d,R as e,U as f};
2
+ //# sourceMappingURL=chunk-AS6KFUXS.js.map
@@ -1,2 +1,2 @@
1
- import{b as f}from"./chunk-MRYRNB7Y.js";import{b as l}from"./chunk-LNV36S6D.js";import{a as F}from"./chunk-LU265KXN.js";import{f as s,g as a}from"./chunk-7EONM7HL.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as y}from"react";import{jsx as r}from"react/jsx-runtime";function A({defaultValues:u,fields:m,onSubmit:d}){let{formId:c,terminationBag:o}=f(),p=l(o.handleValidation),e=s({resolver:p,defaultValues:u,shouldUnregister:!1,mode:"onBlur"});y(()=>{let V=e?.watch(i=>{Object.keys(i).some(n=>i[n]!==o?.initialValues?.[n])&&o?.checkFieldUpdates(i)});return()=>V?.unsubscribe()},[]);let T=m||(o?.fields??[]);return r(a,{...e,children:r("form",{id:c,onSubmit:e.handleSubmit(d),className:"space-y-4 RemoteFlows__TerminationForm",children:r(F,{fields:T})})})}t(A,"TerminationForm");export{A as a};
2
- //# sourceMappingURL=chunk-JVHQ5EG3.js.map
1
+ import{b as f}from"./chunk-MRYRNB7Y.js";import{b as l}from"./chunk-LNV36S6D.js";import{a as F}from"./chunk-BI4RFXFL.js";import{f as s,h as a}from"./chunk-CWAFRJAQ.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as y}from"react";import{jsx as r}from"react/jsx-runtime";function A({defaultValues:u,fields:m,onSubmit:d}){let{formId:c,terminationBag:o}=f(),p=l(o.handleValidation),e=s({resolver:p,defaultValues:u,shouldUnregister:!1,mode:"onBlur"});y(()=>{let V=e?.watch(i=>{Object.keys(i).some(n=>i[n]!==o?.initialValues?.[n])&&o?.checkFieldUpdates(i)});return()=>V?.unsubscribe()},[]);let T=m||(o?.fields??[]);return r(a,{...e,children:r("form",{id:c,onSubmit:e.handleSubmit(d),className:"space-y-4 RemoteFlows__TerminationForm",children:r(F,{fields:T})})})}t(A,"TerminationForm");export{A as a};
2
+ //# sourceMappingURL=chunk-AS77PXWM.js.map
@@ -1,2 +1,2 @@
1
- import{b as I}from"./chunk-TXSUZLOI.js";import{a as N}from"./chunk-A3LRPGV3.js";import{a as j,b as v,c as D,d as O}from"./chunk-2MTSUYN6.js";import{e as p,f as F}from"./chunk-JEGVULKU.js";import{h as R,i as b}from"./chunk-VIGKOVHP.js";import{a as C}from"./chunk-X6ZAR7ZL.js";import{a as k}from"./chunk-TSPDJUGG.js";import{a as c}from"./chunk-P37U34EQ.js";import{useMemo as S,useRef as ee,useState as A}from"react";var pe=c(({countryCode:L,options:u,initialValues:l})=>{let P=j(),g=v(),{mutateAsync:q}=C(P),{mutateAsync:J}=C(g),[y,U]=A(L||null),[f,B]=A(null),w=ee({company_basic_information:{},address_details:{}}),{fieldValues:V,stepState:a,setFieldValues:W,previousStep:z,nextStep:G,goToStep:H}=k(N),{companyBasicInformationForm:d,isLoading:K}=D({jsfModify:u?.jsfModify?.company_basic_information,queryOptions:{enabled:a.currentStep.name==="company_basic_information"}}),{data:s,isLoading:Q}=O({countryCode:y,fieldValues:a.currentStep.name==="address_details"?{...a.values?.address_details||{},...V}:a.values?.address_details||{},options:{...u,jsfModify:u?.jsfModify?.address_details,queryOptions:{enabled:a.currentStep.name==="address_details"&&!!y&&!!f}}}),i=S(()=>({company_basic_information:d?.fields||[],address_details:s?.fields||[]}),[d?.fields,s?.fields]),X={company_basic_information:null,address_details:s?.meta?.["x-jsf-fieldsets"]||null},h=S(()=>F(i.company_basic_information,{...l,country_code:y||l?.country_code||""}),[i.company_basic_information,y,l]),E=S(()=>F(i.address_details,l||{}),[i.address_details,l]),Y=S(()=>({company_basic_information:h,address_details:E}),[h,E]),Z=c(t=>{H(t)},"goTo"),M=c(async t=>{let r=a.currentStep.name,e=i[r];return d&&r==="company_basic_information"?await p(t,e,{isPartialValidation:!1}):s&&r==="address_details"?await p(t,e,{isPartialValidation:!1}):{}},"parseFormValues");async function $(t){let r=a.currentStep.name;r in w.current&&(w.current[r]=R(t,i[r]));let e=await M(t);switch(a.currentStep.name){case"company_basic_information":{if(U(e.country_code),f)return Promise.resolve({data:{countryCode:e.country_code??"",companyOwnerEmail:e.company_owner_email??"",companyOwnerName:e.company_owner_name??"",desiredCurrency:e.desired_currency??"",name:e.name??"",phoneNumber:e.phone_number??"",taxNumber:e.tax_number??""}});let x={country_code:e.country_code,company_owner_email:e.company_owner_email,company_owner_name:e.company_owner_name,desired_currency:e.desired_currency,name:e.name,phone_number:e.phone_number,tax_number:e.tax_number,terms_of_service_accepted_at:I()},n=await q(x);if(n.error)return Promise.resolve({data:null,error:n.error,rawError:n.rawError,fieldErrors:n.fieldErrors});let m=n.data?.data,_,o;if(m)if("data"in m&&m.data){let T=m.data.company;o=T,_=T?.id}else"company"in m&&(o=m.company,_=o?.id);return _&&B(_),Promise.resolve({data:{countryCode:o?.country_code??e.country_code??"",companyOwnerEmail:o?.company_owner_email??e.company_owner_email??"",companyOwnerName:o?.company_owner_name??e.company_owner_name??"",desiredCurrency:o?.desired_currency??e.desired_currency??"",name:o?.name??e.name??"",phoneNumber:o?.phone_number??e.phone_number??"",taxNumber:o?.tax_number??e.tax_number??""}})}case"address_details":{if(!f)throw b("Company ID is required to update address details");let n=await J({companyId:f,payload:{address_details:e},jsonSchemaVersion:u?.jsonSchemaVersion?.form_schema?.address_details});return n.error?Promise.resolve({data:null,error:n.error,rawError:n.rawError,fieldErrors:n.fieldErrors}):Promise.resolve({data:n.data})}default:throw b("Invalid step state")}}return c($,"onSubmit"),{isLoading:K||Q,isSubmitting:P.isPending||g.isPending,fieldValues:V,stepState:a,checkFieldUpdates:W,back:z,next:G,goTo:Z,onSubmit:$,fields:i[a.currentStep.name],meta:{fields:w.current,fieldsets:X[a.currentStep.name]},parseFormValues:M,handleValidation:c(async t=>{if(a.currentStep.name==="company_basic_information"&&d){let r=await p(t,d.fields,{isPartialValidation:!1});return d.handleValidation(r)}if(a.currentStep.name==="address_details"&&s){let r=await p(t,s.fields,{isPartialValidation:!1});return s.handleValidation(r)}return null},"handleValidation"),initialValues:Y}},"useCreateCompany");export{pe as a};
2
- //# sourceMappingURL=chunk-TGQTFWAB.js.map
1
+ import{b as I}from"./chunk-TXSUZLOI.js";import{a as N}from"./chunk-A3LRPGV3.js";import{a as j,b as v,c as D,d as O}from"./chunk-JF3KLAB5.js";import{e as p,f as F}from"./chunk-D5AO6SOM.js";import{h as R,i as b}from"./chunk-VIGKOVHP.js";import{a as C}from"./chunk-X6ZAR7ZL.js";import{a as k}from"./chunk-TSPDJUGG.js";import{a as c}from"./chunk-P37U34EQ.js";import{useMemo as S,useRef as ee,useState as A}from"react";var pe=c(({countryCode:L,options:u,initialValues:l})=>{let P=j(),g=v(),{mutateAsync:q}=C(P),{mutateAsync:J}=C(g),[y,U]=A(L||null),[f,B]=A(null),w=ee({company_basic_information:{},address_details:{}}),{fieldValues:V,stepState:a,setFieldValues:W,previousStep:z,nextStep:G,goToStep:H}=k(N),{companyBasicInformationForm:d,isLoading:K}=D({jsfModify:u?.jsfModify?.company_basic_information,queryOptions:{enabled:a.currentStep.name==="company_basic_information"}}),{data:s,isLoading:Q}=O({countryCode:y,fieldValues:a.currentStep.name==="address_details"?{...a.values?.address_details||{},...V}:a.values?.address_details||{},options:{...u,jsfModify:u?.jsfModify?.address_details,queryOptions:{enabled:a.currentStep.name==="address_details"&&!!y&&!!f}}}),i=S(()=>({company_basic_information:d?.fields||[],address_details:s?.fields||[]}),[d?.fields,s?.fields]),X={company_basic_information:null,address_details:s?.meta?.["x-jsf-fieldsets"]||null},h=S(()=>F(i.company_basic_information,{...l,country_code:y||l?.country_code||""}),[i.company_basic_information,y,l]),E=S(()=>F(i.address_details,l||{}),[i.address_details,l]),Y=S(()=>({company_basic_information:h,address_details:E}),[h,E]),Z=c(t=>{H(t)},"goTo"),M=c(async t=>{let r=a.currentStep.name,e=i[r];return d&&r==="company_basic_information"?await p(t,e,{isPartialValidation:!1}):s&&r==="address_details"?await p(t,e,{isPartialValidation:!1}):{}},"parseFormValues");async function $(t){let r=a.currentStep.name;r in w.current&&(w.current[r]=R(t,i[r]));let e=await M(t);switch(a.currentStep.name){case"company_basic_information":{if(U(e.country_code),f)return Promise.resolve({data:{countryCode:e.country_code??"",companyOwnerEmail:e.company_owner_email??"",companyOwnerName:e.company_owner_name??"",desiredCurrency:e.desired_currency??"",name:e.name??"",phoneNumber:e.phone_number??"",taxNumber:e.tax_number??""}});let x={country_code:e.country_code,company_owner_email:e.company_owner_email,company_owner_name:e.company_owner_name,desired_currency:e.desired_currency,name:e.name,phone_number:e.phone_number,tax_number:e.tax_number,terms_of_service_accepted_at:I()},n=await q(x);if(n.error)return Promise.resolve({data:null,error:n.error,rawError:n.rawError,fieldErrors:n.fieldErrors});let m=n.data?.data,_,o;if(m)if("data"in m&&m.data){let T=m.data.company;o=T,_=T?.id}else"company"in m&&(o=m.company,_=o?.id);return _&&B(_),Promise.resolve({data:{countryCode:o?.country_code??e.country_code??"",companyOwnerEmail:o?.company_owner_email??e.company_owner_email??"",companyOwnerName:o?.company_owner_name??e.company_owner_name??"",desiredCurrency:o?.desired_currency??e.desired_currency??"",name:o?.name??e.name??"",phoneNumber:o?.phone_number??e.phone_number??"",taxNumber:o?.tax_number??e.tax_number??""}})}case"address_details":{if(!f)throw b("Company ID is required to update address details");let n=await J({companyId:f,payload:{address_details:e},jsonSchemaVersion:u?.jsonSchemaVersion?.form_schema?.address_details});return n.error?Promise.resolve({data:null,error:n.error,rawError:n.rawError,fieldErrors:n.fieldErrors}):Promise.resolve({data:n.data})}default:throw b("Invalid step state")}}return c($,"onSubmit"),{isLoading:K||Q,isSubmitting:P.isPending||g.isPending,fieldValues:V,stepState:a,checkFieldUpdates:W,back:z,next:G,goTo:Z,onSubmit:$,fields:i[a.currentStep.name],meta:{fields:w.current,fieldsets:X[a.currentStep.name]},parseFormValues:M,handleValidation:c(async t=>{if(a.currentStep.name==="company_basic_information"&&d){let r=await p(t,d.fields,{isPartialValidation:!1});return d.handleValidation(r)}if(a.currentStep.name==="address_details"&&s){let r=await p(t,s.fields,{isPartialValidation:!1});return s.handleValidation(r)}return null},"handleValidation"),initialValues:Y}},"useCreateCompany");export{pe as a};
2
+ //# sourceMappingURL=chunk-B4E43MXD.js.map
@@ -0,0 +1,2 @@
1
+ import{a as h,b as x,c as u}from"./chunk-XGRFWXUU.js";import{a as F}from"./chunk-SNECOPBD.js";import{g as P,j as W}from"./chunk-D5AO6SOM.js";import{c as g}from"./chunk-CWAFRJAQ.js";import{a as c}from"./chunk-P37U34EQ.js";import{Fragment as V}from"react";import a from"lodash.omit";var C={...h,fieldset:u,"fieldset-flat":u};import{Fragment as S,jsx as n,jsxs as y}from"react/jsx-runtime";var A=c(({fields:p,fieldsets:d,fieldValues:i,components:m})=>{let{setValue:J}=g();if(!p||p.length===0)return null;let f=d&&i?P({fields:p,fieldsets:d,values:i}):p,r=c((e,l,o)=>l.WrapperComponent?n(l.WrapperComponent,{children:e},o):n(V,{children:e},o),"wrapWithCustomWrapper");return n(S,{children:f.map(e=>{if(e.calculateDynamicProperties&&(e={...e,...e.calculateDynamicProperties(i,e)||{}}),e.isVisible===!1||e.deprecated||e.hidden)return null;if(W(e)){let t=a(e,"WrapperComponent");return r(n(x,{name:t.name,description:t.description,value:t.const,statement:t.statement,label:t.label,helpCenter:t.meta?.helpCenter}),e,e.name)}if(e.Component){let{Component:t}=e,R=a(e,["Component","WrapperComponent"]);return r(y(S,{children:[n(t,{setValue:T=>J(e.name,T),...R}),e.statement?n(F,{...e.statement}):null,e.extra?e.extra:null]}),e,e.name)}let o=e.type,s=C[o];if(!s)return y("p",{className:"error",children:["Field type ",o," not supported"]});if(o==="fieldset"){let t=a(e,"WrapperComponent");return r(n(s,{...t,components:m}),e,e.name)}if(o==="fieldset-flat"){let t=a(e,"WrapperComponent");return r(n(s,{...t,components:m,isFlatFieldset:!0}),e,e.name)}o==="select"&&e.multiple&&(s=C["multi-select"]);let k=a(e,"WrapperComponent");return r(y(S,{children:[n(s,{...k,component:m&&m[o]}),e.statement?n(F,{...e.statement}):null,e.extra?e.extra:null]}),e,e.name)})})},"JSONSchemaFormFields");export{A as a};
2
+ //# sourceMappingURL=chunk-BI4RFXFL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/form/JSONSchemaForm.tsx","../src/components/form/fields/fieldsMapping.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, { Fragment } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport omit from 'lodash.omit';\nimport { fieldsMap } from '@/src/components/form/fields/fieldsMapping';\nimport { Statement } from '@/src/components/form/Statement';\nimport { ForcedValueField } from '@/src/components/form/fields/ForcedValueField';\nimport { Components, JSFFieldset, JSFFields } from '@/src/types/remoteFlows';\nimport { StatementComponentProps } from '@/src/types/fields';\nimport { checkFieldHasForcedValue, getFieldsWithFlatFieldsets } from './utils';\n\ntype JSONSchemaFormFieldsProps = {\n fields: JSFFields;\n components?: Components;\n fieldsets?: JSFFieldset | null | undefined;\n fieldValues?: Record<string, unknown>;\n};\n\nexport const JSONSchemaFormFields = ({\n fields,\n fieldsets,\n fieldValues,\n components,\n}: JSONSchemaFormFieldsProps) => {\n const { setValue } = useFormContext();\n\n if (!fields || fields.length === 0) return null;\n\n const maybeFieldWithFlatFieldsets =\n fieldsets && fieldValues\n ? getFieldsWithFlatFieldsets({\n fields: fields,\n fieldsets: fieldsets,\n values: fieldValues,\n })\n : fields;\n\n const wrapWithCustomWrapper = (\n content: React.ReactNode,\n field: any,\n key: string,\n ) => {\n if (field.WrapperComponent) {\n return (\n <field.WrapperComponent key={key}>{content}</field.WrapperComponent>\n );\n }\n return <Fragment key={key}>{content}</Fragment>;\n };\n\n return (\n <>\n {maybeFieldWithFlatFieldsets.map((field) => {\n if (field.calculateDynamicProperties) {\n field = {\n ...field,\n ...(field.calculateDynamicProperties(fieldValues, field) || {}),\n };\n }\n\n if (field.isVisible === false || field.deprecated || field.hidden) {\n return null; // Skip hidden or deprecated fields\n }\n\n const isForcedValue = checkFieldHasForcedValue(field);\n\n if (isForcedValue) {\n const fieldProps = omit(field, 'WrapperComponent');\n return wrapWithCustomWrapper(\n <ForcedValueField\n name={fieldProps.name as string}\n description={fieldProps.description as string}\n value={fieldProps.const as string}\n statement={fieldProps.statement as any}\n label={fieldProps.label as string}\n helpCenter={fieldProps.meta?.helpCenter}\n />,\n field,\n field.name as string,\n );\n }\n\n if (field.Component) {\n const { Component } = field as any;\n const fieldProps = omit(field, ['Component', 'WrapperComponent']);\n return wrapWithCustomWrapper(\n <>\n <Component\n setValue={(value: unknown) => setValue(field.name, value)}\n {...fieldProps}\n />\n {field.statement ? (\n <Statement\n {...(field.statement as StatementComponentProps['data'])}\n />\n ) : null}\n {field.extra ? field.extra : null}\n </>,\n field,\n field.name as string,\n );\n }\n\n // We use field.type on purpose here, not field.inputType, when using field.inputType\n // the conditionals didn't work as expected\n // I believe json-schema-form in the latest versions uses field.inputType correctly but\n // the version of json-schema-form is decided by remote-json-schema-form-kit\n // our product uses field.type instead of field.inputType and we probably should do the same\n const fieldType = field.type;\n let FieldComponent = fieldsMap[fieldType as keyof typeof fieldsMap];\n\n if (!FieldComponent) {\n return (\n <p className='error'>\n Field type {fieldType as string} not supported\n </p>\n );\n }\n\n if (fieldType === 'fieldset') {\n const fieldProps = omit(field, 'WrapperComponent');\n return wrapWithCustomWrapper(\n <FieldComponent {...fieldProps} components={components} />,\n field,\n field.name,\n );\n }\n\n if (fieldType === 'fieldset-flat') {\n const fieldProps = omit(field, 'WrapperComponent');\n return wrapWithCustomWrapper(\n <FieldComponent\n {...fieldProps}\n components={components}\n isFlatFieldset\n />,\n field,\n field.name,\n );\n }\n\n // TODO: Have doubts about this, it seems we only support checkbox for multiple select\n if (fieldType === 'select' && field.multiple) {\n FieldComponent = fieldsMap['multi-select'];\n }\n\n const fieldProps = omit(field, 'WrapperComponent');\n return wrapWithCustomWrapper(\n <>\n <FieldComponent\n {...fieldProps}\n component={\n components && components[fieldType as keyof Components]\n }\n />\n {field.statement ? (\n <Statement\n {...(field.statement as StatementComponentProps['data'])}\n />\n ) : null}\n {field.extra ? field.extra : null}\n </>,\n field,\n field.name as string,\n );\n })}\n </>\n );\n};\n","import { $TSFixMe } from '@/src/types/remoteFlows';\nimport { baseFields } from './baseFields';\nimport { FieldSetField } from './FieldSetField';\nimport { SupportedTypes } from './types';\n\nexport const fieldsMap: Record<\n SupportedTypes,\n React.ComponentType<$TSFixMe>\n> = {\n ...baseFields,\n fieldset: FieldSetField,\n 'fieldset-flat': FieldSetField,\n};\n"],"mappings":"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","names":["Fragment","omit","fieldsMap","baseFields","FieldSetField","Fragment","jsx","jsxs","JSONSchemaFormFields","__name","fields","fieldsets","fieldValues","components","setValue","useFormContext","maybeFieldWithFlatFieldsets","getFieldsWithFlatFieldsets","wrapWithCustomWrapper","content","field","key","checkFieldHasForcedValue","fieldProps","omit","ForcedValueField","Component","value","Statement","fieldType","FieldComponent","fieldsMap"]}
@@ -1,2 +1,2 @@
1
- import{a as y,b as d,c as p,d as R}from"./chunk-AYC6DTFV.js";import{a as w}from"./chunk-TFSRZOMP.js";import{a as _,b as i}from"./chunk-VIGKOVHP.js";import{a as m}from"./chunk-P37U34EQ.js";import{ChevronDown as A,Globe as N}from"lucide-react";import{useState as h}from"react";import{Fragment as C,jsx as e,jsxs as l}from"react/jsx-runtime";var v=m(s=>{if(s.length<2)return{currency:null,costsPerCountry:[],employeesCost:null};let o=s[0]?.employer_currency_costs.currency,c=s.reduce((r,t)=>{let a=t.country.name;return r[a]={country:t.country,monthlyTotal:(r[a]?.monthlyTotal||0)+t.employer_currency_costs.monthly_total,annualTotal:(r[a]?.annualTotal||0)+t.employer_currency_costs.annual_total},r},{}),n=Object.values(c).map(({country:r,monthlyTotal:t,annualTotal:a})=>({country:r,monthlyCost:i(t,o.code),annualCost:i(a,o.code)})),u={monthlyTotal:i(s.reduce((r,t)=>r+t.employer_currency_costs.monthly_total,0),o.code),annualTotal:i(s.reduce((r,t)=>r+t.employer_currency_costs.annual_total,0),o.code)};return{currency:o,costsPerCountry:n,employeesCost:u}},"useSummaryResults"),f=m(({currency:s,title:o})=>e("div",{className:"RemoteFlows__SummaryResults__Header flex items-center justify-between w-full",children:l("div",{className:"RemoteFlows__SummaryHeader__Container flex flex-row items-center gap-6",children:[e("div",{className:"RemoteFlows__SummaryHeader__IconContainer flex h-12 w-12 items-center justify-center rounded-lg bg-[#F4F4F5]",children:e(N,{className:"RemoteFlows__SummaryHeader__Icon h-6 w-6 text-[#000000]"})}),l("div",{className:"RemoteFlows__SummaryHeader__Content space-y-1",children:[e("h2",{className:"RemoteFlows__SummaryHeader__Title text-lg font-medium leading-none text-[#181818]",children:o}),l("p",{className:"RemoteFlows__SummaryHeader__Currency text-xs text-[#71717A]",children:["Employer billing currency: ",s.code]})]})]})}),"SummaryHeader"),g=m(({label:s,columns:o,rows:c,defaultValue:n="accordion",className:u})=>{let r=o.length===1?"grid-cols-2":"grid-cols-3";return e(y,{collapsible:!0,defaultValue:n,className:_("RemoteFlows__SummaryResults__MultiColumnAccordion w-full",u),children:l(d,{value:n,className:"RemoteFlows__SummaryResults__AccordionItem border-none",children:[e(p,{className:"RemoteFlows__SummaryResults__AccordionTrigger hover:no-underline px-0 py-3 [&>svg]:hidden group",children:l("div",{className:_("RemoteFlows__SummaryResults__AccordionHeader grid items-center w-full",r),children:[l("div",{className:"RemoteFlows__SummaryResults__AccordionHeader__LabelContainer flex items-center gap-2",children:[s,e(A,{className:"RemoteFlows__SummaryResults__ChevronDown h-4 w-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),o.length===1?e("span",{className:"RemoteFlows__SummaryResults__ColumnHeader text-xs text-[#27272A] text-right",children:o[0]}):o.map((t,a)=>e("span",{className:"RemoteFlows__SummaryResults__ColumnHeader text-xs text-[#27272A] text-right",children:t},a))]})}),e(R,{className:"RemoteFlows__SummaryResults__AccordionContent px-0 pb-4",children:e("div",{className:"RemoteFlows__SummaryResults__AccordionRows space-y-3",children:c.map((t,a)=>l("div",{className:_("RemoteFlows__SummaryResults__AccordionRow grid items-center",r),children:[e("div",{className:"flex items-center gap-2",children:t.label}),o.length===1?e("span",{className:"RemoteFlows__SummaryResults__RowValue text-sm text-[#09090B] text-right",children:t.values[0]}):t.values.map((F,x)=>e("span",{className:"RemoteFlows__SummaryResults__RowValue text-sm text-[#09090B] text-right",children:F},x))]},a))})})]})})},"MultiColumnAccordion"),S=m(({employeesCost:s})=>e(g,{label:e("span",{className:"RemoteFlows__CostForAllEmployees__Label text-sm font-medium text-[#0F172A]",children:"Cost for all employees"}),columns:["Total cost"],rows:[{label:l(C,{children:[e("span",{className:"RemoteFlows__CostForAllEmployees__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0"}),e("span",{className:"RemoteFlows__CostForAllEmployees__MonthlyLabel text-sm text-[#09090B]",children:"Monthly cost"})]}),values:[s.monthlyTotal]},{label:l(C,{children:[e("span",{className:"RemoteFlows__CostForAllEmployees__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0"}),e("span",{className:"RemoteFlows__CostForAllEmployees__AnnualLabel text-sm text-[#09090B]",children:"Annual cost"})]}),values:[s.annualTotal]}],defaultValue:"cost-breakdown"}),"CostForAllEmployees"),b=m(({costsPerCountry:s})=>e(g,{label:e("span",{className:"RemoteFlows__CostsPerCountry__Label text-sm font-medium text-[#0F172A]",children:"Cost per country"}),columns:["Monthly cost","Annual cost"],rows:s.map(o=>({label:l(C,{children:[e("span",{className:"RemoteFlows__CostsPerCountry__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0"}),e("span",{className:"RemoteFlows__CostsPerCountry__CountryName text-sm text-[#09090B]",children:o.country.name})]}),values:[o.monthlyCost,o.annualCost]})),defaultValue:"country-breakdown"}),"CostsPerCountry"),k=m(({estimations:s})=>{let{currency:o,costsPerCountry:c,employeesCost:n}=v(s),[u,r]=h("summary");return!o||c.length===0||Object.keys(n).length===0?null:e(w,{className:"RemoteFlows__SummaryResults__Card p-10",children:e(y,{collapsible:!0,defaultValue:u,onValueChange:t=>r(t),className:"RemoteFlows__SummaryResults__Accordion w-full",children:l(d,{value:"summary",className:"RemoteFlows__SummaryResults__AccordionItem border-border",children:[e("div",{className:_("RemoteFlows__SummaryResults__AccordionTriggerContainer",{RemoteFlows__Separator:!!u}),children:e(p,{iconClassName:"size-6",className:"RemoteFlows__SummaryResults__MainAccordionTrigger hover:no-underline px-0 py-4",children:e(f,{currency:o,title:"Summary Overview"})})}),l(R,{className:"RemoteFlows__SummaryResults__MainAccordionContent px-0 pb-4 mt-6",children:[e("div",{className:"RemoteFlows__Separator",children:e(S,{employeesCost:n})}),e("div",{className:"RemoteFlows__SummaryResults__CostsPerCountryContainer mt-6",children:e(b,{costsPerCountry:c})})]})]})})})},"SummaryResults");export{k as a};
2
- //# sourceMappingURL=chunk-EFRT6C7V.js.map
1
+ import{a as y,b as d,c as p,d as R}from"./chunk-AYC6DTFV.js";import{a as w}from"./chunk-H5QXOIKS.js";import{a as _,b as i}from"./chunk-VIGKOVHP.js";import{a as m}from"./chunk-P37U34EQ.js";import{ChevronDown as A,Globe as N}from"lucide-react";import{useState as h}from"react";import{Fragment as C,jsx as e,jsxs as l}from"react/jsx-runtime";var v=m(s=>{if(s.length<2)return{currency:null,costsPerCountry:[],employeesCost:null};let o=s[0]?.employer_currency_costs.currency,c=s.reduce((r,t)=>{let a=t.country.name;return r[a]={country:t.country,monthlyTotal:(r[a]?.monthlyTotal||0)+t.employer_currency_costs.monthly_total,annualTotal:(r[a]?.annualTotal||0)+t.employer_currency_costs.annual_total},r},{}),n=Object.values(c).map(({country:r,monthlyTotal:t,annualTotal:a})=>({country:r,monthlyCost:i(t,o.code),annualCost:i(a,o.code)})),u={monthlyTotal:i(s.reduce((r,t)=>r+t.employer_currency_costs.monthly_total,0),o.code),annualTotal:i(s.reduce((r,t)=>r+t.employer_currency_costs.annual_total,0),o.code)};return{currency:o,costsPerCountry:n,employeesCost:u}},"useSummaryResults"),f=m(({currency:s,title:o})=>e("div",{className:"RemoteFlows__SummaryResults__Header flex items-center justify-between w-full",children:l("div",{className:"RemoteFlows__SummaryHeader__Container flex flex-row items-center gap-6",children:[e("div",{className:"RemoteFlows__SummaryHeader__IconContainer flex h-12 w-12 items-center justify-center rounded-lg bg-[#F4F4F5]",children:e(N,{className:"RemoteFlows__SummaryHeader__Icon h-6 w-6 text-[#000000]"})}),l("div",{className:"RemoteFlows__SummaryHeader__Content space-y-1",children:[e("h2",{className:"RemoteFlows__SummaryHeader__Title text-lg font-medium leading-none text-[#181818]",children:o}),l("p",{className:"RemoteFlows__SummaryHeader__Currency text-xs text-[#71717A]",children:["Employer billing currency: ",s.code]})]})]})}),"SummaryHeader"),g=m(({label:s,columns:o,rows:c,defaultValue:n="accordion",className:u})=>{let r=o.length===1?"grid-cols-2":"grid-cols-3";return e(y,{collapsible:!0,defaultValue:n,className:_("RemoteFlows__SummaryResults__MultiColumnAccordion w-full",u),children:l(d,{value:n,className:"RemoteFlows__SummaryResults__AccordionItem border-none",children:[e(p,{className:"RemoteFlows__SummaryResults__AccordionTrigger hover:no-underline px-0 py-3 [&>svg]:hidden group",children:l("div",{className:_("RemoteFlows__SummaryResults__AccordionHeader grid items-center w-full",r),children:[l("div",{className:"RemoteFlows__SummaryResults__AccordionHeader__LabelContainer flex items-center gap-2",children:[s,e(A,{className:"RemoteFlows__SummaryResults__ChevronDown h-4 w-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),o.length===1?e("span",{className:"RemoteFlows__SummaryResults__ColumnHeader text-xs text-[#27272A] text-right",children:o[0]}):o.map((t,a)=>e("span",{className:"RemoteFlows__SummaryResults__ColumnHeader text-xs text-[#27272A] text-right",children:t},a))]})}),e(R,{className:"RemoteFlows__SummaryResults__AccordionContent px-0 pb-4",children:e("div",{className:"RemoteFlows__SummaryResults__AccordionRows space-y-3",children:c.map((t,a)=>l("div",{className:_("RemoteFlows__SummaryResults__AccordionRow grid items-center",r),children:[e("div",{className:"flex items-center gap-2",children:t.label}),o.length===1?e("span",{className:"RemoteFlows__SummaryResults__RowValue text-sm text-[#09090B] text-right",children:t.values[0]}):t.values.map((F,x)=>e("span",{className:"RemoteFlows__SummaryResults__RowValue text-sm text-[#09090B] text-right",children:F},x))]},a))})})]})})},"MultiColumnAccordion"),S=m(({employeesCost:s})=>e(g,{label:e("span",{className:"RemoteFlows__CostForAllEmployees__Label text-sm font-medium text-[#0F172A]",children:"Cost for all employees"}),columns:["Total cost"],rows:[{label:l(C,{children:[e("span",{className:"RemoteFlows__CostForAllEmployees__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0"}),e("span",{className:"RemoteFlows__CostForAllEmployees__MonthlyLabel text-sm text-[#09090B]",children:"Monthly cost"})]}),values:[s.monthlyTotal]},{label:l(C,{children:[e("span",{className:"RemoteFlows__CostForAllEmployees__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0"}),e("span",{className:"RemoteFlows__CostForAllEmployees__AnnualLabel text-sm text-[#09090B]",children:"Annual cost"})]}),values:[s.annualTotal]}],defaultValue:"cost-breakdown"}),"CostForAllEmployees"),b=m(({costsPerCountry:s})=>e(g,{label:e("span",{className:"RemoteFlows__CostsPerCountry__Label text-sm font-medium text-[#0F172A]",children:"Cost per country"}),columns:["Monthly cost","Annual cost"],rows:s.map(o=>({label:l(C,{children:[e("span",{className:"RemoteFlows__CostsPerCountry__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0"}),e("span",{className:"RemoteFlows__CostsPerCountry__CountryName text-sm text-[#09090B]",children:o.country.name})]}),values:[o.monthlyCost,o.annualCost]})),defaultValue:"country-breakdown"}),"CostsPerCountry"),k=m(({estimations:s})=>{let{currency:o,costsPerCountry:c,employeesCost:n}=v(s),[u,r]=h("summary");return!o||c.length===0||Object.keys(n).length===0?null:e(w,{className:"RemoteFlows__SummaryResults__Card p-10",children:e(y,{collapsible:!0,defaultValue:u,onValueChange:t=>r(t),className:"RemoteFlows__SummaryResults__Accordion w-full",children:l(d,{value:"summary",className:"RemoteFlows__SummaryResults__AccordionItem border-border",children:[e("div",{className:_("RemoteFlows__SummaryResults__AccordionTriggerContainer",{RemoteFlows__Separator:!!u}),children:e(p,{iconClassName:"size-6",className:"RemoteFlows__SummaryResults__MainAccordionTrigger hover:no-underline px-0 py-4",children:e(f,{currency:o,title:"Summary Overview"})})}),l(R,{className:"RemoteFlows__SummaryResults__MainAccordionContent px-0 pb-4 mt-6",children:[e("div",{className:"RemoteFlows__Separator",children:e(S,{employeesCost:n})}),e("div",{className:"RemoteFlows__SummaryResults__CostsPerCountryContainer mt-6",children:e(b,{costsPerCountry:c})})]})]})})})},"SummaryResults");export{k as a};
2
+ //# sourceMappingURL=chunk-BNQFPYNQ.js.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-K5HZE7M6.js";import{b as n}from"./chunk-Q3ALCPJN.js";import{k as i}from"./chunk-VIGKOVHP.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as c}from"react/jsx-runtime";function P({onSubmit:d,onSuccess:m,onError:p}){let{contractorOnboardingBag:r}=n(),l=e(async a=>{try{let t=await r.parseFormValues(a);await d?.(t);let o=await r.onSubmit(a);if(o?.data){await m?.(o?.data),r?.next();return}}catch(t){let o=i(t,r.meta?.fields?.contract_preview);p?.(o)}},"handleSubmit"),u=r.stepState.values?.contract_preview||r.initialValues.contract_preview;return c("div",{className:"space-y-4",children:c(s,{defaultValues:u,onSubmit:l})})}e(P,"ContractPreviewStep");export{P as a};
2
- //# sourceMappingURL=chunk-D5ABWBC6.js.map
1
+ import{a as s}from"./chunk-WFZGKBFS.js";import{b as n}from"./chunk-Q3ALCPJN.js";import{k as i}from"./chunk-VIGKOVHP.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as c}from"react/jsx-runtime";function P({onSubmit:d,onSuccess:m,onError:p}){let{contractorOnboardingBag:r}=n(),l=e(async a=>{try{let t=await r.parseFormValues(a);await d?.(t);let o=await r.onSubmit(a);if(o?.data){await m?.(o?.data),r?.next();return}}catch(t){let o=i(t,r.meta?.fields?.contract_preview);p?.(o)}},"handleSubmit"),u=r.stepState.values?.contract_preview||r.initialValues.contract_preview;return c("div",{className:"space-y-4",children:c(s,{defaultValues:u,onSubmit:l})})}e(P,"ContractPreviewStep");export{P as a};
2
+ //# sourceMappingURL=chunk-BZAO32QW.js.map
@@ -1,2 +1,2 @@
1
- import{K as e}from"./chunk-WQ4H5V7U.js";import{a as t}from"./chunk-P37U34EQ.js";import{queryOptions as i}from"@tanstack/react-query";var a=t((o,n="default")=>i({queryKey:["countries",n],retry:!1,queryFn:t(async()=>{let r=await e({client:o,headers:{Authorization:""}});if(r.error||!r.data)throw new Error("Failed to fetch supported countries");return r},"queryFn")}),"countriesOptions");export{a};
2
- //# sourceMappingURL=chunk-O6H66UM2.js.map
1
+ import{K as e}from"./chunk-H2RAK6F7.js";import{a as t}from"./chunk-P37U34EQ.js";import{queryOptions as i}from"@tanstack/react-query";var a=t((o,n="default")=>i({queryKey:["countries",n],retry:!1,queryFn:t(async()=>{let r=await e({client:o,headers:{Authorization:""}});if(r.error||!r.data)throw new Error("Failed to fetch supported countries");return r},"queryFn")}),"countriesOptions");export{a};
2
+ //# sourceMappingURL=chunk-C32W6TCT.js.map
@@ -0,0 +1,2 @@
1
+ import{b as o}from"./chunk-G5O2CM6V.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as t}from"react/jsx-runtime";function p({helpCenter:r}){return!r||!r.id||!r.callToAction?null:t(o,{zendeskId:r.id,children:r.callToAction})}e(p,"HelpCenter");export{p as a};
2
+ //# sourceMappingURL=chunk-C4MRFGQG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/shared/zendesk-drawer/HelpCenter.tsx"],"sourcesContent":["import { ZendeskTriggerButton } from './ZendeskTriggerButton';\nimport { HelpCenterDataProps } from '@/src/types/fields';\n\ntype HelpCenterProps = {\n helpCenter?: HelpCenterDataProps;\n};\n\nexport function HelpCenter({ helpCenter }: HelpCenterProps) {\n if (!helpCenter || !helpCenter.id || !helpCenter.callToAction) {\n return null;\n }\n\n return (\n <ZendeskTriggerButton zendeskId={helpCenter.id}>\n {helpCenter.callToAction}\n </ZendeskTriggerButton>\n );\n}\n"],"mappings":"gFAaI,cAAAA,MAAA,oBANG,SAASC,EAAW,CAAE,WAAAC,CAAW,EAAoB,CAC1D,MAAI,CAACA,GAAc,CAACA,EAAW,IAAM,CAACA,EAAW,aACxC,KAIPF,EAACG,EAAA,CAAqB,UAAWD,EAAW,GACzC,SAAAA,EAAW,aACd,CAEJ,CAVgBE,EAAAH,EAAA","names":["jsx","HelpCenter","helpCenter","ZendeskTriggerButton","__name"]}
@@ -1,2 +1,2 @@
1
- import{i as c,j as i,k as n,l as _,m as F}from"./chunk-7EONM7HL.js";import{a as d,b as S,c as p,d as u,e as g,f as b}from"./chunk-DXIJUMLU.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-6PYJAPM2.js.map
1
+ import{a as d,b as S,c as p,d as u,e as g,f as b}from"./chunk-DXIJUMLU.js";import{j as c,k as i,l as n,m as _,n as F}from"./chunk-CWAFRJAQ.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-CKVI2UDU.js.map