@remoteoss/remote-flows 0.27.0 → 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/dist/{ZendeskTriggerButton-DIV8pCPo.d.ts → ZendeskTriggerButton-Dditzyfj.d.ts} +15 -0
  2. package/dist/{chunk-DZ67OJVF.js → chunk-25U3HC77.js} +2 -2
  3. package/dist/{chunk-PFT7KJ65.js → chunk-2FZWM6RV.js} +2 -2
  4. package/dist/{chunk-RAHCZTQ3.js → chunk-2RBD2MJR.js} +2 -2
  5. package/dist/{chunk-UFBTCHEI.js → chunk-3PTV5YSQ.js} +2 -2
  6. package/dist/{chunk-HFI2MD3H.js → chunk-3WE5QB4I.js} +2 -2
  7. package/dist/chunk-43IIMISK.js +2 -0
  8. package/dist/chunk-43IIMISK.js.map +1 -0
  9. package/dist/chunk-5Y2RV54X.js +2 -0
  10. package/dist/chunk-5Y2RV54X.js.map +1 -0
  11. package/dist/{chunk-SA74WAVS.js → chunk-6IKJCDQU.js} +2 -2
  12. package/dist/{chunk-R64X3EJF.js → chunk-7JPHJ7SQ.js} +2 -2
  13. package/dist/{chunk-LRGEEPGK.js → chunk-AWJUS6JD.js} +1 -1
  14. package/dist/{chunk-LRGEEPGK.js.map → chunk-AWJUS6JD.js.map} +1 -1
  15. package/dist/{chunk-UTBVLDKY.js → chunk-BSUVUGJG.js} +2 -2
  16. package/dist/{chunk-QLNFHOLH.js → chunk-CCL5LNHC.js} +2 -2
  17. package/dist/{chunk-ANQ4HVVK.js → chunk-CDRDLO4A.js} +1 -1
  18. package/dist/{chunk-ANQ4HVVK.js.map → chunk-CDRDLO4A.js.map} +1 -1
  19. package/dist/{chunk-LRNSFLHR.js → chunk-CEJ24TSW.js} +2 -2
  20. package/dist/{chunk-WNTOQYRY.js → chunk-CHAHQRMM.js} +2 -2
  21. package/dist/{chunk-BMDZJNJV.js → chunk-E5VV7WAZ.js} +2 -2
  22. package/dist/chunk-EHS4ERDW.js +2 -0
  23. package/dist/chunk-EHS4ERDW.js.map +1 -0
  24. package/dist/{chunk-WLBRCGTG.js → chunk-FHQWEM5E.js} +2 -2
  25. package/dist/{chunk-VLLLNIMN.js → chunk-FTCLM4RE.js} +2 -2
  26. package/dist/{chunk-VM2DQCZO.js → chunk-GEHM46QD.js} +2 -2
  27. package/dist/{chunk-SB3IYODL.js → chunk-GWJZTMF4.js} +2 -2
  28. package/dist/{chunk-E3JFQ7PH.js → chunk-I4XJ764Y.js} +2 -2
  29. package/dist/{chunk-BO6OKTIG.js → chunk-I5XGKYJR.js} +2 -2
  30. package/dist/chunk-ID3ZF7QT.js +2 -0
  31. package/dist/chunk-ID3ZF7QT.js.map +1 -0
  32. package/dist/{chunk-R645TMO5.js → chunk-IJQDK7KG.js} +2 -2
  33. package/dist/{chunk-L6FZRTSN.js → chunk-K2I7ZL3Z.js} +2 -2
  34. package/dist/{chunk-7Y46DL2U.js → chunk-LA6ZJLTB.js} +2 -2
  35. package/dist/{chunk-RINDVT6U.js → chunk-LAYZ6XET.js} +2 -2
  36. package/dist/chunk-LWZIOOPO.js +2 -0
  37. package/dist/chunk-LWZIOOPO.js.map +1 -0
  38. package/dist/{chunk-NRW33IP5.js → chunk-M22INAKM.js} +2 -2
  39. package/dist/{chunk-YXWBSRKS.js → chunk-MAVVGCUM.js} +2 -2
  40. package/dist/{chunk-A2SWQS2N.js → chunk-MB6ZGX2O.js} +2 -2
  41. package/dist/{chunk-XP7UEI56.js → chunk-NW5EBNKN.js} +2 -2
  42. package/dist/chunk-NX7MM6XR.js +2 -0
  43. package/dist/chunk-NX7MM6XR.js.map +1 -0
  44. package/dist/{chunk-746ELT2W.js → chunk-NZHJMUIX.js} +2 -2
  45. package/dist/chunk-NZHJMUIX.js.map +1 -0
  46. package/dist/{chunk-CVIWZYO3.js → chunk-PJY4TN7I.js} +2 -2
  47. package/dist/{chunk-W55MUSAS.js → chunk-PXX2JSFI.js} +2 -2
  48. package/dist/{chunk-GD5556B2.js → chunk-QFK2SD24.js} +2 -2
  49. package/dist/chunk-QM7J43SC.js +2 -0
  50. package/dist/chunk-QM7J43SC.js.map +1 -0
  51. package/dist/{chunk-5NPET4ZO.js → chunk-QU4ZTSMT.js} +2 -2
  52. package/dist/{chunk-N6G4VZXF.js → chunk-RR55GUDT.js} +2 -2
  53. package/dist/{chunk-N6G4VZXF.js.map → chunk-RR55GUDT.js.map} +1 -1
  54. package/dist/{chunk-AYLYOLVG.js → chunk-S3KOROEZ.js} +2 -2
  55. package/dist/{chunk-FEHSJUZJ.js → chunk-SRYUZSIK.js} +2 -2
  56. package/dist/{chunk-LDJT7TII.js → chunk-T2UJOEUA.js} +2 -2
  57. package/dist/chunk-TKAZTT3M.js +2 -0
  58. package/dist/chunk-TKAZTT3M.js.map +1 -0
  59. package/dist/chunk-UXVCNSHK.js +2 -0
  60. package/dist/chunk-UXVCNSHK.js.map +1 -0
  61. package/dist/{chunk-TUFTB5UD.js → chunk-UYHBV7QJ.js} +2 -2
  62. package/dist/chunk-VDRNNOVA.js +2 -0
  63. package/dist/chunk-VDRNNOVA.js.map +1 -0
  64. package/dist/{chunk-4ZGIL6OE.js → chunk-WHVPDECD.js} +2 -2
  65. package/dist/chunk-XOA7GG4P.js +2 -0
  66. package/dist/{chunk-E6OBNWMU.js → chunk-ZJ7524CZ.js} +2 -2
  67. package/dist/chunk-ZPBKMAKR.js +2 -0
  68. package/dist/chunk-ZPBKMAKR.js.map +1 -0
  69. package/dist/chunk-ZXGAFQXW.js +2 -0
  70. package/dist/chunk-ZXGAFQXW.js.map +1 -0
  71. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
  72. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +3 -3
  73. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  74. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
  75. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  76. package/dist/flows/ContractAmendment/context.d.ts +3 -3
  77. package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
  78. package/dist/flows/ContractAmendment/index.d.ts +3 -3
  79. package/dist/flows/ContractAmendment/index.js +1 -1
  80. package/dist/flows/ContractAmendment/utils.d.ts +1 -1
  81. package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +5 -5
  82. package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
  83. package/dist/flows/ContractorOnboarding/api.d.ts +2 -2
  84. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
  85. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
  86. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +5 -5
  87. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
  88. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +5 -5
  89. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
  90. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +5 -5
  91. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
  92. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
  93. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
  94. package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +5 -5
  95. package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
  96. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
  97. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
  98. package/dist/flows/ContractorOnboarding/context.d.ts +5 -5
  99. package/dist/flows/ContractorOnboarding/hooks.d.ts +5 -5
  100. package/dist/flows/ContractorOnboarding/hooks.js +1 -1
  101. package/dist/flows/ContractorOnboarding/index.d.ts +5 -5
  102. package/dist/flows/ContractorOnboarding/index.js +1 -1
  103. package/dist/flows/ContractorOnboarding/types.d.ts +5 -5
  104. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
  105. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  106. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
  107. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  108. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +1 -1
  109. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  110. package/dist/flows/CostCalculator/Results/CostCalculatorBenefitsBreakdown.js +1 -1
  111. package/dist/flows/CostCalculator/Results/CostCalculatorContributionsBreakdown.js +1 -1
  112. package/dist/flows/CostCalculator/Results/CostCalculatorExtraStatutoryPaymentsBreakdown.js +1 -1
  113. package/dist/flows/CostCalculator/Results/CostCalculatorGrossSalary.js +1 -1
  114. package/dist/flows/CostCalculator/Results/CostCalculatorResults.d.ts +1 -1
  115. package/dist/flows/CostCalculator/Results/CostCalculatorResults.js +1 -1
  116. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +1 -1
  117. package/dist/flows/CostCalculator/api.d.ts +1 -1
  118. package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
  119. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  120. package/dist/flows/CostCalculator/context.d.ts +3 -3
  121. package/dist/flows/CostCalculator/hooks.d.ts +3 -3
  122. package/dist/flows/CostCalculator/hooks.js +1 -1
  123. package/dist/flows/CostCalculator/index.d.ts +3 -3
  124. package/dist/flows/CostCalculator/index.js +1 -1
  125. package/dist/flows/CostCalculator/types.d.ts +1 -1
  126. package/dist/flows/CostCalculator/utils.d.ts +3 -3
  127. package/dist/flows/CostCalculator/utils.js +1 -1
  128. package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
  129. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  130. package/dist/flows/Onboarding/api.d.ts +7 -7
  131. package/dist/flows/Onboarding/api.js +1 -1
  132. package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
  133. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  134. package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +4 -4
  135. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  136. package/dist/flows/Onboarding/components/BenefitsStep.d.ts +4 -4
  137. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  138. package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +4 -4
  139. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  140. package/dist/flows/Onboarding/components/OnboardingForm.d.ts +4 -4
  141. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  142. package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
  143. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  144. package/dist/flows/Onboarding/components/ReviewStep.d.ts +4 -4
  145. package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
  146. package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +4 -4
  147. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  148. package/dist/flows/Onboarding/context.d.ts +4 -4
  149. package/dist/flows/Onboarding/hooks.d.ts +4 -4
  150. package/dist/flows/Onboarding/hooks.js +1 -1
  151. package/dist/flows/Onboarding/index.d.ts +4 -4
  152. package/dist/flows/Onboarding/index.js +1 -1
  153. package/dist/flows/Onboarding/types.d.ts +4 -4
  154. package/dist/flows/Onboarding/utils.d.ts +5 -5
  155. package/dist/flows/Onboarding/utils.js +1 -1
  156. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -4
  157. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  158. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +4 -4
  159. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  160. package/dist/flows/Termination/PaidTimeOffForm.d.ts +4 -4
  161. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  162. package/dist/flows/Termination/TerminationDetailsForm.d.ts +4 -4
  163. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  164. package/dist/flows/Termination/TerminationFlow.d.ts +4 -4
  165. package/dist/flows/Termination/TerminationFlow.js +1 -1
  166. package/dist/flows/Termination/TerminationForm.d.ts +4 -4
  167. package/dist/flows/Termination/TerminationForm.js +1 -1
  168. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
  169. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +5 -5
  170. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.js +1 -1
  171. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +5 -5
  172. package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +5 -5
  173. package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
  174. package/dist/flows/Termination/context.d.ts +6 -6
  175. package/dist/flows/Termination/hooks.d.ts +5 -5
  176. package/dist/flows/Termination/hooks.js +1 -1
  177. package/dist/flows/Termination/index.d.ts +6 -6
  178. package/dist/flows/Termination/index.js +1 -1
  179. package/dist/flows/Termination/json-schemas/employeeComunication.js +1 -1
  180. package/dist/flows/Termination/json-schemas/jsonSchema.d.ts +2 -0
  181. package/dist/flows/Termination/json-schemas/jsonSchema.js +1 -1
  182. package/dist/flows/Termination/json-schemas/paidTimeOff.d.ts +1 -0
  183. package/dist/flows/Termination/json-schemas/paidTimeOff.js +1 -1
  184. package/dist/flows/Termination/json-schemas/schema.js +1 -1
  185. package/dist/flows/Termination/json-schemas/terminationDetails.d.ts +1 -0
  186. package/dist/flows/Termination/json-schemas/terminationDetails.js +1 -1
  187. package/dist/flows/Termination/types.d.ts +4 -4
  188. package/dist/flows/api.d.ts +4 -4
  189. package/dist/flows/api.js +1 -1
  190. package/dist/index.d.ts +9 -9
  191. package/dist/index.js +1 -1
  192. package/dist/index.js.map +1 -1
  193. package/dist/internals.d.ts +1 -1
  194. package/dist/internals.js +1 -1
  195. package/dist/{mutations-C0KsEf83.d.ts → mutations-B3zY0Z8j.d.ts} +1 -1
  196. package/dist/{remoteFlows-DJcvCgN2.d.ts → remoteFlows-C6LQCoUj.d.ts} +1 -1
  197. package/dist/{types-CwUhT-vz.d.ts → types-CXFW77uu.d.ts} +2 -2
  198. package/dist/{types-1tGveWWg.d.ts → types-C_aEj_4p.d.ts} +6 -5
  199. package/dist/{types-Dad_rgYV.d.ts → types-D0Gtn_LU.d.ts} +23 -16
  200. package/dist/{types-DegHPy8Q.d.ts → types-DRI6kPSl.d.ts} +4 -4
  201. package/dist/{types.gen-B73oMrmZ.d.ts → types.gen-B1wPsyg7.d.ts} +1 -1
  202. package/package.json +1 -1
  203. package/dist/chunk-4T6PRR6R.js +0 -2
  204. package/dist/chunk-4T6PRR6R.js.map +0 -1
  205. package/dist/chunk-746ELT2W.js.map +0 -1
  206. package/dist/chunk-FB2QGVI2.js +0 -2
  207. package/dist/chunk-FB2QGVI2.js.map +0 -1
  208. package/dist/chunk-GC23RRCI.js +0 -2
  209. package/dist/chunk-GC23RRCI.js.map +0 -1
  210. package/dist/chunk-KOIHMAAP.js +0 -2
  211. package/dist/chunk-L3C4AHZJ.js +0 -2
  212. package/dist/chunk-L3C4AHZJ.js.map +0 -1
  213. package/dist/chunk-N3EIN72T.js +0 -2
  214. package/dist/chunk-N3EIN72T.js.map +0 -1
  215. package/dist/chunk-OXCEJQFC.js +0 -2
  216. package/dist/chunk-OXCEJQFC.js.map +0 -1
  217. package/dist/chunk-R3LY6TV5.js +0 -2
  218. package/dist/chunk-R3LY6TV5.js.map +0 -1
  219. package/dist/chunk-SLMJEZJ7.js +0 -2
  220. package/dist/chunk-SLMJEZJ7.js.map +0 -1
  221. package/dist/chunk-WZAWPSKS.js +0 -2
  222. package/dist/chunk-WZAWPSKS.js.map +0 -1
  223. package/dist/chunk-ZIPHLBX4.js +0 -2
  224. package/dist/chunk-ZIPHLBX4.js.map +0 -1
  225. package/dist/chunk-ZY5U2UNT.js +0 -2
  226. package/dist/chunk-ZY5U2UNT.js.map +0 -1
  227. /package/dist/{chunk-DZ67OJVF.js.map → chunk-25U3HC77.js.map} +0 -0
  228. /package/dist/{chunk-PFT7KJ65.js.map → chunk-2FZWM6RV.js.map} +0 -0
  229. /package/dist/{chunk-RAHCZTQ3.js.map → chunk-2RBD2MJR.js.map} +0 -0
  230. /package/dist/{chunk-UFBTCHEI.js.map → chunk-3PTV5YSQ.js.map} +0 -0
  231. /package/dist/{chunk-HFI2MD3H.js.map → chunk-3WE5QB4I.js.map} +0 -0
  232. /package/dist/{chunk-SA74WAVS.js.map → chunk-6IKJCDQU.js.map} +0 -0
  233. /package/dist/{chunk-R64X3EJF.js.map → chunk-7JPHJ7SQ.js.map} +0 -0
  234. /package/dist/{chunk-UTBVLDKY.js.map → chunk-BSUVUGJG.js.map} +0 -0
  235. /package/dist/{chunk-QLNFHOLH.js.map → chunk-CCL5LNHC.js.map} +0 -0
  236. /package/dist/{chunk-LRNSFLHR.js.map → chunk-CEJ24TSW.js.map} +0 -0
  237. /package/dist/{chunk-WNTOQYRY.js.map → chunk-CHAHQRMM.js.map} +0 -0
  238. /package/dist/{chunk-BMDZJNJV.js.map → chunk-E5VV7WAZ.js.map} +0 -0
  239. /package/dist/{chunk-WLBRCGTG.js.map → chunk-FHQWEM5E.js.map} +0 -0
  240. /package/dist/{chunk-VLLLNIMN.js.map → chunk-FTCLM4RE.js.map} +0 -0
  241. /package/dist/{chunk-VM2DQCZO.js.map → chunk-GEHM46QD.js.map} +0 -0
  242. /package/dist/{chunk-SB3IYODL.js.map → chunk-GWJZTMF4.js.map} +0 -0
  243. /package/dist/{chunk-E3JFQ7PH.js.map → chunk-I4XJ764Y.js.map} +0 -0
  244. /package/dist/{chunk-BO6OKTIG.js.map → chunk-I5XGKYJR.js.map} +0 -0
  245. /package/dist/{chunk-R645TMO5.js.map → chunk-IJQDK7KG.js.map} +0 -0
  246. /package/dist/{chunk-L6FZRTSN.js.map → chunk-K2I7ZL3Z.js.map} +0 -0
  247. /package/dist/{chunk-7Y46DL2U.js.map → chunk-LA6ZJLTB.js.map} +0 -0
  248. /package/dist/{chunk-RINDVT6U.js.map → chunk-LAYZ6XET.js.map} +0 -0
  249. /package/dist/{chunk-NRW33IP5.js.map → chunk-M22INAKM.js.map} +0 -0
  250. /package/dist/{chunk-YXWBSRKS.js.map → chunk-MAVVGCUM.js.map} +0 -0
  251. /package/dist/{chunk-A2SWQS2N.js.map → chunk-MB6ZGX2O.js.map} +0 -0
  252. /package/dist/{chunk-XP7UEI56.js.map → chunk-NW5EBNKN.js.map} +0 -0
  253. /package/dist/{chunk-CVIWZYO3.js.map → chunk-PJY4TN7I.js.map} +0 -0
  254. /package/dist/{chunk-W55MUSAS.js.map → chunk-PXX2JSFI.js.map} +0 -0
  255. /package/dist/{chunk-GD5556B2.js.map → chunk-QFK2SD24.js.map} +0 -0
  256. /package/dist/{chunk-5NPET4ZO.js.map → chunk-QU4ZTSMT.js.map} +0 -0
  257. /package/dist/{chunk-AYLYOLVG.js.map → chunk-S3KOROEZ.js.map} +0 -0
  258. /package/dist/{chunk-FEHSJUZJ.js.map → chunk-SRYUZSIK.js.map} +0 -0
  259. /package/dist/{chunk-LDJT7TII.js.map → chunk-T2UJOEUA.js.map} +0 -0
  260. /package/dist/{chunk-TUFTB5UD.js.map → chunk-UYHBV7QJ.js.map} +0 -0
  261. /package/dist/{chunk-4ZGIL6OE.js.map → chunk-WHVPDECD.js.map} +0 -0
  262. /package/dist/{chunk-KOIHMAAP.js.map → chunk-XOA7GG4P.js.map} +0 -0
  263. /package/dist/{chunk-E6OBNWMU.js.map → chunk-ZJ7524CZ.js.map} +0 -0
