@remoteoss/remote-flows 0.20.1 → 0.21.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 (354) hide show
  1. package/README.md +14 -13
  2. package/dist/{chunk-MGOT272R.js → chunk-2GCMLKO2.js} +2 -2
  3. package/dist/{chunk-4KA5AP7X.js → chunk-3GDPOMQP.js} +2 -2
  4. package/dist/{chunk-R4LFNFC2.js → chunk-3MS7FYSY.js} +2 -2
  5. package/dist/{chunk-QFZ3XVDT.js → chunk-3T43ERBA.js} +2 -2
  6. package/dist/chunk-47A5JNKX.js +2 -0
  7. package/dist/chunk-47A5JNKX.js.map +1 -0
  8. package/dist/{chunk-2QGDCMCE.js → chunk-4NLAHGUV.js} +2 -2
  9. package/dist/chunk-4Q7KTWXP.js +2 -0
  10. package/dist/chunk-4Q7KTWXP.js.map +1 -0
  11. package/dist/{chunk-FCRW2EG3.js → chunk-56D2YDS2.js} +2 -2
  12. package/dist/{chunk-BITHG5X4.js → chunk-5EP45OQV.js} +2 -2
  13. package/dist/{chunk-B3WXLC2R.js → chunk-5JGYNS2O.js} +2 -2
  14. package/dist/{chunk-A7ZEA2WU.js → chunk-A6QURRVL.js} +2 -2
  15. package/dist/chunk-AIN5YFNL.js +2 -0
  16. package/dist/{chunk-ASKKS4Z3.js → chunk-AKHJDD35.js} +2 -2
  17. package/dist/chunk-AWK7AF5V.js +2 -0
  18. package/dist/chunk-AWK7AF5V.js.map +1 -0
  19. package/dist/{chunk-CWEPL5J3.js → chunk-AXES4NFY.js} +2 -2
  20. package/dist/{chunk-6O6CNAMF.js → chunk-B25LAMRX.js} +2 -2
  21. package/dist/{chunk-GGXKORRZ.js → chunk-BCSSGG6E.js} +2 -2
  22. package/dist/{chunk-GGXKORRZ.js.map → chunk-BCSSGG6E.js.map} +1 -1
  23. package/dist/chunk-C535PFLI.js +2 -0
  24. package/dist/chunk-C535PFLI.js.map +1 -0
  25. package/dist/{chunk-X4GAGLFN.js → chunk-CCW6FKQ3.js} +2 -2
  26. package/dist/{chunk-OZCQ6AOF.js → chunk-CKHZP3O3.js} +2 -2
  27. package/dist/{chunk-LCIBPBLY.js → chunk-CLW7CVDG.js} +2 -2
  28. package/dist/chunk-DKFUZO5P.js +1 -0
  29. package/dist/chunk-DKFUZO5P.js.map +1 -0
  30. package/dist/chunk-DPIKH7BI.js +2 -0
  31. package/dist/chunk-DPIKH7BI.js.map +1 -0
  32. package/dist/{chunk-K4VWUMNO.js → chunk-EAIJKDY4.js} +2 -2
  33. package/dist/{chunk-MORMQBAF.js → chunk-EKK7R3M6.js} +2 -2
  34. package/dist/{chunk-7IHBNPZK.js → chunk-FCAGJMPU.js} +2 -2
  35. package/dist/{chunk-5CGII7CZ.js → chunk-G2NIQGHZ.js} +2 -2
  36. package/dist/chunk-G2NIQGHZ.js.map +1 -0
  37. package/dist/{chunk-CKVQ4PIK.js → chunk-G343WOO7.js} +2 -2
  38. package/dist/{chunk-RUMP764Z.js → chunk-GFNIN6CJ.js} +2 -2
  39. package/dist/{chunk-5T25IMZ3.js → chunk-GSNOUE4L.js} +2 -2
  40. package/dist/{chunk-CVDZ35YA.js → chunk-H6G4PPLM.js} +2 -2
  41. package/dist/chunk-HC56JKI2.js +2 -0
  42. package/dist/chunk-HC56JKI2.js.map +1 -0
  43. package/dist/{chunk-A76UTPRW.js → chunk-HH4YP6QX.js} +2 -2
  44. package/dist/{chunk-A76UTPRW.js.map → chunk-HH4YP6QX.js.map} +1 -1
  45. package/dist/{chunk-ZTVYWMBY.js → chunk-HTCONTKZ.js} +2 -2
  46. package/dist/{chunk-ATC4YO7K.js → chunk-I2URNHWK.js} +2 -2
  47. package/dist/{chunk-V2PBVCRH.js → chunk-IQ2HRDC4.js} +2 -2
  48. package/dist/{chunk-HRA6BY3O.js → chunk-ISWLTY4E.js} +2 -2
  49. package/dist/{chunk-GNZJOPIS.js → chunk-JE2MYS37.js} +2 -2
  50. package/dist/{chunk-76VMCRDE.js → chunk-JNPIBIHZ.js} +2 -2
  51. package/dist/{chunk-MDQ6YJMV.js → chunk-KRL5QCOA.js} +2 -2
  52. package/dist/{chunk-OIBVTGB4.js → chunk-KSHPBRPW.js} +2 -2
  53. package/dist/chunk-L2GYSHXS.js +2 -0
  54. package/dist/chunk-L2GYSHXS.js.map +1 -0
  55. package/dist/{chunk-WL3IJ7WA.js → chunk-L5CORHOG.js} +2 -2
  56. package/dist/chunk-LJ36642G.js +2 -0
  57. package/dist/chunk-LJ36642G.js.map +1 -0
  58. package/dist/{chunk-MCAK5KPI.js → chunk-LSGVE623.js} +2 -2
  59. package/dist/chunk-MISHDUB2.js +2 -0
  60. package/dist/chunk-MISHDUB2.js.map +1 -0
  61. package/dist/{chunk-UBLE2J7V.js → chunk-ODI4OPN7.js} +2 -2
  62. package/dist/{chunk-JWZIWG4T.js → chunk-OEEUSIOB.js} +2 -2
  63. package/dist/{chunk-OJNWWRD5.js → chunk-ORBIA4S3.js} +2 -2
  64. package/dist/chunk-OUO2RTM4.js +2 -0
  65. package/dist/chunk-OUO2RTM4.js.map +1 -0
  66. package/dist/{chunk-XVW2URFK.js → chunk-PAZGF4C3.js} +2 -2
  67. package/dist/chunk-PTACLZHT.js +2 -0
  68. package/dist/chunk-PTACLZHT.js.map +1 -0
  69. package/dist/{chunk-3PCSFTM3.js → chunk-QBEJBOGL.js} +2 -2
  70. package/dist/{chunk-A42AGGNH.js → chunk-QMUSEX2P.js} +2 -2
  71. package/dist/chunk-QP36XXCQ.js +2 -0
  72. package/dist/chunk-QP36XXCQ.js.map +1 -0
  73. package/dist/chunk-R2MHAPWD.js +2 -0
  74. package/dist/chunk-R2MHAPWD.js.map +1 -0
  75. package/dist/{chunk-RNNZ5ZKE.js → chunk-RLLBHQWS.js} +2 -2
  76. package/dist/chunk-RVEQJNZI.js +2 -0
  77. package/dist/chunk-RVEQJNZI.js.map +1 -0
  78. package/dist/{chunk-R2VVXLL7.js → chunk-S2AQQVM7.js} +2 -2
  79. package/dist/chunk-SDIBOMMT.js +2 -0
  80. package/dist/chunk-SDIBOMMT.js.map +1 -0
  81. package/dist/{chunk-EGVWFZBR.js → chunk-SFX34GRA.js} +2 -2
  82. package/dist/{chunk-XGMQPLVG.js → chunk-SV2PWH6Y.js} +2 -2
  83. package/dist/{chunk-JB6XA3P6.js → chunk-TK6JU3ZG.js} +2 -2
  84. package/dist/chunk-TOA3JILU.js +2 -0
  85. package/dist/chunk-TOA3JILU.js.map +1 -0
  86. package/dist/{chunk-GS5NA664.js → chunk-U3XZWSEU.js} +2 -2
  87. package/dist/chunk-U6RM2N4A.js +2 -0
  88. package/dist/chunk-U6RM2N4A.js.map +1 -0
  89. package/dist/{chunk-4C6O4QTI.js → chunk-UCLVNY25.js} +2 -2
  90. package/dist/{chunk-ZJ3JHILJ.js → chunk-VHJFIDOX.js} +2 -2
  91. package/dist/{chunk-SERAGBDA.js → chunk-VOJHAIEH.js} +2 -2
  92. package/dist/{chunk-PLWXRCGQ.js → chunk-VOW6W24S.js} +2 -2
  93. package/dist/chunk-VSUEF4AY.js +2 -0
  94. package/dist/chunk-VSUEF4AY.js.map +1 -0
  95. package/dist/chunk-VXPJXQP3.js +2 -0
  96. package/dist/chunk-VXPJXQP3.js.map +1 -0
  97. package/dist/chunk-W676SMID.js +2 -0
  98. package/dist/chunk-W676SMID.js.map +1 -0
  99. package/dist/{chunk-M4EVWRWB.js → chunk-WPMPTV76.js} +2 -2
  100. package/dist/{chunk-QIN5BLVI.js → chunk-WY3KCHHG.js} +2 -2
  101. package/dist/{chunk-BP2JYRI7.js → chunk-X5F5HHFQ.js} +2 -2
  102. package/dist/{chunk-U23SN7CM.js → chunk-XASIKHZL.js} +2 -2
  103. package/dist/{chunk-M6ATR43P.js → chunk-XGPCOHUF.js} +2 -2
  104. package/dist/chunk-XQ5TL23G.js +2 -0
  105. package/dist/chunk-XQ5TL23G.js.map +1 -0
  106. package/dist/{chunk-YFEIQZGJ.js → chunk-XRB4Y7WT.js} +2 -2
  107. package/dist/chunk-XRU2O525.js +2 -0
  108. package/dist/chunk-XRU2O525.js.map +1 -0
  109. package/dist/{chunk-2I5DIIJP.js → chunk-Z2G2XC43.js} +2 -2
  110. package/dist/{chunk-KN4F5TMS.js → chunk-ZXA3CCPB.js} +2 -2
  111. package/dist/{chunk-756MHC7A.js → chunk-ZZ6MU7PF.js} +2 -2
  112. package/dist/{chunk-UQYM3PBZ.js → chunk-ZZNI7IY2.js} +2 -2
  113. package/dist/flows/ContractAmendment/ContractAmendmentBack.js +1 -1
  114. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
  115. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +1 -1
  116. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +3 -3
  117. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  118. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
  119. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  120. package/dist/flows/ContractAmendment/ContractAmendmentSubmit.js +1 -1
  121. package/dist/flows/ContractAmendment/context.d.ts +3 -3
  122. package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
  123. package/dist/flows/ContractAmendment/hooks.js +1 -1
  124. package/dist/flows/ContractAmendment/index.d.ts +3 -3
  125. package/dist/flows/ContractAmendment/index.js +1 -1
  126. package/dist/flows/ContractAmendment/utils.d.ts +1 -1
  127. package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +26 -0
  128. package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +2 -0
  129. package/dist/flows/ContractorOnboarding/ContractorOnboarding.js.map +1 -0
  130. package/dist/flows/ContractorOnboarding/api.d.ts +114 -0
  131. package/dist/flows/ContractorOnboarding/api.js +2 -0
  132. package/dist/flows/ContractorOnboarding/api.js.map +1 -0
  133. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +30 -0
  134. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +2 -0
  135. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js.map +1 -0
  136. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +22 -0
  137. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +2 -0
  138. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js.map +1 -0
  139. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +22 -0
  140. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +2 -0
  141. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js.map +1 -0
  142. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +32 -0
  143. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +2 -0
  144. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js.map +1 -0
  145. package/dist/flows/ContractorOnboarding/components/OnboardingBack.d.ts +7 -0
  146. package/dist/flows/ContractorOnboarding/components/OnboardingBack.js +2 -0
  147. package/dist/flows/ContractorOnboarding/components/OnboardingBack.js.map +1 -0
  148. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +27 -0
  149. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +2 -0
  150. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js.map +1 -0
  151. package/dist/flows/ContractorOnboarding/components/OnboardingSubmit.d.ts +6 -0
  152. package/dist/flows/ContractorOnboarding/components/OnboardingSubmit.js +2 -0
  153. package/dist/flows/ContractorOnboarding/components/OnboardingSubmit.js.map +1 -0
  154. package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +22 -0
  155. package/dist/flows/ContractorOnboarding/components/PricingPlan.js +2 -0
  156. package/dist/flows/ContractorOnboarding/components/PricingPlan.js.map +1 -0
  157. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +30 -0
  158. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +2 -0
  159. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js.map +1 -0
  160. package/dist/flows/ContractorOnboarding/context.d.ts +93 -0
  161. package/dist/flows/ContractorOnboarding/context.js +2 -0
  162. package/dist/flows/ContractorOnboarding/context.js.map +1 -0
  163. package/dist/flows/ContractorOnboarding/hooks.d.ts +22 -0
  164. package/dist/flows/ContractorOnboarding/hooks.js +2 -0
  165. package/dist/flows/ContractorOnboarding/hooks.js.map +1 -0
  166. package/dist/flows/ContractorOnboarding/index.d.ts +23 -0
  167. package/dist/flows/ContractorOnboarding/index.js +2 -0
  168. package/dist/flows/ContractorOnboarding/index.js.map +1 -0
  169. package/dist/flows/ContractorOnboarding/json-schemas/signature.d.ts +16 -0
  170. package/dist/flows/ContractorOnboarding/json-schemas/signature.js +2 -0
  171. package/dist/flows/ContractorOnboarding/json-schemas/signature.js.map +1 -0
  172. package/dist/flows/ContractorOnboarding/types.d.ts +22 -0
  173. package/dist/flows/ContractorOnboarding/types.js +1 -0
  174. package/dist/flows/ContractorOnboarding/types.js.map +1 -0
  175. package/dist/flows/ContractorOnboarding/utils.d.ts +9 -0
  176. package/dist/flows/ContractorOnboarding/utils.js +2 -0
  177. package/dist/flows/ContractorOnboarding/utils.js.map +1 -0
  178. package/dist/flows/CostCalculator/CostCalculatorDisclaimer.js +1 -1
  179. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
  180. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  181. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
  182. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  183. package/dist/flows/CostCalculator/CostCalculatorResetButton.js +1 -1
  184. package/dist/flows/CostCalculator/CostCalculatorSubmitButton.js +1 -1
  185. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +1 -1
  186. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  187. package/dist/flows/CostCalculator/Results/CostCalculatorBenefitsBreakdown.js +1 -1
  188. package/dist/flows/CostCalculator/Results/CostCalculatorContributionsBreakdown.js +1 -1
  189. package/dist/flows/CostCalculator/Results/CostCalculatorExtraStatutoryPaymentsBreakdown.js +1 -1
  190. package/dist/flows/CostCalculator/Results/CostCalculatorGrossSalary.js +1 -1
  191. package/dist/flows/CostCalculator/Results/CostCalculatorIndirectTax.js +1 -1
  192. package/dist/flows/CostCalculator/Results/CostCalculatorResults.d.ts +1 -1
  193. package/dist/flows/CostCalculator/Results/CostCalculatorResults.js +1 -1
  194. package/dist/flows/CostCalculator/Results/CostCalculatorResultsChart.js +1 -1
  195. package/dist/flows/CostCalculator/Results/CostCalculatorTotalCost.js +1 -1
  196. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +1 -1
  197. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.js +1 -1
  198. package/dist/flows/CostCalculator/api.d.ts +1 -1
  199. package/dist/flows/CostCalculator/api.js +1 -1
  200. package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
  201. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  202. package/dist/flows/CostCalculator/context.d.ts +5 -5
  203. package/dist/flows/CostCalculator/hooks.d.ts +5 -5
  204. package/dist/flows/CostCalculator/hooks.js +1 -1
  205. package/dist/flows/CostCalculator/index.d.ts +3 -3
  206. package/dist/flows/CostCalculator/index.js +1 -1
  207. package/dist/flows/CostCalculator/types.d.ts +1 -1
  208. package/dist/flows/CostCalculator/utils.d.ts +3 -3
  209. package/dist/flows/CostCalculator/utils.js +1 -1
  210. package/dist/flows/Onboarding/OnboardingFlow.d.ts +11 -55
  211. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  212. package/dist/flows/Onboarding/api.d.ts +15 -7
  213. package/dist/flows/Onboarding/api.js +1 -1
  214. package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
  215. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  216. package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +14 -21
  217. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  218. package/dist/flows/Onboarding/components/BenefitsStep.d.ts +12 -38
  219. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  220. package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +14 -21
  221. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  222. package/dist/flows/Onboarding/components/OnboardingBack.js +1 -1
  223. package/dist/flows/Onboarding/components/OnboardingForm.d.ts +12 -5
  224. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  225. package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
  226. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  227. package/dist/flows/Onboarding/components/OnboardingSubmit.js +1 -1
  228. package/dist/flows/Onboarding/components/ReviewStep.d.ts +16 -37
  229. package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
  230. package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +14 -21
  231. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  232. package/dist/flows/Onboarding/context.d.ts +12 -9
  233. package/dist/flows/Onboarding/hooks.d.ts +15 -181
  234. package/dist/flows/Onboarding/hooks.js +1 -1
  235. package/dist/flows/Onboarding/index.d.ts +8 -15
  236. package/dist/flows/Onboarding/index.js +1 -1
  237. package/dist/flows/Onboarding/types.d.ts +16 -86
  238. package/dist/flows/Onboarding/utils.d.ts +15 -19
  239. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +1 -1
  240. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  241. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +1 -1
  242. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  243. package/dist/flows/Termination/PaidTimeOffForm.d.ts +1 -1
  244. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  245. package/dist/flows/Termination/TerminationBack.js +1 -1
  246. package/dist/flows/Termination/TerminationDetailsForm.d.ts +1 -1
  247. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  248. package/dist/flows/Termination/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
  249. package/dist/flows/Termination/TerminationFlow.d.ts +3 -3
  250. package/dist/flows/Termination/TerminationFlow.js +1 -1
  251. package/dist/flows/Termination/TerminationForm.d.ts +1 -1
  252. package/dist/flows/Termination/TerminationForm.js +1 -1
  253. package/dist/flows/Termination/TerminationReasonsDetailContent/TerminationReasonsDetailContent.js +1 -1
  254. package/dist/flows/Termination/TerminationSubmit.js +1 -1
  255. package/dist/flows/Termination/TimeOff.d.ts +1 -1
  256. package/dist/flows/Termination/TimeOff.js +1 -1
  257. package/dist/flows/Termination/context.d.ts +4 -4
  258. package/dist/flows/Termination/hooks.d.ts +4 -4
  259. package/dist/flows/Termination/hooks.js +1 -1
  260. package/dist/flows/Termination/index.d.ts +3 -3
  261. package/dist/flows/Termination/index.js +1 -1
  262. package/dist/flows/Termination/json-schemas/schema.js +1 -1
  263. package/dist/flows/Termination/types.d.ts +1 -1
  264. package/dist/flows/api.d.ts +1 -1
  265. package/dist/flows/api.js +1 -1
  266. package/dist/flows/types.d.ts +1 -0
  267. package/dist/index.css +1 -1
  268. package/dist/index.css.map +1 -1
  269. package/dist/index.d.ts +15 -16
  270. package/dist/index.js +1 -1
  271. package/dist/index.js.map +1 -1
  272. package/dist/internals.d.ts +2 -2
  273. package/dist/internals.js +1 -1
  274. package/dist/{mutations-BHTJydCx.d.ts → mutations-B7htnE-g.d.ts} +1 -1
  275. package/dist/{remoteFlows-bfHFRZSe.d.ts → remoteFlows-DR6mSxki.d.ts} +1 -1
  276. package/dist/types-DEybNxfT.d.ts +410 -0
  277. package/dist/types-XaAblF6e.d.ts +287 -0
  278. package/dist/{types.gen-BWjuA7VH.d.ts → types.gen-N_N1mlfc.d.ts} +59 -1
  279. package/package.json +5 -5
  280. package/dist/chunk-54KJP7WD.js +0 -2
  281. package/dist/chunk-54KJP7WD.js.map +0 -1
  282. package/dist/chunk-5CGII7CZ.js.map +0 -1
  283. package/dist/chunk-5TUFZVWO.js +0 -2
  284. package/dist/chunk-5TUFZVWO.js.map +0 -1
  285. package/dist/chunk-663AKXTN.js +0 -2
  286. package/dist/chunk-663AKXTN.js.map +0 -1
  287. package/dist/chunk-FHHAGWU5.js +0 -2
  288. package/dist/chunk-FHHAGWU5.js.map +0 -1
  289. package/dist/chunk-NO2TRS5O.js +0 -2
  290. package/dist/chunk-NO2TRS5O.js.map +0 -1
  291. package/dist/chunk-QGGKDM3N.js +0 -2
  292. package/dist/chunk-QGGKDM3N.js.map +0 -1
  293. package/dist/chunk-UH3E6HSQ.js +0 -2
  294. package/dist/chunk-Y7QVIBFX.js +0 -2
  295. package/dist/chunk-Y7QVIBFX.js.map +0 -1
  296. /package/dist/{chunk-MGOT272R.js.map → chunk-2GCMLKO2.js.map} +0 -0
  297. /package/dist/{chunk-4KA5AP7X.js.map → chunk-3GDPOMQP.js.map} +0 -0
  298. /package/dist/{chunk-R4LFNFC2.js.map → chunk-3MS7FYSY.js.map} +0 -0
  299. /package/dist/{chunk-QFZ3XVDT.js.map → chunk-3T43ERBA.js.map} +0 -0
  300. /package/dist/{chunk-2QGDCMCE.js.map → chunk-4NLAHGUV.js.map} +0 -0
  301. /package/dist/{chunk-FCRW2EG3.js.map → chunk-56D2YDS2.js.map} +0 -0
  302. /package/dist/{chunk-BITHG5X4.js.map → chunk-5EP45OQV.js.map} +0 -0
  303. /package/dist/{chunk-B3WXLC2R.js.map → chunk-5JGYNS2O.js.map} +0 -0
  304. /package/dist/{chunk-A7ZEA2WU.js.map → chunk-A6QURRVL.js.map} +0 -0
  305. /package/dist/{chunk-UH3E6HSQ.js.map → chunk-AIN5YFNL.js.map} +0 -0
  306. /package/dist/{chunk-ASKKS4Z3.js.map → chunk-AKHJDD35.js.map} +0 -0
  307. /package/dist/{chunk-CWEPL5J3.js.map → chunk-AXES4NFY.js.map} +0 -0
  308. /package/dist/{chunk-6O6CNAMF.js.map → chunk-B25LAMRX.js.map} +0 -0
  309. /package/dist/{chunk-X4GAGLFN.js.map → chunk-CCW6FKQ3.js.map} +0 -0
  310. /package/dist/{chunk-OZCQ6AOF.js.map → chunk-CKHZP3O3.js.map} +0 -0
  311. /package/dist/{chunk-LCIBPBLY.js.map → chunk-CLW7CVDG.js.map} +0 -0
  312. /package/dist/{chunk-K4VWUMNO.js.map → chunk-EAIJKDY4.js.map} +0 -0
  313. /package/dist/{chunk-MORMQBAF.js.map → chunk-EKK7R3M6.js.map} +0 -0
  314. /package/dist/{chunk-7IHBNPZK.js.map → chunk-FCAGJMPU.js.map} +0 -0
  315. /package/dist/{chunk-CKVQ4PIK.js.map → chunk-G343WOO7.js.map} +0 -0
  316. /package/dist/{chunk-RUMP764Z.js.map → chunk-GFNIN6CJ.js.map} +0 -0
  317. /package/dist/{chunk-5T25IMZ3.js.map → chunk-GSNOUE4L.js.map} +0 -0
  318. /package/dist/{chunk-CVDZ35YA.js.map → chunk-H6G4PPLM.js.map} +0 -0
  319. /package/dist/{chunk-ZTVYWMBY.js.map → chunk-HTCONTKZ.js.map} +0 -0
  320. /package/dist/{chunk-ATC4YO7K.js.map → chunk-I2URNHWK.js.map} +0 -0
  321. /package/dist/{chunk-V2PBVCRH.js.map → chunk-IQ2HRDC4.js.map} +0 -0
  322. /package/dist/{chunk-HRA6BY3O.js.map → chunk-ISWLTY4E.js.map} +0 -0
  323. /package/dist/{chunk-GNZJOPIS.js.map → chunk-JE2MYS37.js.map} +0 -0
  324. /package/dist/{chunk-76VMCRDE.js.map → chunk-JNPIBIHZ.js.map} +0 -0
  325. /package/dist/{chunk-MDQ6YJMV.js.map → chunk-KRL5QCOA.js.map} +0 -0
  326. /package/dist/{chunk-OIBVTGB4.js.map → chunk-KSHPBRPW.js.map} +0 -0
  327. /package/dist/{chunk-WL3IJ7WA.js.map → chunk-L5CORHOG.js.map} +0 -0
  328. /package/dist/{chunk-MCAK5KPI.js.map → chunk-LSGVE623.js.map} +0 -0
  329. /package/dist/{chunk-UBLE2J7V.js.map → chunk-ODI4OPN7.js.map} +0 -0
  330. /package/dist/{chunk-JWZIWG4T.js.map → chunk-OEEUSIOB.js.map} +0 -0
  331. /package/dist/{chunk-OJNWWRD5.js.map → chunk-ORBIA4S3.js.map} +0 -0
  332. /package/dist/{chunk-XVW2URFK.js.map → chunk-PAZGF4C3.js.map} +0 -0
  333. /package/dist/{chunk-3PCSFTM3.js.map → chunk-QBEJBOGL.js.map} +0 -0
  334. /package/dist/{chunk-A42AGGNH.js.map → chunk-QMUSEX2P.js.map} +0 -0
  335. /package/dist/{chunk-RNNZ5ZKE.js.map → chunk-RLLBHQWS.js.map} +0 -0
  336. /package/dist/{chunk-R2VVXLL7.js.map → chunk-S2AQQVM7.js.map} +0 -0
  337. /package/dist/{chunk-EGVWFZBR.js.map → chunk-SFX34GRA.js.map} +0 -0
  338. /package/dist/{chunk-XGMQPLVG.js.map → chunk-SV2PWH6Y.js.map} +0 -0
  339. /package/dist/{chunk-JB6XA3P6.js.map → chunk-TK6JU3ZG.js.map} +0 -0
  340. /package/dist/{chunk-GS5NA664.js.map → chunk-U3XZWSEU.js.map} +0 -0
  341. /package/dist/{chunk-4C6O4QTI.js.map → chunk-UCLVNY25.js.map} +0 -0
  342. /package/dist/{chunk-ZJ3JHILJ.js.map → chunk-VHJFIDOX.js.map} +0 -0
  343. /package/dist/{chunk-SERAGBDA.js.map → chunk-VOJHAIEH.js.map} +0 -0
  344. /package/dist/{chunk-PLWXRCGQ.js.map → chunk-VOW6W24S.js.map} +0 -0
  345. /package/dist/{chunk-M4EVWRWB.js.map → chunk-WPMPTV76.js.map} +0 -0
  346. /package/dist/{chunk-QIN5BLVI.js.map → chunk-WY3KCHHG.js.map} +0 -0
  347. /package/dist/{chunk-BP2JYRI7.js.map → chunk-X5F5HHFQ.js.map} +0 -0
  348. /package/dist/{chunk-U23SN7CM.js.map → chunk-XASIKHZL.js.map} +0 -0
  349. /package/dist/{chunk-M6ATR43P.js.map → chunk-XGPCOHUF.js.map} +0 -0
  350. /package/dist/{chunk-YFEIQZGJ.js.map → chunk-XRB4Y7WT.js.map} +0 -0
  351. /package/dist/{chunk-2I5DIIJP.js.map → chunk-Z2G2XC43.js.map} +0 -0
  352. /package/dist/{chunk-KN4F5TMS.js.map → chunk-ZXA3CCPB.js.map} +0 -0
  353. /package/dist/{chunk-756MHC7A.js.map → chunk-ZZ6MU7PF.js.map} +0 -0
  354. /package/dist/{chunk-UQYM3PBZ.js.map → chunk-ZZNI7IY2.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as S}from"./chunk-E5PSJ75C.js";import{a as F}from"./chunk-S4XU4SE7.js";import{a as _}from"./chunk-32GSS4UM.js";import{a as y}from"./chunk-7XRPOR7L.js";import{a as u}from"./chunk-A76UTPRW.js";import{a as g,b as V}from"./chunk-MDQ6YJMV.js";import{a as T}from"./chunk-PJBAQZ6G.js";import{a as c}from"./chunk-Z5WMKCRJ.js";import{c as m}from"./chunk-PAQW5BFW.js";import{a as r}from"./chunk-54KJP7WD.js";import{a as e}from"./chunk-P37U34EQ.js";import{createHeadlessForm as B}from"@remoteoss/json-schema-form";import H from"lodash.omitby";import L from"lodash.isnull";import A from"lodash.omit";import{useMemo as O}from"react";import{jsx as h,jsxs as z}from"react/jsx-runtime";function f(n,o,d){return{presentation:{inputType:"hidden",Component:e(()=>z("div",{className:r("RemoteFlows__InformationStatement",d?.className),children:[h("h3",{className:r("RemoteFlows__InformationStatement__Title"),children:n}),h("p",{className:r("RemoteFlows__InformationStatement__Description"),children:o})]}),"Component")}}}e(f,"createInformationField");import{Fragment as Z,jsx as K,jsxs as U}from"react/jsx-runtime";function q(n){return{confidential:"",customer_informed_employee:"",customer_informed_employee_date:"",customer_informed_employee_description:"",personal_email:"",termination_reason:void 0,reason_description:"",termination_reason_files:[],will_challenge_termination:"",will_challenge_termination_description:null,agrees_to_pto_amount:"",agrees_to_pto_amount_notes:null,acknowledge_termination_procedure:!1,additional_comments:"",proposed_termination_date:"",risk_assessment_reasons:[],timesheet_file:void 0,...n}}e(q,"buildInitialValues");var Te=e(({employmentId:n,options:o})=>{let{fieldValues:d,setFieldValues:P,stepState:i,previousStep:k,nextStep:w}=T(F),M={...i.values?.[i.currentStep.name],...d},N=O(()=>({fields:{risk_assesment_info:f("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:o?.jsfModify?.fields?.risk_assesment_info?.["x-jsf-presentation"]?.className}),proposed_termination_date_info:f("Proposed termination date",U(Z,{children:["In most cases, we 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.",K(u,{zendeskId:_.terminationNoticePeriods,className:r("text-sm",o?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.zendeskTriggerButtonClassName),children:"Learn about notice periods"})]}),{className:o?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.className})}}),[o?.jsfModify]),{data:s,isLoading:x}=V({formValues:M,jsfModify:{...o?.jsfModify,fields:{...o?.jsfModify?.fields,...N?.fields}},step:i.currentStep.name}),l=B(S.data.schema),p=g(),{mutateAsync:b}=y(p);async function j(a){if(!n)throw new Error("Employment id is missing");if(s){let t=m(a,l.fields,{isPartialValidation:!0}),{customer_informed_employee:I}=t,E=I==="yes"?{employee_awareness:{date:t.customer_informed_employee_date,note:t.customer_informed_employee_description}}:void 0,J=c(t,["agrees_to_pto_amount","confidential","customer_informed_employee","will_challenge_termination"]),$=A(J,"customer_informed_employee_date","customer_informed_employee_description"),D=H({...$,...E},L);return b({employment_id:n,termination_details:D,type:"termination"})}}e(j,"onSubmit");function C(){k()}e(C,"back");function v(){w()}e(v,"next");let R=q({...i.values?.employee_communication,...i.values?.termination_details,...i.values?.paid_time_off,...i.values?.additional_information});return{employmentId:n,stepState:i,fields:s?.fields||[],isLoading:x,isSubmitting:p.isPending,initialValues:R,handleValidation:e(a=>{if(s){let t=m(a,s?.fields);return s?.handleValidation(t)}return null},"handleValidation"),checkFieldUpdates:e(a=>{if(l){let t=m(a,l?.fields,{isPartialValidation:!0});P(t)}},"checkFieldUpdates"),parseFormValues:e(a=>m(a,l.fields,{isPartialValidation:!0}),"parseFormValues"),onSubmit:j,back:C,next:v}},"useTermination");export{Te as a};
2
- //# sourceMappingURL=chunk-OZCQ6AOF.js.map
1
+ import{a as S}from"./chunk-E5PSJ75C.js";import{a as F}from"./chunk-S4XU4SE7.js";import{a as _}from"./chunk-32GSS4UM.js";import{a as y}from"./chunk-7XRPOR7L.js";import{a as u}from"./chunk-HH4YP6QX.js";import{a as g,b as V}from"./chunk-KRL5QCOA.js";import{a as T}from"./chunk-PJBAQZ6G.js";import{a as c}from"./chunk-Z5WMKCRJ.js";import{c as m}from"./chunk-PAQW5BFW.js";import{a as r}from"./chunk-HC56JKI2.js";import{a as e}from"./chunk-P37U34EQ.js";import{createHeadlessForm as B}from"@remoteoss/json-schema-form";import H from"lodash.omitby";import L from"lodash.isnull";import A from"lodash.omit";import{useMemo as O}from"react";import{jsx as h,jsxs as z}from"react/jsx-runtime";function f(n,o,d){return{presentation:{inputType:"hidden",Component:e(()=>z("div",{className:r("RemoteFlows__InformationStatement",d?.className),children:[h("h3",{className:r("RemoteFlows__InformationStatement__Title"),children:n}),h("p",{className:r("RemoteFlows__InformationStatement__Description"),children:o})]}),"Component")}}}e(f,"createInformationField");import{Fragment as Z,jsx as K,jsxs as U}from"react/jsx-runtime";function q(n){return{confidential:"",customer_informed_employee:"",customer_informed_employee_date:"",customer_informed_employee_description:"",personal_email:"",termination_reason:void 0,reason_description:"",termination_reason_files:[],will_challenge_termination:"",will_challenge_termination_description:null,agrees_to_pto_amount:"",agrees_to_pto_amount_notes:null,acknowledge_termination_procedure:!1,additional_comments:"",proposed_termination_date:"",risk_assessment_reasons:[],timesheet_file:void 0,...n}}e(q,"buildInitialValues");var Te=e(({employmentId:n,options:o})=>{let{fieldValues:d,setFieldValues:P,stepState:i,previousStep:k,nextStep:w}=T(F),M={...i.values?.[i.currentStep.name],...d},N=O(()=>({fields:{risk_assesment_info:f("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:o?.jsfModify?.fields?.risk_assesment_info?.["x-jsf-presentation"]?.className}),proposed_termination_date_info:f("Proposed termination date",U(Z,{children:["In most cases, we 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.",K(u,{zendeskId:_.terminationNoticePeriods,className:r("text-sm",o?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.zendeskTriggerButtonClassName),children:"Learn about notice periods"})]}),{className:o?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.className})}}),[o?.jsfModify]),{data:s,isLoading:x}=V({formValues:M,jsfModify:{...o?.jsfModify,fields:{...o?.jsfModify?.fields,...N?.fields}},step:i.currentStep.name}),l=B(S.data.schema),p=g(),{mutateAsync:b}=y(p);async function j(a){if(!n)throw new Error("Employment id is missing");if(s){let t=m(a,l.fields,{isPartialValidation:!0}),{customer_informed_employee:I}=t,E=I==="yes"?{employee_awareness:{date:t.customer_informed_employee_date,note:t.customer_informed_employee_description}}:void 0,J=c(t,["agrees_to_pto_amount","confidential","customer_informed_employee","will_challenge_termination"]),$=A(J,"customer_informed_employee_date","customer_informed_employee_description"),D=H({...$,...E},L);return b({employment_id:n,termination_details:D,type:"termination"})}}e(j,"onSubmit");function C(){k()}e(C,"back");function v(){w()}e(v,"next");let R=q({...i.values?.employee_communication,...i.values?.termination_details,...i.values?.paid_time_off,...i.values?.additional_information});return{employmentId:n,stepState:i,fields:s?.fields||[],isLoading:x,isSubmitting:p.isPending,initialValues:R,handleValidation:e(a=>{if(s){let t=m(a,s?.fields);return s?.handleValidation(t)}return null},"handleValidation"),checkFieldUpdates:e(a=>{if(l){let t=m(a,l?.fields,{isPartialValidation:!0});P(t)}},"checkFieldUpdates"),parseFormValues:e(a=>m(a,l.fields,{isPartialValidation:!0}),"parseFormValues"),onSubmit:j,back:C,next:v}},"useTermination");export{Te as a};
2
+ //# sourceMappingURL=chunk-CKHZP3O3.js.map
@@ -1,2 +1,2 @@
1
- import{b as g}from"./chunk-PGWKJ6FK.js";import{d as f,e as w}from"./chunk-QGGKDM3N.js";import{a as m}from"./chunk-7XRPOR7L.js";import{b as E}from"./chunk-2QGDCMCE.js";import{b as y}from"./chunk-3ZWDIEEM.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as R}from"react/jsx-runtime";function A({onSubmit:S,onSuccess:d,onError:o,render:u,...r}){let{components:I}=y(),{onboardingBag:t,setCreditScore:c}=g(),n=f(),i=w(),{mutateAsync:b}=m(n),{mutateAsync:_}=m(i),l=a(async()=>{try{if(await S?.(),t.creditRiskStatus==="deposit_required"&&t.employmentId&&t.employment?.status&&!t.isEmploymentReadOnly){let e=await _({employment_slug:t.employmentId});if(e.data){await d?.({data:e.data,employmentStatus:"created_awaiting_reserve"}),c?.(s=>({...s,showReserveInvoice:!0})),t.refetchEmployment();return}e.error&&o?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}else if(t.employmentId){let e=await b({employment_id:t.employmentId});if(e.data){await d?.({data:e.data,employmentStatus:"invited"}),c?.(s=>({...s,showInviteSuccessful:!0})),t.refetchEmployment();return}e.error&&o?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}}catch(e){o?.({error:e,rawError:e,fieldErrors:[]})}},"handleSubmit"),p=t.creditRiskStatus==="deposit_required"&&t.employment?.status&&!t.isEmploymentReadOnly,v=I?.button;return v?R(v,{...r,disabled:n.isPending||i.isPending||r.disabled,onClick:e=>{l(),r.onClick?.(e)},children:u({employmentStatus:p?"created_awaiting_reserve":"invited"})}):R(E,{...r,disabled:n.isPending||i.isPending||r.disabled,onClick:()=>{l()},children:u({employmentStatus:p?"created_awaiting_reserve":"invited"})})}a(A,"OnboardingInvite");export{A as a};
2
- //# sourceMappingURL=chunk-LCIBPBLY.js.map
1
+ import{b as g}from"./chunk-PGWKJ6FK.js";import{d as f,e as w}from"./chunk-VXPJXQP3.js";import{a as m}from"./chunk-7XRPOR7L.js";import{b as E}from"./chunk-4NLAHGUV.js";import{b as y}from"./chunk-3ZWDIEEM.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as R}from"react/jsx-runtime";function A({onSubmit:S,onSuccess:d,onError:o,render:u,...r}){let{components:I}=y(),{onboardingBag:t,setCreditScore:c}=g(),n=f(),i=w(),{mutateAsync:b}=m(n),{mutateAsync:_}=m(i),l=a(async()=>{try{if(await S?.(),t.creditRiskStatus==="deposit_required"&&t.employmentId&&t.employment?.status&&!t.isEmploymentReadOnly){let e=await _({employment_slug:t.employmentId});if(e.data){await d?.({data:e.data,employmentStatus:"created_awaiting_reserve"}),c?.(s=>({...s,showReserveInvoice:!0})),t.refetchEmployment();return}e.error&&o?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}else if(t.employmentId){let e=await b({employment_id:t.employmentId});if(e.data){await d?.({data:e.data,employmentStatus:"invited"}),c?.(s=>({...s,showInviteSuccessful:!0})),t.refetchEmployment();return}e.error&&o?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}}catch(e){o?.({error:e,rawError:e,fieldErrors:[]})}},"handleSubmit"),p=t.creditRiskStatus==="deposit_required"&&t.employment?.status&&!t.isEmploymentReadOnly,v=I?.button;return v?R(v,{...r,disabled:n.isPending||i.isPending||r.disabled,onClick:e=>{l(),r.onClick?.(e)},children:u({employmentStatus:p?"created_awaiting_reserve":"invited"})}):R(E,{...r,disabled:n.isPending||i.isPending||r.disabled,onClick:()=>{l()},children:u({employmentStatus:p?"created_awaiting_reserve":"invited"})})}a(A,"OnboardingInvite");export{A as a};
2
+ //# sourceMappingURL=chunk-CLW7CVDG.js.map
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=chunk-DKFUZO5P.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,2 @@
1
+ import{a as m}from"./chunk-L2GYSHXS.js";import{a as p}from"./chunk-AWK7AF5V.js";import{a as i}from"./chunk-C535PFLI.js";import{a as e}from"./chunk-VSUEF4AY.js";import{a as c}from"./chunk-XRU2O525.js";import{a as d}from"./chunk-SDIBOMMT.js";import{a as n}from"./chunk-RVEQJNZI.js";import{a as f}from"./chunk-4Q7KTWXP.js";import{a as t}from"./chunk-TOA3JILU.js";import{a}from"./chunk-XQ5TL23G.js";import{a as r}from"./chunk-P37U34EQ.js";import{useId as u}from"react";import{jsx as v}from"react/jsx-runtime";var A=r(({render:g,employmentId:C,externalId:S,countryCode:b,skipSteps:s,initialValues:O,options:l})=>{let o=a({options:l,employmentId:C,externalId:S,countryCode:b,skipSteps:s,initialValues:O}),P=u();return v(t.Provider,{value:{contractorOnboardingBag:o,formId:P},children:g({contractorOnboardingBag:o,components:{BasicInformationStep:e,SelectCountryStep:i,BackButton:n,SubmitButton:m,PricingPlanStep:p,ContractDetailsStep:c,ContractPreviewStep:d,OnboardingInvite:f}})})},"ContractorOnboardingFlow");export{A as a};
2
+ //# sourceMappingURL=chunk-DPIKH7BI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/ContractorOnboarding/ContractorOnboarding.tsx"],"sourcesContent":["import { OnboardingBack } from '@/src/flows/ContractorOnboarding/components/OnboardingBack';\nimport { SelectCountryStep } from '@/src/flows/ContractorOnboarding/components/SelectCountryStep';\nimport { ContractorOnboardingContext } from '@/src/flows/ContractorOnboarding/context';\nimport { useContractorOnboarding } from '@/src/flows/ContractorOnboarding/hooks';\nimport { ContractorOnboardingFlowProps } from '@/src/flows/ContractorOnboarding/types';\nimport { BasicInformationStep } from '@/src/flows/ContractorOnboarding/components/BasicInformationStep';\nimport { OnboardingSubmit } from '@/src/flows/ContractorOnboarding/components/OnboardingSubmit';\nimport { useId } from 'react';\nimport { PricingPlanStep } from '@/src/flows/ContractorOnboarding/components/PricingPlan';\nimport { ContractDetailsStep } from '@/src/flows/ContractorOnboarding/components/ContractDetailsStep';\nimport { ContractPreviewStep } from '@/src/flows/ContractorOnboarding/components/ContractPreviewStep';\nimport { OnboardingInvite } from '@/src/flows/ContractorOnboarding/components/OnboardingInvite';\n\nexport const ContractorOnboardingFlow = ({\n render,\n employmentId,\n externalId,\n countryCode,\n skipSteps,\n initialValues,\n options,\n}: ContractorOnboardingFlowProps) => {\n const contractorOnboardingBag = useContractorOnboarding({\n options,\n employmentId,\n externalId,\n countryCode,\n skipSteps,\n initialValues,\n });\n const formId = useId();\n return (\n <ContractorOnboardingContext.Provider\n value={{ contractorOnboardingBag, formId }}\n >\n {render({\n contractorOnboardingBag,\n components: {\n BasicInformationStep: BasicInformationStep,\n SelectCountryStep: SelectCountryStep,\n BackButton: OnboardingBack,\n SubmitButton: OnboardingSubmit,\n PricingPlanStep: PricingPlanStep,\n ContractDetailsStep: ContractDetailsStep,\n ContractPreviewStep: ContractPreviewStep,\n OnboardingInvite: OnboardingInvite,\n },\n })}\n </ContractorOnboardingContext.Provider>\n );\n};\n"],"mappings":"mbAOA,OAAS,SAAAA,MAAa,QAyBlB,cAAAC,MAAA,oBAnBG,IAAMC,EAA2BC,EAAA,CAAC,CACvC,OAAAC,EACA,aAAAC,EACA,WAAAC,EACA,YAAAC,EACA,UAAAC,EACA,cAAAC,EACA,QAAAC,CACF,IAAqC,CACnC,IAAMC,EAA0BC,EAAwB,CACtD,QAAAF,EACA,aAAAL,EACA,WAAAC,EACA,YAAAC,EACA,UAAAC,EACA,cAAAC,CACF,CAAC,EACKI,EAASC,EAAM,EACrB,OACEb,EAACc,EAA4B,SAA5B,CACC,MAAO,CAAE,wBAAAJ,EAAyB,OAAAE,CAAO,EAExC,SAAAT,EAAO,CACN,wBAAAO,EACA,WAAY,CACV,qBAAsBK,EACtB,kBAAmBC,EACnB,WAAYC,EACZ,aAAcC,EACd,gBAAiBC,EACjB,oBAAqBC,EACrB,oBAAqBC,EACrB,iBAAkBC,CACpB,CACF,CAAC,EACH,CAEJ,EArCwC","names":["useId","jsx","ContractorOnboardingFlow","__name","render","employmentId","externalId","countryCode","skipSteps","initialValues","options","contractorOnboardingBag","useContractorOnboarding","formId","useId","ContractorOnboardingContext","BasicInformationStep","SelectCountryStep","OnboardingBack","OnboardingSubmit","PricingPlanStep","ContractDetailsStep","ContractPreviewStep","OnboardingInvite"]}
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-R4LFNFC2.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as i}from"react/jsx-runtime";var l=e(({currency:n,desiredCurrency:o,annual_gross_salary_conversion_properties:r,...a})=>i(s,{...a,sourceCurrency:n,targetCurrency:o,conversionFieldName:"annual_gross_salary_conversion",conversionProperties:{...r,description:r?.description||"Estimated amount. This is an estimation. We calculate conversions based on spot rates that are subject to fluctuation over time."},classNamePrefix:"RemoteFlows-AnnualGrossSalary",conversionType:"no_spread"}),"AnnualGrossSalary");export{l as a};
2
- //# sourceMappingURL=chunk-K4VWUMNO.js.map
1
+ import{a as s}from"./chunk-3MS7FYSY.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as i}from"react/jsx-runtime";var l=e(({currency:n,desiredCurrency:o,annual_gross_salary_conversion_properties:r,...a})=>i(s,{...a,sourceCurrency:n,targetCurrency:o,conversionFieldName:"annual_gross_salary_conversion",conversionProperties:{...r,description:r?.description||"Estimated amount. This is an estimation. We calculate conversions based on spot rates that are subject to fluctuation over time."},classNamePrefix:"RemoteFlows-AnnualGrossSalary",conversionType:"no_spread"}),"AnnualGrossSalary");export{l as a};
2
+ //# sourceMappingURL=chunk-EAIJKDY4.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-QFZ3XVDT.js";import{b as e}from"./chunk-54KJP7WD.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as r,jsxs as o}from"react/jsx-runtime";function m({indirectTax:i,currency:n}){return o("div",{children:[o("div",{className:"flex justify-between items-center mb-2",children:[r("h3",{className:"font-medium text-primary-foreground",children:"Indirect Tax"}),r("span",{className:"font-semibold text-lg",children:e(i,n)})]}),r(a,{})]})}t(m,"CostCalculatorIndirectTax");export{m as a};
2
- //# sourceMappingURL=chunk-MORMQBAF.js.map
1
+ import{a}from"./chunk-3T43ERBA.js";import{b as e}from"./chunk-HC56JKI2.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as r,jsxs as o}from"react/jsx-runtime";function m({indirectTax:i,currency:n}){return o("div",{children:[o("div",{className:"flex justify-between items-center mb-2",children:[r("h3",{className:"font-medium text-primary-foreground",children:"Indirect Tax"}),r("span",{className:"font-semibold text-lg",children:e(i,n)})]}),r(a,{})]})}t(m,"CostCalculatorIndirectTax");export{m as a};
2
+ //# sourceMappingURL=chunk-EKK7R3M6.js.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-54KJP7WD.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as o}from"react/jsx-runtime";function a({className:i,type:r,...n}){return o("input",{type:r,"data-slot":"input",className:t("shadow-xs border-input file:text-foreground placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-xl border bg-transparent px-4 py-7 text-sm transition-[color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-focused","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),...n})}e(a,"Input");export{a};
2
- //# sourceMappingURL=chunk-7IHBNPZK.js.map
1
+ import{a as t}from"./chunk-HC56JKI2.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as o}from"react/jsx-runtime";function a({className:i,type:r,...n}){return o("input",{type:r,"data-slot":"input",className:t("shadow-xs border-input file:text-foreground placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-xl border bg-transparent px-4 py-7 text-sm transition-[color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-focused","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),...n})}e(a,"Input");export{a};
2
+ //# sourceMappingURL=chunk-FCAGJMPU.js.map
@@ -1,2 +1,2 @@
1
- import{b as s}from"./chunk-PGWKJ6FK.js";import{b as u}from"./chunk-2QGDCMCE.js";import{b as i}from"./chunk-3ZWDIEEM.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as m}from"react/jsx-runtime";function f({children:o,onClick:a,...n}){let{onboardingBag:{back:c,isEmploymentReadOnly:B}}=s(),{components:d}=i(),r=t(p=>{B||c(),a?.(p)},"onBackHandler"),e=d?.button;return e?m(e,{...n,onClick:r,children:o}):m(u,{...n,onClick:r,children:o})}t(f,"OnboardingBack");export{f as a};
2
- //# sourceMappingURL=chunk-5CGII7CZ.js.map
1
+ import{b as s}from"./chunk-PGWKJ6FK.js";import{b as u}from"./chunk-4NLAHGUV.js";import{b as i}from"./chunk-3ZWDIEEM.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as m}from"react/jsx-runtime";function f({children:o,onClick:a,...n}){let{onboardingBag:{back:c,isEmploymentReadOnly:B}}=s(),{components:d}=i(),r=t(p=>{B||c(),a?.(p)},"onBackHandler"),e=d?.button;return e?m(e,{...n,onClick:r,children:o}):m(u,{...n,onClick:r,children:o})}t(f,"OnboardingBack");export{f as a};
2
+ //# sourceMappingURL=chunk-G2NIQGHZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/Onboarding/components/OnboardingBack.tsx"],"sourcesContent":["import { Button } from '@/src/components/ui/button';\nimport { ButtonHTMLAttributes, PropsWithChildren } from 'react';\nimport { useOnboardingContext } from '@/src/flows/Onboarding/context';\nimport { useFormFields } from '@/src/context';\n\ntype OnboardingBackProps = ButtonHTMLAttributes<HTMLButtonElement> &\n Record<string, unknown>;\n\nexport function OnboardingBack({\n children,\n onClick,\n ...props\n}: PropsWithChildren<OnboardingBackProps>) {\n const {\n onboardingBag: { back, isEmploymentReadOnly },\n } = useOnboardingContext();\n\n const { components } = useFormFields();\n\n const onBackHandler = (evt: React.MouseEvent<HTMLButtonElement>) => {\n // TODO: TBD if we want to allow back button to be clicked when employment is readonly\n if (!isEmploymentReadOnly) {\n back();\n }\n onClick?.(evt);\n };\n\n const CustomButton = components?.button;\n if (CustomButton) {\n return (\n <CustomButton {...props} onClick={onBackHandler}>\n {children}\n </CustomButton>\n );\n }\n\n return (\n <Button {...props} onClick={onBackHandler}>\n {children}\n </Button>\n );\n}\n"],"mappings":"gKA8BM,cAAAA,MAAA,oBAtBC,SAASC,EAAe,CAC7B,SAAAC,EACA,QAAAC,EACA,GAAGC,CACL,EAA2C,CACzC,GAAM,CACJ,cAAe,CAAE,KAAAC,EAAM,qBAAAC,CAAqB,CAC9C,EAAIC,EAAqB,EAEnB,CAAE,WAAAC,CAAW,EAAIC,EAAc,EAE/BC,EAAgBC,EAACC,GAA6C,CAE7DN,GACHD,EAAK,EAEPF,IAAUS,CAAG,CACf,EANsB,iBAQhBC,EAAeL,GAAY,OACjC,OAAIK,EAEAb,EAACa,EAAA,CAAc,GAAGT,EAAO,QAASM,EAC/B,SAAAR,EACH,EAKFF,EAACc,EAAA,CAAQ,GAAGV,EAAO,QAASM,EACzB,SAAAR,EACH,CAEJ,CAjCgBS,EAAAV,EAAA","names":["jsx","OnboardingBack","children","onClick","props","back","isEmploymentReadOnly","useOnboardingContext","components","useFormFields","onBackHandler","__name","evt","CustomButton","Button"]}
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-32GSS4UM.js";import{a as n}from"./chunk-A76UTPRW.js";import{a as e}from"./chunk-54KJP7WD.js";import{a as o}from"./chunk-P37U34EQ.js";import{Fragment as s,jsx as t,jsxs as m}from"react/jsx-runtime";var r=["You submit your termination request.","We review 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, we 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.","We share termination documents with the employee.","The employee signs the termination documents if required.","We process the final salary and offboard the employee."],h=o(()=>m(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. We'll lead communication with them after you submit this form and we finalize the termination terms."}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription"),children:"If you already informed them, that's okay. We'll ask for the details regarding that communication and take it from there."}),t(n,{className:e("RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm"),zendeskId:i.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:r.map((a,l)=>t("li",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessListItem"),children:a},l))})]}),"TerminationDialogInfoContent");export{h as a};
2
- //# sourceMappingURL=chunk-CKVQ4PIK.js.map
1
+ import{a as i}from"./chunk-32GSS4UM.js";import{a as n}from"./chunk-HH4YP6QX.js";import{a as e}from"./chunk-HC56JKI2.js";import{a as o}from"./chunk-P37U34EQ.js";import{Fragment as s,jsx as t,jsxs as m}from"react/jsx-runtime";var r=["You submit your termination request.","We review 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, we 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.","We share termination documents with the employee.","The employee signs the termination documents if required.","We process the final salary and offboard the employee."],h=o(()=>m(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. We'll lead communication with them after you submit this form and we finalize the termination terms."}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription"),children:"If you already informed them, that's okay. We'll ask for the details regarding that communication and take it from there."}),t(n,{className:e("RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm"),zendeskId:i.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:r.map((a,l)=>t("li",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessListItem"),children:a},l))})]}),"TerminationDialogInfoContent");export{h as a};
2
+ //# sourceMappingURL=chunk-G343WOO7.js.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-V2PBVCRH.js";import{b as n}from"./chunk-PGWKJ6FK.js";import{b as i}from"./chunk-7XRPOR7L.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as p}from"react/jsx-runtime";function F({onSubmit:l,onError:t,onSuccess:d}){let{onboardingBag:o}=n(),m=e(async a=>{try{await l?.(o.parseFormValues(a));let r=await o.onSubmit(a);if(r?.data){await d?.(r.data),o?.next();return}if(r?.error){let c=i(r?.fieldErrors||[],o.meta?.fields?.contract_details);t?.({error:r.error,rawError:r.rawError,fieldErrors:c})}}catch(r){t?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit");return p(s,{defaultValues:o.stepState.values?.contract_details||o.initialValues.contract_details,onSubmit:m})}e(F,"ContractDetailsStep");export{F as a};
2
- //# sourceMappingURL=chunk-RUMP764Z.js.map
1
+ import{a as s}from"./chunk-IQ2HRDC4.js";import{b as n}from"./chunk-PGWKJ6FK.js";import{b as i}from"./chunk-7XRPOR7L.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as p}from"react/jsx-runtime";function F({onSubmit:l,onError:t,onSuccess:d}){let{onboardingBag:o}=n(),m=e(async a=>{try{await l?.(o.parseFormValues(a));let r=await o.onSubmit(a);if(r?.data){await d?.(r.data),o?.next();return}if(r?.error){let c=i(r?.fieldErrors||[],o.meta?.fields?.contract_details);t?.({error:r.error,rawError:r.rawError,fieldErrors:c})}}catch(r){t?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit");return p(s,{defaultValues:o.stepState.values?.contract_details||o.initialValues.contract_details,onSubmit:m})}e(F,"ContractDetailsStep");export{F as a};
2
+ //# sourceMappingURL=chunk-GFNIN6CJ.js.map
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-QFZ3XVDT.js";import{a as m}from"./chunk-ZE3YT3Q6.js";import{a as o}from"./chunk-A76UTPRW.js";import{b as i}from"./chunk-2QGDCMCE.js";import{b as a}from"./chunk-54KJP7WD.js";import{a as r}from"./chunk-P37U34EQ.js";import{Info as u}from"lucide-react";import{Fragment as f,jsx as e,jsxs as t}from"react/jsx-runtime";function w({benefitsTotal:d,benefitsBreakdown:p,currency:n}){return t("div",{children:[t("div",{className:"flex justify-between items-center mb-2",children:[e("h3",{className:"font-medium text-primary-foreground-800",children:"Benefits"}),e("span",{className:"font-semibold text-lg",children:a(d,n)})]}),e(l,{className:"mb-3"}),e("div",{className:"space-y-3 pl-2",children:p.map((s,c)=>t("div",{className:"flex justify-between items-start text-sm",children:[t("div",{className:"flex items-start gap-2",children:[e("span",{children:s.name}),s.description&&e(m,{content:t(f,{children:[e("span",{children:s.description})," ",s.zendesk_article_url&&e(o,{zendeskId:Number(s.zendesk_article_id),children:"Learn more"})]}),children:t(i,{variant:"ghost",size:"icon",className:"h-4 w-4 p-0",children:[e(u,{className:"h-3 w-3 text-gray-400"}),e("span",{className:"sr-only",children:"Info"})]})})]}),e("span",{children:a(s.amount,n)})]},c))})]})}r(w,"CostCalculatorBenefitsBreakdown");export{w as a};
2
- //# sourceMappingURL=chunk-5T25IMZ3.js.map
1
+ import{a as m}from"./chunk-ZE3YT3Q6.js";import{a as l}from"./chunk-3T43ERBA.js";import{a as o}from"./chunk-HH4YP6QX.js";import{b as i}from"./chunk-4NLAHGUV.js";import{b as a}from"./chunk-HC56JKI2.js";import{a as r}from"./chunk-P37U34EQ.js";import{Info as u}from"lucide-react";import{Fragment as f,jsx as e,jsxs as t}from"react/jsx-runtime";function w({benefitsTotal:d,benefitsBreakdown:p,currency:n}){return t("div",{children:[t("div",{className:"flex justify-between items-center mb-2",children:[e("h3",{className:"font-medium text-primary-foreground-800",children:"Benefits"}),e("span",{className:"font-semibold text-lg",children:a(d,n)})]}),e(l,{className:"mb-3"}),e("div",{className:"space-y-3 pl-2",children:p.map((s,c)=>t("div",{className:"flex justify-between items-start text-sm",children:[t("div",{className:"flex items-start gap-2",children:[e("span",{children:s.name}),s.description&&e(m,{content:t(f,{children:[e("span",{children:s.description})," ",s.zendesk_article_url&&e(o,{zendeskId:Number(s.zendesk_article_id),children:"Learn more"})]}),children:t(i,{variant:"ghost",size:"icon",className:"h-4 w-4 p-0",children:[e(u,{className:"h-3 w-3 text-gray-400"}),e("span",{className:"sr-only",children:"Info"})]})})]}),e("span",{children:a(s.amount,n)})]},c))})]})}r(w,"CostCalculatorBenefitsBreakdown");export{w as a};
2
+ //# sourceMappingURL=chunk-GSNOUE4L.js.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-QIN5BLVI.js";import{b as a}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as p}from"react/jsx-runtime";function F({requesterName:n,onSubmit:s,onSuccess:m,onError:d}){let{terminationBag:e}=a(),l=i(async o=>{await s?.(e?.parseFormValues(o));let r=await e?.onSubmit(o);r?.error?d?.(r.error):r?.data&&await m?.(r.data)},"handleSubmit"),u=e?.fields.map(o=>o.name==="acknowledge_termination_procedure"?{...o,label:o.label.replace("{{requesterName}}",n)}:o);return p(t,{fields:u,onSubmit:l})}i(F,"AdditionalDetailsForm");export{F as a};
2
- //# sourceMappingURL=chunk-CVDZ35YA.js.map
1
+ import{a as t}from"./chunk-WY3KCHHG.js";import{b as a}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as p}from"react/jsx-runtime";function F({requesterName:n,onSubmit:s,onSuccess:m,onError:d}){let{terminationBag:e}=a(),l=i(async o=>{await s?.(e?.parseFormValues(o));let r=await e?.onSubmit(o);r?.error?d?.(r.error):r?.data&&await m?.(r.data)},"handleSubmit"),u=e?.fields.map(o=>o.name==="acknowledge_termination_procedure"?{...o,label:o.label.replace("{{requesterName}}",n)}:o);return p(t,{fields:u,onSubmit:l})}i(F,"AdditionalDetailsForm");export{F as a};
2
+ //# sourceMappingURL=chunk-H6G4PPLM.js.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-P37U34EQ.js";import{clsx as u}from"clsx";import{twMerge as p}from"tailwind-merge";import s from"dompurify";function g(...e){return p(u(e))}a(g,"cn");function V(e,n="\u20AC"){if(e==null)return"-";let r=e/100;return`${n}${r.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}a(V,"formatCurrency");var f=a(e=>{let n={};return e.inner.forEach(r=>{r.path!==void 0&&(n[r.path]={type:r.type,errors:r.errors,inner:r.inner.map(i=>f(i))})}),n},"transformYupErrorsIntoObject");function A(e){window.RemoteFlowsSDK={version:e}}a(A,"debug");var c=a(e=>{let n=new Set(e?e.toLowerCase().split(" "):[]);return n.add("noopener"),n.add("noreferrer"),Array.from(n).join(" ")},"appendSecureRelValue");s.isSupported&&s.addHook("afterSanitizeAttributes",e=>{let n=e.getAttribute("target");if(e.tagName==="A"&&(!n||n!=="_self")){let r=e.getAttribute("href");if(r&&!r.startsWith("#")&&/^https?:\/\//i.test(r)){e.setAttribute("target","_blank");let i=e.getAttribute("rel");e.setAttribute("rel",c(i))}}});var E=a(e=>s.sanitize(e,{ADD_ATTR:["target"]}),"sanitizeHtml");function d(e,n){return n?Object.fromEntries(Object.entries(e).map(([r,i])=>{if(i===void 0)return[r,void 0];let t=n.find(o=>o.name===r);if(t?.isVisible===!1||t?.deprecated)return[r,void 0];if(t?.type==="radio"||t?.type==="select"){let o=t.options.find(l=>l.value===i);return o?[r,{prettyValue:o?.label,label:t?.label,inputType:t?.type}]:void 0}if(t?.type==="checkbox"&&t?.const)return[r,{prettyValue:!0,label:t.label,inputType:t?.type}];if(t?.type==="countries"&&Array.isArray(i))return[r,{prettyValue:i.join(),label:t.label,inputType:t?.type}];if(t?.type==="fieldset"){let o=d(i,t.fields);if(!o.label&&o.value){let l={...o.value,label:t.label,inputType:t?.type};return[r,l]}return[r,o]}if(t?.type==="money")return[r,{prettyValue:i,label:t.label,inputType:t?.type,currency:t?.currency}];if(t)return[r,{prettyValue:i,label:t.label,inputType:t?.type}]}).filter(Boolean)):{}}a(d,"prettifyFormValues");export{g as a,V as b,f as c,A as d,E as e,d as f};
2
+ //# sourceMappingURL=chunk-HC56JKI2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lib/utils.ts"],"sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\nimport { ValidationError } from 'yup';\nimport DOMPurify from 'dompurify';\nimport { Fields } from '@remoteoss/json-schema-form';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport function formatCurrency(\n amount: number | undefined | null,\n symbol = '€',\n): string {\n if (amount == null) {\n return '-';\n }\n\n const value = amount / 100;\n\n return `${symbol}${value.toLocaleString('en-US', {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n })}`;\n}\n\ntype YupError = Pick<ValidationError, 'type' | 'errors'> & {\n inner: Record<string, YupError>[];\n};\n\n/**\n * Transforms a Yup ValidationError object into a more readable object. The format is as follows:\n * {\n * [fieldName]: {\n * type: string,\n * errors: string[],\n * inner: YupError[],\n * },\n * }\n * @param errors\n * @returns\n */\nexport const transformYupErrorsIntoObject = (errors: ValidationError) => {\n const validationErrors: Record<string, YupError> = {};\n\n errors.inner.forEach((error: ValidationError) => {\n if (error.path !== undefined) {\n validationErrors[error.path] = {\n type: error.type,\n errors: error.errors,\n inner: error.inner.map((innerError) =>\n transformYupErrorsIntoObject(innerError),\n ),\n };\n }\n });\n\n return validationErrors;\n};\n\n/**\n * Debug utility to add version to window object\n * @param version - The version of the SDK\n */\nexport function debug(version: string) {\n window.RemoteFlowsSDK = {\n version,\n };\n}\n\n// Deduplicates rel values if necessary and appends noopener and noreferrer\nconst appendSecureRelValue = (rel: string | null) => {\n const attributes = new Set(rel ? rel.toLowerCase().split(' ') : []);\n\n attributes.add('noopener');\n attributes.add('noreferrer');\n\n return Array.from(attributes).join(' ');\n};\n\nif (DOMPurify.isSupported) {\n DOMPurify.addHook('afterSanitizeAttributes', (node) => {\n const target = node.getAttribute('target');\n\n if (node.tagName === 'A' && (!target || target !== '_self')) {\n const href = node.getAttribute('href');\n\n // Skip internal anchors (#section), relative URLs, and non-http protocols\n if (href && !href.startsWith('#') && /^https?:\\/\\//i.test(href)) {\n node.setAttribute('target', '_blank');\n const rel = node.getAttribute('rel');\n node.setAttribute('rel', appendSecureRelValue(rel));\n }\n }\n });\n}\n\nexport const sanitizeHtml = (html: string) => {\n return DOMPurify.sanitize(html, { ADD_ATTR: ['target'] });\n};\n\n/**\n * Function to prettify form values. Returns a pretty value and label for each field.\n * @param values - Form values to prettify\n * @param fields - Form fields\n * @returns Prettified form values\n */\n// @ts-expect-error need to check function return type\nexport function prettifyFormValues(\n values: Record<string, unknown>,\n fields: Fields | undefined,\n) {\n if (!fields) {\n return {};\n }\n return Object.fromEntries(\n Object.entries(values)\n // @ts-expect-error need to check function return type\n .map(([key, value]) => {\n if (value === undefined) {\n return [key, undefined];\n }\n\n const field = fields.find((field) => field.name === key);\n\n if (field?.isVisible === false || field?.deprecated) {\n return [key, undefined];\n }\n\n if (field?.type === 'radio' || field?.type === 'select') {\n const option = (\n field.options as Array<{ value: string; label: string }>\n ).find((option) => option.value === value);\n\n if (option) {\n return [\n key,\n {\n prettyValue: option?.label,\n label: field?.label,\n inputType: field?.type,\n },\n ];\n }\n return;\n }\n\n if (field?.type === 'checkbox' && field?.const) {\n return [\n key,\n { prettyValue: true, label: field.label, inputType: field?.type },\n ];\n }\n\n if (field?.type === 'countries' && Array.isArray(value)) {\n return [\n key,\n {\n prettyValue: value.join(),\n label: field.label,\n inputType: field?.type,\n },\n ];\n }\n\n if (field?.type === 'fieldset') {\n // @ts-expect-error need to check function return type\n const prettiedFieldset = prettifyFormValues(\n value as Record<string, unknown>,\n field.fields as Fields,\n );\n\n // Handles benefits fieldset in specific\n if (!prettiedFieldset.label && prettiedFieldset.value) {\n const prettyValue: Record<string, unknown> = {\n ...prettiedFieldset.value,\n label: field.label,\n inputType: field?.type,\n };\n return [key, prettyValue];\n }\n\n return [key, prettiedFieldset];\n }\n\n if (field?.type === 'money') {\n return [\n key,\n {\n prettyValue: value,\n label: field.label,\n inputType: field?.type,\n currency: field?.currency,\n },\n ];\n }\n\n if (field) {\n return [\n key,\n { prettyValue: value, label: field.label, inputType: field?.type },\n ];\n }\n })\n .filter(Boolean),\n );\n}\n"],"mappings":"mCAAA,OAAS,QAAAA,MAA6B,OACtC,OAAS,WAAAC,MAAe,iBAExB,OAAOC,MAAe,YAGf,SAASC,KAAMC,EAAsB,CAC1C,OAAOC,EAAQC,EAAKF,CAAM,CAAC,CAC7B,CAFgBG,EAAAJ,EAAA,MAIT,SAASK,EACdC,EACAC,EAAS,SACD,CACR,GAAID,GAAU,KACZ,MAAO,IAGT,IAAME,EAAQF,EAAS,IAEvB,MAAO,GAAGC,CAAM,GAAGC,EAAM,eAAe,QAAS,CAC/C,sBAAuB,EACvB,sBAAuB,CACzB,CAAC,CAAC,EACJ,CAdgBJ,EAAAC,EAAA,kBAgCT,IAAMI,EAA+BL,EAACM,GAA4B,CACvE,IAAMC,EAA6C,CAAC,EAEpD,OAAAD,EAAO,MAAM,QAASE,GAA2B,CAC3CA,EAAM,OAAS,SACjBD,EAAiBC,EAAM,IAAI,EAAI,CAC7B,KAAMA,EAAM,KACZ,OAAQA,EAAM,OACd,MAAOA,EAAM,MAAM,IAAKC,GACtBJ,EAA6BI,CAAU,CACzC,CACF,EAEJ,CAAC,EAEMF,CACT,EAhB4C,gCAsBrC,SAASG,EAAMC,EAAiB,CACrC,OAAO,eAAiB,CACtB,QAAAA,CACF,CACF,CAJgBX,EAAAU,EAAA,SAOhB,IAAME,EAAuBZ,EAACa,GAAuB,CACnD,IAAMC,EAAa,IAAI,IAAID,EAAMA,EAAI,YAAY,EAAE,MAAM,GAAG,EAAI,CAAC,CAAC,EAElE,OAAAC,EAAW,IAAI,UAAU,EACzBA,EAAW,IAAI,YAAY,EAEpB,MAAM,KAAKA,CAAU,EAAE,KAAK,GAAG,CACxC,EAP6B,wBASzBC,EAAU,aACZA,EAAU,QAAQ,0BAA4BC,GAAS,CACrD,IAAMC,EAASD,EAAK,aAAa,QAAQ,EAEzC,GAAIA,EAAK,UAAY,MAAQ,CAACC,GAAUA,IAAW,SAAU,CAC3D,IAAMC,EAAOF,EAAK,aAAa,MAAM,EAGrC,GAAIE,GAAQ,CAACA,EAAK,WAAW,GAAG,GAAK,gBAAgB,KAAKA,CAAI,EAAG,CAC/DF,EAAK,aAAa,SAAU,QAAQ,EACpC,IAAMH,EAAMG,EAAK,aAAa,KAAK,EACnCA,EAAK,aAAa,MAAOJ,EAAqBC,CAAG,CAAC,CACpD,CACF,CACF,CAAC,EAGI,IAAMM,EAAenB,EAACoB,GACpBL,EAAU,SAASK,EAAM,CAAE,SAAU,CAAC,QAAQ,CAAE,CAAC,EAD9B,gBAWrB,SAASC,EACdC,EACAC,EACA,CACA,OAAKA,EAGE,OAAO,YACZ,OAAO,QAAQD,CAAM,EAElB,IAAI,CAAC,CAACE,EAAKpB,CAAK,IAAM,CACrB,GAAIA,IAAU,OACZ,MAAO,CAACoB,EAAK,MAAS,EAGxB,IAAMC,EAAQF,EAAO,KAAME,GAAUA,EAAM,OAASD,CAAG,EAEvD,GAAIC,GAAO,YAAc,IAASA,GAAO,WACvC,MAAO,CAACD,EAAK,MAAS,EAGxB,GAAIC,GAAO,OAAS,SAAWA,GAAO,OAAS,SAAU,CACvD,IAAMC,EACJD,EAAM,QACN,KAAMC,GAAWA,EAAO,QAAUtB,CAAK,EAEzC,OAAIsB,EACK,CACLF,EACA,CACE,YAAaE,GAAQ,MACrB,MAAOD,GAAO,MACd,UAAWA,GAAO,IACpB,CACF,EAEF,MACF,CAEA,GAAIA,GAAO,OAAS,YAAcA,GAAO,MACvC,MAAO,CACLD,EACA,CAAE,YAAa,GAAM,MAAOC,EAAM,MAAO,UAAWA,GAAO,IAAK,CAClE,EAGF,GAAIA,GAAO,OAAS,aAAe,MAAM,QAAQrB,CAAK,EACpD,MAAO,CACLoB,EACA,CACE,YAAapB,EAAM,KAAK,EACxB,MAAOqB,EAAM,MACb,UAAWA,GAAO,IACpB,CACF,EAGF,GAAIA,GAAO,OAAS,WAAY,CAE9B,IAAME,EAAmBN,EACvBjB,EACAqB,EAAM,MACR,EAGA,GAAI,CAACE,EAAiB,OAASA,EAAiB,MAAO,CACrD,IAAMC,EAAuC,CAC3C,GAAGD,EAAiB,MACpB,MAAOF,EAAM,MACb,UAAWA,GAAO,IACpB,EACA,MAAO,CAACD,EAAKI,CAAW,CAC1B,CAEA,MAAO,CAACJ,EAAKG,CAAgB,CAC/B,CAEA,GAAIF,GAAO,OAAS,QAClB,MAAO,CACLD,EACA,CACE,YAAapB,EACb,MAAOqB,EAAM,MACb,UAAWA,GAAO,KAClB,SAAUA,GAAO,QACnB,CACF,EAGF,GAAIA,EACF,MAAO,CACLD,EACA,CAAE,YAAapB,EAAO,MAAOqB,EAAM,MAAO,UAAWA,GAAO,IAAK,CACnE,CAEJ,CAAC,EACA,OAAO,OAAO,CACnB,EA5FS,CAAC,CA6FZ,CAlGgBzB,EAAAqB,EAAA","names":["clsx","twMerge","DOMPurify","cn","inputs","twMerge","clsx","__name","formatCurrency","amount","symbol","value","transformYupErrorsIntoObject","errors","validationErrors","error","innerError","debug","version","appendSecureRelValue","rel","attributes","DOMPurify","node","target","href","sanitizeHtml","html","prettifyFormValues","values","fields","key","field","option","prettiedFieldset","prettyValue"]}
@@ -1,2 +1,2 @@
1
- import{a as b,b as h,d as C,e as Z,f as v,g as y}from"./chunk-2I5DIIJP.js";import{f as w}from"./chunk-FHHAGWU5.js";import{b as f,d as g}from"./chunk-3ZWDIEEM.js";import{a as k,e as D}from"./chunk-54KJP7WD.js";import{a as e}from"./chunk-P37U34EQ.js";import{useQuery as F}from"@tanstack/react-query";var x=e((r,a)=>{let{client:s}=g();return F({queryKey:["zendesk-article",r],queryFn:e(async()=>{let t=await w({client:s,path:{id:Number(r)}});if(t.error)throw new Error(t.error.message||"Failed to fetch article");return t},"queryFn"),select:e(t=>{let o=t.data?.data.help_center_article;return o&&{...o,body:D(o.body||"")}},"select"),retry:!1,...a})},"useZendeskArticle");import{jsx as n,jsxs as l}from"react/jsx-runtime";var N=e(r=>`https://support.remote.com/hc/en-us/articles/${r}`,"buildZendeskURL"),T=e(({Trigger:r,zendeskId:a,open:s,onClose:t})=>{let{components:o}=f(),i=N(a),d=e(()=>{t?.()},"handleClose"),{data:c,isLoading:m,error:p}=x(a,{enabled:s}),u=o?.zendeskDrawer;return u?n(u,{open:s,onClose:d,data:c,isLoading:m,error:p,zendeskURL:i,Trigger:r}):l(b,{open:s,onOpenChange:R=>!R&&d(),direction:"right",children:[n(h,{asChild:!0,children:r}),n(C,{className:"h-full w-[480px] mt-0 ml-auto RemoteFlows_ZendeskDrawer",children:l("div",{className:"h-full flex flex-col",children:[l(Z,{children:[n(v,{children:c?.title}),l(y,{children:["For more details see our"," ",n("a",{href:i,target:"_blank",rel:"noopener noreferrer",children:"help article"})," "]})]}),m&&n("div",{children:"Loading..."}),p&&n("div",{className:"text-sm p-4 text-red-500",children:"Error loading article"}),n("div",{className:"flex-1 overflow-y-auto p-4 RemoteFlows_ZendeskDrawer__Content",dangerouslySetInnerHTML:{__html:c?.body||""}})]})})]})},"ZendeskDrawer");import{useState as L}from"react";import{jsx as _}from"react/jsx-runtime";function G({zendeskId:r,className:a,onClick:s,children:t}){let[o,i]=L(!1);return _(T,{zendeskId:r,open:o,onClose:()=>i(!1),Trigger:_("button",{onClick:e(()=>{i(!0),s?.(r)},"handleClick"),className:k("RemoteFlows__ZendeskTriggerButton text-blue-500 hover:underline inline-block mt-1 text-xs bg-transparent border-none cursor-pointer p-0",a),children:t})})}e(G,"ZendeskTriggerButton");export{G as a};
2
- //# sourceMappingURL=chunk-A76UTPRW.js.map
1
+ import{a as b,b as h,d as C,e as Z,f as v,g as y}from"./chunk-Z2G2XC43.js";import{g as w}from"./chunk-MISHDUB2.js";import{b as f,d as g}from"./chunk-3ZWDIEEM.js";import{a as k,e as D}from"./chunk-HC56JKI2.js";import{a as e}from"./chunk-P37U34EQ.js";import{useQuery as F}from"@tanstack/react-query";var x=e((r,a)=>{let{client:s}=g();return F({queryKey:["zendesk-article",r],queryFn:e(async()=>{let t=await w({client:s,path:{id:Number(r)}});if(t.error)throw new Error(t.error.message||"Failed to fetch article");return t},"queryFn"),select:e(t=>{let o=t.data?.data.help_center_article;return o&&{...o,body:D(o.body||"")}},"select"),retry:!1,...a})},"useZendeskArticle");import{jsx as n,jsxs as l}from"react/jsx-runtime";var N=e(r=>`https://support.remote.com/hc/en-us/articles/${r}`,"buildZendeskURL"),T=e(({Trigger:r,zendeskId:a,open:s,onClose:t})=>{let{components:o}=f(),i=N(a),d=e(()=>{t?.()},"handleClose"),{data:c,isLoading:m,error:p}=x(a,{enabled:s}),u=o?.zendeskDrawer;return u?n(u,{open:s,onClose:d,data:c,isLoading:m,error:p,zendeskURL:i,Trigger:r}):l(b,{open:s,onOpenChange:R=>!R&&d(),direction:"right",children:[n(h,{asChild:!0,children:r}),n(C,{className:"h-full w-[540px] mt-0 ml-auto RemoteFlows_ZendeskDrawer",children:l("div",{className:"h-full flex flex-col",children:[l(Z,{children:[n(v,{children:c?.title}),l(y,{children:["For more details see our"," ",n("a",{href:i,target:"_blank",rel:"noopener noreferrer",children:"help article"})," "]})]}),m&&n("div",{children:"Loading..."}),p&&n("div",{className:"text-sm p-4 text-red-500",children:"Error loading article"}),n("div",{className:"flex-1 overflow-y-auto p-4 RemoteFlows_ZendeskDrawer__Content",dangerouslySetInnerHTML:{__html:c?.body||""}})]})})]})},"ZendeskDrawer");import{useState as L}from"react";import{jsx as _}from"react/jsx-runtime";function G({zendeskId:r,className:a,onClick:s,children:t}){let[o,i]=L(!1);return _(T,{zendeskId:r,open:o,onClose:()=>i(!1),Trigger:_("button",{onClick:e(()=>{i(!0),s?.(r)},"handleClick"),className:k("RemoteFlows__ZendeskTriggerButton text-blue-500 hover:underline inline-block mt-1 text-xs bg-transparent border-none cursor-pointer p-0",a),children:t})})}e(G,"ZendeskTriggerButton");export{G as a};
2
+ //# sourceMappingURL=chunk-HH4YP6QX.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/shared/zendesk-drawer/api.ts","../src/components/shared/zendesk-drawer/ZendeskDrawer.tsx","../src/components/shared/zendesk-drawer/ZendeskTriggerButton.tsx"],"sourcesContent":["import { getShowHelpCenterArticle } from '@/src/client';\nimport { useClient } from '@/src/context';\nimport { sanitizeHtml } from '@/src/lib/utils';\nimport { Client } from '@hey-api/client-fetch';\nimport { useQuery } from '@tanstack/react-query';\n\nexport const useZendeskArticle = (\n zendeskId: number | null,\n queryOptions?: { enabled?: boolean },\n) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['zendesk-article', zendeskId],\n queryFn: async () => {\n const response = await getShowHelpCenterArticle({\n client: client as Client,\n path: {\n id: Number(zendeskId),\n },\n });\n\n if (response.error) {\n throw new Error(response.error.message || 'Failed to fetch article');\n }\n\n return response;\n },\n select: (data) => {\n const article = data.data?.data.help_center_article;\n if (article) {\n return {\n ...article,\n body: sanitizeHtml(article.body || ''),\n };\n }\n return article;\n },\n retry: false,\n ...queryOptions,\n });\n};\n","import { useZendeskArticle } from '@/src/components/shared/zendesk-drawer/api';\nimport {\n Drawer,\n DrawerTrigger,\n DrawerContent,\n DrawerDescription,\n DrawerHeader,\n DrawerTitle,\n} from '@/src/components/ui/drawer';\nimport { useFormFields } from '@/src/context';\n\nexport type ZendeskDrawerProps = {\n Trigger: React.ReactElement;\n zendeskId: number;\n open: boolean;\n onClose: () => void;\n};\n\nconst buildZendeskURL = (zendeskId: number) => {\n return `https://support.remote.com/hc/en-us/articles/${zendeskId}`;\n};\n\nexport const ZendeskDrawer = ({\n Trigger,\n zendeskId,\n open,\n onClose,\n}: ZendeskDrawerProps) => {\n const { components } = useFormFields();\n const zendeskURL = buildZendeskURL(zendeskId);\n\n const handleClose = () => {\n onClose?.();\n };\n\n const { data, isLoading, error } = useZendeskArticle(zendeskId, {\n enabled: open,\n });\n\n const CustomZendeskDrawer = components?.zendeskDrawer;\n\n if (CustomZendeskDrawer) {\n return (\n <CustomZendeskDrawer\n open={open}\n onClose={handleClose}\n data={data}\n isLoading={isLoading}\n error={error}\n zendeskURL={zendeskURL}\n Trigger={Trigger}\n />\n );\n }\n\n return (\n <Drawer\n open={open}\n onOpenChange={(open) => !open && handleClose()}\n direction='right'\n >\n <DrawerTrigger asChild>{Trigger}</DrawerTrigger>\n <DrawerContent className='h-full w-[480px] mt-0 ml-auto RemoteFlows_ZendeskDrawer'>\n <div className='h-full flex flex-col'>\n <DrawerHeader>\n <DrawerTitle>{data?.title}</DrawerTitle>\n <DrawerDescription>\n For more details see our{' '}\n <a href={zendeskURL} target='_blank' rel='noopener noreferrer'>\n help article\n </a>{' '}\n </DrawerDescription>\n </DrawerHeader>\n {isLoading && <div>Loading...</div>}\n {error && (\n <div className='text-sm p-4 text-red-500'>\n Error loading article\n </div>\n )}\n <div\n className='flex-1 overflow-y-auto p-4 RemoteFlows_ZendeskDrawer__Content'\n dangerouslySetInnerHTML={{\n __html: data?.body || '',\n }}\n ></div>\n </div>\n </DrawerContent>\n </Drawer>\n );\n};\n","import { cn } from '@/src/lib/utils';\nimport { ZendeskDrawer } from './ZendeskDrawer';\nimport { useState } from 'react';\n\ninterface ZendeskTriggerButtonProps {\n zendeskId: number;\n className?: string;\n onClick?: (zendeskId: number) => void;\n children?: React.ReactNode;\n}\n\nexport function ZendeskTriggerButton({\n zendeskId,\n className,\n onClick,\n children,\n}: ZendeskTriggerButtonProps) {\n const [isOpen, setIsOpen] = useState(false);\n\n const handleClick = () => {\n setIsOpen(true);\n onClick?.(zendeskId);\n };\n\n return (\n <ZendeskDrawer\n zendeskId={zendeskId}\n open={isOpen}\n onClose={() => setIsOpen(false)}\n Trigger={\n <button\n onClick={handleClick}\n className={cn(\n 'RemoteFlows__ZendeskTriggerButton text-blue-500 hover:underline inline-block mt-1 text-xs bg-transparent border-none cursor-pointer p-0',\n className,\n )}\n >\n {children}\n </button>\n }\n />\n );\n}\n"],"mappings":"yPAIA,OAAS,YAAAA,MAAgB,wBAElB,IAAMC,EAAoBC,EAAA,CAC/BC,EACAC,IACG,CACH,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAU,EAC7B,OAAOC,EAAS,CACd,SAAU,CAAC,kBAAmBJ,CAAS,EACvC,QAASD,EAAA,SAAY,CACnB,IAAMM,EAAW,MAAMC,EAAyB,CAC9C,OAAQJ,EACR,KAAM,CACJ,GAAI,OAAOF,CAAS,CACtB,CACF,CAAC,EAED,GAAIK,EAAS,MACX,MAAM,IAAI,MAAMA,EAAS,MAAM,SAAW,yBAAyB,EAGrE,OAAOA,CACT,EAbS,WAcT,OAAQN,EAACQ,GAAS,CAChB,IAAMC,EAAUD,EAAK,MAAM,KAAK,oBAChC,OAAIC,GACK,CACL,GAAGA,EACH,KAAMC,EAAaD,EAAQ,MAAQ,EAAE,CACvC,CAGJ,EATQ,UAUR,MAAO,GACP,GAAGP,CACL,CAAC,CACH,EAlCiC,qBCqC3B,cAAAS,EAuBM,QAAAC,MAvBN,oBAzBN,IAAMC,EAAkBC,EAACC,GAChB,gDAAgDA,CAAS,GAD1C,mBAIXC,EAAgBF,EAAA,CAAC,CAC5B,QAAAG,EACA,UAAAF,EACA,KAAAG,EACA,QAAAC,CACF,IAA0B,CACxB,GAAM,CAAE,WAAAC,CAAW,EAAIC,EAAc,EAC/BC,EAAaT,EAAgBE,CAAS,EAEtCQ,EAAcT,EAAA,IAAM,CACxBK,IAAU,CACZ,EAFoB,eAId,CAAE,KAAAK,EAAM,UAAAC,EAAW,MAAAC,CAAM,EAAIC,EAAkBZ,EAAW,CAC9D,QAASG,CACX,CAAC,EAEKU,EAAsBR,GAAY,cAExC,OAAIQ,EAEAjB,EAACiB,EAAA,CACC,KAAMV,EACN,QAASK,EACT,KAAMC,EACN,UAAWC,EACX,MAAOC,EACP,WAAYJ,EACZ,QAASL,EACX,EAKFL,EAACiB,EAAA,CACC,KAAMX,EACN,aAAeA,GAAS,CAACA,GAAQK,EAAY,EAC7C,UAAU,QAEV,UAAAZ,EAACmB,EAAA,CAAc,QAAO,GAAE,SAAAb,EAAQ,EAChCN,EAACoB,EAAA,CAAc,UAAU,0DACvB,SAAAnB,EAAC,OAAI,UAAU,uBACb,UAAAA,EAACoB,EAAA,CACC,UAAArB,EAACsB,EAAA,CAAa,SAAAT,GAAM,MAAM,EAC1BZ,EAACsB,EAAA,CAAkB,qCACQ,IACzBvB,EAAC,KAAE,KAAMW,EAAY,OAAO,SAAS,IAAI,sBAAsB,wBAE/D,EAAK,KACP,GACF,EACCG,GAAad,EAAC,OAAI,sBAAU,EAC5Be,GACCf,EAAC,OAAI,UAAU,2BAA2B,iCAE1C,EAEFA,EAAC,OACC,UAAU,gEACV,wBAAyB,CACvB,OAAQa,GAAM,MAAQ,EACxB,EACD,GACH,EACF,GACF,CAEJ,EAnE6B,iBCpB7B,OAAS,YAAAW,MAAgB,QA4BjB,cAAAC,MAAA,oBAnBD,SAASC,EAAqB,CACnC,UAAAC,EACA,UAAAC,EACA,QAAAC,EACA,SAAAC,CACF,EAA8B,CAC5B,GAAM,CAACC,EAAQC,CAAS,EAAIC,EAAS,EAAK,EAO1C,OACER,EAACS,EAAA,CACC,UAAWP,EACX,KAAMI,EACN,QAAS,IAAMC,EAAU,EAAK,EAC9B,QACEP,EAAC,UACC,QAZYU,EAAA,IAAM,CACxBH,EAAU,EAAI,EACdH,IAAUF,CAAS,CACrB,EAHoB,eAaZ,UAAWS,EACT,0IACAR,CACF,EAEC,SAAAE,EACH,EAEJ,CAEJ,CA/BgBK,EAAAT,EAAA","names":["useQuery","useZendeskArticle","__name","zendeskId","queryOptions","client","useClient","useQuery","response","getShowHelpCenterArticle","data","article","sanitizeHtml","jsx","jsxs","buildZendeskURL","__name","zendeskId","ZendeskDrawer","Trigger","open","onClose","components","useFormFields","zendeskURL","handleClose","data","isLoading","error","useZendeskArticle","CustomZendeskDrawer","Drawer","DrawerTrigger","DrawerContent","DrawerHeader","DrawerTitle","DrawerDescription","useState","jsx","ZendeskTriggerButton","zendeskId","className","onClick","children","isOpen","setIsOpen","useState","ZendeskDrawer","__name","cn"]}
1
+ {"version":3,"sources":["../src/components/shared/zendesk-drawer/api.ts","../src/components/shared/zendesk-drawer/ZendeskDrawer.tsx","../src/components/shared/zendesk-drawer/ZendeskTriggerButton.tsx"],"sourcesContent":["import { getShowHelpCenterArticle } from '@/src/client';\nimport { useClient } from '@/src/context';\nimport { sanitizeHtml } from '@/src/lib/utils';\nimport { Client } from '@hey-api/client-fetch';\nimport { useQuery } from '@tanstack/react-query';\n\nexport const useZendeskArticle = (\n zendeskId: number | null,\n queryOptions?: { enabled?: boolean },\n) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['zendesk-article', zendeskId],\n queryFn: async () => {\n const response = await getShowHelpCenterArticle({\n client: client as Client,\n path: {\n id: Number(zendeskId),\n },\n });\n\n if (response.error) {\n throw new Error(response.error.message || 'Failed to fetch article');\n }\n\n return response;\n },\n select: (data) => {\n const article = data.data?.data.help_center_article;\n if (article) {\n return {\n ...article,\n body: sanitizeHtml(article.body || ''),\n };\n }\n return article;\n },\n retry: false,\n ...queryOptions,\n });\n};\n","import { useZendeskArticle } from '@/src/components/shared/zendesk-drawer/api';\nimport {\n Drawer,\n DrawerTrigger,\n DrawerContent,\n DrawerDescription,\n DrawerHeader,\n DrawerTitle,\n} from '@/src/components/ui/drawer';\nimport { useFormFields } from '@/src/context';\n\nexport type ZendeskDrawerProps = {\n Trigger: React.ReactElement;\n zendeskId: number;\n open: boolean;\n onClose: () => void;\n};\n\nconst buildZendeskURL = (zendeskId: number) => {\n return `https://support.remote.com/hc/en-us/articles/${zendeskId}`;\n};\n\nexport const ZendeskDrawer = ({\n Trigger,\n zendeskId,\n open,\n onClose,\n}: ZendeskDrawerProps) => {\n const { components } = useFormFields();\n const zendeskURL = buildZendeskURL(zendeskId);\n\n const handleClose = () => {\n onClose?.();\n };\n\n const { data, isLoading, error } = useZendeskArticle(zendeskId, {\n enabled: open,\n });\n\n const CustomZendeskDrawer = components?.zendeskDrawer;\n\n if (CustomZendeskDrawer) {\n return (\n <CustomZendeskDrawer\n open={open}\n onClose={handleClose}\n data={data}\n isLoading={isLoading}\n error={error}\n zendeskURL={zendeskURL}\n Trigger={Trigger}\n />\n );\n }\n\n return (\n <Drawer\n open={open}\n onOpenChange={(open) => !open && handleClose()}\n direction='right'\n >\n <DrawerTrigger asChild>{Trigger}</DrawerTrigger>\n <DrawerContent className='h-full w-[540px] mt-0 ml-auto RemoteFlows_ZendeskDrawer'>\n <div className='h-full flex flex-col'>\n <DrawerHeader>\n <DrawerTitle>{data?.title}</DrawerTitle>\n <DrawerDescription>\n For more details see our{' '}\n <a href={zendeskURL} target='_blank' rel='noopener noreferrer'>\n help article\n </a>{' '}\n </DrawerDescription>\n </DrawerHeader>\n {isLoading && <div>Loading...</div>}\n {error && (\n <div className='text-sm p-4 text-red-500'>\n Error loading article\n </div>\n )}\n <div\n className='flex-1 overflow-y-auto p-4 RemoteFlows_ZendeskDrawer__Content'\n dangerouslySetInnerHTML={{\n __html: data?.body || '',\n }}\n ></div>\n </div>\n </DrawerContent>\n </Drawer>\n );\n};\n","import { cn } from '@/src/lib/utils';\nimport { ZendeskDrawer } from './ZendeskDrawer';\nimport { useState } from 'react';\n\ninterface ZendeskTriggerButtonProps {\n zendeskId: number;\n className?: string;\n onClick?: (zendeskId: number) => void;\n children?: React.ReactNode;\n}\n\nexport function ZendeskTriggerButton({\n zendeskId,\n className,\n onClick,\n children,\n}: ZendeskTriggerButtonProps) {\n const [isOpen, setIsOpen] = useState(false);\n\n const handleClick = () => {\n setIsOpen(true);\n onClick?.(zendeskId);\n };\n\n return (\n <ZendeskDrawer\n zendeskId={zendeskId}\n open={isOpen}\n onClose={() => setIsOpen(false)}\n Trigger={\n <button\n onClick={handleClick}\n className={cn(\n 'RemoteFlows__ZendeskTriggerButton text-blue-500 hover:underline inline-block mt-1 text-xs bg-transparent border-none cursor-pointer p-0',\n className,\n )}\n >\n {children}\n </button>\n }\n />\n );\n}\n"],"mappings":"yPAIA,OAAS,YAAAA,MAAgB,wBAElB,IAAMC,EAAoBC,EAAA,CAC/BC,EACAC,IACG,CACH,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAU,EAC7B,OAAOC,EAAS,CACd,SAAU,CAAC,kBAAmBJ,CAAS,EACvC,QAASD,EAAA,SAAY,CACnB,IAAMM,EAAW,MAAMC,EAAyB,CAC9C,OAAQJ,EACR,KAAM,CACJ,GAAI,OAAOF,CAAS,CACtB,CACF,CAAC,EAED,GAAIK,EAAS,MACX,MAAM,IAAI,MAAMA,EAAS,MAAM,SAAW,yBAAyB,EAGrE,OAAOA,CACT,EAbS,WAcT,OAAQN,EAACQ,GAAS,CAChB,IAAMC,EAAUD,EAAK,MAAM,KAAK,oBAChC,OAAIC,GACK,CACL,GAAGA,EACH,KAAMC,EAAaD,EAAQ,MAAQ,EAAE,CACvC,CAGJ,EATQ,UAUR,MAAO,GACP,GAAGP,CACL,CAAC,CACH,EAlCiC,qBCqC3B,cAAAS,EAuBM,QAAAC,MAvBN,oBAzBN,IAAMC,EAAkBC,EAACC,GAChB,gDAAgDA,CAAS,GAD1C,mBAIXC,EAAgBF,EAAA,CAAC,CAC5B,QAAAG,EACA,UAAAF,EACA,KAAAG,EACA,QAAAC,CACF,IAA0B,CACxB,GAAM,CAAE,WAAAC,CAAW,EAAIC,EAAc,EAC/BC,EAAaT,EAAgBE,CAAS,EAEtCQ,EAAcT,EAAA,IAAM,CACxBK,IAAU,CACZ,EAFoB,eAId,CAAE,KAAAK,EAAM,UAAAC,EAAW,MAAAC,CAAM,EAAIC,EAAkBZ,EAAW,CAC9D,QAASG,CACX,CAAC,EAEKU,EAAsBR,GAAY,cAExC,OAAIQ,EAEAjB,EAACiB,EAAA,CACC,KAAMV,EACN,QAASK,EACT,KAAMC,EACN,UAAWC,EACX,MAAOC,EACP,WAAYJ,EACZ,QAASL,EACX,EAKFL,EAACiB,EAAA,CACC,KAAMX,EACN,aAAeA,GAAS,CAACA,GAAQK,EAAY,EAC7C,UAAU,QAEV,UAAAZ,EAACmB,EAAA,CAAc,QAAO,GAAE,SAAAb,EAAQ,EAChCN,EAACoB,EAAA,CAAc,UAAU,0DACvB,SAAAnB,EAAC,OAAI,UAAU,uBACb,UAAAA,EAACoB,EAAA,CACC,UAAArB,EAACsB,EAAA,CAAa,SAAAT,GAAM,MAAM,EAC1BZ,EAACsB,EAAA,CAAkB,qCACQ,IACzBvB,EAAC,KAAE,KAAMW,EAAY,OAAO,SAAS,IAAI,sBAAsB,wBAE/D,EAAK,KACP,GACF,EACCG,GAAad,EAAC,OAAI,sBAAU,EAC5Be,GACCf,EAAC,OAAI,UAAU,2BAA2B,iCAE1C,EAEFA,EAAC,OACC,UAAU,gEACV,wBAAyB,CACvB,OAAQa,GAAM,MAAQ,EACxB,EACD,GACH,EACF,GACF,CAEJ,EAnE6B,iBCpB7B,OAAS,YAAAW,MAAgB,QA4BjB,cAAAC,MAAA,oBAnBD,SAASC,EAAqB,CACnC,UAAAC,EACA,UAAAC,EACA,QAAAC,EACA,SAAAC,CACF,EAA8B,CAC5B,GAAM,CAACC,EAAQC,CAAS,EAAIC,EAAS,EAAK,EAO1C,OACER,EAACS,EAAA,CACC,UAAWP,EACX,KAAMI,EACN,QAAS,IAAMC,EAAU,EAAK,EAC9B,QACEP,EAAC,UACC,QAZYU,EAAA,IAAM,CACxBH,EAAU,EAAI,EACdH,IAAUF,CAAS,CACrB,EAHoB,eAaZ,UAAWS,EACT,0IACAR,CACF,EAEC,SAAAE,EACH,EAEJ,CAEJ,CA/BgBK,EAAAT,EAAA","names":["useQuery","useZendeskArticle","__name","zendeskId","queryOptions","client","useClient","useQuery","response","getShowHelpCenterArticle","data","article","sanitizeHtml","jsx","jsxs","buildZendeskURL","__name","zendeskId","ZendeskDrawer","Trigger","open","onClose","components","useFormFields","zendeskURL","handleClose","data","isLoading","error","useZendeskArticle","CustomZendeskDrawer","Drawer","DrawerTrigger","DrawerContent","DrawerHeader","DrawerTitle","DrawerDescription","useState","jsx","ZendeskTriggerButton","zendeskId","className","onClick","children","isOpen","setIsOpen","useState","ZendeskDrawer","__name","cn"]}
@@ -1,2 +1,2 @@
1
- import{B as i,r as o}from"./chunk-FHHAGWU5.js";import{d as n}from"./chunk-3ZWDIEEM.js";import{a as e}from"./chunk-P37U34EQ.js";import{useQuery as s}from"@tanstack/react-query";var p=e(({employmentId:t})=>{let{client:r}=n();return s({queryKey:["employment",t],retry:!1,queryFn:e(()=>o({client:r,headers:{Authorization:""},path:{employment_id:t}}),"queryFn"),select:e(({data:m})=>m,"select")})},"useEmploymentQuery"),c=e(({employmentId:t,status:r})=>{let{client:m}=n();return s({queryKey:["timeoff",t,r],retry:!1,queryFn:e(()=>i({client:m,headers:{Authorization:""},query:{employment_id:t,status:r}}),"queryFn"),select:e(({data:u})=>u,"select")})},"useTimeOffQuery");export{p as a,c as b};
2
- //# sourceMappingURL=chunk-ZTVYWMBY.js.map
1
+ import{F as i,t as o}from"./chunk-MISHDUB2.js";import{d as n}from"./chunk-3ZWDIEEM.js";import{a as e}from"./chunk-P37U34EQ.js";import{useQuery as s}from"@tanstack/react-query";var p=e(({employmentId:t})=>{let{client:r}=n();return s({queryKey:["employment",t],retry:!1,queryFn:e(()=>o({client:r,headers:{Authorization:""},path:{employment_id:t}}),"queryFn"),select:e(({data:m})=>m,"select")})},"useEmploymentQuery"),c=e(({employmentId:t,status:r})=>{let{client:m}=n();return s({queryKey:["timeoff",t,r],retry:!1,queryFn:e(()=>i({client:m,headers:{Authorization:""},query:{employment_id:t,status:r}}),"queryFn"),select:e(({data:u})=>u,"select")})},"useTimeOffQuery");export{p as a,c as b};
2
+ //# sourceMappingURL=chunk-HTCONTKZ.js.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-V2PBVCRH.js";import{b as t}from"./chunk-PGWKJ6FK.js";import{b as e}from"./chunk-7XRPOR7L.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as c}from"react/jsx-runtime";function S({onSubmit:m,onSuccess:d,onError:a}){let{onboardingBag:o}=t(),l=i(async n=>{try{await m?.(o.parseFormValues(n));let r=await o.onSubmit(n);if(r?.data){await d?.(r?.data),o?.next();return}if(r?.error){let p=e(r?.fieldErrors||[],o.meta?.fields?.basic_information);a?.({error:r?.error,rawError:r?.rawError,fieldErrors:p})}}catch(r){a?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),f=o.stepState.values?.basic_information||o.initialValues.basic_information;return c(s,{defaultValues:f,onSubmit:l})}i(S,"BasicInformationStep");export{S as a};
2
- //# sourceMappingURL=chunk-ATC4YO7K.js.map
1
+ import{a as s}from"./chunk-IQ2HRDC4.js";import{b as t}from"./chunk-PGWKJ6FK.js";import{b as e}from"./chunk-7XRPOR7L.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as c}from"react/jsx-runtime";function S({onSubmit:m,onSuccess:d,onError:a}){let{onboardingBag:o}=t(),l=i(async n=>{try{await m?.(o.parseFormValues(n));let r=await o.onSubmit(n);if(r?.data){await d?.(r?.data),o?.next();return}if(r?.error){let p=e(r?.fieldErrors||[],o.meta?.fields?.basic_information);a?.({error:r?.error,rawError:r?.rawError,fieldErrors:p})}}catch(r){a?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),f=o.stepState.values?.basic_information||o.initialValues.basic_information;return c(s,{defaultValues:f,onSubmit:l})}i(S,"BasicInformationStep");export{S as a};
2
+ //# sourceMappingURL=chunk-I2URNHWK.js.map
@@ -1,2 +1,2 @@
1
- import{b as y}from"./chunk-PGWKJ6FK.js";import{b as c}from"./chunk-CFIJKJXD.js";import{a as F}from"./chunk-XGMQPLVG.js";import{b as u}from"./chunk-7XRPOR7L.js";import{f,g as p}from"./chunk-U23SN7CM.js";import{a as m}from"./chunk-P37U34EQ.js";import{useEffect as S}from"react";import{jsx as b}from"react/jsx-runtime";import{createElement as V}from"react";function U({defaultValues:d,onSubmit:g,components:E}){let{formId:k,onboardingBag:o}=y(),w=c(o.handleValidation),r=f({resolver:w,defaultValues:d,shouldUnregister:!1,mode:"onBlur"});S(()=>{o.employmentId&&o?.checkFieldUpdates(r.getValues())},[]),S(()=>{let t=r?.watch(e=>{Object.keys(e).some(i=>e[i]!==d[i])&&o?.checkFieldUpdates(e)});return()=>t?.unsubscribe()},[]);let h=m(async(t,e)=>{let s=e?.nativeEvent;if(s?.isDraftSubmission){let{onSuccess:i,onError:l}=s.draftCallbacks;try{if(!await r.trigger())return;let n=await o.onSubmit(t);if(n?.data)i?.();else if(n?.error){let B=o.stepState.currentStep.name,P=o.meta?.fields?.[B],O=u(n?.fieldErrors||[],P);l?.({error:n.error,rawError:n.rawError,fieldErrors:O})}}catch(a){l?.({error:a,rawError:a,fieldErrors:[]})}}else g(t)},"handleSubmit");return V(p,{...r,key:`form-${o.stepState.currentStep.name}`},b("form",{id:k,onSubmit:r.handleSubmit(h),className:"space-y-4 RemoteFlows__OnboardingForm",children:b(F,{components:E,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}m(U,"OnboardingForm");export{U as a};
2
- //# sourceMappingURL=chunk-V2PBVCRH.js.map
1
+ import{b as y}from"./chunk-PGWKJ6FK.js";import{a as F}from"./chunk-SV2PWH6Y.js";import{b as c}from"./chunk-CFIJKJXD.js";import{b as u}from"./chunk-7XRPOR7L.js";import{f,g as p}from"./chunk-XASIKHZL.js";import{a as m}from"./chunk-P37U34EQ.js";import{useEffect as S}from"react";import{jsx as b}from"react/jsx-runtime";import{createElement as V}from"react";function U({defaultValues:d,onSubmit:g,components:E}){let{formId:k,onboardingBag:o}=y(),w=c(o.handleValidation),r=f({resolver:w,defaultValues:d,shouldUnregister:!1,mode:"onBlur"});S(()=>{o.employmentId&&o?.checkFieldUpdates(r.getValues())},[]),S(()=>{let t=r?.watch(e=>{Object.keys(e).some(i=>e[i]!==d[i])&&o?.checkFieldUpdates(e)});return()=>t?.unsubscribe()},[]);let h=m(async(t,e)=>{let s=e?.nativeEvent;if(s?.isDraftSubmission){let{onSuccess:i,onError:l}=s.draftCallbacks;try{if(!await r.trigger())return;let n=await o.onSubmit(t);if(n?.data)i?.();else if(n?.error){let B=o.stepState.currentStep.name,P=o.meta?.fields?.[B],O=u(n?.fieldErrors||[],P);l?.({error:n.error,rawError:n.rawError,fieldErrors:O})}}catch(a){l?.({error:a,rawError:a,fieldErrors:[]})}}else g(t)},"handleSubmit");return V(p,{...r,key:`form-${o.stepState.currentStep.name}`},b("form",{id:k,onSubmit:r.handleSubmit(h),className:"space-y-4 RemoteFlows__OnboardingForm",children:b(F,{components:E,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}m(U,"OnboardingForm");export{U as a};
2
+ //# sourceMappingURL=chunk-IQ2HRDC4.js.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-54KJP7WD.js";import*as c from"react";import*as r from"@radix-ui/react-scroll-area";import{jsx as l,jsxs as n}from"react/jsx-runtime";var S=c.forwardRef(({className:o,children:e,...i},a)=>n(r.Root,{ref:a,className:t("relative overflow-hidden",o),...i,children:[l(r.Viewport,{className:"h-full w-full rounded-[inherit]",children:e}),l(m,{}),l(r.Corner,{})]}));S.displayName=r.Root.displayName;var m=c.forwardRef(({className:o,orientation:e="vertical",...i},a)=>l(r.ScrollAreaScrollbar,{ref:a,orientation:e,className:t("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",o),...i,children:l(r.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));m.displayName=r.ScrollAreaScrollbar.displayName;export{S as a};
2
- //# sourceMappingURL=chunk-HRA6BY3O.js.map
1
+ import{a as t}from"./chunk-HC56JKI2.js";import*as c from"react";import*as r from"@radix-ui/react-scroll-area";import{jsx as l,jsxs as n}from"react/jsx-runtime";var S=c.forwardRef(({className:o,children:e,...i},a)=>n(r.Root,{ref:a,className:t("relative overflow-hidden",o),...i,children:[l(r.Viewport,{className:"h-full w-full rounded-[inherit]",children:e}),l(m,{}),l(r.Corner,{})]}));S.displayName=r.Root.displayName;var m=c.forwardRef(({className:o,orientation:e="vertical",...i},a)=>l(r.ScrollAreaScrollbar,{ref:a,orientation:e,className:t("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",o),...i,children:l(r.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));m.displayName=r.ScrollAreaScrollbar.displayName;export{S as a};
2
+ //# sourceMappingURL=chunk-ISWLTY4E.js.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-DYB3RWP7.js";import{a as p}from"./chunk-HRA6BY3O.js";import{a as i,b as l,c as s,d as n,e as c,f as m,g as d}from"./chunk-2I5DIIJP.js";import{b as o}from"./chunk-2QGDCMCE.js";import{a as t}from"./chunk-P37U34EQ.js";import{X as u}from"lucide-react";import{jsx as r,jsxs as a}from"react/jsx-runtime";var y=t(({label:D="Disclaimer"})=>a(i,{children:[r(l,{asChild:!0,children:r(o,{variant:"link",size:"link",children:D})}),a(n,{children:[a(c,{children:[a(s,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[r(u,{className:"h-4 w-4"}),r("span",{className:"sr-only",children:"Close"})]}),r(m,{children:e?.data.title}),a(d,{children:["For more details read our"," ",r(o,{variant:"link",size:"link",asChild:!0,children:r("a",{href:e?.data.html_url,target:"_blank",rel:"noopener noreferrer",children:"Disclaimer"})})]})]}),r(p,{className:"px-4 pb-4 overflow-y-auto max-h-[calc(80vh-120px)] cost-calculator-disclaimer-drawer-scroll-area",children:r("div",{className:"cost-calculator-disclaimer-drawer-body",dangerouslySetInnerHTML:{__html:e?.data.body??""}})})]})]}),"CostCalculatorDisclaimer");export{y as a};
2
- //# sourceMappingURL=chunk-GNZJOPIS.js.map
1
+ import{a as e}from"./chunk-DYB3RWP7.js";import{a as p}from"./chunk-ISWLTY4E.js";import{a as i,b as l,c as s,d as n,e as c,f as m,g as d}from"./chunk-Z2G2XC43.js";import{b as o}from"./chunk-4NLAHGUV.js";import{a as t}from"./chunk-P37U34EQ.js";import{X as u}from"lucide-react";import{jsx as r,jsxs as a}from"react/jsx-runtime";var y=t(({label:D="Disclaimer"})=>a(i,{children:[r(l,{asChild:!0,children:r(o,{variant:"link",size:"link",children:D})}),a(n,{children:[a(c,{children:[a(s,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",children:[r(u,{className:"h-4 w-4"}),r("span",{className:"sr-only",children:"Close"})]}),r(m,{children:e?.data.title}),a(d,{children:["For more details read our"," ",r(o,{variant:"link",size:"link",asChild:!0,children:r("a",{href:e?.data.html_url,target:"_blank",rel:"noopener noreferrer",children:"Disclaimer"})})]})]}),r(p,{className:"px-4 pb-4 overflow-y-auto max-h-[calc(80vh-120px)] cost-calculator-disclaimer-drawer-scroll-area",children:r("div",{className:"cost-calculator-disclaimer-drawer-body",dangerouslySetInnerHTML:{__html:e?.data.body??""}})})]})]}),"CostCalculatorDisclaimer");export{y as a};
2
+ //# sourceMappingURL=chunk-JE2MYS37.js.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-QIN5BLVI.js";import{b as m}from"./chunk-MRYRNB7Y.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as e}from"react/jsx-runtime";function f({onSubmit:n}){let{terminationBag:i}=m();return e(r,{onSubmit:o(async a=>{await n?.(i?.parseFormValues(a)),i?.next()},"handleSubmit")})}o(f,"PaidTimeOffForm");export{f as a};
2
- //# sourceMappingURL=chunk-76VMCRDE.js.map
1
+ import{a as r}from"./chunk-WY3KCHHG.js";import{b as m}from"./chunk-MRYRNB7Y.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as e}from"react/jsx-runtime";function f({onSubmit:n}){let{terminationBag:i}=m();return e(r,{onSubmit:o(async a=>{await n?.(i?.parseFormValues(a)),i?.next()},"handleSubmit")})}o(f,"PaidTimeOffForm");export{f as a};
2
+ //# sourceMappingURL=chunk-JNPIBIHZ.js.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-UH3E6HSQ.js";import{a as n}from"./chunk-XFD3ULUF.js";import{b as i}from"./chunk-FHHAGWU5.js";import{d as a}from"./chunk-3ZWDIEEM.js";import{a as r}from"./chunk-P37U34EQ.js";import{modify as c}from"@remoteoss/json-schema-form";import{useMutation as l,useQuery as p}from"@tanstack/react-query";import{createHeadlessForm as y}from"@remoteoss/json-schema-form";var V=r(()=>{let{client:o}=a();return l({mutationFn:r(e=>i({client:o,body:e}),"mutationFn")})},"useCreateTermination"),M=r(({formValues:o,jsfModify:e,step:m})=>p({queryKey:["rmt-flows-termination-schema",m],queryFn:r(()=>s[m]??n,"queryFn"),select:r(({data:f})=>{let t=f?.schema||{};if(e){let{schema:u}=c(t,e);t=u}return y(t||{},{initialValues:o||{}})},"select")}),"useTerminationSchema");export{V as a,M as b};
2
- //# sourceMappingURL=chunk-MDQ6YJMV.js.map
1
+ import{a as s}from"./chunk-AIN5YFNL.js";import{a as n}from"./chunk-XFD3ULUF.js";import{b as i}from"./chunk-MISHDUB2.js";import{d as a}from"./chunk-3ZWDIEEM.js";import{a as r}from"./chunk-P37U34EQ.js";import{modify as c}from"@remoteoss/json-schema-form";import{useMutation as l,useQuery as p}from"@tanstack/react-query";import{createHeadlessForm as y}from"@remoteoss/json-schema-form";var V=r(()=>{let{client:o}=a();return l({mutationFn:r(e=>i({client:o,body:e}),"mutationFn")})},"useCreateTermination"),M=r(({formValues:o,jsfModify:e,step:m})=>p({queryKey:["rmt-flows-termination-schema",m],queryFn:r(()=>s[m]??n,"queryFn"),select:r(({data:f})=>{let t=f?.schema||{};if(e){let{schema:u}=c(t,e);t=u}return y(t||{},{initialValues:o||{}})},"select")}),"useTerminationSchema");export{V as a,M as b};
2
+ //# sourceMappingURL=chunk-KRL5QCOA.js.map
@@ -1,2 +1,2 @@
1
- import{a as i,b as d,c as p,d as R}from"./chunk-CWEPL5J3.js";import{a as w}from"./chunk-ASKKS4Z3.js";import{a as _,b as y}from"./chunk-54KJP7WD.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 r}from"react/jsx-runtime";var v=m(t=>{if(t.length<2)return{currency:null,costsPerCountry:[],employeesCost:null};let o=t[0]?.employer_currency_costs.currency,u=t.reduce((l,s)=>{let a=s.country.name;return l[a]={country:s.country,monthlyTotal:(l[a]?.monthlyTotal||0)+s.employer_currency_costs.monthly_total,annualTotal:(l[a]?.annualTotal||0)+s.employer_currency_costs.annual_total},l},{}),n=Object.values(u).map(({country:l,monthlyTotal:s,annualTotal:a})=>({country:l,monthlyCost:y(s,o.symbol),annualCost:y(a,o.symbol)})),c={monthlyTotal:y(t.reduce((l,s)=>l+s.employer_currency_costs.monthly_total,0),o.symbol),annualTotal:y(t.reduce((l,s)=>l+s.employer_currency_costs.annual_total,0),o.symbol)};return{currency:o,costsPerCountry:n,employeesCost:c}},"useSummaryResults"),f=m(({currency:t,title:o})=>e("div",{className:"RemoteFlows__SummaryResults__Header flex items-center justify-between w-full",children:r("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]"})}),r("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}),r("p",{className:"RemoteFlows__SummaryHeader__Currency text-xs text-[#71717A]",children:["Employer billing currency: ",t.code]})]})]})}),"SummaryHeader"),g=m(({label:t,columns:o,rows:u,defaultValue:n="accordion",className:c})=>{let l=o.length===1?"grid-cols-2":"grid-cols-3";return e(i,{type:"single",collapsible:!0,defaultValue:n,className:_("RemoteFlows__SummaryResults__MultiColumnAccordion w-full",c),children:r(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:r("div",{className:_("RemoteFlows__SummaryResults__AccordionHeader grid items-center w-full",l),children:[r("div",{className:"RemoteFlows__SummaryResults__AccordionHeader__LabelContainer flex items-center gap-2",children:[t,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((s,a)=>e("span",{className:"RemoteFlows__SummaryResults__ColumnHeader text-xs text-[#27272A] text-right",children:s},a))]})}),e(R,{className:"RemoteFlows__SummaryResults__AccordionContent px-0 pb-4",children:e("div",{className:"RemoteFlows__SummaryResults__AccordionRows space-y-3",children:u.map((s,a)=>r("div",{className:_("RemoteFlows__SummaryResults__AccordionRow grid items-center",l),children:[e("div",{className:"flex items-center gap-2",children:s.label}),o.length===1?e("span",{className:"RemoteFlows__SummaryResults__RowValue text-sm text-[#09090B] text-right",children:s.values[0]}):s.values.map((F,x)=>e("span",{className:"RemoteFlows__SummaryResults__RowValue text-sm text-[#09090B] text-right",children:F},x))]},a))})})]})})},"MultiColumnAccordion"),b=m(({employeesCost:t})=>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:r(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:[t.monthlyTotal]},{label:r(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:[t.annualTotal]}],defaultValue:"cost-breakdown"}),"CostForAllEmployees"),S=m(({costsPerCountry:t})=>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:t.map(o=>({label:r(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:t})=>{let{currency:o,costsPerCountry:u,employeesCost:n}=v(t),[c,l]=h("summary");return!o||u.length===0||Object.keys(n).length===0?null:e(w,{className:"RemoteFlows__SummaryResults__Card p-10",children:e(i,{type:"single",collapsible:!0,defaultValue:c,onValueChange:l,className:"RemoteFlows__SummaryResults__Accordion w-full",children:r(d,{value:"summary",className:"RemoteFlows__SummaryResults__AccordionItem border-border",children:[e("div",{className:_("RemoteFlows__SummaryResults__AccordionTriggerContainer",{RemoteFlows__Separator:c==="summary"}),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"})})}),r(R,{className:"RemoteFlows__SummaryResults__MainAccordionContent px-0 pb-4 mt-6",children:[e("div",{className:"RemoteFlows__Separator",children:e(b,{employeesCost:n})}),e("div",{className:"RemoteFlows__SummaryResults__CostsPerCountryContainer mt-6",children:e(S,{costsPerCountry:u})})]})]})})})},"SummaryResults");export{k as a};
2
- //# sourceMappingURL=chunk-OIBVTGB4.js.map
1
+ import{a as i,b as d,c as p,d as R}from"./chunk-AXES4NFY.js";import{a as w}from"./chunk-AKHJDD35.js";import{a as _,b as y}from"./chunk-HC56JKI2.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 r}from"react/jsx-runtime";var v=m(t=>{if(t.length<2)return{currency:null,costsPerCountry:[],employeesCost:null};let o=t[0]?.employer_currency_costs.currency,u=t.reduce((l,s)=>{let a=s.country.name;return l[a]={country:s.country,monthlyTotal:(l[a]?.monthlyTotal||0)+s.employer_currency_costs.monthly_total,annualTotal:(l[a]?.annualTotal||0)+s.employer_currency_costs.annual_total},l},{}),n=Object.values(u).map(({country:l,monthlyTotal:s,annualTotal:a})=>({country:l,monthlyCost:y(s,o.symbol),annualCost:y(a,o.symbol)})),c={monthlyTotal:y(t.reduce((l,s)=>l+s.employer_currency_costs.monthly_total,0),o.symbol),annualTotal:y(t.reduce((l,s)=>l+s.employer_currency_costs.annual_total,0),o.symbol)};return{currency:o,costsPerCountry:n,employeesCost:c}},"useSummaryResults"),f=m(({currency:t,title:o})=>e("div",{className:"RemoteFlows__SummaryResults__Header flex items-center justify-between w-full",children:r("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]"})}),r("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}),r("p",{className:"RemoteFlows__SummaryHeader__Currency text-xs text-[#71717A]",children:["Employer billing currency: ",t.code]})]})]})}),"SummaryHeader"),g=m(({label:t,columns:o,rows:u,defaultValue:n="accordion",className:c})=>{let l=o.length===1?"grid-cols-2":"grid-cols-3";return e(i,{type:"single",collapsible:!0,defaultValue:n,className:_("RemoteFlows__SummaryResults__MultiColumnAccordion w-full",c),children:r(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:r("div",{className:_("RemoteFlows__SummaryResults__AccordionHeader grid items-center w-full",l),children:[r("div",{className:"RemoteFlows__SummaryResults__AccordionHeader__LabelContainer flex items-center gap-2",children:[t,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((s,a)=>e("span",{className:"RemoteFlows__SummaryResults__ColumnHeader text-xs text-[#27272A] text-right",children:s},a))]})}),e(R,{className:"RemoteFlows__SummaryResults__AccordionContent px-0 pb-4",children:e("div",{className:"RemoteFlows__SummaryResults__AccordionRows space-y-3",children:u.map((s,a)=>r("div",{className:_("RemoteFlows__SummaryResults__AccordionRow grid items-center",l),children:[e("div",{className:"flex items-center gap-2",children:s.label}),o.length===1?e("span",{className:"RemoteFlows__SummaryResults__RowValue text-sm text-[#09090B] text-right",children:s.values[0]}):s.values.map((F,x)=>e("span",{className:"RemoteFlows__SummaryResults__RowValue text-sm text-[#09090B] text-right",children:F},x))]},a))})})]})})},"MultiColumnAccordion"),b=m(({employeesCost:t})=>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:r(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:[t.monthlyTotal]},{label:r(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:[t.annualTotal]}],defaultValue:"cost-breakdown"}),"CostForAllEmployees"),S=m(({costsPerCountry:t})=>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:t.map(o=>({label:r(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:t})=>{let{currency:o,costsPerCountry:u,employeesCost:n}=v(t),[c,l]=h("summary");return!o||u.length===0||Object.keys(n).length===0?null:e(w,{className:"RemoteFlows__SummaryResults__Card p-10",children:e(i,{type:"single",collapsible:!0,defaultValue:c,onValueChange:l,className:"RemoteFlows__SummaryResults__Accordion w-full",children:r(d,{value:"summary",className:"RemoteFlows__SummaryResults__AccordionItem border-border",children:[e("div",{className:_("RemoteFlows__SummaryResults__AccordionTriggerContainer",{RemoteFlows__Separator:c==="summary"}),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"})})}),r(R,{className:"RemoteFlows__SummaryResults__MainAccordionContent px-0 pb-4 mt-6",children:[e("div",{className:"RemoteFlows__Separator",children:e(b,{employeesCost:n})}),e("div",{className:"RemoteFlows__SummaryResults__CostsPerCountryContainer mt-6",children:e(S,{costsPerCountry:u})})]})]})})})},"SummaryResults");export{k as a};
2
+ //# sourceMappingURL=chunk-KSHPBRPW.js.map
@@ -0,0 +1,2 @@
1
+ import{b as e}from"./chunk-TOA3JILU.js";import{b as i}from"./chunk-4NLAHGUV.js";import{b as m}from"./chunk-3ZWDIEEM.js";import{a as u}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function p({children:t,...o}){let{formId:n}=e(),{components:f}=m(),r=f?.button;return r?s(r,{...o,form:n,children:t}):s(i,{...o,form:n,children:t})}u(p,"OnboardingSubmit");export{p as a};
2
+ //# sourceMappingURL=chunk-L2GYSHXS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/ContractorOnboarding/components/OnboardingSubmit.tsx"],"sourcesContent":["import { ButtonHTMLAttributes, PropsWithChildren } from 'react';\nimport { Button } from '@/src/components/ui/button';\nimport { useContractorOnboardingContext } from '@/src/flows/ContractorOnboarding/context';\nimport { useFormFields } from '@/src/context';\n\nexport function OnboardingSubmit({\n children,\n ...props\n}: PropsWithChildren<\n ButtonHTMLAttributes<HTMLButtonElement> & Record<string, unknown>\n>) {\n const { formId } = useContractorOnboardingContext();\n const { components } = useFormFields();\n\n const CustomButton = components?.button;\n if (CustomButton) {\n return (\n <CustomButton {...props} form={formId}>\n {children}\n </CustomButton>\n );\n }\n\n return (\n <Button {...props} form={formId}>\n {children}\n </Button>\n );\n}\n"],"mappings":"gKAiBM,cAAAA,MAAA,oBAZC,SAASC,EAAiB,CAC/B,SAAAC,EACA,GAAGC,CACL,EAEG,CACD,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAA+B,EAC5C,CAAE,WAAAC,CAAW,EAAIC,EAAc,EAE/BC,EAAeF,GAAY,OACjC,OAAIE,EAEAR,EAACQ,EAAA,CAAc,GAAGL,EAAO,KAAMC,EAC5B,SAAAF,EACH,EAKFF,EAACS,EAAA,CAAQ,GAAGN,EAAO,KAAMC,EACtB,SAAAF,EACH,CAEJ,CAvBgBQ,EAAAT,EAAA","names":["jsx","OnboardingSubmit","children","props","formId","useContractorOnboardingContext","components","useFormFields","CustomButton","Button","__name"]}
@@ -1,2 +1,2 @@
1
- import{c as d,d as S}from"./chunk-YFEIQZGJ.js";import{a as u}from"./chunk-HN5HLFTB.js";import{a as f}from"./chunk-KSHK3ZPX.js";import{b as C}from"./chunk-CFIJKJXD.js";import{f as y}from"./chunk-U23SN7CM.js";import{a as o}from"./chunk-P37U34EQ.js";import{useEffect as T,useId as U,useState as I}from"react";import{jsx as k}from"react/jsx-runtime";var i=o((n,e,r)=>r&&r[e]?r[e]:n[e]?n[e]/100:0,"getDefaultManagementFee"),A=o((n,e,r,s)=>!e&&!r?.management_fee&&n?i(u,n,s):e&&!r?.management_fee?"":r?.management_fee,"getManagementFee"),W=o(({estimationOptions:n=d,defaultValues:e={countryRegionSlug:"",regionSlug:"",currencySlug:"",salary:"",benefits:{},management:{management_fee:""}},options:r,render:s,version:_="standard"})=>{let p=U(),[R,m]=I("USD"),F=o(g=>{m(g);let a=i(u,g,n.managementFees);a&&c.setValue("management.management_fee",a)},"onCurrencyChange"),t=S({defaultRegion:e.countryRegionSlug,defaultCurrency:e.currencySlug,defaultSalary:e.salary,estimationOptions:n,version:_,options:{...r,onCurrencyChange:F}}),K=C(t.handleValidation),b=A(R,e.currencySlug,e.management,n.managementFees),{countryRegionSlug:v,currencySlug:h,salary:D,benefits:P,hiringBudget:B,age:E,contractDurationType:M,regionSlug:w,...x}=e,c=y({resolver:K,defaultValues:{country:v,currency:h,region:w,salary:D,salary_conversion:"",salary_converted:"",hiring_budget:B||"employee_annual_salary",age:E,contract_duration_type:M,management:{management_fee:b},benefits:P,estimation_title:n.title,...x},shouldUnregister:!1,mode:"onBlur"});return T(()=>{if(e.currencySlug&&t.currencies&&n.includeManagementFee&&!e.management?.management_fee){let a=t.currencies.find(l=>l.value===e.currencySlug)?.label;if(a){m(a);let l=i(u,a,n.managementFees);c.setValue("management.management_fee",l)}}},[e.currencySlug,t.currencies,n.includeManagementFee,n.managementFees,e.management?.management_fee,c]),k(f.Provider,{value:{form:c,formId:p,costCalculatorBag:t},children:s(t)})},"CostCalculatorFlow");export{W as a};
2
- //# sourceMappingURL=chunk-WL3IJ7WA.js.map
1
+ import{a as f}from"./chunk-KSHK3ZPX.js";import{c as d,d as S}from"./chunk-XRB4Y7WT.js";import{a as u}from"./chunk-HN5HLFTB.js";import{b as C}from"./chunk-CFIJKJXD.js";import{f as y}from"./chunk-XASIKHZL.js";import{a as o}from"./chunk-P37U34EQ.js";import{useEffect as T,useId as U,useState as I}from"react";import{jsx as k}from"react/jsx-runtime";var i=o((n,e,r)=>r&&r[e]?r[e]:n[e]?n[e]/100:0,"getDefaultManagementFee"),A=o((n,e,r,s)=>!e&&!r?.management_fee&&n?i(u,n,s):e&&!r?.management_fee?"":r?.management_fee,"getManagementFee"),W=o(({estimationOptions:n=d,defaultValues:e={countryRegionSlug:"",regionSlug:"",currencySlug:"",salary:"",benefits:{},management:{management_fee:""}},options:r,render:s,version:_="standard"})=>{let p=U(),[R,m]=I("USD"),F=o(g=>{m(g);let a=i(u,g,n.managementFees);a&&c.setValue("management.management_fee",a)},"onCurrencyChange"),t=S({defaultRegion:e.countryRegionSlug,defaultCurrency:e.currencySlug,defaultSalary:e.salary,estimationOptions:n,version:_,options:{...r,onCurrencyChange:F}}),K=C(t.handleValidation),b=A(R,e.currencySlug,e.management,n.managementFees),{countryRegionSlug:v,currencySlug:h,salary:D,benefits:P,hiringBudget:B,age:E,contractDurationType:M,regionSlug:w,...x}=e,c=y({resolver:K,defaultValues:{country:v,currency:h,region:w,salary:D,salary_conversion:"",salary_converted:"",hiring_budget:B||"employee_annual_salary",age:E,contract_duration_type:M,management:{management_fee:b},benefits:P,estimation_title:n.title,...x},shouldUnregister:!1,mode:"onBlur"});return T(()=>{if(e.currencySlug&&t.currencies&&n.includeManagementFee&&!e.management?.management_fee){let a=t.currencies.find(l=>l.value===e.currencySlug)?.label;if(a){m(a);let l=i(u,a,n.managementFees);c.setValue("management.management_fee",l)}}},[e.currencySlug,t.currencies,n.includeManagementFee,n.managementFees,e.management?.management_fee,c]),k(f.Provider,{value:{form:c,formId:p,costCalculatorBag:t},children:s(t)})},"CostCalculatorFlow");export{W as a};
2
+ //# sourceMappingURL=chunk-L5CORHOG.js.map
@@ -0,0 +1,2 @@
1
+ import{a as m}from"./chunk-G2NIQGHZ.js";import{a}from"./chunk-CLW7CVDG.js";import{a as i}from"./chunk-LSGVE623.js";import{a as c}from"./chunk-Z7WBY27D.js";import{a as S}from"./chunk-5KHLOGTR.js";import{a as f}from"./chunk-RLLBHQWS.js";import{a as n}from"./chunk-I2URNHWK.js";import{a as p}from"./chunk-SFX34GRA.js";import{a as s}from"./chunk-GFNIN6CJ.js";import{a as r}from"./chunk-PGWKJ6FK.js";import{a as e}from"./chunk-47A5JNKX.js";import{a as t}from"./chunk-P37U34EQ.js";import{useId as D,useState as P}from"react";import{jsx as R}from"react/jsx-runtime";var L=t(({employmentId:d,companyId:u,countryCode:b,type:l="employee",externalId:v,skipSteps:g,initialValues:B,render:I,options:O})=>{let w=D(),o=e({companyId:u,countryCode:b,employmentId:d,type:l,options:O,skipSteps:g,externalId:v,initialValues:B}),[C,h]=P({showReserveInvoice:!1,showInviteSuccessful:!1});return R(r.Provider,{value:{formId:w,onboardingBag:o,creditScore:C,setCreditScore:h},children:I({onboardingBag:o,components:{BasicInformationStep:n,ContractDetailsStep:s,BenefitsStep:p,SubmitButton:i,SaveDraftButton:S,BackButton:m,OnboardingInvite:a,SelectCountryStep:f,ReviewStep:c}})})},"OnboardingFlow");export{L as a};
2
+ //# sourceMappingURL=chunk-LJ36642G.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/Onboarding/OnboardingFlow.tsx"],"sourcesContent":["import { useId, useState } from 'react';\nimport { useOnboarding } from '@/src/flows/Onboarding/hooks';\nimport { BasicInformationStep } from '@/src/flows/Onboarding/components/BasicInformationStep';\nimport { OnboardingContext } from '@/src/flows/Onboarding/context';\nimport { OnboardingSubmit } from '@/src/flows/Onboarding/components/OnboardingSubmit';\nimport { OnboardingBack } from '@/src/flows/Onboarding/components/OnboardingBack';\nimport { OnboardingFlowProps } from '@/src/flows/Onboarding/types';\nimport { OnboardingInvite } from '@/src/flows/Onboarding/components/OnboardingInvite';\nimport { ContractDetailsStep } from '@/src/flows/Onboarding/components/ContractDetailsStep';\nimport { BenefitsStep } from '@/src/flows/Onboarding/components/BenefitsStep';\nimport { SelectCountryStep } from '@/src/flows/Onboarding/components/SelectCountryStep';\nimport { ReviewStep } from '@/src/flows/Onboarding/components/ReviewStep';\nimport { SaveDraftButton } from '@/src/flows/Onboarding/components/SaveDraftButton';\n\nexport const OnboardingFlow = ({\n employmentId,\n companyId,\n countryCode,\n type = 'employee',\n externalId,\n skipSteps,\n initialValues,\n render,\n options,\n}: OnboardingFlowProps) => {\n const formId = useId();\n const onboardingBag = useOnboarding({\n companyId,\n countryCode,\n employmentId,\n type,\n options,\n skipSteps,\n externalId,\n initialValues,\n });\n\n const [creditScore, setCreditScore] = useState<{\n showReserveInvoice: boolean;\n showInviteSuccessful: boolean;\n }>({\n showReserveInvoice: false,\n showInviteSuccessful: false,\n });\n\n return (\n <OnboardingContext.Provider\n value={{\n formId: formId,\n onboardingBag,\n creditScore,\n setCreditScore: setCreditScore,\n }}\n >\n {render({\n onboardingBag,\n components: {\n BasicInformationStep: BasicInformationStep,\n ContractDetailsStep: ContractDetailsStep,\n BenefitsStep: BenefitsStep,\n SubmitButton: OnboardingSubmit,\n SaveDraftButton: SaveDraftButton,\n BackButton: OnboardingBack,\n OnboardingInvite: OnboardingInvite,\n SelectCountryStep: SelectCountryStep,\n ReviewStep: ReviewStep,\n },\n })}\n </OnboardingContext.Provider>\n );\n};\n"],"mappings":"2dAAA,OAAS,SAAAA,EAAO,YAAAC,MAAgB,QA8C5B,cAAAC,MAAA,oBAhCG,IAAMC,EAAiBC,EAAA,CAAC,CAC7B,aAAAC,EACA,UAAAC,EACA,YAAAC,EACA,KAAAC,EAAO,WACP,WAAAC,EACA,UAAAC,EACA,cAAAC,EACA,OAAAC,EACA,QAAAC,CACF,IAA2B,CACzB,IAAMC,EAASC,EAAM,EACfC,EAAgBC,EAAc,CAClC,UAAAX,EACA,YAAAC,EACA,aAAAF,EACA,KAAAG,EACA,QAAAK,EACA,UAAAH,EACA,WAAAD,EACA,cAAAE,CACF,CAAC,EAEK,CAACO,EAAaC,CAAc,EAAIC,EAGnC,CACD,mBAAoB,GACpB,qBAAsB,EACxB,CAAC,EAED,OACElB,EAACmB,EAAkB,SAAlB,CACC,MAAO,CACL,OAAQP,EACR,cAAAE,EACA,YAAAE,EACA,eAAgBC,CAClB,EAEC,SAAAP,EAAO,CACN,cAAAI,EACA,WAAY,CACV,qBAAsBM,EACtB,oBAAqBC,EACrB,aAAcC,EACd,aAAcC,EACd,gBAAiBC,EACjB,WAAYC,EACZ,iBAAkBC,EAClB,kBAAmBC,EACnB,WAAYC,CACd,CACF,CAAC,EACH,CAEJ,EAxD8B","names":["useId","useState","jsx","OnboardingFlow","__name","employmentId","companyId","countryCode","type","externalId","skipSteps","initialValues","render","options","formId","useId","onboardingBag","useOnboarding","creditScore","setCreditScore","useState","OnboardingContext","BasicInformationStep","ContractDetailsStep","BenefitsStep","OnboardingSubmit","SaveDraftButton","OnboardingBack","OnboardingInvite","SelectCountryStep","ReviewStep"]}
@@ -1,2 +1,2 @@
1
- import{b as e}from"./chunk-PGWKJ6FK.js";import{b as i}from"./chunk-2QGDCMCE.js";import{b as m}from"./chunk-3ZWDIEEM.js";import{a as u}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function p({children:t,...o}){let{formId:n}=e(),{components:f}=m(),r=f?.button;return r?s(r,{...o,form:n,children:t}):s(i,{...o,form:n,children:t})}u(p,"OnboardingSubmit");export{p as a};
2
- //# sourceMappingURL=chunk-MCAK5KPI.js.map
1
+ import{b as e}from"./chunk-PGWKJ6FK.js";import{b as i}from"./chunk-4NLAHGUV.js";import{b as m}from"./chunk-3ZWDIEEM.js";import{a as u}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function p({children:t,...o}){let{formId:n}=e(),{components:f}=m(),r=f?.button;return r?s(r,{...o,form:n,children:t}):s(i,{...o,form:n,children:t})}u(p,"OnboardingSubmit");export{p as a};
2
+ //# sourceMappingURL=chunk-LSGVE623.js.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-P37U34EQ.js";import{formDataBodySerializer as i}from"@hey-api/client-fetch";import{createClient as o,createConfig as n}from"@hey-api/client-fetch";var r=o(n({baseUrl:"https://gateway.remote.com/"}));var l=t(e=>(e?.client??r).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/offboardings",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateOffboarding");var h=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contract-amendments/schema",...e}),"getShowContractAmendmentSchema");var m=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/currency-converter/raw",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postConvertRawCurrencyConverter"),d=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/countries/{country_code}/contractor-contract-details",...e}),"getShowContractorContractDetailsCountry");var y=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/employments",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateEmployment2"),E=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/help-center-articles/{id}",...e}),"getShowHelpCenterArticle");var u=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/estimation",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateEstimation");var C=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/benefit-offers",...e}),"getIndexBenefitOffer"),w=t(e=>(e.client??r).put({security:[{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/benefit-offers",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"putUpdateBenefitOffer");var T=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/employments/{employment_id}/contract-documents/{id}",...e}),"getShowContractDocument");var O=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/magic-link",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postGenerateMagicLink");var x=t(e=>(e?.client??r).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/estimation-pdf",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateEstimationPdf");var f=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/risk-reserve",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateRiskReserve");var b=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/companies/{company_id}",...e}),"getShowCompany");var P=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contract-amendments",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateContractAmendment");var R=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/countries/{country_code}/{form}",...e}),"getShowFormCountry");var D=t(e=>(e?.client??r).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/countries",...e}),"getIndexCountry");var G=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/benefit-offers/schema",...e}),"getShowSchema");var v=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}",...e}),"getShowEmployment"),g=t(e=>(e.client??r).patch({security:[{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"patchUpdateEmployment2");var I=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/regions/{slug}/fields",...e}),"getShowRegionField");var S=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/contract-eligibility",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateContractEligibility"),k=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/countries",...e}),"getSupportedCountry");var U=t(e=>(e?.client??r).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/estimation-csv",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateEstimationCsv"),B=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/employments/{employment_id}/contract-documents",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateContractDocument");var q=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/currency-converter/effective",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postConvertWithSpreadCurrencyConverter");var A=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contract-amendments/automatable",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postAutomatableContractAmendment");var _=t(e=>(e?.client??r).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/company-currencies",...e}),"getIndexCompanyCurrency");var W=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/invite",...e}),"postInviteEmploymentInvitation");var F=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contractors/employments/{employment_id}/contract-documents/{contract_document_id}/sign",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postSignContractDocument");var j=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/timeoff",...e}),"getIndexTimeoff");export{r as a,l as b,h as c,m as d,d as e,y as f,E as g,u as h,C as i,w as j,T as k,O as l,x as m,f as n,b as o,P as p,R as q,D as r,G as s,v as t,g as u,I as v,S as w,k as x,U as y,B as z,q as A,A as B,_ as C,W as D,F as E,j as F};
2
+ //# sourceMappingURL=chunk-MISHDUB2.js.map