@remoteoss/remote-flows 1.48.0 → 1.49.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (516) hide show
  1. package/dist/CheckboxFieldDefault-JXNMWIRK.js +2 -0
  2. package/dist/CountryFieldDefault-SO4WS7KE.js +2 -0
  3. package/dist/DatePickerFieldDefault-AZHJN2U6.js +2 -0
  4. package/dist/FileUploadFieldDefault-K6PF6RP7.js +2 -0
  5. package/dist/ForcedValueFieldDefault-BEOC4MYU.js +2 -0
  6. package/dist/MultiSelectFieldDefault-QKXVTGF2.js +2 -0
  7. package/dist/RadioGroupFieldDefault-ZHHXDUUU.js +2 -0
  8. package/dist/SelectFieldDefault-FWQ7D6DU.js +2 -0
  9. package/dist/TelFieldDefault-RA7IBELJ.js +2 -0
  10. package/dist/TextAreaFieldDefault-NEFWXEE2.js +2 -0
  11. package/dist/TextFieldDefault-RXNU36AX.js +2 -0
  12. package/dist/TimeFieldDefault-KIJNBWYF.js +2 -0
  13. package/dist/ZendeskTriggerButtonDefault-L4BVVXHA.js +2 -0
  14. package/dist/ZendeskTriggerButtonDefault-L4BVVXHA.js.map +1 -0
  15. package/dist/chunk-2GTY2DMO.js +2 -0
  16. package/dist/{chunk-QN6OMOUW.js.map → chunk-2GTY2DMO.js.map} +1 -1
  17. package/dist/{chunk-5IMEZZMR.js → chunk-2LR5N626.js} +2 -2
  18. package/dist/{chunk-FLX72WFD.js → chunk-2LSLWFZS.js} +2 -2
  19. package/dist/chunk-3BQVEYHE.js +2 -0
  20. package/dist/chunk-3BQVEYHE.js.map +1 -0
  21. package/dist/{chunk-EACCMXD5.js → chunk-3LELUHRO.js} +2 -2
  22. package/dist/{chunk-XAIBLWDF.js → chunk-3LMZ3SOP.js} +2 -2
  23. package/dist/{chunk-KBD6W5FL.js → chunk-3RQSRU7O.js} +2 -2
  24. package/dist/{chunk-WI4YITIC.js → chunk-3VTHNE4H.js} +2 -2
  25. package/dist/{chunk-TFBJMECV.js → chunk-4Y2INBAI.js} +2 -2
  26. package/dist/chunk-4YFJOHSM.js +2 -0
  27. package/dist/{chunk-SL5WZ76A.js.map → chunk-4YFJOHSM.js.map} +1 -1
  28. package/dist/chunk-5FEJD2N7.js +2 -0
  29. package/dist/chunk-5FEJD2N7.js.map +1 -0
  30. package/dist/chunk-5FGYC2RF.js +2 -0
  31. package/dist/{chunk-GMCJXDUP.js.map → chunk-5FGYC2RF.js.map} +1 -1
  32. package/dist/{chunk-Q2MGM4I2.js → chunk-5FJ64F6D.js} +2 -2
  33. package/dist/{chunk-4F7TGLUT.js → chunk-5J7DLDLW.js} +2 -2
  34. package/dist/{chunk-Q2JINYSB.js → chunk-5MH23AST.js} +2 -2
  35. package/dist/chunk-5TOSVOLY.js +2 -0
  36. package/dist/chunk-5TOSVOLY.js.map +1 -0
  37. package/dist/{chunk-CNQXPZJB.js → chunk-5WTCN4WO.js} +2 -2
  38. package/dist/{chunk-7YACR6OA.js → chunk-6IDUDCVS.js} +2 -2
  39. package/dist/{chunk-X536XUYT.js → chunk-6IQJJCQ3.js} +2 -2
  40. package/dist/chunk-6L77BWCI.js +2 -0
  41. package/dist/{chunk-UOA3M7EJ.js.map → chunk-6L77BWCI.js.map} +1 -1
  42. package/dist/{chunk-5YOH2HJ5.js → chunk-6S5Q2OKC.js} +2 -2
  43. package/dist/chunk-7IIQUZTH.js +2 -0
  44. package/dist/chunk-7IIQUZTH.js.map +1 -0
  45. package/dist/{chunk-SNEUIWQE.js → chunk-7NDAFJXR.js} +2 -2
  46. package/dist/{chunk-OK2ZZ6NK.js → chunk-7XDU2VWN.js} +2 -2
  47. package/dist/{chunk-AFKB7Z3G.js → chunk-A5XRBDDO.js} +2 -2
  48. package/dist/chunk-ALHHN2LG.js +2 -0
  49. package/dist/chunk-ALHHN2LG.js.map +1 -0
  50. package/dist/{chunk-JP5GXWXT.js → chunk-ANZ2YYUE.js} +2 -2
  51. package/dist/{chunk-RJ7BWEDB.js → chunk-B3ESNTKY.js} +2 -2
  52. package/dist/{chunk-76TJCXAW.js → chunk-BTZ57COZ.js} +2 -2
  53. package/dist/{chunk-GTZ35W3E.js → chunk-BWM2MYPE.js} +2 -2
  54. package/dist/{chunk-7G6XS63Q.js → chunk-BYTVIOOL.js} +2 -2
  55. package/dist/{chunk-VWWVLK5C.js → chunk-C2HZNBMZ.js} +2 -2
  56. package/dist/{chunk-TVNBMBTY.js → chunk-C5T75DEZ.js} +2 -2
  57. package/dist/{chunk-32UP2UFU.js → chunk-CFPKRLGM.js} +2 -2
  58. package/dist/{chunk-7EOTDIJI.js → chunk-CHIWBD6E.js} +2 -2
  59. package/dist/{chunk-DH2NHUZU.js → chunk-D737GUYZ.js} +2 -2
  60. package/dist/{chunk-C3YSF5RT.js → chunk-DLIVHNTT.js} +2 -2
  61. package/dist/{chunk-OLBMZGOC.js → chunk-EQIWABAZ.js} +2 -2
  62. package/dist/{chunk-XCQI5O67.js → chunk-EYZVDP6A.js} +2 -2
  63. package/dist/{chunk-U74P6WCT.js → chunk-F2SGCGXL.js} +2 -2
  64. package/dist/{chunk-KFTMJ253.js → chunk-F3DZUA7W.js} +2 -2
  65. package/dist/{chunk-FJNQ64SB.js → chunk-F3UUYQGY.js} +2 -2
  66. package/dist/{chunk-2HQDOWW2.js → chunk-FB3PEQTO.js} +1 -1
  67. package/dist/chunk-FB3PEQTO.js.map +1 -0
  68. package/dist/{chunk-HNJ7ZFEU.js → chunk-FDTOQHOJ.js} +2 -2
  69. package/dist/chunk-FGYOG6XG.js +2 -0
  70. package/dist/chunk-FGYOG6XG.js.map +1 -0
  71. package/dist/{chunk-OPGC7BSY.js → chunk-FJD5GFO4.js} +2 -2
  72. package/dist/{chunk-GSGCFKOZ.js → chunk-FT4ZNBTA.js} +2 -2
  73. package/dist/{chunk-CETQLSZY.js → chunk-G3KQCVQQ.js} +2 -2
  74. package/dist/chunk-GPWQPJQ7.js +2 -0
  75. package/dist/chunk-GPWQPJQ7.js.map +1 -0
  76. package/dist/{chunk-7PWXGPXZ.js → chunk-H5OZSXSY.js} +2 -2
  77. package/dist/{chunk-364G255Q.js → chunk-IAR6BWUY.js} +2 -2
  78. package/dist/{chunk-7ZQYMDNU.js → chunk-ILX6RI7K.js} +2 -2
  79. package/dist/{chunk-VT5V3C6T.js → chunk-IRUWMZVH.js} +2 -2
  80. package/dist/{chunk-ISETCY2V.js → chunk-IUBHVGVV.js} +2 -2
  81. package/dist/chunk-IXS65MGJ.js +2 -0
  82. package/dist/chunk-IXS65MGJ.js.map +1 -0
  83. package/dist/{chunk-VBWACHT3.js → chunk-J4CHUIPC.js} +2 -2
  84. package/dist/chunk-JKHJR6HK.js +2 -0
  85. package/dist/chunk-JKHJR6HK.js.map +1 -0
  86. package/dist/{chunk-HCL7WLOR.js → chunk-JLM4O7ZW.js} +2 -2
  87. package/dist/{chunk-H3JVB7GS.js → chunk-JMFCG5KA.js} +2 -2
  88. package/dist/{chunk-2FI5CCXQ.js → chunk-JQ3SLOUP.js} +2 -2
  89. package/dist/{chunk-FXVLXN2B.js → chunk-JRRPMAUO.js} +2 -2
  90. package/dist/{chunk-ONUE4K6F.js → chunk-K67Q5476.js} +2 -2
  91. package/dist/{chunk-ZGGEJ3FD.js → chunk-KPDYUFCB.js} +2 -2
  92. package/dist/{chunk-5BJXFWKN.js → chunk-KZ5ZQTBF.js} +2 -2
  93. package/dist/{chunk-VY64RMAF.js → chunk-LCUURLXS.js} +2 -2
  94. package/dist/{chunk-DHS5QMH6.js → chunk-LCUYP6VW.js} +2 -2
  95. package/dist/chunk-M3TA5X2H.js +2 -0
  96. package/dist/chunk-M3TA5X2H.js.map +1 -0
  97. package/dist/{chunk-CHTCJQJ3.js → chunk-MZK2U65W.js} +2 -2
  98. package/dist/chunk-NPVSJYM6.js +2 -0
  99. package/dist/chunk-NPVSJYM6.js.map +1 -0
  100. package/dist/{chunk-UEJU2A57.js → chunk-ORP6DY5I.js} +2 -2
  101. package/dist/{chunk-PZWP6ZVL.js → chunk-OTBCLDGR.js} +2 -2
  102. package/dist/{chunk-5OEO67O2.js → chunk-PJTMFMRJ.js} +2 -2
  103. package/dist/{chunk-YQZ3B2CT.js → chunk-PNNOU6BC.js} +2 -2
  104. package/dist/chunk-POWC7LZN.js +2 -0
  105. package/dist/chunk-POWC7LZN.js.map +1 -0
  106. package/dist/{chunk-3YILMVSP.js → chunk-PYNHR7NL.js} +2 -2
  107. package/dist/{chunk-IN6QZASY.js → chunk-QEHEOSJT.js} +2 -2
  108. package/dist/{chunk-QA6YA4OB.js → chunk-QHJ3BYJN.js} +2 -2
  109. package/dist/chunk-QSBXRKYE.js +2 -0
  110. package/dist/chunk-QSF4XFSV.js +2 -0
  111. package/dist/{chunk-QJHSN6MG.js.map → chunk-QSF4XFSV.js.map} +1 -1
  112. package/dist/{chunk-NKGJZNXL.js → chunk-R2D32OB6.js} +2 -2
  113. package/dist/{chunk-6VEWI4G2.js → chunk-RKP7EEAB.js} +2 -2
  114. package/dist/{chunk-UTQDJNOV.js → chunk-S2QXSX4Q.js} +2 -2
  115. package/dist/{chunk-Q4X35JRA.js → chunk-SNGQ2MKL.js} +2 -2
  116. package/dist/{chunk-B7XTWLRI.js → chunk-SUVBETJS.js} +2 -2
  117. package/dist/{chunk-EP3DUVMU.js → chunk-TLJXBZII.js} +2 -2
  118. package/dist/chunk-TXOCMI5I.js +2 -0
  119. package/dist/{chunk-LWLFJAG6.js.map → chunk-TXOCMI5I.js.map} +1 -1
  120. package/dist/{chunk-HDOEUCXY.js → chunk-U7JAGEOV.js} +2 -2
  121. package/dist/chunk-U7JAGEOV.js.map +1 -0
  122. package/dist/{chunk-PQHXX3ZN.js → chunk-UAEQLFPK.js} +2 -2
  123. package/dist/chunk-UOJOO2DM.js +2 -0
  124. package/dist/chunk-UOJOO2DM.js.map +1 -0
  125. package/dist/{chunk-WXKFXIMQ.js → chunk-UU2IFOXR.js} +2 -2
  126. package/dist/{chunk-ZMBPKARZ.js → chunk-V3C32X6R.js} +2 -2
  127. package/dist/{chunk-XI55YG73.js → chunk-VNMUML3T.js} +2 -2
  128. package/dist/{chunk-XI55YG73.js.map → chunk-VNMUML3T.js.map} +1 -1
  129. package/dist/{chunk-TYCOSAU4.js → chunk-VQRE3YLW.js} +2 -2
  130. package/dist/{chunk-RDDQ5XMI.js → chunk-VYAJQ25J.js} +2 -2
  131. package/dist/chunk-WB52GW3H.js +2 -0
  132. package/dist/chunk-WB52GW3H.js.map +1 -0
  133. package/dist/{chunk-JBAKDTGM.js → chunk-WDPJIOLG.js} +2 -2
  134. package/dist/{chunk-KBYI7L5E.js → chunk-WGDZTF7Y.js} +2 -2
  135. package/dist/{chunk-WXTEP5PE.js → chunk-WH3QR2W5.js} +2 -2
  136. package/dist/{chunk-OKABTWB3.js → chunk-WHDUZGVW.js} +2 -2
  137. package/dist/{chunk-MS63VN5N.js → chunk-WYIU74JN.js} +2 -2
  138. package/dist/{chunk-4E5YP5GD.js → chunk-WZOVZYNI.js} +2 -2
  139. package/dist/{chunk-6VBUWE25.js → chunk-XTLTKB3S.js} +2 -2
  140. package/dist/chunk-XXQBX7ND.js +2 -0
  141. package/dist/chunk-XXQBX7ND.js.map +1 -0
  142. package/dist/{chunk-XGECMN4V.js → chunk-YRC6EEM3.js} +2 -2
  143. package/dist/{chunk-GVQ7UXVW.js → chunk-YUUUI4FY.js} +2 -2
  144. package/dist/{chunk-RPRRMRCO.js → chunk-Z7VNXKWB.js} +2 -2
  145. package/dist/chunk-ZQVVHVAG.js +2 -0
  146. package/dist/{chunk-WLZRAEPQ.js.map → chunk-ZQVVHVAG.js.map} +1 -1
  147. package/dist/default-components.d.ts +2 -2
  148. package/dist/default-components.js +1 -1
  149. package/dist/default-components.js.map +1 -1
  150. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
  151. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +3 -3
  152. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  153. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
  154. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  155. package/dist/flows/ContractAmendment/context.d.ts +3 -3
  156. package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
  157. package/dist/flows/ContractAmendment/hooks.js +1 -1
  158. package/dist/flows/ContractAmendment/index.d.ts +3 -3
  159. package/dist/flows/ContractAmendment/index.js +1 -1
  160. package/dist/flows/ContractAmendment/types.d.ts +3 -3
  161. package/dist/flows/ContractAmendment/utils.d.ts +2 -2
  162. package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +6 -5
  163. package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
  164. package/dist/flows/ContractorOnboarding/api.d.ts +445 -192
  165. package/dist/flows/ContractorOnboarding/api.js +1 -1
  166. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
  167. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
  168. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +6 -5
  169. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
  170. package/dist/flows/ContractorOnboarding/components/ContractOriginStep.d.ts +3 -3
  171. package/dist/flows/ContractorOnboarding/components/ContractOriginStep.js +1 -1
  172. package/dist/flows/ContractorOnboarding/components/ContractPreviewHeader.d.ts +2 -2
  173. package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.d.ts +2 -2
  174. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +6 -5
  175. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
  176. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +6 -5
  177. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
  178. package/dist/flows/ContractorOnboarding/components/CreateInvoiceScheduleStep.d.ts +23 -0
  179. package/dist/flows/ContractorOnboarding/components/CreateInvoiceScheduleStep.js +2 -0
  180. package/dist/flows/ContractorOnboarding/components/CreateInvoiceScheduleStep.js.map +1 -0
  181. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.d.ts +6 -5
  182. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.js +1 -1
  183. package/dist/flows/ContractorOnboarding/components/InvoiceScheduleStep.d.ts +28 -0
  184. package/dist/flows/ContractorOnboarding/components/InvoiceScheduleStep.js +2 -0
  185. package/dist/flows/ContractorOnboarding/components/InvoiceScheduleStep.js.map +1 -0
  186. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
  187. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
  188. package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +6 -5
  189. package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
  190. package/dist/flows/ContractorOnboarding/components/SaveDraftButton.d.ts +3 -3
  191. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
  192. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
  193. package/dist/flows/ContractorOnboarding/context.d.ts +32 -14
  194. package/dist/flows/ContractorOnboarding/hooks.d.ts +7 -6
  195. package/dist/flows/ContractorOnboarding/hooks.js +1 -1
  196. package/dist/flows/ContractorOnboarding/index.d.ts +6 -5
  197. package/dist/flows/ContractorOnboarding/index.js +1 -1
  198. package/dist/flows/ContractorOnboarding/invoiceScheduleConstants.d.ts +15 -0
  199. package/dist/flows/ContractorOnboarding/invoiceScheduleConstants.js +2 -0
  200. package/dist/flows/ContractorOnboarding/invoiceScheduleConstants.js.map +1 -0
  201. package/dist/flows/ContractorOnboarding/jsfModify.d.ts +6 -5
  202. package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
  203. package/dist/flows/ContractorOnboarding/json-schemas/createInvoiceSchedule.d.ts +103 -0
  204. package/dist/flows/ContractorOnboarding/json-schemas/createInvoiceSchedule.js +2 -0
  205. package/dist/flows/ContractorOnboarding/json-schemas/createInvoiceSchedule.js.map +1 -0
  206. package/dist/flows/ContractorOnboarding/json-schemas/invoiceSchedule.d.ts +28 -0
  207. package/dist/flows/ContractorOnboarding/json-schemas/invoiceSchedule.js +2 -0
  208. package/dist/flows/ContractorOnboarding/json-schemas/invoiceSchedule.js.map +1 -0
  209. package/dist/flows/ContractorOnboarding/types.d.ts +6 -5
  210. package/dist/flows/ContractorOnboarding/utils.d.ts +24 -6
  211. package/dist/flows/ContractorOnboarding/utils.js +1 -1
  212. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
  213. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  214. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
  215. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  216. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +3 -3
  217. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  218. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +3 -3
  219. package/dist/flows/CostCalculator/api.d.ts +3 -3
  220. package/dist/flows/CostCalculator/api.js +1 -1
  221. package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
  222. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  223. package/dist/flows/CostCalculator/context.d.ts +3 -3
  224. package/dist/flows/CostCalculator/hooks.d.ts +3 -3
  225. package/dist/flows/CostCalculator/hooks.js +1 -1
  226. package/dist/flows/CostCalculator/index.d.ts +3 -3
  227. package/dist/flows/CostCalculator/index.js +1 -1
  228. package/dist/flows/CostCalculator/types.d.ts +3 -3
  229. package/dist/flows/CostCalculator/utils.d.ts +3 -3
  230. package/dist/flows/CostCalculator/utils.js +1 -1
  231. package/dist/flows/CreateCompany/CreateCompany.d.ts +4 -4
  232. package/dist/flows/CreateCompany/CreateCompany.js +1 -1
  233. package/dist/flows/CreateCompany/api.d.ts +3 -3
  234. package/dist/flows/CreateCompany/api.js +1 -1
  235. package/dist/flows/CreateCompany/components/AddressDetailsStep.d.ts +4 -4
  236. package/dist/flows/CreateCompany/components/AddressDetailsStep.js +1 -1
  237. package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.d.ts +4 -4
  238. package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.js +1 -1
  239. package/dist/flows/CreateCompany/components/CreateCompanyForm.d.ts +2 -2
  240. package/dist/flows/CreateCompany/components/CreateCompanyForm.js +1 -1
  241. package/dist/flows/CreateCompany/context.d.ts +4 -4
  242. package/dist/flows/CreateCompany/hooks.d.ts +4 -4
  243. package/dist/flows/CreateCompany/hooks.js +1 -1
  244. package/dist/flows/CreateCompany/index.d.ts +4 -4
  245. package/dist/flows/CreateCompany/index.js +1 -1
  246. package/dist/flows/CreateCompany/types.d.ts +4 -4
  247. package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundFlow.d.ts +3 -3
  248. package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundFlow.js +1 -1
  249. package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundForm.d.ts +2 -2
  250. package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundForm.js +1 -1
  251. package/dist/flows/JsonSchemaPlayground/context.d.ts +3 -3
  252. package/dist/flows/JsonSchemaPlayground/hooks.d.ts +3 -3
  253. package/dist/flows/JsonSchemaPlayground/index.d.ts +3 -3
  254. package/dist/flows/JsonSchemaPlayground/index.js +1 -1
  255. package/dist/flows/JsonSchemaPlayground/types.d.ts +3 -3
  256. package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
  257. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  258. package/dist/flows/Onboarding/api.d.ts +4 -4
  259. package/dist/flows/Onboarding/api.js +1 -1
  260. package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
  261. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  262. package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +4 -4
  263. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  264. package/dist/flows/Onboarding/components/BenefitsStep.d.ts +4 -4
  265. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  266. package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +4 -4
  267. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  268. package/dist/flows/Onboarding/components/EmploymentAgreementInfoContent.js +1 -1
  269. package/dist/flows/Onboarding/components/EngagementAgreementDetailsStep.d.ts +4 -4
  270. package/dist/flows/Onboarding/components/EngagementAgreementDetailsStep.js +1 -1
  271. package/dist/flows/Onboarding/components/OnboardingForm.d.ts +4 -4
  272. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  273. package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
  274. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  275. package/dist/flows/Onboarding/components/PreOnboardingRequirements.d.ts +4 -4
  276. package/dist/flows/Onboarding/components/PreOnboardingRequirements.js +1 -1
  277. package/dist/flows/Onboarding/components/PreviewEmploymentAgreementStep.js +1 -1
  278. package/dist/flows/Onboarding/components/ReviewStep.d.ts +4 -4
  279. package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
  280. package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +4 -4
  281. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  282. package/dist/flows/Onboarding/context.d.ts +4 -4
  283. package/dist/flows/Onboarding/hooks.d.ts +4 -4
  284. package/dist/flows/Onboarding/hooks.js +1 -1
  285. package/dist/flows/Onboarding/index.d.ts +4 -4
  286. package/dist/flows/Onboarding/index.js +1 -1
  287. package/dist/flows/Onboarding/types.d.ts +4 -4
  288. package/dist/flows/Onboarding/utils.d.ts +4 -4
  289. package/dist/flows/Onboarding/utils.js +1 -1
  290. package/dist/flows/PayrollAdminOnboarding/PayrollAdminOnboardingFlow.d.ts +4 -4
  291. package/dist/flows/PayrollAdminOnboarding/PayrollAdminOnboardingFlow.js +1 -1
  292. package/dist/flows/PayrollAdminOnboarding/api.d.ts +2 -2
  293. package/dist/flows/PayrollAdminOnboarding/api.js +1 -1
  294. package/dist/flows/PayrollAdminOnboarding/components/AdministrativeDetailsStep.d.ts +3 -3
  295. package/dist/flows/PayrollAdminOnboarding/components/AdministrativeDetailsStep.js +1 -1
  296. package/dist/flows/PayrollAdminOnboarding/components/ContractDetailsStep.d.ts +3 -3
  297. package/dist/flows/PayrollAdminOnboarding/components/ContractDetailsStep.js +1 -1
  298. package/dist/flows/PayrollAdminOnboarding/components/InvitationStep.d.ts +3 -3
  299. package/dist/flows/PayrollAdminOnboarding/components/InvitationStep.js +1 -1
  300. package/dist/flows/PayrollAdminOnboarding/components/PayrollAdminForm.d.ts +2 -2
  301. package/dist/flows/PayrollAdminOnboarding/components/PayrollAdminForm.js +1 -1
  302. package/dist/flows/PayrollAdminOnboarding/components/SelectCountryStep.d.ts +3 -3
  303. package/dist/flows/PayrollAdminOnboarding/components/SelectCountryStep.js +1 -1
  304. package/dist/flows/PayrollAdminOnboarding/components/useStepSubmitHandler.d.ts +3 -3
  305. package/dist/flows/PayrollAdminOnboarding/context.d.ts +4 -4
  306. package/dist/flows/PayrollAdminOnboarding/hooks.d.ts +4 -4
  307. package/dist/flows/PayrollAdminOnboarding/hooks.js +1 -1
  308. package/dist/flows/PayrollAdminOnboarding/index.d.ts +4 -4
  309. package/dist/flows/PayrollAdminOnboarding/index.js +1 -1
  310. package/dist/flows/PayrollAdminOnboarding/types.d.ts +4 -4
  311. package/dist/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.d.ts +4 -4
  312. package/dist/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.js +1 -1
  313. package/dist/flows/PayrollEmployeeOnboarding/api.d.ts +3 -3
  314. package/dist/flows/PayrollEmployeeOnboarding/api.js +1 -1
  315. package/dist/flows/PayrollEmployeeOnboarding/components/BankAccountStep.d.ts +3 -3
  316. package/dist/flows/PayrollEmployeeOnboarding/components/BankAccountStep.js +1 -1
  317. package/dist/flows/PayrollEmployeeOnboarding/components/FederalTaxesStep.d.ts +3 -3
  318. package/dist/flows/PayrollEmployeeOnboarding/components/FederalTaxesStep.js +1 -1
  319. package/dist/flows/PayrollEmployeeOnboarding/components/HomeAddressStep.d.ts +3 -3
  320. package/dist/flows/PayrollEmployeeOnboarding/components/HomeAddressStep.js +1 -1
  321. package/dist/flows/PayrollEmployeeOnboarding/components/PayrollEmployeeForm.d.ts +2 -2
  322. package/dist/flows/PayrollEmployeeOnboarding/components/PayrollEmployeeForm.js +1 -1
  323. package/dist/flows/PayrollEmployeeOnboarding/components/PersonalDetailsStep.d.ts +3 -3
  324. package/dist/flows/PayrollEmployeeOnboarding/components/PersonalDetailsStep.js +1 -1
  325. package/dist/flows/PayrollEmployeeOnboarding/components/StateTaxesStep.d.ts +3 -3
  326. package/dist/flows/PayrollEmployeeOnboarding/components/StateTaxesStep.js +1 -1
  327. package/dist/flows/PayrollEmployeeOnboarding/components/useEmployeeStepSubmitHandler.d.ts +3 -3
  328. package/dist/flows/PayrollEmployeeOnboarding/context.d.ts +4 -4
  329. package/dist/flows/PayrollEmployeeOnboarding/hooks.d.ts +4 -4
  330. package/dist/flows/PayrollEmployeeOnboarding/hooks.js +1 -1
  331. package/dist/flows/PayrollEmployeeOnboarding/index.d.ts +4 -4
  332. package/dist/flows/PayrollEmployeeOnboarding/index.js +1 -1
  333. package/dist/flows/PayrollEmployeeOnboarding/types.d.ts +4 -4
  334. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -4
  335. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  336. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +4 -4
  337. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  338. package/dist/flows/Termination/PaidTimeOffForm.d.ts +4 -4
  339. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  340. package/dist/flows/Termination/TerminationDetailsForm.d.ts +4 -4
  341. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  342. package/dist/flows/Termination/TerminationFlow.d.ts +4 -4
  343. package/dist/flows/Termination/TerminationFlow.js +1 -1
  344. package/dist/flows/Termination/TerminationForm.d.ts +4 -4
  345. package/dist/flows/Termination/TerminationForm.js +1 -1
  346. package/dist/flows/Termination/api.d.ts +5 -5
  347. package/dist/flows/Termination/api.js +1 -1
  348. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
  349. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +6 -6
  350. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +6 -6
  351. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
  352. package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +6 -6
  353. package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
  354. package/dist/flows/Termination/context.d.ts +4 -4
  355. package/dist/flows/Termination/hooks.d.ts +4 -4
  356. package/dist/flows/Termination/hooks.js +1 -1
  357. package/dist/flows/Termination/index.d.ts +6 -6
  358. package/dist/flows/Termination/index.js +1 -1
  359. package/dist/flows/Termination/json-schemas/jsonSchema.js +1 -1
  360. package/dist/flows/Termination/json-schemas/schema.d.ts +4 -4
  361. package/dist/flows/Termination/json-schemas/schema.js +1 -1
  362. package/dist/flows/Termination/types.d.ts +4 -4
  363. package/dist/flows/Termination/utils.d.ts +4 -4
  364. package/dist/flows/types.d.ts +8 -3
  365. package/dist/flows/useStepState.js +1 -1
  366. package/dist/flows/utils.d.ts +2 -2
  367. package/dist/index.d.ts +16 -14
  368. package/dist/index.js +2 -2
  369. package/dist/index.js.map +1 -1
  370. package/dist/internals.d.ts +4 -4
  371. package/dist/internals.js +1 -1
  372. package/dist/{mutations-D7wGden5.d.ts → mutations-DQjVuza-.d.ts} +1 -1
  373. package/dist/{remoteFlows-Do_hGrKi.d.ts → remoteFlows-B_JbhzWp.d.ts} +28 -2
  374. package/dist/{types-BSn99OzF.d.ts → types-1mH_uuoA.d.ts} +2 -2
  375. package/dist/{types-CZpddZC4.d.ts → types-B0iYt6RL.d.ts} +63 -14
  376. package/dist/{types-BhMTFN9Y.d.ts → types-B93nzmoE.d.ts} +1 -1
  377. package/dist/{types-CiQ08J9g.d.ts → types-BFzhRUSU.d.ts} +2 -2
  378. package/dist/{types-aNjp47fZ.d.ts → types-CdC2MYpf.d.ts} +2 -2
  379. package/dist/{types-BpETJhdu.d.ts → types-Clzf4xjV.d.ts} +3 -3
  380. package/dist/{types-BgwIacP2.d.ts → types-CoYsxVTI.d.ts} +1 -1
  381. package/dist/{types-CzmaeZs2.d.ts → types-D3U8Wi3X.d.ts} +3 -3
  382. package/dist/{types.gen-C4K7xky-.d.ts → types.gen-BmtA4XNd.d.ts} +230 -1
  383. package/dist/{utils-BU5K1WH5.d.ts → utils-DJgzqxq4.d.ts} +1 -1
  384. package/package.json +1 -1
  385. package/dist/CheckboxFieldDefault-6B33T4XR.js +0 -2
  386. package/dist/CountryFieldDefault-TVGOKASR.js +0 -2
  387. package/dist/DatePickerFieldDefault-TH427OH5.js +0 -2
  388. package/dist/FileUploadFieldDefault-WB7ITN3G.js +0 -2
  389. package/dist/ForcedValueFieldDefault-QH76S3ZL.js +0 -2
  390. package/dist/MultiSelectFieldDefault-T26SUE3J.js +0 -2
  391. package/dist/RadioGroupFieldDefault-ZNWHLCZP.js +0 -2
  392. package/dist/SelectFieldDefault-LFXATOYZ.js +0 -2
  393. package/dist/TelFieldDefault-4FJVSZRV.js +0 -2
  394. package/dist/TextAreaFieldDefault-QRU4Z4V2.js +0 -2
  395. package/dist/TextFieldDefault-LFKGGEU3.js +0 -2
  396. package/dist/TimeFieldDefault-RU75LZ2T.js +0 -2
  397. package/dist/chunk-2HQDOWW2.js.map +0 -1
  398. package/dist/chunk-3OLZMSGR.js +0 -2
  399. package/dist/chunk-3OLZMSGR.js.map +0 -1
  400. package/dist/chunk-4IDFJ6DS.js +0 -2
  401. package/dist/chunk-4IDFJ6DS.js.map +0 -1
  402. package/dist/chunk-5MPW7QWT.js +0 -2
  403. package/dist/chunk-7RLRU3VM.js +0 -2
  404. package/dist/chunk-7RLRU3VM.js.map +0 -1
  405. package/dist/chunk-7UWA3JTM.js +0 -2
  406. package/dist/chunk-7UWA3JTM.js.map +0 -1
  407. package/dist/chunk-GMCJXDUP.js +0 -2
  408. package/dist/chunk-HDOEUCXY.js.map +0 -1
  409. package/dist/chunk-LWLFJAG6.js +0 -2
  410. package/dist/chunk-MREG2JYT.js +0 -2
  411. package/dist/chunk-MREG2JYT.js.map +0 -1
  412. package/dist/chunk-PJ2MZ6FH.js +0 -2
  413. package/dist/chunk-PJ2MZ6FH.js.map +0 -1
  414. package/dist/chunk-QJHSN6MG.js +0 -2
  415. package/dist/chunk-QN6OMOUW.js +0 -2
  416. package/dist/chunk-SL5WZ76A.js +0 -2
  417. package/dist/chunk-UOA3M7EJ.js +0 -2
  418. package/dist/chunk-WLZRAEPQ.js +0 -2
  419. package/dist/chunk-XPVYX7LE.js +0 -2
  420. package/dist/chunk-XPVYX7LE.js.map +0 -1
  421. package/dist/chunk-XZMPAJRL.js +0 -2
  422. package/dist/chunk-XZMPAJRL.js.map +0 -1
  423. /package/dist/{CheckboxFieldDefault-6B33T4XR.js.map → CheckboxFieldDefault-JXNMWIRK.js.map} +0 -0
  424. /package/dist/{CountryFieldDefault-TVGOKASR.js.map → CountryFieldDefault-SO4WS7KE.js.map} +0 -0
  425. /package/dist/{DatePickerFieldDefault-TH427OH5.js.map → DatePickerFieldDefault-AZHJN2U6.js.map} +0 -0
  426. /package/dist/{FileUploadFieldDefault-WB7ITN3G.js.map → FileUploadFieldDefault-K6PF6RP7.js.map} +0 -0
  427. /package/dist/{ForcedValueFieldDefault-QH76S3ZL.js.map → ForcedValueFieldDefault-BEOC4MYU.js.map} +0 -0
  428. /package/dist/{MultiSelectFieldDefault-T26SUE3J.js.map → MultiSelectFieldDefault-QKXVTGF2.js.map} +0 -0
  429. /package/dist/{RadioGroupFieldDefault-ZNWHLCZP.js.map → RadioGroupFieldDefault-ZHHXDUUU.js.map} +0 -0
  430. /package/dist/{SelectFieldDefault-LFXATOYZ.js.map → SelectFieldDefault-FWQ7D6DU.js.map} +0 -0
  431. /package/dist/{TelFieldDefault-4FJVSZRV.js.map → TelFieldDefault-RA7IBELJ.js.map} +0 -0
  432. /package/dist/{TextAreaFieldDefault-QRU4Z4V2.js.map → TextAreaFieldDefault-NEFWXEE2.js.map} +0 -0
  433. /package/dist/{TextFieldDefault-LFKGGEU3.js.map → TextFieldDefault-RXNU36AX.js.map} +0 -0
  434. /package/dist/{TimeFieldDefault-RU75LZ2T.js.map → TimeFieldDefault-KIJNBWYF.js.map} +0 -0
  435. /package/dist/{chunk-5IMEZZMR.js.map → chunk-2LR5N626.js.map} +0 -0
  436. /package/dist/{chunk-FLX72WFD.js.map → chunk-2LSLWFZS.js.map} +0 -0
  437. /package/dist/{chunk-EACCMXD5.js.map → chunk-3LELUHRO.js.map} +0 -0
  438. /package/dist/{chunk-XAIBLWDF.js.map → chunk-3LMZ3SOP.js.map} +0 -0
  439. /package/dist/{chunk-KBD6W5FL.js.map → chunk-3RQSRU7O.js.map} +0 -0
  440. /package/dist/{chunk-WI4YITIC.js.map → chunk-3VTHNE4H.js.map} +0 -0
  441. /package/dist/{chunk-TFBJMECV.js.map → chunk-4Y2INBAI.js.map} +0 -0
  442. /package/dist/{chunk-Q2MGM4I2.js.map → chunk-5FJ64F6D.js.map} +0 -0
  443. /package/dist/{chunk-4F7TGLUT.js.map → chunk-5J7DLDLW.js.map} +0 -0
  444. /package/dist/{chunk-Q2JINYSB.js.map → chunk-5MH23AST.js.map} +0 -0
  445. /package/dist/{chunk-CNQXPZJB.js.map → chunk-5WTCN4WO.js.map} +0 -0
  446. /package/dist/{chunk-7YACR6OA.js.map → chunk-6IDUDCVS.js.map} +0 -0
  447. /package/dist/{chunk-X536XUYT.js.map → chunk-6IQJJCQ3.js.map} +0 -0
  448. /package/dist/{chunk-5YOH2HJ5.js.map → chunk-6S5Q2OKC.js.map} +0 -0
  449. /package/dist/{chunk-SNEUIWQE.js.map → chunk-7NDAFJXR.js.map} +0 -0
  450. /package/dist/{chunk-OK2ZZ6NK.js.map → chunk-7XDU2VWN.js.map} +0 -0
  451. /package/dist/{chunk-AFKB7Z3G.js.map → chunk-A5XRBDDO.js.map} +0 -0
  452. /package/dist/{chunk-JP5GXWXT.js.map → chunk-ANZ2YYUE.js.map} +0 -0
  453. /package/dist/{chunk-RJ7BWEDB.js.map → chunk-B3ESNTKY.js.map} +0 -0
  454. /package/dist/{chunk-76TJCXAW.js.map → chunk-BTZ57COZ.js.map} +0 -0
  455. /package/dist/{chunk-GTZ35W3E.js.map → chunk-BWM2MYPE.js.map} +0 -0
  456. /package/dist/{chunk-7G6XS63Q.js.map → chunk-BYTVIOOL.js.map} +0 -0
  457. /package/dist/{chunk-VWWVLK5C.js.map → chunk-C2HZNBMZ.js.map} +0 -0
  458. /package/dist/{chunk-TVNBMBTY.js.map → chunk-C5T75DEZ.js.map} +0 -0
  459. /package/dist/{chunk-32UP2UFU.js.map → chunk-CFPKRLGM.js.map} +0 -0
  460. /package/dist/{chunk-7EOTDIJI.js.map → chunk-CHIWBD6E.js.map} +0 -0
  461. /package/dist/{chunk-DH2NHUZU.js.map → chunk-D737GUYZ.js.map} +0 -0
  462. /package/dist/{chunk-C3YSF5RT.js.map → chunk-DLIVHNTT.js.map} +0 -0
  463. /package/dist/{chunk-OLBMZGOC.js.map → chunk-EQIWABAZ.js.map} +0 -0
  464. /package/dist/{chunk-XCQI5O67.js.map → chunk-EYZVDP6A.js.map} +0 -0
  465. /package/dist/{chunk-U74P6WCT.js.map → chunk-F2SGCGXL.js.map} +0 -0
  466. /package/dist/{chunk-KFTMJ253.js.map → chunk-F3DZUA7W.js.map} +0 -0
  467. /package/dist/{chunk-FJNQ64SB.js.map → chunk-F3UUYQGY.js.map} +0 -0
  468. /package/dist/{chunk-HNJ7ZFEU.js.map → chunk-FDTOQHOJ.js.map} +0 -0
  469. /package/dist/{chunk-OPGC7BSY.js.map → chunk-FJD5GFO4.js.map} +0 -0
  470. /package/dist/{chunk-GSGCFKOZ.js.map → chunk-FT4ZNBTA.js.map} +0 -0
  471. /package/dist/{chunk-CETQLSZY.js.map → chunk-G3KQCVQQ.js.map} +0 -0
  472. /package/dist/{chunk-7PWXGPXZ.js.map → chunk-H5OZSXSY.js.map} +0 -0
  473. /package/dist/{chunk-364G255Q.js.map → chunk-IAR6BWUY.js.map} +0 -0
  474. /package/dist/{chunk-7ZQYMDNU.js.map → chunk-ILX6RI7K.js.map} +0 -0
  475. /package/dist/{chunk-VT5V3C6T.js.map → chunk-IRUWMZVH.js.map} +0 -0
  476. /package/dist/{chunk-ISETCY2V.js.map → chunk-IUBHVGVV.js.map} +0 -0
  477. /package/dist/{chunk-VBWACHT3.js.map → chunk-J4CHUIPC.js.map} +0 -0
  478. /package/dist/{chunk-HCL7WLOR.js.map → chunk-JLM4O7ZW.js.map} +0 -0
  479. /package/dist/{chunk-H3JVB7GS.js.map → chunk-JMFCG5KA.js.map} +0 -0
  480. /package/dist/{chunk-2FI5CCXQ.js.map → chunk-JQ3SLOUP.js.map} +0 -0
  481. /package/dist/{chunk-FXVLXN2B.js.map → chunk-JRRPMAUO.js.map} +0 -0
  482. /package/dist/{chunk-ONUE4K6F.js.map → chunk-K67Q5476.js.map} +0 -0
  483. /package/dist/{chunk-ZGGEJ3FD.js.map → chunk-KPDYUFCB.js.map} +0 -0
  484. /package/dist/{chunk-5BJXFWKN.js.map → chunk-KZ5ZQTBF.js.map} +0 -0
  485. /package/dist/{chunk-VY64RMAF.js.map → chunk-LCUURLXS.js.map} +0 -0
  486. /package/dist/{chunk-DHS5QMH6.js.map → chunk-LCUYP6VW.js.map} +0 -0
  487. /package/dist/{chunk-CHTCJQJ3.js.map → chunk-MZK2U65W.js.map} +0 -0
  488. /package/dist/{chunk-UEJU2A57.js.map → chunk-ORP6DY5I.js.map} +0 -0
  489. /package/dist/{chunk-PZWP6ZVL.js.map → chunk-OTBCLDGR.js.map} +0 -0
  490. /package/dist/{chunk-5OEO67O2.js.map → chunk-PJTMFMRJ.js.map} +0 -0
  491. /package/dist/{chunk-YQZ3B2CT.js.map → chunk-PNNOU6BC.js.map} +0 -0
  492. /package/dist/{chunk-3YILMVSP.js.map → chunk-PYNHR7NL.js.map} +0 -0
  493. /package/dist/{chunk-IN6QZASY.js.map → chunk-QEHEOSJT.js.map} +0 -0
  494. /package/dist/{chunk-QA6YA4OB.js.map → chunk-QHJ3BYJN.js.map} +0 -0
  495. /package/dist/{chunk-5MPW7QWT.js.map → chunk-QSBXRKYE.js.map} +0 -0
  496. /package/dist/{chunk-NKGJZNXL.js.map → chunk-R2D32OB6.js.map} +0 -0
  497. /package/dist/{chunk-6VEWI4G2.js.map → chunk-RKP7EEAB.js.map} +0 -0
  498. /package/dist/{chunk-UTQDJNOV.js.map → chunk-S2QXSX4Q.js.map} +0 -0
  499. /package/dist/{chunk-Q4X35JRA.js.map → chunk-SNGQ2MKL.js.map} +0 -0
  500. /package/dist/{chunk-B7XTWLRI.js.map → chunk-SUVBETJS.js.map} +0 -0
  501. /package/dist/{chunk-EP3DUVMU.js.map → chunk-TLJXBZII.js.map} +0 -0
  502. /package/dist/{chunk-PQHXX3ZN.js.map → chunk-UAEQLFPK.js.map} +0 -0
  503. /package/dist/{chunk-WXKFXIMQ.js.map → chunk-UU2IFOXR.js.map} +0 -0
  504. /package/dist/{chunk-ZMBPKARZ.js.map → chunk-V3C32X6R.js.map} +0 -0
  505. /package/dist/{chunk-TYCOSAU4.js.map → chunk-VQRE3YLW.js.map} +0 -0
  506. /package/dist/{chunk-RDDQ5XMI.js.map → chunk-VYAJQ25J.js.map} +0 -0
  507. /package/dist/{chunk-JBAKDTGM.js.map → chunk-WDPJIOLG.js.map} +0 -0
  508. /package/dist/{chunk-KBYI7L5E.js.map → chunk-WGDZTF7Y.js.map} +0 -0
  509. /package/dist/{chunk-WXTEP5PE.js.map → chunk-WH3QR2W5.js.map} +0 -0
  510. /package/dist/{chunk-OKABTWB3.js.map → chunk-WHDUZGVW.js.map} +0 -0
  511. /package/dist/{chunk-MS63VN5N.js.map → chunk-WYIU74JN.js.map} +0 -0
  512. /package/dist/{chunk-4E5YP5GD.js.map → chunk-WZOVZYNI.js.map} +0 -0
  513. /package/dist/{chunk-6VBUWE25.js.map → chunk-XTLTKB3S.js.map} +0 -0
  514. /package/dist/{chunk-XGECMN4V.js.map → chunk-YRC6EEM3.js.map} +0 -0
  515. /package/dist/{chunk-GVQ7UXVW.js.map → chunk-YUUUI4FY.js.map} +0 -0
  516. /package/dist/{chunk-RPRRMRCO.js.map → chunk-Z7VNXKWB.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/ContractorOnboarding/api.ts","../src/common/api/contractor-contract-details.ts","../src/common/api/files.ts","../src/common/api/companies.ts","../src/common/api/identity.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport {\n BulkContractorInvoiceScheduleCreateParams,\n CompanyAction,\n CreateContractDocument,\n getV1CompaniesCompanyIdActions,\n getV1ContractorsEmploymentsEmploymentIdContractDocumentsId,\n getV1ContractorsEmploymentsEmploymentIdContractorSubscriptions,\n getV1ContractorInvoiceSchedules,\n ManageContractorPlusSubscriptionOperationsParams,\n postV1ContractorsEmploymentsEmploymentIdContractDocuments,\n postV1ContractorsEmploymentsEmploymentIdContractorPlusSubscription,\n postV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSign,\n postV1ContractorInvoiceSchedules,\n patchV1ContractorInvoiceSchedulesId2,\n UpdateScheduleContractorInvoiceParams,\n SignContractDocument,\n getV1EmploymentsEmploymentIdContractDocuments,\n EligibilityQuestionnaireJsonSchemaResponse,\n getV1ContractorsSchemasEligibilityQuestionnaire,\n SubmitEligibilityQuestionnaireRequest,\n postV1ContractorsEligibilityQuestionnaire,\n postV1ContractorsEmploymentsEmploymentIdContractorCorSubscription,\n postV1EmploymentsEmploymentIdContractOrigin,\n deleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscription,\n Country,\n ContractorInvoiceScheduleCreateParams,\n PostV1EmploymentsEmploymentIdContractOriginData,\n} from '@/src/client';\nimport { useClient } from '@/src/context';\nimport { signatureSchema } from '@/src/flows/ContractorOnboarding/json-schemas/signature';\nimport { contractOriginSchema } from '@/src/flows/ContractorOnboarding/json-schemas/contractOrigin';\nimport { invoiceScheduleSchema } from '@/src/flows/ContractorOnboarding/json-schemas/invoiceSchedule';\nimport { createInvoiceScheduleSchema } from '@/src/flows/ContractorOnboarding/json-schemas/createInvoiceSchedule';\nimport { selectContractorSubscriptionStepSchema } from '@/src/flows/ContractorOnboarding/json-schemas/selectContractorSubscriptionStep';\nimport { useContractorCurrencies } from '@/src/common/api/contractor-contract-details';\nimport { INVOICE_SCHEDULE_STATUS } from '@/src/flows/ContractorOnboarding/invoiceScheduleConstants';\nimport {\n JSONSchemaFormResultWithFieldsets,\n FlowOptions,\n JSFModify,\n} from '@/src/flows/types';\nimport { clearBase64Data } from '@/src/lib/utils';\nimport { Client } from '@/src/client/client';\nimport { createHeadlessForm } from '@/src/common/createHeadlessForm';\nimport { useMutation, useQuery, queryOptions } from '@tanstack/react-query';\nimport { FieldValues } from 'react-hook-form';\nimport {\n contractorPlusProductIdentifier,\n contractorStandardProductIdentifier,\n corProductIdentifier,\n eorProductIdentifier,\n FEATURES_BY_IDENTIFIER,\n IR35_FILE_SUBTYPE,\n ProductType,\n} from '@/src/flows/ContractorOnboarding/constants';\nimport { $TSFixMe, JSFField } from '@/src/types/remoteFlows';\nimport { mutationToPromise } from '@/src/lib/mutations';\nimport {\n useDownloadFile,\n useEmploymentFiles,\n useUploadFile,\n} from '@/src/common/api/files';\nimport { convertFromCents } from '@/src/components/form/utils';\nimport { countriesOptions } from '@/src/common/api/countries';\nimport { selectCountryStepSchema } from '@/src/flows/Onboarding/json-schemas/selectCountryStep';\nimport {\n shouldIncludeProduct,\n buildInvoiceSchedulePayload,\n} from '@/src/flows/ContractorOnboarding/utils';\nimport { useCompanyPricingPlans, hasCompany } from '@/src/common/api/companies';\nimport { useIdentity } from '@/src/common/api/identity';\n\n/**\n * Get the contract document signature schema\n * @param fieldValues - The field values\n * @param options - The options\n * @returns The contract document signature schema\n */\nexport const useGetContractDocumentSignatureSchema = ({\n fieldValues,\n options,\n}: {\n fieldValues: FieldValues;\n options?: { queryOptions?: { enabled?: boolean }; jsfModify?: JSFModify };\n}) => {\n return useQuery({\n queryKey: [\n 'contract-document-signature',\n fieldValues.review_completed,\n options?.jsfModify,\n ],\n queryFn: async () => {\n return createHeadlessForm(signatureSchema, fieldValues, {\n jsfModify: options?.jsfModify,\n });\n },\n enabled: options?.queryOptions?.enabled,\n });\n};\n\n/**\n * Signs the contract document\n * @param employmentId - The employment ID\n * @param contractDocumentId - The contract document ID\n * @param payload - The payload\n * @returns The signed contract document\n */\nexport const useSignContractDocument = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({\n employmentId,\n contractDocumentId,\n payload,\n }: {\n employmentId: string;\n contractDocumentId: string;\n payload: SignContractDocument;\n }) => {\n return postV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSign(\n {\n client: client as Client,\n body: payload,\n path: {\n employment_id: employmentId,\n contract_document_id: contractDocumentId,\n },\n },\n );\n },\n });\n};\n\n/**\n * Get the contract document for a given employment and contract document ID\n * @param employmentId - The employment ID\n * @param contractDocumentId - The contract document ID\n * @returns The contract document\n */\nexport const useGetShowContractDocument = ({\n employmentId,\n contractDocumentId,\n options,\n}: {\n employmentId: string;\n contractDocumentId: string;\n options?: { queryOptions?: { enabled?: boolean }; jsfModify?: JSFModify };\n}) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['contract-document', employmentId, contractDocumentId],\n queryFn: async () => {\n return getV1ContractorsEmploymentsEmploymentIdContractDocumentsId({\n client: client as Client,\n path: { employment_id: employmentId, id: contractDocumentId },\n });\n },\n enabled: options?.queryOptions?.enabled,\n select: ({ data }) => {\n return {\n ...data?.data,\n contract_document: {\n ...data?.data?.contract_document,\n content: clearBase64Data(\n data?.data?.contract_document?.content as $TSFixMe,\n ),\n },\n };\n },\n });\n};\n\nexport const useHasCompanySignedContract = ({\n employmentId,\n contractDocumentId,\n options,\n}: {\n employmentId: string;\n contractDocumentId: string;\n options?: { queryOptions?: { enabled?: boolean } };\n}) => {\n const { data: documentPreviewPdf } = useGetShowContractDocument({\n employmentId,\n contractDocumentId,\n options: {\n queryOptions: {\n enabled: options?.queryOptions?.enabled,\n },\n },\n });\n\n const hasCompanySignedContract =\n documentPreviewPdf?.contract_document?.signatories?.some(\n (signatory) =>\n signatory.type === 'company' && signatory.status === 'signed',\n );\n\n return {\n hasCompanySignedContract,\n };\n};\n/**\n * Get the contractor subscriptions for the given employment id\n * @param employmentId - The employment ID\n * @returns The contractor subscriptions available\n */\nexport const useGetContractorSubscriptions = ({\n employmentId,\n options,\n}: {\n employmentId: string;\n options?: { queryOptions?: { enabled?: boolean } };\n}) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['contractor-subscriptions', employmentId],\n queryFn: async () => {\n return getV1ContractorsEmploymentsEmploymentIdContractorSubscriptions({\n client: client as Client,\n path: { employment_id: employmentId },\n });\n },\n enabled: options?.queryOptions?.enabled,\n select: ({ data }) => {\n return data?.data;\n },\n });\n};\n\n/**\n * Upgrade or downgrade contractor subscription\n */\nexport const usePostManageContractorSubscriptions = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({\n employmentId,\n payload,\n }: {\n employmentId: string;\n payload: ManageContractorPlusSubscriptionOperationsParams;\n }) => {\n return postV1ContractorsEmploymentsEmploymentIdContractorPlusSubscription(\n {\n client: client as Client,\n body: payload,\n path: {\n employment_id: employmentId,\n },\n },\n );\n },\n });\n};\n\n/**\n * Saves the contractor details data\n * @param employmentId - The employment ID\n * @param payload - The payload\n * @returns The contractor contract document\n */\nexport const useCreateContractorContractDocument = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({\n employmentId,\n payload,\n }: {\n employmentId: string;\n payload: CreateContractDocument;\n }) => {\n return postV1ContractorsEmploymentsEmploymentIdContractDocuments({\n client: client as Client,\n body: payload,\n path: {\n employment_id: employmentId,\n },\n });\n },\n });\n};\n\nexport const CONTRACT_PRODUCT_TITLES = {\n [contractorStandardProductIdentifier]: 'Contractor Management',\n [contractorPlusProductIdentifier]: 'Contractor Management Plus',\n [corProductIdentifier]: 'Contractor of Record',\n};\n\nconst useEorSubscription = (options?: { enabled?: boolean }) => {\n const { data: pricingPlans, isLoading: isLoadingPricingPlans } =\n useCompanyPricingPlans({\n enabled: options?.enabled,\n });\n\n const eorPricingPlan = pricingPlans?.find(\n (plan) => plan.product.name === 'EOR Monthly',\n );\n\n const eorSubscription = eorPricingPlan\n ? {\n product: {\n identifier: eorProductIdentifier,\n short_name: 'EOR',\n },\n currency: eorPricingPlan.price.currency,\n price: {\n amount: convertFromCents(eorPricingPlan.price.amount),\n },\n features: [\n 'Contract between Remote and employee',\n 'Remote manages onboarding, payroll, and compliance',\n 'Manages taxes, benefits, and time-off tracking',\n 'Handles contracts, transfers, and terminations',\n ],\n description: 'Enables hiring in countries without a local entity',\n label: 'Employer of Record',\n value: eorProductIdentifier,\n }\n : null;\n\n return { eorSubscription, isLoading: isLoadingPricingPlans };\n};\n\ntype SelectedCountry =\n | (Pick<Country, 'eor_onboarding' | 'contractor_products_available'> & {\n label: string;\n })\n | undefined;\n\nconst addEorToFieldOptions = (\n fieldOptions: $TSFixMe[],\n eorSubscription: ReturnType<typeof useEorSubscription>['eorSubscription'],\n excludeProducts?: ProductType[],\n) => {\n if (\n eorSubscription &&\n shouldIncludeProduct(eorProductIdentifier, excludeProducts)\n ) {\n fieldOptions.push({\n label: eorSubscription.label,\n value: eorSubscription.value,\n description: eorSubscription.description,\n meta: {\n features: eorSubscription.features,\n price: {\n amount: eorSubscription.price.amount,\n currencyCode: eorSubscription.currency?.code ?? '',\n },\n },\n disabled: false,\n });\n }\n return fieldOptions;\n};\n\nexport const useContractorSubscriptionSchemaField = (\n employmentId: string,\n selectedCountry: SelectedCountry,\n options?: FlowOptions & {\n queryOptions?: { enabled?: boolean };\n excludeProducts?: ProductType[];\n },\n) => {\n const {\n data: contractorSubscriptions,\n isLoading,\n refetch,\n } = useGetContractorSubscriptions({\n employmentId: employmentId,\n options: {\n queryOptions: options?.queryOptions,\n },\n });\n\n const filteredContractorSubscriptions = useMemo(\n () =>\n contractorSubscriptions?.filter((subscription) =>\n shouldIncludeProduct(\n subscription.product.identifier ?? '',\n options?.excludeProducts,\n ),\n ) ?? [],\n [contractorSubscriptions, options?.excludeProducts],\n );\n\n // maximum number of subscriptions\n const MAXIMUM_CONTRACTOR_SUBSCRIPTIONS_COUNT = 3;\n\n const isMissingSubscriptions = contractorSubscriptions\n ? contractorSubscriptions?.length < MAXIMUM_CONTRACTOR_SUBSCRIPTIONS_COUNT\n : false;\n\n const corSubscription = contractorSubscriptions?.find(\n (subscription) => subscription.product.identifier === corProductIdentifier,\n );\n\n const isEligibilityQuestionnaireBlocked =\n corSubscription?.eligibility_questionnaire?.is_blocking;\n\n const showEorSubscription =\n (isMissingSubscriptions || isEligibilityQuestionnaireBlocked) &&\n selectedCountry?.eor_onboarding &&\n !options?.excludeProducts?.includes('eor');\n\n const { eorSubscription, isLoading: isLoadingEorSubscription } =\n useEorSubscription({\n enabled: showEorSubscription,\n });\n\n const hasAvailableOptions =\n filteredContractorSubscriptions.length > 0 ||\n (showEorSubscription && eorSubscription !== null);\n\n const form = createHeadlessForm(\n selectContractorSubscriptionStepSchema.data.schema,\n {},\n {\n ...options,\n jsfModify: {\n ...options?.jsfModify,\n // If no filtered subscriptions are available, make the subscription field optional\n required: hasAvailableOptions\n ? options?.jsfModify?.required\n : (existingRequired: string[]) =>\n existingRequired.filter(\n (fieldName: string) => fieldName !== 'subscription',\n ),\n },\n },\n );\n\n const field: JSFField | undefined = form.fields.find(\n (field) => field.name === 'subscription',\n ) as JSFField | undefined;\n\n if (field) {\n // Start with contractor management options\n const contractorOptions = filteredContractorSubscriptions.map((opts) => {\n const product = opts.product;\n const price = opts.price.amount;\n const currencyCode = opts.currency.code;\n const title =\n CONTRACT_PRODUCT_TITLES[\n product.identifier as keyof typeof CONTRACT_PRODUCT_TITLES\n ] ?? '';\n const label = title;\n const value = product.identifier ?? '';\n const description = product.description ?? '';\n\n if (!product.description) {\n console.error(\n `[Data Integrity] Missing description for product: ${product.identifier}`,\n { product },\n );\n }\n\n const features =\n product.features ??\n FEATURES_BY_IDENTIFIER[\n product.identifier as keyof typeof FEATURES_BY_IDENTIFIER\n ] ??\n [];\n const meta = {\n features,\n price: {\n amount: convertFromCents(price),\n currencyCode: currencyCode,\n },\n };\n return {\n label,\n value,\n description,\n meta,\n disabled:\n isEligibilityQuestionnaireBlocked &&\n product.identifier !== contractorStandardProductIdentifier,\n };\n });\n\n // Sort contractor options\n contractorOptions.sort((a, b) => a.label.localeCompare(b.label));\n\n // Build otherSubscriptions (EOR) with separator metadata\n const otherOptions: $TSFixMe[] = [];\n if (showEorSubscription) {\n addEorToFieldOptions(\n otherOptions as unknown as $TSFixMe[],\n eorSubscription,\n options?.excludeProducts,\n );\n\n // Add separator metadata to first \"other\" option\n // only the first option to avoid problems when iterating over the options\n if (otherOptions.length > 0) {\n otherOptions[0].meta = {\n ...otherOptions[0].meta,\n groupSeparator: {\n show: true,\n },\n };\n }\n }\n\n // Combine all options into the single field\n field.options = [...contractorOptions, ...otherOptions];\n }\n\n return {\n isLoading: isLoading || isLoadingEorSubscription,\n form,\n contractorSubscriptions,\n filteredContractorSubscriptions,\n refetch,\n isEligibilityQuestionnaireBlocked,\n };\n};\n\nexport const useUpdateUKandSaudiFields = (\n createContractorContractDocumentMutation: ReturnType<\n typeof useCreateContractorContractDocument\n >,\n uploadFileMutation: ReturnType<typeof useUploadFile>,\n parsedValues: FieldValues,\n) => {\n const { mutateAsyncOrThrow: uploadFileMutationAsync } =\n mutationToPromise(uploadFileMutation);\n const { mutateAsyncOrThrow: createContractorContractDocumentMutationAsync } =\n mutationToPromise(createContractorContractDocumentMutation);\n\n return {\n mutateAsync: async ({ employmentId }: { employmentId: string }) => {\n const {\n nationality_status: nationalityStatus,\n ir35: ir35Status,\n ir35_sds_file: ir35SdsFile,\n } = parsedValues;\n const ir35ContractDetailsPayload = {\n contract_document: {\n ir_35: ir35Status,\n },\n };\n const nationalityContractDetailsPayload = {\n contract_document: {\n nationality: nationalityStatus,\n },\n };\n if (ir35Status) {\n await createContractorContractDocumentMutationAsync({\n employmentId: employmentId,\n payload: ir35ContractDetailsPayload,\n });\n\n if (ir35SdsFile) {\n return uploadFileMutationAsync({\n employment_id: employmentId,\n file: ir35SdsFile,\n sub_type: IR35_FILE_SUBTYPE,\n });\n }\n return Promise.resolve();\n }\n // nationality status is sent for the countries SAU, KWT, OMN, QAT, BHR\n if (nationalityStatus) {\n return createContractorContractDocumentMutationAsync({\n employmentId: employmentId,\n payload: nationalityContractDetailsPayload,\n });\n }\n\n return Promise.resolve();\n },\n };\n};\n\nexport const useGetIR35File = (\n employmentId: string,\n options?: { enabled?: boolean },\n) => {\n const { data: ir35Files, isLoading: isLoadingFiles } = useEmploymentFiles(\n employmentId,\n {\n sub_type: IR35_FILE_SUBTYPE,\n },\n {\n ...options,\n select: ({ data }) =>\n data?.files?.filter((file) => file.sub_type === IR35_FILE_SUBTYPE),\n },\n );\n const id = ir35Files?.[0]?.id;\n\n const downloadQuery = useDownloadFile(id as string);\n\n return {\n ...downloadQuery,\n isLoading: isLoadingFiles || downloadQuery.isLoading,\n };\n};\n\n/**\n * Get the contract documents for a given employment\n * @param employmentId - The employment ID\n * @param options - The options\n * @returns The contract documents\n */\nexport const useGetContractDocuments = (\n employmentId: string,\n options?: { enabled?: boolean },\n) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['contract-documents', employmentId],\n queryFn: async () => {\n return getV1EmploymentsEmploymentIdContractDocuments({\n client: client as Client,\n path: { employment_id: employmentId },\n });\n },\n enabled: options?.enabled,\n select: ({ data }) => {\n return data?.data?.contract_documents;\n },\n });\n};\n\nexport const useGetEligibilityQuestionnaire = ({\n options,\n fieldValues,\n}: {\n options?: FlowOptions & { queryOptions?: { enabled?: boolean } };\n fieldValues: FieldValues;\n}) => {\n const { client } = useClient();\n return useQuery<\n EligibilityQuestionnaireJsonSchemaResponse['data'],\n Error,\n JSONSchemaFormResultWithFieldsets\n >({\n queryKey: ['eligibility-questionnaire'],\n queryFn: async (): Promise<\n EligibilityQuestionnaireJsonSchemaResponse['data']\n > => {\n const response = await getV1ContractorsSchemasEligibilityQuestionnaire({\n client: client as Client,\n query: {\n type: 'contractor_of_record',\n json_schema_version: 1,\n },\n });\n\n // Extract the data from the response wrapper\n if (response.error) {\n throw new Error('Failed to fetch eligibility questionnaire');\n }\n\n return response.data\n .data as EligibilityQuestionnaireJsonSchemaResponse['data'];\n },\n select: (data: EligibilityQuestionnaireJsonSchemaResponse['data']) => {\n const schema = data?.schema || {};\n return createHeadlessForm(schema, fieldValues, {\n jsfModify: options?.jsfModify,\n });\n },\n enabled: options?.queryOptions?.enabled,\n });\n};\n\nexport const usePostCreateEligibilityQuestionnaire = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({\n employmentId,\n payload,\n }: {\n employmentId: string;\n payload: SubmitEligibilityQuestionnaireRequest['responses'];\n }) => {\n return postV1ContractorsEligibilityQuestionnaire({\n client: client as Client,\n body: {\n employment_slug: employmentId,\n responses: payload,\n type: 'contractor_of_record',\n },\n query: {\n json_schema_version: 1, // TODO: json_schema_version should be dynamic but fixed for now\n },\n });\n },\n });\n};\n\nexport const usePostManageContractorCorSubscription = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({ employmentId }: { employmentId: string }) => {\n return postV1ContractorsEmploymentsEmploymentIdContractorCorSubscription({\n client: client as Client,\n path: {\n employment_id: employmentId,\n },\n });\n },\n });\n};\n\nexport const useDeleteContractorCorSubscription = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({ employmentId }: { employmentId: string }) => {\n return deleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscription(\n {\n client: client as Client,\n path: { employment_id: employmentId },\n },\n );\n },\n });\n};\n\nexport const useSetContractOrigin = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({\n employmentId,\n contractOrigin,\n templateType,\n }: {\n employmentId: string;\n contractOrigin: PostV1EmploymentsEmploymentIdContractOriginData['body']['contract_origin'];\n templateType: PostV1EmploymentsEmploymentIdContractOriginData['body']['template_type'];\n }) => {\n return postV1EmploymentsEmploymentIdContractOrigin({\n client: client as Client,\n path: {\n employment_id: employmentId,\n },\n body: {\n contract_origin: contractOrigin,\n template_type: templateType,\n },\n });\n },\n });\n};\n\nexport const useGetContractOriginSchema = ({\n fieldValues,\n options,\n}: {\n fieldValues: FieldValues;\n options?: { queryOptions?: { enabled?: boolean }; jsfModify?: JSFModify };\n}) => {\n return useQuery({\n queryKey: ['contract-origin-schema', options?.jsfModify],\n queryFn: async () => {\n return createHeadlessForm(contractOriginSchema, fieldValues, {\n jsfModify: options?.jsfModify,\n });\n },\n enabled: options?.queryOptions?.enabled,\n });\n};\n\nexport const useGetInvoiceScheduleSchema = ({\n enabled,\n jsfModify,\n}: {\n enabled?: boolean;\n jsfModify?: JSFModify;\n}) => {\n return useMemo(() => {\n if (!enabled) return null;\n return createHeadlessForm(\n invoiceScheduleSchema,\n {},\n {\n jsfModify,\n },\n );\n }, [enabled, jsfModify]);\n};\n\n/**\n * Get the create invoice schedule schema with currency options from the contractor currencies endpoint.\n * React Query caches the result, so multiple calls share the same data.\n */\nexport const useGetCreateInvoiceScheduleSchema = ({\n enabled,\n employmentId,\n jsfModify,\n}: {\n enabled?: boolean;\n employmentId?: string;\n jsfModify?: JSFModify;\n}): { data: JSONSchemaFormResultWithFieldsets | null; isLoading: boolean } => {\n const { data: currencies, isLoading: isLoadingCurrencies } =\n useContractorCurrencies({\n employmentId: employmentId as string,\n options: {\n queryOptions: { enabled: enabled && Boolean(employmentId) },\n },\n });\n\n const schemaWithCurrencies = useMemo(() => {\n if (!enabled || !currencies) return null;\n\n // Clone the schema and update the currency oneOf with actual currencies\n const schema = {\n ...createInvoiceScheduleSchema,\n properties: {\n ...createInvoiceScheduleSchema.properties,\n currency: {\n ...createInvoiceScheduleSchema.properties.currency,\n oneOf: currencies.map(\n (currency: { code: string; source: string }) => ({\n const: currency.code,\n title: currency.code,\n }),\n ),\n },\n },\n };\n\n return createHeadlessForm(schema, {}, { jsfModify });\n }, [enabled, currencies, jsfModify]);\n\n return {\n data: schemaWithCurrencies,\n isLoading: isLoadingCurrencies,\n };\n};\n\n/**\n * Query options factory for fetching invoice schedules by employment id\n * @param client - The API client\n * @param employmentId - The employment ID\n * @returns Query options for contractor invoice schedules\n */\nexport const invoiceSchedulesOptions = (\n client: Client,\n employmentId: string,\n) => {\n return queryOptions({\n queryKey: ['contractor-invoice-schedules', employmentId] as const,\n queryFn: async () => {\n const response = await getV1ContractorInvoiceSchedules({\n client,\n query: { employment_id: employmentId },\n });\n\n if (response.error || !response.data) {\n throw new Error('Failed to fetch invoice schedules');\n }\n\n return response;\n },\n });\n};\n\n/**\n * Get the last invoice schedule for an employment that matches specific statuses.\n * This is used to determine if a schedule was previously created during onboarding.\n *\n * @param employmentId - The employment ID\n * @param options - Query options\n * @returns The last matching invoice schedule or undefined\n */\nexport const useGetExistingInvoiceSchedule = ({\n employmentId,\n options,\n}: {\n employmentId: string;\n options?: { queryOptions?: { enabled?: boolean } };\n}) => {\n const { client } = useClient();\n return useQuery({\n ...invoiceSchedulesOptions(client as Client, employmentId),\n enabled: options?.queryOptions?.enabled,\n select: (response) => {\n // Find the first invoice schedule that matches the editing criteria\n return response.data?.data?.contractor_invoice_schedules?.find(\n (invoice) =>\n invoice.status ===\n INVOICE_SCHEDULE_STATUS.PENDING_CONTRACTOR_ACTION ||\n invoice.status === INVOICE_SCHEDULE_STATUS.PROCESSING ||\n invoice.status === INVOICE_SCHEDULE_STATUS.PENDING_COMPANY_ACTION,\n );\n },\n });\n};\n\nexport const useCountriesSchemaField = (\n options?: Omit<FlowOptions, 'jsonSchemaVersion'> & {\n queryOptions?: { enabled?: boolean };\n },\n) => {\n const { client } = useClient();\n const { data: countries, isLoading } = useQuery({\n ...countriesOptions(client as Client, 'contractor-onboarding-countries'),\n select: (response) => {\n return (\n response.data?.data?.map((country) => {\n return {\n label: country.name,\n value: country.code,\n eor_onboarding: country.eor_onboarding,\n contractor_products_available:\n country.contractor_products_available,\n };\n }) || []\n );\n },\n enabled: options?.queryOptions?.enabled,\n });\n\n const selectCountryForm = createHeadlessForm(\n selectCountryStepSchema.data.schema,\n {},\n options,\n );\n\n if (countries) {\n const countryField = selectCountryForm.fields.find(\n (field) => field.name === 'country',\n );\n if (countryField) {\n countryField.options = countries;\n }\n }\n\n return {\n isLoading,\n selectCountryForm,\n countries,\n };\n};\n\nexport const useCompanyOpenTasks = ({\n options,\n}: {\n options?: { queryOptions?: { enabled?: boolean } };\n} = {}) => {\n const { data: identity } = useIdentity();\n const companyId = hasCompany(identity) ? (identity?.company?.id ?? '') : '';\n const { client } = useClient();\n\n return useQuery({\n queryKey: ['company-open-tasks', companyId],\n queryFn: () =>\n getV1CompaniesCompanyIdActions({\n client: client as Client,\n path: { company_id: companyId },\n }),\n select: ({ data }) => data?.data?.actions ?? ([] as CompanyAction[]),\n enabled: (options?.queryOptions?.enabled ?? true) && !!companyId,\n });\n};\n\n/**\n * Creates contractor invoice schedules\n * @param employmentId - The employment ID\n * @param values - The form values containing invoice schedule data\n * @returns The created invoice schedules\n */\nexport const useCreateInvoiceSchedule = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({\n employmentId,\n values,\n }: {\n employmentId: string;\n values: FieldValues;\n }) => {\n const payload: BulkContractorInvoiceScheduleCreateParams = {\n contractor_invoice_schedules: [\n {\n employment_id: employmentId,\n ...buildInvoiceSchedulePayload(values),\n } as ContractorInvoiceScheduleCreateParams,\n ],\n };\n\n return postV1ContractorInvoiceSchedules({\n client: client as Client,\n body: payload,\n });\n },\n });\n};\n\n/**\n * Updates an existing contractor invoice schedule\n * @param scheduleId - The invoice schedule ID\n * @param values - The form values containing invoice schedule data\n * @returns The updated invoice schedule\n */\nexport const useUpdateInvoiceSchedule = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({\n scheduleId,\n values,\n }: {\n scheduleId: string;\n values: FieldValues;\n }) => {\n const payload: UpdateScheduleContractorInvoiceParams =\n buildInvoiceSchedulePayload(values);\n\n return patchV1ContractorInvoiceSchedulesId2({\n client: client as Client,\n path: { id: scheduleId },\n body: payload,\n });\n },\n });\n};\n","import { useMemo } from 'react';\nimport { useQuery, UseQueryResult } from '@tanstack/react-query';\nimport { FieldValues } from 'react-hook-form';\nimport {\n getV1CountriesCountryCodeContractorContractDetails,\n getV1ContractorsEmploymentsEmploymentIdContractorCurrencies,\n} from '@/src/client';\nimport { useClient } from '@/src/context';\nimport { Client } from '@/src/client/client';\nimport { createHeadlessForm } from '@/src/common/createHeadlessForm';\nimport {\n FlowOptions,\n JSONSchemaFormResultWithFieldsets,\n} from '@/src/flows/types';\nimport { $TSFixMe } from '@/src/types/remoteFlows';\n\nexport const useContractorCurrencies = ({\n employmentId,\n options,\n}: {\n employmentId: string;\n options?: { queryOptions?: { enabled?: boolean } };\n}) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['contractor-currencies', employmentId],\n queryFn: async () => {\n return getV1ContractorsEmploymentsEmploymentIdContractorCurrencies({\n client: client as Client,\n path: { employment_id: employmentId },\n query: {\n restrict_to_guaranteed_pay_out_currencies: false,\n },\n });\n },\n enabled: options?.queryOptions?.enabled,\n select: ({ data }) => {\n return data?.data;\n },\n });\n};\n\n/**\n * Get the contractor onboarding details schema for a given country\n * @param countryCode - The country code\n * @param fieldValues - The field values\n * @param options - The options\n * @returns The contractor onboarding details schema\n */\nconst useContractorOnboardingDetailsSchema = ({\n countryCode,\n employmentId,\n fieldValues,\n options,\n}: {\n countryCode: string;\n fieldValues: FieldValues;\n employmentId: string;\n options?: FlowOptions & { queryOptions?: { enabled?: boolean } };\n}): UseQueryResult<JSONSchemaFormResultWithFieldsets> => {\n const { client } = useClient();\n return useQuery({\n queryKey: [\n 'contractor-onboarding-details-schema',\n countryCode,\n employmentId,\n ],\n retry: false,\n queryFn: async () => {\n return getV1CountriesCountryCodeContractorContractDetails({\n client: client as Client,\n path: { country_code: countryCode },\n query: {\n json_schema_version: 1,\n employment_id: employmentId,\n },\n });\n },\n enabled: options?.queryOptions?.enabled,\n select: ({ data }) => {\n const jsfSchema = data?.data?.schema || {};\n return createHeadlessForm(jsfSchema, fieldValues, options);\n },\n });\n};\n\n/**\n * Get contractor onboarding details schema with currency options overridden\n * from the getIndexContractorCurrency endpoint\n */\nexport const useContractorContractDetailsSchema = ({\n countryCode,\n employmentId,\n fieldValues,\n options,\n}: {\n countryCode: string;\n fieldValues: FieldValues;\n employmentId: string;\n options?: FlowOptions & { queryOptions?: { enabled?: boolean } };\n}) => {\n const schemaQuery = useContractorOnboardingDetailsSchema({\n countryCode,\n employmentId,\n fieldValues,\n options,\n });\n\n const { data: currencies, isLoading: isLoadingCurrencies } =\n useContractorCurrencies({\n employmentId,\n options: {\n queryOptions: { enabled: options?.queryOptions?.enabled },\n },\n });\n\n const dataWithCurrencies = useMemo(() => {\n if (!schemaQuery.data || !currencies) {\n return schemaQuery.data;\n }\n\n const form = {\n ...schemaQuery.data,\n fields: schemaQuery.data.fields.map((field) => {\n if (field.name !== 'payment_terms') {\n return field;\n }\n\n return {\n ...field,\n fields: (field.fields as $TSFixMe[])?.map((nestedField: $TSFixMe) => {\n if (nestedField.name !== 'compensation_currency_code') {\n return nestedField;\n }\n\n // Return a new object with overridden options\n return {\n ...nestedField,\n options: currencies.map((currency) => ({\n label: currency.code,\n value: currency.code,\n meta: { source: currency.source },\n })),\n };\n }),\n };\n }),\n };\n\n return form;\n }, [schemaQuery.data, currencies]);\n\n return {\n ...schemaQuery,\n data: dataWithCurrencies as $TSFixMe,\n isLoading: schemaQuery.isLoading || isLoadingCurrencies,\n };\n};\n","import { useMutation, useQuery, UseQueryOptions } from '@tanstack/react-query';\nimport { Client } from '@/src/client/client';\nimport {\n getV1EmploymentsEmploymentIdFiles,\n getV1FilesId,\n postV1Documents,\n} from '@/src/client/sdk.gen';\nimport {\n GetV1EmploymentsEmploymentIdFilesData,\n GetV1EmploymentsEmploymentIdFilesErrors,\n File as ApiFile,\n ListFilesResponse,\n PostV1DocumentsData,\n} from '@/src/client/types.gen';\nimport { useClient } from '@/src/context';\n\n/**\n * Hook to upload a file associated with a specified employment.\n * @returns A mutation result for uploading employee files.\n */\nexport const useUploadFile = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: (params: PostV1DocumentsData['body']) => {\n return postV1Documents({\n client: client as Client,\n body: params,\n headers: {\n Authorization: ``,\n },\n });\n },\n });\n};\n\n/**\n * Hook to download a file by its ID.\n * @param id - The ID of the file to download.\n * @returns A query result containing the file data.\n */\nexport const useDownloadFile = (id: string) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['download-file', id],\n queryFn: async () => {\n const result = await getV1FilesId({\n client: client as Client,\n path: { id: id },\n });\n\n if (result.error) {\n throw result.error;\n }\n\n return result.data;\n },\n select: ({ data }) => data?.file,\n enabled: !!id,\n });\n};\n\n/**\n * Hook to retrieve files associated with a specific employment.\n * @param employmentId - The ID of the employment to retrieve files for.\n * @param queryParams - The query parameters to filter the files.\n * @param queryOptions - Optional TanStack Query options to customize the query behavior.\n * @returns A query result containing the employment files.\n */\nexport const useEmploymentFiles = (\n employmentId: string,\n queryParams: GetV1EmploymentsEmploymentIdFilesData['query'],\n queryOptions?: Omit<\n UseQueryOptions<\n ListFilesResponse,\n GetV1EmploymentsEmploymentIdFilesErrors,\n ApiFile[] | undefined,\n unknown[]\n >,\n 'queryKey' | 'queryFn'\n >,\n) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['employment-files', employmentId],\n queryFn: async () => {\n const result = await getV1EmploymentsEmploymentIdFiles({\n client: client as Client,\n path: { employment_id: employmentId },\n query: queryParams,\n });\n\n if (result.error) {\n throw result.error;\n }\n\n return result.data;\n },\n ...queryOptions,\n });\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useClient } from '@/src/context';\nimport {\n getV1CompaniesCompanyIdPricingPlans,\n IdentityCurrentResponse,\n} from '@/src/client';\nimport { Client } from '@/src/client/client';\nimport { useIdentity } from '@/src/common/api/identity';\n\nexport function hasCompany(\n identity: IdentityCurrentResponse['data'] | undefined,\n): identity is Extract<\n IdentityCurrentResponse['data'],\n { company: { id: string } }\n> {\n return identity != null && 'company' in identity;\n}\n\nexport const useCompanyPricingPlans = (\n queryOptions: { enabled?: boolean } = { enabled: true },\n) => {\n const { data: identity } = useIdentity();\n const companyId = hasCompany(identity) ? (identity?.company?.id ?? '') : '';\n const { client } = useClient();\n return useQuery({\n queryKey: ['pricing-plans', companyId],\n queryFn: () =>\n getV1CompaniesCompanyIdPricingPlans({\n client: client as Client,\n path: { company_id: companyId },\n }),\n select: (data) => data.data?.data?.pricing_plans,\n enabled: Boolean(queryOptions?.enabled) && !!companyId,\n });\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { getV1IdentityCurrent } from '@/src/client';\nimport { useClient } from '@/src/context';\nimport { Client } from '@/src/client/client';\n\nexport const useIdentity = () => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['identity'],\n queryFn: () =>\n getV1IdentityCurrent({\n client: client as Client,\n headers: { Authorization: `` },\n }),\n select: (data) => data.data?.data,\n });\n};\n"],"mappings":"8zBAAA,OAAS,WAAAA,MAAe,QCAxB,OAAS,WAAAC,OAAe,QACxB,OAAS,YAAAC,OAAgC,wBAelC,IAAMC,EAA0BC,EAAA,CAAC,CACtC,aAAAC,EACA,QAAAC,CACF,IAGM,CACJ,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAU,EAC7B,OAAOC,GAAS,CACd,SAAU,CAAC,wBAAyBJ,CAAY,EAChD,QAASD,EAAA,SACAM,EAA4D,C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AAc,SAAW,KAAS,CAAC,CAAC0I,CACzD,CAAC,CACH,EAnBmC,uBA2BtBG,GAA2B/I,EAAA,IAAM,CAC5C,GAAM,CAAE,OAAAO,CAAO,EAAIC,EAAU,EAC7B,OAAOC,EAAY,CACjB,WAAYT,EAAA,MAAO,CACjB,aAAAU,EACA,OAAAsI,CACF,IAGM,CACJ,IAAMpI,EAAqD,CACzD,6BAA8B,CAC5B,CACE,cAAeF,EACf,GAAGuI,EAA4BD,CAAM,CACvC,CACF,CACF,EAEA,OAAOE,GAAiC,CACtC,OAAQ3I,EACR,KAAMK,CACR,CAAC,CACH,EApBY,aAqBd,CAAC,CACH,EAzBwC,4BAiC3BuI,GAA2BnJ,EAAA,IAAM,CAC5C,GAAM,CAAE,OAAAO,CAAO,EAAIC,EAAU,EAC7B,OAAOC,EAAY,CACjB,WAAYT,EAAA,MAAO,CACjB,WAAAoJ,EACA,OAAAJ,CACF,IAGM,CACJ,IAAMpI,EACJqI,EAA4BD,CAAM,EAEpC,OAAOK,EAAqC,CAC1C,OAAQ9I,EACR,KAAM,CAAE,GAAI6I,CAAW,EACvB,KAAMxI,CACR,CAAC,CACH,EAfY,aAgBd,CAAC,CACH,EApBwC","names":["useMemo","useMemo","useQuery","useContractorCurrencies","__name","employmentId","options","client","useClient","useQuery","getV1ContractorsEmploymentsEmploymentIdContractorCurrencies","data","useContractorOnboardingDetailsSchema","countryCode","fieldValues","getV1CountriesCountryCodeContractorContractDetails","jsfSchema","createHeadlessForm","useContractorContractDetailsSchema","schemaQuery","currencies","isLoadingCurrencies","dataWithCurrencies","useMemo","field","nestedField","currency","useMutation","useQuery","queryOptions","useMutation","useQuery","useUploadFile","__name","client","useClient","useMutation","params","postV1Documents","useDownloadFile","id","useQuery","result","getV1FilesId","data","useEmploymentFiles","employmentId","queryParams","queryOptions","getV1EmploymentsEmploymentIdFiles","useQuery","useQuery","useIdentity","__name","client","useClient","useQuery","getV1IdentityCurrent","data","hasCompany","identity","__name","useCompanyPricingPlans","queryOptions","useIdentity","companyId","client","useClient","useQuery","getV1CompaniesCompanyIdPricingPlans","data","useGetContractDocumentSignatureSchema","__name","fieldValues","options","useQuery","createHeadlessForm","signatureSchema","useSignContractDocument","client","useClient","useMutation","employmentId","contractDocumentId","payload","postV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSign","useGetShowContractDocument","getV1ContractorsEmploymentsEmploymentIdContractDocumentsId","data","clearBase64Data","useHasCompanySignedContract","documentPreviewPdf","signatory","useGetContractorSubscriptions","getV1ContractorsEmploymentsEmploymentIdContractorSubscriptions","usePostManageContractorSubscriptions","postV1ContractorsEmploymentsEmploymentIdContractorPlusSubscription","useCreateContractorContractDocument","postV1ContractorsEmploymentsEmploymentIdContractDocuments","CONTRACT_PRODUCT_TITLES","contractorStandardProductIdentifier","contractorPlusProductIdentifier","corProductIdentifier","useEorSubscription","pricingPlans","isLoadingPricingPlans","useCompanyPricingPlans","eorPricingPlan","plan","eorProductIdentifier","convertFromCents","addEorToFieldOptions","fieldOptions","eorSubscription","excludeProducts","shouldIncludeProduct","useContractorSubscriptionSchemaField","selectedCountry","contractorSubscriptions","isLoading","refetch","filteredContractorSubscriptions","useMemo","subscription","isMissingSubscriptions","isEligibilityQuestionnaireBlocked","showEorSubscription","isLoadingEorSubscription","hasAvailableOptions","form","selectContractorSubscriptionStepSchema","existingRequired","fieldName","field","contractorOptions","opts","product","price","currencyCode","label","value","description","meta","FEATURES_BY_IDENTIFIER","a","b","otherOptions","useUpdateUKandSaudiFields","createContractorContractDocumentMutation","uploadFileMutation","parsedValues","uploadFileMutationAsync","mutationToPromise","createContractorContractDocumentMutationAsync","nationalityStatus","ir35Status","ir35SdsFile","ir35ContractDetailsPayload","nationalityContractDetailsPayload","IR35_FILE_SUBTYPE","useGetIR35File","ir35Files","isLoadingFiles","useEmploymentFiles","file","id","downloadQuery","useDownloadFile","useGetContractDocuments","getV1EmploymentsEmploymentIdContractDocuments","useGetEligibilityQuestionnaire","response","getV1ContractorsSchemasEligibilityQuestionnaire","schema","usePostCreateEligibilityQuestionnaire","postV1ContractorsEligibilityQuestionnaire","usePostManageContractorCorSubscription","postV1ContractorsEmploymentsEmploymentIdContractorCorSubscription","useDeleteContractorCorSubscription","deleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscription","useSetContractOrigin","contractOrigin","templateType","postV1EmploymentsEmploymentIdContractOrigin","useGetContractOriginSchema","contractOriginSchema","useGetInvoiceScheduleSchema","enabled","jsfModify","invoiceScheduleSchema","useGetCreateInvoiceScheduleSchema","currencies","isLoadingCurrencies","useContractorCurrencies","createInvoiceScheduleSchema","currency","invoiceSchedulesOptions","queryOptions","getV1ContractorInvoiceSchedules","useGetExistingInvoiceSchedule","invoice","INVOICE_SCHEDULE_STATUS","useCountriesSchemaField","countries","countriesOptions","country","selectCountryForm","selectCountryStepSchema","countryField","useCompanyOpenTasks","identity","useIdentity","companyId","hasCompany","getV1CompaniesCompanyIdActions","useCreateInvoiceSchedule","values","buildInvoiceSchedulePayload","postV1ContractorInvoiceSchedules","useUpdateInvoiceSchedule","scheduleId","patchV1ContractorInvoiceSchedulesId2"]}
@@ -1,2 +1,2 @@
1
- import{a as ee}from"./chunk-SL5WZ76A.js";import{a as z}from"./chunk-VFRHMNLJ.js";import{a as W,b as X,c as Y,f as Z}from"./chunk-7ZQYMDNU.js";import{a as C}from"./chunk-HN5HLFTB.js";import{a as I}from"./chunk-KFYWUBRS.js";import{c as te}from"./chunk-4IDFJ6DS.js";import{a as Q}from"./chunk-XFVXRCMH.js";import{b as G,h as M}from"./chunk-C4HFMTSB.js";import{a as o}from"./chunk-P37U34EQ.js";import{number as Te,object as le}from"yup";import{useCallback as we,useEffect as ne,useMemo as Re,useRef as Pe,useState as j}from"react";import{string as re,ValidationError as ie}from"yup";import{jsx as ae}from"react/jsx-runtime";var O={title:"Estimation",includeBenefits:!1,includeCostBreakdowns:!1,includePremiumBenefits:!1,enableCurrencyConversion:!1,includeEstimationTitle:!1,includeManagementFee:!1},xe=o(t=>Q(z.data.schema,void 0,t),"useStaticSchema");function Be(t,i){if(typeof t=="object"&&t!==null&&"title"in t){let l=t.title;if(l)return l}return i==="my_hiring_budget"?"Hiring budget":"Employee's annual salary"}o(Be,"getSalaryTitle");var Qe=o(({defaultRegion:t,defaultCurrency:i,defaultSalary:l,estimationOptions:s,options:n,version:a}={estimationOptions:O})=>{let c=Pe({fields:{}}),[k,h]=j(t),[w,R]=j(),[m,q]=j(),[H,ce]=j(),{data:_,isLoading:ue}=W({includePremiumBenefits:s.includePremiumBenefits}),{data:d,isLoading:me}=X(),de=k||w?.value,{data:P,isLoading:fe}=Z(de,{includePremiumBenefits:s.includePremiumBenefits,options:n}),U=Y(),{mutateAsync:ge}=G(U),b=w?.currency,p=n?.jsfModify?.fields?.salary,F=p&&typeof p=="object"&&"presentation"in p?p.presentation:void 0,L=we(()=>{let e=b&&m?b!==m:!1;return b!==m?{from:m,to:b,shouldSwapOrder:e}:{from:b,to:m,shouldSwapOrder:e}},[b,m]),D=s.showManagementFee,J=s.includeEstimationTitle,$=n?.features?.includes("split_salary_description")??!1,ye=Re(()=>{let{from:e,to:r,shouldSwapOrder:u}=L(),g=Be(p,H);return{fields:{salary:{...p,title:g,presentation:{salary_conversion_properties:{label:F?.salary_conversion_properties?.label,description:F?.salary_conversion_properties?.description},currencies:{from:e,to:r},Component:o(y=>ae(ee,{...y,shouldSwapOrder:u,conversionType:a==="marketing"?"no_spread":"spread",defaultValue:l,splitDescription:$}),"Component")}},hiring_budget:{...n?.jsfModify?.fields?.hiring_budget,presentation:{hidden:a=="marketing"}},management:{...n?.jsfModify?.fields?.management,properties:{...n?.jsfModify?.fields?.management?.properties,management_fee:{...n?.jsfModify?.fields?.management?.properties?.management_fee,"x-jsf-presentation":{inputType:"money",additionalProps:{currency:m||"USD"}}}},presentation:{...typeof n?.jsfModify?.fields?.management=="object"?(n?.jsfModify?.fields?.management)["x-jsf-presentation"]:{},hidden:!D,Component:o(y=>ae(te,{...y,variant:"inset",features:{toggle:{enabled:!0,stateField:"management._expanded",labels:{expand:"Define",collapse:"Remove"}}}}),"Component")}},estimation_title:{...n?.jsfModify?.fields?.estimation_title,"x-jsf-presentation":{hidden:!J}}}}},[L,p,H,F?.salary_conversion_properties?.label,F?.salary_conversion_properties?.description,n?.jsfModify?.fields?.hiring_budget,n?.jsfModify?.fields?.management,n?.jsfModify?.fields?.estimation_title,a,m,D,J,l,$]),f=xe({jsfModify:{fields:{...n?.jsfModify?.fields,...ye?.fields}}});ne(()=>{if(t&&_){let e=_.find(({value:r})=>r===t);e&&R(e)}},[t,_]),ne(()=>{if(i&&d){let e=d.find(({value:r})=>r===i);e&&q(e.label)}},[i,d]);async function pe(e){return ge(se(e,s,a))}o(pe,"onSubmit");function Ce(e){let r=_?.find(({value:u})=>u===e);r&&r.childRegions.length===0&&r.hasAdditionalFields?h(r.regionSlug):h(void 0),R(r)}o(Ce,"onCountryChange");function _e(e){h(e)}o(_e,"onRegionChange");function be(e){ce(e.target.value)}o(be,"onHiringBudgetChange");function Se(e){let r=d?.find(u=>u.value===e)?.label;q(r),n?.onCurrencyChange?.(r||"")}o(Se,"onChangeCurrency");let S=f.fields.find(e=>e.name==="region");if(S){let e=w?.childRegions.map(r=>({value:r.slug,label:r.name}))??[];S.options=e,S.isVisible=e.length>0,S.required=e.length>0,S.onChange=_e,S.schema=e.length>0?re().transform(r=>typeof r=="string"?r:"").required("Region is required"):re()}if(d){let e=f.fields.find(r=>r.name==="currency");e&&(e.options=d,e.onChange=Se)}let v=f.fields.find(e=>e.name==="hiring_budget");if(v&&(v.onChange=be),_){let e=f.fields.find(r=>r.name==="country");e&&(e.options=_,e.onChange=Ce)}let Ee=o(()=>{R(void 0),h(t)},"resetForm"),N=[...f.fields.filter(e=>e.name!=="management"),...P?.fields||[],...f.fields.filter(e=>e.name==="management")],K=oe(f.fields,m||"USD",s.includeEstimationTitle);async function he(e){let r=null;n?.onValidation?.(e);let u=await M(e,N);try{await K.validate(u,{abortEarly:!1}),r={formErrors:{},yupError:new ie([],e)}}catch(E){let B=I(E);r={formErrors:Object.entries(B).reduce((T,[A,V])=>({...T,[A]:V.message}),{}),yupError:E}}let g=P?.handleValidation(u),y=[...r?.yupError.inner||[],...g?.yupError?.inner||[]],x={...r?.yupError?.value||{},...g?.yupError?.value||{}};return{formErrors:{...r?.formErrors||{},...g?.formErrors||{}},yupError:new ie(y,x)}}return o(he,"handleValidation"),{stepState:{current:0,total:1,isLastStep:!0},fields:N,validationSchema:K,parseFormValues:o(async e=>{let{country:r,region:u,currency:g,salary_converted:y,hiring_budget:x,salary_conversion:E,management:B,estimation_title:T,...A}=e,V=e.salary;y==="salary_conversion"&&(V=E);let Fe=await M({country:r,region:u,salary:V,salary_converted:y,salary_conversion:E,hiring_budget:x,currency:g,management:B,estimation_title:T},f.fields),Ve=await M(A,P?.fields||[]),Me={currency_code:d?.find(je=>je.value===g)?.label};return{...Fe,...Ve,...Me}},"parseFormValues"),handleValidation:he,isSubmitting:U.isPending,isLoading:ue&&me&&fe,onSubmit:pe,resetForm:Ee,currencies:d,meta:{fields:c.current?.fields}}},"useCostCalculator");function oe(t,i,l){let s=t.reduce((n,a)=>(a.name==="salary"||a.name==="salary_conversion"?n[a.name]=a.schema.when("salary_converted",{is:o(c=>c===a.name,"is"),then:o(c=>c.required("Required field"),"then"),otherwise:o(c=>c.optional(),"otherwise")}):a.name==="management"?n[a.name]=le({management_fee:Te().transform(c=>isNaN(c)?void 0:c).min(0,"Management fee must be greater than or equal to 0").max(i?C[i]:C.USD,()=>`Management fee cannot exceed ${(i?C[i]:C.USD)/100} ${i}`)}):a.name==="estimation_title"&&l?n[a.name]=a.schema.required("Required field"):n[a.name]=a.schema,n),{});return le(s)}o(oe,"buildValidationSchema");function Ae(t){let i="benefit-";return Object.keys(t).reduce((l,s)=>{let n=t[s];if(n==="none")return l;let c={benefit_group_slug:s.replace(i,""),benefit_tier_slug:n};return[...l,c]},[])}o(Ae,"formatBenefits");function Oe(t,i,l){let s=Number(t.management?.management_fee),n=t.currency_code;return{...{region_slug:t.region||t.country,employment_term:t.contract_duration_type??"fixed",title:t.estimation_title||i.title,age:t.age??void 0,...t.benefits&&{benefits:Ae(t.benefits)},...i.includeManagementFee&&s&&{discount:{quoted_amount:i.showManagementFee?s:C[n]||C.USD,text:""}}},...ke(t,l)}}o(Oe,"mapValueToEmployment");function ke(t,i){let l=i==="marketing"||t.salary_converted==="salary_conversion",s=i==="standard"&&t.salary_converted==="salary",n=t.hiring_budget==="my_hiring_budget";if(l){let a=t.salary_converted==="salary_conversion";return n?{annual_total_cost_in_employer_currency:t.salary}:{[a?"annual_gross_salary_in_employer_currency":"annual_gross_salary"]:t.salary}}return s?n?{annual_total_cost:t.salary}:{annual_gross_salary:t.salary}:{}}o(ke,"getSalaryFields");function se(t,i=O,l="standard"){let s=Array.isArray(t)?t:[t];if(s.length===0)throw new Error("At least one employment value is required");return s.length>1&&new Set(s.map(a=>a.currency)).size>1&&console.warn("Multiple currencies detected in array. Using currency from first employment."),{employer_currency_slug:s[0].currency,include_benefits:i.includeBenefits,include_cost_breakdowns:i.includeCostBreakdowns,include_premium_benefits:i.includePremiumBenefits,include_management_fee:i.includeManagementFee,employments:s.map(n=>Oe(n,i,l))}}o(se,"buildPayload");export{oe as a,se as b,O as c,Qe as d};
2
- //# sourceMappingURL=chunk-VBWACHT3.js.map
1
+ import{a as ee}from"./chunk-4YFJOHSM.js";import{a as C}from"./chunk-HN5HLFTB.js";import{a as z}from"./chunk-VFRHMNLJ.js";import{a as W,b as X,c as Y,f as Z}from"./chunk-ILX6RI7K.js";import{a as I}from"./chunk-KFYWUBRS.js";import{c as te}from"./chunk-ALHHN2LG.js";import{a as Q}from"./chunk-XFVXRCMH.js";import{b as G,h as M}from"./chunk-C4HFMTSB.js";import{a as o}from"./chunk-P37U34EQ.js";import{number as Te,object as le}from"yup";import{useCallback as we,useEffect as ne,useMemo as Re,useRef as Pe,useState as j}from"react";import{string as re,ValidationError as ie}from"yup";import{jsx as ae}from"react/jsx-runtime";var O={title:"Estimation",includeBenefits:!1,includeCostBreakdowns:!1,includePremiumBenefits:!1,enableCurrencyConversion:!1,includeEstimationTitle:!1,includeManagementFee:!1},xe=o(t=>Q(z.data.schema,void 0,t),"useStaticSchema");function Be(t,i){if(typeof t=="object"&&t!==null&&"title"in t){let l=t.title;if(l)return l}return i==="my_hiring_budget"?"Hiring budget":"Employee's annual salary"}o(Be,"getSalaryTitle");var Qe=o(({defaultRegion:t,defaultCurrency:i,defaultSalary:l,estimationOptions:s,options:n,version:a}={estimationOptions:O})=>{let c=Pe({fields:{}}),[k,h]=j(t),[w,R]=j(),[m,q]=j(),[H,ce]=j(),{data:_,isLoading:ue}=W({includePremiumBenefits:s.includePremiumBenefits}),{data:d,isLoading:me}=X(),de=k||w?.value,{data:P,isLoading:fe}=Z(de,{includePremiumBenefits:s.includePremiumBenefits,options:n}),U=Y(),{mutateAsync:ge}=G(U),b=w?.currency,p=n?.jsfModify?.fields?.salary,F=p&&typeof p=="object"&&"presentation"in p?p.presentation:void 0,L=we(()=>{let e=b&&m?b!==m:!1;return b!==m?{from:m,to:b,shouldSwapOrder:e}:{from:b,to:m,shouldSwapOrder:e}},[b,m]),D=s.showManagementFee,J=s.includeEstimationTitle,$=n?.features?.includes("split_salary_description")??!1,ye=Re(()=>{let{from:e,to:r,shouldSwapOrder:u}=L(),g=Be(p,H);return{fields:{salary:{...p,title:g,presentation:{salary_conversion_properties:{label:F?.salary_conversion_properties?.label,description:F?.salary_conversion_properties?.description},currencies:{from:e,to:r},Component:o(y=>ae(ee,{...y,shouldSwapOrder:u,conversionType:a==="marketing"?"no_spread":"spread",defaultValue:l,splitDescription:$}),"Component")}},hiring_budget:{...n?.jsfModify?.fields?.hiring_budget,presentation:{hidden:a=="marketing"}},management:{...n?.jsfModify?.fields?.management,properties:{...n?.jsfModify?.fields?.management?.properties,management_fee:{...n?.jsfModify?.fields?.management?.properties?.management_fee,"x-jsf-presentation":{inputType:"money",additionalProps:{currency:m||"USD"}}}},presentation:{...typeof n?.jsfModify?.fields?.management=="object"?(n?.jsfModify?.fields?.management)["x-jsf-presentation"]:{},hidden:!D,Component:o(y=>ae(te,{...y,variant:"inset",features:{toggle:{enabled:!0,stateField:"management._expanded",labels:{expand:"Define",collapse:"Remove"}}}}),"Component")}},estimation_title:{...n?.jsfModify?.fields?.estimation_title,"x-jsf-presentation":{hidden:!J}}}}},[L,p,H,F?.salary_conversion_properties?.label,F?.salary_conversion_properties?.description,n?.jsfModify?.fields?.hiring_budget,n?.jsfModify?.fields?.management,n?.jsfModify?.fields?.estimation_title,a,m,D,J,l,$]),f=xe({jsfModify:{fields:{...n?.jsfModify?.fields,...ye?.fields}}});ne(()=>{if(t&&_){let e=_.find(({value:r})=>r===t);e&&R(e)}},[t,_]),ne(()=>{if(i&&d){let e=d.find(({value:r})=>r===i);e&&q(e.label)}},[i,d]);async function pe(e){return ge(se(e,s,a))}o(pe,"onSubmit");function Ce(e){let r=_?.find(({value:u})=>u===e);r&&r.childRegions.length===0&&r.hasAdditionalFields?h(r.regionSlug):h(void 0),R(r)}o(Ce,"onCountryChange");function _e(e){h(e)}o(_e,"onRegionChange");function be(e){ce(e.target.value)}o(be,"onHiringBudgetChange");function Se(e){let r=d?.find(u=>u.value===e)?.label;q(r),n?.onCurrencyChange?.(r||"")}o(Se,"onChangeCurrency");let S=f.fields.find(e=>e.name==="region");if(S){let e=w?.childRegions.map(r=>({value:r.slug,label:r.name}))??[];S.options=e,S.isVisible=e.length>0,S.required=e.length>0,S.onChange=_e,S.schema=e.length>0?re().transform(r=>typeof r=="string"?r:"").required("Region is required"):re()}if(d){let e=f.fields.find(r=>r.name==="currency");e&&(e.options=d,e.onChange=Se)}let v=f.fields.find(e=>e.name==="hiring_budget");if(v&&(v.onChange=be),_){let e=f.fields.find(r=>r.name==="country");e&&(e.options=_,e.onChange=Ce)}let Ee=o(()=>{R(void 0),h(t)},"resetForm"),N=[...f.fields.filter(e=>e.name!=="management"),...P?.fields||[],...f.fields.filter(e=>e.name==="management")],K=oe(f.fields,m||"USD",s.includeEstimationTitle);async function he(e){let r=null;n?.onValidation?.(e);let u=await M(e,N);try{await K.validate(u,{abortEarly:!1}),r={formErrors:{},yupError:new ie([],e)}}catch(E){let B=I(E);r={formErrors:Object.entries(B).reduce((T,[A,V])=>({...T,[A]:V.message}),{}),yupError:E}}let g=P?.handleValidation(u),y=[...r?.yupError.inner||[],...g?.yupError?.inner||[]],x={...r?.yupError?.value||{},...g?.yupError?.value||{}};return{formErrors:{...r?.formErrors||{},...g?.formErrors||{}},yupError:new ie(y,x)}}return o(he,"handleValidation"),{stepState:{current:0,total:1,isLastStep:!0},fields:N,validationSchema:K,parseFormValues:o(async e=>{let{country:r,region:u,currency:g,salary_converted:y,hiring_budget:x,salary_conversion:E,management:B,estimation_title:T,...A}=e,V=e.salary;y==="salary_conversion"&&(V=E);let Fe=await M({country:r,region:u,salary:V,salary_converted:y,salary_conversion:E,hiring_budget:x,currency:g,management:B,estimation_title:T},f.fields),Ve=await M(A,P?.fields||[]),Me={currency_code:d?.find(je=>je.value===g)?.label};return{...Fe,...Ve,...Me}},"parseFormValues"),handleValidation:he,isSubmitting:U.isPending,isLoading:ue&&me&&fe,onSubmit:pe,resetForm:Ee,currencies:d,meta:{fields:c.current?.fields}}},"useCostCalculator");function oe(t,i,l){let s=t.reduce((n,a)=>(a.name==="salary"||a.name==="salary_conversion"?n[a.name]=a.schema.when("salary_converted",{is:o(c=>c===a.name,"is"),then:o(c=>c.required("Required field"),"then"),otherwise:o(c=>c.optional(),"otherwise")}):a.name==="management"?n[a.name]=le({management_fee:Te().transform(c=>isNaN(c)?void 0:c).min(0,"Management fee must be greater than or equal to 0").max(i?C[i]:C.USD,()=>`Management fee cannot exceed ${(i?C[i]:C.USD)/100} ${i}`)}):a.name==="estimation_title"&&l?n[a.name]=a.schema.required("Required field"):n[a.name]=a.schema,n),{});return le(s)}o(oe,"buildValidationSchema");function Ae(t){let i="benefit-";return Object.keys(t).reduce((l,s)=>{let n=t[s];if(n==="none")return l;let c={benefit_group_slug:s.replace(i,""),benefit_tier_slug:n};return[...l,c]},[])}o(Ae,"formatBenefits");function Oe(t,i,l){let s=Number(t.management?.management_fee),n=t.currency_code;return{...{region_slug:t.region||t.country,employment_term:t.contract_duration_type??"fixed",title:t.estimation_title||i.title,age:t.age??void 0,...t.benefits&&{benefits:Ae(t.benefits)},...i.includeManagementFee&&s&&{discount:{quoted_amount:i.showManagementFee?s:C[n]||C.USD,text:""}}},...ke(t,l)}}o(Oe,"mapValueToEmployment");function ke(t,i){let l=i==="marketing"||t.salary_converted==="salary_conversion",s=i==="standard"&&t.salary_converted==="salary",n=t.hiring_budget==="my_hiring_budget";if(l){let a=t.salary_converted==="salary_conversion";return n?{annual_total_cost_in_employer_currency:t.salary}:{[a?"annual_gross_salary_in_employer_currency":"annual_gross_salary"]:t.salary}}return s?n?{annual_total_cost:t.salary}:{annual_gross_salary:t.salary}:{}}o(ke,"getSalaryFields");function se(t,i=O,l="standard"){let s=Array.isArray(t)?t:[t];if(s.length===0)throw new Error("At least one employment value is required");return s.length>1&&new Set(s.map(a=>a.currency)).size>1&&console.warn("Multiple currencies detected in array. Using currency from first employment."),{employer_currency_slug:s[0].currency,include_benefits:i.includeBenefits,include_cost_breakdowns:i.includeCostBreakdowns,include_premium_benefits:i.includePremiumBenefits,include_management_fee:i.includeManagementFee,employments:s.map(n=>Oe(n,i,l))}}o(se,"buildPayload");export{oe as a,se as b,O as c,Qe as d};
2
+ //# sourceMappingURL=chunk-J4CHUIPC.js.map
@@ -0,0 +1,2 @@
1
+ var e={type:"object",properties:{invoice_schedule_preference:{description:"Set up a schedule to automatically create invoices on behalf of this contractor.",oneOf:[{const:"schedule",description:"Set up a schedule to create invoices for this contractor now.",title:"Create invoice schedule now"},{const:"manual",description:"You or your contractor can always set up an invoice schedule later.",title:"Skip for now"}],title:"Invoice schedule",type:"string","x-jsf-presentation":{direction:"column",inputType:"radio",meta:{helpCenter:{id:0xc168fac108d,callToAction:"Learn about invoice schedules"}}}}},required:["invoice_schedule_preference"]};export{e as a};
2
+ //# sourceMappingURL=chunk-JKHJR6HK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/ContractorOnboarding/json-schemas/invoiceSchedule.ts"],"sourcesContent":["export const invoiceScheduleSchema = {\n type: 'object',\n properties: {\n invoice_schedule_preference: {\n description:\n 'Set up a schedule to automatically create invoices on behalf of this contractor.',\n oneOf: [\n {\n const: 'schedule',\n description:\n 'Set up a schedule to create invoices for this contractor now.',\n title: 'Create invoice schedule now',\n },\n {\n const: 'manual',\n description:\n 'You or your contractor can always set up an invoice schedule later.',\n title: 'Skip for now',\n },\n ],\n title: 'Invoice schedule',\n type: 'string',\n 'x-jsf-presentation': {\n direction: 'column',\n inputType: 'radio',\n meta: {\n helpCenter: {\n id: 13291039232141,\n callToAction: 'Learn about invoice schedules',\n },\n },\n },\n },\n },\n required: ['invoice_schedule_preference'],\n};\n"],"mappings":"AAAO,IAAMA,EAAwB,CACnC,KAAM,SACN,WAAY,CACV,4BAA6B,CAC3B,YACE,mFACF,MAAO,CACL,CACE,MAAO,WACP,YACE,gEACF,MAAO,6BACT,EACA,CACE,MAAO,SACP,YACE,sEACF,MAAO,cACT,CACF,EACA,MAAO,mBACP,KAAM,SACN,qBAAsB,CACpB,UAAW,SACX,UAAW,QACX,KAAM,CACJ,WAAY,CACV,GAAI,cACJ,aAAc,+BAChB,CACF,CACF,CACF,CACF,EACA,SAAU,CAAC,6BAA6B,CAC1C","names":["invoiceScheduleSchema"]}
@@ -1,2 +1,2 @@
1
- import{a as u}from"./chunk-KBYI7L5E.js";import{a as f,b as g}from"./chunk-SXW4FROO.js";import{b as R}from"./chunk-D7MYOH3P.js";import{j as t,k as F,l as s,n as d,o as _}from"./chunk-AUPAAQUT.js";import{n as l}from"./chunk-C4HFMTSB.js";import{a as c}from"./chunk-P37U34EQ.js";import{Fragment as h}from"react";import{jsx as e,jsxs as m}from"react/jsx-runtime";var w=c(({field:n,fieldData:a,fieldState:C})=>{let{name:r,label:i,description:p,options:b}=a;return e("fieldset",{className:l("space-y-3",`RemoteFlows__RadioGroupField__Item__${r}`),"data-field":r,children:m(t,{children:[e("legend",{children:i}),(p||a.meta?.helpCenter)&&e(d,{helpCenter:e(u,{helpCenter:a.meta?.helpCenter}),children:p}),e(s,{children:e(f,{"aria-label":i||r,onValueChange:o=>{n.onChange(o)},value:n.value,className:"flex flex-col",children:b?.map(o=>e(h,{children:m(t,{"data-field":r,className:"flex items-start space-x-3 space-y-0 gap-0 min-h-[24px] RemoteFlows__RadioField__Item",children:[e(s,{children:e(g,{value:o.value,className:l("RemoteFlows__RadioField__Input",o.recommended&&"mt-1"),disabled:o.disabled})}),m("div",{children:[m(F,{className:"font-normal mb-0 RemoteFlows__RadioField__Label",children:[e("span",{dangerouslySetInnerHTML:{__html:o.label}})," ",o.recommended&&e(R,{variant:"secondary",className:"ml-2",children:"Recommended"})]}),o.description&&e(d,{className:"mt-2",children:o.description})]})]})},o.value))})}),C.error&&e(_,{})]})})},"RadioGroupFieldDefault");export{w as a};
2
- //# sourceMappingURL=chunk-HCL7WLOR.js.map
1
+ import{a as u}from"./chunk-WGDZTF7Y.js";import{a as f,b as g}from"./chunk-SXW4FROO.js";import{b as R}from"./chunk-D7MYOH3P.js";import{j as t,k as F,l as s,n as d,o as _}from"./chunk-AUPAAQUT.js";import{n as l}from"./chunk-C4HFMTSB.js";import{a as c}from"./chunk-P37U34EQ.js";import{Fragment as h}from"react";import{jsx as e,jsxs as m}from"react/jsx-runtime";var w=c(({field:n,fieldData:a,fieldState:C})=>{let{name:r,label:i,description:p,options:b}=a;return e("fieldset",{className:l("space-y-3",`RemoteFlows__RadioGroupField__Item__${r}`),"data-field":r,children:m(t,{children:[e("legend",{children:i}),(p||a.meta?.helpCenter)&&e(d,{helpCenter:e(u,{helpCenter:a.meta?.helpCenter}),children:p}),e(s,{children:e(f,{"aria-label":i||r,onValueChange:o=>{n.onChange(o)},value:n.value,className:"flex flex-col",children:b?.map(o=>e(h,{children:m(t,{"data-field":r,className:"flex items-start space-x-3 space-y-0 gap-0 min-h-[24px] RemoteFlows__RadioField__Item",children:[e(s,{children:e(g,{value:o.value,className:l("RemoteFlows__RadioField__Input",o.recommended&&"mt-1"),disabled:o.disabled})}),m("div",{children:[m(F,{className:"font-normal mb-0 RemoteFlows__RadioField__Label",children:[e("span",{dangerouslySetInnerHTML:{__html:o.label}})," ",o.recommended&&e(R,{variant:"secondary",className:"ml-2",children:"Recommended"})]}),o.description&&e(d,{className:"mt-2",children:o.description})]})]})},o.value))})}),C.error&&e(_,{})]})})},"RadioGroupFieldDefault");export{w as a};
2
+ //# sourceMappingURL=chunk-JLM4O7ZW.js.map
@@ -1,2 +1,2 @@
1
- import{c as e}from"./chunk-3OLZMSGR.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as o,jsxs as t}from"react/jsx-runtime";var a=n(({involuntaryOffboardingServiceChargeZendeskId:r,reconciliationInvoiceZendeskId:i})=>t("p",{className:"RemoteFlows__AcknowledgeInformationFees text-xs text-[#71717A]",children:["You'll receive an"," ",o(e,{zendeskId:r,className:"align-baseline",children:"involuntary offboarding service charge \u2197"})," ","on your"," ",o(e,{zendeskId:i,children:"reconciliation invoice \u2197"})]}),"AcknowledgeInformationFees");export{a};
2
- //# sourceMappingURL=chunk-H3JVB7GS.js.map
1
+ import{a as e}from"./chunk-5TOSVOLY.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as o,jsxs as t}from"react/jsx-runtime";var a=n(({involuntaryOffboardingServiceChargeZendeskId:r,reconciliationInvoiceZendeskId:i})=>t("p",{className:"RemoteFlows__AcknowledgeInformationFees text-xs text-[#71717A]",children:["You'll receive an"," ",o(e,{zendeskId:r,className:"align-baseline",children:"involuntary offboarding service charge \u2197"})," ","on your"," ",o(e,{zendeskId:i,children:"reconciliation invoice \u2197"})]}),"AcknowledgeInformationFees");export{a};
2
+ //# sourceMappingURL=chunk-JMFCG5KA.js.map
@@ -1,2 +1,2 @@
1
- import{a as d,b as w}from"./chunk-BHTFKQJO.js";import{a as g}from"./chunk-MREG2JYT.js";import{a as E}from"./chunk-XFVXRCMH.js";import{H as P,aa as F,e as _}from"./chunk-XI55YG73.js";import{b as h,h as C}from"./chunk-C4HFMTSB.js";import{a as j}from"./chunk-XPVYX7LE.js";import{e as c}from"./chunk-H2O4CVKF.js";import{a as e}from"./chunk-P37U34EQ.js";import{useMutation as b,useQuery as I}from"@tanstack/react-query";var B=e(({countryCode:n,employment:r,fieldValues:a,options:t})=>{let{client:u}=c(),m=t?.jsonSchemaVersion?.contract_amendments?{json_schema_version:t.jsonSchemaVersion.contract_amendments}:{};return I({queryKey:["contract-amendment-schema"],retry:!1,queryFn:e(async()=>{let o=await _({client:u,headers:{Authorization:""},query:{employment_id:r?.id,country_code:n,...m}});if(o.error||!o.data)throw new Error("Failed to fetch contract amendment schema");return o},"queryFn"),enabled:!!r,select:e(({data:o})=>{let l=o?.data||{};return E(l,a,t)},"select")})},"useContractAmendmentSchemaQuery"),J=e(n=>{let{client:r}=c(),a=n?.jsonSchemaVersion?.contract_amendments?{json_schema_version:n.jsonSchemaVersion.contract_amendments}:{};return b({mutationFn:e(t=>P({client:r,headers:{Authorization:""},body:t,query:{...a}}),"mutationFn")})},"useCreateContractAmendmentMutation"),K=e(n=>{let{client:r}=c(),a=n?.jsonSchemaVersion?.contract_amendments?{json_schema_version:n.jsonSchemaVersion.contract_amendments}:{};return b({mutationFn:e(t=>F({client:r,headers:{Authorization:""},body:t,query:{...a}}),"mutationFn")})},"useAutomatableContractAmendmentMutation"),te=e(({employmentId:n,countryCode:r,options:a})=>{let{fieldValues:t,setFieldValues:u,stepState:m,nextStep:o,previousStep:l}=j(d),{data:i,isLoading:v,isError:q,error:Q}=g({employmentId:n,queryParams:{exclude_files:!0}}),{data:s,isLoading:L,isError:M,error:T}=B({employment:i,countryCode:r,fieldValues:{...m.values?.[m.currentStep.name],...t},options:a}),k=w(i,s?.fields),S=J(a),A=K(a);async function x(p){let f=await C(p,s?.fields||[],{isPartialValidation:!1}),V={employment_id:i?.id,amendment_contract_id:i?.active_contract_id,contract_amendment:{...f}};switch(m.currentStep.name){case d.form.name:{let{mutateAsync:y}=h(A),H=await y(V);return o(),H}case d.confirmation_form.name:{let{mutateAsync:y}=h(S);return y(V)}default:throw new Error("Invalid step state")}}e(x,"onSubmit");async function z(p){if(s){let f=await C(p,s?.fields);return s?.handleValidation(f)}return null}e(z,"handleValidation");function O(){l()}return e(O,"back"),{stepState:m,fields:s?.fields||[],isLoading:v||L,isError:q||M,error:Q||T,isSubmitting:A.isPending||S.isPending,initialValues:k,values:t,handleValidation:z,checkFieldUpdates:u,onSubmit:x,back:O}},"useContractAmendment");export{te as a};
2
- //# sourceMappingURL=chunk-2FI5CCXQ.js.map
1
+ import{a as d,b as w}from"./chunk-BHTFKQJO.js";import{a as g}from"./chunk-POWC7LZN.js";import{a as E}from"./chunk-XFVXRCMH.js";import{J as P,da as F,e as _}from"./chunk-VNMUML3T.js";import{b as h,h as C}from"./chunk-C4HFMTSB.js";import{a as j}from"./chunk-M3TA5X2H.js";import{e as c}from"./chunk-H2O4CVKF.js";import{a as e}from"./chunk-P37U34EQ.js";import{useMutation as b,useQuery as I}from"@tanstack/react-query";var B=e(({countryCode:n,employment:r,fieldValues:a,options:t})=>{let{client:u}=c(),m=t?.jsonSchemaVersion?.contract_amendments?{json_schema_version:t.jsonSchemaVersion.contract_amendments}:{};return I({queryKey:["contract-amendment-schema"],retry:!1,queryFn:e(async()=>{let o=await _({client:u,headers:{Authorization:""},query:{employment_id:r?.id,country_code:n,...m}});if(o.error||!o.data)throw new Error("Failed to fetch contract amendment schema");return o},"queryFn"),enabled:!!r,select:e(({data:o})=>{let l=o?.data||{};return E(l,a,t)},"select")})},"useContractAmendmentSchemaQuery"),J=e(n=>{let{client:r}=c(),a=n?.jsonSchemaVersion?.contract_amendments?{json_schema_version:n.jsonSchemaVersion.contract_amendments}:{};return b({mutationFn:e(t=>P({client:r,headers:{Authorization:""},body:t,query:{...a}}),"mutationFn")})},"useCreateContractAmendmentMutation"),K=e(n=>{let{client:r}=c(),a=n?.jsonSchemaVersion?.contract_amendments?{json_schema_version:n.jsonSchemaVersion.contract_amendments}:{};return b({mutationFn:e(t=>F({client:r,headers:{Authorization:""},body:t,query:{...a}}),"mutationFn")})},"useAutomatableContractAmendmentMutation"),te=e(({employmentId:n,countryCode:r,options:a})=>{let{fieldValues:t,setFieldValues:u,stepState:m,nextStep:o,previousStep:l}=j(d),{data:i,isLoading:v,isError:q,error:Q}=g({employmentId:n,queryParams:{exclude_files:!0}}),{data:s,isLoading:L,isError:M,error:T}=B({employment:i,countryCode:r,fieldValues:{...m.values?.[m.currentStep.name],...t},options:a}),k=w(i,s?.fields),S=J(a),A=K(a);async function x(p){let f=await C(p,s?.fields||[],{isPartialValidation:!1}),V={employment_id:i?.id,amendment_contract_id:i?.active_contract_id,contract_amendment:{...f}};switch(m.currentStep.name){case d.form.name:{let{mutateAsync:y}=h(A),H=await y(V);return o(),H}case d.confirmation_form.name:{let{mutateAsync:y}=h(S);return y(V)}default:throw new Error("Invalid step state")}}e(x,"onSubmit");async function z(p){if(s){let f=await C(p,s?.fields);return s?.handleValidation(f)}return null}e(z,"handleValidation");function O(){l()}return e(O,"back"),{stepState:m,fields:s?.fields||[],isLoading:v||L,isError:q||M,error:Q||T,isSubmitting:A.isPending||S.isPending,initialValues:k,values:t,handleValidation:z,checkFieldUpdates:u,onSubmit:x,back:O}},"useContractAmendment");export{te as a};
2
+ //# sourceMappingURL=chunk-JQ3SLOUP.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-YPBPOUGX.js";import{a as n}from"./chunk-ISETCY2V.js";import{b as t}from"./chunk-SS2SYDCB.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as i}from"react/jsx-runtime";function b(l){let{employeeBag:e}=t(),r=a(l);return e.selfOnboardingSubsteps.some(s=>s.type==="employee_provides_bank_details")?i(n,{onSubmit:r,defaultValues:{...e.initialValues?.bank_account,...e.stepState.values?.bank_account}}):null}o(b,"BankAccountStep");export{b as a};
2
- //# sourceMappingURL=chunk-FXVLXN2B.js.map
1
+ import{a}from"./chunk-YPBPOUGX.js";import{a as n}from"./chunk-IUBHVGVV.js";import{b as t}from"./chunk-SS2SYDCB.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as i}from"react/jsx-runtime";function b(l){let{employeeBag:e}=t(),r=a(l);return e.selfOnboardingSubsteps.some(s=>s.type==="employee_provides_bank_details")?i(n,{onSubmit:r,defaultValues:{...e.initialValues?.bank_account,...e.stepState.values?.bank_account}}):null}o(b,"BankAccountStep");export{b as a};
2
+ //# sourceMappingURL=chunk-JRRPMAUO.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-YPBPOUGX.js";import{a as l}from"./chunk-ISETCY2V.js";import{b as t}from"./chunk-SS2SYDCB.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function u(n){let{employeeBag:e}=t(),r=a(n);return s(l,{onSubmit:r,defaultValues:{...e.initialValues?.personal_details,...e.stepState.values?.personal_details}})}o(u,"PersonalDetailsStep");export{u as a};
2
- //# sourceMappingURL=chunk-ONUE4K6F.js.map
1
+ import{a}from"./chunk-YPBPOUGX.js";import{a as l}from"./chunk-IUBHVGVV.js";import{b as t}from"./chunk-SS2SYDCB.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function u(n){let{employeeBag:e}=t(),r=a(n);return s(l,{onSubmit:r,defaultValues:{...e.initialValues?.personal_details,...e.stepState.values?.personal_details}})}o(u,"PersonalDetailsStep");export{u as a};
2
+ //# sourceMappingURL=chunk-K67Q5476.js.map
@@ -1,2 +1,2 @@
1
- import{b as t}from"./chunk-4MI7BMM5.js";import{a}from"./chunk-UZFEJMO6.js";import{a as r}from"./chunk-TYCOSAU4.js";import{h as m}from"./chunk-AUPAAQUT.js";import{a as n}from"./chunk-P37U34EQ.js";import{useEffect as p}from"react";import{jsx as i}from"react/jsx-runtime";import{createElement as h}from"react";var k=n(({onSubmit:d,className:l,components:c})=>{let{formId:u,playgroundBag:e}=t(),o=a({handleValidation:e.handleValidation,defaultValues:e.initialValues,checkFieldUpdates:e.checkFieldUpdates});p(()=>{e.checkFieldUpdates(o.getValues())},[]);let f=n(async s=>{await e.handleSubmit(s),d?.(s)},"handleFormSubmit");return h(m,{...o,key:`form-${e.selectedSchema}-${e.resetKey}`},i("form",{id:u,onSubmit:o.handleSubmit(f),className:l,children:i(r,{components:c,fields:e.fields??[],fieldValues:e.fieldValues,fieldsets:e.meta["x-jsf-fieldsets"]})}))},"JsonSchemaPlaygroundForm");export{k as a};
2
- //# sourceMappingURL=chunk-ZGGEJ3FD.js.map
1
+ import{b as t}from"./chunk-4MI7BMM5.js";import{a}from"./chunk-UZFEJMO6.js";import{a as r}from"./chunk-VQRE3YLW.js";import{h as m}from"./chunk-AUPAAQUT.js";import{a as n}from"./chunk-P37U34EQ.js";import{useEffect as p}from"react";import{jsx as i}from"react/jsx-runtime";import{createElement as h}from"react";var k=n(({onSubmit:d,className:l,components:c})=>{let{formId:u,playgroundBag:e}=t(),o=a({handleValidation:e.handleValidation,defaultValues:e.initialValues,checkFieldUpdates:e.checkFieldUpdates});p(()=>{e.checkFieldUpdates(o.getValues())},[]);let f=n(async s=>{await e.handleSubmit(s),d?.(s)},"handleFormSubmit");return h(m,{...o,key:`form-${e.selectedSchema}-${e.resetKey}`},i("form",{id:u,onSubmit:o.handleSubmit(f),className:l,children:i(r,{components:c,fields:e.fields??[],fieldValues:e.fieldValues,fieldsets:e.meta["x-jsf-fieldsets"]})}))},"JsonSchemaPlaygroundForm");export{k as a};
2
+ //# sourceMappingURL=chunk-KPDYUFCB.js.map
@@ -1,2 +1,2 @@
1
- import{a as _}from"./chunk-KBYI7L5E.js";import{a as c}from"./chunk-2QVO3BVI.js";import{j as i,k as p,l as a,n as s,o as F}from"./chunk-AUPAAQUT.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as e,jsxs as d}from"react/jsx-runtime";function w({field:o,fieldState:C,fieldData:m}){let{name:t,label:r,description:l}=m;return d(i,{"data-field":t,className:`RemoteFlows__TimeField__Item__${t}`,children:[r&&e(p,{className:"RemoteFlows__TimeField__Label",children:r}),e(a,{children:e(c,{...o,type:"time",value:o.value??"",onChange:T=>{o.onChange(T)},className:"RemoteFlows__TimeField__Input",placeholder:r})}),(l||m.meta?.helpCenter)&&e(s,{className:"RemoteFlows__TimeField__Description",helpCenter:e(_,{helpCenter:m.meta?.helpCenter}),children:l}),C.error&&e(F,{className:"RemoteFlows__TimeField__Error"})]})}n(w,"TimeFieldDefault");export{w as a};
2
- //# sourceMappingURL=chunk-5BJXFWKN.js.map
1
+ import{a as _}from"./chunk-WGDZTF7Y.js";import{a as c}from"./chunk-2QVO3BVI.js";import{j as i,k as p,l as a,n as s,o as F}from"./chunk-AUPAAQUT.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as e,jsxs as d}from"react/jsx-runtime";function w({field:o,fieldState:C,fieldData:m}){let{name:t,label:r,description:l}=m;return d(i,{"data-field":t,className:`RemoteFlows__TimeField__Item__${t}`,children:[r&&e(p,{className:"RemoteFlows__TimeField__Label",children:r}),e(a,{children:e(c,{...o,type:"time",value:o.value??"",onChange:T=>{o.onChange(T)},className:"RemoteFlows__TimeField__Input",placeholder:r})}),(l||m.meta?.helpCenter)&&e(s,{className:"RemoteFlows__TimeField__Description",helpCenter:e(_,{helpCenter:m.meta?.helpCenter}),children:l}),C.error&&e(F,{className:"RemoteFlows__TimeField__Error"})]})}n(w,"TimeFieldDefault");export{w as a};
2
+ //# sourceMappingURL=chunk-KZ5ZQTBF.js.map
@@ -1,2 +1,2 @@
1
- import{b as n}from"./chunk-MRYRNB7Y.js";import{a as l}from"./chunk-UZFEJMO6.js";import{a as t}from"./chunk-TYCOSAU4.js";import{h as a}from"./chunk-AUPAAQUT.js";import{a as r}from"./chunk-P37U34EQ.js";import{jsx as e}from"react/jsx-runtime";function S({defaultValues:s,fields:i,onSubmit:d}){let{formId:F,terminationBag:o}=n(),m=l({handleValidation:o.handleValidation,defaultValues:s,checkFieldUpdates:o.checkFieldUpdates}),u=i||(o?.fields??[]);return e(a,{...m,children:e("form",{id:F,onSubmit:m.handleSubmit(d),className:"space-y-4 RemoteFlows__TerminationForm",children:e(t,{fields:u})})})}r(S,"TerminationForm");export{S as a};
2
- //# sourceMappingURL=chunk-VY64RMAF.js.map
1
+ import{b as n}from"./chunk-MRYRNB7Y.js";import{a as l}from"./chunk-UZFEJMO6.js";import{a as t}from"./chunk-VQRE3YLW.js";import{h as a}from"./chunk-AUPAAQUT.js";import{a as r}from"./chunk-P37U34EQ.js";import{jsx as e}from"react/jsx-runtime";function S({defaultValues:s,fields:i,onSubmit:d}){let{formId:F,terminationBag:o}=n(),m=l({handleValidation:o.handleValidation,defaultValues:s,checkFieldUpdates:o.checkFieldUpdates}),u=i||(o?.fields??[]);return e(a,{...m,children:e("form",{id:F,onSubmit:m.handleSubmit(d),className:"space-y-4 RemoteFlows__TerminationForm",children:e(t,{fields:u})})})}r(S,"TerminationForm");export{S as a};
2
+ //# sourceMappingURL=chunk-LCUURLXS.js.map
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-C3YSF5RT.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as a}from"react/jsx-runtime";var c=e(({currency:n,desiredCurrency:o,annual_gross_salary_conversion_properties:r,splitDescription:i,...t})=>a(s,{...t,sourceCurrency:n,targetCurrency:o,splitDescription:i,conversionFieldName:"annual_gross_salary_conversion",conversionProperties:{...r,description:r?.description||"Estimated amount. This is an estimation. We calculate conversions based on spot rates that are subject to fluctuation over time."},classNamePrefix:"RemoteFlows-AnnualGrossSalary",conversionType:"no_spread"}),"AnnualGrossSalary");export{c as a};
2
- //# sourceMappingURL=chunk-DHS5QMH6.js.map
1
+ import{a as s}from"./chunk-DLIVHNTT.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as a}from"react/jsx-runtime";var c=e(({currency:n,desiredCurrency:o,annual_gross_salary_conversion_properties:r,splitDescription:i,...t})=>a(s,{...t,sourceCurrency:n,targetCurrency:o,splitDescription:i,conversionFieldName:"annual_gross_salary_conversion",conversionProperties:{...r,description:r?.description||"Estimated amount. This is an estimation. We calculate conversions based on spot rates that are subject to fluctuation over time."},classNamePrefix:"RemoteFlows-AnnualGrossSalary",conversionType:"no_spread"}),"AnnualGrossSalary");export{c as a};
2
+ //# sourceMappingURL=chunk-LCUYP6VW.js.map
@@ -0,0 +1,2 @@
1
+ import{a as u}from"./chunk-P37U34EQ.js";import{useState as F,useEffect as g,useRef as x}from"react";var O=u(s=>Object.values(s).find(r=>r.visible!==!1)||s[Object.keys(s)[0]],"getInitialStep"),h=u((s,c)=>{let d=Object.keys(s);if(d.length===0)throw new Error("No steps provided to useStepState");let r=x(s);r.current=s;let[S,f]=F({}),T=x(S);T.current=S;let v=O(s),[V,p]=F({currentStep:v,totalSteps:d.length,values:null});g(()=>{c?.(v)},[]);function y(){let{index:n}=V.currentStep,l=Object.values(r.current).find(e=>e.index>n&&e.visible!==!1);if(l){let e=T.current;p(t=>{let a=t.currentStep.name,o=t.values?.[a],b=Object.keys(e).length>0;return{...t,currentStep:l,values:{...t.values,[a]:b?{...o,...e}:o}}}),c?.(l),f({})}}u(y,"nextStep");function m(){let{index:n}=V.currentStep,l=Object.values(r.current).reverse().find(e=>e.index<n&&e.visible!==!1);if(l){let e=T.current;p(t=>{let a=t.currentStep.name,o=t.values?.[a],b=Object.keys(e).length>0;return{...t,currentStep:l,values:{...t.values,[a]:b?{...o,...e}:o}}}),c?.(l),f({})}}u(m,"previousStep");function j(n){p(i=>({...i,currentStep:r.current[n]})),c?.(r.current[n])}u(j,"goToStep");function k(n){p(i=>({...i,values:n}))}return u(k,"setStepValues"),{nextStep:y,previousStep:m,stepState:V,goToStep:j,fieldValues:S,setFieldValues:f,setStepValues:k}},"useStepState");export{h as a};
2
+ //# sourceMappingURL=chunk-M3TA5X2H.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/useStepState.ts"],"sourcesContent":["import { useState, useEffect, useRef } from 'react';\nimport { FieldValues } from 'react-hook-form';\n\nexport type Step<T extends string> = {\n index: number;\n name: T;\n visible?: boolean;\n};\n\ntype StepState<T extends string, Fields = FieldValues> = {\n currentStep: Step<T>;\n totalSteps: number;\n values:\n | {\n [key in T]: Fields;\n }\n | null;\n};\n\nconst getInitialStep = <T extends string>(steps: Record<T, Step<T>>) => {\n const stepValues = Object.values(steps) as Step<T>[];\n const firstVisibleStep = stepValues.find((step) => step.visible !== false);\n return firstVisibleStep || steps[Object.keys(steps)[0] as T]; // Fallback to first if none found\n};\n\nexport const useStepState = <T extends string, Fields = FieldValues>(\n steps: Record<T, Step<T>>,\n onStepChange?: (step: Step<T>) => void,\n) => {\n const stepKeys = Object.keys(steps) as Array<keyof typeof steps>;\n\n if (stepKeys.length === 0) {\n throw new Error('No steps provided to useStepState');\n }\n\n // Keep the latest steps in a ref so nextStep/previousStep/goToStep resolve\n // visibility against current data even when invoked from a callback that\n // closed over an earlier render — e.g. right after an async refetch flips a\n // step's visibility but before the component has re-rendered.\n const stepsRef = useRef(steps);\n stepsRef.current = steps;\n\n const [fieldValues, setFieldValues] = useState<Fields>({} as Fields);\n const fieldValuesRef = useRef(fieldValues);\n fieldValuesRef.current = fieldValues;\n const initialStep = getInitialStep(steps);\n const [stepState, setStepState] = useState<StepState<T, Fields>>({\n currentStep: initialStep,\n totalSteps: stepKeys.length,\n values: null,\n });\n\n // Call onStepChange once when the hook initializes\n // Note: intentionally no deps to only run on mount and avoid re-renders\n // when onStepChange/steps references change\n useEffect(() => {\n onStepChange?.(initialStep);\n // oxlint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n function nextStep() {\n const { index } = stepState.currentStep;\n const stepValues = Object.values<Step<T>>(stepsRef.current);\n const nextStep = stepValues.find(\n (step) => step.index > index && step.visible !== false,\n );\n\n if (nextStep) {\n // Captured before setFieldValues({}) below clears it: both updates\n // land in the same render, and fieldValuesRef.current would already\n // reflect the cleared value by the time the setStepState updater runs.\n const capturedFieldValues = fieldValuesRef.current;\n setStepState((previousState) => {\n const currentStepName = previousState.currentStep.name;\n const previousValues = previousState.values?.[currentStepName as T];\n const hasCapturedValues =\n Object.keys(capturedFieldValues as object).length > 0;\n\n return {\n ...previousState,\n currentStep: nextStep,\n values: {\n ...previousState.values,\n [currentStepName]: hasCapturedValues\n ? { ...previousValues, ...capturedFieldValues }\n : previousValues,\n } as { [key in T]: Fields },\n };\n });\n onStepChange?.(nextStep);\n setFieldValues({} as Fields);\n }\n }\n\n function previousStep() {\n const { index } = stepState.currentStep;\n const stepValues = Object.values<Step<T>>(stepsRef.current);\n const previousStep = stepValues\n .reverse()\n .find((step) => step.index < index && step.visible !== false);\n\n if (previousStep) {\n const capturedFieldValues = fieldValuesRef.current;\n setStepState((previousState) => {\n const currentStepName = previousState.currentStep.name;\n const previousValues = previousState.values?.[currentStepName as T];\n const hasCapturedValues =\n Object.keys(capturedFieldValues as object).length > 0;\n\n return {\n ...previousState,\n currentStep: previousStep,\n values: {\n ...previousState.values,\n [currentStepName]: hasCapturedValues\n ? { ...previousValues, ...capturedFieldValues }\n : previousValues,\n } as { [key in T]: Fields },\n };\n });\n onStepChange?.(previousStep);\n setFieldValues({} as Fields);\n }\n }\n\n function goToStep(step: T) {\n setStepState((previousState) => ({\n ...previousState,\n currentStep: stepsRef.current[step],\n }));\n onStepChange?.(stepsRef.current[step]);\n }\n\n function setStepValues(values: Record<T, Fields>) {\n setStepState((previousState) => ({\n ...previousState,\n values: values,\n }));\n }\n\n return {\n /**\n * Moves to the next step in the step state.\n * It updates the current step and resets the field values for the next step.\n * The field values for the current step are stored in the step state.\n * @returns {void}\n */\n nextStep,\n /**\n * Moves to the previous step in the step state.\n * It updates the current step and resets the field values for the previous step.\n * The field values for the current step are stored in the step state.\n * @returns {void}\n */\n previousStep,\n /**\n * The current step state containing the current step, total number of steps and\n * the form values for each step.\n * @returns {StepState<T>} The current step state.\n */\n stepState,\n /**\n * Goes to a specific step in the step state.\n * @param step The step to go to.\n * @returns {void}\n */\n goToStep,\n /**\n * The field values for the current step.\n * @returns {FieldValues} The field values for the current step.\n */\n fieldValues,\n /**\n * Sets the field values for the current step.\n * @param values The field values to set.\n * @returns {void}\n */\n setFieldValues,\n /**\n * Sets the step values for the step state.\n * This is used to update all values in the step state.\n * @param values The values to set for the all steps.\n * @returns {void}\n */\n setStepValues,\n };\n};\n"],"mappings":"wCAAA,OAAS,YAAAA,EAAU,aAAAC,EAAW,UAAAC,MAAc,QAmB5C,IAAMC,EAAiBC,EAAmBC,GACrB,OAAO,OAAOA,CAAK,EACF,KAAMC,GAASA,EAAK,UAAY,EAAK,GAC9CD,EAAM,OAAO,KAAKA,CAAK,EAAE,CAAC,CAAM,EAHtC,kBAMVE,EAAeH,EAAA,CAC1BC,EACAG,IACG,CACH,IAAMC,EAAW,OAAO,KAAKJ,CAAK,EAElC,GAAII,EAAS,SAAW,EACtB,MAAM,IAAI,MAAM,mCAAmC,EAOrD,IAAMC,EAAWC,EAAON,CAAK,EAC7BK,EAAS,QAAUL,EAEnB,GAAM,CAACO,EAAaC,CAAc,EAAIC,EAAiB,CAAC,CAAW,EAC7DC,EAAiBJ,EAAOC,CAAW,EACzCG,EAAe,QAAUH,EACzB,IAAMI,EAAcb,EAAeE,CAAK,EAClC,CAACY,EAAWC,CAAY,EAAIJ,EAA+B,CAC/D,YAAaE,EACb,WAAYP,EAAS,OACrB,OAAQ,IACV,CAAC,EAKDU,EAAU,IAAM,CACdX,IAAeQ,CAAW,CAE5B,EAAG,CAAC,CAAC,EAEL,SAASI,GAAW,CAClB,GAAM,CAAE,MAAAC,CAAM,EAAIJ,EAAU,YAEtBG,EADa,OAAO,OAAgBV,EAAS,OAAO,EAC9B,KACzBJ,GAASA,EAAK,MAAQe,GAASf,EAAK,UAAY,EACnD,EAEA,GAAIc,EAAU,CAIZ,IAAME,EA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C/B,GAAGA,EACH,OAAQO,CACV,EAAE,CACJ,CALS,OAAA1B,EAAAyB,EAAA,iBAOF,CAOL,SAAAT,EAOA,aAAAO,EAMA,UAAAV,EAMA,SAAAW,EAKA,YAAAhB,EAMA,eAAAC,EAOA,cAAAgB,CACF,CACF,EAjK4B","names":["useState","useEffect","useRef","getInitialStep","__name","steps","step","useStepState","onStepChange","stepKeys","stepsRef","useRef","fieldValues","setFieldValues","useState","fieldValuesRef","initialStep","stepState","setStepState","useEffect","nextStep","index","capturedFieldValues","previousState","currentStepName","previousValues","hasCapturedValues","previousStep","goToStep","setStepValues","values"]}
@@ -1,2 +1,2 @@
1
- import{a}from"./chunk-MS63VN5N.js";import{b as i}from"./chunk-Q3ALCPJN.js";import{x as n}from"./chunk-C4HFMTSB.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as y}from"react/jsx-runtime";function E({onSubmit:c,onSuccess:s,onError:u}){let{contractorOnboardingBag:r}=i(),l=t(async(e,d)=>{try{await c?.({countryCode:e.country});let o=await r.onSubmit(e);if(o?.data){await s?.(o?.data),r?.next();return}}catch(o){let S=n(o,r.meta?.fields?.select_country,d);u?.(S)}},"handleSubmit"),m=r.stepState.values?.select_country||r.initialValues.select_country;return y(a,{defaultValues:m,onSubmit:l})}t(E,"SelectCountryStep");export{E as a};
2
- //# sourceMappingURL=chunk-CHTCJQJ3.js.map
1
+ import{a}from"./chunk-WYIU74JN.js";import{b as i}from"./chunk-Q3ALCPJN.js";import{x as n}from"./chunk-C4HFMTSB.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as y}from"react/jsx-runtime";function E({onSubmit:c,onSuccess:s,onError:u}){let{contractorOnboardingBag:r}=i(),l=t(async(e,d)=>{try{await c?.({countryCode:e.country});let o=await r.onSubmit(e);if(o?.data){await s?.(o?.data),r?.next();return}}catch(o){let S=n(o,r.meta?.fields?.select_country,d);u?.(S)}},"handleSubmit"),m=r.stepState.values?.select_country||r.initialValues.select_country;return y(a,{defaultValues:m,onSubmit:l})}t(E,"SelectCountryStep");export{E as a};
2
+ //# sourceMappingURL=chunk-MZK2U65W.js.map
@@ -0,0 +1,2 @@
1
+ import{a as n}from"./chunk-P37U34EQ.js";var r=[{const:"weekly",title:"Weekly"},{const:"bi_weekly",title:"Bi-weekly"},{const:"semi_monthly",title:"Semi-monthly"},{const:"monthly",title:"Monthly"}];function o(){let t={};for(let e=1;e<=10;e++)t[`item_${e}_description`]={title:`Item ${e} description`,type:"string","x-jsf-presentation":{inputType:"text"}},t[`item_${e}_amount`]={title:`Item ${e} amount`,type:"integer","x-jsf-presentation":{inputType:"money"},"x-jsf-logic-computedAttrs":{"x-jsf-presentation":{additionalProps:{currency:"currency_selected"}}}};return t}n(o,"invoiceItemProperties");function s(){let t=[];for(let e=2;e<=10;e++){let i=e-1;t.push({if:{properties:{[`item_${i}_description`]:{type:"string",minLength:1},[`item_${i}_amount`]:{type:"integer",minimum:1}},required:[`item_${i}_description`,`item_${i}_amount`]},then:{},else:{properties:{[`item_${e}_description`]:!1,[`item_${e}_amount`]:!1}}})}return t}n(s,"invoiceItemRevealConditionals");var c=Array.from({length:10},(t,e)=>e+1).flatMap(t=>[`item_${t}_description`,`item_${t}_amount`]),p={type:"object","x-jsf-presentation":{title:"Create invoice schedule",description:"Fill out the invoice details and specify the recurrence options."},properties:{currency:{description:"The currency this invoice schedule will be issued in.",title:"Invoice currency",type:"string",oneOf:[{const:"placeholder",title:"Loading currencies\u2026"}],"x-jsf-presentation":{inputType:"select"}},periodicity:{description:"How often invoices are generated for this schedule.",title:"Frequency",type:"string",oneOf:r,"x-jsf-presentation":{inputType:"select"}},start_date:{description:"Date the first invoice will be generated.",title:"Start date",type:"string",format:"date","x-jsf-presentation":{inputType:"date"}},...o(),number:{description:"Optional identifier shown on generated invoices.",title:"Invoice number",type:"string",maxLength:10,"x-jsf-presentation":{inputType:"text"}},note:{description:"Shown on generated invoices.",title:"Additional notes",type:"string","x-jsf-presentation":{inputType:"textarea"}},nr_occurrences:{description:"Number of invoices to generate. Leave blank for the schedule to repeat indefinitely.",title:"Number of occurrences",type:"integer",minimum:1,"x-jsf-presentation":{inputType:"number"}}},required:["currency","periodicity","start_date","item_1_description","item_1_amount"],"x-jsf-order":["currency","periodicity","start_date",...c,"number","note","nr_occurrences"],"x-jsf-logic":{computedValues:{currency_selected:{rule:{var:"currency"}}}},allOf:s()};export{p as a};
2
+ //# sourceMappingURL=chunk-NPVSJYM6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/ContractorOnboarding/json-schemas/createInvoiceSchedule.ts"],"sourcesContent":["const INVOICE_ITEM_SLOTS = 10;\n\nconst PERIODICITY_OPTIONS = [\n { const: 'weekly', title: 'Weekly' },\n { const: 'bi_weekly', title: 'Bi-weekly' },\n { const: 'semi_monthly', title: 'Semi-monthly' },\n { const: 'monthly', title: 'Monthly' },\n];\n\nfunction invoiceItemProperties() {\n const properties: Record<string, object> = {};\n\n for (let slot = 1; slot <= INVOICE_ITEM_SLOTS; slot++) {\n properties[`item_${slot}_description`] = {\n title: `Item ${slot} description`,\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'text',\n },\n };\n properties[`item_${slot}_amount`] = {\n title: `Item ${slot} amount`,\n type: 'integer',\n 'x-jsf-presentation': {\n inputType: 'money',\n },\n 'x-jsf-logic-computedAttrs': {\n 'x-jsf-presentation': {\n additionalProps: {\n currency: 'currency_selected',\n },\n },\n },\n };\n }\n\n return properties;\n}\n\n// Slot 1 is required (see the base required array below).\n// Slots 2..N are optional and only revealed once the previous slot has been filled in,\n// since the form-kit has no built-in \"add another row\" renderer for a true items array.\nfunction invoiceItemRevealConditionals() {\n const conditionals = [];\n\n for (let slot = 2; slot <= INVOICE_ITEM_SLOTS; slot++) {\n const previousSlot = slot - 1;\n\n conditionals.push({\n if: {\n properties: {\n [`item_${previousSlot}_description`]: {\n type: 'string',\n minLength: 1,\n },\n [`item_${previousSlot}_amount`]: { type: 'integer', minimum: 1 },\n },\n required: [\n `item_${previousSlot}_description`,\n `item_${previousSlot}_amount`,\n ],\n },\n then: {},\n else: {\n properties: {\n [`item_${slot}_description`]: false,\n [`item_${slot}_amount`]: false,\n },\n },\n });\n }\n\n return conditionals;\n}\n\nconst itemFieldOrder = Array.from(\n { length: INVOICE_ITEM_SLOTS },\n (_, index) => index + 1,\n).flatMap((slot) => [`item_${slot}_description`, `item_${slot}_amount`]);\n\nexport const createInvoiceScheduleSchema = {\n type: 'object',\n 'x-jsf-presentation': {\n title: 'Create invoice schedule',\n description:\n 'Fill out the invoice details and specify the recurrence options.',\n },\n properties: {\n currency: {\n description: 'The currency this invoice schedule will be issued in.',\n title: 'Invoice currency',\n type: 'string',\n // Replaced at runtime with the contractor's supported currencies\n // (see useGetCreateInvoiceScheduleSchema in ContractorOnboarding/api.ts).\n oneOf: [{ const: 'placeholder', title: 'Loading currencies…' }],\n 'x-jsf-presentation': {\n inputType: 'select',\n },\n },\n periodicity: {\n description: 'How often invoices are generated for this schedule.',\n title: 'Frequency',\n type: 'string',\n oneOf: PERIODICITY_OPTIONS,\n 'x-jsf-presentation': {\n inputType: 'select',\n },\n },\n start_date: {\n description: 'Date the first invoice will be generated.',\n title: 'Start date',\n type: 'string',\n format: 'date',\n 'x-jsf-presentation': {\n inputType: 'date',\n },\n },\n ...invoiceItemProperties(),\n number: {\n description: 'Optional identifier shown on generated invoices.',\n title: 'Invoice number',\n type: 'string',\n maxLength: 10,\n 'x-jsf-presentation': {\n inputType: 'text',\n },\n },\n note: {\n description: 'Shown on generated invoices.',\n title: 'Additional notes',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'textarea',\n },\n },\n nr_occurrences: {\n description:\n 'Number of invoices to generate. Leave blank for the schedule to repeat indefinitely.',\n title: 'Number of occurrences',\n type: 'integer',\n minimum: 1,\n 'x-jsf-presentation': {\n inputType: 'number',\n },\n },\n },\n required: [\n 'currency',\n 'periodicity',\n 'start_date',\n 'item_1_description',\n 'item_1_amount',\n ],\n 'x-jsf-order': [\n 'currency',\n 'periodicity',\n 'start_date',\n ...itemFieldOrder,\n 'number',\n 'note',\n 'nr_occurrences',\n ],\n 'x-jsf-logic': {\n computedValues: {\n currency_selected: {\n rule: { var: 'currency' },\n },\n },\n },\n allOf: invoiceItemRevealConditionals(),\n};\n"],"mappings":"wCAEA,IAAMA,EAAsB,CAC1B,CAAE,MAAO,SAAU,MAAO,QAAS,EACnC,CAAE,MAAO,YAAa,MAAO,WAAY,EACzC,CAAE,MAAO,eAAgB,MAAO,cAAe,EAC/C,CAAE,MAAO,UAAW,MAAO,SAAU,CACvC,EAEA,SAASC,GAAwB,CAC/B,IAAMC,EAAqC,CAAC,EAE5C,QAASC,EAAO,EAAGA,GAAQ,GAAoBA,IAC7CD,EAAW,QAAQC,CAAI,cAAc,EAAI,CACvC,MAAO,QAAQA,CAAI,eACnB,KAAM,SACN,qBAAsB,CACpB,UAAW,MACb,CACF,EACAD,EAAW,QAAQC,CAAI,SAAS,EAAI,CAClC,MAAO,QAAQA,CAAI,UACnB,KAAM,UACN,qBAAsB,CACpB,UAAW,OACb,EACA,4BAA6B,CAC3B,qBAAsB,CACpB,gBAAiB,CACf,SAAU,mBACZ,CACF,CACF,CACF,EAGF,OAAOD,CACT,CA5BSE,EAAAH,EAAA,yBAiCT,SAASI,GAAgC,CACvC,IAAMC,EAAe,CAAC,EAEtB,QAASH,EAAO,EAAGA,GAAQ,GAAoBA,IAAQ,CACrD,IAAMI,EAAeJ,EAAO,EAE5BG,EAAa,KAAK,CAChB,GAAI,CACF,WAAY,CACV,CAAC,QAAQC,CAAY,cAAc,EAAG,CACpC,KAAM,SACN,UAAW,CACb,EACA,CAAC,QAAQA,CAAY,SAAS,EAAG,CAAE,KAAM,UAAW,QAAS,CAAE,CACjE,EACA,SAAU,CACR,QAAQA,CAAY,eACpB,QAAQA,CAAY,SACtB,CACF,EACA,KAAM,CAAC,EACP,KAAM,CACJ,WAAY,CACV,CAAC,QAAQJ,CAAI,cAAc,EAAG,GAC9B,CAAC,QAAQA,CAAI,SAAS,EAAG,EAC3B,CACF,CACF,CAAC,CACH,CAEA,OAAOG,CACT,CA/BSF,EAAAC,EAAA,iCAiCT,IAAMG,EAAiB,MAAM,KAC3B,CAAE,OAAQ,EAAmB,EAC7B,CAACC,EAAGC,IAAUA,EAAQ,CACxB,EAAE,QAASP,GAAS,CAAC,QAAQA,CAAI,eAAgB,QAAQA,CAAI,SAAS,CAAC,EAE1DQ,EAA8B,CACzC,KAAM,SACN,qBAAsB,CACpB,MAAO,0BACP,YACE,kEACJ,EACA,WAAY,CACV,SAAU,CACR,YAAa,wDACb,MAAO,mBACP,KAAM,SAGN,MAAO,CAAC,CAAE,MAAO,cAAe,MAAO,0BAAsB,CAAC,EAC9D,qBAAsB,CACpB,UAAW,QACb,CACF,EACA,YAAa,CACX,YAAa,sDACb,MAAO,YACP,KAAM,SACN,MAAOX,EACP,qBAAsB,CACpB,UAAW,QACb,CACF,EACA,WAAY,CACV,YAAa,4CACb,MAAO,aACP,KAAM,SACN,OAAQ,OACR,qBAAsB,CACpB,UAAW,MACb,CACF,EACA,GAAGC,EAAsB,EACzB,OAAQ,CACN,YAAa,mDACb,MAAO,iBACP,KAAM,SACN,UAAW,GACX,qBAAsB,CACpB,UAAW,MACb,CACF,EACA,KAAM,CACJ,YAAa,+BACb,MAAO,mBACP,KAAM,SACN,qBAAsB,CACpB,UAAW,UACb,CACF,EACA,eAAgB,CACd,YACE,uFACF,MAAO,wBACP,KAAM,UACN,QAAS,EACT,qBAAsB,CACpB,UAAW,QACb,CACF,CACF,EACA,SAAU,CACR,WACA,cACA,aACA,qBACA,eACF,EACA,cAAe,CACb,WACA,cACA,aACA,GAAGO,EACH,SACA,OACA,gBACF,EACA,cAAe,CACb,eAAgB,CACd,kBAAmB,CACjB,KAAM,CAAE,IAAK,UAAW,CAC1B,CACF,CACF,EACA,MAAOH,EAA8B,CACvC","names":["PERIODICITY_OPTIONS","invoiceItemProperties","properties","slot","__name","invoiceItemRevealConditionals","conditionals","previousSlot","itemFieldOrder","_","index","createInvoiceScheduleSchema"]}
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-APUJLKUM.js";import{a as e}from"./chunk-5OEO67O2.js";import{b as n}from"./chunk-WCJZAOZR.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as i}from"react/jsx-runtime";function p(a){let{adminBag:t}=n(),l=r(a),s={...t.initialValues?.basic_information,...t.stepState.values?.select_country};return i(e,{onSubmit:l,defaultValues:s},t.countryCode??"no-country")}o(p,"SelectCountryStep");export{p as a};
2
- //# sourceMappingURL=chunk-UEJU2A57.js.map
1
+ import{a as e}from"./chunk-PJTMFMRJ.js";import{a as r}from"./chunk-APUJLKUM.js";import{b as n}from"./chunk-WCJZAOZR.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as i}from"react/jsx-runtime";function p(a){let{adminBag:t}=n(),l=r(a),s={...t.initialValues?.basic_information,...t.stepState.values?.select_country};return i(e,{onSubmit:l,defaultValues:s},t.countryCode??"no-country")}o(p,"SelectCountryStep");export{p as a};
2
+ //# sourceMappingURL=chunk-ORP6DY5I.js.map
@@ -1,2 +1,2 @@
1
- import{a as i}from"./chunk-UEJU2A57.js";import{a as d}from"./chunk-KGSH67IW.js";import{a}from"./chunk-FLX72WFD.js";import{a as p}from"./chunk-JK4CPPN4.js";import{a as m}from"./chunk-JBAKDTGM.js";import{a as l}from"./chunk-6VEWI4G2.js";import{a as n}from"./chunk-WCJZAOZR.js";import{a as t}from"./chunk-UTQDJNOV.js";import{a as r}from"./chunk-P37U34EQ.js";import{useId as c}from"react";import{jsx as u}from"react/jsx-runtime";var D=r(({companyId:e,legalEntityId:s,countryCode:f,employmentId:P,initialValues:y,options:b,render:g})=>{let A=c(),o=t({companyId:e,legalEntityId:s,countryCode:f,employmentId:P,initialValues:y,options:b});return u(n.Provider,{value:{formId:A,adminBag:o},children:g({adminBag:o,components:{SelectCountryStep:i,ContractDetailsStep:m,AdministrativeDetailsStep:a,InvitationStep:l,SubmitButton:d,BackButton:p}})})},"PayrollAdminOnboardingFlow");export{D as a};
2
- //# sourceMappingURL=chunk-PZWP6ZVL.js.map
1
+ import{a}from"./chunk-2LSLWFZS.js";import{a as p}from"./chunk-JK4CPPN4.js";import{a as m}from"./chunk-WDPJIOLG.js";import{a as l}from"./chunk-RKP7EEAB.js";import{a as i}from"./chunk-ORP6DY5I.js";import{a as d}from"./chunk-KGSH67IW.js";import{a as t}from"./chunk-S2QXSX4Q.js";import{a as n}from"./chunk-WCJZAOZR.js";import{a as r}from"./chunk-P37U34EQ.js";import{useId as c}from"react";import{jsx as u}from"react/jsx-runtime";var D=r(({companyId:e,legalEntityId:s,countryCode:f,employmentId:P,initialValues:y,options:b,render:g})=>{let A=c(),o=t({companyId:e,legalEntityId:s,countryCode:f,employmentId:P,initialValues:y,options:b});return u(n.Provider,{value:{formId:A,adminBag:o},children:g({adminBag:o,components:{SelectCountryStep:i,ContractDetailsStep:m,AdministrativeDetailsStep:a,InvitationStep:l,SubmitButton:d,BackButton:p}})})},"PayrollAdminOnboardingFlow");export{D as a};
2
+ //# sourceMappingURL=chunk-OTBCLDGR.js.map
@@ -1,2 +1,2 @@
1
- import{b as l}from"./chunk-WCJZAOZR.js";import{a as i}from"./chunk-UZFEJMO6.js";import{a as t}from"./chunk-TYCOSAU4.js";import{h as m}from"./chunk-AUPAAQUT.js";import{a as r}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";import{createElement as u}from"react";function S({onSubmit:n,defaultValues:a}){let{formId:d,adminBag:o}=l(),e=i({handleValidation:o.handleValidation,defaultValues:a??{},checkFieldUpdates:o.setFieldValues});return u(m,{...e,key:`form-${o.stepState.currentStep.name}`},s("form",{id:d,onSubmit:e.handleSubmit(f=>n(f,e)),className:"space-y-4 RemoteFlows__PayrollAdminForm",children:s(t,{fields:o.fields,fieldsets:o.meta["x-jsf-fieldsets"],fieldValues:o.fieldValues})}))}r(S,"PayrollAdminForm");export{S as a};
2
- //# sourceMappingURL=chunk-5OEO67O2.js.map
1
+ import{b as l}from"./chunk-WCJZAOZR.js";import{a as i}from"./chunk-UZFEJMO6.js";import{a as t}from"./chunk-VQRE3YLW.js";import{h as m}from"./chunk-AUPAAQUT.js";import{a as r}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";import{createElement as u}from"react";function S({onSubmit:n,defaultValues:a}){let{formId:d,adminBag:o}=l(),e=i({handleValidation:o.handleValidation,defaultValues:a??{},checkFieldUpdates:o.setFieldValues});return u(m,{...e,key:`form-${o.stepState.currentStep.name}`},s("form",{id:d,onSubmit:e.handleSubmit(f=>n(f,e)),className:"space-y-4 RemoteFlows__PayrollAdminForm",children:s(t,{fields:o.fields,fieldsets:o.meta["x-jsf-fieldsets"],fieldValues:o.fieldValues})}))}r(S,"PayrollAdminForm");export{S as a};
2
+ //# sourceMappingURL=chunk-PJTMFMRJ.js.map
@@ -1,2 +1,2 @@
1
- import{a as e}from"./chunk-VY64RMAF.js";import{b as a}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function d({onSubmit:m}){let{terminationBag:o}=a(),r=i(async t=>{let n=await o?.parseFormValues(t);await m?.(n),o?.next()},"handleSubmit");return s(e,{defaultValues:o.fieldValues,onSubmit:r})}i(d,"PaidTimeOffForm");export{d as a};
2
- //# sourceMappingURL=chunk-YQZ3B2CT.js.map
1
+ import{a as e}from"./chunk-LCUURLXS.js";import{b as a}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function d({onSubmit:m}){let{terminationBag:o}=a(),r=i(async t=>{let n=await o?.parseFormValues(t);await m?.(n),o?.next()},"handleSubmit");return s(e,{defaultValues:o.fieldValues,onSubmit:r})}i(d,"PaidTimeOffForm");export{d as a};
2
+ //# sourceMappingURL=chunk-PNNOU6BC.js.map
@@ -0,0 +1,2 @@
1
+ import{H as l,T as a,d as s}from"./chunk-VNMUML3T.js";import{e as o}from"./chunk-H2O4CVKF.js";import{a as t}from"./chunk-P37U34EQ.js";import{useMutation as y,useQuery as i}from"@tanstack/react-query";var h=t(({employmentId:e,queryParams:n,enabled:m=!0})=>{let{client:r}=o();return i({queryKey:["employment",e],retry:!1,queryFn:t(()=>a({client:r,headers:{Authorization:""},path:{employment_id:e},query:n}),"queryFn"),enabled:!!e&&m,select:t(({data:p})=>p?.data?.employment,"select")})},"useEmploymentQuery"),b=t(({employmentId:e,enabled:n=!0})=>{let{client:m}=o();return i({queryKey:["employment",e,"basic-information"],retry:!1,queryFn:t(()=>l({client:m,headers:{Authorization:""},path:{employment_id:e}}),"queryFn"),enabled:!!e&&n,select:t(({data:r})=>r?.data?.employment,"select")})},"useBasicInformationQuery"),R=t(()=>{let{client:e}=o();return y({mutationFn:t(({employmentId:n})=>s({client:e,headers:{Authorization:""},path:{employment_id:n}}),"mutationFn")})},"useDiscardEmploymentMutation");export{h as a,b,R as c};
2
+ //# sourceMappingURL=chunk-POWC7LZN.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/common/api/employment.ts"],"sourcesContent":["import {\n getV1EmploymentsEmploymentId,\n GetV1EmploymentsEmploymentIdResponse,\n getV2EmploymentsEmploymentIdBasicInformation,\n GetV2EmploymentsEmploymentIdBasicInformationResponse,\n postV1CancelOnboardingEmploymentId,\n} from '@/src/client';\nimport { useClient } from '@/src/context';\nimport { $TSFixMe } from '@/src/types/remoteFlows';\nimport { useMutation, useQuery, UseQueryResult } from '@tanstack/react-query';\nimport { Client } from '@/src/client/client';\n\n/**\n * Hook to retrieve employment details for a specific employment ID.\n *\n * @param {Object} params - The parameters for the query.\n * @param {string} params.employmentId - The ID of the employment to fetch details for.\n * @returns {UseQueryResult<any, unknown>} - The result of the query, including the employment details.\n */\nexport const useEmploymentQuery = ({\n employmentId,\n queryParams,\n enabled = true,\n}: {\n employmentId: string;\n queryParams?: $TSFixMe; // TODO: we need to generate openapi-ts types but it's broken at the moment\n /** Optional. Set to `false` to skip the query, e.g. when the caller's token can't reach this endpoint. */\n enabled?: boolean;\n}): UseQueryResult<\n GetV1EmploymentsEmploymentIdResponse['data']['employment'],\n unknown\n> => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['employment', employmentId],\n retry: false,\n queryFn: () => {\n return getV1EmploymentsEmploymentId({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n path: { employment_id: employmentId },\n query: queryParams,\n });\n },\n enabled: !!employmentId && enabled,\n select: ({ data }) => data?.data?.employment,\n });\n};\n\n/**\n * Hook to retrieve basic information for a specific employment ID from the v2 endpoint.\n *\n * This endpoint returns a subset of employment data including contract_origin,\n * which is not available in the v1 full employment endpoint.\n *\n * @param {Object} params - The parameters for the query.\n * @param {string} params.employmentId - The ID of the employment to fetch basic information for.\n * @param {boolean} params.enabled - Optional. Set to `false` to skip the query.\n * @returns {UseQueryResult<any, unknown>} - The result of the query, including the basic information.\n */\nexport const useBasicInformationQuery = ({\n employmentId,\n enabled = true,\n}: {\n employmentId: string;\n enabled?: boolean;\n}): UseQueryResult<\n GetV2EmploymentsEmploymentIdBasicInformationResponse['data']['employment'],\n unknown\n> => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['employment', employmentId, 'basic-information'],\n retry: false,\n queryFn: () => {\n return getV2EmploymentsEmploymentIdBasicInformation({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n path: { employment_id: employmentId },\n });\n },\n enabled: !!employmentId && enabled,\n select: ({ data }) => data?.data?.employment,\n });\n};\n\n/**\n * Hook to discard an employment.\n *\n * @returns {UseMutationResult<void, unknown, { employmentId: string }, unknown>} - The mutation result.\n */\nexport const useDiscardEmploymentMutation = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: ({ employmentId }: { employmentId: string }) => {\n return postV1CancelOnboardingEmploymentId({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n path: { employment_id: employmentId },\n });\n },\n });\n};\n"],"mappings":"sIASA,OAAS,eAAAA,EAAa,YAAAC,MAAgC,wBAU/C,IAAMC,EAAqBC,EAAA,CAAC,CACjC,aAAAC,EACA,YAAAC,EACA,QAAAC,EAAU,EACZ,IAQK,CACH,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAU,EAC7B,OAAOC,EAAS,CACd,SAAU,CAAC,aAAcL,CAAY,EACrC,MAAO,GACP,QAASD,EAAA,IACAO,EAA6B,CAClC,OAAQH,EACR,QAAS,CACP,cAAe,EACjB,EACA,KAAM,CAAE,cAAeH,CAAa,EACpC,MAAOC,CACT,CAAC,EARM,WAUT,QAAS,CAAC,CAACD,GAAgBE,EAC3B,OAAQH,EAAA,CAAC,CAAE,KAAAQ,CAAK,IAAMA,GAAM,MAAM,WAA1B,SACV,CAAC,CACH,EA9BkC,sBA2CrBC,EAA2BT,EAAA,CAAC,CACvC,aAAAC,EACA,QAAAE,EAAU,EACZ,IAMK,CACH,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAU,EAC7B,OAAOC,EAAS,CACd,SAAU,CAAC,aAAcL,EAAc,mBAAmB,EAC1D,MAAO,GACP,QAASD,EAAA,IACAU,EAA6C,CAClD,OAAQN,EACR,QAAS,CACP,cAAe,EACjB,EACA,KAAM,CAAE,cAAeH,CAAa,CACtC,CAAC,EAPM,WAST,QAAS,CAAC,CAACA,GAAgBE,EAC3B,OAAQH,EAAA,CAAC,CAAE,KAAAQ,CAAK,IAAMA,GAAM,MAAM,WAA1B,SACV,CAAC,CACH,EA1BwC,4BAiC3BG,EAA+BX,EAAA,IAAM,CAChD,GAAM,CAAE,OAAAI,CAAO,EAAIC,EAAU,EAC7B,OAAOO,EAAY,CACjB,WAAYZ,EAAA,CAAC,CAAE,aAAAC,CAAa,IACnBY,EAAmC,CACxC,OAAQT,EACR,QAAS,CACP,cAAe,EACjB,EACA,KAAM,CAAE,cAAeH,CAAa,CACtC,CAAC,EAPS,aASd,CAAC,CACH,EAb4C","names":["useMutation","useQuery","useEmploymentQuery","__name","employmentId","queryParams","enabled","client","useClient","useQuery","getV1EmploymentsEmploymentId","data","useBasicInformationQuery","getV2EmploymentsEmploymentIdBasicInformation","useDiscardEmploymentMutation","useMutation","postV1CancelOnboardingEmploymentId"]}
@@ -1,2 +1,2 @@
1
- import{b as f}from"./chunk-76ZDXC2T.js";import{b as p}from"./chunk-KFYWUBRS.js";import{a as c}from"./chunk-TYCOSAU4.js";import{f as a,h as d}from"./chunk-AUPAAQUT.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as y,useRef as b}from"react";import{jsx as l}from"react/jsx-runtime";import{createElement as g}from"react";function B({defaultValues:s,onSubmit:u,components:F}){let{formId:C,createCompanyBag:o}=f(),m=b(s),h=p(o.handleValidation),r=a({resolver:h,defaultValues:s,shouldUnregister:!1,mode:"onBlur"});y(()=>{let n=r?.watch(e=>{Object.keys(e).some(i=>e[i]!==m.current[i])&&(o?.checkFieldUpdates(e),m.current={...e})});return()=>n?.unsubscribe()},[]);let S=t(async n=>{await u(n)},"handleSubmit");return g(d,{...r,key:`form-${o.stepState.currentStep.name}`},l("form",{id:C,onSubmit:r.handleSubmit(S),className:"space-y-4 RemoteFlows__OnboardingForm",children:l(c,{components:F,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}t(B,"CreateCompanyForm");export{B as a};
2
- //# sourceMappingURL=chunk-3YILMVSP.js.map
1
+ import{b as f}from"./chunk-76ZDXC2T.js";import{b as p}from"./chunk-KFYWUBRS.js";import{a as c}from"./chunk-VQRE3YLW.js";import{f as a,h as d}from"./chunk-AUPAAQUT.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as y,useRef as b}from"react";import{jsx as l}from"react/jsx-runtime";import{createElement as g}from"react";function B({defaultValues:s,onSubmit:u,components:F}){let{formId:C,createCompanyBag:o}=f(),m=b(s),h=p(o.handleValidation),r=a({resolver:h,defaultValues:s,shouldUnregister:!1,mode:"onBlur"});y(()=>{let n=r?.watch(e=>{Object.keys(e).some(i=>e[i]!==m.current[i])&&(o?.checkFieldUpdates(e),m.current={...e})});return()=>n?.unsubscribe()},[]);let S=t(async n=>{await u(n)},"handleSubmit");return g(d,{...r,key:`form-${o.stepState.currentStep.name}`},l("form",{id:C,onSubmit:r.handleSubmit(S),className:"space-y-4 RemoteFlows__OnboardingForm",children:l(c,{components:F,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}t(B,"CreateCompanyForm");export{B as a};
2
+ //# sourceMappingURL=chunk-PYNHR7NL.js.map
@@ -1,2 +1,2 @@
1
- import{X as i,fa as s}from"./chunk-XI55YG73.js";import{e as a}from"./chunk-H2O4CVKF.js";import{a as r}from"./chunk-P37U34EQ.js";import{useQuery as o}from"@tanstack/react-query";var u=r(t=>{let{client:n}=a();return o({queryKey:["gp-onboarding-steps",t],enabled:!!t,retry:!1,queryFn:r(async()=>{let e=await s({client:n,headers:{Authorization:""},path:{employment_id:t}});if(e.error||!e.data)throw new Error("Failed to fetch onboarding steps");return e.data},"queryFn"),select:r(e=>e.data.steps,"select")})},"useGPOnboardingSteps"),c=r(t=>{let{client:n}=a();return o({queryKey:["gp-legal-entities",t],enabled:!!t,retry:!1,queryFn:r(async()=>{let e=await i({client:n,headers:{Authorization:""},path:{company_id:t}});if(e.error||!e.data)throw new Error("Failed to fetch legal entities");return e.data},"queryFn"),select:r(e=>(e.data?.legal_entities??[]).filter(l=>l.global_payroll_enabled),"select")})},"useGPLegalEntities");export{u as a,c as b};
2
- //# sourceMappingURL=chunk-IN6QZASY.js.map
1
+ import{Z as i,ia as s}from"./chunk-VNMUML3T.js";import{e as a}from"./chunk-H2O4CVKF.js";import{a as r}from"./chunk-P37U34EQ.js";import{useQuery as o}from"@tanstack/react-query";var u=r(t=>{let{client:n}=a();return o({queryKey:["gp-onboarding-steps",t],enabled:!!t,retry:!1,queryFn:r(async()=>{let e=await s({client:n,headers:{Authorization:""},path:{employment_id:t}});if(e.error||!e.data)throw new Error("Failed to fetch onboarding steps");return e.data},"queryFn"),select:r(e=>e.data.steps,"select")})},"useGPOnboardingSteps"),c=r(t=>{let{client:n}=a();return o({queryKey:["gp-legal-entities",t],enabled:!!t,retry:!1,queryFn:r(async()=>{let e=await i({client:n,headers:{Authorization:""},path:{company_id:t}});if(e.error||!e.data)throw new Error("Failed to fetch legal entities");return e.data},"queryFn"),select:r(e=>(e.data?.legal_entities??[]).filter(l=>l.global_payroll_enabled),"select")})},"useGPLegalEntities");export{u as a,c as b};
2
+ //# sourceMappingURL=chunk-QEHEOSJT.js.map
@@ -1,2 +1,2 @@
1
- import{a as b}from"./chunk-KBYI7L5E.js";import{j as _,k as d,l as x,n as u,o as f}from"./chunk-AUPAAQUT.js";import{n as a}from"./chunk-C4HFMTSB.js";import{a as c}from"./chunk-P37U34EQ.js";import*as g from"react";import{jsx as h}from"react/jsx-runtime";var s=g.forwardRef(({className:e,...r},t)=>h("textarea",{className:a("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:t,...r}));s.displayName="Textarea";import{jsx as o,jsxs as l}from"react/jsx-runtime";function y({field:e,fieldState:r,fieldData:t}){let{name:i,label:p,description:n,maxLength:m}=t,F=e.value?.length??0;return l(_,{"data-field":i,className:`RemoteFlows__TextArea__Item__${i}`,children:[o(d,{className:"RemoteFlows__TextArea__Label",children:p}),o(x,{children:o(s,{...e,value:e.value??"",onChange:T=>{e.onChange(T)},className:a(r.error&&"border-red-500 focus-visible:ring-red-500","RemoteFlows__TextArea__Input"),placeholder:p})}),(n||m)&&l("div",{className:"flex items-center justify-between",children:[n&&o(u,{className:"RemoteFlows__TextArea__Description",helpCenter:o(b,{helpCenter:t.meta?.helpCenter}),children:n}),m&&l("span",{className:"text-sm ml-auto RemoteFlows__TextArea__MaxLength",children:[F,"/",m]})]}),r.error&&o(f,{className:"RemoteFlows__TextArea__Error"})]})}c(y,"TextAreaFieldDefault");export{y as a};
2
- //# sourceMappingURL=chunk-QA6YA4OB.js.map
1
+ import{a as b}from"./chunk-WGDZTF7Y.js";import{j as _,k as d,l as x,n as u,o as f}from"./chunk-AUPAAQUT.js";import{n as a}from"./chunk-C4HFMTSB.js";import{a as c}from"./chunk-P37U34EQ.js";import*as g from"react";import{jsx as h}from"react/jsx-runtime";var s=g.forwardRef(({className:e,...r},t)=>h("textarea",{className:a("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:t,...r}));s.displayName="Textarea";import{jsx as o,jsxs as l}from"react/jsx-runtime";function y({field:e,fieldState:r,fieldData:t}){let{name:i,label:p,description:n,maxLength:m}=t,F=e.value?.length??0;return l(_,{"data-field":i,className:`RemoteFlows__TextArea__Item__${i}`,children:[o(d,{className:"RemoteFlows__TextArea__Label",children:p}),o(x,{children:o(s,{...e,value:e.value??"",onChange:T=>{e.onChange(T)},className:a(r.error&&"border-red-500 focus-visible:ring-red-500","RemoteFlows__TextArea__Input"),placeholder:p})}),(n||m)&&l("div",{className:"flex items-center justify-between",children:[n&&o(u,{className:"RemoteFlows__TextArea__Description",helpCenter:o(b,{helpCenter:t.meta?.helpCenter}),children:n}),m&&l("span",{className:"text-sm ml-auto RemoteFlows__TextArea__MaxLength",children:[F,"/",m]})]}),r.error&&o(f,{className:"RemoteFlows__TextArea__Error"})]})}c(y,"TextAreaFieldDefault");export{y as a};
2
+ //# sourceMappingURL=chunk-QHJ3BYJN.js.map
@@ -0,0 +1,2 @@
1
+ import{a as e}from"./chunk-ZXGAFQXW.js";import{a as i}from"./chunk-LMYJ6V44.js";import{a as o}from"./chunk-TC7EQZJK.js";import{a as m}from"./chunk-NX7MM6XR.js";var p={employee_communication:o,termination_details:e,paid_time_off:m,additional_information:i};export{p as a};
2
+ //# sourceMappingURL=chunk-QSBXRKYE.js.map
@@ -0,0 +1,2 @@
1
+ import{a as i}from"./chunk-5TOSVOLY.js";import{a as n}from"./chunk-GPWQPJQ7.js";import{n as e}from"./chunk-C4HFMTSB.js";import{a as o}from"./chunk-P37U34EQ.js";import{Fragment as s,jsx as t,jsxs as r}from"react/jsx-runtime";var l=["You submit your termination request.","Remote reviews your request along with the employment agreement, local labor laws, and any collective bargaining agreements in place.","A lifecycle specialist contacts you if they need additional details. Sometimes they will request a call.","Depending on the country-specific laws and the terms of the employment agreement, Remote may need to seek additional legal advice. We\u2019ll let you know if there are additional charges before proceeding.","Terms and conditions for the termination are finalized.","You verbally communicate the termination to the employee.","Remote shares termination documents with the employee.","The employee signs the termination documents if required.","Remote processes the final salary and offboards the employee."],f=o(()=>r(s,{children:[t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__Title"),children:"Please read carefully before you continue"}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description"),children:"Please do not inform the employee of the termination. Remote will lead communication with them after you submit this form and they finalize the termination terms."}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription"),children:"If you already informed them, that's okay. Remote will ask for the details regarding that communication and they'll take it from there."}),t(i,{className:e("RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm"),zendeskId:n.terminationEmployeeCommunication,children:"Learn more about employee communication"}),t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessTitle"),children:"The termination process"}),t("ul",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessList list-disc list-inside"),children:l.map((a,m)=>t("li",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessListItem"),children:a},m))})]}),"TerminationDialogInfoContent");export{f as a};
2
+ //# sourceMappingURL=chunk-QSF4XFSV.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.tsx"],"sourcesContent":["import { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\nimport { ZendeskTriggerButton } from '@/src/components/shared/zendesk-drawer/ZendeskTriggerButton';\nimport { cn } from '@/src/internals';\n\nconst terminationSteps = [\n 'You submit your termination request.',\n 'Remote reviews your request along with the employment agreement, local labor laws, and any collective bargaining agreements in place.',\n 'A lifecycle specialist contacts you if they need additional details. Sometimes they will request a call.',\n 'Depending on the country-specific laws and the terms of the employment agreement, Remote may need to seek additional legal advice. We’ll let you know if there are additional charges before proceeding.',\n 'Terms and conditions for the termination are finalized.',\n 'You verbally communicate the termination to the employee.',\n 'Remote shares termination documents with the employee.',\n 'The employee signs the termination documents if required.',\n 'Remote processes the final salary and offboards the employee.',\n];\n\nexport const TerminationDialogInfoContent = () => {\n return (\n <>\n <h3 className={cn('RemoteFlows__TerminationDialogInfoContent__Title')}>\n Please read carefully before you continue\n </h3>\n <p\n className={cn('RemoteFlows__TerminationDialogInfoContent__Description')}\n >\n Please do not inform the employee of the termination. Remote will lead\n communication with them after you submit this form and they finalize the\n termination terms.\n </p>\n <p\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription',\n )}\n >\n If you already informed them, that's okay. Remote will ask for the\n details regarding that communication and they'll take it from there.\n </p>\n\n <ZendeskTriggerButton\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm',\n )}\n zendeskId={zendeskArticles.terminationEmployeeCommunication}\n >\n Learn more about employee communication\n </ZendeskTriggerButton>\n\n <h3\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ProcessTitle',\n )}\n >\n The termination process\n </h3>\n\n <ul\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ProcessList list-disc list-inside',\n )}\n >\n {terminationSteps.map((step, index) => (\n <li\n key={index}\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ProcessListItem',\n )}\n >\n {step}\n </li>\n ))}\n </ul>\n </>\n );\n};\n"],"mappings":"+HAkBI,mBAAAA,EACE,OAAAC,EADF,QAAAC,MAAA,oBAdJ,IAAMC,EAAmB,CACvB,uCACA,wIACA,2GACA,gNACA,0DACA,4DACA,yDACA,4DACA,+DACF,EAEaC,EAA+BC,EAAA,IAExCH,EAAAF,EAAA,CACE,UAAAC,EAAC,MAAG,UAAWK,EAAG,kDAAkD,EAAG,qDAEvE,EACAL,EAAC,KACC,UAAWK,EAAG,wDAAwD,EACvE,8KAID,EACAL,EAAC,KACC,UAAWK,EACT,uHACF,EACD,mJAGD,EAEAL,EAACM,EAAA,CACC,UAAWD,EACT,yEACF,EACA,UAAWE,EAAgB,iCAC5B,mDAED,EAEAP,EAAC,MACC,UAAWK,EACT,yDACF,EACD,mCAED,EAEAL,EAAC,MACC,UAAWK,EACT,8EACF,EAEC,SAAAH,EAAiB,IAAI,CAACM,EAAMC,IAC3BT,EAAC,MAEC,UAAWK,EACT,4DACF,EAEC,SAAAG,GALIC,CAMP,CACD,EACH,GACF,EAvDwC","names":["Fragment","jsx","jsxs","terminationSteps","TerminationDialogInfoContent","__name","cn","ZendeskTriggerButton","zendeskArticles","step","index"]}
1
+ {"version":3,"sources":["../src/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.tsx"],"sourcesContent":["import { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\nimport { ZendeskTriggerButton } from '@/src/components/shared/zendesk-drawer/ZendeskTriggerButton';\nimport { cn } from '@/src/internals';\n\nconst terminationSteps = [\n 'You submit your termination request.',\n 'Remote reviews your request along with the employment agreement, local labor laws, and any collective bargaining agreements in place.',\n 'A lifecycle specialist contacts you if they need additional details. Sometimes they will request a call.',\n 'Depending on the country-specific laws and the terms of the employment agreement, Remote may need to seek additional legal advice. We’ll let you know if there are additional charges before proceeding.',\n 'Terms and conditions for the termination are finalized.',\n 'You verbally communicate the termination to the employee.',\n 'Remote shares termination documents with the employee.',\n 'The employee signs the termination documents if required.',\n 'Remote processes the final salary and offboards the employee.',\n];\n\nexport const TerminationDialogInfoContent = () => {\n return (\n <>\n <h3 className={cn('RemoteFlows__TerminationDialogInfoContent__Title')}>\n Please read carefully before you continue\n </h3>\n <p\n className={cn('RemoteFlows__TerminationDialogInfoContent__Description')}\n >\n Please do not inform the employee of the termination. Remote will lead\n communication with them after you submit this form and they finalize the\n termination terms.\n </p>\n <p\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription',\n )}\n >\n If you already informed them, that's okay. Remote will ask for the\n details regarding that communication and they'll take it from there.\n </p>\n\n <ZendeskTriggerButton\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm',\n )}\n zendeskId={zendeskArticles.terminationEmployeeCommunication}\n >\n Learn more about employee communication\n </ZendeskTriggerButton>\n\n <h3\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ProcessTitle',\n )}\n >\n The termination process\n </h3>\n\n <ul\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ProcessList list-disc list-inside',\n )}\n >\n {terminationSteps.map((step, index) => (\n <li\n key={index}\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ProcessListItem',\n )}\n >\n {step}\n </li>\n ))}\n </ul>\n </>\n );\n};\n"],"mappings":"gKAkBI,mBAAAA,EACE,OAAAC,EADF,QAAAC,MAAA,oBAdJ,IAAMC,EAAmB,CACvB,uCACA,wIACA,2GACA,gNACA,0DACA,4DACA,yDACA,4DACA,+DACF,EAEaC,EAA+BC,EAAA,IAExCH,EAAAF,EAAA,CACE,UAAAC,EAAC,MAAG,UAAWK,EAAG,kDAAkD,EAAG,qDAEvE,EACAL,EAAC,KACC,UAAWK,EAAG,wDAAwD,EACvE,8KAID,EACAL,EAAC,KACC,UAAWK,EACT,uHACF,EACD,mJAGD,EAEAL,EAACM,EAAA,CACC,UAAWD,EACT,yEACF,EACA,UAAWE,EAAgB,iCAC5B,mDAED,EAEAP,EAAC,MACC,UAAWK,EACT,yDACF,EACD,mCAED,EAEAL,EAAC,MACC,UAAWK,EACT,8EACF,EAEC,SAAAH,EAAiB,IAAI,CAACM,EAAMC,IAC3BT,EAAC,MAEC,UAAWK,EACT,4DACF,EAEC,SAAAG,GALIC,CAMP,CACD,EACH,GACF,EAvDwC","names":["Fragment","jsx","jsxs","terminationSteps","TerminationDialogInfoContent","__name","cn","ZendeskTriggerButton","zendeskArticles","step","index"]}
@@ -1,2 +1,2 @@
1
- import{b as w}from"./chunk-PGWKJ6FK.js";import{r as k,s as A,t as y,u as D,v as _,w as M}from"./chunk-QN6OMOUW.js";import{b as d}from"./chunk-C4HFMTSB.js";import{a as r}from"./chunk-P37U34EQ.js";import{useState as E}from"react";var H=r(({employmentId:t})=>{let{onboardingBag:m}=w(),[i,v]=E({}),[s,B]=E(),C=!!(m.options?.features?.includes("pre_onboarding_requirements")&&t),{data:a,isLoading:L,refetch:b}=k(t,{queryOptions:{enabled:C}}),q=new Map;for(let e of a??[])e.depends_on_requirement&&q.set(e.depends_on_requirement.slug,e);let f=s?i[s]:void 0,{data:T,isLoading:x}=y(t,f,{queryOptions:{enabled:!!f}}),p=A(),l=D(),R=_(),O=M(),{mutateAsyncOrThrow:N}=d(p),{mutateAsyncOrThrow:$}=d(l),{mutateAsyncOrThrow:G}=d(R),{mutateAsyncOrThrow:F}=d(O),I=r(async e=>{let o=a?.find(n=>n.slug===e);if(o?.status==="blocked"){let n=o.depends_on_requirement?.name;throw new Error(`Cannot create document for blocked requirement. ${n?`${n} must be completed first.`:"A dependent requirement must be completed first."}`)}let c=i[e];if(B(e),c)return null;let u=await N({employmentId:t,body:{requirement_slug:e,employment_id:t}}),g=u?.data.pre_onboarding_document.id;return g&&v(n=>({...n,[e]:g})),u},"onCreateDocument"),S=r(async e=>{let o=a?.find(n=>n.slug===e),c=o?.status==="blocked",u=P(e);if(c){let n=o?.depends_on_requirement?.name;throw new Error(`Cannot acknowledge blocked requirement. ${n?`${n} must be completed first.`:"A dependent requirement must be completed first."}`)}if(u)throw new Error("Cannot uncheck this acknowledgement because other requirements depend on it and are already in progress or completed.");if(h)throw new Error("Cannot acknowledge requirement while pending acknowledgement");o?.status==="finished"?await F({employmentId:t,requirementSlug:e}):await G({employmentId:t,requirementSlug:e}),await b()},"onAcknowledgeRequirement"),j=r(async e=>{if(!s)throw new Error("No active requirement selected");let o=i[s];if(!o)throw new Error("No document to sign");if(!e)throw new Error("Signature is required");let c=await $({employmentId:t,documentId:o,signature:e});return await b(),c},"onSignDocument"),P=r(e=>q.get(e)?.status==="finished","isAckLocked"),z=r(e=>s===e&&(p.isPending||x),"isRequirementLoading"),h=R.isPending||O.isPending;return{requirements:a,isLoadingRequirements:L,documentPreview:T,isSigning:l.isPending,onCreateDocument:I,onSignDocument:j,onAcknowledgeRequirement:S,isPendingAcknowledgement:h,isAckLocked:P,isRequirementLoading:z}},"usePreOnboardingRequirements"),V=r(({render:t})=>{let{onboardingBag:m}=w(),i=H({employmentId:m.employmentId});return t(i)},"PreOnboardingRequirements");export{H as a,V as b};
2
- //# sourceMappingURL=chunk-NKGJZNXL.js.map
1
+ import{b as w}from"./chunk-PGWKJ6FK.js";import{r as k,s as A,t as y,u as D,v as _,w as M}from"./chunk-2GTY2DMO.js";import{b as d}from"./chunk-C4HFMTSB.js";import{a as r}from"./chunk-P37U34EQ.js";import{useState as E}from"react";var H=r(({employmentId:t})=>{let{onboardingBag:m}=w(),[i,v]=E({}),[s,B]=E(),C=!!(m.options?.features?.includes("pre_onboarding_requirements")&&t),{data:a,isLoading:L,refetch:b}=k(t,{queryOptions:{enabled:C}}),q=new Map;for(let e of a??[])e.depends_on_requirement&&q.set(e.depends_on_requirement.slug,e);let f=s?i[s]:void 0,{data:T,isLoading:x}=y(t,f,{queryOptions:{enabled:!!f}}),p=A(),l=D(),R=_(),O=M(),{mutateAsyncOrThrow:N}=d(p),{mutateAsyncOrThrow:$}=d(l),{mutateAsyncOrThrow:G}=d(R),{mutateAsyncOrThrow:F}=d(O),I=r(async e=>{let o=a?.find(n=>n.slug===e);if(o?.status==="blocked"){let n=o.depends_on_requirement?.name;throw new Error(`Cannot create document for blocked requirement. ${n?`${n} must be completed first.`:"A dependent requirement must be completed first."}`)}let c=i[e];if(B(e),c)return null;let u=await N({employmentId:t,body:{requirement_slug:e,employment_id:t}}),g=u?.data.pre_onboarding_document.id;return g&&v(n=>({...n,[e]:g})),u},"onCreateDocument"),S=r(async e=>{let o=a?.find(n=>n.slug===e),c=o?.status==="blocked",u=P(e);if(c){let n=o?.depends_on_requirement?.name;throw new Error(`Cannot acknowledge blocked requirement. ${n?`${n} must be completed first.`:"A dependent requirement must be completed first."}`)}if(u)throw new Error("Cannot uncheck this acknowledgement because other requirements depend on it and are already in progress or completed.");if(h)throw new Error("Cannot acknowledge requirement while pending acknowledgement");o?.status==="finished"?await F({employmentId:t,requirementSlug:e}):await G({employmentId:t,requirementSlug:e}),await b()},"onAcknowledgeRequirement"),j=r(async e=>{if(!s)throw new Error("No active requirement selected");let o=i[s];if(!o)throw new Error("No document to sign");if(!e)throw new Error("Signature is required");let c=await $({employmentId:t,documentId:o,signature:e});return await b(),c},"onSignDocument"),P=r(e=>q.get(e)?.status==="finished","isAckLocked"),z=r(e=>s===e&&(p.isPending||x),"isRequirementLoading"),h=R.isPending||O.isPending;return{requirements:a,isLoadingRequirements:L,documentPreview:T,isSigning:l.isPending,onCreateDocument:I,onSignDocument:j,onAcknowledgeRequirement:S,isPendingAcknowledgement:h,isAckLocked:P,isRequirementLoading:z}},"usePreOnboardingRequirements"),V=r(({render:t})=>{let{onboardingBag:m}=w(),i=H({employmentId:m.employmentId});return t(i)},"PreOnboardingRequirements");export{H as a,V as b};
2
+ //# sourceMappingURL=chunk-R2D32OB6.js.map
@@ -1,2 +1,2 @@
1
- import{b as a}from"./chunk-WCJZAOZR.js";import{g as p}from"./chunk-5IMEZZMR.js";import{b as r,x as s}from"./chunk-C4HFMTSB.js";import{b as m}from"./chunk-H2O4CVKF.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as h}from"react/jsx-runtime";function C({onSuccess:c,onError:l,children:d}){let{adminBag:t}=a(),{components:u}=m(),e=p(),{mutateAsyncOrThrow:f}=r(e),i=u?.button;if(!i)throw new Error("Button component not found");return h(i,{onClick:n(async()=>{try{if(!t.employmentId)throw new Error("Employment ID is missing. Complete the previous steps first.");let o=await f({employmentId:t.employmentId});await t.refetchSteps(),await c?.(o),t.next()}catch(o){l?.(s(o))}},"handleInvite"),disabled:e.isPending||t.isSubmitting,children:d??"Send invitation"})}n(C,"InvitationStep");export{C as a};
2
- //# sourceMappingURL=chunk-6VEWI4G2.js.map
1
+ import{g as p}from"./chunk-2LR5N626.js";import{b as a}from"./chunk-WCJZAOZR.js";import{b as r,x as s}from"./chunk-C4HFMTSB.js";import{b as m}from"./chunk-H2O4CVKF.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as h}from"react/jsx-runtime";function C({onSuccess:c,onError:l,children:d}){let{adminBag:t}=a(),{components:u}=m(),e=p(),{mutateAsyncOrThrow:f}=r(e),i=u?.button;if(!i)throw new Error("Button component not found");return h(i,{onClick:n(async()=>{try{if(!t.employmentId)throw new Error("Employment ID is missing. Complete the previous steps first.");let o=await f({employmentId:t.employmentId});await t.refetchSteps(),await c?.(o),t.next()}catch(o){l?.(s(o))}},"handleInvite"),disabled:e.isPending||t.isSubmitting,children:d??"Send invitation"})}n(C,"InvitationStep");export{C as a};
2
+ //# sourceMappingURL=chunk-RKP7EEAB.js.map
@@ -1,2 +1,2 @@
1
- import{a as N,b as U}from"./chunk-IN6QZASY.js";import{a as Q,b as W,c as q,d as j,e as z,f as H}from"./chunk-5IMEZZMR.js";import{c as J}from"./chunk-KMLI4ISS.js";import{b as l,h as g}from"./chunk-C4HFMTSB.js";import{a as B}from"./chunk-XPVYX7LE.js";import{a as S}from"./chunk-P37U34EQ.js";import{useState as X,useMemo as gt,useCallback as c}from"react";var wt=S(m=>{let s=0;return{select_country:{index:s++,name:"select_country",visible:!m},contract_details:{index:s++,name:"contract_details"},administrative_details:{index:s++,name:"administrative_details"},invite:{index:s++,name:"invite"}}},"buildAdminSteps"),It=S(({companyId:m,legalEntityId:s,countryCode:Y,employmentId:w,initialValues:_,options:Z})=>{let{data:h,isLoading:$,isError:tt}=U(m),p=s??h?.[0]?.id,[n,C]=X(w),et=_?.basic_information?.country_code,[a,u]=X(Y??et),P=!!a&&!!w,nt=gt(()=>wt(P),[P]),{updateErrorContext:b}=J({flow:"payroll_admin_onboarding"}),at=c(t=>{b({step:t.name})},[b]),{stepState:A,nextStep:it,previousStep:ot,goToStep:st,setStepValues:rt,fieldValues:y,setFieldValues:E}=B(nt,at),d=A.currentStep.name,dt={select_country:"global_payroll_basic_information",contract_details:"global_payroll_contract_details",administrative_details:"global_payroll_administrative_details"},I=W(y),V=Q(a,dt[d],y,{employmentId:d!=="select_country"?n:void 0}),F=d==="select_country"&&!a,i=F?I.data:V.data,lt=F?I.isLoading:V.isLoading,v=q(),O=j(),D=z(),G=H(),{mutateAsyncOrThrow:L}=l(v),{mutateAsyncOrThrow:x}=l(O),{mutateAsyncOrThrow:T}=l(D),{mutateAsyncOrThrow:K}=l(G),ct=v.isPending||O.isPending||D.isPending||G.isPending,{data:R,isLoading:mt,refetch:r}=N(n),pt=R?.find(t=>t.type==="completion")?.sub_steps?.[0]?.status==="completed",ut=c(t=>{E(t);let e=t.country_code;e&&e!==a&&u(e)},[a,E]),yt=c(async t=>{if(!i)return null;let e=await g(t,i.fields,{isPartialValidation:!1});return i.handleValidation(e)},[i]),f=c(async t=>i?g(t,i.fields,{isPartialValidation:!1}):t,[i]),ft=c(async t=>{let e=await f(t);switch(d){case"select_country":{let o=e.country_code??a;if(!o)throw new Error("Country code is required to create an employment.");if(o!==a&&u(o),n){let St=await x({employmentId:n,basicInformation:e});return await r(),St}if(!p)throw new Error("No GP-enabled legal entity available. Cannot create an employment.");let k=await L({countryCode:o,legalEntityId:p,basicInformation:e}),M=k?.data?.employment?.id;if(!M)throw new Error("Employment was created but no ID was returned. Cannot proceed.");return C(M),await r(),k}case"contract_details":{if(!n)throw new Error("Employment ID is missing. Complete the previous step first.");let o=await T({employmentId:n,contractDetails:e});return await r(),o}case"administrative_details":{if(!n)throw new Error("Employment ID is missing. Complete the previous step first.");let o=await K({employmentId:n,administrativeDetails:e});return await r(),o}default:return}},[d,a,n,p,f,L,x,T,K,r]);return{stepState:A,isLoading:mt||lt||$,isSubmitting:ct,isComplete:pt??!1,companyId:m,legalEntityId:p,legalEntities:h??[],isErrorLegalEntities:tt,countryCode:a,employmentId:n,initialValues:_,options:Z,apiSteps:R,refetchSteps:r,fields:i?.fields??[],meta:i?.meta??{},fieldValues:y,setFieldValues:ut,handleValidation:yt,parseFormValues:f,onSubmit:ft,setInternalCountryCode:u,setInternalEmploymentId:C,next:it,back:ot,goToStep:st,setStepValues:rt}},"usePayrollAdminOnboarding");export{It as a};
2
- //# sourceMappingURL=chunk-UTQDJNOV.js.map
1
+ import{a as N,b as U}from"./chunk-QEHEOSJT.js";import{a as Q,b as W,c as q,d as j,e as z,f as H}from"./chunk-2LR5N626.js";import{c as J}from"./chunk-KMLI4ISS.js";import{b as l,h as g}from"./chunk-C4HFMTSB.js";import{a as B}from"./chunk-M3TA5X2H.js";import{a as S}from"./chunk-P37U34EQ.js";import{useState as X,useMemo as gt,useCallback as c}from"react";var wt=S(m=>{let s=0;return{select_country:{index:s++,name:"select_country",visible:!m},contract_details:{index:s++,name:"contract_details"},administrative_details:{index:s++,name:"administrative_details"},invite:{index:s++,name:"invite"}}},"buildAdminSteps"),It=S(({companyId:m,legalEntityId:s,countryCode:Y,employmentId:w,initialValues:_,options:Z})=>{let{data:h,isLoading:$,isError:tt}=U(m),p=s??h?.[0]?.id,[n,C]=X(w),et=_?.basic_information?.country_code,[a,u]=X(Y??et),P=!!a&&!!w,nt=gt(()=>wt(P),[P]),{updateErrorContext:b}=J({flow:"payroll_admin_onboarding"}),at=c(t=>{b({step:t.name})},[b]),{stepState:A,nextStep:it,previousStep:ot,goToStep:st,setStepValues:rt,fieldValues:y,setFieldValues:E}=B(nt,at),d=A.currentStep.name,dt={select_country:"global_payroll_basic_information",contract_details:"global_payroll_contract_details",administrative_details:"global_payroll_administrative_details"},I=W(y),V=Q(a,dt[d],y,{employmentId:d!=="select_country"?n:void 0}),F=d==="select_country"&&!a,i=F?I.data:V.data,lt=F?I.isLoading:V.isLoading,v=q(),O=j(),D=z(),G=H(),{mutateAsyncOrThrow:L}=l(v),{mutateAsyncOrThrow:x}=l(O),{mutateAsyncOrThrow:T}=l(D),{mutateAsyncOrThrow:K}=l(G),ct=v.isPending||O.isPending||D.isPending||G.isPending,{data:R,isLoading:mt,refetch:r}=N(n),pt=R?.find(t=>t.type==="completion")?.sub_steps?.[0]?.status==="completed",ut=c(t=>{E(t);let e=t.country_code;e&&e!==a&&u(e)},[a,E]),yt=c(async t=>{if(!i)return null;let e=await g(t,i.fields,{isPartialValidation:!1});return i.handleValidation(e)},[i]),f=c(async t=>i?g(t,i.fields,{isPartialValidation:!1}):t,[i]),ft=c(async t=>{let e=await f(t);switch(d){case"select_country":{let o=e.country_code??a;if(!o)throw new Error("Country code is required to create an employment.");if(o!==a&&u(o),n){let St=await x({employmentId:n,basicInformation:e});return await r(),St}if(!p)throw new Error("No GP-enabled legal entity available. Cannot create an employment.");let k=await L({countryCode:o,legalEntityId:p,basicInformation:e}),M=k?.data?.employment?.id;if(!M)throw new Error("Employment was created but no ID was returned. Cannot proceed.");return C(M),await r(),k}case"contract_details":{if(!n)throw new Error("Employment ID is missing. Complete the previous step first.");let o=await T({employmentId:n,contractDetails:e});return await r(),o}case"administrative_details":{if(!n)throw new Error("Employment ID is missing. Complete the previous step first.");let o=await K({employmentId:n,administrativeDetails:e});return await r(),o}default:return}},[d,a,n,p,f,L,x,T,K,r]);return{stepState:A,isLoading:mt||lt||$,isSubmitting:ct,isComplete:pt??!1,companyId:m,legalEntityId:p,legalEntities:h??[],isErrorLegalEntities:tt,countryCode:a,employmentId:n,initialValues:_,options:Z,apiSteps:R,refetchSteps:r,fields:i?.fields??[],meta:i?.meta??{},fieldValues:y,setFieldValues:ut,handleValidation:yt,parseFormValues:f,onSubmit:ft,setInternalCountryCode:u,setInternalEmploymentId:C,next:it,back:ot,goToStep:st,setStepValues:rt}},"usePayrollAdminOnboarding");export{It as a};
2
+ //# sourceMappingURL=chunk-S2QXSX4Q.js.map
@@ -1,2 +1,2 @@
1
- import{a as t}from"./chunk-WXTEP5PE.js";import{b as o}from"./chunk-PGWKJ6FK.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as r}from"react/jsx-runtime";function u(){let{onboardingBag:e}=o();return r(t,{defaultValues:{},onSubmit:n(async()=>{e?.next()},"handleSubmit")})}n(u,"PreviewEmploymentAgreementStep");export{u as a};
2
- //# sourceMappingURL=chunk-Q4X35JRA.js.map
1
+ import{a as t}from"./chunk-WH3QR2W5.js";import{b as o}from"./chunk-PGWKJ6FK.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as r}from"react/jsx-runtime";function u(){let{onboardingBag:e}=o();return r(t,{defaultValues:{},onSubmit:n(async()=>{e?.next()},"handleSubmit")})}n(u,"PreviewEmploymentAgreementStep");export{u as a};
2
+ //# sourceMappingURL=chunk-SNGQ2MKL.js.map