@@ -0,0 +1,2 @@
1
+ import{a as D}from"./chunk-SGE4DLC3.js";import{a as S,b as E,d as L,e as _,f as F}from"./chunk-TWIUL2P3.js";import{b as k}from"./chunk-WVDTHFGS.js";import{b as w}from"./chunk-3ZWDIEEM.js";import{a as l}from"./chunk-43WMZDDH.js";import{a as p}from"./chunk-P37U34EQ.js";import{jsx as y,jsxs as B}from"react/jsx-runtime";var A=p(({open:e,onOpenChange:a,title:t,trigger:n,children:m,className:d="",direction:i="right"})=>{let{components:f}=w(),r=f?.drawer;return r?y(r,{open:e,onOpenChange:a,title:t,trigger:n,children:m}):B(S,{open:e,onOpenChange:a,direction:i,children:[y(E,{asChild:!0,children:n}),y(L,{className:l(d,"RemoteFlows__Drawer h-full w-[540px] mt-0 ml-auto px-4"),children:B("div",{className:"h-full flex flex-col",children:[y(_,{children:y(F,{children:t})}),y("div",{className:"flex-1 overflow-y-auto",children:m})]})})]})},"Drawer");import*as T from"react";import{jsx as b}from"react/jsx-runtime";var g=T.forwardRef(({className:e,...a},t)=>b("div",{className:"relative w-full overflow-auto",children:b("table",{ref:t,className:l("w-full caption-bottom text-sm",e),...a})}));g.displayName="Table";var x=T.forwardRef(({className:e,...a},t)=>b("thead",{ref:t,className:l("[&_tr]:border-b",e),...a}));x.displayName="TableHeader";var h=T.forwardRef(({className:e,...a},t)=>b("tbody",{ref:t,className:l("[&_tr:last-child]:border-0",e),...a}));h.displayName="TableBody";var K=T.forwardRef(({className:e,...a},t)=>b("tfoot",{ref:t,className:l("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...a}));K.displayName="TableFooter";var R=T.forwardRef(({className:e,...a},t)=>b("tr",{ref:t,className:l("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...a}));R.displayName="TableRow";var v=T.forwardRef(({className:e,...a},t)=>b("th",{ref:t,className:l("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));v.displayName="TableHead";var C=T.forwardRef(({className:e,...a},t)=>b("td",{ref:t,className:l("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));C.displayName="TableCell";var Y=T.forwardRef(({className:e,...a},t)=>b("caption",{ref:t,className:l("mt-4 text-sm text-muted-foreground",e),...a}));Y.displayName="TableCaption";import q from"react";import{jsx as c,jsxs as I}from"react/jsx-runtime";var H=q.forwardRef(({data:e=[],columns:a,className:t=""},n)=>{let{components:m}=w(),d=m?.table;return d?c(d,{data:e,columns:a,className:t}):I(g,{ref:n,className:l("RemoteFlows__Table",t),children:[c(x,{children:c(R,{children:a.map(i=>c(v,{className:l("RemoteFlows__TableHead",i.className),children:i.label},String(i.id)))})}),c(h,{children:e?.map((i,f)=>c(R,{children:a.map(r=>c(C,{className:l("RemoteFlows__TableCell",r.className,r.cellClassName),children:r.render?r.render(i[r.id],i,f):i[r.id]},String(r.id)))},z(i,f)))})]})});H.displayName="Table";function z(e,a){return String(e.id??a)}p(z,"getRowKey");import{Fragment as M,jsx as o,jsxs as s}from"react/jsx-runtime";var J="RemoteFlows__SummaryRow flex justify-between items-center py-2 text-xs",V="RemoteFlows__SummaryRowBorder border-b border-b-1 border-b-[#E4E4E7]",u=p(({children:e,withBorder:a=!1,className:t=""})=>o("div",{className:l(J,a&&V,t),children:e}),"SummaryRow"),W=p(({usedDays:e,bookedDays:a,approvedDaysBeforeTermination:t,approvedDaysAfterTermination:n,remainingDays:m,proposedTerminationDate:d,isUnlimitedPto:i,currentEntitlementDays:f})=>{let r=new Date(d).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"});return s("div",{children:[s(u,{withBorder:!0,children:[o("label",{children:"Number of days entitled to per year"}),o("p",{"data-testid":"entitled-days",className:"font-bold",children:i?"Unlimited":f})]}),s(u,{children:[o("label",{children:"Total days booked"}),o("p",{"data-testid":"booked-days",className:"font-bold",children:a})]}),s(u,{children:[o("label",{children:"Number of days already used"}),o("p",{"data-testid":"used-days",className:"font-bold",children:e})]}),s(u,{children:[s("label",{children:["Approved for use before ",r]}),o("p",{"data-testid":"approved-days-before-termination",className:"font-bold",children:t})]}),s(u,{withBorder:!0,children:[s("label",{children:["Approved for use after ",r]}),o("p",{"data-testid":"approved-days-after-termination",className:"font-bold",children:n})]}),s(u,{children:[o("label",{children:"Total days remaining unused"}),o("p",{"data-testid":"remaining-days",className:"font-bold",children:m})]}),o(u,{className:"mb-2 py-0",children:s("p",{className:"text-xs text-[#222E39]",children:["Unused days expire on ",r]})})]})},"SummaryTimeOff"),X=[{id:"formattedDate",label:"Dates",className:"w-[250px]",cellClassName:"font-medium"},{id:"duration",label:"Duration",render:p(e=>D({number:e,singular:"day",plural:"days",followCopyGuidelines:!1,showNumber:!0}),"render")},{id:"status",label:"Status"}],Z=p(({employeeName:e,timeoffQuery:a,entitledDays:t,countryName:n,currentEntitlementDays:m,formattedProposedTerminationDate:d,onOpenChange:i,open:f})=>{let{data:r,isLoading:N}=a;return o(A,{open:f,onOpenChange:i,title:`${e} paid time off breakdown`,trigger:o(k,{variant:"link",className:"text-xs text-[#3B82F6] font-bold p-0",children:"See detailed time off breakdown \u2197"}),className:"h-full w-[540px] mt-0 ml-auto px-4 RemoteFlows_DrawerTimeOff",children:!N&&o(M,{children:Array.isArray(r?.timeoffs)&&r?.timeoffs?.length>0?s(M,{children:[o("p",{className:"text-[#09090B] font-medium mb-4",children:"This list is for your information only."}),s("p",{className:"text-xs text-[#09090B] mb-1 flex items-center justify-between gap-2",children:[s("span",{children:["Annual entitlement for ",n]}),o("span",{className:"font-bold",children:t})]}),s("p",{className:"text-xs text-[#09090B] mb-6 flex items-center justify-between gap-2",children:[s("span",{children:["Entitlement up to ",d]}),o("span",{className:"font-bold",children:m})]}),o("div",{className:"mb-2",children:o(H,{data:r?.timeoffs,columns:X})}),s("p",{className:"text-xs",children:["Total of"," ",D({number:r?.bookedDays,singular:"day",plural:"days",followCopyGuidelines:!1,showNumber:!0})," ","booked"]})]}):s(M,{children:[o("p",{className:"font-medium mb-1 text-[#09090B]",children:"No recorded time off"}),s("p",{className:"text-sm text-[#09090B]",children:["According to our records, ",e," has not taken any time off this year."]})]})})})},"DrawerTimeOff"),Ne=p(({employeeName:e,proposedTerminationDate:a,summaryData:t,formattedProposedTerminationDate:n,timeoffQuery:m,employment:d,onOpenChange:i,open:f})=>{let{entitledDays:r,bookedDays:N,usedDays:O,approvedDaysBeforeTermination:U,approvedDaysAfterTermination:$,remainingDays:Q,currentEntitlementDays:P,isUnlimitedPto:G}=t.data;return s("div",{className:"RemoteFlows__PaidTimeOff__Container py-3",children:[o("h3",{className:"RemoteFlows__PaidTimeOff__Title mb-2",children:"Paid time off"}),s("p",{className:"RemoteFlows__PaidTimeOff__Description text-sm mb-2",children:["The proposed termination date for ",e," is"," ",n,". You will need to pay them for any unused accrued days. Below is a breakdown of their time off entitlement and usage for the current annual leave period:"]}),s("div",{className:"mb-2",children:[!t?.isLoading&&!t?.isError&&t?.data&&o(W,{usedDays:O,bookedDays:N,currentEntitlementDays:P,approvedDaysBeforeTermination:U,approvedDaysAfterTermination:$,remainingDays:Q,proposedTerminationDate:a,isUnlimitedPto:G}),o(Z,{employeeName:e,timeoffQuery:m,entitledDays:r,currentEntitlementDays:P,countryName:d?.country?.name??"Unknown",onOpenChange:i,formattedProposedTerminationDate:n,open:f})]})]})},"PaidTimeOff");export{Ne as a};
2
+ //# sourceMappingURL=chunk-ID3ZF7QT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/shared/drawer/Drawer.tsx","../src/components/ui/table.tsx","../src/components/shared/table/Table.tsx","../src/flows/Termination/components/PaidTimeOff/PaidTimeOff.tsx"],"sourcesContent":["import { useFormFields } from '@/src/context';\nimport { DrawerComponentProps } from '@/src/types/remoteFlows';\nimport {\n Drawer as DrawerPrimitive,\n DrawerTrigger,\n DrawerContent,\n DrawerHeader,\n DrawerTitle,\n} from '@/src/components/ui/drawer';\nimport { cn } from '@/src/lib/utils';\n\nexport type DrawerProps = DrawerComponentProps & {\n className?: string;\n direction?: 'left' | 'right';\n};\n\nexport const Drawer = ({\n open,\n onOpenChange,\n title,\n trigger,\n children,\n className = '',\n direction = 'right',\n}: DrawerProps) => {\n const { components } = useFormFields();\n const CustomDrawer = components?.drawer;\n\n if (CustomDrawer) {\n return (\n <CustomDrawer\n open={open}\n onOpenChange={onOpenChange}\n title={title}\n trigger={trigger}\n >\n {children}\n </CustomDrawer>\n );\n }\n\n return (\n <DrawerPrimitive\n open={open}\n onOpenChange={onOpenChange}\n direction={direction}\n >\n <DrawerTrigger asChild>{trigger}</DrawerTrigger>\n <DrawerContent\n className={cn(\n className,\n 'RemoteFlows__Drawer h-full w-[540px] mt-0 ml-auto px-4',\n )}\n >\n <div className='h-full flex flex-col'>\n <DrawerHeader>\n <DrawerTitle>{title}</DrawerTitle>\n </DrawerHeader>\n <div className='flex-1 overflow-y-auto'>{children}</div>\n </div>\n </DrawerContent>\n </DrawerPrimitive>\n );\n};\n","import * as React from 'react';\n\nimport { cn } from '@/src/lib/utils';\n\nconst Table = React.forwardRef<\n HTMLTableElement,\n React.HTMLAttributes<HTMLTableElement>\n>(({ className, ...props }, ref) => (\n <div className='relative w-full overflow-auto'>\n <table\n ref={ref}\n className={cn('w-full caption-bottom text-sm', className)}\n {...props}\n />\n </div>\n));\nTable.displayName = 'Table';\n\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <thead ref={ref} className={cn('[&_tr]:border-b', className)} {...props} />\n));\nTableHeader.displayName = 'TableHeader';\n\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tbody\n ref={ref}\n className={cn('[&_tr:last-child]:border-0', className)}\n {...props}\n />\n));\nTableBody.displayName = 'TableBody';\n\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <tfoot\n ref={ref}\n className={cn(\n 'border-t bg-muted/50 font-medium [&>tr]:last:border-b-0',\n className,\n )}\n {...props}\n />\n));\nTableFooter.displayName = 'TableFooter';\n\nconst TableRow = React.forwardRef<\n HTMLTableRowElement,\n React.HTMLAttributes<HTMLTableRowElement>\n>(({ className, ...props }, ref) => (\n <tr\n ref={ref}\n className={cn(\n 'border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted',\n className,\n )}\n {...props}\n />\n));\nTableRow.displayName = 'TableRow';\n\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <th\n ref={ref}\n className={cn(\n 'h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n));\nTableHead.displayName = 'TableHead';\n\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <td\n ref={ref}\n className={cn(\n 'p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n));\nTableCell.displayName = 'TableCell';\n\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n <caption\n ref={ref}\n className={cn('mt-4 text-sm text-muted-foreground', className)}\n {...props}\n />\n));\nTableCaption.displayName = 'TableCaption';\n\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n};\n","import { useFormFields } from '@/src/context';\nimport { $TSFixMe } from '@/src/types/remoteFlows';\nimport {\n Table as TablePrimitive,\n TableBody,\n TableCell,\n TableHead,\n TableHeader,\n TableRow,\n} from '@/src/components/ui/table';\nimport { cn } from '@/src/lib/utils';\nimport React from 'react';\n\nexport type ColumnDef<T = $TSFixMe> = {\n id: keyof T;\n label: React.ReactNode;\n className?: string;\n cellClassName?: string;\n render?: (value: $TSFixMe, row: T, index: number) => React.ReactNode;\n};\n\nexport type TableDataProps<T = $TSFixMe> = {\n data: T[] | undefined;\n columns: ColumnDef<T>[];\n className?: string;\n};\n\nexport type TableComponentProps<T = $TSFixMe> = TableDataProps<T>;\n\nexport const Table = React.forwardRef<\n HTMLTableElement,\n TableDataProps<$TSFixMe>\n>(({ data = [], columns, className = '' }, ref) => {\n const { components } = useFormFields();\n const CustomTable = components?.table as\n | React.ComponentType<TableDataProps<$TSFixMe>>\n | undefined;\n\n // Pass the same structured data to custom components\n if (CustomTable) {\n return <CustomTable data={data} columns={columns} className={className} />;\n }\n\n return (\n <TablePrimitive ref={ref} className={cn('RemoteFlows__Table', className)}>\n <TableHeader>\n <TableRow>\n {columns.map((column) => (\n <TableHead\n key={String(column.id)}\n className={cn('RemoteFlows__TableHead', column.className)}\n >\n {column.label}\n </TableHead>\n ))}\n </TableRow>\n </TableHeader>\n <TableBody>\n {data?.map((row, rowIndex) => (\n <TableRow key={getRowKey(row, rowIndex)}>\n {columns.map((column) => (\n <TableCell\n key={String(column.id)}\n className={cn(\n 'RemoteFlows__TableCell',\n column.className,\n column.cellClassName,\n )}\n >\n {column.render\n ? column.render(\n row[column.id as keyof typeof row],\n row,\n rowIndex,\n )\n : row[column.id as keyof typeof row]}\n </TableCell>\n ))}\n </TableRow>\n ))}\n </TableBody>\n </TablePrimitive>\n );\n});\n\nTable.displayName = 'Table';\n\nfunction getRowKey(row: $TSFixMe, index: number): string {\n return String(row.id ?? index);\n}\n","import { PaidTimeoffBreakdownResponse } from '@/src/common/api';\nimport { Button } from '@/src/components/ui/button';\nimport { cn } from '@/src/lib/utils';\nimport { Drawer } from '@/src/components/shared/drawer/Drawer';\nimport { Table } from '@/src/components/shared/table/Table';\nimport { UseQueryResult } from '@tanstack/react-query';\nimport { PaidTimeOffRenderProps } from '@/src/flows/Termination/components/PaidTimeOff/types';\nimport { getSingularPluralUnit } from '@/src/lib/i18n';\nimport { ColumnDef } from '@/src/components/shared/table/Table';\n\nconst rowBase =\n 'RemoteFlows__SummaryRow flex justify-between items-center py-2 text-xs';\nconst rowBorder =\n 'RemoteFlows__SummaryRowBorder border-b border-b-1 border-b-[#E4E4E7]';\n\nconst SummaryRow = ({\n children,\n withBorder = false,\n className = '',\n}: {\n children: React.ReactNode;\n withBorder?: boolean;\n className?: string;\n}) => {\n return (\n <div className={cn(rowBase, withBorder && rowBorder, className)}>\n {children}\n </div>\n );\n};\n\nconst SummaryTimeOff = ({\n usedDays,\n bookedDays,\n approvedDaysBeforeTermination,\n approvedDaysAfterTermination,\n remainingDays,\n proposedTerminationDate,\n isUnlimitedPto,\n currentEntitlementDays,\n}: {\n usedDays: string;\n bookedDays: string;\n approvedDaysBeforeTermination: string;\n approvedDaysAfterTermination: string;\n remainingDays: string;\n proposedTerminationDate: string;\n isUnlimitedPto: boolean;\n currentEntitlementDays: string;\n}) => {\n const formattedProposedTerminationDate = new Date(\n proposedTerminationDate,\n ).toLocaleDateString('en-US', {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n });\n return (\n <div>\n <SummaryRow withBorder>\n <label>Number of days entitled to per year</label>\n <p data-testid='entitled-days' className='font-bold'>\n {isUnlimitedPto ? 'Unlimited' : currentEntitlementDays}\n </p>\n </SummaryRow>\n <SummaryRow>\n <label>Total days booked</label>\n <p data-testid='booked-days' className='font-bold'>\n {bookedDays}\n </p>\n </SummaryRow>\n <SummaryRow>\n <label>Number of days already used</label>\n <p data-testid='used-days' className='font-bold'>\n {usedDays}\n </p>\n </SummaryRow>\n <SummaryRow>\n <label>\n Approved for use before {formattedProposedTerminationDate}\n </label>\n <p data-testid='approved-days-before-termination' className='font-bold'>\n {approvedDaysBeforeTermination}\n </p>\n </SummaryRow>\n <SummaryRow withBorder>\n <label>Approved for use after {formattedProposedTerminationDate}</label>\n <p data-testid='approved-days-after-termination' className='font-bold'>\n {approvedDaysAfterTermination}\n </p>\n </SummaryRow>\n <SummaryRow>\n <label>Total days remaining unused</label>\n <p data-testid='remaining-days' className='font-bold'>\n {remainingDays}\n </p>\n </SummaryRow>\n <SummaryRow className='mb-2 py-0'>\n <p className='text-xs text-[#222E39]'>\n Unused days expire on {formattedProposedTerminationDate}\n </p>\n </SummaryRow>\n </div>\n );\n};\n\ntype TimeoffRow = {\n formattedDate: string;\n duration: number;\n status: string;\n};\n\nconst TIMEOFF_COLUMNS: ColumnDef<TimeoffRow>[] = [\n {\n id: 'formattedDate',\n label: 'Dates',\n className: 'w-[250px]',\n cellClassName: 'font-medium',\n },\n {\n id: 'duration',\n label: 'Duration',\n render: (value: number) =>\n getSingularPluralUnit({\n number: value,\n singular: 'day',\n plural: 'days',\n followCopyGuidelines: false,\n showNumber: true,\n }),\n },\n {\n id: 'status',\n label: 'Status',\n },\n];\n\nconst DrawerTimeOff = ({\n employeeName,\n timeoffQuery,\n entitledDays,\n countryName,\n currentEntitlementDays,\n formattedProposedTerminationDate,\n onOpenChange,\n open,\n}: {\n employeeName: string;\n timeoffQuery: UseQueryResult<PaidTimeoffBreakdownResponse | undefined, Error>;\n entitledDays: string;\n countryName: string;\n currentEntitlementDays: string;\n onOpenChange: () => void;\n open: boolean;\n formattedProposedTerminationDate: string;\n}) => {\n const { data: timeoff, isLoading } = timeoffQuery;\n\n return (\n <Drawer\n open={open}\n onOpenChange={onOpenChange}\n title={`${employeeName} paid time off breakdown`}\n trigger={\n <Button variant='link' className='text-xs text-[#3B82F6] font-bold p-0'>\n See detailed time off breakdown ↗\n </Button>\n }\n className='h-full w-[540px] mt-0 ml-auto px-4 RemoteFlows_DrawerTimeOff'\n >\n {!isLoading && (\n <>\n {Array.isArray(timeoff?.timeoffs) && timeoff?.timeoffs?.length > 0 ? (\n <>\n <p className='text-[#09090B] font-medium mb-4'>\n This list is for your information only.\n </p>\n <p className='text-xs text-[#09090B] mb-1 flex items-center justify-between gap-2'>\n <span>Annual entitlement for {countryName}</span>\n <span className='font-bold'>{entitledDays}</span>\n </p>\n <p className='text-xs text-[#09090B] mb-6 flex items-center justify-between gap-2'>\n <span>\n Entitlement up to {formattedProposedTerminationDate}\n </span>\n <span className='font-bold'>{currentEntitlementDays}</span>\n </p>\n <div className='mb-2'>\n <Table data={timeoff?.timeoffs} columns={TIMEOFF_COLUMNS} />\n </div>\n <p className='text-xs'>\n Total of{' '}\n {getSingularPluralUnit({\n number: timeoff?.bookedDays,\n singular: 'day',\n plural: 'days',\n followCopyGuidelines: false,\n showNumber: true,\n })}{' '}\n booked\n </p>\n </>\n ) : (\n <>\n <p className='font-medium mb-1 text-[#09090B]'>\n No recorded time off\n </p>\n <p className='text-sm text-[#09090B]'>\n According to our records, {employeeName} has not taken any time\n off this year.\n </p>\n </>\n )}\n </>\n )}\n </Drawer>\n );\n};\n\nexport type PaidTimeOffProps = PaidTimeOffRenderProps;\n\n/**\n * PaidTimeOff component\n *\n * This component is used to display the paid time off summary and details.\n * It displays the summary data and a button to open the details drawer.\n * When the details drawer is open, it displays the paid time off breakdown.\n */\nexport const PaidTimeOff = ({\n employeeName,\n proposedTerminationDate,\n summaryData,\n formattedProposedTerminationDate,\n timeoffQuery,\n employment,\n onOpenChange,\n open,\n}: PaidTimeOffProps) => {\n const {\n entitledDays,\n bookedDays,\n usedDays,\n approvedDaysBeforeTermination,\n approvedDaysAfterTermination,\n remainingDays,\n currentEntitlementDays,\n isUnlimitedPto,\n } = summaryData.data;\n return (\n <div className='RemoteFlows__PaidTimeOff__Container py-3'>\n <h3 className='RemoteFlows__PaidTimeOff__Title mb-2'>Paid time off</h3>\n <p className='RemoteFlows__PaidTimeOff__Description text-sm mb-2'>\n The proposed termination date for {employeeName} is{' '}\n {formattedProposedTerminationDate}. You will need to pay them for any\n unused accrued days. Below is a breakdown of their time off entitlement\n and usage for the current annual leave period:\n </p>\n <div className='mb-2'>\n {!summaryData?.isLoading &&\n !summaryData?.isError &&\n summaryData?.data && (\n <SummaryTimeOff\n usedDays={usedDays}\n bookedDays={bookedDays}\n currentEntitlementDays={currentEntitlementDays}\n approvedDaysBeforeTermination={approvedDaysBeforeTermination}\n approvedDaysAfterTermination={approvedDaysAfterTermination}\n remainingDays={remainingDays}\n proposedTerminationDate={proposedTerminationDate}\n isUnlimitedPto={isUnlimitedPto}\n />\n )}\n <DrawerTimeOff\n employeeName={employeeName}\n timeoffQuery={timeoffQuery}\n entitledDays={entitledDays}\n currentEntitlementDays={currentEntitlementDays}\n countryName={employment?.country?.name ?? 'Unknown'}\n onOpenChange={onOpenChange}\n formattedProposedTerminationDate={formattedProposedTerminationDate}\n open={open}\n />\n </div>\n </div>\n );\n};\n"],"mappings":"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","names":["jsx","jsxs","Drawer","__name","open","onOpenChange","title","trigger","children","className","direction","components","useFormFields","CustomDrawer","DrawerTrigger","DrawerContent","cn","DrawerHeader","DrawerTitle","React","jsx","Table","className","props","ref","cn","TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption","React","jsx","jsxs","Table","React","data","columns","className","ref","components","useFormFields","CustomTable","cn","TableHeader","TableRow","column","TableHead","TableBody","row","rowIndex","TableCell","getRowKey","index","__name","Fragment","jsx","jsxs","rowBase","rowBorder","SummaryRow","__name","children","withBorder","className","cn","SummaryTimeOff","usedDays","bookedDays","approvedDaysBeforeTermination","approvedDaysAfterTermination","remainingDays","proposedTerminationDate","isUnlimitedPto","currentEntitlementDays","formattedProposedTerminationDate","TIMEOFF_COLUMNS","value","getSingularPluralUnit","DrawerTimeOff","employeeName","timeoffQuery","entitledDays","countryName","onOpenChange","open","timeoff","isLoading","Drawer","Button","Table","PaidTimeOff","summaryData","employment"]}
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-ZSCKSEAA.js";import{a as m}from"./chunk-ZE3YT3Q6.js";import{a,b as e}from"./chunk-ANQ4HVVK.js";import{b as n}from"./chunk-WVDTHFGS.js";import{b as s}from"./chunk-43WMZDDH.js";import{a as o}from"./chunk-P37U34EQ.js";import{Info as f}from"lucide-react";import{Fragment as y,jsx as r,jsxs as t}from"react/jsx-runtime";function N({grossSalary:l,currency:p,hasExtraStatutoryPayment:c=!1}){return t("div",{children:[t("div",{className:"flex justify-between items-center mb-2",children:[t("div",{className:"flex items-center gap-2",children:[r("h3",{className:"font-medium text-primary-foreground",children:"Gross Salary"}),c&&r(m,{content:t(y,{children:[r("span",{children:"This country respects extra payments on top of the gross salary."})," ",r(e,{zendeskId:a.extraPayments,children:"Learn more"})]}),children:t(n,{variant:"ghost",size:"icon",className:"h-4 w-4 p-0 mt-2",children:[r(f,{className:"h-3 w-3 text-gray-400"}),r("span",{className:"sr-only",children:"Info"})]})})]}),r("span",{className:"font-semibold text-lg",children:s(l,p)})]}),r(i,{})]})}o(N,"CostCalculatorGrossSalary");export{N as a};
2
- //# sourceMappingURL=chunk-R645TMO5.js.map
1
+ import{a as m}from"./chunk-ZE3YT3Q6.js";import{a as i}from"./chunk-ZSCKSEAA.js";import{a,b as e}from"./chunk-CDRDLO4A.js";import{b as n}from"./chunk-WVDTHFGS.js";import{b as s}from"./chunk-43WMZDDH.js";import{a as o}from"./chunk-P37U34EQ.js";import{Info as f}from"lucide-react";import{Fragment as y,jsx as r,jsxs as t}from"react/jsx-runtime";function N({grossSalary:l,currency:p,hasExtraStatutoryPayment:c=!1}){return t("div",{children:[t("div",{className:"flex justify-between items-center mb-2",children:[t("div",{className:"flex items-center gap-2",children:[r("h3",{className:"font-medium text-primary-foreground",children:"Gross Salary"}),c&&r(m,{content:t(y,{children:[r("span",{children:"This country respects extra payments on top of the gross salary."})," ",r(e,{zendeskId:a.extraPayments,children:"Learn more"})]}),children:t(n,{variant:"ghost",size:"icon",className:"h-4 w-4 p-0 mt-2",children:[r(f,{className:"h-3 w-3 text-gray-400"}),r("span",{className:"sr-only",children:"Info"})]})})]}),r("span",{className:"font-semibold text-lg",children:s(l,p)})]}),r(i,{})]})}o(N,"CostCalculatorGrossSalary");export{N as a};
2
+ //# sourceMappingURL=chunk-IJQDK7KG.js.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-NRW33IP5.js";import{b as t}from"./chunk-TOA3JILU.js";import{b as e}from"./chunk-2YTBWEC7.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as P}from"react/jsx-runtime";function S({onSubmit:l,onSuccess:d,onError:n}){let{contractorOnboardingBag:o}=t(),c=i(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 p=e(r?.fieldErrors||[],o.meta?.fields?.pricing_plan);n?.({error:r?.error,rawError:r?.rawError,fieldErrors:p})}}catch(r){n?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),m=o.stepState.values?.pricing_plan||o.initialValues.pricing_plan;return P(s,{defaultValues:m,onSubmit:c})}i(S,"PricingPlanStep");export{S as a};
2
- //# sourceMappingURL=chunk-L6FZRTSN.js.map
1
+ import{a as s}from"./chunk-M22INAKM.js";import{b as t}from"./chunk-TOA3JILU.js";import{b as e}from"./chunk-2YTBWEC7.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as P}from"react/jsx-runtime";function S({onSubmit:l,onSuccess:d,onError:n}){let{contractorOnboardingBag:o}=t(),c=i(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 p=e(r?.fieldErrors||[],o.meta?.fields?.pricing_plan);n?.({error:r?.error,rawError:r?.rawError,fieldErrors:p})}}catch(r){n?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),m=o.stepState.values?.pricing_plan||o.initialValues.pricing_plan;return P(s,{defaultValues:m,onSubmit:c})}i(S,"PricingPlanStep");export{S as a};
2
+ //# sourceMappingURL=chunk-K2I7ZL3Z.js.map
@@ -1,2 +1,2 @@
1
- import{b as d}from"./chunk-MRYRNB7Y.js";import{b as a}from"./chunk-CFIJKJXD.js";import{a as f}from"./chunk-QLNFHOLH.js";import{f as s,g as l}from"./chunk-CNDSIADP.js";import{a as n}from"./chunk-P37U34EQ.js";import{useEffect as T}from"react";import{jsx as e}from"react/jsx-runtime";function A({fields:m,onSubmit:F}){let{formId:u,terminationBag:o}=d(),c=a(o.handleValidation),i=s({resolver:c,defaultValues:o?.initialValues,shouldUnregister:!1,mode:"onBlur"});T(()=>{let y=i?.watch(r=>{Object.keys(r).some(t=>r[t]!==o?.initialValues?.[t])&&o?.checkFieldUpdates(r)});return()=>y?.unsubscribe()},[]);let p=m||(o?.fields??[]);return e(l,{...i,children:e("form",{id:u,onSubmit:i.handleSubmit(F),className:"space-y-4 RemoteFlows__TerminationForm",children:e(f,{fields:p})})})}n(A,"TerminationForm");export{A as a};
2
- //# sourceMappingURL=chunk-7Y46DL2U.js.map
1
+ import{b as d}from"./chunk-MRYRNB7Y.js";import{a as f}from"./chunk-CCL5LNHC.js";import{b as a}from"./chunk-CFIJKJXD.js";import{f as s,g as l}from"./chunk-CNDSIADP.js";import{a as n}from"./chunk-P37U34EQ.js";import{useEffect as T}from"react";import{jsx as e}from"react/jsx-runtime";function A({fields:m,onSubmit:F}){let{formId:u,terminationBag:o}=d(),c=a(o.handleValidation),i=s({resolver:c,defaultValues:o?.initialValues,shouldUnregister:!1,mode:"onBlur"});T(()=>{let y=i?.watch(r=>{Object.keys(r).some(t=>r[t]!==o?.initialValues?.[t])&&o?.checkFieldUpdates(r)});return()=>y?.unsubscribe()},[]);let p=m||(o?.fields??[]);return e(l,{...i,children:e("form",{id:u,onSubmit:i.handleSubmit(F),className:"space-y-4 RemoteFlows__TerminationForm",children:e(f,{fields:p})})})}n(A,"TerminationForm");export{A as a};
2
+ //# sourceMappingURL=chunk-LA6ZJLTB.js.map
@@ -1,2 +1,2 @@
1
- import{b as g}from"./chunk-PGWKJ6FK.js";import{d as f,e as w}from"./chunk-LRGEEPGK.js";import{a as m}from"./chunk-2YTBWEC7.js";import{b as E}from"./chunk-WVDTHFGS.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-RINDVT6U.js.map
1
+ import{b as g}from"./chunk-PGWKJ6FK.js";import{d as f,e as w}from"./chunk-AWJUS6JD.js";import{a as m}from"./chunk-2YTBWEC7.js";import{b as E}from"./chunk-WVDTHFGS.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-LAYZ6XET.js.map
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-LA6ZJLTB.js";import{b as e}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as f}from"react/jsx-runtime";function F({onSubmit:n,onSuccess:s,onError:m}){let{terminationBag:r}=e(),d=i(async a=>{let l=r?.parseFormValues(a,!0);await n?.(l);let o=await r?.onSubmit(a);o?.error?m?.(o.error):o?.data&&await s?.(o.data)},"handleSubmit");return f(t,{fields:r?.fields,onSubmit:d})}i(F,"AdditionalDetailsForm");export{F as a};
2
+ //# sourceMappingURL=chunk-LWZIOOPO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/Termination/AdditionalDetailsForm.tsx"],"sourcesContent":["import { useTerminationContext } from './context';\nimport { TerminationFormValues } from '@/src/flows/Termination/types';\nimport { OffboardingResponse } from '@/src/client';\nimport { TerminationForm } from '@/src/flows/Termination/TerminationForm';\n\ntype AdditionalDetailsFormProps = {\n /*\n * The function is called when the form is submitted. It receives the form values as an argument.\n */\n onSubmit?: (payload: TerminationFormValues) => void | Promise<void>;\n /*\n * The function is called when the form submission has failed.\n */\n onError?: (error: Error) => void;\n /*\n * The function is called when the form submission is successful. It receives the response data as\n * an argument.\n */\n onSuccess?: (data: OffboardingResponse) => void | Promise<void>;\n};\n\nexport function AdditionalDetailsForm({\n onSubmit,\n onSuccess,\n onError,\n}: AdditionalDetailsFormProps) {\n const { terminationBag } = useTerminationContext();\n\n const handleSubmit = async (values: TerminationFormValues) => {\n const parsedValues = terminationBag?.parseFormValues(\n values,\n true,\n ) as TerminationFormValues;\n await onSubmit?.(parsedValues);\n const terminationResult = await terminationBag?.onSubmit(values);\n\n if (terminationResult?.error) {\n onError?.(terminationResult.error);\n } else {\n if (terminationResult?.data) {\n await onSuccess?.(terminationResult.data as OffboardingResponse);\n }\n }\n };\n\n return (\n <TerminationForm fields={terminationBag?.fields} onSubmit={handleSubmit} />\n );\n}\n"],"mappings":"wHA8CI,cAAAA,MAAA,oBAzBG,SAASC,EAAsB,CACpC,SAAAC,EACA,UAAAC,EACA,QAAAC,CACF,EAA+B,CAC7B,GAAM,CAAE,eAAAC,CAAe,EAAIC,EAAsB,EAE3CC,EAAeC,EAAA,MAAOC,GAAkC,CAC5D,IAAMC,EAAeL,GAAgB,gBACnCI,EACA,EACF,EACA,MAAMP,IAAWQ,CAAY,EAC7B,IAAMC,EAAoB,MAAMN,GAAgB,SAASI,CAAM,EAE3DE,GAAmB,MACrBP,IAAUO,EAAkB,KAAK,EAE7BA,GAAmB,MACrB,MAAMR,IAAYQ,EAAkB,IAA2B,CAGrE,EAfqB,gBAiBrB,OACEX,EAACY,EAAA,CAAgB,OAAQP,GAAgB,OAAQ,SAAUE,EAAc,CAE7E,CA3BgBC,EAAAP,EAAA","names":["jsx","AdditionalDetailsForm","onSubmit","onSuccess","onError","terminationBag","useTerminationContext","handleSubmit","__name","values","parsedValues","terminationResult","TerminationForm"]}
@@ -1,2 +1,2 @@
1
- import{b as c}from"./chunk-TOA3JILU.js";import{b as s}from"./chunk-CFIJKJXD.js";import{a as l}from"./chunk-QLNFHOLH.js";import{f as m,g as d}from"./chunk-CNDSIADP.js";import{a as e}from"./chunk-P37U34EQ.js";import{useEffect as f}from"react";import{jsx as p}from"react/jsx-runtime";import{createElement as P}from"react";function B({defaultValues:i,onSubmit:F,components:u}){let{formId:y,contractorOnboardingBag:o}=c(),b=s(o.handleValidation),r=m({resolver:b,defaultValues:i,shouldUnregister:!1,mode:"onBlur"});f(()=>{o.employmentId&&o?.checkFieldUpdates(r.getValues())},[]),f(()=>{let n=r?.watch(t=>{Object.keys(t).some(a=>t[a]!==i[a])&&o?.checkFieldUpdates(t)});return()=>n?.unsubscribe()},[]);let g=e(async n=>{F(n)},"handleSubmit");return P(d,{...r,key:`form-${o.stepState.currentStep.name}`},p("form",{id:y,onSubmit:r.handleSubmit(g),className:"space-y-4 RemoteFlows__OnboardingForm",children:p(l,{components:u,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}e(B,"ContractorOnboardingForm");export{B as a};
2
- //# sourceMappingURL=chunk-NRW33IP5.js.map
1
+ import{b as c}from"./chunk-TOA3JILU.js";import{a as l}from"./chunk-CCL5LNHC.js";import{b as s}from"./chunk-CFIJKJXD.js";import{f as m,g as d}from"./chunk-CNDSIADP.js";import{a as e}from"./chunk-P37U34EQ.js";import{useEffect as f}from"react";import{jsx as p}from"react/jsx-runtime";import{createElement as P}from"react";function B({defaultValues:i,onSubmit:F,components:u}){let{formId:y,contractorOnboardingBag:o}=c(),b=s(o.handleValidation),r=m({resolver:b,defaultValues:i,shouldUnregister:!1,mode:"onBlur"});f(()=>{o.employmentId&&o?.checkFieldUpdates(r.getValues())},[]),f(()=>{let n=r?.watch(t=>{Object.keys(t).some(a=>t[a]!==i[a])&&o?.checkFieldUpdates(t)});return()=>n?.unsubscribe()},[]);let g=e(async n=>{F(n)},"handleSubmit");return P(d,{...r,key:`form-${o.stepState.currentStep.name}`},p("form",{id:y,onSubmit:r.handleSubmit(g),className:"space-y-4 RemoteFlows__OnboardingForm",children:p(l,{components:u,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}e(B,"ContractorOnboardingForm");export{B as a};
2
+ //# sourceMappingURL=chunk-M22INAKM.js.map
@@ -1,2 +1,2 @@
1
- import{a as p}from"./chunk-L6FZRTSN.js";import{a as i}from"./chunk-LDJT7TII.js";import{a as e}from"./chunk-LRNSFLHR.js";import{a as c}from"./chunk-FEHSJUZJ.js";import{a as d}from"./chunk-R64X3EJF.js";import{a as n}from"./chunk-5ZR7EFPY.js";import{a as f}from"./chunk-BMDZJNJV.js";import{a as m}from"./chunk-DPY77ASH.js";import{a as t}from"./chunk-TOA3JILU.js";import{a}from"./chunk-ZY5U2UNT.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-YXWBSRKS.js.map
1
+ import{a as p}from"./chunk-K2I7ZL3Z.js";import{a as i}from"./chunk-T2UJOEUA.js";import{a as e}from"./chunk-CEJ24TSW.js";import{a as c}from"./chunk-SRYUZSIK.js";import{a as d}from"./chunk-7JPHJ7SQ.js";import{a as n}from"./chunk-5ZR7EFPY.js";import{a as f}from"./chunk-E5VV7WAZ.js";import{a as m}from"./chunk-DPY77ASH.js";import{a as t}from"./chunk-TOA3JILU.js";import{a}from"./chunk-ZPBKMAKR.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-MAVVGCUM.js.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-XP7UEI56.js";import{b as n}from"./chunk-PGWKJ6FK.js";import{b as i}from"./chunk-2YTBWEC7.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-A2SWQS2N.js.map
1
+ import{a as s}from"./chunk-NW5EBNKN.js";import{b as n}from"./chunk-PGWKJ6FK.js";import{b as i}from"./chunk-2YTBWEC7.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-MB6ZGX2O.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-QLNFHOLH.js";import{b as u}from"./chunk-2YTBWEC7.js";import{f,g as p}from"./chunk-CNDSIADP.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-XP7UEI56.js.map
1
+ import{b as y}from"./chunk-PGWKJ6FK.js";import{a as F}from"./chunk-CCL5LNHC.js";import{b as c}from"./chunk-CFIJKJXD.js";import{b as u}from"./chunk-2YTBWEC7.js";import{f,g as p}from"./chunk-CNDSIADP.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-NW5EBNKN.js.map
@@ -0,0 +1,2 @@
1
+ import{a as e}from"./chunk-VDRNNOVA.js";var i={data:{version:7,schema:{additionalProperties:!1,allOf:[{if:{properties:{agrees_to_pto_amount:{const:"no"}},required:["agrees_to_pto_amount"]},then:{properties:{agrees_to_pto_amount_notes:{type:"string"}},required:["agrees_to_pto_amount_notes"]},else:{properties:{agrees_to_pto_amount_notes:!1,timesheet_file:!1}}}],properties:{timeoff_statement:{type:"null",title:"Timeoff statement","x-jsf-presentation":{inputType:"hidden",statement:{title:"Check remaining paid time off",description:"You must pay the employee for any unused accrued paid time off, so please check these records carefully.",inputType:"statement",severity:"warning"},meta:{ignoreValue:!0}}},paid_time_off_info:{type:"null",title:"Paid time off info","x-jsf-presentation":{inputType:"hidden"},meta:{ignoreValue:!0}},agrees_to_pto_amount:{description:"",oneOf:[{const:"yes",description:"",title:"Yes"},{const:"no",description:"",title:"No"}],title:"Are these paid time off records correct?",type:"string","x-jsf-presentation":{direction:"column",inputType:"radio"}},agrees_to_pto_amount_notes:{description:"Please provide details regarding any additional days taken, including specific dates, or any other inaccuracy in the time off data.",maxLength:1e3,title:"Provide time off details",type:["string","null"],"x-jsf-presentation":{inputType:"textarea"}},timesheet_file:{description:"Upload a timesheet exported from your HR software. This way we can compare and confirm the total number of Paid time off.",title:"Timesheet document",type:["string","null"],"x-jsf-presentation":{inputType:"file",accept:e.document,maxSize:20971520}}},required:["agrees_to_pto_amount"],type:"object","x-jsf-order":["timeoff_statement","paid_time_off_info","agrees_to_pto_amount","agrees_to_pto_amount_notes","timesheet_file"]}}};export{i as a};
2
+ //# sourceMappingURL=chunk-NX7MM6XR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/Termination/json-schemas/paidTimeOff.ts"],"sourcesContent":["import { FILE_TYPES, MAX_FILE_SIZE } from '@/src/lib/uploadConfig';\n\nexport const paidTimeOffSchema = {\n data: {\n version: 7,\n schema: {\n additionalProperties: false,\n allOf: [\n {\n if: {\n properties: {\n agrees_to_pto_amount: {\n const: 'no',\n },\n },\n required: ['agrees_to_pto_amount'],\n },\n then: {\n properties: {\n agrees_to_pto_amount_notes: {\n type: 'string',\n },\n },\n required: ['agrees_to_pto_amount_notes'],\n },\n else: {\n properties: {\n agrees_to_pto_amount_notes: false,\n timesheet_file: false,\n },\n },\n },\n ],\n properties: {\n timeoff_statement: {\n type: 'null',\n title: 'Timeoff statement',\n 'x-jsf-presentation': {\n inputType: 'hidden',\n statement: {\n title: 'Check remaining paid time off',\n description:\n 'You must pay the employee for any unused accrued paid time off, so please check these records carefully.',\n inputType: 'statement',\n severity: 'warning',\n },\n meta: {\n ignoreValue: true,\n },\n },\n },\n paid_time_off_info: {\n type: 'null',\n title: 'Paid time off info',\n 'x-jsf-presentation': {\n inputType: 'hidden',\n },\n meta: {\n ignoreValue: true,\n },\n },\n agrees_to_pto_amount: {\n description: '',\n oneOf: [\n {\n const: 'yes',\n description: '',\n title: 'Yes',\n },\n {\n const: 'no',\n description: '',\n title: 'No',\n },\n ],\n title: 'Are these paid time off records correct?',\n type: 'string',\n 'x-jsf-presentation': {\n direction: 'column',\n inputType: 'radio',\n },\n },\n agrees_to_pto_amount_notes: {\n description:\n 'Please provide details regarding any additional days taken, including specific dates, or any other inaccuracy in the time off data.',\n maxLength: 1000,\n title: 'Provide time off details',\n type: ['string', 'null'],\n 'x-jsf-presentation': {\n inputType: 'textarea',\n },\n },\n timesheet_file: {\n description:\n 'Upload a timesheet exported from your HR software. This way we can compare and confirm the total number of Paid time off.',\n title: 'Timesheet document',\n type: ['string', 'null'],\n 'x-jsf-presentation': {\n inputType: 'file',\n accept: FILE_TYPES.document,\n maxSize: MAX_FILE_SIZE, // maxFileSize doesn't seem to work for some reason, found that this was fixed in @remoteoss/json-schema-form v1\n },\n },\n },\n required: ['agrees_to_pto_amount'],\n type: 'object',\n 'x-jsf-order': [\n 'timeoff_statement',\n 'paid_time_off_info',\n 'agrees_to_pto_amount',\n 'agrees_to_pto_amount_notes',\n 'timesheet_file',\n ],\n },\n },\n};\n"],"mappings":"wCAEO,IAAMA,EAAoB,CAC/B,KAAM,CACJ,QAAS,EACT,OAAQ,CACN,qBAAsB,GACtB,MAAO,CACL,CACE,GAAI,CACF,WAAY,CACV,qBAAsB,CACpB,MAAO,IACT,CACF,EACA,SAAU,CAAC,sBAAsB,CACnC,EACA,KAAM,CACJ,WAAY,CACV,2BAA4B,CAC1B,KAAM,QACR,CACF,EACA,SAAU,CAAC,4BAA4B,CACzC,EACA,KAAM,CACJ,WAAY,CACV,2BAA4B,GAC5B,eAAgB,EAClB,CACF,CACF,CACF,EACA,WAAY,CACV,kBAAmB,CACjB,KAAM,OACN,MAAO,oBACP,qBAAsB,CACpB,UAAW,SACX,UAAW,CACT,MAAO,gCACP,YACE,2GACF,UAAW,YACX,SAAU,SACZ,EACA,KAAM,CACJ,YAAa,EACf,CACF,CACF,EACA,mBAAoB,CAClB,KAAM,OACN,MAAO,qBACP,qBAAsB,CACpB,UAAW,QACb,EACA,KAAM,CACJ,YAAa,EACf,CACF,EACA,qBAAsB,CACpB,YAAa,GACb,MAAO,CACL,CACE,MAAO,MACP,YAAa,GACb,MAAO,KACT,EACA,CACE,MAAO,KACP,YAAa,GACb,MAAO,IACT,CACF,EACA,MAAO,2CACP,KAAM,SACN,qBAAsB,CACpB,UAAW,SACX,UAAW,OACb,CACF,EACA,2BAA4B,CAC1B,YACE,sIACF,UAAW,IACX,MAAO,2BACP,KAAM,CAAC,SAAU,MAAM,EACvB,qBAAsB,CACpB,UAAW,UACb,CACF,EACA,eAAgB,CACd,YACE,4HACF,MAAO,qBACP,KAAM,CAAC,SAAU,MAAM,EACvB,qBAAsB,CACpB,UAAW,OACX,OAAQC,EAAW,SACnB,QAAS,QACX,CACF,CACF,EACA,SAAU,CAAC,sBAAsB,EACjC,KAAM,SACN,cAAe,CACb,oBACA,qBACA,uBACA,6BACA,gBACF,CACF,CACF,CACF","names":["paidTimeOffSchema","FILE_TYPES"]}
@@ -1,2 +1,2 @@
1
- import{a as P}from"./chunk-6IL4TB7S.js";import{a as v}from"./chunk-IWA5B4U6.js";import{a as $}from"./chunk-7VOQAVM4.js";import{a as N}from"./chunk-VM2DQCZO.js";import{a as C}from"./chunk-SLMJEZJ7.js";import{a as w}from"./chunk-E3JFQ7PH.js";import{a as x}from"./chunk-S4XU4SE7.js";import{a as k}from"./chunk-KDUM4EZJ.js";import{a as M}from"./chunk-2YTBWEC7.js";import{a as l,b as S}from"./chunk-ANQ4HVVK.js";import{a as V,b as h}from"./chunk-DZ67OJVF.js";import{a as j}from"./chunk-PJBAQZ6G.js";import{a as F}from"./chunk-Z5WMKCRJ.js";import{c as f}from"./chunk-PAQW5BFW.js";import{a as s}from"./chunk-43WMZDDH.js";import{a as n}from"./chunk-P37U34EQ.js";import{createHeadlessForm as W}from"@remoteoss/json-schema-form";import G from"lodash.omitby";import X from"lodash.isnull";import{format as Y}from"date-fns";import{useMemo as I}from"react";import ee from"lodash.omit";import{jsx as b,jsxs as U}from"react/jsx-runtime";function y(t,e,_){return{"x-jsf-presentation":{inputType:"hidden",Component:n(()=>U("div",{className:s("RemoteFlows__InformationStatement",_?.className),children:[b("h3",{className:s("RemoteFlows__InformationStatement__Title"),children:t}),b("p",{className:s("RemoteFlows__InformationStatement__Description"),children:e})]}),"Component")}}}n(y,"createInformationField");import{Fragment as oe,jsx as r,jsxs as ne}from"react/jsx-runtime";function ie(t){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,...t}}n(ie,"buildInitialValues");var be=n(({employmentId:t,options:e,initialValues:_})=>{let{fieldValues:T,setFieldValues:R,stepState:a,previousStep:D,nextStep:E}=j(x),{data:p}=k({employmentId:t}),c=ie({...a.values?.employee_communication,...a.values?.termination_details,...a.values?.paid_time_off,...a.values?.additional_information,..._}),u=I(()=>({...a.values?.[a.currentStep.name],...c,...T}),[a.values,a.currentStep.name,T,c]),O=I(()=>({fields:{risk_assesment_info:y("Offboarding risk assessment","Employees may be protected from termination if they fall into certain categories. To help avoid claims from employees, let us know if the employee is part of one or more of these categories. Select all that apply.",{className:e?.jsfModify?.fields?.risk_assesment_info?.["x-jsf-presentation"]?.className}),proposed_termination_date_info:y("Proposed termination date",ne(oe,{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.",r(S,{external:!0,zendeskId:l.terminationNoticePeriods,className:s("text-sm",e?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.zendeskTriggerButtonClassName),children:"Learn about notice periods"})]}),{className:e?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.className}),proposed_termination_date:{...e?.jsfModify?.fields?.proposed_termination_date,"x-jsf-presentation":{...e?.jsfModify?.fields?.proposed_termination_date?.["x-jsf-presentation"],minDate:Y(new Date,"yyyy-MM-dd")}},paid_time_off_info:{...e?.jsfModify?.fields?.paid_time_off_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.paid_time_off_info?.["x-jsf-presentation"],Component:n(()=>{let o=e?.jsfModify?.fields?.paid_time_off_info?.["x-jsf-presentation"]?.Component;return r(P,{employeeName:p?.basic_information?.name,proposedTerminationDate:u.proposed_termination_date,employmentId:t,employment:p,render:i=>o?r(o,{...i}):r(C,{...i})})},"Component")}},acknowledge_termination_procedure_info:{...e?.jsfModify?.fields?.acknowledge_termination_procedure_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.acknowledge_termination_procedure_info?.["x-jsf-presentation"],Component:n(()=>{let o=e?.jsfModify?.fields?.acknowledge_termination_procedure_info?.["x-jsf-presentation"]?.Component;return r(v,{render:i=>o?r(o,{...i}):r($,{...i})})},"Component")}},acknowledge_termination_procedure_fees_info:{...e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info?.["x-jsf-presentation"],Component:n(()=>{let o={involuntaryOffboardingServiceChargeZendeskId:l.involuntaryOffboardingServiceCharge,reconciliationInvoiceZendeskId:l.reconciliationInvoice},i=e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info?.["x-jsf-presentation"]?.Component;return i?r(i,{...o}):r(N,{...o})},"Component")}}}}),[e?.jsfModify?.fields?.risk_assesment_info,e?.jsfModify?.fields?.proposed_termination_date_info,e?.jsfModify?.fields?.proposed_termination_date,e?.jsfModify?.fields?.paid_time_off_info,e?.jsfModify?.fields?.acknowledge_termination_procedure_info,e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info,p,u.proposed_termination_date,t]),{data:m,isLoading:A}=h({formValues:u,jsfModify:{...e?.jsfModify,fields:{...e?.jsfModify?.fields,...O?.fields}},step:a.currentStep.name}),d=W(w.data.schema),g=V(),{mutateAsync:z}=M(g);async function J(o){if(!t)throw new Error("Employment id is missing");if(m){let i=f(o,d.fields,{isPartialValidation:!0}),{customer_informed_employee:L}=i,Z=L==="yes"?{employee_awareness:{date:i.customer_informed_employee_date,note:i.customer_informed_employee_description}}:void 0,q=F(i,["agrees_to_pto_amount","confidential","customer_informed_employee","will_challenge_termination"]),K=ee(q,"customer_informed_employee_date","customer_informed_employee_description"),Q=G({...K,...Z},X);return z({employment_id:t,termination_details:Q,type:"termination"})}}n(J,"onSubmit");function B(){D()}n(B,"back");function H(){E()}return n(H,"next"),{employmentId:t,stepState:a,fields:m?.fields||[],isLoading:A,isSubmitting:g.isPending,initialValues:c,handleValidation:n(o=>{if(m){let i=f(o,m?.fields);return m?.handleValidation(i)}return null},"handleValidation"),checkFieldUpdates:n(o=>{if(d){let i=f(o,d?.fields,{isPartialValidation:!0});R(i)}},"checkFieldUpdates"),parseFormValues:n(o=>f(o,d.fields,{isPartialValidation:!0}),"parseFormValues"),onSubmit:J,back:B,next:H}},"useTermination");export{be as a};
2
- //# sourceMappingURL=chunk-746ELT2W.js.map
1
+ import{a as P}from"./chunk-6IL4TB7S.js";import{a as $}from"./chunk-IWA5B4U6.js";import{a as b}from"./chunk-7VOQAVM4.js";import{a as v}from"./chunk-GEHM46QD.js";import{a as h}from"./chunk-ID3ZF7QT.js";import{a as x}from"./chunk-I4XJ764Y.js";import{a as j}from"./chunk-S4XU4SE7.js";import{a as V}from"./chunk-KDUM4EZJ.js";import{a as M}from"./chunk-2YTBWEC7.js";import{a as d,b as S}from"./chunk-CDRDLO4A.js";import{a as w,b as C}from"./chunk-25U3HC77.js";import{a as k}from"./chunk-PJBAQZ6G.js";import{a as g}from"./chunk-Z5WMKCRJ.js";import{c as f}from"./chunk-PAQW5BFW.js";import{a as m}from"./chunk-43WMZDDH.js";import{a as n}from"./chunk-P37U34EQ.js";import{createHeadlessForm as W}from"@remoteoss/json-schema-form";import G from"lodash.omitby";import X from"lodash.isnull";import{format as Y}from"date-fns";import{useMemo as I}from"react";import ee from"lodash.omit";import{jsx as N,jsxs as U}from"react/jsx-runtime";function u(t,e,l){return{"x-jsf-presentation":{inputType:"hidden",Component:n(()=>U("div",{className:m("RemoteFlows__InformationStatement",l?.className),children:[N("h3",{className:m("RemoteFlows__InformationStatement__Title"),children:t}),N("p",{className:m("RemoteFlows__InformationStatement__Description"),children:e})]}),"Component")}}}n(u,"createInformationField");import{Fragment as oe,jsx as r,jsxs as ne}from"react/jsx-runtime";function ie(t){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,...t}}n(ie,"buildInitialValues");var Ne=n(({employmentId:t,options:e,initialValues:l})=>{let{fieldValues:y,setFieldValues:D,stepState:a,previousStep:E,nextStep:O}=k(j),{data:_}=V({employmentId:t}),p=ie({...a.values?.employee_communication,...a.values?.termination_details,...a.values?.paid_time_off,...a.values?.additional_information,...l}),c=I(()=>({...a.values?.[a.currentStep.name],...p,...y}),[a.values,a.currentStep.name,y,p]),R=I(()=>({fields:{risk_assesment_info:u("Offboarding risk assessment","Employees may be protected from termination if they fall into certain categories. To help avoid claims from employees, let us know if the employee is part of one or more of these categories. Select all that apply.",{className:e?.jsfModify?.fields?.risk_assesment_info?.["x-jsf-presentation"]?.className}),proposed_termination_date_info:u("Proposed termination date",ne(oe,{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.",r(S,{external:!0,zendeskId:d.terminationNoticePeriods,className:m("text-sm",e?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.zendeskTriggerButtonClassName),children:"Learn about notice periods"})]}),{className:e?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.className}),proposed_termination_date:{...e?.jsfModify?.fields?.proposed_termination_date,"x-jsf-presentation":{...e?.jsfModify?.fields?.proposed_termination_date?.["x-jsf-presentation"],minDate:Y(new Date,"yyyy-MM-dd")}},paid_time_off_info:{...e?.jsfModify?.fields?.paid_time_off_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.paid_time_off_info?.["x-jsf-presentation"],Component:n(()=>{let o=e?.jsfModify?.fields?.paid_time_off_info?.["x-jsf-presentation"]?.Component;return r(P,{employeeName:_?.basic_information?.name,proposedTerminationDate:c.proposed_termination_date,employmentId:t,employment:_,render:i=>o?r(o,{...i}):r(h,{...i})})},"Component")}},acknowledge_termination_procedure_info:{...e?.jsfModify?.fields?.acknowledge_termination_procedure_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.acknowledge_termination_procedure_info?.["x-jsf-presentation"],Component:n(()=>{let o=e?.jsfModify?.fields?.acknowledge_termination_procedure_info?.["x-jsf-presentation"]?.Component;return r($,{render:i=>o?r(o,{...i}):r(b,{...i})})},"Component")}},acknowledge_termination_procedure_fees_info:{...e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info?.["x-jsf-presentation"],Component:n(()=>{let o={involuntaryOffboardingServiceChargeZendeskId:d.involuntaryOffboardingServiceCharge,reconciliationInvoiceZendeskId:d.reconciliationInvoice},i=e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info?.["x-jsf-presentation"]?.Component;return i?r(i,{...o}):r(v,{...o})},"Component")}}}}),[e?.jsfModify?.fields?.risk_assesment_info,e?.jsfModify?.fields?.proposed_termination_date_info,e?.jsfModify?.fields?.proposed_termination_date,e?.jsfModify?.fields?.paid_time_off_info,e?.jsfModify?.fields?.acknowledge_termination_procedure_info,e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info,_,c.proposed_termination_date,t]),{data:s,isLoading:A}=C({formValues:c,jsfModify:{...e?.jsfModify,fields:{...e?.jsfModify?.fields,...R?.fields}},step:a.currentStep.name}),T=W(x.data.schema),F=w(),{mutateAsync:z}=M(F);async function J(o){if(!t)throw new Error("Employment id is missing");if(s){let i=f(o,T.fields,{isPartialValidation:!0}),{customer_informed_employee:L}=i,Z=L==="yes"?{employee_awareness:{date:i.customer_informed_employee_date,note:i.customer_informed_employee_description}}:void 0,q=g(i,["agrees_to_pto_amount","confidential","customer_informed_employee","will_challenge_termination"]),K=ee(q,"customer_informed_employee_date","customer_informed_employee_description"),Q=G({...K,...Z},X);return z({employment_id:t,termination_details:Q,type:"termination"})}}n(J,"onSubmit");function B(){E()}n(B,"back");function H(){O()}return n(H,"next"),{employmentId:t,stepState:a,fields:s?.fields||[],isLoading:A,isSubmitting:F.isPending,initialValues:p,handleValidation:n(o=>{if(s){let i=f(o,s?.fields);return s?.handleValidation(i)}return null},"handleValidation"),checkFieldUpdates:D,parseFormValues:n((o,i=!1)=>i?f(o,T.fields,{isPartialValidation:!0}):s?f(o,s?.fields,{isPartialValidation:!0}):{},"parseFormValues"),onSubmit:J,back:B,next:H}},"useTermination");export{Ne as a};
2
+ //# sourceMappingURL=chunk-NZHJMUIX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/Termination/hooks.tsx","../src/components/form/jsf-utils/createFields.tsx"],"sourcesContent":["import { $TSFixMe, createHeadlessForm } from '@remoteoss/json-schema-form';\nimport omitBy from 'lodash.omitby';\nimport isNull from 'lodash.isnull';\nimport { format } from 'date-fns';\nimport { useMemo } from 'react';\nimport {\n CreateOffboardingParams,\n TerminationDetailsParams,\n} from '@/src/client';\nimport { mutationToPromise } from '@/src/lib/mutations';\nimport { parseJSFToValidate } from '@/src/components/form/utils';\nimport {\n EmployeeCommunicationFormValues,\n PaidTimeOffFormValues,\n TerminationDetailsFormValues,\n TerminationFlowProps,\n TerminationFormValues,\n} from '@/src/flows/Termination/types';\nimport omit from 'lodash.omit';\nimport { parseFormRadioValues } from '@/src/flows/utils';\nimport { useStepState } from '@/src/flows/useStepState';\nimport { STEPS } from '@/src/flows/Termination/utils';\nimport { jsonSchema } from '@/src/flows/Termination/json-schemas/jsonSchema';\nimport { useCreateTermination, useTerminationSchema } from '@/src/flows/api';\nimport { createInformationField } from '@/src/components/form/jsf-utils/createFields';\nimport { cn, ZendeskTriggerButton } from '@/src/internals';\nimport { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\nimport { PaidTimeOff } from '@/src/flows/Termination/components/PaidTimeOff/PaidTimeOff';\nimport { PaidTimeOffContainer } from '@/src/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer';\nimport { useEmploymentQuery } from '@/src/common/api';\nimport { AcknowledgeInformationContainer } from '@/src/flows/Termination/components/AcknowledgeInformation/AcknowledgeInfomationContainer';\nimport { AcknowledgeInformation } from '@/src/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformation';\nimport { AcknowledgeInformationFees } from '@/src/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees';\n\nfunction buildInitialValues(\n stepsInitialValues: Partial<TerminationFormValues>,\n): TerminationFormValues {\n const initialValues: TerminationFormValues = {\n confidential: '',\n customer_informed_employee: '',\n customer_informed_employee_date: '',\n customer_informed_employee_description: '',\n personal_email: '',\n termination_reason: undefined,\n reason_description: '',\n termination_reason_files: [],\n will_challenge_termination: '',\n will_challenge_termination_description: null,\n agrees_to_pto_amount: '',\n agrees_to_pto_amount_notes: null,\n acknowledge_termination_procedure: false,\n additional_comments: '',\n proposed_termination_date: '',\n risk_assessment_reasons: [],\n timesheet_file: undefined,\n ...stepsInitialValues,\n };\n\n return initialValues;\n}\n\ntype TerminationHookProps = Omit<TerminationFlowProps, 'render'>;\n\nexport const useTermination = ({\n employmentId,\n options,\n initialValues: terminationInitialValues,\n}: TerminationHookProps) => {\n const { fieldValues, setFieldValues, stepState, previousStep, nextStep } =\n useStepState<keyof typeof STEPS, TerminationFormValues>(STEPS);\n\n const { data: employment } = useEmploymentQuery({ employmentId });\n\n const initialValues = buildInitialValues({\n ...stepState.values?.employee_communication,\n ...stepState.values?.termination_details,\n ...stepState.values?.paid_time_off,\n ...stepState.values?.additional_information,\n ...terminationInitialValues,\n });\n\n const formValues = useMemo(\n () => ({\n ...stepState.values?.[stepState.currentStep.name as keyof typeof STEPS], // Restore values for the current step\n ...initialValues,\n ...fieldValues,\n }),\n [stepState.values, stepState.currentStep.name, fieldValues, initialValues],\n );\n\n const customFields = useMemo(() => {\n return {\n fields: {\n risk_assesment_info: createInformationField(\n 'Offboarding risk assessment',\n 'Employees may be protected from termination if they fall into certain categories. To help avoid claims from employees, let us know if the employee is part of one or more of these categories. Select all that apply.',\n {\n className: (\n options?.jsfModify?.fields?.risk_assesment_info as $TSFixMe\n )?.['x-jsf-presentation']?.className,\n },\n ),\n proposed_termination_date_info: createInformationField(\n 'Proposed termination date',\n <>\n In most cases, we must provide notice to the employee before\n termination. The required notice period depends on local labor laws,\n the employment agreement, and other factors. We'll use those factors\n to determine the required notice period.\n <ZendeskTriggerButton\n external\n zendeskId={zendeskArticles.terminationNoticePeriods}\n className={cn(\n 'text-sm',\n (\n options?.jsfModify?.fields\n ?.proposed_termination_date_info as $TSFixMe\n )?.['x-jsf-presentation']?.zendeskTriggerButtonClassName,\n )}\n >\n Learn about notice periods\n </ZendeskTriggerButton>\n </>,\n {\n className: (\n options?.jsfModify?.fields\n ?.proposed_termination_date_info as $TSFixMe\n )?.['x-jsf-presentation']?.className,\n },\n ),\n proposed_termination_date: {\n ...(options?.jsfModify?.fields\n ?.proposed_termination_date as $TSFixMe),\n 'x-jsf-presentation': {\n ...(\n options?.jsfModify?.fields?.proposed_termination_date as $TSFixMe\n )?.['x-jsf-presentation'],\n minDate: format(new Date(), 'yyyy-MM-dd'),\n },\n },\n paid_time_off_info: {\n ...(options?.jsfModify?.fields?.paid_time_off_info as $TSFixMe),\n 'x-jsf-presentation': {\n ...(options?.jsfModify?.fields?.paid_time_off_info as $TSFixMe)?.[\n 'x-jsf-presentation'\n ],\n Component: () => {\n const CustomComponent = (\n options?.jsfModify?.fields?.paid_time_off_info as $TSFixMe\n )?.['x-jsf-presentation']?.Component;\n\n return (\n <PaidTimeOffContainer\n employeeName={employment?.basic_information?.name as string}\n proposedTerminationDate={formValues.proposed_termination_date}\n employmentId={employmentId}\n employment={employment}\n render={(props) => {\n if (CustomComponent) {\n return <CustomComponent {...props} />;\n }\n return <PaidTimeOff {...props} />;\n }}\n />\n );\n },\n },\n },\n acknowledge_termination_procedure_info: {\n ...(options?.jsfModify?.fields\n ?.acknowledge_termination_procedure_info as $TSFixMe),\n 'x-jsf-presentation': {\n ...(\n options?.jsfModify?.fields\n ?.acknowledge_termination_procedure_info as $TSFixMe\n )?.['x-jsf-presentation'],\n Component: () => {\n const CustomComponent = (\n options?.jsfModify?.fields\n ?.acknowledge_termination_procedure_info as $TSFixMe\n )?.['x-jsf-presentation']?.Component;\n\n return (\n <AcknowledgeInformationContainer\n render={(props) => {\n if (CustomComponent) {\n return <CustomComponent {...props} />;\n }\n return <AcknowledgeInformation {...props} />;\n }}\n />\n );\n },\n },\n },\n acknowledge_termination_procedure_fees_info: {\n ...(options?.jsfModify?.fields\n ?.acknowledge_termination_procedure_fees_info as $TSFixMe),\n 'x-jsf-presentation': {\n ...(\n options?.jsfModify?.fields\n ?.acknowledge_termination_procedure_fees_info as $TSFixMe\n )?.['x-jsf-presentation'],\n Component: () => {\n const zendeskIds = {\n involuntaryOffboardingServiceChargeZendeskId:\n zendeskArticles.involuntaryOffboardingServiceCharge,\n reconciliationInvoiceZendeskId:\n zendeskArticles.reconciliationInvoice,\n };\n\n const CustomComponent = (\n options?.jsfModify?.fields\n ?.acknowledge_termination_procedure_fees_info as $TSFixMe\n )?.['x-jsf-presentation']?.Component;\n\n if (CustomComponent) {\n return <CustomComponent {...zendeskIds} />;\n }\n\n return <AcknowledgeInformationFees {...zendeskIds} />;\n },\n },\n },\n },\n };\n }, [\n options?.jsfModify?.fields?.risk_assesment_info,\n options?.jsfModify?.fields?.proposed_termination_date_info,\n options?.jsfModify?.fields?.proposed_termination_date,\n options?.jsfModify?.fields?.paid_time_off_info,\n options?.jsfModify?.fields?.acknowledge_termination_procedure_info,\n options?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info,\n employment,\n formValues.proposed_termination_date,\n employmentId,\n ]);\n\n const { data: terminationHeadlessForm, isLoading: isLoadingTermination } =\n useTerminationSchema({\n formValues: formValues,\n jsfModify: {\n ...options?.jsfModify,\n fields: {\n ...options?.jsfModify?.fields,\n ...customFields?.fields,\n },\n },\n step: stepState.currentStep.name,\n });\n\n const entireTerminationSchema = createHeadlessForm(jsonSchema.data.schema);\n\n const createTermination = useCreateTermination();\n const { mutateAsync } = mutationToPromise(createTermination);\n\n async function onSubmit(values: TerminationFormValues) {\n if (!employmentId) {\n throw new Error('Employment id is missing');\n }\n\n if (terminationHeadlessForm) {\n // this is a hack because I need to validate all form values with the entire schema\n const parsedValues = parseJSFToValidate(\n values,\n entireTerminationSchema.fields,\n { isPartialValidation: true },\n );\n\n const { customer_informed_employee: customerInformedEmployee } =\n parsedValues;\n\n const employeeAwareness =\n customerInformedEmployee === 'yes'\n ? {\n employee_awareness: {\n date: parsedValues.customer_informed_employee_date,\n note: parsedValues.customer_informed_employee_description,\n },\n }\n : undefined;\n\n const radioFieldKeys = [\n 'agrees_to_pto_amount',\n 'confidential',\n 'customer_informed_employee',\n 'will_challenge_termination',\n ];\n\n const parsedRadioValues = parseFormRadioValues(\n parsedValues,\n radioFieldKeys,\n );\n\n const normalizedValues = omit(\n parsedRadioValues,\n 'customer_informed_employee_date',\n 'customer_informed_employee_description',\n );\n\n const terminationDetails: TerminationDetailsParams = omitBy(\n {\n ...normalizedValues,\n ...employeeAwareness,\n },\n isNull,\n ) as unknown as TerminationDetailsParams;\n\n const terminationPayload: CreateOffboardingParams = {\n employment_id: employmentId,\n termination_details: terminationDetails,\n type: 'termination',\n };\n\n return mutateAsync(terminationPayload);\n }\n\n return;\n }\n\n function back() {\n previousStep();\n }\n\n function next() {\n nextStep();\n }\n\n return {\n /**\n * Employment id passed useful to be used between components\n */\n employmentId,\n /**\n * Current step state containing the current step and total number of steps\n */\n stepState,\n /**\n * Array of form fields from the contract amendment schema\n */\n fields: terminationHeadlessForm?.fields || [],\n /**\n * Loading state indicating if the termination schema is being fetched\n */\n isLoading: isLoadingTermination,\n /**\n * Loading state indicating if a contract amendment mutation is in progress\n */\n isSubmitting: createTermination.isPending,\n /**\n * Initial form values\n */\n initialValues: initialValues,\n /**\n * Function to validate form values against the contract amendment schema\n * @param values - Form values to validate\n * @returns Validation result or null if no schema is available\n */\n handleValidation: (values: TerminationFormValues) => {\n if (terminationHeadlessForm) {\n const parsedValues = parseJSFToValidate(\n values,\n terminationHeadlessForm?.fields,\n );\n return terminationHeadlessForm?.handleValidation(parsedValues);\n }\n return null;\n },\n /**\n * Function to update the current form field values\n * @param values - New form values to set\n */\n checkFieldUpdates: setFieldValues,\n /**\n * Function to parse form values before submission\n * @param values - Form values to parse\n * @returns Parsed form values\n */\n parseFormValues: (\n values: TerminationFormValues,\n includeAllFields: boolean = false,\n ):\n | EmployeeCommunicationFormValues\n | TerminationDetailsFormValues\n | PaidTimeOffFormValues\n | TerminationFormValues => {\n if (includeAllFields) {\n return parseJSFToValidate(values, entireTerminationSchema.fields, {\n isPartialValidation: true,\n }) as TerminationFormValues;\n }\n\n if (terminationHeadlessForm) {\n return parseJSFToValidate(values, terminationHeadlessForm?.fields, {\n isPartialValidation: true,\n }) as\n | EmployeeCommunicationFormValues\n | TerminationDetailsFormValues\n | PaidTimeOffFormValues;\n }\n return {} as $TSFixMe;\n },\n /**\n * Function to handle form submission\n * @param values - Form values to submit\n * @returns Promise resolving to the mutation result\n */\n onSubmit,\n\n /**\n * Function to handle going back to the previous step\n * @returns {void}\n */\n back,\n\n /**\n * Function to handle going to the next step\n * @returns {void}\n */\n next,\n };\n};\n","import { cn } from '@/src/lib/utils';\nimport { $TSFixMe } from '@/src/types/remoteFlows';\n\ntype JSFPresentationConfig = {\n inputType?: string;\n Component?: React.ComponentType<$TSFixMe>;\n hidden?: boolean;\n [key: string]: unknown;\n};\n\ntype JSFFieldConfig = {\n 'x-jsf-presentation'?: JSFPresentationConfig;\n [key: string]: unknown;\n};\n\n/**\n * Creates an information field with standard styling\n */\nexport function createInformationField(\n title: React.ReactNode,\n description: React.ReactNode,\n options?: {\n className?: string;\n },\n): JSFFieldConfig {\n return {\n 'x-jsf-presentation': {\n inputType: 'hidden',\n Component: () => (\n <div\n className={cn(\n 'RemoteFlows__InformationStatement',\n options?.className,\n )}\n >\n <h3 className={cn('RemoteFlows__InformationStatement__Title')}>\n {title}\n </h3>\n <p className={cn('RemoteFlows__InformationStatement__Description')}>\n {description}\n </p>\n </div>\n ),\n },\n };\n}\n"],"mappings":"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","names":["createHeadlessForm","omitBy","isNull","format","useMemo","omit","jsx","jsxs","createInformationField","title","description","options","__name","cn","Fragment","jsx","jsxs","buildInitialValues","stepsInitialValues","__name","useTermination","employmentId","options","terminationInitialValues","fieldValues","setFieldValues","stepState","previousStep","nextStep","useStepState","STEPS","employment","useEmploymentQuery","initialValues","formValues","useMemo","customFields","createInformationField","ZendeskTriggerButton","zendeskArticles","cn","format","CustomComponent","PaidTimeOffContainer","props","PaidTimeOff","AcknowledgeInformationContainer","AcknowledgeInformation","zendeskIds","AcknowledgeInformationFees","terminationHeadlessForm","isLoadingTermination","useTerminationSchema","entireTerminationSchema","createHeadlessForm","jsonSchema","createTermination","useCreateTermination","mutateAsync","mutationToPromise","onSubmit","values","parsedValues","parseJSFToValidate","customerInformedEmployee","employeeAwareness","parsedRadioValues","parseFormRadioValues","normalizedValues","omit","terminationDetails","omitBy","isNull","back","next","includeAllFields"]}
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-ZSCKSEAA.js";import{a as m}from"./chunk-ZE3YT3Q6.js";import{b as o}from"./chunk-ANQ4HVVK.js";import{b as i}from"./chunk-WVDTHFGS.js";import{b as a}from"./chunk-43WMZDDH.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-CVIWZYO3.js.map
1
+ import{a as m}from"./chunk-ZE3YT3Q6.js";import{a as l}from"./chunk-ZSCKSEAA.js";import{b as o}from"./chunk-CDRDLO4A.js";import{b as i}from"./chunk-WVDTHFGS.js";import{b as a}from"./chunk-43WMZDDH.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-PJY4TN7I.js.map
@@ -1,2 +1,2 @@
1
- import{a as R,b as x,c as N,d as A}from"./chunk-DTHBG6BD.js";import{a as T}from"./chunk-ZE3YT3Q6.js";import{a as C}from"./chunk-AFRA4BIW.js";import{a as w,b as f}from"./chunk-ANQ4HVVK.js";import{b as B}from"./chunk-WVDTHFGS.js";import{a as i,b as n,e as F}from"./chunk-43WMZDDH.js";import{a as d}from"./chunk-P37U34EQ.js";import{MoreHorizontal as G}from"lucide-react";import{useState as P}from"react";import{Fragment as U,jsx as g,jsxs as E}from"react/jsx-runtime";function L({actions:e=[],className:r,label:l,"data-testid":a}){let[_,m]=P(!1);return E("div",{className:i("relative",r),children:[g(B,{"data-testid":a,variant:"ghost","aria-label":l,className:"h-8 w-8 p-0",onClick:()=>m(!_),children:g(G,{className:"h-4 w-4"})}),_&&E(U,{children:[g("div",{className:"fixed inset-0 z-40",onClick:()=>m(!1)}),g("div",{className:"absolute right-0 top-1/2 mt-1 bg-white border border-gray-200 rounded-md shadow-lg z-50 min-w-[120px]",children:e.map((c,u)=>g("button",{"data-testid":`${a}-${c.label.toLowerCase().replace(" ","-")}`,className:i("w-full text-left px-2 py-1.5 text-sm hover:bg-gray-100",c.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>{c.onClick(),m(!1)},disabled:c.disabled,children:c.label},u))})]})]})}d(L,"ActionsDropdown");import{ChevronDown as S,Info as $}from"lucide-react";import j from"react-flagpack";import{useState as O}from"react";import{Fragment as b,jsx as o,jsxs as t}from"react/jsx-runtime";var Z={GB:"GB-UKM"},K=d(({title:e,country:r,region:l,annualGrossSalary:a,onDelete:_,onExportPdf:m,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:m},{label:"Delete",onClick:_}];return t("div",{className:"RemoteFlows__EstimationResults__Header flex justify-between",children:[t("div",{className:"flex flex-row items-center gap-6",children:[o("div",{className:"RemoteFlows__EstimationResultsHeader__FlagContainer flex h-16 w-16 items-center justify-center rounded-lg bg-[#F4F4F5]",children:o(j,{code:Z[r.alpha_2_code]||r.alpha_2_code})}),t("div",{className:"space-y-1",children:[o("h2",{"data-testid":"estimation-results-header-title",className:"RemoteFlows__EstimationResultsHeader__Title text-lg font-medium leading-none text-[#181818]",children:e}),t("p",{className:"RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]",children:[r.name," ",l?` (${l.name})`:""]}),t("p",{"data-testid":"estimation-results-header-annual-gross-salary",className:"RemoteFlows__EstimationResultsHeader__AnnualGrossSalary text-xs text-[#71717A]",children:[o("span",{className:"text-[#181818]",children:"Employee annual gross salary:"})," ",a]})]})]}),o(L,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),V=d(()=>({steps:[{id:"add-employment-details",title:"Add employment details",description:"You add employee employments details."},{id:"invite-employee",title:"Invite employee",description:"Hire receives an email invitation from Remote to start the self-enrollment process."},{id:"verify-information",title:"Verify information",description:"Remote prepares the Employment Agreement and verifies all the information."},{id:"sign-contract",title:"Sign contract",description:"All parties sign the Employment Agreement and are ready to start. \u{1F389}"}],helpText:"For customers who accept Remote's Terms of Service (ToS), the employee onboarding timeline starts once the employee has been invited to the platform and completed self enrollment.",zendeskArticleId:w.employeeOnboardingTimeline}),"getOnboardingTimelineData");function Y({minimumOnboardingDays:e,data:r,className:l}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",l),children:t(x,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4",children:t("div",{className:"flex items-center justify-between w-full",children:[o("span",{className:"RemoteFlows__OnboardingTimeline__Title text-base font-medium text-[#0F172A]",children:"Onboarding timeline"}),e!=null&&t("span",{className:"RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4",children:[e," days"]})]})}),t(A,{className:"px-0 pb-4",children:[o("ul",{className:"RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2",children:r.steps.map(a=>t("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:a.title})," ","- ",a.description]},a.id))}),t("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[r.helpText,r.zendeskArticleId&&o(f,{zendeskId:r.zendeskArticleId,children:"Learn more"})]})]})]})})}d(Y,"OnboardingTimeline");function q({className:e,countryBenefitsUrl:r,countryGuideUrl:l,country:a}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__HiringSection w-full",e),children:t(x,{value:"timeline",className:"RemoteFlows__HiringSection__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__HiringSection__AccordionTrigger hover:no-underline px-0 py-4",children:o("div",{className:"flex items-center justify-between w-full",children:t("span",{className:"text-base font-medium text-[#0F172A]",children:["Hiring in ",a.name]})})}),o(A,{children:t("div",{className:"flex flex-col gap-1",children:[l&&o("a",{href:l,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),r&&o("a",{href:r,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}d(q,"HiringSection");function J({isMultipleCurrency:e,className:r}){return t("div",{className:i("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",r),children:[o("span",{"aria-hidden":!0}),e?t(b,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):t(b,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}d(J,"EstimationHeaders");function I({label:e,amounts:r,className:l,children:a}){let[_,m]=O(!0);return t("div",{className:i("RemoteFlows__EstimationResults__Row",l),children:[t("div",{className:"RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center",children:[t("div",{className:"RemoteFlows__EstimationRow__LabelContainer flex items-center gap-2",children:[o("span",{className:i("RemoteFlows__EstimationRow__Title min-w-[140px] font-medium text-[#09090B]"),children:e}),o("button",{onClick:()=>m(!_),className:"RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded",children:o(S,{className:`h-4 w-4 text-muted-foreground transition-transform ${_?"rotate-180":""}`})})]}),Array.isArray(r)?r.map((c,u)=>o("span",{className:i("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:c},u)):t(b,{children:[o("span",{}),o("span",{className:i("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:r})]})]}),_&&a&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:a})]})}d(I,"EstimationRow");function Q({item:e,isMultipleCurrency:r,level:l=0}){let[a,_]=O(!1),m=e.children&&e.children.length>0,c=l>0,u=e.isCollapsible||m;return t("li",{className:i("RemoteFlows__BreakdownList__Item pb-3",c&&"pb-1"),children:[t("div",{className:i(r?"RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between":"RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between"),children:[t("div",{className:i("RemoteFlows__BreakdownList__LabelContainer flex items-center gap-2",c&&"pl-3"),children:[!c&&o("span",{className:"RemoteFlows__BreakdownList__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0","aria-hidden":"true"}),u?t("button",{onClick:()=>_(!a),className:"RemoteFlows__BreakdownList__CollapseButton flex items-center gap-2 hover:bg-gray-100 rounded p-1",children:[o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B]"),children:e.label}),o(S,{className:`RemoteFlows__BreakdownList__ChevronDown h-3 w-3 text-muted-foreground transition-transform ${a?"rotate-180":""}`})]}):o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B] p-1"),children:e.label}),e.tooltip&&o(T,{content:t(b,{children:[o("span",{dangerouslySetInnerHTML:{__html:F(e.tooltip)}})," ",e.zendeskId&&o(f,{zendeskId:Number(e.zendeskId),children:"Learn more"})]}),children:o("button",{className:"RemoteFlows__BreakdownList__InfoButton p-1 hover:bg-gray-100 rounded",children:o($,{className:i("RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground",c?"h-3 w-3":"h-4 w-4")})})})]}),r?t(b,{children:[o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employee-amount",className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"}),o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employer-amount",className:i("RemoteFlows__BreakdownList__EmployerAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__EmployerAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__EmployerAmountText--NotNested text-[#09090B]"),children:e.employerAmount||"\u2014"})]}):o("span",{"data-testid":e.dataSelector,className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"})]}),m&&a&&o("div",{className:"mt-1",children:o(k,{items:e.children,isMultipleCurrency:r,level:l+1})})]})}d(Q,"BreakdownListItem");function k({items:e,isMultipleCurrency:r,className:l,level:a}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",l),children:e.map((_,m)=>o(Q,{item:_,isMultipleCurrency:r,level:a},m))})}d(k,"BreakdownList");var pe=d(({estimation:e,title:r,components:l,onDelete:a,onExportPdf:_,onEdit:m})=>{let c=l?.HiringSection||q,u=l?.OnboardingTimeline||Y,z=l?.Header||K,h=l?.Footer,H=V(),p=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,v=e.employer_currency_costs.monthly_management_fee,D=e.region.code!==e.country.code,M=n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.symbol);return t(C,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(z,{title:r,annualGrossSalary:M,region:D?e.region:void 0,country:e.country,onDelete:a,onExportPdf:_,onEdit:m})}),t("div",{className:"RemoteFlows__Separator",children:[o(J,{isMultipleCurrency:p,className:"mb-3"}),o(I,{label:"Monthly total cost",amounts:p?[n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.symbol),n(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.symbol)]:n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.symbol),children:o(k,{items:[{label:"Gross monthly salary",regionalAmount:n(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_gross_salary,e.employer_currency_costs.currency.symbol),zendeskId:w.extraPayments.toString(),tooltip:"This country respects extra payments on top of the gross salary."},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.monthly_contributions_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_contributions_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.monthly_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.monthly_benefits_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_benefits_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.monthly_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Monthly fee",regionalAmount:n(e.regional_currency_costs.monthly_management_fee,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_management_fee,e.employer_currency_costs.currency.symbol),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})]}),o("div",{className:"RemoteFlows__Separator",children:o(I,{label:"Annual total cost",amounts:p?[n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.symbol),n(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.symbol)]:n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.symbol),children:o(k,{items:[{label:"Gross annual salary",dataSelector:"annual-gross-salary",regionalAmount:n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.symbol)},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_contributions_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.annual_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.annual_benefits_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_benefits_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.annual_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Extra statutory payments",regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.extra_statutory_payments_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.extra_statutory_payments_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Annual fee",regionalAmount:n(e.regional_currency_costs.annual_management_fee,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_management_fee,e.employer_currency_costs.currency.symbol),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})}),o("div",{className:"RemoteFlows__Separator",children:o(u,{minimumOnboardingDays:e.minimum_onboarding_time,data:H})}),o(c,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),h&&o(h,{})]})},"EstimationResults");export{pe as a};
2
- //# sourceMappingURL=chunk-W55MUSAS.js.map
1
+ import{a as R,b as x,c as N,d as A}from"./chunk-DTHBG6BD.js";import{a as T}from"./chunk-ZE3YT3Q6.js";import{a as C}from"./chunk-AFRA4BIW.js";import{a as w,b as f}from"./chunk-CDRDLO4A.js";import{b as B}from"./chunk-WVDTHFGS.js";import{a as i,b as n,e as F}from"./chunk-43WMZDDH.js";import{a as d}from"./chunk-P37U34EQ.js";import{MoreHorizontal as G}from"lucide-react";import{useState as P}from"react";import{Fragment as U,jsx as g,jsxs as E}from"react/jsx-runtime";function L({actions:e=[],className:r,label:l,"data-testid":a}){let[_,m]=P(!1);return E("div",{className:i("relative",r),children:[g(B,{"data-testid":a,variant:"ghost","aria-label":l,className:"h-8 w-8 p-0",onClick:()=>m(!_),children:g(G,{className:"h-4 w-4"})}),_&&E(U,{children:[g("div",{className:"fixed inset-0 z-40",onClick:()=>m(!1)}),g("div",{className:"absolute right-0 top-1/2 mt-1 bg-white border border-gray-200 rounded-md shadow-lg z-50 min-w-[120px]",children:e.map((c,u)=>g("button",{"data-testid":`${a}-${c.label.toLowerCase().replace(" ","-")}`,className:i("w-full text-left px-2 py-1.5 text-sm hover:bg-gray-100",c.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>{c.onClick(),m(!1)},disabled:c.disabled,children:c.label},u))})]})]})}d(L,"ActionsDropdown");import{ChevronDown as S,Info as $}from"lucide-react";import j from"react-flagpack";import{useState as O}from"react";import{Fragment as b,jsx as o,jsxs as t}from"react/jsx-runtime";var Z={GB:"GB-UKM"},K=d(({title:e,country:r,region:l,annualGrossSalary:a,onDelete:_,onExportPdf:m,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:m},{label:"Delete",onClick:_}];return t("div",{className:"RemoteFlows__EstimationResults__Header flex justify-between",children:[t("div",{className:"flex flex-row items-center gap-6",children:[o("div",{className:"RemoteFlows__EstimationResultsHeader__FlagContainer flex h-16 w-16 items-center justify-center rounded-lg bg-[#F4F4F5]",children:o(j,{code:Z[r.alpha_2_code]||r.alpha_2_code})}),t("div",{className:"space-y-1",children:[o("h2",{"data-testid":"estimation-results-header-title",className:"RemoteFlows__EstimationResultsHeader__Title text-lg font-medium leading-none text-[#181818]",children:e}),t("p",{className:"RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]",children:[r.name," ",l?` (${l.name})`:""]}),t("p",{"data-testid":"estimation-results-header-annual-gross-salary",className:"RemoteFlows__EstimationResultsHeader__AnnualGrossSalary text-xs text-[#71717A]",children:[o("span",{className:"text-[#181818]",children:"Employee annual gross salary:"})," ",a]})]})]}),o(L,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),V=d(()=>({steps:[{id:"add-employment-details",title:"Add employment details",description:"You add employee employments details."},{id:"invite-employee",title:"Invite employee",description:"Hire receives an email invitation from Remote to start the self-enrollment process."},{id:"verify-information",title:"Verify information",description:"Remote prepares the Employment Agreement and verifies all the information."},{id:"sign-contract",title:"Sign contract",description:"All parties sign the Employment Agreement and are ready to start. \u{1F389}"}],helpText:"For customers who accept Remote's Terms of Service (ToS), the employee onboarding timeline starts once the employee has been invited to the platform and completed self enrollment.",zendeskArticleId:w.employeeOnboardingTimeline}),"getOnboardingTimelineData");function Y({minimumOnboardingDays:e,data:r,className:l}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",l),children:t(x,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4",children:t("div",{className:"flex items-center justify-between w-full",children:[o("span",{className:"RemoteFlows__OnboardingTimeline__Title text-base font-medium text-[#0F172A]",children:"Onboarding timeline"}),e!=null&&t("span",{className:"RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4",children:[e," days"]})]})}),t(A,{className:"px-0 pb-4",children:[o("ul",{className:"RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2",children:r.steps.map(a=>t("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:a.title})," ","- ",a.description]},a.id))}),t("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[r.helpText,r.zendeskArticleId&&o(f,{zendeskId:r.zendeskArticleId,children:"Learn more"})]})]})]})})}d(Y,"OnboardingTimeline");function q({className:e,countryBenefitsUrl:r,countryGuideUrl:l,country:a}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__HiringSection w-full",e),children:t(x,{value:"timeline",className:"RemoteFlows__HiringSection__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__HiringSection__AccordionTrigger hover:no-underline px-0 py-4",children:o("div",{className:"flex items-center justify-between w-full",children:t("span",{className:"text-base font-medium text-[#0F172A]",children:["Hiring in ",a.name]})})}),o(A,{children:t("div",{className:"flex flex-col gap-1",children:[l&&o("a",{href:l,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),r&&o("a",{href:r,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}d(q,"HiringSection");function J({isMultipleCurrency:e,className:r}){return t("div",{className:i("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",r),children:[o("span",{"aria-hidden":!0}),e?t(b,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):t(b,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}d(J,"EstimationHeaders");function I({label:e,amounts:r,className:l,children:a}){let[_,m]=O(!0);return t("div",{className:i("RemoteFlows__EstimationResults__Row",l),children:[t("div",{className:"RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center",children:[t("div",{className:"RemoteFlows__EstimationRow__LabelContainer flex items-center gap-2",children:[o("span",{className:i("RemoteFlows__EstimationRow__Title min-w-[140px] font-medium text-[#09090B]"),children:e}),o("button",{onClick:()=>m(!_),className:"RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded",children:o(S,{className:`h-4 w-4 text-muted-foreground transition-transform ${_?"rotate-180":""}`})})]}),Array.isArray(r)?r.map((c,u)=>o("span",{className:i("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:c},u)):t(b,{children:[o("span",{}),o("span",{className:i("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:r})]})]}),_&&a&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:a})]})}d(I,"EstimationRow");function Q({item:e,isMultipleCurrency:r,level:l=0}){let[a,_]=O(!1),m=e.children&&e.children.length>0,c=l>0,u=e.isCollapsible||m;return t("li",{className:i("RemoteFlows__BreakdownList__Item pb-3",c&&"pb-1"),children:[t("div",{className:i(r?"RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between":"RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between"),children:[t("div",{className:i("RemoteFlows__BreakdownList__LabelContainer flex items-center gap-2",c&&"pl-3"),children:[!c&&o("span",{className:"RemoteFlows__BreakdownList__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0","aria-hidden":"true"}),u?t("button",{onClick:()=>_(!a),className:"RemoteFlows__BreakdownList__CollapseButton flex items-center gap-2 hover:bg-gray-100 rounded p-1",children:[o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B]"),children:e.label}),o(S,{className:`RemoteFlows__BreakdownList__ChevronDown h-3 w-3 text-muted-foreground transition-transform ${a?"rotate-180":""}`})]}):o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B] p-1"),children:e.label}),e.tooltip&&o(T,{content:t(b,{children:[o("span",{dangerouslySetInnerHTML:{__html:F(e.tooltip)}})," ",e.zendeskId&&o(f,{zendeskId:Number(e.zendeskId),children:"Learn more"})]}),children:o("button",{className:"RemoteFlows__BreakdownList__InfoButton p-1 hover:bg-gray-100 rounded",children:o($,{className:i("RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground",c?"h-3 w-3":"h-4 w-4")})})})]}),r?t(b,{children:[o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employee-amount",className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"}),o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employer-amount",className:i("RemoteFlows__BreakdownList__EmployerAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__EmployerAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__EmployerAmountText--NotNested text-[#09090B]"),children:e.employerAmount||"\u2014"})]}):o("span",{"data-testid":e.dataSelector,className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"})]}),m&&a&&o("div",{className:"mt-1",children:o(k,{items:e.children,isMultipleCurrency:r,level:l+1})})]})}d(Q,"BreakdownListItem");function k({items:e,isMultipleCurrency:r,className:l,level:a}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",l),children:e.map((_,m)=>o(Q,{item:_,isMultipleCurrency:r,level:a},m))})}d(k,"BreakdownList");var pe=d(({estimation:e,title:r,components:l,onDelete:a,onExportPdf:_,onEdit:m})=>{let c=l?.HiringSection||q,u=l?.OnboardingTimeline||Y,z=l?.Header||K,h=l?.Footer,H=V(),p=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,v=e.employer_currency_costs.monthly_management_fee,D=e.region.code!==e.country.code,M=n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.symbol);return t(C,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(z,{title:r,annualGrossSalary:M,region:D?e.region:void 0,country:e.country,onDelete:a,onExportPdf:_,onEdit:m})}),t("div",{className:"RemoteFlows__Separator",children:[o(J,{isMultipleCurrency:p,className:"mb-3"}),o(I,{label:"Monthly total cost",amounts:p?[n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.symbol),n(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.symbol)]:n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.symbol),children:o(k,{items:[{label:"Gross monthly salary",regionalAmount:n(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_gross_salary,e.employer_currency_costs.currency.symbol),zendeskId:w.extraPayments.toString(),tooltip:"This country respects extra payments on top of the gross salary."},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.monthly_contributions_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_contributions_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.monthly_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.monthly_benefits_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_benefits_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.monthly_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Monthly fee",regionalAmount:n(e.regional_currency_costs.monthly_management_fee,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_management_fee,e.employer_currency_costs.currency.symbol),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})]}),o("div",{className:"RemoteFlows__Separator",children:o(I,{label:"Annual total cost",amounts:p?[n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.symbol),n(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.symbol)]:n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.symbol),children:o(k,{items:[{label:"Gross annual salary",dataSelector:"annual-gross-salary",regionalAmount:n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.symbol)},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_contributions_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.annual_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.annual_benefits_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_benefits_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.annual_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Extra statutory payments",regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.extra_statutory_payments_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.extra_statutory_payments_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Annual fee",regionalAmount:n(e.regional_currency_costs.annual_management_fee,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_management_fee,e.employer_currency_costs.currency.symbol),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})}),o("div",{className:"RemoteFlows__Separator",children:o(u,{minimumOnboardingDays:e.minimum_onboarding_time,data:H})}),o(c,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),h&&o(h,{})]})},"EstimationResults");export{pe as a};
2
+ //# sourceMappingURL=chunk-PXX2JSFI.js.map
@@ -1,2 +1,2 @@
1
- import{a as S}from"./chunk-5KHLOGTR.js";import{a as f}from"./chunk-TUFTB5UD.js";import{a as p}from"./chunk-AYLYOLVG.js";import{a as s}from"./chunk-A2SWQS2N.js";import{a as m}from"./chunk-ZQ6MG635.js";import{a}from"./chunk-RINDVT6U.js";import{a as i}from"./chunk-OIN3HGOQ.js";import{a as c}from"./chunk-Z7WBY27D.js";import{a as n}from"./chunk-SB3IYODL.js";import{a as e}from"./chunk-L3C4AHZJ.js";import{a as r}from"./chunk-PGWKJ6FK.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-GD5556B2.js.map
1
+ import{a as m}from"./chunk-ZQ6MG635.js";import{a}from"./chunk-LAYZ6XET.js";import{a as i}from"./chunk-OIN3HGOQ.js";import{a as c}from"./chunk-Z7WBY27D.js";import{a as S}from"./chunk-5KHLOGTR.js";import{a as f}from"./chunk-UYHBV7QJ.js";import{a as n}from"./chunk-GWJZTMF4.js";import{a as p}from"./chunk-S3KOROEZ.js";import{a as s}from"./chunk-MB6ZGX2O.js";import{a as r}from"./chunk-PGWKJ6FK.js";import{a as e}from"./chunk-UXVCNSHK.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-QFK2SD24.js.map
@@ -0,0 +1,2 @@
1
+ import{a}from"./chunk-LA6ZJLTB.js";import{b as m}from"./chunk-MRYRNB7Y.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as n}from"react/jsx-runtime";function u({onSubmit:r}){let{terminationBag:i}=m();return n(a,{onSubmit:o(async e=>{await r?.(i?.parseFormValues(e)),i?.next()},"handleSubmit")})}o(u,"PaidTimeOffForm");export{u as a};
2
+ //# sourceMappingURL=chunk-QM7J43SC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/Termination/PaidTimeOffForm.tsx"],"sourcesContent":["import { useTerminationContext } from './context';\nimport {\n PaidTimeOffFormValues,\n TerminationFormValues,\n} from '@/src/flows/Termination/types';\nimport { TerminationForm } from '@/src/flows/Termination/TerminationForm';\n\ntype PaidTimeOffFormProps = {\n /*\n * The function is called when the form is submitted. It receives the form values as an argument.\n */\n onSubmit?: (payload: PaidTimeOffFormValues) => void | Promise<void>;\n};\n\nexport function PaidTimeOffForm({ onSubmit }: PaidTimeOffFormProps) {\n const { terminationBag } = useTerminationContext();\n const handleSubmit = async (values: TerminationFormValues) => {\n await onSubmit?.(\n terminationBag?.parseFormValues(values) as PaidTimeOffFormValues,\n );\n terminationBag?.next();\n };\n\n return <TerminationForm onSubmit={handleSubmit} />;\n}\n"],"mappings":"mHAuBS,cAAAA,MAAA,oBATF,SAASC,EAAgB,CAAE,SAAAC,CAAS,EAAyB,CAClE,GAAM,CAAE,eAAAC,CAAe,EAAIC,EAAsB,EAQjD,OAAOJ,EAACK,EAAA,CAAgB,SAPHC,EAAA,MAAOC,GAAkC,CAC5D,MAAML,IACJC,GAAgB,gBAAgBI,CAAM,CACxC,EACAJ,GAAgB,KAAK,CACvB,EALqB,gBAO2B,CAClD,CAVgBG,EAAAL,EAAA","names":["jsx","PaidTimeOffForm","onSubmit","terminationBag","useTerminationContext","TerminationForm","__name","values"]}
@@ -1,2 +1,2 @@
1
- import{a as l}from"./chunk-ZSCKSEAA.js";import{a as m}from"./chunk-ZE3YT3Q6.js";import{b as o}from"./chunk-ANQ4HVVK.js";import{b as i}from"./chunk-WVDTHFGS.js";import{b as r}from"./chunk-43WMZDDH.js";import{a as n}from"./chunk-P37U34EQ.js";import{Info as p}from"lucide-react";import{Fragment as f,jsx as t,jsxs as e}from"react/jsx-runtime";function B({extraStatutoryPaymentsTotal:d,extraStatutoryPaymentsBreakdown:u,currency:s}){return e("div",{children:[e("div",{className:"flex justify-between items-center mb-2",children:[t("h3",{className:"font-medium text-primary-foreground-800",children:"Extra Statutory Payments"}),t("span",{className:"font-semibold text-lg",children:r(d,s)})]}),t(l,{className:"mb-3"}),t("div",{className:"space-y-3 pl-2",children:u.map((a,c)=>e("div",{className:"flex justify-between items-start text-sm",children:[e("div",{className:"flex items-start gap-2",children:[t("span",{children:a.name}),a.description&&t(m,{content:e(f,{children:[t("span",{children:a.description})," ",a.zendesk_article_url&&t(o,{zendeskId:Number(a.zendesk_article_id),children:"Learn more"})]}),children:e(i,{variant:"ghost",size:"icon",className:"h-4 w-4 p-0",children:[t(p,{className:"h-3 w-3 text-gray-400"}),t("span",{className:"sr-only",children:"Info"})]})})]}),t("span",{children:r(a.amount,s)})]},c))})]})}n(B,"CostCalculatorExtraStatutoryPaymentsBreakdown");export{B as a};
2
- //# sourceMappingURL=chunk-5NPET4ZO.js.map
1
+ import{a as m}from"./chunk-ZE3YT3Q6.js";import{a as l}from"./chunk-ZSCKSEAA.js";import{b as o}from"./chunk-CDRDLO4A.js";import{b as i}from"./chunk-WVDTHFGS.js";import{b as r}from"./chunk-43WMZDDH.js";import{a as n}from"./chunk-P37U34EQ.js";import{Info as p}from"lucide-react";import{Fragment as f,jsx as t,jsxs as e}from"react/jsx-runtime";function B({extraStatutoryPaymentsTotal:d,extraStatutoryPaymentsBreakdown:u,currency:s}){return e("div",{children:[e("div",{className:"flex justify-between items-center mb-2",children:[t("h3",{className:"font-medium text-primary-foreground-800",children:"Extra Statutory Payments"}),t("span",{className:"font-semibold text-lg",children:r(d,s)})]}),t(l,{className:"mb-3"}),t("div",{className:"space-y-3 pl-2",children:u.map((a,c)=>e("div",{className:"flex justify-between items-start text-sm",children:[e("div",{className:"flex items-start gap-2",children:[t("span",{children:a.name}),a.description&&t(m,{content:e(f,{children:[t("span",{children:a.description})," ",a.zendesk_article_url&&t(o,{zendeskId:Number(a.zendesk_article_id),children:"Learn more"})]}),children:e(i,{variant:"ghost",size:"icon",className:"h-4 w-4 p-0",children:[t(p,{className:"h-3 w-3 text-gray-400"}),t("span",{className:"sr-only",children:"Info"})]})})]}),t("span",{children:r(a.amount,s)})]},c))})]})}n(B,"CostCalculatorExtraStatutoryPaymentsBreakdown");export{B as a};
2
+ //# sourceMappingURL=chunk-QU4ZTSMT.js.map
@@ -1,2 +1,2 @@
1
- var e={data:{version:7,schema:{additionalProperties:!1,allOf:[{if:{properties:{personal_email:{pattern:"^[a-zA-Z0-9 .]+$"}}},then:{properties:{personal_email:{"x-jsf-presentation":{statement:{title:"Please make sure to add the employee personal email so we can get in contact with the employee after the termination process takes effect.",inputType:"statement",severity:"warning"}}}}}},{if:{properties:{customer_informed_employee:{const:"yes"}},required:["customer_informed_employee"]},then:{properties:{customer_informed_employee_date:{type:"string"},customer_informed_employee_description:{type:"string"}},required:["customer_informed_employee_date","customer_informed_employee_description"]},else:{properties:{customer_informed_employee_date:!1,customer_informed_employee_description:!1}}}],properties:{confidential:{description:"Confidential requests are visible only to you. Non-confidential requests are visible to all admins in your company.",oneOf:[{const:"yes",description:"",title:"Yes"},{const:"no",description:"",title:"No"}],title:"Is this request confidential?",type:"string","x-jsf-presentation":{direction:"column",inputType:"radio",statement:{title:"Please do not inform the employee of their termination until we review your request for legal risks.",description:"When we approve your request, you can inform the employee and we'll take it from there.",inputType:"statement",severity:"warning"}}},customer_informed_employee:{description:"",oneOf:[{const:"yes",description:"",title:"Yes"},{const:"no",description:"",title:"No"}],title:"Have you informed the employee of the termination?",type:"string","x-jsf-presentation":{direction:"column",inputType:"radio"}},customer_informed_employee_date:{description:"",format:"date",maxLength:255,title:"When the employee was told about the termination",type:["string","null"],"x-jsf-presentation":{inputType:"date"}},customer_informed_employee_description:{description:"",maxLength:1e3,title:"How did you share this information?",type:["string","null"],"x-jsf-presentation":{inputType:"textarea"}},personal_email:{description:"We\u2019ll use this for post-termination communication.",maxLength:255,title:"Employee's personal email",format:"email",type:"string","x-jsf-presentation":{inputType:"email"}}},required:["confidential","customer_informed_employee","personal_email"],type:"object","x-jsf-order":["is_confidential","customer_informed_employee","customer_informed_employee_date","customer_informed_employee_description","personal_email"]}}};export{e as a};
2
- //# sourceMappingURL=chunk-N6G4VZXF.js.map
1
+ var e={data:{version:7,schema:{additionalProperties:!1,allOf:[{if:{properties:{personal_email:{pattern:"^[a-zA-Z0-9 .]+$"}}},then:{properties:{personal_email:{"x-jsf-presentation":{statement:{title:"Please make sure to add the employee personal email so we can get in contact with the employee after the termination process takes effect.",inputType:"statement",severity:"warning"}}}}}},{if:{properties:{customer_informed_employee:{const:"yes"}},required:["customer_informed_employee"]},then:{properties:{customer_informed_employee_date:{type:"string"},customer_informed_employee_description:{type:"string"}},required:["customer_informed_employee_date","customer_informed_employee_description"]},else:{properties:{customer_informed_employee_date:!1,customer_informed_employee_description:!1}}}],properties:{confidential:{description:"Confidential requests are visible only to you. Non-confidential requests are visible to all admins in your company.",oneOf:[{const:"yes",description:"",title:"Yes"},{const:"no",description:"",title:"No"}],title:"Is this request confidential?",type:"string","x-jsf-presentation":{direction:"column",inputType:"radio",statement:{title:"Please do not inform the employee of their termination until we review your request for legal risks.",description:"When we approve your request, you can inform the employee and we'll take it from there.",inputType:"statement",severity:"warning"}}},customer_informed_employee:{description:"",oneOf:[{const:"yes",description:"",title:"Yes"},{const:"no",description:"",title:"No"}],title:"Have you informed the employee of the termination?",type:"string","x-jsf-presentation":{direction:"column",inputType:"radio"}},customer_informed_employee_date:{description:"",format:"date",maxLength:255,title:"When the employee was told about the termination",type:["string","null"],"x-jsf-presentation":{inputType:"date"}},customer_informed_employee_description:{description:"Please be as specific as you can. Include details about the employee\u2019s response, if applicable.",maxLength:1e3,title:"How did you share this information?",type:["string","null"],"x-jsf-presentation":{inputType:"textarea"}},personal_email:{description:"We\u2019ll use this for post-termination communication.",maxLength:255,title:"Employee's personal email",format:"email",type:"string","x-jsf-presentation":{inputType:"email"}}},required:["confidential","customer_informed_employee","personal_email"],type:"object","x-jsf-order":["is_confidential","customer_informed_employee","customer_informed_employee_date","customer_informed_employee_description","personal_email"]}}};export{e as a};
2
+ //# sourceMappingURL=chunk-RR55GUDT.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/flows/Termination/json-schemas/employeeComunication.ts"],"sourcesContent":["export const employeeComunicationSchema = {\n data: {\n version: 7,\n schema: {\n additionalProperties: false,\n allOf: [\n {\n if: {\n properties: {\n personal_email: {\n pattern: '^[a-zA-Z0-9 .]+$',\n },\n },\n },\n then: {\n properties: {\n personal_email: {\n 'x-jsf-presentation': {\n statement: {\n title:\n 'Please make sure to add the employee personal email so we can get in contact with the employee after the termination process takes effect.',\n inputType: 'statement',\n severity: 'warning',\n },\n },\n },\n },\n },\n },\n {\n if: {\n properties: {\n customer_informed_employee: {\n const: 'yes',\n },\n },\n required: ['customer_informed_employee'],\n },\n then: {\n properties: {\n customer_informed_employee_date: {\n type: 'string',\n },\n customer_informed_employee_description: {\n type: 'string',\n },\n },\n required: [\n 'customer_informed_employee_date',\n 'customer_informed_employee_description',\n ],\n },\n else: {\n properties: {\n customer_informed_employee_date: false,\n customer_informed_employee_description: false,\n },\n },\n },\n ],\n properties: {\n confidential: {\n description:\n 'Confidential requests are visible only to you. Non-confidential requests are visible to all admins in your company.',\n oneOf: [\n {\n const: 'yes',\n description: '',\n title: 'Yes',\n },\n {\n const: 'no',\n description: '',\n title: 'No',\n },\n ],\n title: 'Is this request confidential?',\n type: 'string',\n 'x-jsf-presentation': {\n direction: 'column',\n inputType: 'radio',\n statement: {\n title:\n 'Please do not inform the employee of their termination until we review your request for legal risks.',\n description:\n \"When we approve your request, you can inform the employee and we'll take it from there.\",\n inputType: 'statement',\n severity: 'warning',\n },\n },\n },\n customer_informed_employee: {\n description: '',\n oneOf: [\n {\n const: 'yes',\n description: '',\n title: 'Yes',\n },\n {\n const: 'no',\n description: '',\n title: 'No',\n },\n ],\n title: 'Have you informed the employee of the termination?',\n type: 'string',\n 'x-jsf-presentation': {\n direction: 'column',\n inputType: 'radio',\n },\n },\n customer_informed_employee_date: {\n description: '',\n format: 'date',\n maxLength: 255,\n title: 'When the employee was told about the termination',\n type: ['string', 'null'],\n 'x-jsf-presentation': {\n inputType: 'date',\n },\n },\n customer_informed_employee_description: {\n description: '',\n maxLength: 1000,\n title: 'How did you share this information?',\n type: ['string', 'null'],\n 'x-jsf-presentation': {\n inputType: 'textarea',\n },\n },\n personal_email: {\n description: 'We’ll use this for post-termination communication.',\n maxLength: 255,\n title: \"Employee's personal email\",\n format: 'email',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'email',\n },\n },\n },\n required: [\n 'confidential',\n 'customer_informed_employee',\n 'personal_email',\n ],\n type: 'object',\n 'x-jsf-order': [\n 'is_confidential',\n 'customer_informed_employee',\n 'customer_informed_employee_date',\n 'customer_informed_employee_description',\n 'personal_email',\n ],\n },\n },\n};\n"],"mappings":"AAAO,IAAMA,EAA6B,CACxC,KAAM,CACJ,QAAS,EACT,OAAQ,CACN,qBAAsB,GACtB,MAAO,CACL,CACE,GAAI,CACF,WAAY,CACV,eAAgB,CACd,QAAS,kBACX,CACF,CACF,EACA,KAAM,CACJ,WAAY,CACV,eAAgB,CACd,qBAAsB,CACpB,UAAW,CACT,MACE,6IACF,UAAW,YACX,SAAU,SACZ,CACF,CACF,CACF,CACF,CACF,EACA,CACE,GAAI,CACF,WAAY,CACV,2BAA4B,CAC1B,MAAO,KACT,CACF,EACA,SAAU,CAAC,4BAA4B,CACzC,EACA,KAAM,CACJ,WAAY,CACV,gCAAiC,CAC/B,KAAM,QACR,EACA,uCAAwC,CACtC,KAAM,QACR,CACF,EACA,SAAU,CACR,kCACA,wCACF,CACF,EACA,KAAM,CACJ,WAAY,CACV,gCAAiC,GACjC,uCAAwC,EAC1C,CACF,CACF,CACF,EACA,WAAY,CACV,aAAc,CACZ,YACE,sHACF,MAAO,CACL,CACE,MAAO,MACP,YAAa,GACb,MAAO,KACT,EACA,CACE,MAAO,KACP,YAAa,GACb,MAAO,IACT,CACF,EACA,MAAO,gCACP,KAAM,SACN,qBAAsB,CACpB,UAAW,SACX,UAAW,QACX,UAAW,CACT,MACE,uGACF,YACE,0FACF,UAAW,YACX,SAAU,SACZ,CACF,CACF,EACA,2BAA4B,CAC1B,YAAa,GACb,MAAO,CACL,CACE,MAAO,MACP,YAAa,GACb,MAAO,KACT,EACA,CACE,MAAO,KACP,YAAa,GACb,MAAO,IACT,CACF,EACA,MAAO,qDACP,KAAM,SACN,qBAAsB,CACpB,UAAW,SACX,UAAW,OACb,CACF,EACA,gCAAiC,CAC/B,YAAa,GACb,OAAQ,OACR,UAAW,IACX,MAAO,mDACP,KAAM,CAAC,SAAU,MAAM,EACvB,qBAAsB,CACpB,UAAW,MACb,CACF,EACA,uCAAwC,CACtC,YAAa,GACb,UAAW,IACX,MAAO,sCACP,KAAM,CAAC,SAAU,MAAM,EACvB,qBAAsB,CACpB,UAAW,UACb,CACF,EACA,eAAgB,CACd,YAAa,0DACb,UAAW,IACX,MAAO,4BACP,OAAQ,QACR,KAAM,SACN,qBAAsB,CACpB,UAAW,OACb,CACF,CACF,EACA,SAAU,CACR,eACA,6BACA,gBACF,EACA,KAAM,SACN,cAAe,CACb,kBACA,6BACA,kCACA,yCACA,gBACF,CACF,CACF,CACF","names":["employeeComunicationSchema"]}
1
+ {"version":3,"sources":["../src/flows/Termination/json-schemas/employeeComunication.ts"],"sourcesContent":["export const employeeComunicationSchema = {\n data: {\n version: 7,\n schema: {\n additionalProperties: false,\n allOf: [\n {\n if: {\n properties: {\n personal_email: {\n pattern: '^[a-zA-Z0-9 .]+$',\n },\n },\n },\n then: {\n properties: {\n personal_email: {\n 'x-jsf-presentation': {\n statement: {\n title:\n 'Please make sure to add the employee personal email so we can get in contact with the employee after the termination process takes effect.',\n inputType: 'statement',\n severity: 'warning',\n },\n },\n },\n },\n },\n },\n {\n if: {\n properties: {\n customer_informed_employee: {\n const: 'yes',\n },\n },\n required: ['customer_informed_employee'],\n },\n then: {\n properties: {\n customer_informed_employee_date: {\n type: 'string',\n },\n customer_informed_employee_description: {\n type: 'string',\n },\n },\n required: [\n 'customer_informed_employee_date',\n 'customer_informed_employee_description',\n ],\n },\n else: {\n properties: {\n customer_informed_employee_date: false,\n customer_informed_employee_description: false,\n },\n },\n },\n ],\n properties: {\n confidential: {\n description:\n 'Confidential requests are visible only to you. Non-confidential requests are visible to all admins in your company.',\n oneOf: [\n {\n const: 'yes',\n description: '',\n title: 'Yes',\n },\n {\n const: 'no',\n description: '',\n title: 'No',\n },\n ],\n title: 'Is this request confidential?',\n type: 'string',\n 'x-jsf-presentation': {\n direction: 'column',\n inputType: 'radio',\n statement: {\n title:\n 'Please do not inform the employee of their termination until we review your request for legal risks.',\n description:\n \"When we approve your request, you can inform the employee and we'll take it from there.\",\n inputType: 'statement',\n severity: 'warning',\n },\n },\n },\n customer_informed_employee: {\n description: '',\n oneOf: [\n {\n const: 'yes',\n description: '',\n title: 'Yes',\n },\n {\n const: 'no',\n description: '',\n title: 'No',\n },\n ],\n title: 'Have you informed the employee of the termination?',\n type: 'string',\n 'x-jsf-presentation': {\n direction: 'column',\n inputType: 'radio',\n },\n },\n customer_informed_employee_date: {\n description: '',\n format: 'date',\n maxLength: 255,\n title: 'When the employee was told about the termination',\n type: ['string', 'null'],\n 'x-jsf-presentation': {\n inputType: 'date',\n },\n },\n customer_informed_employee_description: {\n description:\n 'Please be as specific as you can. Include details about the employee’s response, if applicable.',\n maxLength: 1000,\n title: 'How did you share this information?',\n type: ['string', 'null'],\n 'x-jsf-presentation': {\n inputType: 'textarea',\n },\n },\n personal_email: {\n description: 'We’ll use this for post-termination communication.',\n maxLength: 255,\n title: \"Employee's personal email\",\n format: 'email',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'email',\n },\n },\n },\n required: [\n 'confidential',\n 'customer_informed_employee',\n 'personal_email',\n ],\n type: 'object',\n 'x-jsf-order': [\n 'is_confidential',\n 'customer_informed_employee',\n 'customer_informed_employee_date',\n 'customer_informed_employee_description',\n 'personal_email',\n ],\n },\n },\n};\n"],"mappings":"AAAO,IAAMA,EAA6B,CACxC,KAAM,CACJ,QAAS,EACT,OAAQ,CACN,qBAAsB,GACtB,MAAO,CACL,CACE,GAAI,CACF,WAAY,CACV,eAAgB,CACd,QAAS,kBACX,CACF,CACF,EACA,KAAM,CACJ,WAAY,CACV,eAAgB,CACd,qBAAsB,CACpB,UAAW,CACT,MACE,6IACF,UAAW,YACX,SAAU,SACZ,CACF,CACF,CACF,CACF,CACF,EACA,CACE,GAAI,CACF,WAAY,CACV,2BAA4B,CAC1B,MAAO,KACT,CACF,EACA,SAAU,CAAC,4BAA4B,CACzC,EACA,KAAM,CACJ,WAAY,CACV,gCAAiC,CAC/B,KAAM,QACR,EACA,uCAAwC,CACtC,KAAM,QACR,CACF,EACA,SAAU,CACR,kCACA,wCACF,CACF,EACA,KAAM,CACJ,WAAY,CACV,gCAAiC,GACjC,uCAAwC,EAC1C,CACF,CACF,CACF,EACA,WAAY,CACV,aAAc,CACZ,YACE,sHACF,MAAO,CACL,CACE,MAAO,MACP,YAAa,GACb,MAAO,KACT,EACA,CACE,MAAO,KACP,YAAa,GACb,MAAO,IACT,CACF,EACA,MAAO,gCACP,KAAM,SACN,qBAAsB,CACpB,UAAW,SACX,UAAW,QACX,UAAW,CACT,MACE,uGACF,YACE,0FACF,UAAW,YACX,SAAU,SACZ,CACF,CACF,EACA,2BAA4B,CAC1B,YAAa,GACb,MAAO,CACL,CACE,MAAO,MACP,YAAa,GACb,MAAO,KACT,EACA,CACE,MAAO,KACP,YAAa,GACb,MAAO,IACT,CACF,EACA,MAAO,qDACP,KAAM,SACN,qBAAsB,CACpB,UAAW,SACX,UAAW,OACb,CACF,EACA,gCAAiC,CAC/B,YAAa,GACb,OAAQ,OACR,UAAW,IACX,MAAO,mDACP,KAAM,CAAC,SAAU,MAAM,EACvB,qBAAsB,CACpB,UAAW,MACb,CACF,EACA,uCAAwC,CACtC,YACE,uGACF,UAAW,IACX,MAAO,sCACP,KAAM,CAAC,SAAU,MAAM,EACvB,qBAAsB,CACpB,UAAW,UACb,CACF,EACA,eAAgB,CACd,YAAa,0DACb,UAAW,IACX,MAAO,4BACP,OAAQ,QACR,KAAM,SACN,qBAAsB,CACpB,UAAW,OACb,CACF,CACF,EACA,SAAU,CACR,eACA,6BACA,gBACF,EACA,KAAM,SACN,cAAe,CACb,kBACA,6BACA,kCACA,yCACA,gBACF,CACF,CACF,CACF","names":["employeeComunicationSchema"]}
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-XP7UEI56.js";import{b as a}from"./chunk-PGWKJ6FK.js";import{b as t}from"./chunk-2YTBWEC7.js";import{d as s}from"./chunk-PAQW5BFW.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function P({components:d,onSubmit:l,onError:i,onSuccess:f}){let{onboardingBag:o}=a(),p=o.fields??[],c=s(p,o.initialValues.benefits);return E(m,{defaultValues:c,components:d,onSubmit:e(async n=>{try{await l?.(n);let r=await o.onSubmit(n);if(r?.data){await f?.(r.data),o?.next();return}if(r?.error){let u=t(r?.fieldErrors||[],o.meta?.fields?.benefits);i?.({error:r.error,rawError:r.rawError,fieldErrors:u})}}catch(r){i?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit")})}e(P,"BenefitsStep");export{P as a};
2
- //# sourceMappingURL=chunk-AYLYOLVG.js.map
1
+ import{a as m}from"./chunk-NW5EBNKN.js";import{b as a}from"./chunk-PGWKJ6FK.js";import{b as t}from"./chunk-2YTBWEC7.js";import{d as s}from"./chunk-PAQW5BFW.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function P({components:d,onSubmit:l,onError:i,onSuccess:f}){let{onboardingBag:o}=a(),p=o.fields??[],c=s(p,o.initialValues.benefits);return E(m,{defaultValues:c,components:d,onSubmit:e(async n=>{try{await l?.(n);let r=await o.onSubmit(n);if(r?.data){await f?.(r.data),o?.next();return}if(r?.error){let u=t(r?.fieldErrors||[],o.meta?.fields?.benefits);i?.({error:r.error,rawError:r.rawError,fieldErrors:u})}}catch(r){i?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit")})}e(P,"BenefitsStep");export{P as a};
2
+ //# sourceMappingURL=chunk-S3KOROEZ.js.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-NRW33IP5.js";import{b as i}from"./chunk-TOA3JILU.js";import{b as n}from"./chunk-2YTBWEC7.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as u}from"react/jsx-runtime";function F({onSubmit:d,onSuccess:l,onError:a}){let{contractorOnboardingBag:o}=i(),c=t(async e=>{try{await d?.(o.parseFormValues(e));let r=await o.onSubmit(e);if(r?.data){await l?.(r?.data),o?.next();return}if(r?.error){let p=n(r?.fieldErrors||[],o.meta?.fields?.contract_details);a?.({error:r?.error,rawError:r?.rawError,fieldErrors:p})}}catch(r){a?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),m=o.stepState.values?.contract_details||o.initialValues.contract_details;return u(s,{defaultValues:m,onSubmit:c})}t(F,"ContractDetailsStep");export{F as a};
2
- //# sourceMappingURL=chunk-FEHSJUZJ.js.map
1
+ import{a as s}from"./chunk-M22INAKM.js";import{b as i}from"./chunk-TOA3JILU.js";import{b as n}from"./chunk-2YTBWEC7.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as u}from"react/jsx-runtime";function F({onSubmit:d,onSuccess:l,onError:a}){let{contractorOnboardingBag:o}=i(),c=t(async e=>{try{await d?.(o.parseFormValues(e));let r=await o.onSubmit(e);if(r?.data){await l?.(r?.data),o?.next();return}if(r?.error){let p=n(r?.fieldErrors||[],o.meta?.fields?.contract_details);a?.({error:r?.error,rawError:r?.rawError,fieldErrors:p})}}catch(r){a?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),m=o.stepState.values?.contract_details||o.initialValues.contract_details;return u(s,{defaultValues:m,onSubmit:c})}t(F,"ContractDetailsStep");export{F as a};
2
+ //# sourceMappingURL=chunk-SRYUZSIK.js.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-NRW33IP5.js";import{b as a}from"./chunk-TOA3JILU.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function y({onSubmit:c,onSuccess:s,onError:e}){let{contractorOnboardingBag:o}=a(),u=t(async n=>{try{await c?.({countryCode:n.country});let r=await o.onSubmit(n);if(r?.data){await s?.(r?.data),o?.next();return}r?.error&&e?.({error:r.error,rawError:r.rawError,fieldErrors:[]})}catch(r){e?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),l=o.stepState.values?.select_country||o.initialValues.select_country;return d(i,{defaultValues:l,onSubmit:u})}t(y,"SelectCountryStep");export{y as a};
2
- //# sourceMappingURL=chunk-LDJT7TII.js.map
1
+ import{a as i}from"./chunk-M22INAKM.js";import{b as a}from"./chunk-TOA3JILU.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function y({onSubmit:c,onSuccess:s,onError:e}){let{contractorOnboardingBag:o}=a(),u=t(async n=>{try{await c?.({countryCode:n.country});let r=await o.onSubmit(n);if(r?.data){await s?.(r?.data),o?.next();return}r?.error&&e?.({error:r.error,rawError:r.rawError,fieldErrors:[]})}catch(r){e?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),l=o.stepState.values?.select_country||o.initialValues.select_country;return d(i,{defaultValues:l,onSubmit:u})}t(y,"SelectCountryStep");export{y as a};
2
+ //# sourceMappingURL=chunk-T2UJOEUA.js.map