@remoteoss/remote-flows 1.49.1 → 1.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (597) hide show
  1. package/README.md +1 -0
  2. package/dist/CheckboxFieldDefault-JOUZXB4Y.js +2 -0
  3. package/dist/CountryFieldDefault-IZQOFNX5.js +2 -0
  4. package/dist/DatePickerFieldDefault-AWV7LUPI.js +2 -0
  5. package/dist/FileUploadFieldDefault-NZ33IMPU.js +2 -0
  6. package/dist/ForcedValueFieldDefault-RY5AN7O6.js +2 -0
  7. package/dist/MultiSelectFieldDefault-DOZQUBEE.js +2 -0
  8. package/dist/RadioGroupFieldDefault-GFDO56LK.js +2 -0
  9. package/dist/SelectFieldDefault-E4KFZBJ7.js +2 -0
  10. package/dist/TelFieldDefault-2EPAKDTW.js +2 -0
  11. package/dist/TextAreaFieldDefault-WZIVM4RZ.js +2 -0
  12. package/dist/TextFieldDefault-YVXZO4AN.js +2 -0
  13. package/dist/TimeFieldDefault-JN4MDIO6.js +2 -0
  14. package/dist/chunk-25MUO3XP.js +2 -0
  15. package/dist/chunk-25MUO3XP.js.map +1 -0
  16. package/dist/{chunk-EQIWABAZ.js → chunk-2UH6Y56R.js} +2 -2
  17. package/dist/{chunk-D737GUYZ.js → chunk-3G4HOZCM.js} +2 -2
  18. package/dist/{chunk-G3KQCVQQ.js → chunk-3OKB5OHA.js} +2 -2
  19. package/dist/{chunk-ANZ2YYUE.js → chunk-46BOEYFO.js} +2 -2
  20. package/dist/{chunk-VYAJQ25J.js → chunk-4CNDASPA.js} +2 -2
  21. package/dist/{chunk-QSF4XFSV.js → chunk-4IGLIHGF.js} +2 -2
  22. package/dist/{chunk-WZOVZYNI.js → chunk-4WSYC3Q5.js} +2 -2
  23. package/dist/{chunk-PYNHR7NL.js → chunk-53QBSOMG.js} +2 -2
  24. package/dist/{chunk-3LELUHRO.js → chunk-5HDMU73I.js} +2 -2
  25. package/dist/{chunk-JQ3SLOUP.js → chunk-5JXLXWTD.js} +2 -2
  26. package/dist/{chunk-F3UUYQGY.js → chunk-5PUW4YCY.js} +2 -2
  27. package/dist/chunk-5YI7MY5T.js +2 -0
  28. package/dist/chunk-5YI7MY5T.js.map +1 -0
  29. package/dist/{chunk-6IQJJCQ3.js → chunk-6CBC5OAQ.js} +2 -2
  30. package/dist/{chunk-JKHJR6HK.js → chunk-753FEV2S.js} +2 -2
  31. package/dist/{chunk-JKHJR6HK.js.map → chunk-753FEV2S.js.map} +1 -1
  32. package/dist/{chunk-YRC6EEM3.js → chunk-77AA65OH.js} +2 -2
  33. package/dist/{chunk-YRC6EEM3.js.map → chunk-77AA65OH.js.map} +1 -1
  34. package/dist/{chunk-ZXGAFQXW.js → chunk-7B3ATY3M.js} +2 -2
  35. package/dist/{chunk-ZXGAFQXW.js.map → chunk-7B3ATY3M.js.map} +1 -1
  36. package/dist/{chunk-5FGYC2RF.js → chunk-7FKNXW2I.js} +2 -2
  37. package/dist/{chunk-Z7VNXKWB.js → chunk-AAXPKULB.js} +2 -2
  38. package/dist/chunk-AXZ4IDY7.js +2 -0
  39. package/dist/chunk-AXZ4IDY7.js.map +1 -0
  40. package/dist/{chunk-FDTOQHOJ.js → chunk-BB3M25A3.js} +2 -2
  41. package/dist/chunk-BHHK7QQZ.js +2 -0
  42. package/dist/chunk-BHHK7QQZ.js.map +1 -0
  43. package/dist/{chunk-OTBCLDGR.js → chunk-BLKWR77C.js} +2 -2
  44. package/dist/chunk-BTCC6PNG.js +2 -0
  45. package/dist/chunk-BTCC6PNG.js.map +1 -0
  46. package/dist/{chunk-5WTCN4WO.js → chunk-C7MVEDVY.js} +2 -2
  47. package/dist/{chunk-WDPJIOLG.js → chunk-CCGAAOXN.js} +2 -2
  48. package/dist/{chunk-EYZVDP6A.js → chunk-CD6H4MBI.js} +2 -2
  49. package/dist/{chunk-4YFJOHSM.js → chunk-CONMRDRL.js} +2 -2
  50. package/dist/{chunk-F2SGCGXL.js → chunk-CUO7OGD5.js} +2 -2
  51. package/dist/{chunk-F3DZUA7W.js → chunk-D6PMXNBM.js} +2 -2
  52. package/dist/chunk-DDMXUBCN.js +2 -0
  53. package/dist/chunk-DDMXUBCN.js.map +1 -0
  54. package/dist/{chunk-K67Q5476.js → chunk-DOPQK5RP.js} +2 -2
  55. package/dist/{chunk-C5T75DEZ.js → chunk-DP6L72YF.js} +2 -2
  56. package/dist/{chunk-ALHHN2LG.js → chunk-DYIMRD6T.js} +2 -2
  57. package/dist/{chunk-TC7EQZJK.js → chunk-E5ATCB4A.js} +2 -2
  58. package/dist/{chunk-TC7EQZJK.js.map → chunk-E5ATCB4A.js.map} +1 -1
  59. package/dist/{chunk-5TOSVOLY.js → chunk-ED35NFA6.js} +2 -2
  60. package/dist/{chunk-V3C32X6R.js → chunk-EMMFAZZC.js} +2 -2
  61. package/dist/{chunk-2GTY2DMO.js → chunk-ERBEPQJP.js} +2 -2
  62. package/dist/{chunk-2GTY2DMO.js.map → chunk-ERBEPQJP.js.map} +1 -1
  63. package/dist/{chunk-3BQVEYHE.js → chunk-EVUTX6TJ.js} +2 -2
  64. package/dist/chunk-F37FQXEZ.js +2 -0
  65. package/dist/chunk-F37FQXEZ.js.map +1 -0
  66. package/dist/chunk-FQBOMXMX.js +2 -0
  67. package/dist/chunk-FQBOMXMX.js.map +1 -0
  68. package/dist/{chunk-R2D32OB6.js → chunk-FSCAWXCB.js} +2 -2
  69. package/dist/{chunk-7XDU2VWN.js → chunk-FV6NNYDP.js} +2 -2
  70. package/dist/{chunk-JLM4O7ZW.js → chunk-G6EKGJBB.js} +2 -2
  71. package/dist/{chunk-YUUUI4FY.js → chunk-G75LPZV5.js} +2 -2
  72. package/dist/{chunk-3RQSRU7O.js → chunk-GE74QKS6.js} +2 -2
  73. package/dist/{chunk-H5OZSXSY.js → chunk-GHZABLDV.js} +2 -2
  74. package/dist/chunk-GIZQZBHB.js +2 -0
  75. package/dist/chunk-GIZQZBHB.js.map +1 -0
  76. package/dist/{chunk-BTZ57COZ.js → chunk-GTS7KFEM.js} +2 -2
  77. package/dist/{chunk-WYIU74JN.js → chunk-H47XUL2L.js} +2 -2
  78. package/dist/chunk-H6XROFQT.js +2 -0
  79. package/dist/chunk-H6XROFQT.js.map +1 -0
  80. package/dist/{chunk-VQRE3YLW.js → chunk-I4DU34BA.js} +2 -2
  81. package/dist/chunk-ICYCECFS.js +2 -0
  82. package/dist/{chunk-XFD3ULUF.js.map → chunk-ICYCECFS.js.map} +1 -1
  83. package/dist/{chunk-S2QXSX4Q.js → chunk-ILEO7LN4.js} +2 -2
  84. package/dist/{chunk-7NDAFJXR.js → chunk-ILMRP364.js} +2 -2
  85. package/dist/{chunk-J4CHUIPC.js → chunk-ITCWBZDM.js} +2 -2
  86. package/dist/{chunk-PNNOU6BC.js → chunk-JI3PAIMV.js} +2 -2
  87. package/dist/{chunk-WGDZTF7Y.js → chunk-JLZFNUBH.js} +2 -2
  88. package/dist/{chunk-IUBHVGVV.js → chunk-JVXI4RZU.js} +2 -2
  89. package/dist/{chunk-LMYJ6V44.js → chunk-JVZ5LUV4.js} +2 -2
  90. package/dist/{chunk-LMYJ6V44.js.map → chunk-JVZ5LUV4.js.map} +1 -1
  91. package/dist/{chunk-4Y2INBAI.js → chunk-KGNLBYM5.js} +2 -2
  92. package/dist/{chunk-ORP6DY5I.js → chunk-L2YOD4GP.js} +2 -2
  93. package/dist/{chunk-IAR6BWUY.js → chunk-LADLAP2S.js} +2 -2
  94. package/dist/chunk-LSUBNZ64.js +2 -0
  95. package/dist/chunk-LSUBNZ64.js.map +1 -0
  96. package/dist/{chunk-QHJ3BYJN.js → chunk-LXGL7HF5.js} +2 -2
  97. package/dist/{chunk-2LSLWFZS.js → chunk-MEYX4D5K.js} +2 -2
  98. package/dist/{chunk-LCUYP6VW.js → chunk-MXAFJYLQ.js} +2 -2
  99. package/dist/{chunk-UAEQLFPK.js → chunk-N7HCQXUM.js} +2 -2
  100. package/dist/chunk-NAFECQWK.js +2 -0
  101. package/dist/{chunk-JRRPMAUO.js → chunk-NFWKD7UR.js} +2 -2
  102. package/dist/{chunk-6S5Q2OKC.js → chunk-NTPHMYYC.js} +2 -2
  103. package/dist/chunk-NYR6FVCU.js +2 -0
  104. package/dist/{chunk-ILX6RI7K.js.map → chunk-NYR6FVCU.js.map} +1 -1
  105. package/dist/chunk-OHVXJXF4.js +1 -0
  106. package/dist/chunk-OHVXJXF4.js.map +1 -0
  107. package/dist/{chunk-POWC7LZN.js → chunk-OKBPMWVB.js} +2 -2
  108. package/dist/{chunk-BWM2MYPE.js → chunk-OWOIDZHI.js} +2 -2
  109. package/dist/{chunk-6IDUDCVS.js → chunk-P2WUHKEU.js} +2 -2
  110. package/dist/{chunk-3LMZ3SOP.js → chunk-P6FFLJDP.js} +2 -2
  111. package/dist/{chunk-MZK2U65W.js → chunk-PKJZ2N4C.js} +2 -2
  112. package/dist/{chunk-NX7MM6XR.js → chunk-PKQG25GH.js} +2 -2
  113. package/dist/{chunk-NX7MM6XR.js.map → chunk-PKQG25GH.js.map} +1 -1
  114. package/dist/{chunk-CFPKRLGM.js → chunk-QFTBKRUI.js} +2 -2
  115. package/dist/chunk-QQV5REGG.js +8 -0
  116. package/dist/chunk-QQV5REGG.js.map +1 -0
  117. package/dist/{chunk-ZQVVHVAG.js → chunk-R4ZUOFYN.js} +2 -2
  118. package/dist/chunk-R5ADEPLC.js +2 -0
  119. package/dist/chunk-R5ADEPLC.js.map +1 -0
  120. package/dist/{chunk-TXOCMI5I.js → chunk-RFMYNPR7.js} +2 -2
  121. package/dist/chunk-ROO2IFBF.js +2 -0
  122. package/dist/chunk-ROO2IFBF.js.map +1 -0
  123. package/dist/{chunk-2LR5N626.js → chunk-RYZ7TJVS.js} +2 -2
  124. package/dist/{chunk-UU2IFOXR.js → chunk-RZL44CPH.js} +2 -2
  125. package/dist/{chunk-C2HZNBMZ.js → chunk-SLRPDXK6.js} +2 -2
  126. package/dist/{chunk-5WIBTOCI.js → chunk-SRNXXOUH.js} +2 -2
  127. package/dist/{chunk-5WIBTOCI.js.map → chunk-SRNXXOUH.js.map} +1 -1
  128. package/dist/{chunk-5MH23AST.js → chunk-STHZZZRL.js} +2 -2
  129. package/dist/{chunk-CHIWBD6E.js → chunk-SUYI33NX.js} +2 -2
  130. package/dist/chunk-SVU7GWUR.js +2 -0
  131. package/dist/chunk-SVU7GWUR.js.map +1 -0
  132. package/dist/{chunk-3VTHNE4H.js → chunk-SZI67IXU.js} +2 -2
  133. package/dist/chunk-T5H35HYL.js +2 -0
  134. package/dist/{chunk-KPDYUFCB.js.map → chunk-T5H35HYL.js.map} +1 -1
  135. package/dist/chunk-TDKKCSKV.js +2 -0
  136. package/dist/{chunk-7IIQUZTH.js.map → chunk-TDKKCSKV.js.map} +1 -1
  137. package/dist/{chunk-QEHEOSJT.js → chunk-TJZ5BJV3.js} +2 -2
  138. package/dist/chunk-TRDNTXE7.js +2 -0
  139. package/dist/chunk-TRDNTXE7.js.map +1 -0
  140. package/dist/{chunk-WHDUZGVW.js → chunk-TX6RWQUR.js} +2 -2
  141. package/dist/chunk-U4H7URYB.js +2 -0
  142. package/dist/chunk-U4H7URYB.js.map +1 -0
  143. package/dist/{chunk-RKP7EEAB.js → chunk-UGQNOBQH.js} +2 -2
  144. package/dist/chunk-UWHJF45X.js +2 -0
  145. package/dist/chunk-UWHJF45X.js.map +1 -0
  146. package/dist/{chunk-BFXBFGBH.js → chunk-UYOKK4QW.js} +2 -2
  147. package/dist/{chunk-BFXBFGBH.js.map → chunk-UYOKK4QW.js.map} +1 -1
  148. package/dist/{chunk-SUVBETJS.js → chunk-V3AVEPNA.js} +2 -2
  149. package/dist/{chunk-KZ5ZQTBF.js → chunk-V6PPOGPT.js} +2 -2
  150. package/dist/{chunk-IJCTN52C.js → chunk-VDJJEIOD.js} +2 -2
  151. package/dist/{chunk-IJCTN52C.js.map → chunk-VDJJEIOD.js.map} +1 -1
  152. package/dist/chunk-VKUGCD5J.js +2 -0
  153. package/dist/chunk-VKUGCD5J.js.map +1 -0
  154. package/dist/{chunk-XTLTKB3S.js → chunk-VRPZ4GHN.js} +2 -2
  155. package/dist/{chunk-IRUWMZVH.js → chunk-VVZTXCX2.js} +2 -2
  156. package/dist/{chunk-SNGQ2MKL.js → chunk-VYTUM3RI.js} +2 -2
  157. package/dist/{chunk-FT4ZNBTA.js → chunk-WGO25FWG.js} +2 -2
  158. package/dist/{chunk-TLJXBZII.js → chunk-WKWL57L6.js} +2 -2
  159. package/dist/chunk-WRTUY6K3.js +2 -0
  160. package/dist/chunk-WRTUY6K3.js.map +1 -0
  161. package/dist/{chunk-5FJ64F6D.js → chunk-WVE2IOLY.js} +2 -2
  162. package/dist/{chunk-LCUURLXS.js → chunk-XDLVDPQ7.js} +2 -2
  163. package/dist/{chunk-WB52GW3H.js → chunk-XEVHXHHC.js} +2 -2
  164. package/dist/{chunk-JMFCG5KA.js → chunk-XMIVJW5E.js} +2 -2
  165. package/dist/{chunk-WH3QR2W5.js → chunk-XMVV6S77.js} +2 -2
  166. package/dist/{chunk-AP56UUME.js → chunk-Y2NCUO3F.js} +2 -2
  167. package/dist/{chunk-AP56UUME.js.map → chunk-Y2NCUO3F.js.map} +1 -1
  168. package/dist/{chunk-A5XRBDDO.js → chunk-YHZZHQP5.js} +2 -2
  169. package/dist/{chunk-PJTMFMRJ.js → chunk-YME2HZZJ.js} +2 -2
  170. package/dist/{chunk-B3ESNTKY.js → chunk-Z7XLK4JL.js} +2 -2
  171. package/dist/chunk-ZD4H63AL.js +2 -0
  172. package/dist/chunk-ZD4H63AL.js.map +1 -0
  173. package/dist/{chunk-5J7DLDLW.js → chunk-ZODT3MJM.js} +2 -2
  174. package/dist/{chunk-6L77BWCI.js → chunk-ZOTKZZ67.js} +2 -2
  175. package/dist/{chunk-BYTVIOOL.js → chunk-ZREW7KZA.js} +2 -2
  176. package/dist/createInvoiceSchedule-BweQB6DI.d.ts +195 -0
  177. package/dist/default-components.d.ts +2 -2
  178. package/dist/default-components.js +1 -1
  179. package/dist/default-components.js.map +1 -1
  180. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
  181. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +3 -3
  182. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  183. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
  184. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  185. package/dist/flows/ContractAmendment/context.d.ts +4 -4
  186. package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
  187. package/dist/flows/ContractAmendment/hooks.js +1 -1
  188. package/dist/flows/ContractAmendment/index.d.ts +3 -3
  189. package/dist/flows/ContractAmendment/index.js +1 -1
  190. package/dist/flows/ContractAmendment/types.d.ts +3 -3
  191. package/dist/flows/ContractAmendment/utils.d.ts +2 -2
  192. package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +6 -5
  193. package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
  194. package/dist/flows/ContractorOnboarding/api.d.ts +173 -413
  195. package/dist/flows/ContractorOnboarding/api.js +1 -1
  196. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
  197. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
  198. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +6 -5
  199. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
  200. package/dist/flows/ContractorOnboarding/components/ContractOriginStep.d.ts +3 -3
  201. package/dist/flows/ContractorOnboarding/components/ContractOriginStep.js +1 -1
  202. package/dist/flows/ContractorOnboarding/components/ContractPreviewHeader.d.ts +2 -2
  203. package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.d.ts +2 -2
  204. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +6 -5
  205. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
  206. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +6 -5
  207. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
  208. package/dist/flows/ContractorOnboarding/components/CreateInvoiceScheduleStep.d.ts +3 -3
  209. package/dist/flows/ContractorOnboarding/components/CreateInvoiceScheduleStep.js +1 -1
  210. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.d.ts +6 -5
  211. package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.js +1 -1
  212. package/dist/flows/ContractorOnboarding/components/InvoiceScheduleStep.d.ts +6 -5
  213. package/dist/flows/ContractorOnboarding/components/InvoiceScheduleStep.js +1 -1
  214. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
  215. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
  216. package/dist/flows/ContractorOnboarding/components/PreviewInvoiceButton.d.ts +29 -0
  217. package/dist/flows/ContractorOnboarding/components/PreviewInvoiceButton.js +2 -0
  218. package/dist/flows/ContractorOnboarding/components/PreviewInvoiceButton.js.map +1 -0
  219. package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +6 -5
  220. package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
  221. package/dist/flows/ContractorOnboarding/components/SaveDraftButton.d.ts +3 -3
  222. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
  223. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
  224. package/dist/flows/ContractorOnboarding/components/SkipInvoiceScheduleButton.d.ts +24 -0
  225. package/dist/flows/ContractorOnboarding/components/SkipInvoiceScheduleButton.js +2 -0
  226. package/dist/flows/ContractorOnboarding/components/SkipInvoiceScheduleButton.js.map +1 -0
  227. package/dist/flows/ContractorOnboarding/context.d.ts +14 -5
  228. package/dist/flows/ContractorOnboarding/hooks.d.ts +6 -5
  229. package/dist/flows/ContractorOnboarding/hooks.js +1 -1
  230. package/dist/flows/ContractorOnboarding/index.d.ts +6 -5
  231. package/dist/flows/ContractorOnboarding/index.js +1 -1
  232. package/dist/flows/ContractorOnboarding/invoiceScheduleConstants.d.ts +1 -0
  233. package/dist/flows/ContractorOnboarding/invoiceScheduleConstants.js +1 -1
  234. package/dist/flows/ContractorOnboarding/jsfModify.d.ts +6 -5
  235. package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
  236. package/dist/flows/ContractorOnboarding/json-schemas/contractOrigin.d.ts +3 -0
  237. package/dist/flows/ContractorOnboarding/json-schemas/contractOrigin.js +1 -1
  238. package/dist/flows/ContractorOnboarding/json-schemas/createInvoiceSchedule.d.ts +1 -103
  239. package/dist/flows/ContractorOnboarding/json-schemas/createInvoiceSchedule.js +1 -1
  240. package/dist/flows/ContractorOnboarding/json-schemas/invoiceSchedule.d.ts +3 -0
  241. package/dist/flows/ContractorOnboarding/json-schemas/invoiceSchedule.js +1 -1
  242. package/dist/flows/ContractorOnboarding/json-schemas/selectContractorSubscriptionStep.d.ts +3 -0
  243. package/dist/flows/ContractorOnboarding/json-schemas/selectContractorSubscriptionStep.js +1 -1
  244. package/dist/flows/ContractorOnboarding/json-schemas/signature.d.ts +3 -0
  245. package/dist/flows/ContractorOnboarding/json-schemas/signature.js +1 -1
  246. package/dist/flows/ContractorOnboarding/types.d.ts +6 -5
  247. package/dist/flows/ContractorOnboarding/utils.d.ts +31 -21
  248. package/dist/flows/ContractorOnboarding/utils.js +1 -1
  249. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
  250. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  251. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
  252. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  253. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +3 -3
  254. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  255. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +3 -3
  256. package/dist/flows/CostCalculator/api.d.ts +3 -3
  257. package/dist/flows/CostCalculator/api.js +1 -1
  258. package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
  259. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  260. package/dist/flows/CostCalculator/context.d.ts +3 -3
  261. package/dist/flows/CostCalculator/hooks.d.ts +3 -3
  262. package/dist/flows/CostCalculator/hooks.js +1 -1
  263. package/dist/flows/CostCalculator/index.d.ts +3 -3
  264. package/dist/flows/CostCalculator/index.js +1 -1
  265. package/dist/flows/CostCalculator/types.d.ts +3 -3
  266. package/dist/flows/CostCalculator/utils.d.ts +3 -3
  267. package/dist/flows/CostCalculator/utils.js +1 -1
  268. package/dist/flows/CreateCompany/CreateCompany.d.ts +4 -4
  269. package/dist/flows/CreateCompany/CreateCompany.js +1 -1
  270. package/dist/flows/CreateCompany/api.d.ts +3 -3
  271. package/dist/flows/CreateCompany/api.js +1 -1
  272. package/dist/flows/CreateCompany/components/AddressDetailsStep.d.ts +4 -4
  273. package/dist/flows/CreateCompany/components/AddressDetailsStep.js +1 -1
  274. package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.d.ts +4 -4
  275. package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.js +1 -1
  276. package/dist/flows/CreateCompany/components/CreateCompanyForm.d.ts +2 -2
  277. package/dist/flows/CreateCompany/components/CreateCompanyForm.js +1 -1
  278. package/dist/flows/CreateCompany/context.d.ts +4 -4
  279. package/dist/flows/CreateCompany/hooks.d.ts +4 -4
  280. package/dist/flows/CreateCompany/hooks.js +1 -1
  281. package/dist/flows/CreateCompany/index.d.ts +4 -4
  282. package/dist/flows/CreateCompany/index.js +1 -1
  283. package/dist/flows/CreateCompany/json-schemas/companyBasicInformationStep.d.ts +3 -0
  284. package/dist/flows/CreateCompany/json-schemas/companyBasicInformationStep.js +1 -1
  285. package/dist/flows/CreateCompany/types.d.ts +4 -4
  286. package/dist/flows/InvoiceSchedule/InvoiceScheduleFlow.d.ts +44 -0
  287. package/dist/flows/InvoiceSchedule/InvoiceScheduleFlow.js +2 -0
  288. package/dist/flows/InvoiceSchedule/InvoiceScheduleFlow.js.map +1 -0
  289. package/dist/flows/InvoiceSchedule/InvoiceScheduleForm.d.ts +35 -0
  290. package/dist/flows/InvoiceSchedule/InvoiceScheduleForm.js +2 -0
  291. package/dist/flows/InvoiceSchedule/InvoiceScheduleForm.js.map +1 -0
  292. package/dist/flows/InvoiceSchedule/InvoiceScheduleSubmitButton.d.ts +6 -0
  293. package/dist/flows/InvoiceSchedule/InvoiceScheduleSubmitButton.js +2 -0
  294. package/dist/flows/InvoiceSchedule/InvoiceScheduleSubmitButton.js.map +1 -0
  295. package/dist/flows/InvoiceSchedule/api.d.ts +47 -0
  296. package/dist/flows/InvoiceSchedule/api.js +2 -0
  297. package/dist/flows/InvoiceSchedule/api.js.map +1 -0
  298. package/dist/flows/InvoiceSchedule/components/ContractorSelectField.d.ts +20 -0
  299. package/dist/flows/InvoiceSchedule/components/ContractorSelectField.js +2 -0
  300. package/dist/flows/InvoiceSchedule/components/ContractorSelectField.js.map +1 -0
  301. package/dist/flows/InvoiceSchedule/context.d.ts +61 -0
  302. package/dist/flows/InvoiceSchedule/context.js +2 -0
  303. package/dist/flows/InvoiceSchedule/context.js.map +1 -0
  304. package/dist/flows/InvoiceSchedule/hooks.d.ts +108 -0
  305. package/dist/flows/InvoiceSchedule/hooks.js +2 -0
  306. package/dist/flows/InvoiceSchedule/hooks.js.map +1 -0
  307. package/dist/flows/InvoiceSchedule/index.d.ts +18 -0
  308. package/dist/flows/InvoiceSchedule/index.js +2 -0
  309. package/dist/flows/InvoiceSchedule/index.js.map +1 -0
  310. package/dist/flows/InvoiceSchedule/types.d.ts +78 -0
  311. package/dist/flows/InvoiceSchedule/types.js +1 -0
  312. package/dist/flows/InvoiceSchedule/types.js.map +1 -0
  313. package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundFlow.d.ts +3 -3
  314. package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundFlow.js +1 -1
  315. package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundForm.d.ts +2 -2
  316. package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundForm.js +1 -1
  317. package/dist/flows/JsonSchemaPlayground/context.d.ts +3 -3
  318. package/dist/flows/JsonSchemaPlayground/hooks.d.ts +3 -3
  319. package/dist/flows/JsonSchemaPlayground/index.d.ts +3 -3
  320. package/dist/flows/JsonSchemaPlayground/index.js +1 -1
  321. package/dist/flows/JsonSchemaPlayground/types.d.ts +3 -3
  322. package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
  323. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  324. package/dist/flows/Onboarding/api.d.ts +4 -4
  325. package/dist/flows/Onboarding/api.js +1 -1
  326. package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
  327. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  328. package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +4 -4
  329. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  330. package/dist/flows/Onboarding/components/BenefitsStep.d.ts +4 -4
  331. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  332. package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +4 -4
  333. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  334. package/dist/flows/Onboarding/components/EmploymentAgreementInfoContent.js +1 -1
  335. package/dist/flows/Onboarding/components/EngagementAgreementDetailsStep.d.ts +4 -4
  336. package/dist/flows/Onboarding/components/EngagementAgreementDetailsStep.js +1 -1
  337. package/dist/flows/Onboarding/components/OnboardingForm.d.ts +4 -4
  338. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  339. package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
  340. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  341. package/dist/flows/Onboarding/components/PreOnboardingRequirements.d.ts +4 -4
  342. package/dist/flows/Onboarding/components/PreOnboardingRequirements.js +1 -1
  343. package/dist/flows/Onboarding/components/PreviewEmploymentAgreementStep.js +1 -1
  344. package/dist/flows/Onboarding/components/ReviewStep.d.ts +4 -4
  345. package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
  346. package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +4 -4
  347. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  348. package/dist/flows/Onboarding/context.d.ts +5 -5
  349. package/dist/flows/Onboarding/hooks.d.ts +4 -4
  350. package/dist/flows/Onboarding/hooks.js +1 -1
  351. package/dist/flows/Onboarding/index.d.ts +4 -4
  352. package/dist/flows/Onboarding/index.js +1 -1
  353. package/dist/flows/Onboarding/types.d.ts +4 -4
  354. package/dist/flows/Onboarding/utils.d.ts +4 -4
  355. package/dist/flows/PayrollAdminOnboarding/PayrollAdminOnboardingFlow.d.ts +5 -5
  356. package/dist/flows/PayrollAdminOnboarding/PayrollAdminOnboardingFlow.js +1 -1
  357. package/dist/flows/PayrollAdminOnboarding/api.d.ts +2 -2
  358. package/dist/flows/PayrollAdminOnboarding/api.js +1 -1
  359. package/dist/flows/PayrollAdminOnboarding/components/AdministrativeDetailsStep.d.ts +3 -3
  360. package/dist/flows/PayrollAdminOnboarding/components/AdministrativeDetailsStep.js +1 -1
  361. package/dist/flows/PayrollAdminOnboarding/components/ContractDetailsStep.d.ts +3 -3
  362. package/dist/flows/PayrollAdminOnboarding/components/ContractDetailsStep.js +1 -1
  363. package/dist/flows/PayrollAdminOnboarding/components/InvitationStep.d.ts +3 -3
  364. package/dist/flows/PayrollAdminOnboarding/components/InvitationStep.js +1 -1
  365. package/dist/flows/PayrollAdminOnboarding/components/PayrollAdminForm.d.ts +2 -2
  366. package/dist/flows/PayrollAdminOnboarding/components/PayrollAdminForm.js +1 -1
  367. package/dist/flows/PayrollAdminOnboarding/components/SelectCountryStep.d.ts +3 -3
  368. package/dist/flows/PayrollAdminOnboarding/components/SelectCountryStep.js +1 -1
  369. package/dist/flows/PayrollAdminOnboarding/components/useStepSubmitHandler.d.ts +3 -3
  370. package/dist/flows/PayrollAdminOnboarding/context.d.ts +5 -5
  371. package/dist/flows/PayrollAdminOnboarding/hooks.d.ts +6 -6
  372. package/dist/flows/PayrollAdminOnboarding/hooks.js +1 -1
  373. package/dist/flows/PayrollAdminOnboarding/index.d.ts +5 -5
  374. package/dist/flows/PayrollAdminOnboarding/index.js +1 -1
  375. package/dist/flows/PayrollAdminOnboarding/types.d.ts +5 -5
  376. package/dist/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.d.ts +5 -5
  377. package/dist/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.js +1 -1
  378. package/dist/flows/PayrollEmployeeOnboarding/api.d.ts +3 -3
  379. package/dist/flows/PayrollEmployeeOnboarding/api.js +1 -1
  380. package/dist/flows/PayrollEmployeeOnboarding/components/BankAccountStep.d.ts +3 -3
  381. package/dist/flows/PayrollEmployeeOnboarding/components/BankAccountStep.js +1 -1
  382. package/dist/flows/PayrollEmployeeOnboarding/components/FederalTaxesStep.d.ts +3 -3
  383. package/dist/flows/PayrollEmployeeOnboarding/components/FederalTaxesStep.js +1 -1
  384. package/dist/flows/PayrollEmployeeOnboarding/components/HomeAddressStep.d.ts +3 -3
  385. package/dist/flows/PayrollEmployeeOnboarding/components/HomeAddressStep.js +1 -1
  386. package/dist/flows/PayrollEmployeeOnboarding/components/PayrollEmployeeForm.d.ts +2 -2
  387. package/dist/flows/PayrollEmployeeOnboarding/components/PayrollEmployeeForm.js +1 -1
  388. package/dist/flows/PayrollEmployeeOnboarding/components/PersonalDetailsStep.d.ts +3 -3
  389. package/dist/flows/PayrollEmployeeOnboarding/components/PersonalDetailsStep.js +1 -1
  390. package/dist/flows/PayrollEmployeeOnboarding/components/StateTaxesStep.d.ts +3 -3
  391. package/dist/flows/PayrollEmployeeOnboarding/components/StateTaxesStep.js +1 -1
  392. package/dist/flows/PayrollEmployeeOnboarding/components/useEmployeeStepSubmitHandler.d.ts +3 -3
  393. package/dist/flows/PayrollEmployeeOnboarding/context.d.ts +5 -5
  394. package/dist/flows/PayrollEmployeeOnboarding/hooks.d.ts +6 -6
  395. package/dist/flows/PayrollEmployeeOnboarding/hooks.js +1 -1
  396. package/dist/flows/PayrollEmployeeOnboarding/index.d.ts +5 -5
  397. package/dist/flows/PayrollEmployeeOnboarding/index.js +1 -1
  398. package/dist/flows/PayrollEmployeeOnboarding/types.d.ts +5 -5
  399. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -4
  400. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  401. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +4 -4
  402. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  403. package/dist/flows/Termination/PaidTimeOffForm.d.ts +4 -4
  404. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  405. package/dist/flows/Termination/TerminationDetailsForm.d.ts +4 -4
  406. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  407. package/dist/flows/Termination/TerminationFlow.d.ts +4 -4
  408. package/dist/flows/Termination/TerminationFlow.js +1 -1
  409. package/dist/flows/Termination/TerminationForm.d.ts +4 -4
  410. package/dist/flows/Termination/TerminationForm.js +1 -1
  411. package/dist/flows/Termination/api.d.ts +5 -5
  412. package/dist/flows/Termination/api.js +1 -1
  413. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
  414. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +6 -6
  415. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +6 -6
  416. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
  417. package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +6 -6
  418. package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
  419. package/dist/flows/Termination/context.d.ts +4 -4
  420. package/dist/flows/Termination/hooks.d.ts +4 -4
  421. package/dist/flows/Termination/hooks.js +1 -1
  422. package/dist/flows/Termination/index.d.ts +6 -6
  423. package/dist/flows/Termination/index.js +1 -1
  424. package/dist/flows/Termination/json-schemas/additionalInformation.d.ts +3 -0
  425. package/dist/flows/Termination/json-schemas/additionalInformation.js +1 -1
  426. package/dist/flows/Termination/json-schemas/defaultSchema.d.ts +3 -0
  427. package/dist/flows/Termination/json-schemas/defaultSchema.js +1 -1
  428. package/dist/flows/Termination/json-schemas/employeeComunication.d.ts +3 -0
  429. package/dist/flows/Termination/json-schemas/employeeComunication.js +1 -1
  430. package/dist/flows/Termination/json-schemas/jsonSchema.d.ts +3 -0
  431. package/dist/flows/Termination/json-schemas/jsonSchema.js +1 -1
  432. package/dist/flows/Termination/json-schemas/paidTimeOff.d.ts +3 -0
  433. package/dist/flows/Termination/json-schemas/paidTimeOff.js +1 -1
  434. package/dist/flows/Termination/json-schemas/schema.d.ts +4 -4
  435. package/dist/flows/Termination/json-schemas/schema.js +1 -1
  436. package/dist/flows/Termination/json-schemas/terminationDetails.d.ts +3 -0
  437. package/dist/flows/Termination/json-schemas/terminationDetails.js +1 -1
  438. package/dist/flows/Termination/types.d.ts +4 -4
  439. package/dist/flows/Termination/utils.d.ts +4 -4
  440. package/dist/flows/types.d.ts +3 -3
  441. package/dist/flows/utils.d.ts +2 -2
  442. package/dist/index.css +1 -1
  443. package/dist/index.css.map +1 -1
  444. package/dist/index.d.ts +23 -15
  445. package/dist/index.js +2 -2
  446. package/dist/index.js.map +1 -1
  447. package/dist/internals.d.ts +4 -4
  448. package/dist/internals.js +1 -1
  449. package/dist/{mutations-DQjVuza-.d.ts → mutations-Dg60ZjS0.d.ts} +1 -1
  450. package/dist/{remoteFlows-B_JbhzWp.d.ts → remoteFlows-7WBvzlJt.d.ts} +1 -1
  451. package/dist/styles.css +1 -1
  452. package/dist/styles.css.map +1 -1
  453. package/dist/{types-B0iYt6RL.d.ts → types--IwjF9ei.d.ts} +68 -5
  454. package/dist/{types-Clzf4xjV.d.ts → types-1IycaCkN.d.ts} +4 -6
  455. package/dist/{types-D3U8Wi3X.d.ts → types-CI8Tx4se.d.ts} +3 -3
  456. package/dist/{types-B93nzmoE.d.ts → types-CJHW5xRl.d.ts} +1 -1
  457. package/dist/{types-1mH_uuoA.d.ts → types-CT7w2kHS.d.ts} +2 -2
  458. package/dist/{types-CdC2MYpf.d.ts → types-CgNwKzZf.d.ts} +4 -4
  459. package/dist/{types-BFzhRUSU.d.ts → types-DPlWZa2M.d.ts} +4 -4
  460. package/dist/{types-CoYsxVTI.d.ts → types-DmvLgred.d.ts} +1 -1
  461. package/dist/types.gen-Dtb8ECVb.d.ts +308 -0
  462. package/dist/{types.gen-BmtA4XNd.d.ts → types.gen-TcbORUL-.d.ts} +216 -17
  463. package/dist/{utils-DJgzqxq4.d.ts → utils-DSHROBN2.d.ts} +1 -1
  464. package/package.json +3 -3
  465. package/dist/CheckboxFieldDefault-JXNMWIRK.js +0 -2
  466. package/dist/CountryFieldDefault-SO4WS7KE.js +0 -2
  467. package/dist/DatePickerFieldDefault-AZHJN2U6.js +0 -2
  468. package/dist/FileUploadFieldDefault-K6PF6RP7.js +0 -2
  469. package/dist/ForcedValueFieldDefault-BEOC4MYU.js +0 -2
  470. package/dist/MultiSelectFieldDefault-QKXVTGF2.js +0 -2
  471. package/dist/RadioGroupFieldDefault-ZHHXDUUU.js +0 -2
  472. package/dist/SelectFieldDefault-FWQ7D6DU.js +0 -2
  473. package/dist/TelFieldDefault-RA7IBELJ.js +0 -2
  474. package/dist/TextAreaFieldDefault-NEFWXEE2.js +0 -2
  475. package/dist/TextFieldDefault-RXNU36AX.js +0 -2
  476. package/dist/TimeFieldDefault-KIJNBWYF.js +0 -2
  477. package/dist/chunk-7IIQUZTH.js +0 -2
  478. package/dist/chunk-DLIVHNTT.js +0 -2
  479. package/dist/chunk-DLIVHNTT.js.map +0 -1
  480. package/dist/chunk-FGYOG6XG.js +0 -2
  481. package/dist/chunk-FGYOG6XG.js.map +0 -1
  482. package/dist/chunk-HDFAFTHC.js +0 -2
  483. package/dist/chunk-HDFAFTHC.js.map +0 -1
  484. package/dist/chunk-ILX6RI7K.js +0 -2
  485. package/dist/chunk-IXS65MGJ.js +0 -2
  486. package/dist/chunk-IXS65MGJ.js.map +0 -1
  487. package/dist/chunk-KPDYUFCB.js +0 -2
  488. package/dist/chunk-NPVSJYM6.js +0 -2
  489. package/dist/chunk-NPVSJYM6.js.map +0 -1
  490. package/dist/chunk-QSBXRKYE.js +0 -2
  491. package/dist/chunk-UOJOO2DM.js +0 -2
  492. package/dist/chunk-UOJOO2DM.js.map +0 -1
  493. package/dist/chunk-VNMUML3T.js +0 -8
  494. package/dist/chunk-VNMUML3T.js.map +0 -1
  495. package/dist/chunk-XFD3ULUF.js +0 -2
  496. package/dist/chunk-XXQBX7ND.js +0 -2
  497. package/dist/chunk-XXQBX7ND.js.map +0 -1
  498. /package/dist/{CheckboxFieldDefault-JXNMWIRK.js.map → CheckboxFieldDefault-JOUZXB4Y.js.map} +0 -0
  499. /package/dist/{CountryFieldDefault-SO4WS7KE.js.map → CountryFieldDefault-IZQOFNX5.js.map} +0 -0
  500. /package/dist/{DatePickerFieldDefault-AZHJN2U6.js.map → DatePickerFieldDefault-AWV7LUPI.js.map} +0 -0
  501. /package/dist/{FileUploadFieldDefault-K6PF6RP7.js.map → FileUploadFieldDefault-NZ33IMPU.js.map} +0 -0
  502. /package/dist/{ForcedValueFieldDefault-BEOC4MYU.js.map → ForcedValueFieldDefault-RY5AN7O6.js.map} +0 -0
  503. /package/dist/{MultiSelectFieldDefault-QKXVTGF2.js.map → MultiSelectFieldDefault-DOZQUBEE.js.map} +0 -0
  504. /package/dist/{RadioGroupFieldDefault-ZHHXDUUU.js.map → RadioGroupFieldDefault-GFDO56LK.js.map} +0 -0
  505. /package/dist/{SelectFieldDefault-FWQ7D6DU.js.map → SelectFieldDefault-E4KFZBJ7.js.map} +0 -0
  506. /package/dist/{TelFieldDefault-RA7IBELJ.js.map → TelFieldDefault-2EPAKDTW.js.map} +0 -0
  507. /package/dist/{TextAreaFieldDefault-NEFWXEE2.js.map → TextAreaFieldDefault-WZIVM4RZ.js.map} +0 -0
  508. /package/dist/{TextFieldDefault-RXNU36AX.js.map → TextFieldDefault-YVXZO4AN.js.map} +0 -0
  509. /package/dist/{TimeFieldDefault-KIJNBWYF.js.map → TimeFieldDefault-JN4MDIO6.js.map} +0 -0
  510. /package/dist/{chunk-EQIWABAZ.js.map → chunk-2UH6Y56R.js.map} +0 -0
  511. /package/dist/{chunk-D737GUYZ.js.map → chunk-3G4HOZCM.js.map} +0 -0
  512. /package/dist/{chunk-G3KQCVQQ.js.map → chunk-3OKB5OHA.js.map} +0 -0
  513. /package/dist/{chunk-ANZ2YYUE.js.map → chunk-46BOEYFO.js.map} +0 -0
  514. /package/dist/{chunk-VYAJQ25J.js.map → chunk-4CNDASPA.js.map} +0 -0
  515. /package/dist/{chunk-QSF4XFSV.js.map → chunk-4IGLIHGF.js.map} +0 -0
  516. /package/dist/{chunk-WZOVZYNI.js.map → chunk-4WSYC3Q5.js.map} +0 -0
  517. /package/dist/{chunk-PYNHR7NL.js.map → chunk-53QBSOMG.js.map} +0 -0
  518. /package/dist/{chunk-3LELUHRO.js.map → chunk-5HDMU73I.js.map} +0 -0
  519. /package/dist/{chunk-JQ3SLOUP.js.map → chunk-5JXLXWTD.js.map} +0 -0
  520. /package/dist/{chunk-F3UUYQGY.js.map → chunk-5PUW4YCY.js.map} +0 -0
  521. /package/dist/{chunk-6IQJJCQ3.js.map → chunk-6CBC5OAQ.js.map} +0 -0
  522. /package/dist/{chunk-5FGYC2RF.js.map → chunk-7FKNXW2I.js.map} +0 -0
  523. /package/dist/{chunk-Z7VNXKWB.js.map → chunk-AAXPKULB.js.map} +0 -0
  524. /package/dist/{chunk-FDTOQHOJ.js.map → chunk-BB3M25A3.js.map} +0 -0
  525. /package/dist/{chunk-OTBCLDGR.js.map → chunk-BLKWR77C.js.map} +0 -0
  526. /package/dist/{chunk-5WTCN4WO.js.map → chunk-C7MVEDVY.js.map} +0 -0
  527. /package/dist/{chunk-WDPJIOLG.js.map → chunk-CCGAAOXN.js.map} +0 -0
  528. /package/dist/{chunk-EYZVDP6A.js.map → chunk-CD6H4MBI.js.map} +0 -0
  529. /package/dist/{chunk-4YFJOHSM.js.map → chunk-CONMRDRL.js.map} +0 -0
  530. /package/dist/{chunk-F2SGCGXL.js.map → chunk-CUO7OGD5.js.map} +0 -0
  531. /package/dist/{chunk-F3DZUA7W.js.map → chunk-D6PMXNBM.js.map} +0 -0
  532. /package/dist/{chunk-K67Q5476.js.map → chunk-DOPQK5RP.js.map} +0 -0
  533. /package/dist/{chunk-C5T75DEZ.js.map → chunk-DP6L72YF.js.map} +0 -0
  534. /package/dist/{chunk-ALHHN2LG.js.map → chunk-DYIMRD6T.js.map} +0 -0
  535. /package/dist/{chunk-5TOSVOLY.js.map → chunk-ED35NFA6.js.map} +0 -0
  536. /package/dist/{chunk-V3C32X6R.js.map → chunk-EMMFAZZC.js.map} +0 -0
  537. /package/dist/{chunk-3BQVEYHE.js.map → chunk-EVUTX6TJ.js.map} +0 -0
  538. /package/dist/{chunk-R2D32OB6.js.map → chunk-FSCAWXCB.js.map} +0 -0
  539. /package/dist/{chunk-7XDU2VWN.js.map → chunk-FV6NNYDP.js.map} +0 -0
  540. /package/dist/{chunk-JLM4O7ZW.js.map → chunk-G6EKGJBB.js.map} +0 -0
  541. /package/dist/{chunk-YUUUI4FY.js.map → chunk-G75LPZV5.js.map} +0 -0
  542. /package/dist/{chunk-3RQSRU7O.js.map → chunk-GE74QKS6.js.map} +0 -0
  543. /package/dist/{chunk-H5OZSXSY.js.map → chunk-GHZABLDV.js.map} +0 -0
  544. /package/dist/{chunk-BTZ57COZ.js.map → chunk-GTS7KFEM.js.map} +0 -0
  545. /package/dist/{chunk-WYIU74JN.js.map → chunk-H47XUL2L.js.map} +0 -0
  546. /package/dist/{chunk-VQRE3YLW.js.map → chunk-I4DU34BA.js.map} +0 -0
  547. /package/dist/{chunk-S2QXSX4Q.js.map → chunk-ILEO7LN4.js.map} +0 -0
  548. /package/dist/{chunk-7NDAFJXR.js.map → chunk-ILMRP364.js.map} +0 -0
  549. /package/dist/{chunk-J4CHUIPC.js.map → chunk-ITCWBZDM.js.map} +0 -0
  550. /package/dist/{chunk-PNNOU6BC.js.map → chunk-JI3PAIMV.js.map} +0 -0
  551. /package/dist/{chunk-WGDZTF7Y.js.map → chunk-JLZFNUBH.js.map} +0 -0
  552. /package/dist/{chunk-IUBHVGVV.js.map → chunk-JVXI4RZU.js.map} +0 -0
  553. /package/dist/{chunk-4Y2INBAI.js.map → chunk-KGNLBYM5.js.map} +0 -0
  554. /package/dist/{chunk-ORP6DY5I.js.map → chunk-L2YOD4GP.js.map} +0 -0
  555. /package/dist/{chunk-IAR6BWUY.js.map → chunk-LADLAP2S.js.map} +0 -0
  556. /package/dist/{chunk-QHJ3BYJN.js.map → chunk-LXGL7HF5.js.map} +0 -0
  557. /package/dist/{chunk-2LSLWFZS.js.map → chunk-MEYX4D5K.js.map} +0 -0
  558. /package/dist/{chunk-LCUYP6VW.js.map → chunk-MXAFJYLQ.js.map} +0 -0
  559. /package/dist/{chunk-UAEQLFPK.js.map → chunk-N7HCQXUM.js.map} +0 -0
  560. /package/dist/{chunk-QSBXRKYE.js.map → chunk-NAFECQWK.js.map} +0 -0
  561. /package/dist/{chunk-JRRPMAUO.js.map → chunk-NFWKD7UR.js.map} +0 -0
  562. /package/dist/{chunk-6S5Q2OKC.js.map → chunk-NTPHMYYC.js.map} +0 -0
  563. /package/dist/{chunk-POWC7LZN.js.map → chunk-OKBPMWVB.js.map} +0 -0
  564. /package/dist/{chunk-BWM2MYPE.js.map → chunk-OWOIDZHI.js.map} +0 -0
  565. /package/dist/{chunk-6IDUDCVS.js.map → chunk-P2WUHKEU.js.map} +0 -0
  566. /package/dist/{chunk-3LMZ3SOP.js.map → chunk-P6FFLJDP.js.map} +0 -0
  567. /package/dist/{chunk-MZK2U65W.js.map → chunk-PKJZ2N4C.js.map} +0 -0
  568. /package/dist/{chunk-CFPKRLGM.js.map → chunk-QFTBKRUI.js.map} +0 -0
  569. /package/dist/{chunk-ZQVVHVAG.js.map → chunk-R4ZUOFYN.js.map} +0 -0
  570. /package/dist/{chunk-TXOCMI5I.js.map → chunk-RFMYNPR7.js.map} +0 -0
  571. /package/dist/{chunk-2LR5N626.js.map → chunk-RYZ7TJVS.js.map} +0 -0
  572. /package/dist/{chunk-UU2IFOXR.js.map → chunk-RZL44CPH.js.map} +0 -0
  573. /package/dist/{chunk-C2HZNBMZ.js.map → chunk-SLRPDXK6.js.map} +0 -0
  574. /package/dist/{chunk-5MH23AST.js.map → chunk-STHZZZRL.js.map} +0 -0
  575. /package/dist/{chunk-CHIWBD6E.js.map → chunk-SUYI33NX.js.map} +0 -0
  576. /package/dist/{chunk-3VTHNE4H.js.map → chunk-SZI67IXU.js.map} +0 -0
  577. /package/dist/{chunk-QEHEOSJT.js.map → chunk-TJZ5BJV3.js.map} +0 -0
  578. /package/dist/{chunk-WHDUZGVW.js.map → chunk-TX6RWQUR.js.map} +0 -0
  579. /package/dist/{chunk-RKP7EEAB.js.map → chunk-UGQNOBQH.js.map} +0 -0
  580. /package/dist/{chunk-SUVBETJS.js.map → chunk-V3AVEPNA.js.map} +0 -0
  581. /package/dist/{chunk-KZ5ZQTBF.js.map → chunk-V6PPOGPT.js.map} +0 -0
  582. /package/dist/{chunk-XTLTKB3S.js.map → chunk-VRPZ4GHN.js.map} +0 -0
  583. /package/dist/{chunk-IRUWMZVH.js.map → chunk-VVZTXCX2.js.map} +0 -0
  584. /package/dist/{chunk-SNGQ2MKL.js.map → chunk-VYTUM3RI.js.map} +0 -0
  585. /package/dist/{chunk-FT4ZNBTA.js.map → chunk-WGO25FWG.js.map} +0 -0
  586. /package/dist/{chunk-TLJXBZII.js.map → chunk-WKWL57L6.js.map} +0 -0
  587. /package/dist/{chunk-5FJ64F6D.js.map → chunk-WVE2IOLY.js.map} +0 -0
  588. /package/dist/{chunk-LCUURLXS.js.map → chunk-XDLVDPQ7.js.map} +0 -0
  589. /package/dist/{chunk-WB52GW3H.js.map → chunk-XEVHXHHC.js.map} +0 -0
  590. /package/dist/{chunk-JMFCG5KA.js.map → chunk-XMIVJW5E.js.map} +0 -0
  591. /package/dist/{chunk-WH3QR2W5.js.map → chunk-XMVV6S77.js.map} +0 -0
  592. /package/dist/{chunk-A5XRBDDO.js.map → chunk-YHZZHQP5.js.map} +0 -0
  593. /package/dist/{chunk-PJTMFMRJ.js.map → chunk-YME2HZZJ.js.map} +0 -0
  594. /package/dist/{chunk-B3ESNTKY.js.map → chunk-Z7XLK4JL.js.map} +0 -0
  595. /package/dist/{chunk-5J7DLDLW.js.map → chunk-ZODT3MJM.js.map} +0 -0
  596. /package/dist/{chunk-6L77BWCI.js.map → chunk-ZOTKZZ67.js.map} +0 -0
  597. /package/dist/{chunk-BYTVIOOL.js.map → chunk-ZREW7KZA.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as h}from"./chunk-3UDRMQNE.js";import{a as E}from"./chunk-36JXX3VA.js";import{a as g}from"./chunk-VDRNNOVA.js";import{b as p}from"./chunk-HBONR7VY.js";import{a as y}from"./chunk-NW3D7CPK.js";import{d as w}from"./chunk-7IIQUZTH.js";import{a as b,h as S,i as C}from"./chunk-PB6UQ4A4.js";import{a as v}from"./chunk-5TOSVOLY.js";import{a as f}from"./chunk-GPWQPJQ7.js";import{a as t}from"./chunk-P37U34EQ.js";import{addYears as I,format as u}from"date-fns";import{Fragment as D,jsx as _,jsxs as F}from"react/jsx-runtime";var x=t(n=>n===b,"isStandardPricingPlan"),M=t((n,i)=>{let e=i&&i<u(new Date,"yyyy-MM-dd");if(!n&&e)return p({severity:"warning",description:"Backdating the service start date is not supported in the selected Contractor Management plan."})},"showBackDateWarning");function R(n,i,e){e({...i,services_and_deliverables_ai_warning:"",services_and_deliverables_error_skippable:!1})}t(R,"onServicesAndDeliverablesChange");var $=t((n,i,e,r,a)=>{let d=x(e),c=r?.service_duration?.provisional_start_date,l=M(d,c),o=p({severity:"warning",title:"Possible misclassification risk",description:a?C:S});return{...n,create:{...n?.create,services_and_deliverables_ai_warning:{type:"string","x-jsf-presentation":{inputType:"hidden"}},services_and_deliverables_error_skippable:{type:"boolean","x-jsf-presentation":{inputType:"hidden"}}},fields:{...n?.fields,"service_duration.provisional_start_date":{description:i,"x-jsf-presentation":{minDate:d?void 0:u(new Date,"yyyy-MM-dd"),...l}},"service_duration.expiration_date":{"x-jsf-presentation":{calculateDynamicProperties:t(s=>{let m=a&&s.service_duration?.provisional_start_date?I(y(s.service_duration.provisional_start_date),1):void 0;return{maxDate:m?u(m,"yyyy-MM-dd"):void 0}},"calculateDynamicProperties")}},services_and_deliverables:{onChange:R,"x-jsf-presentation":{calculateDynamicProperties:t(s=>({statement:s.services_and_deliverables_ai_warning?o.statement:void 0}),"calculateDynamicProperties")}}}}},"buildContractDetailsJsfModify"),z=t((n,i,e)=>{let r=n==="SAU",a=n==="GBR",d=w(n);if(!r&&!a&&!d)return e?.jsfModify?.basic_information;if(a)return{...e?.jsfModify?.basic_information,create:{...e?.jsfModify?.basic_information?.create,ir35:{title:"IR35 Status",description:t(()=>F(D,{children:["What's your contractor's employment status?"," ",_(v,{zendeskId:f.ir35Status,children:"Learn more about IR35"})]}),"description"),oneOf:[{const:"inside",title:"Inside IR35 (deemed employee)"},{const:"outside",title:"Outside IR35"},{const:"exempt",title:"Exempt from IR35"}],"x-jsf-presentation":{inputType:"select"}},ir35_sds_file:{title:"Upload SDS",description:"Status determination statement",type:"string","x-jsf-presentation":{inputType:"file",accept:g.document,multiple:!1,maxSize:20971520,calculateDynamicProperties:t(o=>{let s=o.ir35;return{isVisible:s==="inside"||s==="outside"}},"calculateDynamicProperties")}}},allOf:[{if:{properties:{ir35:{enum:["inside","outside"]}}},then:{required:["ir35_sds_file"]},else:{properties:{ir35_sds_file:!1}}}],required:["ir35"],orderRoot:t(o=>[...o,"ir35","ir35_sds_file"],"orderRoot")};let c=r?"Is your contractor a Saudi Arabia national, or a non-Saudi national contracting via a local business entity or under a Special Privilege Iqama visa?":`Is the contractor a ${i??"selected country"} national, or a non-${i??"selected country"} national contracting through their local business entity?`,l=r?"Please be aware that contracting with non-Saudi Arabia nationals that are not operating as a company or under a Special Privilege Iqama visa can lead to fines for operating without proper work authorization. If you are concerned, please speak with the Contractor and/or local Saudi Arabia counsel to ensure compliance.":`Be aware that the Contractor must be a ${i??"selected country"} national, or a non-${i??"selected country"} national operating through their company to comply with the legal requirements for performing services and deliverables as a contractor in ${i??"selected country"}. If you are concerned, speak with the Contractor and/or local counsel to ensure compliance.`;return{...e?.jsfModify?.basic_information,create:{...e?.jsfModify?.basic_information?.create,nationality_status:{title:c,description:"",type:"string",oneOf:[{const:"national",description:"",title:"Yes"},{const:"non_national",description:l,title:"No"}],"x-jsf-presentation":{inputType:"radio"}}},required:["nationality_status"],orderRoot:t(o=>[...o,"nationality_status"],"orderRoot")}},"buildBasicInformationJsfModify"),G=t((n,i)=>{let e=n?.jsfModify?.contract_preview?.fields;return{fields:{contract_preview_header:{...e?.contract_preview_header,"x-jsf-presentation":{Component:t(r=>{let a=e?.contract_preview_header?.["x-jsf-presentation"]?.Component||h;return _(a,{...r})},"Component")}},contract_preview_statement:{...e?.contract_preview_statement,"x-jsf-presentation":{Component:t(r=>{let a=e?.contract_preview_statement?.["x-jsf-presentation"]?.Component||E;return _(a,{reviewCompleted:!!i?.review_completed,...r})},"Component")}},signature:{...e?.signature,"x-jsf-presentation":{calculateDynamicProperties:t(r=>({isVisible:!!r.review_completed}),"calculateDynamicProperties"),...e?.signature?.["x-jsf-presentation"]}}}}},"buildContractPreviewJsfModify");export{$ as a,z as b,G as c};
2
- //# sourceMappingURL=chunk-ZQVVHVAG.js.map
1
+ import{a as h}from"./chunk-3UDRMQNE.js";import{a as E}from"./chunk-36JXX3VA.js";import{a as g}from"./chunk-VDRNNOVA.js";import{b as p}from"./chunk-HBONR7VY.js";import{a as y}from"./chunk-NW3D7CPK.js";import{d as w}from"./chunk-TDKKCSKV.js";import{a as b,h as S,i as C}from"./chunk-PB6UQ4A4.js";import{a as v}from"./chunk-ED35NFA6.js";import{a as f}from"./chunk-GPWQPJQ7.js";import{a as t}from"./chunk-P37U34EQ.js";import{addYears as I,format as u}from"date-fns";import{Fragment as D,jsx as _,jsxs as F}from"react/jsx-runtime";var x=t(n=>n===b,"isStandardPricingPlan"),M=t((n,i)=>{let e=i&&i<u(new Date,"yyyy-MM-dd");if(!n&&e)return p({severity:"warning",description:"Backdating the service start date is not supported in the selected Contractor Management plan."})},"showBackDateWarning");function R(n,i,e){e({...i,services_and_deliverables_ai_warning:"",services_and_deliverables_error_skippable:!1})}t(R,"onServicesAndDeliverablesChange");var $=t((n,i,e,r,a)=>{let d=x(e),c=r?.service_duration?.provisional_start_date,l=M(d,c),o=p({severity:"warning",title:"Possible misclassification risk",description:a?C:S});return{...n,create:{...n?.create,services_and_deliverables_ai_warning:{type:"string","x-jsf-presentation":{inputType:"hidden"}},services_and_deliverables_error_skippable:{type:"boolean","x-jsf-presentation":{inputType:"hidden"}}},fields:{...n?.fields,"service_duration.provisional_start_date":{description:i,"x-jsf-presentation":{minDate:d?void 0:u(new Date,"yyyy-MM-dd"),...l}},"service_duration.expiration_date":{"x-jsf-presentation":{calculateDynamicProperties:t(s=>{let m=a&&s.service_duration?.provisional_start_date?I(y(s.service_duration.provisional_start_date),1):void 0;return{maxDate:m?u(m,"yyyy-MM-dd"):void 0}},"calculateDynamicProperties")}},services_and_deliverables:{onChange:R,"x-jsf-presentation":{calculateDynamicProperties:t(s=>({statement:s.services_and_deliverables_ai_warning?o.statement:void 0}),"calculateDynamicProperties")}}}}},"buildContractDetailsJsfModify"),z=t((n,i,e)=>{let r=n==="SAU",a=n==="GBR",d=w(n);if(!r&&!a&&!d)return e?.jsfModify?.basic_information;if(a)return{...e?.jsfModify?.basic_information,create:{...e?.jsfModify?.basic_information?.create,ir35:{title:"IR35 Status",description:t(()=>F(D,{children:["What's your contractor's employment status?"," ",_(v,{zendeskId:f.ir35Status,children:"Learn more about IR35"})]}),"description"),oneOf:[{const:"inside",title:"Inside IR35 (deemed employee)"},{const:"outside",title:"Outside IR35"},{const:"exempt",title:"Exempt from IR35"}],"x-jsf-presentation":{inputType:"select"}},ir35_sds_file:{title:"Upload SDS",description:"Status determination statement",type:"string","x-jsf-presentation":{inputType:"file",accept:g.document,multiple:!1,maxSize:20971520,calculateDynamicProperties:t(o=>{let s=o.ir35;return{isVisible:s==="inside"||s==="outside"}},"calculateDynamicProperties")}}},allOf:[{if:{properties:{ir35:{enum:["inside","outside"]}}},then:{required:["ir35_sds_file"]},else:{properties:{ir35_sds_file:!1}}}],required:["ir35"],orderRoot:t(o=>[...o,"ir35","ir35_sds_file"],"orderRoot")};let c=r?"Is your contractor a Saudi Arabia national, or a non-Saudi national contracting via a local business entity or under a Special Privilege Iqama visa?":`Is the contractor a ${i??"selected country"} national, or a non-${i??"selected country"} national contracting through their local business entity?`,l=r?"Please be aware that contracting with non-Saudi Arabia nationals that are not operating as a company or under a Special Privilege Iqama visa can lead to fines for operating without proper work authorization. If you are concerned, please speak with the Contractor and/or local Saudi Arabia counsel to ensure compliance.":`Be aware that the Contractor must be a ${i??"selected country"} national, or a non-${i??"selected country"} national operating through their company to comply with the legal requirements for performing services and deliverables as a contractor in ${i??"selected country"}. If you are concerned, speak with the Contractor and/or local counsel to ensure compliance.`;return{...e?.jsfModify?.basic_information,create:{...e?.jsfModify?.basic_information?.create,nationality_status:{title:c,description:"",type:"string",oneOf:[{const:"national",description:"",title:"Yes"},{const:"non_national",description:l,title:"No"}],"x-jsf-presentation":{inputType:"radio"}}},required:["nationality_status"],orderRoot:t(o=>[...o,"nationality_status"],"orderRoot")}},"buildBasicInformationJsfModify"),G=t((n,i)=>{let e=n?.jsfModify?.contract_preview?.fields;return{fields:{contract_preview_header:{...e?.contract_preview_header,"x-jsf-presentation":{Component:t(r=>{let a=e?.contract_preview_header?.["x-jsf-presentation"]?.Component||h;return _(a,{...r})},"Component")}},contract_preview_statement:{...e?.contract_preview_statement,"x-jsf-presentation":{Component:t(r=>{let a=e?.contract_preview_statement?.["x-jsf-presentation"]?.Component||E;return _(a,{reviewCompleted:!!i?.review_completed,...r})},"Component")}},signature:{...e?.signature,"x-jsf-presentation":{calculateDynamicProperties:t(r=>({isVisible:!!r.review_completed}),"calculateDynamicProperties"),...e?.signature?.["x-jsf-presentation"]}}}}},"buildContractPreviewJsfModify");export{$ as a,z as b,G as c};
2
+ //# sourceMappingURL=chunk-R4ZUOFYN.js.map
@@ -0,0 +1,2 @@
1
+ import{b as u}from"./chunk-F37FQXEZ.js";import{n as e}from"./chunk-C4HFMTSB.js";import{b as i}from"./chunk-H2O4CVKF.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function h({children:m,...t}){let{formId:r,invoiceScheduleBag:s}=u(),{components:c}=i(),o=c?.button;if(!o)throw new Error("Button component not found");return d(o,{...t,type:"submit",className:e("RemoteFlows__InvoiceScheduleForm__SubmitButton",t.className),form:r,disabled:t.disabled||s?.isSubmitting,children:m})}n(h,"InvoiceScheduleSubmitButton");export{h as a};
2
+ //# sourceMappingURL=chunk-R5ADEPLC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/InvoiceSchedule/InvoiceScheduleSubmitButton.tsx"],"sourcesContent":["import { ButtonHTMLAttributes, PropsWithChildren } from 'react';\nimport { useInvoiceScheduleContext } from '@/src/flows/InvoiceSchedule/context';\nimport { useFormFields } from '@/src/context';\nimport { cn } from '@/src/lib/utils';\n\nexport function InvoiceScheduleSubmitButton({\n children,\n ...props\n}: PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>> &\n Record<string, unknown>) {\n const { formId, invoiceScheduleBag } = useInvoiceScheduleContext();\n const { components } = useFormFields();\n\n const CustomButton = components?.button;\n if (!CustomButton) {\n throw new Error(`Button component not found`);\n }\n\n return (\n <CustomButton\n {...props}\n type='submit'\n className={cn(\n 'RemoteFlows__InvoiceScheduleForm__SubmitButton',\n props.className,\n )}\n form={formId}\n disabled={props.disabled || invoiceScheduleBag?.isSubmitting}\n >\n {children}\n </CustomButton>\n );\n}\n"],"mappings":"gKAmBI,cAAAA,MAAA,oBAdG,SAASC,EAA4B,CAC1C,SAAAC,EACA,GAAGC,CACL,EAC2B,CACzB,GAAM,CAAE,OAAAC,EAAQ,mBAAAC,CAAmB,EAAIC,EAA0B,EAC3D,CAAE,WAAAC,CAAW,EAAIC,EAAc,EAE/BC,EAAeF,GAAY,OACjC,GAAI,CAACE,EACH,MAAM,IAAI,MAAM,4BAA4B,EAG9C,OACET,EAACS,EAAA,CACE,GAAGN,EACJ,KAAK,SACL,UAAWO,EACT,iDACAP,EAAM,SACR,EACA,KAAMC,EACN,SAAUD,EAAM,UAAYE,GAAoB,aAE/C,SAAAH,EACH,CAEJ,CA3BgBS,EAAAV,EAAA","names":["jsx","InvoiceScheduleSubmitButton","children","props","formId","invoiceScheduleBag","useInvoiceScheduleContext","components","useFormFields","CustomButton","cn","__name"]}
@@ -1,2 +1,2 @@
1
- import{a as R,b as x,c as N,d as A}from"./chunk-OV4ARZIX.js";import{a as T}from"./chunk-ZE3YT3Q6.js";import{a as C}from"./chunk-SWLNTVAX.js";import{b as B}from"./chunk-LKHRHBFP.js";import{a as f}from"./chunk-5TOSVOLY.js";import{a as w}from"./chunk-GPWQPJQ7.js";import{n as i,o as n,r as F}from"./chunk-C4HFMTSB.js";import{a as m}from"./chunk-P37U34EQ.js";import{MoreHorizontal as G}from"lucide-react";import{useState as P}from"react";import{Fragment as U,jsx as g,jsxs as E}from"react/jsx-runtime";function L({actions:e=[],className:r,label:a,"data-testid":l}){let[_,d]=P(!1);return E("div",{className:i("relative",r),children:[g(B,{"data-testid":l,variant:"ghost","aria-label":a,className:"h-8 w-8 p-0",onClick:()=>d(!_),children:g(G,{className:"h-4 w-4"})}),_&&E(U,{children:[g("div",{className:"fixed inset-0 z-40",onClick:()=>d(!1)}),g("div",{className:"absolute right-0 top-1/2 mt-1 bg-white border border-gray-200 rounded-md shadow-lg z-50 min-w-[120px]",children:e.map((c,u)=>g("button",{"data-testid":`${l}-${c.label.toLowerCase().replace(" ","-")}`,className:i("w-full text-left px-2 py-1.5 text-sm hover:bg-gray-100",c.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>{c.onClick(),d(!1)},disabled:c.disabled,children:c.label},u))})]})]})}m(L,"ActionsDropdown");import{ChevronDown as S,Info as $}from"lucide-react";import j from"react-flagpack";import{useState as O}from"react";import{Fragment as b,jsx as o,jsxs as t}from"react/jsx-runtime";var Z={GB:"GB-UKM"},K=m(({title:e,country:r,region:a,annualGrossSalary:l,onDelete:_,onExportPdf:d,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:d},{label:"Delete",onClick:_}];return t("div",{className:"RemoteFlows__EstimationResults__Header flex justify-between",children:[t("div",{className:"flex flex-row items-center gap-6",children:[o("div",{className:"RemoteFlows__EstimationResultsHeader__FlagContainer flex h-16 w-16 items-center justify-center rounded-lg bg-[#F4F4F5]",children:o(j,{code:Z[r.alpha_2_code]||r.alpha_2_code})}),t("div",{className:"space-y-1",children:[o("h2",{"data-testid":"estimation-results-header-title",className:"RemoteFlows__EstimationResultsHeader__Title text-lg font-medium leading-none text-[#181818]",children:e}),t("p",{className:"RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]",children:[r.name," ",a?` (${a.name})`:""]}),t("p",{"data-testid":"estimation-results-header-annual-gross-salary",className:"RemoteFlows__EstimationResultsHeader__AnnualGrossSalary text-xs text-[#71717A]",children:[o("span",{className:"text-[#181818]",children:"Employee annual gross salary:"})," ",l]})]})]}),o(L,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),V=m(()=>({steps:[{id:"add-employment-details",title:"Add employment details",description:"You add employee employments details."},{id:"invite-employee",title:"Invite employee",description:"Hire receives an email invitation from Remote to start the self-enrollment process."},{id:"verify-information",title:"Verify information",description:"Remote prepares the Employment Agreement and verifies all the information."},{id:"sign-contract",title:"Sign contract",description:"All parties sign the Employment Agreement and are ready to start. \u{1F389}"}],helpText:"For customers who accept Remote's Terms of Service (ToS), the employee onboarding timeline starts once the employee has been invited to the platform and completed self enrollment.",zendeskArticleId:w.employeeOnboardingTimeline}),"getOnboardingTimelineData");function Y({minimumOnboardingDays:e,data:r,className:a}){return o(R,{collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",a),children:t(x,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4",children:t("div",{className:"flex items-center justify-between w-full",children:[o("span",{className:"RemoteFlows__OnboardingTimeline__Title text-base font-medium text-[#0F172A]",children:"Onboarding timeline"}),e!=null&&t("span",{className:"RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4",children:[e," days"]})]})}),t(A,{className:"px-0 pb-4",children:[o("ul",{className:"RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2",children:r.steps.map(l=>t("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:l.title})," ","- ",l.description]},l.id))}),t("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[r.helpText,r.zendeskArticleId&&o(f,{zendeskId:r.zendeskArticleId,children:"Learn more"})]})]})]})})}m(Y,"OnboardingTimeline");function q({className:e,countryBenefitsUrl:r,countryGuideUrl:a,country:l}){return o(R,{collapsible:!0,className:i("RemoteFlows__EstimationResults__HiringSection w-full",e),children:t(x,{value:"timeline",className:"RemoteFlows__HiringSection__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__HiringSection__AccordionTrigger hover:no-underline px-0 py-4",children:o("div",{className:"flex items-center justify-between w-full",children:t("span",{className:"text-base font-medium text-[#0F172A]",children:["Hiring in ",l.name]})})}),o(A,{children:t("div",{className:"flex flex-col gap-1",children:[a&&o("a",{href:a,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),r&&o("a",{href:r,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}m(q,"HiringSection");function J({isMultipleCurrency:e,className:r}){return t("div",{className:i("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",r),children:[o("span",{"aria-hidden":!0}),e?t(b,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):t(b,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}m(J,"EstimationHeaders");function I({label:e,amounts:r,className:a,children:l}){let[_,d]=O(!0);return t("div",{className:i("RemoteFlows__EstimationResults__Row",a),children:[t("div",{className:"RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center",children:[t("div",{className:"RemoteFlows__EstimationRow__LabelContainer flex items-center gap-2",children:[o("span",{className:i("RemoteFlows__EstimationRow__Title min-w-[140px] font-medium text-[#09090B]"),children:e}),o("button",{onClick:()=>d(!_),className:"RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded",children:o(S,{className:`h-4 w-4 text-muted-foreground transition-transform ${_?"rotate-180":""}`})})]}),Array.isArray(r)?r.map((c,u)=>o("span",{className:i("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:c},u)):t(b,{children:[o("span",{}),o("span",{className:i("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:r})]})]}),_&&l&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:l})]})}m(I,"EstimationRow");function Q({item:e,isMultipleCurrency:r,level:a=0}){let[l,_]=O(!1),d=e.children&&e.children.length>0,c=a>0,u=e.isCollapsible||d;return t("li",{className:i("RemoteFlows__BreakdownList__Item pb-3",c&&"pb-1"),children:[t("div",{className:i(r?"RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between":"RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between"),children:[t("div",{className:i("RemoteFlows__BreakdownList__LabelContainer flex items-center gap-2",c&&"pl-3"),children:[!c&&o("span",{className:"RemoteFlows__BreakdownList__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0","aria-hidden":"true"}),u?t("button",{onClick:()=>_(!l),className:"RemoteFlows__BreakdownList__CollapseButton flex items-center gap-2 hover:bg-gray-100 rounded p-1",children:[o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B]"),children:e.label}),o(S,{className:`RemoteFlows__BreakdownList__ChevronDown h-3 w-3 text-muted-foreground transition-transform ${l?"rotate-180":""}`})]}):o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B] p-1"),children:e.label}),e.tooltip&&o(T,{content:t(b,{children:[o("span",{dangerouslySetInnerHTML:{__html:F(e.tooltip)}})," ",e.zendeskId&&o(f,{zendeskId:Number(e.zendeskId),children:"Learn more"})]}),children:o("button",{className:"RemoteFlows__BreakdownList__InfoButton p-1 hover:bg-gray-100 rounded",children:o($,{className:i("RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground",c?"h-3 w-3":"h-4 w-4")})})})]}),r?t(b,{children:[o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employee-amount",className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"}),o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employer-amount",className:i("RemoteFlows__BreakdownList__EmployerAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__EmployerAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__EmployerAmountText--NotNested text-[#09090B]"),children:e.employerAmount||"\u2014"})]}):o("span",{"data-testid":e.dataSelector,className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"})]}),d&&l&&o("div",{className:"mt-1",children:o(k,{items:e.children,isMultipleCurrency:r,level:a+1})})]})}m(Q,"BreakdownListItem");function k({items:e,isMultipleCurrency:r,className:a,level:l}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",a),children:e.map((_,d)=>o(Q,{item:_,isMultipleCurrency:r,level:l},d))})}m(k,"BreakdownList");var pe=m(({estimation:e,title:r,components:a,onDelete:l,onExportPdf:_,onEdit:d})=>{let c=a?.HiringSection||q,u=a?.OnboardingTimeline||Y,z=a?.Header||K,h=a?.Footer,H=V(),p=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,v=e.employer_currency_costs.monthly_management_fee,D=e.region.code!==e.country.code,M=n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code);return t(C,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(z,{title:r,annualGrossSalary:M,region:D?e.region:void 0,country:e.country,onDelete:l,onExportPdf:_,onEdit:d})}),t("div",{className:"RemoteFlows__Separator",children:[o(J,{isMultipleCurrency:p,className:"mb-3"}),o(I,{label:"Monthly total cost",amounts:p?[n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),n(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.code)]:n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),children:o(k,{items:[{label:"Gross monthly salary",regionalAmount:n(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_gross_salary,e.employer_currency_costs.currency.code),zendeskId:w.extraPayments.toString(),tooltip:"This country respects extra payments on top of the gross salary."},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.monthly_contributions_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_contributions_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.monthly_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.monthly_benefits_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_benefits_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.monthly_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Monthly fee",regionalAmount:n(e.regional_currency_costs.monthly_management_fee,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_management_fee,e.employer_currency_costs.currency.code),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})]}),o("div",{className:"RemoteFlows__Separator",children:o(I,{label:"Annual total cost",amounts:p?[n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),n(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.code)]:n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),children:o(k,{items:[{label:"Gross annual salary",dataSelector:"annual-gross-salary",regionalAmount:n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.code)},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_contributions_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.annual_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.annual_benefits_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_benefits_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.annual_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Extra statutory payments",regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.extra_statutory_payments_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.extra_statutory_payments_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Annual fee",regionalAmount:n(e.regional_currency_costs.annual_management_fee,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_management_fee,e.employer_currency_costs.currency.code),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})}),o("div",{className:"RemoteFlows__Separator",children:o(u,{minimumOnboardingDays:e.minimum_onboarding_time,data:H})}),o(c,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),h&&o(h,{})]})},"EstimationResults");export{pe as a};
2
- //# sourceMappingURL=chunk-TXOCMI5I.js.map
1
+ import{a as R,b as x,c as N,d as A}from"./chunk-OV4ARZIX.js";import{a as T}from"./chunk-ZE3YT3Q6.js";import{a as C}from"./chunk-SWLNTVAX.js";import{b as B}from"./chunk-LKHRHBFP.js";import{a as f}from"./chunk-ED35NFA6.js";import{a as w}from"./chunk-GPWQPJQ7.js";import{n as i,o as n,r as F}from"./chunk-C4HFMTSB.js";import{a as m}from"./chunk-P37U34EQ.js";import{MoreHorizontal as G}from"lucide-react";import{useState as P}from"react";import{Fragment as U,jsx as g,jsxs as E}from"react/jsx-runtime";function L({actions:e=[],className:r,label:a,"data-testid":l}){let[_,d]=P(!1);return E("div",{className:i("relative",r),children:[g(B,{"data-testid":l,variant:"ghost","aria-label":a,className:"h-8 w-8 p-0",onClick:()=>d(!_),children:g(G,{className:"h-4 w-4"})}),_&&E(U,{children:[g("div",{className:"fixed inset-0 z-40",onClick:()=>d(!1)}),g("div",{className:"absolute right-0 top-1/2 mt-1 bg-white border border-gray-200 rounded-md shadow-lg z-50 min-w-[120px]",children:e.map((c,u)=>g("button",{"data-testid":`${l}-${c.label.toLowerCase().replace(" ","-")}`,className:i("w-full text-left px-2 py-1.5 text-sm hover:bg-gray-100",c.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>{c.onClick(),d(!1)},disabled:c.disabled,children:c.label},u))})]})]})}m(L,"ActionsDropdown");import{ChevronDown as S,Info as $}from"lucide-react";import j from"react-flagpack";import{useState as O}from"react";import{Fragment as b,jsx as o,jsxs as t}from"react/jsx-runtime";var Z={GB:"GB-UKM"},K=m(({title:e,country:r,region:a,annualGrossSalary:l,onDelete:_,onExportPdf:d,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:d},{label:"Delete",onClick:_}];return t("div",{className:"RemoteFlows__EstimationResults__Header flex justify-between",children:[t("div",{className:"flex flex-row items-center gap-6",children:[o("div",{className:"RemoteFlows__EstimationResultsHeader__FlagContainer flex h-16 w-16 items-center justify-center rounded-lg bg-[#F4F4F5]",children:o(j,{code:Z[r.alpha_2_code]||r.alpha_2_code})}),t("div",{className:"space-y-1",children:[o("h2",{"data-testid":"estimation-results-header-title",className:"RemoteFlows__EstimationResultsHeader__Title text-lg font-medium leading-none text-[#181818]",children:e}),t("p",{className:"RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]",children:[r.name," ",a?` (${a.name})`:""]}),t("p",{"data-testid":"estimation-results-header-annual-gross-salary",className:"RemoteFlows__EstimationResultsHeader__AnnualGrossSalary text-xs text-[#71717A]",children:[o("span",{className:"text-[#181818]",children:"Employee annual gross salary:"})," ",l]})]})]}),o(L,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),V=m(()=>({steps:[{id:"add-employment-details",title:"Add employment details",description:"You add employee employments details."},{id:"invite-employee",title:"Invite employee",description:"Hire receives an email invitation from Remote to start the self-enrollment process."},{id:"verify-information",title:"Verify information",description:"Remote prepares the Employment Agreement and verifies all the information."},{id:"sign-contract",title:"Sign contract",description:"All parties sign the Employment Agreement and are ready to start. \u{1F389}"}],helpText:"For customers who accept Remote's Terms of Service (ToS), the employee onboarding timeline starts once the employee has been invited to the platform and completed self enrollment.",zendeskArticleId:w.employeeOnboardingTimeline}),"getOnboardingTimelineData");function Y({minimumOnboardingDays:e,data:r,className:a}){return o(R,{collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",a),children:t(x,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4",children:t("div",{className:"flex items-center justify-between w-full",children:[o("span",{className:"RemoteFlows__OnboardingTimeline__Title text-base font-medium text-[#0F172A]",children:"Onboarding timeline"}),e!=null&&t("span",{className:"RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4",children:[e," days"]})]})}),t(A,{className:"px-0 pb-4",children:[o("ul",{className:"RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2",children:r.steps.map(l=>t("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:l.title})," ","- ",l.description]},l.id))}),t("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[r.helpText,r.zendeskArticleId&&o(f,{zendeskId:r.zendeskArticleId,children:"Learn more"})]})]})]})})}m(Y,"OnboardingTimeline");function q({className:e,countryBenefitsUrl:r,countryGuideUrl:a,country:l}){return o(R,{collapsible:!0,className:i("RemoteFlows__EstimationResults__HiringSection w-full",e),children:t(x,{value:"timeline",className:"RemoteFlows__HiringSection__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__HiringSection__AccordionTrigger hover:no-underline px-0 py-4",children:o("div",{className:"flex items-center justify-between w-full",children:t("span",{className:"text-base font-medium text-[#0F172A]",children:["Hiring in ",l.name]})})}),o(A,{children:t("div",{className:"flex flex-col gap-1",children:[a&&o("a",{href:a,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),r&&o("a",{href:r,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}m(q,"HiringSection");function J({isMultipleCurrency:e,className:r}){return t("div",{className:i("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",r),children:[o("span",{"aria-hidden":!0}),e?t(b,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):t(b,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}m(J,"EstimationHeaders");function I({label:e,amounts:r,className:a,children:l}){let[_,d]=O(!0);return t("div",{className:i("RemoteFlows__EstimationResults__Row",a),children:[t("div",{className:"RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center",children:[t("div",{className:"RemoteFlows__EstimationRow__LabelContainer flex items-center gap-2",children:[o("span",{className:i("RemoteFlows__EstimationRow__Title min-w-[140px] font-medium text-[#09090B]"),children:e}),o("button",{onClick:()=>d(!_),className:"RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded",children:o(S,{className:`h-4 w-4 text-muted-foreground transition-transform ${_?"rotate-180":""}`})})]}),Array.isArray(r)?r.map((c,u)=>o("span",{className:i("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:c},u)):t(b,{children:[o("span",{}),o("span",{className:i("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:r})]})]}),_&&l&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:l})]})}m(I,"EstimationRow");function Q({item:e,isMultipleCurrency:r,level:a=0}){let[l,_]=O(!1),d=e.children&&e.children.length>0,c=a>0,u=e.isCollapsible||d;return t("li",{className:i("RemoteFlows__BreakdownList__Item pb-3",c&&"pb-1"),children:[t("div",{className:i(r?"RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between":"RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between"),children:[t("div",{className:i("RemoteFlows__BreakdownList__LabelContainer flex items-center gap-2",c&&"pl-3"),children:[!c&&o("span",{className:"RemoteFlows__BreakdownList__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0","aria-hidden":"true"}),u?t("button",{onClick:()=>_(!l),className:"RemoteFlows__BreakdownList__CollapseButton flex items-center gap-2 hover:bg-gray-100 rounded p-1",children:[o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B]"),children:e.label}),o(S,{className:`RemoteFlows__BreakdownList__ChevronDown h-3 w-3 text-muted-foreground transition-transform ${l?"rotate-180":""}`})]}):o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B] p-1"),children:e.label}),e.tooltip&&o(T,{content:t(b,{children:[o("span",{dangerouslySetInnerHTML:{__html:F(e.tooltip)}})," ",e.zendeskId&&o(f,{zendeskId:Number(e.zendeskId),children:"Learn more"})]}),children:o("button",{className:"RemoteFlows__BreakdownList__InfoButton p-1 hover:bg-gray-100 rounded",children:o($,{className:i("RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground",c?"h-3 w-3":"h-4 w-4")})})})]}),r?t(b,{children:[o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employee-amount",className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"}),o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employer-amount",className:i("RemoteFlows__BreakdownList__EmployerAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__EmployerAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__EmployerAmountText--NotNested text-[#09090B]"),children:e.employerAmount||"\u2014"})]}):o("span",{"data-testid":e.dataSelector,className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"})]}),d&&l&&o("div",{className:"mt-1",children:o(k,{items:e.children,isMultipleCurrency:r,level:a+1})})]})}m(Q,"BreakdownListItem");function k({items:e,isMultipleCurrency:r,className:a,level:l}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",a),children:e.map((_,d)=>o(Q,{item:_,isMultipleCurrency:r,level:l},d))})}m(k,"BreakdownList");var pe=m(({estimation:e,title:r,components:a,onDelete:l,onExportPdf:_,onEdit:d})=>{let c=a?.HiringSection||q,u=a?.OnboardingTimeline||Y,z=a?.Header||K,h=a?.Footer,H=V(),p=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,v=e.employer_currency_costs.monthly_management_fee,D=e.region.code!==e.country.code,M=n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code);return t(C,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(z,{title:r,annualGrossSalary:M,region:D?e.region:void 0,country:e.country,onDelete:l,onExportPdf:_,onEdit:d})}),t("div",{className:"RemoteFlows__Separator",children:[o(J,{isMultipleCurrency:p,className:"mb-3"}),o(I,{label:"Monthly total cost",amounts:p?[n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),n(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.code)]:n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),children:o(k,{items:[{label:"Gross monthly salary",regionalAmount:n(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_gross_salary,e.employer_currency_costs.currency.code),zendeskId:w.extraPayments.toString(),tooltip:"This country respects extra payments on top of the gross salary."},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.monthly_contributions_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_contributions_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.monthly_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.monthly_benefits_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_benefits_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.monthly_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Monthly fee",regionalAmount:n(e.regional_currency_costs.monthly_management_fee,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_management_fee,e.employer_currency_costs.currency.code),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})]}),o("div",{className:"RemoteFlows__Separator",children:o(I,{label:"Annual total cost",amounts:p?[n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),n(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.code)]:n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),children:o(k,{items:[{label:"Gross annual salary",dataSelector:"annual-gross-salary",regionalAmount:n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.code)},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_contributions_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.annual_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.annual_benefits_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_benefits_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.annual_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Extra statutory payments",regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.extra_statutory_payments_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.extra_statutory_payments_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Annual fee",regionalAmount:n(e.regional_currency_costs.annual_management_fee,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_management_fee,e.employer_currency_costs.currency.code),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})}),o("div",{className:"RemoteFlows__Separator",children:o(u,{minimumOnboardingDays:e.minimum_onboarding_time,data:H})}),o(c,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),h&&o(h,{})]})},"EstimationResults");export{pe as a};
2
+ //# sourceMappingURL=chunk-RFMYNPR7.js.map
@@ -0,0 +1,2 @@
1
+ import{n}from"./chunk-C4HFMTSB.js";import{a as o}from"./chunk-P37U34EQ.js";import{Command as m}from"cmdk";import{SearchIcon as r}from"lucide-react";import{jsx as a,jsxs as d}from"react/jsx-runtime";function c({className:t,...e}){return a(m,{"data-slot":"command",className:n("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),...e})}o(c,"Command");function l({className:t,...e}){return d("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[a(r,{className:"size-4 shrink-0 opacity-50"}),a(m.Input,{"data-slot":"command-input",className:n("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),...e})]})}o(l,"CommandInput");function u({className:t,...e}){return a(m.List,{"data-slot":"command-list",className:n("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),...e})}o(u,"CommandList");function g({...t}){return a(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t})}o(g,"CommandEmpty");function f({className:t,...e}){return a(m.Group,{"data-slot":"command-group",className:n("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),...e})}o(f,"CommandGroup");function x({className:t,...e}){return a(m.Separator,{"data-slot":"command-separator",className:n("bg-border -mx-1 h-px",t),...e})}o(x,"CommandSeparator");function h({className:t,...e}){return a(m.Item,{"data-slot":"command-item",className:n("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...e})}o(h,"CommandItem");export{c as a,l as b,u as c,g as d,f as e,x as f,h as g};
2
+ //# sourceMappingURL=chunk-ROO2IFBF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/ui/command.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Command as CommandPrimitive } from 'cmdk';\nimport { SearchIcon } from 'lucide-react';\n\nimport { cn } from '@/src/lib/utils';\nimport {\n Dialog,\n DialogContent,\n DialogDescription,\n DialogHeader,\n DialogTitle,\n} from '@/src/components/ui/dialog';\n\nfunction Command({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive>) {\n return (\n <CommandPrimitive\n data-slot='command'\n className={cn(\n 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandDialog({\n title = 'Command Palette',\n description = 'Search for a command to run...',\n children,\n ...props\n}: React.ComponentProps<typeof Dialog> & {\n title?: string;\n description?: string;\n}) {\n return (\n <Dialog {...props}>\n <DialogHeader className='sr-only'>\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>{description}</DialogDescription>\n </DialogHeader>\n <DialogContent className='overflow-hidden p-0'>\n <Command className='[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5'>\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n}\n\nfunction CommandInput({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Input>) {\n return (\n <div\n data-slot='command-input-wrapper'\n className='flex h-9 items-center gap-2 border-b px-3'\n >\n <SearchIcon className='size-4 shrink-0 opacity-50' />\n <CommandPrimitive.Input\n data-slot='command-input'\n className={cn(\n 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n />\n </div>\n );\n}\n\nfunction CommandList({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.List>) {\n return (\n <CommandPrimitive.List\n data-slot='command-list'\n className={cn(\n 'max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandEmpty({\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Empty>) {\n return (\n <CommandPrimitive.Empty\n data-slot='command-empty'\n className='py-6 text-center text-sm'\n {...props}\n />\n );\n}\n\nfunction CommandGroup({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Group>) {\n return (\n <CommandPrimitive.Group\n data-slot='command-group'\n className={cn(\n 'text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Separator>) {\n return (\n <CommandPrimitive.Separator\n data-slot='command-separator'\n className={cn('bg-border -mx-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction CommandItem({\n className,\n ...props\n}: React.ComponentProps<typeof CommandPrimitive.Item>) {\n return (\n <CommandPrimitive.Item\n data-slot='command-item'\n className={cn(\n \"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CommandShortcut({\n className,\n ...props\n}: React.ComponentProps<'span'>) {\n return (\n <span\n data-slot='command-shortcut'\n className={cn(\n 'text-muted-foreground ml-auto text-xs tracking-widest',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n"],"mappings":"2EACA,OAAS,WAAWA,MAAwB,OAC5C,OAAS,cAAAC,MAAkB,eAgBvB,cAAAC,EAsBE,QAAAC,MAtBF,oBALJ,SAASC,EAAQ,CACf,UAAAC,EACA,GAAGC,CACL,EAAkD,CAChD,OACEJ,EAACK,EAAA,CACC,YAAU,UACV,UAAWC,EACT,4FACAH,CACF,EACC,GAAGC,EACN,CAEJ,CAdSG,EAAAL,EAAA,WAwCT,SAASM,EAAa,CACpB,UAAAC,EACA,GAAGC,CACL,EAAwD,CACtD,OACEC,EAAC,OACC,YAAU,wBACV,UAAU,4CAEV,UAAAC,EAACC,EAAA,CAAW,UAAU,6BAA6B,EACnDD,EAACE,EAAiB,MAAjB,CACC,YAAU,gBACV,UAAWC,EACT,2JACAN,CACF,EACC,GAAGC,EACN,GACF,CAEJ,CApBSM,EAAAR,EAAA,gBAsBT,SAASS,EAAY,CACnB,UAAAR,EACA,GAAGC,CACL,EAAuD,CACrD,OACEE,EAACE,EAAiB,KAAjB,CACC,YAAU,eACV,UAAWC,EACT,8DACAN,CACF,EACC,GAAGC,EACN,CAEJ,CAdSM,EAAAC,EAAA,eAgBT,SAASC,EAAa,CACpB,GAAGR,CACL,EAAwD,CACtD,OACEE,EAACE,EAAiB,MAAjB,CACC,YAAU,gBACV,UAAU,2BACT,GAAGJ,EACN,CAEJ,CAVSM,EAAAE,EAAA,gBAYT,SAASC,EAAa,CACpB,UAAAV,EACA,GAAGC,CACL,EAAwD,CACtD,OACEE,EAACE,EAAiB,MAAjB,CACC,YAAU,gBACV,UAAWC,EACT,yNACAN,CACF,EACC,GAAGC,EACN,CAEJ,CAdSM,EAAAG,EAAA,gBAgBT,SAASC,EAAiB,CACxB,UAAAX,EACA,GAAGC,CACL,EAA4D,CAC1D,OACEE,EAACE,EAAiB,UAAjB,CACC,YAAU,oBACV,UAAWC,EAAG,uBAAwBN,CAAS,EAC9C,GAAGC,EACN,CAEJ,CAXSM,EAAAI,EAAA,oBAaT,SAASC,EAAY,CACnB,UAAAZ,EACA,GAAGC,CACL,EAAuD,CACrD,OACEE,EAACE,EAAiB,KAAjB,CACC,YAAU,eACV,UAAWC,EACT,sYACAN,CACF,EACC,GAAGC,EACN,CAEJ,CAdSM,EAAAK,EAAA","names":["CommandPrimitive","SearchIcon","jsx","jsxs","Command","className","props","CommandPrimitive","cn","__name","CommandInput","className","props","jsxs","jsx","SearchIcon","CommandPrimitive","cn","__name","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem"]}
@@ -1,2 +1,2 @@
1
- import{a as d}from"./chunk-QQPF2DUF.js";import{a as g}from"./chunk-3VTHNE4H.js";import{a as c}from"./chunk-XFVXRCMH.js";import{I as u,L as y,Y as h,ha as _,i as p,xa as f}from"./chunk-VNMUML3T.js";import{e as r}from"./chunk-H2O4CVKF.js";import{a as e}from"./chunk-P37U34EQ.js";import{useMutation as l,useQuery as F}from"@tanstack/react-query";var x=e((n,t,o,i)=>{let{client:s}=r(),a=i?.employmentId;return F({queryKey:["gp-form-schema",n,t,a],enabled:!!n&&!!t&&(i?.enabled??!0),retry:!1,queryFn:e(async()=>{let m=await y({client:s,headers:{Authorization:""},path:{country_code:n,form:t},...a?{query:{employment_id:a}}:{}});if(m.error||!m.data)throw new Error(`Failed to fetch ${t} schema`);return m},"queryFn"),select:e(({data:m})=>c(m?.data||{},o),"select")})},"useGPFormSchema"),G=e(n=>{let{client:t}=r();return F({...g(t,"gp-admin"),select:e(o=>{let i=o?.data?.data??[],s={...d,properties:{country_code:{...d.properties.country_code,oneOf:i.map(a=>({const:a.code,title:a.name}))}}};return c(s,n)},"select")})},"useGPCountrySelectSchema"),P=e(()=>{let{client:n}=r();return l({mutationFn:e(({countryCode:t,legalEntityId:o,basicInformation:i,externalId:s})=>p({client:n,headers:{Authorization:""},body:{type:"global_payroll_employee",country_code:t,engaged_by_entity_slug:o,basic_information:i,external_id:s}}),"mutationFn")})},"useGPCreateEmployment"),R=e(()=>{let{client:n}=r();return l({mutationFn:e(({employmentId:t,basicInformation:o})=>u({client:n,headers:{Authorization:""},path:{employment_id:t},body:{basic_information:o}}),"mutationFn")})},"useGPUpdateBasicInformation"),V=e(()=>{let{client:n}=r();return l({mutationFn:e(({employmentId:t,contractDetails:o})=>h({client:n,headers:{Authorization:""},path:{employment_id:t},body:{contract_details:o}}),"mutationFn")})},"useGPUpdateContractDetails"),w=e(()=>{let{client:n}=r();return l({mutationFn:e(({employmentId:t,administrativeDetails:o})=>f({client:n,headers:{Authorization:""},path:{employment_id:t},body:{administrative_details:o}}),"mutationFn")})},"useGPUpdateAdministrativeDetails"),v=e(()=>{let{client:n}=r();return l({mutationFn:e(({employmentId:t})=>_({client:n,headers:{Authorization:""},path:{employment_id:t}}),"mutationFn")})},"useGPInviteEmployee");export{x as a,G as b,P as c,R as d,V as e,w as f,v as g};
2
- //# sourceMappingURL=chunk-2LR5N626.js.map
1
+ import{a as d}from"./chunk-QQPF2DUF.js";import{a as g}from"./chunk-SZI67IXU.js";import{a as c}from"./chunk-XFVXRCMH.js";import{J as u,M as y,Z as h,ia as _,j as p,za as f}from"./chunk-QQV5REGG.js";import{e as r}from"./chunk-H2O4CVKF.js";import{a as e}from"./chunk-P37U34EQ.js";import{useMutation as l,useQuery as F}from"@tanstack/react-query";var x=e((n,t,o,i)=>{let{client:s}=r(),a=i?.employmentId;return F({queryKey:["gp-form-schema",n,t,a],enabled:!!n&&!!t&&(i?.enabled??!0),retry:!1,queryFn:e(async()=>{let m=await y({client:s,headers:{Authorization:""},path:{country_code:n,form:t},...a?{query:{employment_id:a}}:{}});if(m.error||!m.data)throw new Error(`Failed to fetch ${t} schema`);return m},"queryFn"),select:e(({data:m})=>c(m?.data||{},o),"select")})},"useGPFormSchema"),G=e(n=>{let{client:t}=r();return F({...g(t,"gp-admin"),select:e(o=>{let i=o?.data?.data??[],s={...d,properties:{country_code:{...d.properties.country_code,oneOf:i.map(a=>({const:a.code,title:a.name}))}}};return c(s,n)},"select")})},"useGPCountrySelectSchema"),P=e(()=>{let{client:n}=r();return l({mutationFn:e(({countryCode:t,legalEntityId:o,basicInformation:i,externalId:s})=>p({client:n,headers:{Authorization:""},body:{type:"global_payroll_employee",country_code:t,engaged_by_entity_slug:o,basic_information:i,external_id:s}}),"mutationFn")})},"useGPCreateEmployment"),R=e(()=>{let{client:n}=r();return l({mutationFn:e(({employmentId:t,basicInformation:o})=>u({client:n,headers:{Authorization:""},path:{employment_id:t},body:{basic_information:o}}),"mutationFn")})},"useGPUpdateBasicInformation"),V=e(()=>{let{client:n}=r();return l({mutationFn:e(({employmentId:t,contractDetails:o})=>h({client:n,headers:{Authorization:""},path:{employment_id:t},body:{contract_details:o}}),"mutationFn")})},"useGPUpdateContractDetails"),w=e(()=>{let{client:n}=r();return l({mutationFn:e(({employmentId:t,administrativeDetails:o})=>f({client:n,headers:{Authorization:""},path:{employment_id:t},body:{administrative_details:o}}),"mutationFn")})},"useGPUpdateAdministrativeDetails"),v=e(()=>{let{client:n}=r();return l({mutationFn:e(({employmentId:t})=>_({client:n,headers:{Authorization:""},path:{employment_id:t}}),"mutationFn")})},"useGPInviteEmployee");export{x as a,G as b,P as c,R as d,V as e,w as f,v as g};
2
+ //# sourceMappingURL=chunk-RYZ7TJVS.js.map
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-WH3QR2W5.js";import{b as s}from"./chunk-PGWKJ6FK.js";import{c as t}from"./chunk-C4HFMTSB.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function b({onSubmit:d,onSuccess:l,onError:n}){let{onboardingBag:r}=s(),f=a(async e=>{try{let i=await r.parseFormValues(e);await d?.(i);let o=await r.onSubmit(e);if(o?.data){await l?.(o?.data),r?.next();return}if(o?.error){let c=t(o?.fieldErrors||[],r.meta?.fields?.basic_information);n?.({error:o?.error,rawError:o?.rawError,fieldErrors:c})}}catch(i){n?.({error:i,rawError:i,fieldErrors:[]})}},"handleSubmit"),p=r.stepState.values?.basic_information||r.initialValues.basic_information;return E(m,{defaultValues:p,onSubmit:f})}a(b,"BasicInformationStep");export{b as a};
2
- //# sourceMappingURL=chunk-UU2IFOXR.js.map
1
+ import{a as m}from"./chunk-XMVV6S77.js";import{b as s}from"./chunk-PGWKJ6FK.js";import{c as t}from"./chunk-C4HFMTSB.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function b({onSubmit:d,onSuccess:l,onError:n}){let{onboardingBag:r}=s(),f=a(async e=>{try{let i=await r.parseFormValues(e);await d?.(i);let o=await r.onSubmit(e);if(o?.data){await l?.(o?.data),r?.next();return}if(o?.error){let c=t(o?.fieldErrors||[],r.meta?.fields?.basic_information);n?.({error:o?.error,rawError:o?.rawError,fieldErrors:c})}}catch(i){n?.({error:i,rawError:i,fieldErrors:[]})}},"handleSubmit"),p=r.stepState.values?.basic_information||r.initialValues.basic_information;return E(m,{defaultValues:p,onSubmit:f})}a(b,"BasicInformationStep");export{b as a};
2
+ //# sourceMappingURL=chunk-RZL44CPH.js.map
@@ -1,2 +1,2 @@
1
- import{a as b}from"./chunk-WGDZTF7Y.js";import{a as g}from"./chunk-2QVO3BVI.js";import{a as h,b as N,c as T,d as $,e as v,f as S}from"./chunk-QRSWXKRV.js";import{j as C,k as p,n as F,o as y}from"./chunk-AUPAAQUT.js";import{a as _}from"./chunk-P37U34EQ.js";import{jsx as e,jsxs as t}from"react/jsx-runtime";function B({field:f,fieldState:r,fieldData:n}){let{name:m,label:s,description:c,options:i,onChangeCountryCode:d,onChangePhoneNumber:w,currentCountry:o,nationalPhoneNumber:I}=n,R=o?`${o.name}-${o.dialCode}`:"";return t(C,{"data-field":m,className:`RemoteFlows__TelField__Item__${m}`,children:[s&&e(p,{className:"RemoteFlows__TelField__Label",children:s}),t("div",{className:"flex gap-2",children:[e("div",{className:"w-[180px]",children:t(h,{value:R,onValueChange:l=>{let a=i?.find(u=>`${u.label}-${u.meta?.countryCode}`===l);a&&d&&d({name:a.label,dialCode:a.meta?.countryCode||"",pattern:a.pattern||""})},children:[e($,{className:"RemoteFlows__TelField__CountrySelect","aria-invalid":!!r.error,"aria-label":"Country code",children:e("span",{className:"absolute",children:e(T,{placeholder:"Country code *",children:o&&`${o.name} +${o.dialCode}`})})}),e(v,{className:"RemoteFlows__TelField__CountryContent",children:e(N,{className:"RemoteFlows__TelField__CountryGroup",children:i?.map((l,a)=>t(S,{value:`${l.label}-${l.meta?.countryCode}`,className:"RemoteFlows__TelField__CountryItem",children:[l.label," +",l.meta?.countryCode]},`${l.label}-${l.meta?.countryCode}-${a}`))})})]})}),e("div",{className:"flex-1",children:e(g,{...f,type:"tel",value:I||"",onChange:w,className:"RemoteFlows__TelField__Input",placeholder:"Employee's phone number *","aria-invalid":!!r.error,"aria-label":"Phone number"})})]}),(c||n.meta?.helpCenter)&&e(F,{className:"RemoteFlows__TelField__Description",helpCenter:e(b,{helpCenter:n.meta?.helpCenter}),children:c}),r.error&&e(y,{})]})}_(B,"TelFieldDefault");export{B as a};
2
- //# sourceMappingURL=chunk-C2HZNBMZ.js.map
1
+ import{a as b}from"./chunk-JLZFNUBH.js";import{a as g}from"./chunk-2QVO3BVI.js";import{a as h,b as N,c as T,d as $,e as v,f as S}from"./chunk-QRSWXKRV.js";import{j as C,k as p,n as F,o as y}from"./chunk-AUPAAQUT.js";import{a as _}from"./chunk-P37U34EQ.js";import{jsx as e,jsxs as t}from"react/jsx-runtime";function B({field:f,fieldState:r,fieldData:n}){let{name:m,label:s,description:c,options:i,onChangeCountryCode:d,onChangePhoneNumber:w,currentCountry:o,nationalPhoneNumber:I}=n,R=o?`${o.name}-${o.dialCode}`:"";return t(C,{"data-field":m,className:`RemoteFlows__TelField__Item__${m}`,children:[s&&e(p,{className:"RemoteFlows__TelField__Label",children:s}),t("div",{className:"flex gap-2",children:[e("div",{className:"w-[180px]",children:t(h,{value:R,onValueChange:l=>{let a=i?.find(u=>`${u.label}-${u.meta?.countryCode}`===l);a&&d&&d({name:a.label,dialCode:a.meta?.countryCode||"",pattern:a.pattern||""})},children:[e($,{className:"RemoteFlows__TelField__CountrySelect","aria-invalid":!!r.error,"aria-label":"Country code",children:e("span",{className:"absolute",children:e(T,{placeholder:"Country code *",children:o&&`${o.name} +${o.dialCode}`})})}),e(v,{className:"RemoteFlows__TelField__CountryContent",children:e(N,{className:"RemoteFlows__TelField__CountryGroup",children:i?.map((l,a)=>t(S,{value:`${l.label}-${l.meta?.countryCode}`,className:"RemoteFlows__TelField__CountryItem",children:[l.label," +",l.meta?.countryCode]},`${l.label}-${l.meta?.countryCode}-${a}`))})})]})}),e("div",{className:"flex-1",children:e(g,{...f,type:"tel",value:I||"",onChange:w,className:"RemoteFlows__TelField__Input",placeholder:"Employee's phone number *","aria-invalid":!!r.error,"aria-label":"Phone number"})})]}),(c||n.meta?.helpCenter)&&e(F,{className:"RemoteFlows__TelField__Description",helpCenter:e(b,{helpCenter:n.meta?.helpCenter}),children:c}),r.error&&e(y,{})]})}_(B,"TelFieldDefault");export{B as a};
2
+ //# sourceMappingURL=chunk-SLRPDXK6.js.map
@@ -1,2 +1,2 @@
1
- var e={data:{version:7,schema:{additionalProperties:!1,properties:{country_code:{title:"Country",description:"",type:"string",oneOf:[],"x-jsf-presentation":{inputType:"select"}},company_owner_email:{title:"Company Owner Email",description:"",type:"string","x-jsf-presentation":{inputType:"text"}},company_owner_name:{title:"Company Owner Name",description:"",type:"string","x-jsf-presentation":{inputType:"text"}},desired_currency:{title:"Desired Currency",description:"",type:"string",oneOf:[],"x-jsf-presentation":{inputType:"select"}},name:{title:"Name",description:"",type:"string","x-jsf-presentation":{inputType:"text"}},phone_number:{title:"Phone Number",description:"",type:"string","x-jsf-presentation":{inputType:"text"}},tax_number:{title:"Tax Number",description:"",type:"string","x-jsf-presentation":{inputType:"text"}}},required:["country_code","company_owner_email","phone_number","name","desired_currency","company_owner_name"],type:"object","x-jsf-order":["country_code","name","phone_number","desired_currency","tax_number","company_owner_name","company_owner_email"]}}};export{e as a};
2
- //# sourceMappingURL=chunk-5WIBTOCI.js.map
1
+ var e={data:{version:7,schema:{additionalProperties:!1,properties:{country_code:{title:"Country",description:"",type:"string",oneOf:[],"x-jsf-presentation":{inputType:"select"}},company_owner_email:{title:"Company Owner Email",description:"",type:"string","x-jsf-presentation":{inputType:"text"}},company_owner_name:{title:"Company Owner Name",description:"",type:"string","x-jsf-presentation":{inputType:"text"}},desired_currency:{title:"Desired Currency",description:"",type:"string",oneOf:[],"x-jsf-presentation":{inputType:"select"}},name:{title:"Name",description:"",type:"string","x-jsf-presentation":{inputType:"text"}},phone_number:{title:"Phone Number",description:"",type:"string","x-jsf-presentation":{inputType:"text"}},tax_number:{title:"Tax Number",description:"",type:"string","x-jsf-presentation":{inputType:"text"}}},required:["country_code","company_owner_email","phone_number","name","desired_currency","company_owner_name"],type:"object","x-jsf-order":["country_code","name","phone_number","desired_currency","tax_number","company_owner_name","company_owner_email"],"x-rmt-meta":{jsfVersion:"1"}}}};export{e as a};
2
+ //# sourceMappingURL=chunk-SRNXXOUH.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/flows/CreateCompany/json-schemas/companyBasicInformationStep.ts"],"sourcesContent":["export const companyBasicInformationStepSchema = {\n data: {\n version: 7,\n schema: {\n additionalProperties: false,\n properties: {\n country_code: {\n title: 'Country',\n description: '',\n type: 'string',\n oneOf: [],\n 'x-jsf-presentation': {\n inputType: 'select',\n },\n },\n company_owner_email: {\n title: 'Company Owner Email',\n description: '',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'text',\n },\n },\n company_owner_name: {\n title: 'Company Owner Name',\n description: '',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'text',\n },\n },\n desired_currency: {\n title: 'Desired Currency',\n description: '',\n type: 'string',\n oneOf: [],\n 'x-jsf-presentation': {\n inputType: 'select',\n },\n },\n name: {\n title: 'Name',\n description: '',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'text',\n },\n },\n phone_number: {\n title: 'Phone Number',\n description: '',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'text',\n },\n },\n tax_number: {\n title: 'Tax Number',\n description: '',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'text',\n },\n },\n },\n required: [\n 'country_code',\n 'company_owner_email',\n 'phone_number',\n 'name',\n 'desired_currency',\n 'company_owner_name',\n ],\n type: 'object',\n 'x-jsf-order': [\n 'country_code',\n 'name',\n 'phone_number',\n 'desired_currency',\n 'tax_number',\n 'company_owner_name',\n 'company_owner_email',\n ],\n },\n },\n};\n"],"mappings":"AAAO,IAAMA,EAAoC,CAC/C,KAAM,CACJ,QAAS,EACT,OAAQ,CACN,qBAAsB,GACtB,WAAY,CACV,aAAc,CACZ,MAAO,UACP,YAAa,GACb,KAAM,SACN,MAAO,CAAC,EACR,qBAAsB,CACpB,UAAW,QACb,CACF,EACA,oBAAqB,CACnB,MAAO,sBACP,YAAa,GACb,KAAM,SACN,qBAAsB,CACpB,UAAW,MACb,CACF,EACA,mBAAoB,CAClB,MAAO,qBACP,YAAa,GACb,KAAM,SACN,qBAAsB,CACpB,UAAW,MACb,CACF,EACA,iBAAkB,CAChB,MAAO,mBACP,YAAa,GACb,KAAM,SACN,MAAO,CAAC,EACR,qBAAsB,CACpB,UAAW,QACb,CACF,EACA,KAAM,CACJ,MAAO,OACP,YAAa,GACb,KAAM,SACN,qBAAsB,CACpB,UAAW,MACb,CACF,EACA,aAAc,CACZ,MAAO,eACP,YAAa,GACb,KAAM,SACN,qBAAsB,CACpB,UAAW,MACb,CACF,EACA,WAAY,CACV,MAAO,aACP,YAAa,GACb,KAAM,SACN,qBAAsB,CACpB,UAAW,MACb,CACF,CACF,EACA,SAAU,CACR,eACA,sBACA,eACA,OACA,mBACA,oBACF,EACA,KAAM,SACN,cAAe,CACb,eACA,OACA,eACA,mBACA,aACA,qBACA,qBACF,CACF,CACF,CACF","names":["companyBasicInformationStepSchema"]}
1
+ {"version":3,"sources":["../src/flows/CreateCompany/json-schemas/companyBasicInformationStep.ts"],"sourcesContent":["export const companyBasicInformationStepSchema = {\n data: {\n version: 7,\n schema: {\n additionalProperties: false,\n properties: {\n country_code: {\n title: 'Country',\n description: '',\n type: 'string',\n oneOf: [],\n 'x-jsf-presentation': {\n inputType: 'select',\n },\n },\n company_owner_email: {\n title: 'Company Owner Email',\n description: '',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'text',\n },\n },\n company_owner_name: {\n title: 'Company Owner Name',\n description: '',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'text',\n },\n },\n desired_currency: {\n title: 'Desired Currency',\n description: '',\n type: 'string',\n oneOf: [],\n 'x-jsf-presentation': {\n inputType: 'select',\n },\n },\n name: {\n title: 'Name',\n description: '',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'text',\n },\n },\n phone_number: {\n title: 'Phone Number',\n description: '',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'text',\n },\n },\n tax_number: {\n title: 'Tax Number',\n description: '',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'text',\n },\n },\n },\n required: [\n 'country_code',\n 'company_owner_email',\n 'phone_number',\n 'name',\n 'desired_currency',\n 'company_owner_name',\n ],\n type: 'object',\n 'x-jsf-order': [\n 'country_code',\n 'name',\n 'phone_number',\n 'desired_currency',\n 'tax_number',\n 'company_owner_name',\n 'company_owner_email',\n ],\n 'x-rmt-meta': {\n jsfVersion: '1',\n },\n },\n },\n};\n"],"mappings":"AAAO,IAAMA,EAAoC,CAC/C,KAAM,CACJ,QAAS,EACT,OAAQ,CACN,qBAAsB,GACtB,WAAY,CACV,aAAc,CACZ,MAAO,UACP,YAAa,GACb,KAAM,SACN,MAAO,CAAC,EACR,qBAAsB,CACpB,UAAW,QACb,CACF,EACA,oBAAqB,CACnB,MAAO,sBACP,YAAa,GACb,KAAM,SACN,qBAAsB,CACpB,UAAW,MACb,CACF,EACA,mBAAoB,CAClB,MAAO,qBACP,YAAa,GACb,KAAM,SACN,qBAAsB,CACpB,UAAW,MACb,CACF,EACA,iBAAkB,CAChB,MAAO,mBACP,YAAa,GACb,KAAM,SACN,MAAO,CAAC,EACR,qBAAsB,CACpB,UAAW,QACb,CACF,EACA,KAAM,CACJ,MAAO,OACP,YAAa,GACb,KAAM,SACN,qBAAsB,CACpB,UAAW,MACb,CACF,EACA,aAAc,CACZ,MAAO,eACP,YAAa,GACb,KAAM,SACN,qBAAsB,CACpB,UAAW,MACb,CACF,EACA,WAAY,CACV,MAAO,aACP,YAAa,GACb,KAAM,SACN,qBAAsB,CACpB,UAAW,MACb,CACF,CACF,EACA,SAAU,CACR,eACA,sBACA,eACA,OACA,mBACA,oBACF,EACA,KAAM,SACN,cAAe,CACb,eACA,OACA,eACA,mBACA,aACA,qBACA,qBACF,EACA,aAAc,CACZ,WAAY,GACd,CACF,CACF,CACF","names":["companyBasicInformationStepSchema"]}
@@ -1,2 +1,2 @@
1
- import{a as _}from"./chunk-HDFAFTHC.js";import{a as C}from"./chunk-WGDZTF7Y.js";import{j as i,k as c,l as a,n as F,o as u}from"./chunk-AUPAAQUT.js";import{a as p}from"./chunk-P37U34EQ.js";import{useEffect as O,useState as g}from"react";import{jsx as o,jsxs as I}from"react/jsx-runtime";var w=p(({field:t,fieldState:d,fieldData:r})=>{let[f,n]=g([]),{name:m,label:h,description:s,options:l}=r,v=f||l?.filter(e=>t.value?.includes(e.value));return O(()=>{n(l?.filter(e=>t.value?.includes(e.value))||[])},[t.value,l]),I(i,{"data-field":m,className:`RemoteFlows__SelectField__Item__${m}`,children:[o(c,{className:"RemoteFlows__SelectField__Label",children:h}),o(a,{children:o(_,{options:l||[],selected:v,onChange:e=>{let S=e.map(({value:b})=>b);t.onChange(S),n(e)}})}),(s||r.meta?.helpCenter)&&o(F,{helpCenter:o(C,{helpCenter:r.meta?.helpCenter}),children:s}),d.error&&o(u,{})]})},"MultiSelectFieldDefault");export{w as a};
2
- //# sourceMappingURL=chunk-5MH23AST.js.map
1
+ import{a as _}from"./chunk-5YI7MY5T.js";import{a as C}from"./chunk-JLZFNUBH.js";import{j as i,k as c,l as a,n as F,o as u}from"./chunk-AUPAAQUT.js";import{a as p}from"./chunk-P37U34EQ.js";import{useEffect as O,useState as g}from"react";import{jsx as o,jsxs as I}from"react/jsx-runtime";var w=p(({field:t,fieldState:d,fieldData:r})=>{let[f,n]=g([]),{name:m,label:h,description:s,options:l}=r,v=f||l?.filter(e=>t.value?.includes(e.value));return O(()=>{n(l?.filter(e=>t.value?.includes(e.value))||[])},[t.value,l]),I(i,{"data-field":m,className:`RemoteFlows__SelectField__Item__${m}`,children:[o(c,{className:"RemoteFlows__SelectField__Label",children:h}),o(a,{children:o(_,{options:l||[],selected:v,onChange:e=>{let S=e.map(({value:b})=>b);t.onChange(S),n(e)}})}),(s||r.meta?.helpCenter)&&o(F,{helpCenter:o(C,{helpCenter:r.meta?.helpCenter}),children:s}),d.error&&o(u,{})]})},"MultiSelectFieldDefault");export{w as a};
2
+ //# sourceMappingURL=chunk-STHZZZRL.js.map
@@ -1,2 +1,2 @@
1
- import{a as r}from"./chunk-SLEK47CR.js";import{a as t}from"./chunk-5FGYC2RF.js";import{a as f}from"./chunk-TLJXBZII.js";import{a as e}from"./chunk-VYAJQ25J.js";import{a as p}from"./chunk-PNNOU6BC.js";import{a as n}from"./chunk-YUNA3QKT.js";import{a}from"./chunk-Z7VNXKWB.js";import{a as m}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{useId as c}from"react";import{jsx as F}from"react/jsx-runtime";var k=i(({employmentId:l,render:T,options:d,initialValues:s})=>{let u=c(),o=t({employmentId:l,options:d,initialValues:s});return F(m.Provider,{value:{formId:u,terminationBag:o},children:T({terminationBag:o,components:{SubmitButton:r,Back:n,EmployeeComunicationStep:e,TerminationDetailsStep:a,PaidTimeOffStep:p,AdditionalDetailsStep:f}})})},"TerminationFlow");export{k as a};
2
- //# sourceMappingURL=chunk-CHIWBD6E.js.map
1
+ import{a as r}from"./chunk-SLEK47CR.js";import{a as t}from"./chunk-7FKNXW2I.js";import{a as f}from"./chunk-WKWL57L6.js";import{a as e}from"./chunk-4CNDASPA.js";import{a as p}from"./chunk-JI3PAIMV.js";import{a as n}from"./chunk-YUNA3QKT.js";import{a}from"./chunk-AAXPKULB.js";import{a as m}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{useId as c}from"react";import{jsx as F}from"react/jsx-runtime";var k=i(({employmentId:l,render:T,options:d,initialValues:s})=>{let u=c(),o=t({employmentId:l,options:d,initialValues:s});return F(m.Provider,{value:{formId:u,terminationBag:o},children:T({terminationBag:o,components:{SubmitButton:r,Back:n,EmployeeComunicationStep:e,TerminationDetailsStep:a,PaidTimeOffStep:p,AdditionalDetailsStep:f}})})},"TerminationFlow");export{k as a};
2
+ //# sourceMappingURL=chunk-SUYI33NX.js.map
@@ -0,0 +1,2 @@
1
+ import{a as S}from"./chunk-TRDNTXE7.js";import{a}from"./chunk-F37FQXEZ.js";import{d as n}from"./chunk-H6XROFQT.js";import{a as l}from"./chunk-UZFEJMO6.js";import{a as s}from"./chunk-P37U34EQ.js";import{useEffect as h,useId as O,useRef as C}from"react";import{jsx as _}from"react/jsx-runtime";var L=s(({employmentId:i,jsfModify:f,contractorSearch:p,defaultValues:m,render:v})=>{let E=O(),o=S({employmentId:i,jsfModify:f,contractorSearch:p}),e=l({handleValidation:o.handleValidation,checkFieldUpdates:o.checkFieldUpdates,defaultValues:{employment_id:i??"",currency:"",periodicity:"",start_date:"",number:"",note:"",...m}}),t=e.watch("employment_id"),{onContractorChange:d,rendersContractorSelect:u}=o,r=C(i);h(()=>{if(!u||r.current===t)return;let c=r.current!==void 0;r.current=t,d(t),c&&(e.setValue("currency",""),e.setValue("periodicity",""))},[t,d,u,e]);let{isContractorOfRecord:I}=o;return h(()=>{if(!I)return;let c=e.getValues("periodicity");c&&c!==n&&e.setValue("periodicity","")},[I,e]),_(a.Provider,{value:{form:e,formId:E,invoiceScheduleBag:o},children:v(o)})},"InvoiceScheduleFlow");export{L as a};
2
+ //# sourceMappingURL=chunk-SVU7GWUR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/InvoiceSchedule/InvoiceScheduleFlow.tsx"],"sourcesContent":["import React, { useEffect, useId, useRef } from 'react';\nimport { useJSONSchemaForm } from '@/src/components/form/useJSONSchemaForm';\nimport { ONE_TIME_PERIODICITY } from '@/src/common/invoice-schedules';\nimport { InvoiceScheduleContext } from '@/src/flows/InvoiceSchedule/context';\nimport { useInvoiceSchedule } from '@/src/flows/InvoiceSchedule/hooks';\nimport { UseInvoiceScheduleOptions } from '@/src/flows/InvoiceSchedule/types';\n\nexport type InvoiceScheduleFlowProps = {\n /**\n * Create the schedule for this contractor and skip the picker. Omit to have the flow load\n * the company's active contractors and render a picker as the first field.\n */\n employmentId?: string;\n /**\n * Modify the generated JSON-schema form fields.\n */\n jsfModify?: UseInvoiceScheduleOptions['jsfModify'];\n /**\n * Filter the `contractors` bag entry by name, server-side. The rendered picker is a\n * type-ahead that owns its own search, so this is only needed if you build your own picker.\n */\n contractorSearch?: string;\n /**\n * Default values for the form fields.\n */\n defaultValues?: Record<string, unknown>;\n render: (\n invoiceScheduleBag: ReturnType<typeof useInvoiceSchedule>,\n ) => React.ReactNode;\n};\n\n/**\n * Standalone screen for creating a contractor invoice schedule, mirroring the platform's\n * single-screen modal. Mount it anywhere — it does not depend on the onboarding flow.\n */\nexport const InvoiceScheduleFlow = ({\n employmentId,\n jsfModify,\n contractorSearch,\n defaultValues,\n render,\n}: InvoiceScheduleFlowProps) => {\n const formId = useId();\n const invoiceScheduleBag = useInvoiceSchedule({\n employmentId,\n jsfModify,\n contractorSearch,\n });\n\n // `useJSONSchemaForm` subscribes to form changes and feeds them back through\n // `checkFieldUpdates`, which is what makes the schema's conditionals — the item-row\n // reveal and the semi-monthly day fields — re-evaluate as the form is filled in.\n const form = useJSONSchemaForm({\n handleValidation: invoiceScheduleBag.handleValidation,\n checkFieldUpdates: invoiceScheduleBag.checkFieldUpdates,\n defaultValues: {\n employment_id: employmentId ?? '',\n currency: '',\n periodicity: '',\n start_date: '',\n number: '',\n note: '',\n ...defaultValues,\n },\n });\n\n // The picker drives the currency options and the Contractor-of-Record restriction, so the\n // hook needs to know about a change before the form is submitted.\n const employmentIdValue = form.watch('employment_id');\n const { onContractorChange, rendersContractorSelect } = invoiceScheduleBag;\n const lastNotified = useRef<string | undefined>(employmentId);\n\n useEffect(() => {\n if (!rendersContractorSelect) return;\n if (lastNotified.current === employmentIdValue) return;\n\n const isContractorSwitch = lastNotified.current !== undefined;\n lastNotified.current = employmentIdValue;\n onContractorChange(employmentIdValue);\n\n // Currency options and the available frequencies both depend on the contractor, so a\n // value chosen for the previous one may no longer be offered — a Contractor of Record\n // could otherwise keep a recurring frequency the product does not support, and the API\n // does not reject that today. Cleared on a switch, not on the first selection, so\n // picking a contractor does not wipe details already filled in.\n if (isContractorSwitch) {\n form.setValue('currency', '');\n form.setValue('periodicity', '');\n }\n }, [employmentIdValue, onContractorChange, rendersContractorSelect, form]);\n\n // Contractor of Record is only known once the employment request resolves, so the form\n // offers the recurring frequencies until then and a frequency chosen in that window\n // outlives the schema shrinking to one-off. Validation does reject it — the field's `oneOf`\n // no longer holds it — but the select renders blank in the meantime and the user only finds\n // out on submit, so drop it as soon as the restriction is known.\n const { isContractorOfRecord } = invoiceScheduleBag;\n\n useEffect(() => {\n if (!isContractorOfRecord) return;\n\n const periodicity = form.getValues('periodicity');\n if (periodicity && periodicity !== ONE_TIME_PERIODICITY) {\n form.setValue('periodicity', '');\n }\n }, [isContractorOfRecord, form]);\n\n return (\n <InvoiceScheduleContext.Provider\n value={{\n form,\n formId,\n invoiceScheduleBag,\n }}\n >\n {render(invoiceScheduleBag)}\n </InvoiceScheduleContext.Provider>\n );\n};\n"],"mappings":"mMAAA,OAAgB,aAAAA,EAAW,SAAAC,EAAO,UAAAC,MAAc,QA4G5C,cAAAC,MAAA,oBAzEG,IAAMC,EAAsBC,EAAA,CAAC,CAClC,aAAAC,EACA,UAAAC,EACA,iBAAAC,EACA,cAAAC,EACA,OAAAC,CACF,IAAgC,CAC9B,IAAMC,EAASC,EAAM,EACfC,EAAqBC,EAAmB,CAC5C,aAAAR,EACA,UAAAC,EACA,iBAAAC,CACF,CAAC,EAKKO,EAAOC,EAAkB,CAC7B,iBAAkBH,EAAmB,iBACrC,kBAAmBA,EAAmB,kBACtC,cAAe,CACb,cAAeP,GAAgB,GAC/B,SAAU,GACV,YAAa,GACb,WAAY,GACZ,OAAQ,GACR,KAAM,GACN,GAAGG,CACL,CACF,CAAC,EAIKQ,EAAoBF,EAAK,MAAM,eAAe,EAC9C,CAAE,mBAAAG,EAAoB,wBAAAC,CAAwB,EAAIN,EAClDO,EAAeC,EAA2Bf,CAAY,EAE5DgB,EAAU,IAAM,CAEd,GADI,CAACH,GACDC,EAAa,UAAYH,EAAmB,OAEhD,IAAMM,EAAqBH,EAAa,UAAY,OACpDA,EAAa,QAAUH,EACvBC,EAAmBD,CAAiB,EAOhCM,IACFR,EAAK,SAAS,WAAY,EAAE,EAC5BA,EAAK,SAAS,cAAe,EAAE,EAEnC,EAAG,CAACE,EAAmBC,EAAoBC,EAAyBJ,CAAI,CAAC,EAOzE,GAAM,CAAE,qBAAAS,CAAqB,EAAIX,EAEjC,OAAAS,EAAU,IAAM,CACd,GAAI,CAACE,EAAsB,OAE3B,IAAMC,EAAcV,EAAK,UAAU,aAAa,EAC5CU,GAAeA,IAAgBC,GACjCX,EAAK,SAAS,cAAe,EAAE,CAEnC,EAAG,CAACS,EAAsBT,CAAI,CAAC,EAG7BZ,EAACwB,EAAuB,SAAvB,CACC,MAAO,CACL,KAAAZ,EACA,OAAAJ,EACA,mBAAAE,CACF,EAEC,SAAAH,EAAOG,CAAkB,EAC5B,CAEJ,EAnFmC","names":["useEffect","useId","useRef","jsx","InvoiceScheduleFlow","__name","employmentId","jsfModify","contractorSearch","defaultValues","render","formId","useId","invoiceScheduleBag","useInvoiceSchedule","form","useJSONSchemaForm","employmentIdValue","onContractorChange","rendersContractorSelect","lastNotified","useRef","useEffect","isContractorSwitch","isContractorOfRecord","periodicity","ONE_TIME_PERIODICITY","InvoiceScheduleContext"]}
@@ -1,2 +1,2 @@
1
- import{X as e}from"./chunk-VNMUML3T.js";import{a as t}from"./chunk-P37U34EQ.js";import{queryOptions as i}from"@tanstack/react-query";var a=t((o,n="default")=>i({queryKey:["countries",n],retry:!1,queryFn:t(async()=>{let r=await e({client:o,headers:{Authorization:""}});if(r.error||!r.data)throw new Error("Failed to fetch supported countries");return r},"queryFn")}),"countriesOptions");export{a};
2
- //# sourceMappingURL=chunk-3VTHNE4H.js.map
1
+ import{Y as e}from"./chunk-QQV5REGG.js";import{a as t}from"./chunk-P37U34EQ.js";import{queryOptions as i}from"@tanstack/react-query";var a=t((o,n="default")=>i({queryKey:["countries",n],retry:!1,queryFn:t(async()=>{let r=await e({client:o,headers:{Authorization:""}});if(r.error||!r.data)throw new Error("Failed to fetch supported countries");return r},"queryFn")}),"countriesOptions");export{a};
2
+ //# sourceMappingURL=chunk-SZI67IXU.js.map
@@ -0,0 +1,2 @@
1
+ import{b as a}from"./chunk-4MI7BMM5.js";import{a as t}from"./chunk-UZFEJMO6.js";import{a as r}from"./chunk-I4DU34BA.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}=a(),o=t({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-T5H35HYL.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/flows/JsonSchemaPlayground/JsonSchemaPlaygroundForm.tsx"],"sourcesContent":["import { JSONSchemaFormFields } from '@/src/components/form/JSONSchemaForm';\nimport { Form } from '@/src/components/ui/form';\nimport { useEffect } from 'react';\nimport { useJsonSchemaPlaygroundContext } from './context';\nimport { useJSONSchemaForm } from '@/src/components/form/useJSONSchemaForm';\nimport { Components } from '@/src/types/remoteFlows';\n\nexport interface JsonSchemaPlaygroundFormProps {\n onSubmit?: (values: Record<string, unknown>) => void;\n className?: string;\n components?: Components;\n defaultValues?: Record<string, unknown>;\n}\n\nexport const JsonSchemaPlaygroundForm = ({\n onSubmit,\n className,\n components,\n}: JsonSchemaPlaygroundFormProps) => {\n const { formId, playgroundBag } = useJsonSchemaPlaygroundContext();\n\n const form = useJSONSchemaForm({\n handleValidation: playgroundBag.handleValidation,\n defaultValues: playgroundBag.initialValues,\n checkFieldUpdates: playgroundBag.checkFieldUpdates,\n });\n\n useEffect(() => {\n // Update field values when form values change\n playgroundBag.checkFieldUpdates(form.getValues());\n // oxlint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const handleFormSubmit = async (values: Record<string, unknown>) => {\n await playgroundBag.handleSubmit(values);\n onSubmit?.(values);\n };\n\n return (\n <Form\n {...form}\n key={`form-${playgroundBag.selectedSchema}-${playgroundBag.resetKey}`}\n >\n <form\n id={formId}\n onSubmit={form.handleSubmit(handleFormSubmit)}\n className={className}\n >\n <JSONSchemaFormFields\n components={components}\n fields={playgroundBag.fields ?? []}\n fieldValues={playgroundBag.fieldValues}\n fieldsets={playgroundBag.meta['x-jsf-fieldsets']}\n />\n </form>\n </Form>\n );\n};\n"],"mappings":"mMAEA,OAAS,aAAAA,MAAiB,QA8ClB,cAAAC,MAAA,oBATJ,wBAAAC,MAAA,QAzBG,IAAMC,EAA2BC,EAAA,CAAC,CACvC,SAAAC,EACA,UAAAC,EACA,WAAAC,CACF,IAAqC,CACnC,GAAM,CAAE,OAAAC,EAAQ,cAAAC,CAAc,EAAIC,EAA+B,EAE3DC,EAAOC,EAAkB,CAC7B,iBAAkBH,EAAc,iBAChC,cAAeA,EAAc,cAC7B,kBAAmBA,EAAc,iBACnC,CAAC,EAEDI,EAAU,IAAM,CAEdJ,EAAc,kBAAkBE,EAAK,UAAU,CAAC,CAElD,EAAG,CAAC,CAAC,EAEL,IAAMG,EAAmBV,EAAA,MAAOW,GAAoC,CAClE,MAAMN,EAAc,aAAaM,CAAM,EACvCV,IAAWU,CAAM,CACnB,EAHyB,oBAKzB,OACEb,EAACc,EAAA,CACE,GAAGL,EACJ,IAAK,QAAQF,EAAc,cAAc,IAAIA,EAAc,QAAQ,IAEnER,EAAC,QACC,GAAIO,EACJ,SAAUG,EAAK,aAAaG,CAAgB,EAC5C,UAAWR,EAEX,SAAAL,EAACgB,EAAA,CACC,WAAYV,EACZ,OAAQE,EAAc,QAAU,CAAC,EACjC,YAAaA,EAAc,YAC3B,UAAWA,EAAc,KAAK,iBAAiB,EACjD,EACF,CACF,CAEJ,EA3CwC","names":["useEffect","jsx","createElement","JsonSchemaPlaygroundForm","__name","onSubmit","className","components","formId","playgroundBag","useJsonSchemaPlaygroundContext","form","useJSONSchemaForm","useEffect","handleFormSubmit","values","Form","JSONSchemaFormFields"]}
1
+ {"version":3,"sources":["../src/flows/JsonSchemaPlayground/JsonSchemaPlaygroundForm.tsx"],"sourcesContent":["import { JSONSchemaFormFields } from '@/src/components/form/JSONSchemaForm';\nimport { Form } from '@/src/components/ui/form';\nimport { useEffect } from 'react';\nimport { useJsonSchemaPlaygroundContext } from './context';\nimport { useJSONSchemaForm } from '@/src/components/form/useJSONSchemaForm';\nimport { Components } from '@/src/types/remoteFlows';\n\nexport interface JsonSchemaPlaygroundFormProps {\n onSubmit?: (values: Record<string, unknown>) => void;\n className?: string;\n components?: Components;\n defaultValues?: Record<string, unknown>;\n}\n\nexport const JsonSchemaPlaygroundForm = ({\n onSubmit,\n className,\n components,\n}: JsonSchemaPlaygroundFormProps) => {\n const { formId, playgroundBag } = useJsonSchemaPlaygroundContext();\n\n const form = useJSONSchemaForm({\n handleValidation: playgroundBag.handleValidation,\n defaultValues: playgroundBag.initialValues,\n checkFieldUpdates: playgroundBag.checkFieldUpdates,\n });\n\n useEffect(() => {\n // Update field values when form values change\n playgroundBag.checkFieldUpdates(form.getValues());\n // oxlint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const handleFormSubmit = async (values: Record<string, unknown>) => {\n await playgroundBag.handleSubmit(values);\n onSubmit?.(values);\n };\n\n return (\n <Form\n {...form}\n key={`form-${playgroundBag.selectedSchema}-${playgroundBag.resetKey}`}\n >\n <form\n id={formId}\n onSubmit={form.handleSubmit(handleFormSubmit)}\n className={className}\n >\n <JSONSchemaFormFields\n components={components}\n fields={playgroundBag.fields ?? []}\n fieldValues={playgroundBag.fieldValues}\n fieldsets={playgroundBag.meta['x-jsf-fieldsets']}\n />\n </form>\n </Form>\n );\n};\n"],"mappings":"wMAEA,OAAS,aAAAA,MAAiB,QA8ClB,cAAAC,MAAA,oBATJ,wBAAAC,MAAA,QAzBG,IAAMC,EAA2BC,EAAA,CAAC,CACvC,SAAAC,EACA,UAAAC,EACA,WAAAC,CACF,IAAqC,CACnC,GAAM,CAAE,OAAAC,EAAQ,cAAAC,CAAc,EAAIC,EAA+B,EAE3DC,EAAOC,EAAkB,CAC7B,iBAAkBH,EAAc,iBAChC,cAAeA,EAAc,cAC7B,kBAAmBA,EAAc,iBACnC,CAAC,EAEDI,EAAU,IAAM,CAEdJ,EAAc,kBAAkBE,EAAK,UAAU,CAAC,CAElD,EAAG,CAAC,CAAC,EAEL,IAAMG,EAAmBV,EAAA,MAAOW,GAAoC,CAClE,MAAMN,EAAc,aAAaM,CAAM,EACvCV,IAAWU,CAAM,CACnB,EAHyB,oBAKzB,OACEb,EAACc,EAAA,CACE,GAAGL,EACJ,IAAK,QAAQF,EAAc,cAAc,IAAIA,EAAc,QAAQ,IAEnER,EAAC,QACC,GAAIO,EACJ,SAAUG,EAAK,aAAaG,CAAgB,EAC5C,UAAWR,EAEX,SAAAL,EAACgB,EAAA,CACC,WAAYV,EACZ,OAAQE,EAAc,QAAU,CAAC,EACjC,YAAaA,EAAc,YAC3B,UAAWA,EAAc,KAAK,iBAAiB,EACjD,EACF,CACF,CAEJ,EA3CwC","names":["useEffect","jsx","createElement","JsonSchemaPlaygroundForm","__name","onSubmit","className","components","formId","playgroundBag","useJsonSchemaPlaygroundContext","form","useJSONSchemaForm","useEffect","handleFormSubmit","values","Form","JSONSchemaFormFields"]}
@@ -0,0 +1,2 @@
1
+ import{a,b as l,e as c,h as s,i as d}from"./chunk-PB6UQ4A4.js";import{a as t}from"./chunk-P37U34EQ.js";function y(e={}){let r=[{name:"select_country",label:"Select Country",visible:!!e?.includeSelectCountry},{name:"basic_information",label:"Basic Information",visible:!0},{name:"pricing_plan",label:"Pricing Plan",visible:!0},{name:"eligibility_questionnaire",label:"Eligibility Questionnaire",visible:!!e?.includeEligibilityQuestionnaire},{name:"contract_origin",label:"Contract Options",visible:!!(e?.includeContractOrigin??!0)},{name:"contract_details",label:"Contract Details",visible:!!(e?.includeContractDetails??!0)},{name:"contract_preview",label:"Contract Preview",visible:!!e?.includeContractPreview},{name:"invoice_schedule",label:"Invoice schedule",visible:!!e?.includeInvoiceSchedule},{name:"create_invoice_schedule",label:"Create Invoice Schedule",visible:!!e?.includeCreateInvoiceSchedule},{name:"review",label:"Review",visible:!0}].map((i,o)=>({name:i.name,index:o,label:i.label,visible:i.visible}));return{steps:r.reduce((i,o)=>(i[o.name]={index:o.index,name:o.name,visible:o.visible},i),{}),stepsArray:r}}t(y,"buildSteps");var h=t((e,n)=>{if(e&&n&&e!==n)return`When the contractor will start providing service to your company. ${`This date does not match the date you provided in the Basic Information step - ${e} - and will override it only when both parties have signed the contract.`}`},"calculateProvisionalStartDateDescription"),g=t(e=>e===a||e===l,"isCMOrCMPlus"),b=["SAU","KWT","OMN","QAT","BHR"],I=t(e=>b.includes(e),"isNationalityCountryCode"),C=t((e,n)=>!n||n.length===0?!0:!n.some(r=>c[r]===e),"shouldIncludeProduct"),R=["initiated","invited","created_awaiting_reserve","created_reserve_paid","active"],f=["initiated","created_awaiting_reserve","invited","active"];function A(e){return e?d:s}t(A,"transformAiErrorResponse");var m=1,w=t(e=>e?.jsonSchemaVersion?.employment_basic_information||m,"getBasicInformationSchemaVersion");export{y as a,h as b,g as c,I as d,C as e,R as f,f as g,A as h,w as i};
2
+ //# sourceMappingURL=chunk-TDKKCSKV.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/flows/ContractorOnboarding/utils.ts"],"sourcesContent":["import { Step } from '@/src/flows/useStepState';\nimport {\n contractorStandardProductIdentifier,\n contractorPlusProductIdentifier,\n ProductType,\n PRODUCT_IDENTIFIER_MAP,\n REMOTE_AI_SERVICES_AND_DELIVERABLES_ERROR_MESSAGE,\n REMOTE_AI_SERVICES_AND_DELIVERABLES_COR_ERROR_MESSAGE,\n} from '@/src/flows/ContractorOnboarding/constants';\nimport { Employment } from '@/src/flows/Onboarding/types';\n\nexport type StepKeys =\n | 'select_country'\n | 'basic_information'\n | 'contract_origin'\n | 'invoice_schedule'\n | 'create_invoice_schedule'\n | 'contract_details'\n | 'eligibility_questionnaire'\n | 'contract_preview'\n | 'pricing_plan'\n | 'review';\n\ntype StepConfig = {\n includeSelectCountry?: boolean;\n includeContractOrigin?: boolean;\n includeInvoiceSchedule?: boolean;\n includeCreateInvoiceSchedule?: boolean;\n includeEligibilityQuestionnaire?: boolean;\n includeContractDetails?: boolean;\n includeContractPreview?: boolean;\n};\n\nexport function buildSteps(config: StepConfig = {}) {\n const stepDefinitions: Array<{\n name: StepKeys;\n label: string;\n visible: boolean;\n }> = [\n {\n name: 'select_country',\n label: 'Select Country',\n visible: Boolean(config?.includeSelectCountry),\n },\n {\n name: 'basic_information',\n label: 'Basic Information',\n visible: true,\n },\n {\n name: 'pricing_plan',\n label: 'Pricing Plan',\n visible: true,\n },\n {\n name: 'eligibility_questionnaire',\n label: 'Eligibility Questionnaire',\n visible: Boolean(config?.includeEligibilityQuestionnaire),\n },\n {\n name: 'contract_origin',\n label: 'Contract Options',\n visible: Boolean(config?.includeContractOrigin ?? true),\n },\n {\n name: 'contract_details',\n label: 'Contract Details',\n visible: Boolean(config?.includeContractDetails ?? true),\n },\n {\n name: 'contract_preview',\n label: 'Contract Preview',\n visible: Boolean(config?.includeContractPreview),\n },\n {\n name: 'invoice_schedule',\n label: 'Invoice schedule',\n visible: Boolean(config?.includeInvoiceSchedule),\n },\n {\n name: 'create_invoice_schedule',\n label: 'Create Invoice Schedule',\n visible: Boolean(config?.includeCreateInvoiceSchedule),\n },\n {\n name: 'review',\n label: 'Review',\n visible: true,\n },\n ];\n\n const stepsArray = stepDefinitions.map((step, index) => ({\n name: step.name,\n index,\n label: step.label,\n visible: step.visible,\n }));\n\n const steps = stepsArray.reduce(\n (acc, step) => {\n acc[step.name] = {\n index: step.index,\n name: step.name,\n visible: step.visible,\n };\n return acc;\n },\n {} as Record<string, Step<StepKeys>>,\n );\n\n return { steps, stepsArray };\n}\n\n/**\n * Calculates the description for the provisional start date field\n * based on whether the dates match between basic information and contract details steps\n */\nexport const calculateProvisionalStartDateDescription = (\n employmentProvisionalStartDate: string | undefined,\n fieldProvisionalStartDate: string | undefined,\n): string | undefined => {\n const datesNotMatching =\n employmentProvisionalStartDate &&\n fieldProvisionalStartDate &&\n employmentProvisionalStartDate !== fieldProvisionalStartDate;\n\n if (datesNotMatching) {\n const datesDontMatchWarning = `This date does not match the date you provided in the Basic Information step - ${\n employmentProvisionalStartDate\n } - and will override it only when both parties have signed the contract.`;\n return `When the contractor will start providing service to your company. ${datesDontMatchWarning}`;\n }\n return undefined;\n};\n\n/**\n * Checks if the selected pricing plan is CM (standard) or CM+ (plus)\n */\nexport const isCMOrCMPlus = (subscription: string | undefined): boolean => {\n return (\n subscription === contractorStandardProductIdentifier ||\n subscription === contractorPlusProductIdentifier\n );\n};\n\nconst NATIONALITY_COUNTRY_CODES = ['SAU', 'KWT', 'OMN', 'QAT', 'BHR'];\n\n/**\n * Checks if the country code is a country code that requires nationality status field\n */\nexport const isNationalityCountryCode = (countryCode: string) => {\n return NATIONALITY_COUNTRY_CODES.includes(countryCode);\n};\n\n/**\n * Checks if a product should be included based on the excludeProducts list\n * @param productIdentifier - The product identifier to check\n * @param excludeProducts - Array of products to exclude\n * @returns true if the product should be included, false otherwise\n */\nexport const shouldIncludeProduct = (\n productIdentifier: string,\n excludeProducts?: ProductType[],\n): boolean => {\n if (!excludeProducts || excludeProducts.length === 0) {\n return true;\n }\n\n return !excludeProducts.some(\n (excluded) => PRODUCT_IDENTIFIER_MAP[excluded] === productIdentifier,\n );\n};\n\n/**\n * Array of employment statuses that are allowed to proceed to the review step.\n * These statuses indicate that the employment is in a final state and the employment cannot be modified further.\n * @type {Employment['status'][]}\n * @constant\n */\nexport const reviewStepAllowedEmploymentStatus: Employment['status'][] = [\n 'initiated',\n 'invited',\n 'created_awaiting_reserve',\n 'created_reserve_paid',\n 'active',\n];\n\nexport const disabledInviteButtonEmploymentStatus: Employment['status'][] = [\n 'initiated',\n 'created_awaiting_reserve',\n 'invited',\n 'active',\n];\n\n/**\n * Transforms AI error messages to use default localized messages\n * @param isContractorOfRecord - Whether the contractor is a Contractor of Record\n * @param errors - Array of error messages from the API\n * @returns Array containing the appropriate default error message\n */\nexport function transformAiErrorResponse(\n isContractorOfRecord: boolean,\n): string {\n const remoteAiErrorMessage = isContractorOfRecord\n ? REMOTE_AI_SERVICES_AND_DELIVERABLES_COR_ERROR_MESSAGE\n : REMOTE_AI_SERVICES_AND_DELIVERABLES_ERROR_MESSAGE;\n return remoteAiErrorMessage;\n}\n\nconst DEFAULT_VERSION = 1;\n\n/**\n * Gets the basic information schema version from options\n * @param options - The flow options containing version configurations\n * @returns The jsonSchemaVersion for basic information or default (1)\n */\nexport const getBasicInformationSchemaVersion = (options?: {\n jsonSchemaVersion?: { employment_basic_information?: number | 'latest' };\n}): number | 'latest' => {\n return (\n options?.jsonSchemaVersion?.employment_basic_information || DEFAULT_VERSION\n );\n};\n\n/**\n * Builds invoice items array from form values\n * Collects up to 10 invoice items (item_1 through item_10)\n * @param values - Form values containing item_N_description and item_N_amount fields\n * @returns Array of invoice items with description and amount\n */\nexport function buildInvoiceItems(values: Record<string, unknown>) {\n const items = [];\n for (let i = 1; i <= 10; i++) {\n const description = values[`item_${i}_description`];\n const amount = values[`item_${i}_amount`];\n if (typeof description === 'string' && typeof amount === 'number') {\n items.push({\n description,\n amount: amount,\n });\n }\n }\n return items;\n}\n\n/**\n * Builds the base invoice schedule payload from form values\n * @param values - Form values containing invoice schedule data\n * @returns Invoice schedule payload object\n */\nexport function buildInvoiceSchedulePayload(\n values: Record<string, unknown>,\n): Record<string, unknown> {\n const payload: Record<string, unknown> = {\n currency: values.currency,\n periodicity: values.periodicity,\n start_date: values.start_date,\n items: buildInvoiceItems(values),\n };\n\n if (values.number) {\n payload.number = String(values.number);\n }\n\n if (values.note) {\n payload.note = values.note;\n }\n\n if (values.nr_occurrences) {\n payload.nr_occurrences = Number(values.nr_occurrences);\n }\n\n return payload;\n}\n"],"mappings":"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","names":["buildSteps","config","stepsArray","step","index","acc","__name","calculateProvisionalStartDateDescription","employmentProvisionalStartDate","fieldProvisionalStartDate","isCMOrCMPlus","subscription","contractorStandardProductIdentifier","contractorPlusProductIdentifier","NATIONALITY_COUNTRY_CODES","isNationalityCountryCode","countryCode","shouldIncludeProduct","productIdentifier","excludeProducts","excluded","PRODUCT_IDENTIFIER_MAP","reviewStepAllowedEmploymentStatus","disabledInviteButtonEmploymentStatus","transformAiErrorResponse","isContractorOfRecord","REMOTE_AI_SERVICES_AND_DELIVERABLES_COR_ERROR_MESSAGE","REMOTE_AI_SERVICES_AND_DELIVERABLES_ERROR_MESSAGE","DEFAULT_VERSION","getBasicInformationSchemaVersion","options","buildInvoiceItems","values","items","i","description","amount","buildInvoiceSchedulePayload","payload"]}
1
+ {"version":3,"sources":["../src/flows/ContractorOnboarding/utils.ts"],"sourcesContent":["import { Step } from '@/src/flows/useStepState';\nimport {\n contractorStandardProductIdentifier,\n contractorPlusProductIdentifier,\n ProductType,\n PRODUCT_IDENTIFIER_MAP,\n REMOTE_AI_SERVICES_AND_DELIVERABLES_ERROR_MESSAGE,\n REMOTE_AI_SERVICES_AND_DELIVERABLES_COR_ERROR_MESSAGE,\n} from '@/src/flows/ContractorOnboarding/constants';\nimport { Employment } from '@/src/flows/Onboarding/types';\n\nexport type StepKeys =\n | 'select_country'\n | 'basic_information'\n | 'contract_origin'\n | 'invoice_schedule'\n | 'create_invoice_schedule'\n | 'contract_details'\n | 'eligibility_questionnaire'\n | 'contract_preview'\n | 'pricing_plan'\n | 'review';\n\ntype StepConfig = {\n includeSelectCountry?: boolean;\n includeContractOrigin?: boolean;\n includeInvoiceSchedule?: boolean;\n includeCreateInvoiceSchedule?: boolean;\n includeEligibilityQuestionnaire?: boolean;\n includeContractDetails?: boolean;\n includeContractPreview?: boolean;\n};\n\nexport function buildSteps(config: StepConfig = {}) {\n const stepDefinitions: Array<{\n name: StepKeys;\n label: string;\n visible: boolean;\n }> = [\n {\n name: 'select_country',\n label: 'Select Country',\n visible: Boolean(config?.includeSelectCountry),\n },\n {\n name: 'basic_information',\n label: 'Basic Information',\n visible: true,\n },\n {\n name: 'pricing_plan',\n label: 'Pricing Plan',\n visible: true,\n },\n {\n name: 'eligibility_questionnaire',\n label: 'Eligibility Questionnaire',\n visible: Boolean(config?.includeEligibilityQuestionnaire),\n },\n {\n name: 'contract_origin',\n label: 'Contract Options',\n visible: Boolean(config?.includeContractOrigin ?? true),\n },\n {\n name: 'contract_details',\n label: 'Contract Details',\n visible: Boolean(config?.includeContractDetails ?? true),\n },\n {\n name: 'contract_preview',\n label: 'Contract Preview',\n visible: Boolean(config?.includeContractPreview),\n },\n {\n name: 'invoice_schedule',\n label: 'Invoice schedule',\n visible: Boolean(config?.includeInvoiceSchedule),\n },\n {\n name: 'create_invoice_schedule',\n label: 'Create Invoice Schedule',\n visible: Boolean(config?.includeCreateInvoiceSchedule),\n },\n {\n name: 'review',\n label: 'Review',\n visible: true,\n },\n ];\n\n const stepsArray = stepDefinitions.map((step, index) => ({\n name: step.name,\n index,\n label: step.label,\n visible: step.visible,\n }));\n\n const steps = stepsArray.reduce(\n (acc, step) => {\n acc[step.name] = {\n index: step.index,\n name: step.name,\n visible: step.visible,\n };\n return acc;\n },\n {} as Record<string, Step<StepKeys>>,\n );\n\n return { steps, stepsArray };\n}\n\n/**\n * Calculates the description for the provisional start date field\n * based on whether the dates match between basic information and contract details steps\n */\nexport const calculateProvisionalStartDateDescription = (\n employmentProvisionalStartDate: string | undefined,\n fieldProvisionalStartDate: string | undefined,\n): string | undefined => {\n const datesNotMatching =\n employmentProvisionalStartDate &&\n fieldProvisionalStartDate &&\n employmentProvisionalStartDate !== fieldProvisionalStartDate;\n\n if (datesNotMatching) {\n const datesDontMatchWarning = `This date does not match the date you provided in the Basic Information step - ${\n employmentProvisionalStartDate\n } - and will override it only when both parties have signed the contract.`;\n return `When the contractor will start providing service to your company. ${datesDontMatchWarning}`;\n }\n return undefined;\n};\n\n/**\n * Checks if the selected pricing plan is CM (standard) or CM+ (plus)\n */\nexport const isCMOrCMPlus = (subscription: string | undefined): boolean => {\n return (\n subscription === contractorStandardProductIdentifier ||\n subscription === contractorPlusProductIdentifier\n );\n};\n\nconst NATIONALITY_COUNTRY_CODES = ['SAU', 'KWT', 'OMN', 'QAT', 'BHR'];\n\n/**\n * Checks if the country code is a country code that requires nationality status field\n */\nexport const isNationalityCountryCode = (countryCode: string) => {\n return NATIONALITY_COUNTRY_CODES.includes(countryCode);\n};\n\n/**\n * Checks if a product should be included based on the excludeProducts list\n * @param productIdentifier - The product identifier to check\n * @param excludeProducts - Array of products to exclude\n * @returns true if the product should be included, false otherwise\n */\nexport const shouldIncludeProduct = (\n productIdentifier: string,\n excludeProducts?: ProductType[],\n): boolean => {\n if (!excludeProducts || excludeProducts.length === 0) {\n return true;\n }\n\n return !excludeProducts.some(\n (excluded) => PRODUCT_IDENTIFIER_MAP[excluded] === productIdentifier,\n );\n};\n\n/**\n * Array of employment statuses that are allowed to proceed to the review step.\n * These statuses indicate that the employment is in a final state and the employment cannot be modified further.\n * @type {Employment['status'][]}\n * @constant\n */\nexport const reviewStepAllowedEmploymentStatus: Employment['status'][] = [\n 'initiated',\n 'invited',\n 'created_awaiting_reserve',\n 'created_reserve_paid',\n 'active',\n];\n\nexport const disabledInviteButtonEmploymentStatus: Employment['status'][] = [\n 'initiated',\n 'created_awaiting_reserve',\n 'invited',\n 'active',\n];\n\n/**\n * Transforms AI error messages to use default localized messages\n * @param isContractorOfRecord - Whether the contractor is a Contractor of Record\n * @param errors - Array of error messages from the API\n * @returns Array containing the appropriate default error message\n */\nexport function transformAiErrorResponse(\n isContractorOfRecord: boolean,\n): string {\n const remoteAiErrorMessage = isContractorOfRecord\n ? REMOTE_AI_SERVICES_AND_DELIVERABLES_COR_ERROR_MESSAGE\n : REMOTE_AI_SERVICES_AND_DELIVERABLES_ERROR_MESSAGE;\n return remoteAiErrorMessage;\n}\n\nconst DEFAULT_VERSION = 1;\n\n/**\n * Gets the basic information schema version from options\n * @param options - The flow options containing version configurations\n * @returns The jsonSchemaVersion for basic information or default (1)\n */\nexport const getBasicInformationSchemaVersion = (options?: {\n jsonSchemaVersion?: { employment_basic_information?: number | 'latest' };\n}): number | 'latest' => {\n return (\n options?.jsonSchemaVersion?.employment_basic_information || DEFAULT_VERSION\n );\n};\n\n// Invoice-schedule payload builders are shared with the standalone InvoiceSchedule flow and\n// live in src/common/invoice-schedules. Re-exported here so existing imports keep resolving.\nexport {\n buildInvoiceItems,\n buildInvoicePreviewPayload,\n buildInvoiceSchedulePayload,\n} from '@/src/common/invoice-schedules/utils';\n"],"mappings":"uGAiCO,SAASA,EAAWC,EAAqB,CAAC,EAAG,CA0DlD,IAAMC,EArDD,CACH,CACE,KAAM,iBACN,MAAO,iBACP,QAAS,EAAQD,GAAQ,oBAC3B,EACA,CACE,KAAM,oBACN,MAAO,oBACP,QAAS,EACX,EACA,CACE,KAAM,eACN,MAAO,eACP,QAAS,EACX,EACA,CACE,KAAM,4BACN,MAAO,4BACP,QAAS,EAAQA,GAAQ,+BAC3B,EACA,CACE,KAAM,kBACN,MAAO,mBACP,QAAS,GAAQA,GAAQ,uBAAyB,GACpD,EACA,CACE,KAAM,mBACN,MAAO,mBACP,QAAS,GAAQA,GAAQ,wBAA0B,GACrD,EACA,CACE,KAAM,mBACN,MAAO,mBACP,QAAS,EAAQA,GAAQ,sBAC3B,EACA,CACE,KAAM,mBACN,MAAO,mBACP,QAAS,EAAQA,GAAQ,sBAC3B,EACA,CACE,KAAM,0BACN,MAAO,0BACP,QAAS,EAAQA,GAAQ,4BAC3B,EACA,CACE,KAAM,SACN,MAAO,SACP,QAAS,EACX,CACF,EAEmC,IAAI,CAACE,EAAMC,KAAW,CACvD,KAAMD,EAAK,KACX,MAAAC,EACA,MAAOD,EAAK,MACZ,QAASA,EAAK,OAChB,EAAE,EAcF,MAAO,CAAE,MAZKD,EAAW,OACvB,CAACG,EAAKF,KACJE,EAAIF,EAAK,IAAI,EAAI,CACf,MAAOA,EAAK,MACZ,KAAMA,EAAK,KACX,QAASA,EAAK,OAChB,EACOE,GAET,CAAC,CACH,EAEgB,WAAAH,CAAW,CAC7B,CA9EgBI,EAAAN,EAAA,cAoFT,IAAMO,EAA2CD,EAAA,CACtDE,EACAC,IACuB,CAMvB,GAJED,GACAC,GACAD,IAAmCC,EAMnC,MAAO,qEAHuB,kFAC5BD,CACF,0EACiG,EAGrG,EAhBwD,4CAqB3CE,EAAeJ,EAACK,GAEzBA,IAAiBC,GACjBD,IAAiBE,EAHO,gBAOtBC,EAA4B,CAAC,MAAO,MAAO,MAAO,MAAO,KAAK,EAKvDC,EAA2BT,EAACU,GAChCF,EAA0B,SAASE,CAAW,EADf,4BAU3BC,EAAuBX,EAAA,CAClCY,EACAC,IAEI,CAACA,GAAmBA,EAAgB,SAAW,EAC1C,GAGF,CAACA,EAAgB,KACrBC,GAAaC,EAAuBD,CAAQ,IAAMF,CACrD,EAVkC,wBAmBvBI,EAA4D,CACvE,YACA,UACA,2BACA,uBACA,QACF,EAEaC,EAA+D,CAC1E,YACA,2BACA,UACA,QACF,EAQO,SAASC,EACdC,EACQ,CAIR,OAH6BA,EACzBC,EACAC,CAEN,CAPgBrB,EAAAkB,EAAA,4BAShB,IAAMI,EAAkB,EAOXC,EAAmCvB,EAACwB,GAI7CA,GAAS,mBAAmB,8BAAgCF,EAJhB","names":["buildSteps","config","stepsArray","step","index","acc","__name","calculateProvisionalStartDateDescription","employmentProvisionalStartDate","fieldProvisionalStartDate","isCMOrCMPlus","subscription","contractorStandardProductIdentifier","contractorPlusProductIdentifier","NATIONALITY_COUNTRY_CODES","isNationalityCountryCode","countryCode","shouldIncludeProduct","productIdentifier","excludeProducts","excluded","PRODUCT_IDENTIFIER_MAP","reviewStepAllowedEmploymentStatus","disabledInviteButtonEmploymentStatus","transformAiErrorResponse","isContractorOfRecord","REMOTE_AI_SERVICES_AND_DELIVERABLES_COR_ERROR_MESSAGE","REMOTE_AI_SERVICES_AND_DELIVERABLES_ERROR_MESSAGE","DEFAULT_VERSION","getBasicInformationSchemaVersion","options"]}
@@ -1,2 +1,2 @@
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
+ import{_ as i,ja as s}from"./chunk-QQV5REGG.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-TJZ5BJV3.js.map
@@ -0,0 +1,2 @@
1
+ import{a as C}from"./chunk-WRTUY6K3.js";import{b as v}from"./chunk-UWHJF45X.js";import{b as F,e as V}from"./chunk-LSUBNZ64.js";import{b as I}from"./chunk-AXZ4IDY7.js";import{a as g}from"./chunk-OKBPMWVB.js";import{b as y,h as m}from"./chunk-C4HFMTSB.js";import{a as h}from"./chunk-P37U34EQ.js";import{useCallback as s,useMemo as T,useState as E}from"react";var K=h(({employmentId:n,jsfModify:a,contractorSearch:P}={})=>{let[w,b]=E(void 0),[x,L]=E({}),r=!n,c=n??w,{data:i,isLoading:_,error:k}=v({search:P,options:{queryOptions:{enabled:r}}}),{data:O,isLoading:R}=g({employmentId:c,enabled:!!c}),u=O?.contractor_type==="cor",M=T(()=>(i?.contractors??[]).map(({id:e,fullName:t})=>({value:e,label:t})),[i]),$=T(()=>r?{...a,fields:{...a?.fields,employment_id:{...a?.fields?.employment_id??{},"x-jsf-presentation":{...a?.fields?.employment_id?.["x-jsf-presentation"]??{},Component:C}}}}:a,[a,r]),{data:o,isLoading:p}=F({enabled:!0,employmentId:c,jsfModify:$,includeOneTime:!0,isContractorOfRecord:u,includeContractorSelect:r,includeCustomDays:!0,contractors:M,fieldValues:x}),f=V(),{mutateAsyncOrThrow:S}=y(f),U=s(e=>{b(e||void 0)},[]),D=s(e=>{L(e)},[]),q=s(async e=>{if(!o)return null;let t=await m(e,o.fields,{isPartialValidation:!1});return o.handleValidation(t)??null},[o]),l=s(async e=>await m(e,o?.fields??[],{isPartialValidation:!1}),[o]),A=s(async e=>{let t=await l(e);return{employment_id:n??t.employment_id,...I(t)}},[n,l]),B=s(async e=>{let t=await l(e),d=n??t.employment_id;if(!d)throw new Error("No contractor selected. Pick a contractor or pass `employmentId` to the flow.");return S({employmentId:d,values:t})},[n,S,l]);return{fields:o?.fields??[],handleValidation:q,parseFormValues:A,onSubmit:B,onContractorChange:U,checkFieldUpdates:D,employmentId:c,rendersContractorSelect:r,isSubmitting:f.isPending,isLoading:(_||p)&&!o,isLoadingContractorDetails:R||p,isContractorOfRecord:u,contractors:{contractors:i?.contractors??[],totalCount:i?.totalCount??0,isTruncated:i?.isTruncated??!1},contractorsError:k,meta:{fields:o?.fields}}},"useInvoiceSchedule");export{K as a};
2
+ //# sourceMappingURL=chunk-TRDNTXE7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/InvoiceSchedule/hooks.tsx"],"sourcesContent":["import { useCallback, useMemo, useState } from 'react';\nimport {\n useCreateInvoiceSchedule,\n useGetCreateInvoiceScheduleSchema,\n} from '@/src/common/invoice-schedules/api';\nimport { buildInvoiceSchedulePayload } from '@/src/common/invoice-schedules/utils';\nimport { useEmploymentQuery } from '@/src/common/api/employment';\nimport { useContractors } from '@/src/flows/InvoiceSchedule/api';\nimport { ContractorSelectField } from '@/src/flows/InvoiceSchedule/components/ContractorSelectField';\nimport {\n InvoiceScheduleFormValues,\n InvoiceSchedulePayload,\n UseInvoiceScheduleOptions,\n} from '@/src/flows/InvoiceSchedule/types';\nimport { parseJSFToValidate } from '@/src/components/form/utils';\nimport { mutationToPromise } from '@/src/lib/mutations';\nimport { $TSFixMe } from '@/src/types/remoteFlows';\nimport {\n Fields,\n ValidationResult,\n} from '@remoteoss/remote-json-schema-form-kit';\n\n/**\n * Headless hook powering the standalone invoice-schedule screen.\n *\n * Mirrors the platform's single-screen \"Create invoice schedule\" modal: one form render, one\n * submission, for a contractor chosen in the form itself. Pass `employmentId` to target a\n * known contractor and drop the picker.\n */\nexport const useInvoiceSchedule = ({\n employmentId,\n jsfModify,\n contractorSearch,\n}: UseInvoiceScheduleOptions = {}) => {\n // Only what the picker chose. The effective contractor is derived below rather than\n // seeded from the prop, so an `employmentId` that arrives after the first render is\n // honoured instead of leaving the derived queries keyed to an empty initial value.\n const [pickedEmploymentId, setPickedEmploymentId] = useState<\n string | undefined\n >(undefined);\n\n // The schema's conditionals depend on what has been filled in so far, so the current\n // values have to reach `createHeadlessForm`. `checkFieldUpdates` is wired to the form's\n // watch subscription by `useJSONSchemaForm`.\n const [fieldValues, setFieldValues] = useState<Record<string, unknown>>({});\n\n const rendersContractorSelect = !employmentId;\n const selectedEmploymentId = employmentId ?? pickedEmploymentId;\n\n const {\n data: contractorsResult,\n isLoading: isLoadingContractors,\n error: contractorsError,\n } = useContractors({\n search: contractorSearch,\n options: { queryOptions: { enabled: rendersContractorSelect } },\n });\n\n // `contractor_type` is not on the employments list payload, so the individual employment is\n // fetched once a contractor is known, purely to tell Contractor of Record apart.\n const { data: employment, isLoading: isLoadingEmployment } =\n useEmploymentQuery({\n employmentId: selectedEmploymentId as string,\n enabled: Boolean(selectedEmploymentId),\n });\n\n const isContractorOfRecord =\n (employment as $TSFixMe)?.contractor_type === 'cor';\n\n const contractors = useMemo(\n () =>\n (contractorsResult?.contractors ?? []).map(({ id, fullName }) => ({\n value: id,\n label: fullName,\n })),\n [contractorsResult],\n );\n\n // Render the contractor field as a searchable type-ahead rather than the plain select the\n // `select` inputType gives, so the picker queries by name instead of needing every\n // contractor loaded up front. Consumers can still replace it via their own `jsfModify`.\n const jsfModifyWithContractorSelect = useMemo(() => {\n if (!rendersContractorSelect) return jsfModify;\n\n return {\n ...jsfModify,\n fields: {\n ...(jsfModify as $TSFixMe)?.fields,\n employment_id: {\n ...((jsfModify as $TSFixMe)?.fields?.employment_id ?? {}),\n 'x-jsf-presentation': {\n ...((jsfModify as $TSFixMe)?.fields?.employment_id?.[\n 'x-jsf-presentation'\n ] ?? {}),\n Component: ContractorSelectField,\n },\n },\n },\n } as typeof jsfModify;\n }, [jsfModify, rendersContractorSelect]);\n\n const { data: schemaForm, isLoading: isLoadingCurrencies } =\n useGetCreateInvoiceScheduleSchema({\n enabled: true,\n employmentId: selectedEmploymentId,\n jsfModify: jsfModifyWithContractorSelect,\n includeOneTime: true,\n isContractorOfRecord,\n includeContractorSelect: rendersContractorSelect,\n includeCustomDays: true,\n contractors,\n fieldValues,\n });\n\n const createInvoiceScheduleMutation = useCreateInvoiceSchedule();\n const { mutateAsyncOrThrow } = mutationToPromise(\n createInvoiceScheduleMutation,\n );\n\n /**\n * Keeps the derived queries in step with the picker. Call from the consumer's change handler\n * when driving the form yourself; `InvoiceScheduleForm` wires this up for you.\n */\n const onContractorChange = useCallback((nextEmploymentId?: string) => {\n setPickedEmploymentId(nextEmploymentId || undefined);\n }, []);\n\n /**\n * Feed the latest form values back in so the schema's conditionals re-evaluate.\n * `InvoiceScheduleForm` wires this to the form's watch subscription.\n */\n const checkFieldUpdates = useCallback((values: InvoiceScheduleFormValues) => {\n setFieldValues(values);\n }, []);\n\n // Annotated rather than inferred: the generated result's inferred type reaches into\n // json-schema-form internals that cannot be named from here (TS4023).\n const handleValidation = useCallback(\n async (\n values: InvoiceScheduleFormValues,\n ): Promise<ValidationResult | null> => {\n if (!schemaForm) return null;\n\n // Values must be parsed first — money inputs hold strings, and the item amounts are\n // declared `integer`, which JSF v1 enforces. Validating raw values fails on every\n // amount and blocks submission.\n const parsed = await parseJSFToValidate(values, schemaForm.fields, {\n isPartialValidation: false,\n });\n\n return (schemaForm.handleValidation(parsed) as ValidationResult) ?? null;\n },\n [schemaForm],\n );\n\n // Coerces the raw form values into the shapes the API expects — most importantly money\n // inputs into integer cents, which `buildInvoiceItems` requires to pick a slot up.\n const parseValues = useCallback(\n async (values: InvoiceScheduleFormValues) =>\n (await parseJSFToValidate(values, schemaForm?.fields ?? [], {\n isPartialValidation: false,\n })) as InvoiceScheduleFormValues,\n [schemaForm],\n );\n\n const parseFormValues = useCallback(\n async (values: InvoiceScheduleFormValues) => {\n const parsed = await parseValues(values);\n const targetEmploymentId = employmentId ?? parsed.employment_id;\n\n return {\n employment_id: targetEmploymentId,\n ...buildInvoiceSchedulePayload(parsed),\n } as InvoiceSchedulePayload;\n },\n [employmentId, parseValues],\n );\n\n const onSubmit = useCallback(\n async (values: InvoiceScheduleFormValues) => {\n const parsed = await parseValues(values);\n const targetEmploymentId = employmentId ?? parsed.employment_id;\n\n if (!targetEmploymentId) {\n throw new Error(\n 'No contractor selected. Pick a contractor or pass `employmentId` to the flow.',\n );\n }\n\n return mutateAsyncOrThrow({\n employmentId: targetEmploymentId,\n values: parsed,\n });\n },\n [employmentId, mutateAsyncOrThrow, parseValues],\n );\n\n return {\n /**\n * Form fields generated from the invoice-schedule schema, including the contractor picker\n * when the flow owns it.\n */\n fields: (schemaForm?.fields ?? []) as Fields,\n /**\n * Validation handler for the generated form.\n */\n handleValidation,\n /**\n * Turns form values into the API payload without submitting.\n */\n parseFormValues,\n /**\n * Creates the invoice schedule.\n */\n onSubmit,\n /**\n * Notify the flow that the chosen contractor changed.\n */\n onContractorChange,\n /**\n * Feed the latest form values back in so conditional fields re-evaluate.\n */\n checkFieldUpdates,\n /**\n * The contractor the schedule will be created for, if known.\n */\n employmentId: selectedEmploymentId,\n /**\n * Whether this flow renders its own contractor picker.\n */\n rendersContractorSelect,\n /**\n * True while the schedule is being created.\n */\n isSubmitting: createInvoiceScheduleMutation.isPending,\n /**\n * True only for the initial load, before there is a form to show. Consumers gate their\n * first render on this, so it deliberately excludes the per-contractor fetches below —\n * otherwise choosing a contractor would unmount the form mid-flow.\n */\n isLoading: (isLoadingContractors || isLoadingCurrencies) && !schemaForm,\n /**\n * True while the chosen contractor's employment and currencies load. The form stays\n * mounted; use this to disable submission or show an inline indicator.\n */\n isLoadingContractorDetails: isLoadingEmployment || isLoadingCurrencies,\n /**\n * Whether the selected contractor is a Contractor of Record, which the platform restricts\n * to one-off invoicing.\n */\n isContractorOfRecord,\n /**\n * Contractor picker state. `isTruncated` is true when the company has more contractors than\n * the flow could load, so the picker is showing a subset.\n */\n contractors: {\n contractors: contractorsResult?.contractors ?? [],\n totalCount: contractorsResult?.totalCount ?? 0,\n isTruncated: contractorsResult?.isTruncated ?? false,\n },\n /**\n * Error raised while loading contractors, if any.\n */\n contractorsError,\n /**\n * Field metadata, for building error messages.\n */\n meta: {\n fields: schemaForm?.fields,\n },\n };\n};\n"],"mappings":"sSAAA,OAAS,eAAAA,EAAa,WAAAC,EAAS,YAAAC,MAAgB,QA6BxC,IAAMC,EAAqBC,EAAA,CAAC,CACjC,aAAAC,EACA,UAAAC,EACA,iBAAAC,CACF,EAA+B,CAAC,IAAM,CAIpC,GAAM,CAACC,EAAoBC,CAAqB,EAAIC,EAElD,MAAS,EAKL,CAACC,EAAaC,CAAc,EAAIF,EAAkC,CAAC,CAAC,EAEpEG,EAA0B,CAACR,EAC3BS,EAAuBT,GAAgBG,EAEvC,CACJ,KAAMO,EACN,UAAWC,EACX,MAAOC,CACT,EAAIC,EAAe,CACjB,OAAQX,EACR,QAAS,CAAE,aAAc,CAAE,QAASM,CAAwB,CAAE,CAChE,CAAC,EAIK,CAAE,KAAMM,EAAY,UAAWC,CAAoB,EACvDC,EAAmB,CACjB,aAAcP,EACd,QAAS,EAAQA,CACnB,CAAC,EAEGQ,EACHH,GAAyB,kBAAoB,MAE1CI,EAAcC,EAClB,KACGT,GAAmB,aAAe,CAAC,GAAG,IAAI,CAAC,CAAE,GAAAU,EAAI,SAAAC,CAAS,KAAO,CAChE,MAAOD,EACP,MAAOC,CACT,EAAE,EACJ,CAACX,CAAiB,CACpB,EAKMY,EAAgCH,EAAQ,IACvCX,EAEE,CACL,GAAGP,EACH,OAAQ,CACN,GAAIA,GAAwB,OAC5B,cAAe,CACb,GAAKA,GAAwB,QAAQ,eAAiB,CAAC,EACvD,qBAAsB,CACpB,GAAKA,GAAwB,QAAQ,gBACnC,oBACF,GAAK,CAAC,EACN,UAAWsB,CACb,CACF,CACF,CACF,EAhBqCtB,EAiBpC,CAACA,EAAWO,CAAuB,CAAC,EAEjC,CAAE,KAAMgB,EAAY,UAAWC,CAAoB,EACvDC,EAAkC,CAChC,QAAS,GACT,aAAcjB,EACd,UAAWa,EACX,eAAgB,GAChB,qBAAAL,EACA,wBAAyBT,EACzB,kBAAmB,GACnB,YAAAU,EACA,YAAAZ,CACF,CAAC,EAEGqB,EAAgCC,EAAyB,EACzD,CAAE,mBAAAC,CAAmB,EAAIC,EAC7BH,CACF,EAMMI,EAAqBC,EAAaC,GAA8B,CACpE7B,EAAsB6B,GAAoB,MAAS,CACrD,EAAG,CAAC,CAAC,EAMCC,EAAoBF,EAAaG,GAAsC,CAC3E5B,EAAe4B,CAAM,CACvB,EAAG,CAAC,CAAC,EAICC,EAAmBJ,EACvB,MACEG,GACqC,CACrC,GAAI,CAACX,EAAY,OAAO,KAKxB,IAAMa,EAAS,MAAMC,EAAmBH,EAAQX,EAAW,OAAQ,CACjE,oBAAqB,EACvB,CAAC,EAED,OAAQA,EAAW,iBAAiBa,CAAM,GAA0B,IACtE,EACA,CAACb,CAAU,CACb,EAIMe,EAAcP,EAClB,MAAOG,GACJ,MAAMG,EAAmBH,EAAQX,GAAY,QAAU,CAAC,EAAG,CAC1D,oBAAqB,EACvB,CAAC,EACH,CAACA,CAAU,CACb,EAEMgB,EAAkBR,EACtB,MAAOG,GAAsC,CAC3C,IAAME,EAAS,MAAME,EAAYJ,CAAM,EAGvC,MAAO,CACL,cAHyBnC,GAAgBqC,EAAO,cAIhD,GAAGI,EAA4BJ,CAAM,CACvC,CACF,EACA,CAACrC,EAAcuC,CAAW,CAC5B,EAEMG,EAAWV,EACf,MAAOG,GAAsC,CAC3C,IAAME,EAAS,MAAME,EAAYJ,CAAM,EACjCQ,EAAqB3C,GAAgBqC,EAAO,cAElD,GAAI,CAACM,EACH,MAAM,IAAI,MACR,+EACF,EAGF,OAAOd,EAAmB,CACxB,aAAcc,EACd,OAAQN,CACV,CAAC,CACH,EACA,CAACrC,EAAc6B,EAAoBU,CAAW,CAChD,EAEA,MAAO,CAKL,OAASf,GAAY,QAAU,CAAC,EAIhC,iBAAAY,EAIA,gBAAAI,EAIA,SAAAE,EAIA,mBAAAX,EAIA,kBAAAG,EAIA,aAAczB,EAId,wBAAAD,EAIA,aAAcmB,EAA8B,UAM5C,WAAYhB,GAAwBc,IAAwB,CAACD,EAK7D,2BAA4BT,GAAuBU,EAKnD,qBAAAR,EAKA,YAAa,CACX,YAAaP,GAAmB,aAAe,CAAC,EAChD,WAAYA,GAAmB,YAAc,EAC7C,YAAaA,GAAmB,aAAe,EACjD,EAIA,iBAAAE,EAIA,KAAM,CACJ,OAAQY,GAAY,MACtB,CACF,CACF,EAlPkC","names":["useCallback","useMemo","useState","useInvoiceSchedule","__name","employmentId","jsfModify","contractorSearch","pickedEmploymentId","setPickedEmploymentId","useState","fieldValues","setFieldValues","rendersContractorSelect","selectedEmploymentId","contractorsResult","isLoadingContractors","contractorsError","useContractors","employment","isLoadingEmployment","useEmploymentQuery","isContractorOfRecord","contractors","useMemo","id","fullName","jsfModifyWithContractorSelect","ContractorSelectField","schemaForm","isLoadingCurrencies","useGetCreateInvoiceScheduleSchema","createInvoiceScheduleMutation","useCreateInvoiceSchedule","mutateAsyncOrThrow","mutationToPromise","onContractorChange","useCallback","nextEmploymentId","checkFieldUpdates","values","handleValidation","parsed","parseJSFToValidate","parseValues","parseFormValues","buildInvoiceSchedulePayload","onSubmit","targetEmploymentId"]}
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-WYIU74JN.js";import{b as e}from"./chunk-Q3ALCPJN.js";import{x as a}from"./chunk-C4HFMTSB.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as g}from"react/jsx-runtime";function E({components:m,onSubmit:p,onSuccess:l,onError:c}){let{contractorOnboardingBag:r}=e(),d=i(async(t,P)=>{try{let n=await r.parseFormValues(t);await p?.(n);let o=await r.onSubmit(t);if(o?.data){await l?.(o?.data),r?.next();return}}catch(n){let o=a(n,r.meta?.fields?.pricing_plan,P);c?.(o)}},"handleSubmit"),u=r.stepState.values?.pricing_plan||r.initialValues.pricing_plan;return g(s,{components:m,defaultValues:u,onSubmit:d})}i(E,"PricingPlanStep");export{E as a};
2
- //# sourceMappingURL=chunk-WHDUZGVW.js.map
1
+ import{a as s}from"./chunk-H47XUL2L.js";import{b as e}from"./chunk-Q3ALCPJN.js";import{x as a}from"./chunk-C4HFMTSB.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as g}from"react/jsx-runtime";function E({components:m,onSubmit:p,onSuccess:l,onError:c}){let{contractorOnboardingBag:r}=e(),d=i(async(t,P)=>{try{let n=await r.parseFormValues(t);await p?.(n);let o=await r.onSubmit(t);if(o?.data){await l?.(o?.data),r?.next();return}}catch(n){let o=a(n,r.meta?.fields?.pricing_plan,P);c?.(o)}},"handleSubmit"),u=r.stepState.values?.pricing_plan||r.initialValues.pricing_plan;return g(s,{components:m,defaultValues:u,onSubmit:d})}i(E,"PricingPlanStep");export{E as a};
2
+ //# sourceMappingURL=chunk-TX6RWQUR.js.map
@@ -0,0 +1,2 @@
1
+ import{a as r,b as o,c as le}from"./chunk-P37U34EQ.js";var j=o((ir,R)=>{"use strict";function me(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}r(me,"isObject");R.exports=me});var N=o((ar,L)=>{"use strict";var ge=typeof global=="object"&&global&&global.Object===Object&&global;L.exports=ge});var S=o((ur,P)=>{"use strict";var pe=N(),Te=typeof self=="object"&&self&&self.Object===Object&&self,ye=pe||Te||Function("return this")();P.exports=ye});var C=o((fr,W)=>{"use strict";var ve=S(),xe=r(function(){return ve.Date.now()},"now");W.exports=xe});var A=o((sr,w)=>{"use strict";var je=/\s/;function Se(e){for(var t=e.length;t--&&je.test(e.charAt(t)););return t}r(Se,"trimmedEndIndex");w.exports=Se});var G=o((br,F)=>{"use strict";var Oe=A(),qe=/^\s+/;function he(e){return e&&e.slice(0,Oe(e)+1).replace(qe,"")}r(he,"baseTrim");F.exports=he});var O=o((mr,M)=>{"use strict";var Ie=S(),Ee=Ie.Symbol;M.exports=Ee});var U=o((gr,D)=>{"use strict";var B=O(),$=Object.prototype,ke=$.hasOwnProperty,Re=$.toString,p=B?B.toStringTag:void 0;function Le(e){var t=ke.call(e,p),i=e[p];try{e[p]=void 0;var u=!0}catch{}var f=Re.call(e);return u&&(t?e[p]=i:delete e[p]),f}r(Le,"getRawTag");D.exports=Le});var H=o((Tr,_)=>{"use strict";var Ne=Object.prototype,Pe=Ne.toString;function We(e){return Pe.call(e)}r(We,"objectToString");_.exports=We});var K=o((vr,J)=>{"use strict";var X=O(),Ce=U(),we=H(),Ae="[object Null]",Fe="[object Undefined]",z=X?X.toStringTag:void 0;function Ge(e){return e==null?e===void 0?Fe:Ae:z&&z in Object(e)?Ce(e):we(e)}r(Ge,"baseGetTag");J.exports=Ge});var V=o((jr,Q)=>{"use strict";function Me(e){return e!=null&&typeof e=="object"}r(Me,"isObjectLike");Q.exports=Me});var Z=o((Or,Y)=>{"use strict";var Be=K(),$e=V(),De="[object Symbol]";function Ue(e){return typeof e=="symbol"||$e(e)&&Be(e)==De}r(Ue,"isSymbol");Y.exports=Ue});var ne=o((hr,te)=>{"use strict";var _e=G(),ee=j(),He=Z(),re=NaN,Xe=/^[-+]0x[0-9a-f]+$/i,ze=/^0b[01]+$/i,Je=/^0o[0-7]+$/i,Ke=parseInt;function Qe(e){if(typeof e=="number")return e;if(He(e))return re;if(ee(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ee(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=_e(e);var i=ze.test(e);return i||Je.test(e)?Ke(e.slice(2),i?2:8):Xe.test(e)?re:+e}r(Qe,"toNumber");te.exports=Qe});var ae=o((Er,oe)=>{"use strict";var Ve=j(),q=C(),ie=ne(),Ye="Expected a function",Ze=Math.max,er=Math.min;function rr(e,t,i){var u,f,b,d,a,s,l=0,h=!1,m=!1,y=!0;if(typeof e!="function")throw new TypeError(Ye);t=ie(t)||0,Ve(i)&&(h=!!i.leading,m="maxWait"in i,b=m?Ze(ie(i.maxWait)||0,t):b,y="trailing"in i?!!i.trailing:y);function v(n){var c=u,g=f;return u=f=void 0,l=n,d=e.apply(g,c),d}r(v,"invokeFunc");function ce(n){return l=n,a=setTimeout(T,t),h?v(n):d}r(ce,"leadingEdge");function se(n){var c=n-s,g=n-l,k=t-c;return m?er(k,b-g):k}r(se,"remainingWait");function I(n){var c=n-s,g=n-l;return s===void 0||c>=t||c<0||m&&g>=b}r(I,"shouldInvoke");function T(){var n=q();if(I(n))return E(n);a=setTimeout(T,se(n))}r(T,"timerExpired");function E(n){return a=void 0,y&&u?v(n):(u=f=void 0,d)}r(E,"trailingEdge");function de(){a!==void 0&&clearTimeout(a),l=0,u=s=f=a=void 0}r(de,"cancel");function be(){return a===void 0?d:E(q())}r(be,"flush");function x(){var n=q(),c=I(n);if(u=arguments,f=this,s=n,c){if(a===void 0)return ce(s);if(m)return clearTimeout(a),a=setTimeout(T,t),v(s)}return a===void 0&&(a=setTimeout(T,t)),d}return r(x,"debounced"),x.cancel=de,x.flush=be,x}r(rr,"debounce");oe.exports=rr});var fe=le(ae(),1);import{useCallback as tr,useEffect as nr,useRef as ue}from"react";function Lr(e,t){let i=ue(e);nr(()=>{i.current=e},[e]);let u=ue((0,fe.default)(f=>{i.current(f)},t)).current;return tr(f=>{u(f)},[u])}r(Lr,"useDebounce");export{Lr as a};
2
+ //# sourceMappingURL=chunk-U4H7URYB.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../node_modules/lodash/isObject.js","../node_modules/lodash/_freeGlobal.js","../node_modules/lodash/_root.js","../node_modules/lodash/now.js","../node_modules/lodash/_trimmedEndIndex.js","../node_modules/lodash/_baseTrim.js","../node_modules/lodash/_Symbol.js","../node_modules/lodash/_getRawTag.js","../node_modules/lodash/_objectToString.js","../node_modules/lodash/_baseGetTag.js","../node_modules/lodash/isObjectLike.js","../node_modules/lodash/isSymbol.js","../node_modules/lodash/toNumber.js","../node_modules/lodash/debounce.js","../src/common/hooks.ts"],"sourcesContent":["/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\n","import { useCallback, useEffect, useRef } from 'react';\nimport debounce from 'lodash/debounce';\n\nexport function useDebounce(\n callback: (value: string) => Promise<void>,\n delay: number,\n) {\n const callbackRef = useRef(callback);\n\n useEffect(() => {\n callbackRef.current = callback;\n }, [callback]);\n\n const debouncedFn = useRef(\n // WE NEED TO FIX: react-hooks/refs - Passing a ref to a function may read its value during render\n // oxlint-disable-next-line react-hooks/refs\n debounce((value: string) => {\n callbackRef.current(value);\n }, delay),\n ).current;\n\n return useCallback(\n (value: string) => {\n debouncedFn(value);\n },\n [debouncedFn],\n );\n}\n"],"mappings":"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","names":["require_isObject","__commonJSMin","exports","module","isObject","value","type","__name","require_freeGlobal","__commonJSMin","exports","module","freeGlobal","require_root","__commonJSMin","exports","module","freeGlobal","freeSelf","root","require_now","__commonJSMin","exports","module","root","now","__name","require_trimmedEndIndex","__commonJSMin","exports","module","reWhitespace","trimmedEndIndex","string","index","__name","require_baseTrim","__commonJSMin","exports","module","trimmedEndIndex","reTrimStart","baseTrim","string","__name","require_Symbol","__commonJSMin","exports","module","root","Symbol","require_getRawTag","__commonJSMin","exports","module","Symbol","objectProto","hasOwnProperty","nativeObjectToString","symToStringTag","getRawTag","value","isOwn","tag","unmasked","result","__name","require_objectToString","__commonJSMin","exports","module","objectProto","nativeObjectToString","objectToString","value","__name","require_baseGetTag","__commonJSMin","exports","module","Symbol","getRawTag","objectToString","nullTag","undefinedTag","symToStringTag","baseGetTag","value","__name","require_isObjectLike","__commonJSMin","exports","module","isObjectLike","value","__name","require_isSymbol","__commonJSMin","exports","module","baseGetTag","isObjectLike","symbolTag","isSymbol","value","__name","require_toNumber","__commonJSMin","exports","module","baseTrim","isObject","isSymbol","NAN","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","toNumber","value","other","isBinary","__name","require_debounce","__commonJSMin","exports","module","isObject","now","toNumber","FUNC_ERROR_TEXT","nativeMax","nativeMin","debounce","func","wait","options","lastArgs","lastThis","maxWait","result","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","invokeFunc","time","args","thisArg","__name","leadingEdge","timerExpired","remainingWait","timeSinceLastCall","timeSinceLastInvoke","timeWaiting","shouldInvoke","trailingEdge","cancel","flush","debounced","isInvoking","import_debounce","useCallback","useEffect","useRef","useDebounce","callback","delay","callbackRef","useRef","useEffect","debouncedFn","debounce","value","useCallback","__name"]}
@@ -1,2 +1,2 @@
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
+ import{g as p}from"./chunk-RYZ7TJVS.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-UGQNOBQH.js.map
@@ -0,0 +1,2 @@
1
+ import{i as m}from"./chunk-QQV5REGG.js";import{e as c}from"./chunk-H2O4CVKF.js";import{a as n}from"./chunk-P37U34EQ.js";import{useQuery as u,queryOptions as p}from"@tanstack/react-query";var y=10,d=100,C=n(t=>({id:t.id,fullName:t.full_name}),"toContractor"),g=n((t,e)=>p({queryKey:["invoice-schedule-contractors",e??null],queryFn:n(async()=>{let o=[],r=1,i=1,a=0;for(;r<=Math.min(i,y);){let s=await m({client:t,headers:{Authorization:""},query:{employment_type:"contractor",status:"active",...e?{name:e}:{},page:r,page_size:d}});if(s.error||!s.data)throw new Error("Failed to fetch contractors");let l=s.data.data;o.push(...l?.employments??[]),i=l?.total_pages??1,a=l?.total_count??o.length,r+=1}return{contractors:o.map(C),totalCount:a,isTruncated:o.length<a}},"queryFn")}),"contractorsOptions"),b=n(({search:t,options:e}={})=>{let{client:o}=c();return u({...g(o,t),enabled:e?.queryOptions?.enabled??!0})},"useContractors");export{g as a,b};
2
+ //# sourceMappingURL=chunk-UWHJF45X.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/InvoiceSchedule/api.ts"],"sourcesContent":["import { useQuery, queryOptions } from '@tanstack/react-query';\nimport { getV1Employments, MinimalEmployment } from '@/src/client';\nimport { Client } from '@/src/client/client';\nimport { useClient } from '@/src/context';\n\n/**\n * Pages to walk when loading contractors for the picker. `GET /v1/employments` is paginated,\n * so the picker loads pages up front to populate a plain select.\n *\n * Pass a `search` term to have the API filter by name instead — matched per word, ignoring\n * case and accents — which keeps the response small enough that the walk rarely runs past\n * the first page.\n */\nconst MAX_PAGES = 10;\nconst PAGE_SIZE = 100;\n\nexport type Contractor = {\n id: string;\n fullName: string;\n};\n\nexport type ContractorsResult = {\n contractors: Contractor[];\n /**\n * Total contractors the API reports. Larger than `contractors.length` when the walk hit\n * `MAX_PAGES`, in which case the picker is showing a subset.\n */\n totalCount: number;\n /**\n * True when the walk stopped early, so the list is incomplete.\n */\n isTruncated: boolean;\n};\n\nconst toContractor = (employment: MinimalEmployment): Contractor => ({\n id: employment.id,\n fullName: employment.full_name,\n});\n\n/**\n * Query options factory for the active contractors of the authenticated company.\n */\nexport const contractorsOptions = (client: Client, search?: string) =>\n queryOptions({\n queryKey: ['invoice-schedule-contractors', search ?? null] as const,\n queryFn: async (): Promise<ContractorsResult> => {\n const collected: MinimalEmployment[] = [];\n let page = 1;\n let totalPages = 1;\n let totalCount = 0;\n\n while (page <= Math.min(totalPages, MAX_PAGES)) {\n const response = await getV1Employments({\n client,\n // The client supplies the real credentials; the generated type only requires the key.\n headers: { Authorization: `` },\n query: {\n employment_type: 'contractor',\n status: 'active',\n // `name` is not in the generated client's query type yet — it arrives with the\n // next `npm run openapi-ts` once the API change adding it is deployed. Spread\n // rather than an inline key so this type-checks against the current client; the\n // parameter is forwarded either way, and ignored by the API until then.\n ...(search ? { name: search } : {}),\n page,\n page_size: PAGE_SIZE,\n },\n });\n\n if (response.error || !response.data) {\n throw new Error('Failed to fetch contractors');\n }\n\n const data = response.data.data;\n collected.push(...(data?.employments ?? []));\n totalPages = data?.total_pages ?? 1;\n totalCount = data?.total_count ?? collected.length;\n page += 1;\n }\n\n return {\n contractors: collected.map(toContractor),\n totalCount,\n isTruncated: collected.length < totalCount,\n };\n },\n });\n\n/**\n * Active contractors for the invoice-schedule contractor picker.\n */\nexport const useContractors = ({\n search,\n options,\n}: {\n /**\n * Filter contractors by name, server-side. Omit to load the company's active contractors.\n */\n search?: string;\n options?: { queryOptions?: { enabled?: boolean } };\n} = {}) => {\n const { client } = useClient();\n return useQuery({\n ...contractorsOptions(client as Client, search),\n enabled: options?.queryOptions?.enabled ?? true,\n });\n};\n"],"mappings":"wHAAA,OAAS,YAAAA,EAAU,gBAAAC,MAAoB,wBAavC,IAAMC,EAAY,GACZC,EAAY,IAoBZC,EAAeC,EAACC,IAA+C,CACnE,GAAIA,EAAW,GACf,SAAUA,EAAW,SACvB,GAHqB,gBAQRC,EAAqBF,EAAA,CAACG,EAAgBC,IACjDC,EAAa,CACX,SAAU,CAAC,+BAAgCD,GAAU,IAAI,EACzD,QAASJ,EAAA,SAAwC,CAC/C,IAAMM,EAAiC,CAAC,EACpCC,EAAO,EACPC,EAAa,EACbC,EAAa,EAEjB,KAAOF,GAAQ,KAAK,IAAIC,EAAYX,CAAS,GAAG,CAC9C,IAAMa,EAAW,MAAMC,EAAiB,CACtC,OAAAR,EAEA,QAAS,CAAE,cAAe,EAAG,EAC7B,MAAO,CACL,gBAAiB,aACjB,OAAQ,SAKR,GAAIC,EAAS,CAAE,KAAMA,CAAO,EAAI,CAAC,EACjC,KAAAG,EACA,UAAWT,CACb,CACF,CAAC,EAED,GAAIY,EAAS,OAAS,CAACA,EAAS,KAC9B,MAAM,IAAI,MAAM,6BAA6B,EAG/C,IAAME,EAAOF,EAAS,KAAK,KAC3BJ,EAAU,KAAK,GAAIM,GAAM,aAAe,CAAC,CAAE,EAC3CJ,EAAaI,GAAM,aAAe,EAClCH,EAAaG,GAAM,aAAeN,EAAU,OAC5CC,GAAQ,CACV,CAEA,MAAO,CACL,YAAaD,EAAU,IAAIP,CAAY,EACvC,WAAAU,EACA,YAAaH,EAAU,OAASG,CAClC,CACF,EAxCS,UAyCX,CAAC,EA5C+B,sBAiDrBI,EAAiBb,EAAA,CAAC,CAC7B,OAAAI,EACA,QAAAU,CACF,EAMI,CAAC,IAAM,CACT,GAAM,CAAE,OAAAX,CAAO,EAAIY,EAAU,EAC7B,OAAOC,EAAS,CACd,GAAGd,EAAmBC,EAAkBC,CAAM,EAC9C,QAASU,GAAS,cAAc,SAAW,EAC7C,CAAC,CACH,EAf8B","names":["useQuery","queryOptions","MAX_PAGES","PAGE_SIZE","toContractor","__name","employment","contractorsOptions","client","search","queryOptions","collected","page","totalPages","totalCount","response","getV1Employments","data","useContractors","options","useClient","useQuery"]}
@@ -1,2 +1,2 @@
1
- var e={type:"object",properties:{contract_origin:{description:"",oneOf:[{const:"provided_by_remote",description:"Create a new terms and conditions and statement of work. This should only be used if you do not have an agreement in place with a contractor or want to renegotiate an agreement.",title:"Contractor services agreement"},{const:"provided_by_customer",description:"Use your own agreement outside Remote.",title:"Without an agreement"}],title:"Contract options",type:"string","x-jsf-presentation":{direction:"column",inputType:"radio"}}},required:["contract_origin"]};export{e as a};
2
- //# sourceMappingURL=chunk-BFXBFGBH.js.map
1
+ var e={type:"object",properties:{contract_origin:{description:"",oneOf:[{const:"provided_by_remote",description:"Create a new terms and conditions and statement of work. This should only be used if you do not have an agreement in place with a contractor or want to renegotiate an agreement.",title:"Contractor services agreement"},{const:"provided_by_customer",description:"Use your own agreement outside Remote.",title:"Without an agreement"}],title:"Contract options",type:"string","x-jsf-presentation":{direction:"column",inputType:"radio"}}},required:["contract_origin"],"x-rmt-meta":{jsfVersion:"1"}};export{e as a};
2
+ //# sourceMappingURL=chunk-UYOKK4QW.js.map