@remoteoss/remote-flows 0.4.0-alpha.1 → 0.4.0-alpha.11

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 (374) hide show
  1. package/README.md +63 -1
  2. package/dist/chunk-32RYPLZK.js +2 -0
  3. package/dist/chunk-32RYPLZK.js.map +1 -0
  4. package/dist/chunk-3HPG2L62.js +2 -0
  5. package/dist/chunk-3HPG2L62.js.map +1 -0
  6. package/dist/chunk-3NZ6PO4D.js +2 -0
  7. package/dist/chunk-3NZ6PO4D.js.map +1 -0
  8. package/dist/chunk-3QTURBOX.js +2 -0
  9. package/dist/chunk-3QTURBOX.js.map +1 -0
  10. package/dist/{chunk-WRDKLT4N.js → chunk-3ZWDIEEM.js} +2 -2
  11. package/dist/chunk-4BOE6EEO.js +2 -0
  12. package/dist/chunk-4BOE6EEO.js.map +1 -0
  13. package/dist/{chunk-UECSVYQ5.js → chunk-5SMMQQXP.js} +2 -2
  14. package/dist/chunk-5SMMQQXP.js.map +1 -0
  15. package/dist/chunk-7JHIPWS7.js +2 -0
  16. package/dist/chunk-7JHIPWS7.js.map +1 -0
  17. package/dist/chunk-BF7QENCN.js +2 -0
  18. package/dist/chunk-BF7QENCN.js.map +1 -0
  19. package/dist/chunk-C3HJSV4T.js +2 -0
  20. package/dist/chunk-C3HJSV4T.js.map +1 -0
  21. package/dist/{chunk-A4RX3KRZ.js → chunk-CFIJKJXD.js} +2 -2
  22. package/dist/chunk-CSU6IQX3.js +2 -0
  23. package/dist/chunk-CSU6IQX3.js.map +1 -0
  24. package/dist/chunk-CTTXXEWI.js +2 -0
  25. package/dist/chunk-CTTXXEWI.js.map +1 -0
  26. package/dist/chunk-DKIWM2PT.js +2 -0
  27. package/dist/chunk-DKIWM2PT.js.map +1 -0
  28. package/dist/chunk-DR7VGNO2.js +2 -0
  29. package/dist/chunk-EEAMZPP6.js +2 -0
  30. package/dist/{chunk-GMGKIQLI.js.map → chunk-EEAMZPP6.js.map} +1 -1
  31. package/dist/chunk-EV5YPN4F.js +2 -0
  32. package/dist/chunk-EV5YPN4F.js.map +1 -0
  33. package/dist/chunk-FB5J7SRP.js +2 -0
  34. package/dist/chunk-FB5J7SRP.js.map +1 -0
  35. package/dist/chunk-GAXGAK4P.js +2 -0
  36. package/dist/chunk-GAXGAK4P.js.map +1 -0
  37. package/dist/chunk-GEYFQVQI.js +2 -0
  38. package/dist/{chunk-56BNVYTD.js.map → chunk-GEYFQVQI.js.map} +1 -1
  39. package/dist/chunk-GFMFGU7A.js +2 -0
  40. package/dist/chunk-GFMFGU7A.js.map +1 -0
  41. package/dist/chunk-GPAE53HO.js +2 -0
  42. package/dist/chunk-GPAE53HO.js.map +1 -0
  43. package/dist/chunk-H4BI3LJD.js +2 -0
  44. package/dist/chunk-H4BI3LJD.js.map +1 -0
  45. package/dist/chunk-HGHKZF7M.js +2 -0
  46. package/dist/chunk-HGHKZF7M.js.map +1 -0
  47. package/dist/chunk-IG3FJLDR.js +2 -0
  48. package/dist/chunk-IG3FJLDR.js.map +1 -0
  49. package/dist/chunk-INW2EQZR.js +2 -0
  50. package/dist/chunk-INW2EQZR.js.map +1 -0
  51. package/dist/chunk-JTP3LZ77.js +2 -0
  52. package/dist/chunk-JTP3LZ77.js.map +1 -0
  53. package/dist/{chunk-D3SD6MMV.js → chunk-JXCJLQRA.js} +2 -2
  54. package/dist/chunk-JXCJLQRA.js.map +1 -0
  55. package/dist/chunk-KGSIUWBI.js +2 -0
  56. package/dist/chunk-KGSIUWBI.js.map +1 -0
  57. package/dist/{chunk-JRQSZHUU.js → chunk-KHZ2ITFO.js} +2 -2
  58. package/dist/chunk-KM4XVL2X.js +2 -0
  59. package/dist/chunk-KM4XVL2X.js.map +1 -0
  60. package/dist/{chunk-5ETXP2QF.js → chunk-KPHSEIR3.js} +2 -2
  61. package/dist/{chunk-OLJ2S6A6.js → chunk-KSHK3ZPX.js} +2 -2
  62. package/dist/chunk-KSHK3ZPX.js.map +1 -0
  63. package/dist/chunk-L6LGRALQ.js +2 -0
  64. package/dist/chunk-L6LGRALQ.js.map +1 -0
  65. package/dist/chunk-LLIGZSYY.js +2 -0
  66. package/dist/chunk-LLIGZSYY.js.map +1 -0
  67. package/dist/{chunk-QOMUXX6W.js → chunk-LX7QBDSF.js} +2 -2
  68. package/dist/chunk-LX7QBDSF.js.map +1 -0
  69. package/dist/chunk-MH6KKP6K.js +2 -0
  70. package/dist/chunk-MH6KKP6K.js.map +1 -0
  71. package/dist/{chunk-DZYFSFZ7.js → chunk-MRYRNB7Y.js} +2 -2
  72. package/dist/chunk-O4PJ6GWS.js +2 -0
  73. package/dist/chunk-O4PJ6GWS.js.map +1 -0
  74. package/dist/chunk-OP4QGFLS.js +2 -0
  75. package/dist/chunk-OP4QGFLS.js.map +1 -0
  76. package/dist/chunk-P37U34EQ.js +2 -0
  77. package/dist/chunk-PGWKJ6FK.js +2 -0
  78. package/dist/chunk-PGWKJ6FK.js.map +1 -0
  79. package/dist/chunk-PJBAQZ6G.js +2 -0
  80. package/dist/chunk-PJBAQZ6G.js.map +1 -0
  81. package/dist/chunk-PJCUSCO4.js +2 -0
  82. package/dist/{chunk-MESREYTZ.js.map → chunk-PJCUSCO4.js.map} +1 -1
  83. package/dist/chunk-PWUYHFON.js +2 -0
  84. package/dist/chunk-PWUYHFON.js.map +1 -0
  85. package/dist/chunk-QKTDO33H.js +2 -0
  86. package/dist/chunk-QKTDO33H.js.map +1 -0
  87. package/dist/chunk-RC2UQDK7.js +2 -0
  88. package/dist/chunk-RC2UQDK7.js.map +1 -0
  89. package/dist/chunk-RFYJGH2X.js +2 -0
  90. package/dist/chunk-RFYJGH2X.js.map +1 -0
  91. package/dist/chunk-RIWPSA6V.js +2 -0
  92. package/dist/chunk-RIWPSA6V.js.map +1 -0
  93. package/dist/chunk-RWYOUDM5.js +2 -0
  94. package/dist/chunk-RWYOUDM5.js.map +1 -0
  95. package/dist/chunk-RXK4RLF6.js +2 -0
  96. package/dist/chunk-RXK4RLF6.js.map +1 -0
  97. package/dist/{chunk-FZ2HS6G7.js → chunk-S4XU4SE7.js} +1 -1
  98. package/dist/chunk-S4XU4SE7.js.map +1 -0
  99. package/dist/chunk-SUS7UBI5.js +2 -0
  100. package/dist/chunk-SUS7UBI5.js.map +1 -0
  101. package/dist/{chunk-6HGUGIYJ.js → chunk-TVZAFTPT.js} +2 -2
  102. package/dist/chunk-U6OPL6WG.js +2 -0
  103. package/dist/chunk-U6OPL6WG.js.map +1 -0
  104. package/dist/chunk-VEOGRXYK.js +2 -0
  105. package/dist/chunk-VEOGRXYK.js.map +1 -0
  106. package/dist/chunk-VJEJUUY2.js +2 -0
  107. package/dist/chunk-VJEJUUY2.js.map +1 -0
  108. package/dist/chunk-VJEL5MZJ.js +2 -0
  109. package/dist/chunk-VJEL5MZJ.js.map +1 -0
  110. package/dist/chunk-VN4HDCRB.js +2 -0
  111. package/dist/chunk-VN4HDCRB.js.map +1 -0
  112. package/dist/chunk-VNSF5IOL.js +2 -0
  113. package/dist/chunk-VNSF5IOL.js.map +1 -0
  114. package/dist/chunk-WIRFNWEU.js +2 -0
  115. package/dist/chunk-WIRFNWEU.js.map +1 -0
  116. package/dist/chunk-WKK63LAY.js +2 -0
  117. package/dist/chunk-WKK63LAY.js.map +1 -0
  118. package/dist/chunk-WVJDCDGZ.js +2 -0
  119. package/dist/chunk-WVJDCDGZ.js.map +1 -0
  120. package/dist/chunk-XO3JWN33.js +2 -0
  121. package/dist/{chunk-GFBF55NR.js.map → chunk-XO3JWN33.js.map} +1 -1
  122. package/dist/chunk-YO4OQIFP.js +2 -0
  123. package/dist/{chunk-3FVI5JIC.js.map → chunk-YO4OQIFP.js.map} +1 -1
  124. package/dist/chunk-Z3HWTDRE.js +2 -0
  125. package/dist/chunk-Z3HWTDRE.js.map +1 -0
  126. package/dist/chunk-ZOG52VVG.js +2 -0
  127. package/dist/chunk-ZOG52VVG.js.map +1 -0
  128. package/dist/flows/ContractAmendment/ContractAmendmentBack.d.ts +3 -2
  129. package/dist/flows/ContractAmendment/ContractAmendmentBack.js +1 -1
  130. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +5 -5
  131. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +1 -1
  132. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +5 -5
  133. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  134. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +5 -5
  135. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  136. package/dist/flows/ContractAmendment/ContractAmendmentSubmit.d.ts +3 -2
  137. package/dist/flows/ContractAmendment/ContractAmendmentSubmit.js +1 -1
  138. package/dist/flows/ContractAmendment/context.d.ts +5 -6
  139. package/dist/flows/ContractAmendment/context.js +1 -1
  140. package/dist/flows/ContractAmendment/hooks.d.ts +4 -5
  141. package/dist/flows/ContractAmendment/hooks.js +1 -1
  142. package/dist/flows/ContractAmendment/index.d.ts +3 -3
  143. package/dist/flows/ContractAmendment/index.js +1 -1
  144. package/dist/flows/ContractAmendment/types.d.ts +0 -2
  145. package/dist/flows/ContractAmendment/utils.d.ts +2 -2
  146. package/dist/flows/ContractAmendment/utils.js +1 -1
  147. package/dist/flows/CostCalculator/CostCalculatorDisclaimer.d.ts +2 -2
  148. package/dist/flows/CostCalculator/CostCalculatorDisclaimer.js +1 -1
  149. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +7 -6
  150. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  151. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +9 -5
  152. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  153. package/dist/flows/CostCalculator/CostCalculatorResetButton.d.ts +3 -2
  154. package/dist/flows/CostCalculator/CostCalculatorResetButton.js +1 -1
  155. package/dist/flows/CostCalculator/CostCalculatorSubmitButton.d.ts +3 -2
  156. package/dist/flows/CostCalculator/CostCalculatorSubmitButton.js +1 -1
  157. package/dist/flows/CostCalculator/Results/CostCalculatorBenefitsBreakdown.d.ts +2 -2
  158. package/dist/flows/CostCalculator/Results/CostCalculatorBenefitsBreakdown.js +1 -1
  159. package/dist/flows/CostCalculator/Results/CostCalculatorContributionsBreakdown.d.ts +2 -2
  160. package/dist/flows/CostCalculator/Results/CostCalculatorContributionsBreakdown.js +1 -1
  161. package/dist/flows/CostCalculator/Results/CostCalculatorGrossSalary.d.ts +2 -2
  162. package/dist/flows/CostCalculator/Results/CostCalculatorGrossSalary.js +1 -1
  163. package/dist/flows/CostCalculator/Results/CostCalculatorResults.d.ts +3 -3
  164. package/dist/flows/CostCalculator/Results/CostCalculatorResults.js +1 -1
  165. package/dist/flows/CostCalculator/Results/CostCalculatorResultsChart.d.ts +2 -2
  166. package/dist/flows/CostCalculator/Results/CostCalculatorResultsChart.js +1 -1
  167. package/dist/flows/CostCalculator/Results/CostCalculatorResultsChart.js.map +1 -1
  168. package/dist/flows/CostCalculator/Results/CostCalculatorTotalCost.d.ts +2 -2
  169. package/dist/flows/CostCalculator/Results/CostCalculatorTotalCost.js +1 -1
  170. package/dist/flows/CostCalculator/context.d.ts +9 -6
  171. package/dist/flows/CostCalculator/context.js +1 -1
  172. package/dist/flows/CostCalculator/disclaimerUtils.js +1 -1
  173. package/dist/flows/CostCalculator/hooks.d.ts +5 -4
  174. package/dist/flows/CostCalculator/hooks.js +1 -1
  175. package/dist/flows/CostCalculator/index.d.ts +6 -2
  176. package/dist/flows/CostCalculator/index.js +1 -1
  177. package/dist/flows/CostCalculator/jsonSchema.js +1 -1
  178. package/dist/flows/CostCalculator/types.d.ts +12 -4
  179. package/dist/flows/CostCalculator/utils.d.ts +7 -4
  180. package/dist/flows/CostCalculator/utils.js +1 -1
  181. package/dist/flows/Onboarding/AnnualGrossSalary.d.ts +18 -0
  182. package/dist/flows/Onboarding/AnnualGrossSalary.js +2 -0
  183. package/dist/flows/Onboarding/AnnualGrossSalary.js.map +1 -0
  184. package/dist/flows/Onboarding/BasicInformationStep.d.ts +4 -5
  185. package/dist/flows/Onboarding/BasicInformationStep.js +1 -1
  186. package/dist/flows/Onboarding/BenefitsStep.d.ts +8 -7
  187. package/dist/flows/Onboarding/BenefitsStep.js +1 -1
  188. package/dist/flows/Onboarding/ContractDetailsStep.d.ts +3 -4
  189. package/dist/flows/Onboarding/ContractDetailsStep.js +1 -1
  190. package/dist/flows/Onboarding/OnboardingBack.d.ts +4 -2
  191. package/dist/flows/Onboarding/OnboardingBack.js +1 -1
  192. package/dist/flows/Onboarding/OnboardingFlow.d.ts +17 -7
  193. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  194. package/dist/flows/Onboarding/OnboardingForm.d.ts +6 -5
  195. package/dist/flows/Onboarding/OnboardingForm.js +1 -1
  196. package/dist/flows/Onboarding/OnboardingInvite.d.ts +15 -8
  197. package/dist/flows/Onboarding/OnboardingInvite.js +1 -1
  198. package/dist/flows/Onboarding/OnboardingSubmit.d.ts +3 -2
  199. package/dist/flows/Onboarding/OnboardingSubmit.js +1 -1
  200. package/dist/flows/Onboarding/ReviewStep.d.ts +37 -0
  201. package/dist/flows/Onboarding/ReviewStep.js +2 -0
  202. package/dist/flows/Onboarding/ReviewStep.js.map +1 -0
  203. package/dist/flows/Onboarding/SelectCountryStep.d.ts +14 -0
  204. package/dist/flows/Onboarding/SelectCountryStep.js +2 -0
  205. package/dist/flows/Onboarding/SelectCountryStep.js.map +1 -0
  206. package/dist/flows/Onboarding/api.d.ts +122 -0
  207. package/dist/flows/Onboarding/api.js +2 -0
  208. package/dist/flows/Onboarding/api.js.map +1 -0
  209. package/dist/flows/Onboarding/context.d.ts +44 -9
  210. package/dist/flows/Onboarding/context.js +1 -1
  211. package/dist/flows/Onboarding/hooks.d.ts +59 -26
  212. package/dist/flows/Onboarding/hooks.js +1 -1
  213. package/dist/flows/Onboarding/index.d.ts +10 -6
  214. package/dist/flows/Onboarding/index.js +1 -1
  215. package/dist/flows/Onboarding/json-schemas/selectCountryStep.d.ts +24 -0
  216. package/dist/flows/Onboarding/json-schemas/selectCountryStep.js +2 -0
  217. package/dist/flows/Onboarding/json-schemas/selectCountryStep.js.map +1 -0
  218. package/dist/flows/Onboarding/types.d.ts +27 -6
  219. package/dist/flows/Onboarding/utils.d.ts +22 -3
  220. package/dist/flows/Onboarding/utils.js +1 -1
  221. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -4
  222. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  223. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +3 -3
  224. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  225. package/dist/flows/Termination/PaidTimeOffForm.d.ts +3 -3
  226. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  227. package/dist/flows/Termination/TerminationBack.d.ts +3 -2
  228. package/dist/flows/Termination/TerminationBack.js +1 -1
  229. package/dist/flows/Termination/TerminationDetailsForm.d.ts +3 -3
  230. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  231. package/dist/flows/Termination/TerminationFlow.d.ts +7 -5
  232. package/dist/flows/Termination/TerminationFlow.js +1 -1
  233. package/dist/flows/Termination/TerminationForm.d.ts +3 -3
  234. package/dist/flows/Termination/TerminationForm.js +1 -1
  235. package/dist/flows/Termination/TerminationSubmit.d.ts +3 -2
  236. package/dist/flows/Termination/TerminationSubmit.js +1 -1
  237. package/dist/flows/Termination/TimeOff.d.ts +4 -4
  238. package/dist/flows/Termination/TimeOff.js +1 -1
  239. package/dist/flows/Termination/context.d.ts +6 -5
  240. package/dist/flows/Termination/context.js +1 -1
  241. package/dist/flows/Termination/hooks.d.ts +4 -3
  242. package/dist/flows/Termination/hooks.js +1 -1
  243. package/dist/flows/Termination/index.d.ts +4 -2
  244. package/dist/flows/Termination/index.js +1 -1
  245. package/dist/flows/Termination/json-schemas/additionalInformation.js +1 -1
  246. package/dist/flows/Termination/json-schemas/defaultSchema.js +1 -1
  247. package/dist/flows/Termination/json-schemas/employeeComunication.js +1 -1
  248. package/dist/flows/Termination/json-schemas/jsonSchema.js +1 -1
  249. package/dist/flows/Termination/json-schemas/paidTimeOff.js +1 -1
  250. package/dist/flows/Termination/json-schemas/schema.js +1 -1
  251. package/dist/flows/Termination/json-schemas/terminationDetails.js +1 -1
  252. package/dist/flows/Termination/types.d.ts +1 -1
  253. package/dist/flows/Termination/utils.d.ts +1 -1
  254. package/dist/flows/Termination/utils.js +1 -1
  255. package/dist/flows/types.d.ts +3 -4
  256. package/dist/flows/useStepState.d.ts +19 -6
  257. package/dist/flows/useStepState.js +1 -1
  258. package/dist/flows/utils.d.ts +3 -11
  259. package/dist/flows/utils.js +1 -1
  260. package/dist/index.css +1 -1
  261. package/dist/index.css.map +1 -1
  262. package/dist/index.d.ts +16 -8
  263. package/dist/index.js +1 -1
  264. package/dist/index.js.map +1 -1
  265. package/dist/{remoteFlows-CswYencu.d.ts → remoteFlows-lYAFzyXi.d.ts} +51 -27
  266. package/dist/types-CxSFjQw5.d.ts +3 -0
  267. package/dist/{types.gen-CsMdyQkb.d.ts → types.gen-D_v539E_.d.ts} +335 -2
  268. package/package.json +18 -3
  269. package/dist/chunk-2PXGLWCY.js +0 -2
  270. package/dist/chunk-2PXGLWCY.js.map +0 -1
  271. package/dist/chunk-36UPHOJS.js +0 -2
  272. package/dist/chunk-36UPHOJS.js.map +0 -1
  273. package/dist/chunk-3FVI5JIC.js +0 -2
  274. package/dist/chunk-56BNVYTD.js +0 -2
  275. package/dist/chunk-6A3F6JG6.js +0 -2
  276. package/dist/chunk-6A3F6JG6.js.map +0 -1
  277. package/dist/chunk-6TYJC6YS.js +0 -2
  278. package/dist/chunk-6TYJC6YS.js.map +0 -1
  279. package/dist/chunk-7CYG2RHP.js +0 -2
  280. package/dist/chunk-7CYG2RHP.js.map +0 -1
  281. package/dist/chunk-ABR3B66K.js +0 -2
  282. package/dist/chunk-ABR3B66K.js.map +0 -1
  283. package/dist/chunk-ALRU77S5.js +0 -2
  284. package/dist/chunk-ALRU77S5.js.map +0 -1
  285. package/dist/chunk-AYDF3IFZ.js +0 -2
  286. package/dist/chunk-CFRYIKSR.js +0 -2
  287. package/dist/chunk-CFRYIKSR.js.map +0 -1
  288. package/dist/chunk-CKEVRQRG.js +0 -2
  289. package/dist/chunk-CKEVRQRG.js.map +0 -1
  290. package/dist/chunk-D3SD6MMV.js.map +0 -1
  291. package/dist/chunk-DE5FSFYL.js +0 -2
  292. package/dist/chunk-DE5FSFYL.js.map +0 -1
  293. package/dist/chunk-DGPRFQYK.js +0 -2
  294. package/dist/chunk-DGPRFQYK.js.map +0 -1
  295. package/dist/chunk-DHRIURRT.js +0 -2
  296. package/dist/chunk-DHRIURRT.js.map +0 -1
  297. package/dist/chunk-DZSZOC2G.js +0 -2
  298. package/dist/chunk-DZSZOC2G.js.map +0 -1
  299. package/dist/chunk-EAAIAMTY.js +0 -2
  300. package/dist/chunk-EAAIAMTY.js.map +0 -1
  301. package/dist/chunk-ED3CBUQL.js +0 -2
  302. package/dist/chunk-ED3CBUQL.js.map +0 -1
  303. package/dist/chunk-FMT2OTOL.js +0 -2
  304. package/dist/chunk-FMT2OTOL.js.map +0 -1
  305. package/dist/chunk-FZ2HS6G7.js.map +0 -1
  306. package/dist/chunk-GFBF55NR.js +0 -2
  307. package/dist/chunk-GGAS4ZNQ.js +0 -2
  308. package/dist/chunk-GGAS4ZNQ.js.map +0 -1
  309. package/dist/chunk-GMGKIQLI.js +0 -2
  310. package/dist/chunk-GOLOL2V6.js +0 -2
  311. package/dist/chunk-GOLOL2V6.js.map +0 -1
  312. package/dist/chunk-GRYAM4FZ.js +0 -2
  313. package/dist/chunk-GRYAM4FZ.js.map +0 -1
  314. package/dist/chunk-HEPL5WDF.js +0 -2
  315. package/dist/chunk-HEPL5WDF.js.map +0 -1
  316. package/dist/chunk-HSW5HMHH.js +0 -2
  317. package/dist/chunk-IDSJI7KQ.js +0 -2
  318. package/dist/chunk-IDSJI7KQ.js.map +0 -1
  319. package/dist/chunk-J55S4SEH.js +0 -2
  320. package/dist/chunk-J55S4SEH.js.map +0 -1
  321. package/dist/chunk-JBG4RVXQ.js +0 -2
  322. package/dist/chunk-JBG4RVXQ.js.map +0 -1
  323. package/dist/chunk-KH6QS5OU.js +0 -2
  324. package/dist/chunk-KH6QS5OU.js.map +0 -1
  325. package/dist/chunk-KQH5HLN5.js +0 -2
  326. package/dist/chunk-KQH5HLN5.js.map +0 -1
  327. package/dist/chunk-KSGPQCSG.js +0 -2
  328. package/dist/chunk-KSGPQCSG.js.map +0 -1
  329. package/dist/chunk-LNKYOAKF.js +0 -2
  330. package/dist/chunk-LNKYOAKF.js.map +0 -1
  331. package/dist/chunk-M7WCW7WD.js +0 -2
  332. package/dist/chunk-M7WCW7WD.js.map +0 -1
  333. package/dist/chunk-MESREYTZ.js +0 -2
  334. package/dist/chunk-MHKNAQLP.js +0 -2
  335. package/dist/chunk-MHKNAQLP.js.map +0 -1
  336. package/dist/chunk-MIHU6CEZ.js +0 -2
  337. package/dist/chunk-MIHU6CEZ.js.map +0 -1
  338. package/dist/chunk-NE547PW4.js +0 -2
  339. package/dist/chunk-NE547PW4.js.map +0 -1
  340. package/dist/chunk-OLJ2S6A6.js.map +0 -1
  341. package/dist/chunk-PNXZHV6W.js +0 -2
  342. package/dist/chunk-PNXZHV6W.js.map +0 -1
  343. package/dist/chunk-PWKM2R6V.js +0 -2
  344. package/dist/chunk-PWKM2R6V.js.map +0 -1
  345. package/dist/chunk-Q64URAIN.js +0 -2
  346. package/dist/chunk-Q64URAIN.js.map +0 -1
  347. package/dist/chunk-QOMUXX6W.js.map +0 -1
  348. package/dist/chunk-QSHYMFMY.js +0 -2
  349. package/dist/chunk-QSHYMFMY.js.map +0 -1
  350. package/dist/chunk-S4FKLPBB.js +0 -2
  351. package/dist/chunk-S4FKLPBB.js.map +0 -1
  352. package/dist/chunk-S56EWAS4.js +0 -2
  353. package/dist/chunk-S56EWAS4.js.map +0 -1
  354. package/dist/chunk-SLD7DFLW.js +0 -2
  355. package/dist/chunk-SLD7DFLW.js.map +0 -1
  356. package/dist/chunk-UECSVYQ5.js.map +0 -1
  357. package/dist/chunk-VRQXHCFR.js +0 -2
  358. package/dist/chunk-VRQXHCFR.js.map +0 -1
  359. package/dist/chunk-WQHKB5T7.js +0 -2
  360. package/dist/chunk-WQHKB5T7.js.map +0 -1
  361. package/dist/chunk-WS3C3WIJ.js +0 -2
  362. package/dist/chunk-WS3C3WIJ.js.map +0 -1
  363. package/dist/chunk-XLFHHYVS.js +0 -2
  364. package/dist/chunk-XLFHHYVS.js.map +0 -1
  365. package/dist/chunk-YOC3VDC7.js +0 -2
  366. package/dist/chunk-YOC3VDC7.js.map +0 -1
  367. /package/dist/{chunk-WRDKLT4N.js.map → chunk-3ZWDIEEM.js.map} +0 -0
  368. /package/dist/{chunk-A4RX3KRZ.js.map → chunk-CFIJKJXD.js.map} +0 -0
  369. /package/dist/{chunk-HSW5HMHH.js.map → chunk-DR7VGNO2.js.map} +0 -0
  370. /package/dist/{chunk-JRQSZHUU.js.map → chunk-KHZ2ITFO.js.map} +0 -0
  371. /package/dist/{chunk-5ETXP2QF.js.map → chunk-KPHSEIR3.js.map} +0 -0
  372. /package/dist/{chunk-DZYFSFZ7.js.map → chunk-MRYRNB7Y.js.map} +0 -0
  373. /package/dist/{chunk-AYDF3IFZ.js.map → chunk-P37U34EQ.js.map} +0 -0
  374. /package/dist/{chunk-6HGUGIYJ.js.map → chunk-TVZAFTPT.js.map} +0 -0
@@ -30,6 +30,33 @@ type TerminationOffboarding = {
30
30
  will_challenge_termination: boolean;
31
31
  will_challenge_termination_description?: string;
32
32
  };
33
+ /**
34
+ * Upsert benefit offers request. As its properties may vary depending on the employment,
35
+ * you must query the [Show benefit offers schema](#tag/benefits/operation/get_show_benefit_offer) endpoint
36
+ * passing the employment id
37
+ */
38
+ type UnifiedEmploymentUpsertBenefitOffersRequest = {
39
+ [key: string]: unknown;
40
+ };
41
+ /**
42
+ * The response from the currency converter
43
+ */
44
+ type ConvertCurrency = {
45
+ /**
46
+ * The exchange rate used to convert the amount
47
+ */
48
+ exchange_rate: number;
49
+ /**
50
+ * The amount in cents in the source currency
51
+ */
52
+ source_amount: number;
53
+ source_currency: CurrencyDefinition;
54
+ /**
55
+ * The amount in cents in the target currency
56
+ */
57
+ target_amount: number;
58
+ target_currency: CurrencyDefinition;
59
+ };
33
60
  type MinimalCountry = {
34
61
  alpha_2_code: string;
35
62
  code: string;
@@ -297,6 +324,113 @@ type ShortId = string;
297
324
  *
298
325
  */
299
326
  type NullableApproverId = string | null;
327
+ /**
328
+ * Description of the basic required and onboarding tasks params to create an employment.
329
+ * You do not need to include all onboarding tasks when creating or updating an employment.
330
+ *
331
+ */
332
+ type EmploymentFullParams = {
333
+ /**
334
+ * Home address information. As its properties may vary depending on the country,
335
+ * you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint
336
+ * passing the country code and `address_details` as path parameters.
337
+ */
338
+ address_details?: {
339
+ [key: string]: unknown;
340
+ };
341
+ /**
342
+ * Administrative information. As its properties may vary depending on the country,
343
+ * you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint
344
+ * passing the country code and `administrative_details` as path parameters.
345
+ */
346
+ administrative_details?: {
347
+ [key: string]: unknown;
348
+ };
349
+ /**
350
+ * Bank account information. As its properties may vary depending on the country,
351
+ * you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint
352
+ * passing the country code and `bank_account_details` as path parameters.
353
+ */
354
+ bank_account_details?: {
355
+ [key: string]: unknown;
356
+ };
357
+ /**
358
+ * Employment basic information. As its properties may vary depending on the country,
359
+ * you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint
360
+ * passing the country code and `employment_basic_information` as path parameters.
361
+ */
362
+ basic_information?: {
363
+ [key: string]: unknown;
364
+ };
365
+ /**
366
+ * Billing address information. As its properties may vary depending on the country,
367
+ * you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint
368
+ * passing the country code and `billing_address_details` as path parameters.
369
+ */
370
+ billing_address_details?: {
371
+ [key: string]: unknown;
372
+ };
373
+ company_id?: string;
374
+ /**
375
+ * Contract information. As its properties may vary depending on the country,
376
+ * you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint
377
+ * passing the country code and `contract_details` as path parameters.
378
+ */
379
+ contract_details?: {
380
+ [key: string]: unknown;
381
+ };
382
+ country?: Country;
383
+ country_code?: string;
384
+ /**
385
+ * The department of the employment. The department must belong to the same company as the employment.
386
+ * When set to `null`, the employment will be unassigned from a department.
387
+ *
388
+ */
389
+ department_id?: string | null;
390
+ /**
391
+ * Emergency contact information. As its properties may vary depending on the country,
392
+ * you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint
393
+ * passing the country code and `emergency_contact_details` as path parameters.
394
+ */
395
+ emergency_contact_details?: {
396
+ [key: string]: unknown;
397
+ };
398
+ /**
399
+ * A unique reference code for the employment record in a non-Remote system. This optional field links to external data sources. If not provided, it defaults to `null`. While uniqueness is recommended, it is not strictly enforced within Remote's system.
400
+ */
401
+ external_id?: string;
402
+ /**
403
+ * The user id of the manager, who should have an `admin`, `owner` or `people_manager` role.
404
+ * You can find these users by querying the [Company Managers endpoint](#operation/get_index_company_manager).
405
+ * **Update of this field is only available for active employments.**
406
+ *
407
+ */
408
+ manager_id?: string;
409
+ /**
410
+ * Personal details information. As its properties may vary depending on the country,
411
+ * you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint
412
+ * passing the country code and `personal_details` as path parameters.
413
+ */
414
+ personal_details?: {
415
+ [key: string]: unknown;
416
+ };
417
+ /**
418
+ * Pricing plan details information. As its properties may vary depending on the country,
419
+ * you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint
420
+ * passing the country code and `pricing_plan_details` as path parameters.
421
+ */
422
+ pricing_plan_details?: {
423
+ [key: string]: unknown;
424
+ };
425
+ /**
426
+ * If not provided, it will default to `employee`.
427
+ */
428
+ type?: 'employee' | 'contractor';
429
+ /**
430
+ * The work email of the employment.
431
+ */
432
+ work_email?: string;
433
+ };
300
434
  type OffboardingFile = {
301
435
  /**
302
436
  * The content in base64 encoding
@@ -419,6 +553,23 @@ type RequestDetails = {
419
553
  reason_for_change_description?: string | null;
420
554
  salary_decrease_details?: SalaryDecreaseDetails;
421
555
  };
556
+ /**
557
+ * The parameters for the currency conversion
558
+ */
559
+ type ConvertCurrencyParams = {
560
+ /**
561
+ * The amount to convert in cents
562
+ */
563
+ amount: number;
564
+ /**
565
+ * The currency code to convert from
566
+ */
567
+ source_currency: string;
568
+ /**
569
+ * The currency code to convert to
570
+ */
571
+ target_currency: string;
572
+ };
422
573
  /**
423
574
  * Indicates the expected start date of the employee or contractor.
424
575
  *
@@ -485,6 +636,11 @@ type ListTimeoffResponse = {
485
636
  total_pages?: number;
486
637
  };
487
638
  };
639
+ type MagicLinkResponse = {
640
+ data: {
641
+ url: string;
642
+ };
643
+ };
488
644
  /**
489
645
  * The stage of employment lifecycle. When it's `onboarded` means the employee is ready to commence or has already commenced.
490
646
  */
@@ -540,17 +696,156 @@ type SuccessResponse = {
540
696
  status?: string;
541
697
  };
542
698
  };
699
+ /**
700
+ * Magic link params
701
+ */
702
+ type MagicLinkParams = {
703
+ /**
704
+ * The path to which the user will be redirected to after login. This field has a max length of 2000 characters.
705
+ *
706
+ * If not specified, `/dashboard` will be used by default.
707
+ *
708
+ * Must begin with a forward slash (`/`) and, at least one path segment is required (`/dashboard` e.g.).
709
+ * An ending forward slash (`/`) is not allowed and path segments can only include alphanumeric characters, underscore (`_`) and hyphen (`-`).
710
+ *
711
+ * An optional query string can be specified too. If present, the query string must start with a question mark (`?`)
712
+ * and must include at least one key value pair. Both, keys and values, can only include
713
+ * alphanumeric characters, underscore (`_`), hyphen (`-`) or percent encoded values such as `%20` (space character).
714
+ * Additional key value pairs are allowed using ampersand (`&`).
715
+ *
716
+ * Query keys require at least one alphanumeric, underscore (`_`), hyphen (`-`) or valid percent encoded.
717
+ * Query values are optional, the actual value may be empty and the equals sign (`=`) may be missing too.
718
+ *
719
+ * Some **Valid** examples for `path`:
720
+ * - o `/dashboard`
721
+ * - o `/dashboard/people/new/full_time/663e0b79-c893-45ff-a1b2-f6dcabc098b5`
722
+ * - o `/dashboard/people/hiring?filters%5B0%5D%5Bid%5D=exclude_linked_drafts&filters%5B0%5D%5Bvalue%5D=true`
723
+ * - o `/dashboard?key=value&foo=bar`
724
+ *
725
+ * Some **Invalid** examples for `path`:
726
+ * - x `missing_forward_slash`
727
+ * - x `/invalid//path`
728
+ * - x `//some`
729
+ * - x `/?key=value`
730
+ * - x `/some/i.n:valid*`
731
+ * - x `/invalid/end/slash/`
732
+ * - x `/some?malformed_percent_encoded_key%1=value`
733
+ *
734
+ */
735
+ path?: string;
736
+ user_id: UuidSlug;
737
+ } | {
738
+ employment_id: UuidSlug;
739
+ /**
740
+ * The path to which the user will be redirected to after login. This field has a max length of 2000 characters.
741
+ *
742
+ * If not specified, `/dashboard` will be used by default.
743
+ *
744
+ * Must begin with a forward slash (`/`) and, at least one path segment is required (`/dashboard` e.g.).
745
+ * An ending forward slash (`/`) is not allowed and path segments can only include alphanumeric characters, underscore (`_`) and hyphen (`-`).
746
+ *
747
+ * An optional query string can be specified too. If present, the query string must start with a question mark (`?`)
748
+ * and must include at least one key value pair. Both, keys and values, can only include
749
+ * alphanumeric characters, underscore (`_`), hyphen (`-`) or percent encoded values such as `%20` (space character).
750
+ * Additional key value pairs are allowed using ampersand (`&`).
751
+ *
752
+ * Query keys require at least one alphanumeric, underscore (`_`), hyphen (`-`) or valid percent encoded.
753
+ * Query values are optional, the actual value may be empty and the equals sign (`=`) may be missing too.
754
+ *
755
+ * Some **Valid** examples for `path`:
756
+ * - o `/dashboard`
757
+ * - o `/dashboard/people/new/full_time/663e0b79-c893-45ff-a1b2-f6dcabc098b5`
758
+ * - o `/dashboard/people/hiring?filters%5B0%5D%5Bid%5D=exclude_linked_drafts&filters%5B0%5D%5Bvalue%5D=true`
759
+ * - o `/dashboard?key=value&foo=bar`
760
+ *
761
+ * Some **Invalid** examples for `path`:
762
+ * - x `missing_forward_slash`
763
+ * - x `/invalid//path`
764
+ * - x `//some`
765
+ * - x `/?key=value`
766
+ * - x `/some/i.n:valid*`
767
+ * - x `/invalid/end/slash/`
768
+ * - x `/some?malformed_percent_encoded_key%1=value`
769
+ *
770
+ */
771
+ path?: string;
772
+ };
543
773
  type LeavePolicy = {
544
774
  leave_policy_variant_slug: string;
545
775
  leave_type: TimeoffType;
546
776
  name: string;
547
777
  };
778
+ type Company = {
779
+ /**
780
+ * Fields can vary depending on the country. Please, check the required fields structure using the [Show form schema endpoint](#operation/get_show_form_country).
781
+ * Use the desired country and `address_details` as the form name for the placeholders.
782
+ * The response complies with the [JSON Schema](https://remote.com/resources/api/how-json-schemas-work) specification.
783
+ *
784
+ */
785
+ address_details: {
786
+ [key: string]: unknown;
787
+ };
788
+ /**
789
+ * Fields can vary depending on the country. Please, check the required fields structure using the [Show form schema endpoint](#operation/get_show_form_country).
790
+ * Use the desired country and `bank_account_details` as the form name for the placeholders.
791
+ * The response complies with the [JSON Schema](https://remote.com/resources/api/how-json-schemas-work) specification.
792
+ *
793
+ */
794
+ bank_account_details?: {
795
+ [key: string]: unknown;
796
+ };
797
+ company_owner_email: string;
798
+ company_owner_name?: string;
799
+ company_owner_user_id: string;
800
+ country_code: string;
801
+ created_at: string;
802
+ /**
803
+ * The credit risk status of the company default legal entity.
804
+ * - `not_started`: The credit risk assessment has not started yet.
805
+ * - `ready`: The credit risk assessment is ready to be started.
806
+ * - `in_progress`: The automated credit risk assessment is in progress.
807
+ * - `referred`: The credit risk assessment has been referred to a human reviewer.
808
+ * - `fail`: The credit risk assessment has failed and the company will be archived.
809
+ * - `deposit_required`: The company default legal entity requires a deposit before onboarding new employees.
810
+ * - `no_deposit_required`: The company default legal entity does not require a deposit before onboarding new employees.
811
+ *
812
+ */
813
+ default_legal_entity_credit_risk_status: 'not_started' | 'ready' | 'in_progress' | 'referred' | 'fail' | 'deposit_required' | 'no_deposit_required';
814
+ desired_currency: string;
815
+ external_id?: string | null;
816
+ id: string;
817
+ name: string;
818
+ phone_number?: string;
819
+ registration_number?: string | null;
820
+ /**
821
+ * The company status determines what a company is allowed to do:
822
+ * - `pending`: The company has been created and the company owner invited. Remote is waiting for the company owner to complete onboarding.
823
+ * - `review`: The company is under review. In rare occasions, a company may not automatically get created in `active` status because Remote needs to
824
+ * manually review the company that was created. The company will become `active` once the review is completed and no further action is necessary
825
+ * through the Remote API.
826
+ * - `active`: The company owner has completed onboarding and the company is ready to employ.
827
+ * - `archived`: The company is no longer active on the Remote platform and no changes can be made to the company.
828
+ *
829
+ */
830
+ status: 'pending' | 'review' | 'active' | 'archived';
831
+ tax_number?: string | null;
832
+ terms_of_service_accepted_at: string;
833
+ updated_at: string;
834
+ };
548
835
  type TooManyRequestsResponse = {
549
836
  message?: string;
550
837
  };
551
838
  type ConflictResponse = {
552
839
  message?: string;
553
840
  };
841
+ /**
842
+ * Currency object without a UUID identifier
843
+ */
844
+ type CurrencyDefinition = {
845
+ code: string;
846
+ name: string;
847
+ symbol: string;
848
+ };
554
849
  /**
555
850
  * TimeoffDay schema
556
851
  */
@@ -689,7 +984,7 @@ type ParameterError = {
689
984
  param: string;
690
985
  };
691
986
  type GenericFile = Blob | File;
692
- type TimeoffType = 'paid_time_off' | 'sick_leave' | 'public_holiday' | 'unpaid_leave' | 'extended_leave' | 'in_lieu_time' | 'maternity_leave' | 'paternity_leave' | 'parental_leave' | 'bereavement' | 'military_leave' | 'other';
987
+ type TimeoffType = 'time_off' | 'sick_leave' | 'public_holiday' | 'unpaid_leave' | 'extended_leave' | 'in_lieu_time' | 'maternity_leave' | 'paternity_leave' | 'parental_leave' | 'bereavement' | 'military_leave' | 'other' | 'paid_time_off' | 'custom_company_leave' | 'rtt' | 'casual_leave' | 'rol' | 'ex_festivita';
693
988
  /**
694
989
  * The details of the salary decrease request if there is one
695
990
  */
@@ -698,6 +993,14 @@ type SalaryDecreaseDetails = {
698
993
  salary_decrease_reason_description?: string | null;
699
994
  was_employee_informed?: string;
700
995
  } | null;
996
+ /**
997
+ * The response from the currency converter
998
+ */
999
+ type ConvertCurrencyResponse = {
1000
+ data: {
1001
+ conversion_data: ConvertCurrency;
1002
+ };
1003
+ };
701
1004
  type RequestError = {
702
1005
  errors: {
703
1006
  /**
@@ -867,6 +1170,21 @@ type PostCreateEstimationPdfErrors = {
867
1170
  422: UnprocessableEntityResponse;
868
1171
  };
869
1172
  type PostCreateEstimationPdfError = PostCreateEstimationPdfErrors[keyof PostCreateEstimationPdfErrors];
1173
+ type PostCreateRiskReserveErrors = {
1174
+ /**
1175
+ * Unauthorized
1176
+ */
1177
+ 401: UnauthorizedResponse;
1178
+ /**
1179
+ * Not Found
1180
+ */
1181
+ 404: NotFoundResponse;
1182
+ /**
1183
+ * Unprocessable Entity
1184
+ */
1185
+ 422: UnprocessableEntityResponse;
1186
+ };
1187
+ type PostCreateRiskReserveError = PostCreateRiskReserveErrors[keyof PostCreateRiskReserveErrors];
870
1188
  type PostCreateContractAmendmentErrors = {
871
1189
  /**
872
1190
  * Unauthorized
@@ -943,5 +1261,20 @@ type PostInviteEmploymentInvitationErrors = {
943
1261
  429: TooManyRequestsResponse;
944
1262
  };
945
1263
  type PostInviteEmploymentInvitationError = PostInviteEmploymentInvitationErrors[keyof PostInviteEmploymentInvitationErrors];
1264
+ type PostConvertCurrencyConverterErrors = {
1265
+ /**
1266
+ * Unauthorized
1267
+ */
1268
+ 401: UnauthorizedResponse;
1269
+ /**
1270
+ * Not Found
1271
+ */
1272
+ 404: NotFoundResponse;
1273
+ /**
1274
+ * Unprocessable Entity
1275
+ */
1276
+ 422: UnprocessableEntityResponse;
1277
+ };
1278
+ type PostConvertCurrencyConverterError = PostConvertCurrencyConverterErrors[keyof PostConvertCurrencyConverterErrors];
946
1279
 
947
- export type { ContractAmendmentAutomatableResponse as C, EmploymentShowResponse as E, ListTimeoffResponse as L, OffboardingResponse as O, PostAutomatableContractAmendmentError as P, SuccessResponse as S, TerminationDetailsParams as T, ContractAmendmentResponse as a, PostCreateContractAmendmentError as b, EmploymentCreationResponse as c, PostCreateEmployment2Error as d, EmploymentResponse as e, PatchUpdateEmployment2Error as f, PutUpdateBenefitOfferError as g, PostInviteEmploymentInvitationError as h, EmploymentCreateParams as i, CostCalculatorEstimateResponse as j, PostCreateEstimationError as k, CostCalculatorEstimatePdfResponse as l, PostCreateEstimationPdfError as m, CostCalculatorEstimateParams as n, EmploymentTermType as o, PostCreateOffboardingError as p, TimeoffStatus as q };
1280
+ export type { CostCalculatorEmployment as A, Currency as B, ContractAmendmentAutomatableResponse as C, EmploymentShowResponse as E, ListTimeoffResponse as L, MagicLinkResponse as M, OffboardingResponse as O, PostAutomatableContractAmendmentError as P, SuccessResponse as S, TerminationDetailsParams as T, UnifiedEmploymentUpsertBenefitOffersRequest as U, ContractAmendmentResponse as a, PostCreateContractAmendmentError as b, CostCalculatorEstimateResponse as c, PostCreateEstimationError as d, CostCalculatorEstimatePdfResponse as e, PostCreateEstimationPdfError as f, CostCalculatorEstimateParams as g, EmploymentTermType as h, EmploymentCreateParams as i, Employment as j, PostCreateOffboardingError as k, EmploymentCreationResponse as l, PostCreateEmployment2Error as m, EmploymentResponse as n, PatchUpdateEmployment2Error as o, PutUpdateBenefitOfferError as p, Company as q, PostInviteEmploymentInvitationError as r, PostCreateRiskReserveError as s, EmploymentFullParams as t, UnprocessableEntityResponse as u, MagicLinkParams as v, ConvertCurrencyResponse as w, PostConvertCurrencyConverterError as x, ConvertCurrencyParams as y, TimeoffStatus as z };
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@remoteoss/remote-flows",
3
- "version": "0.4.0-alpha.1",
3
+ "version": "0.4.0-alpha.11",
4
4
  "scripts": {
5
5
  "build": "NODE_ENV=production tsup",
6
6
  "ci": "npm run build && npm run check-format && npm run check-exports && npm run lint && npm run test",
7
7
  "check-exports": "attw --pack . --ignore-rules=cjs-resolves-to-esm --exclude-entrypoints index.css",
8
8
  "check-format": "prettier --check .",
9
9
  "dev": "NODE_ENV=development tsup --watch",
10
+ "build:reset": "postcss src/styles/reset.css -o ./example/src/css/reset.css",
10
11
  "lint": "eslint .",
11
12
  "format": "prettier --write .",
12
13
  "openapi-ts": "openapi-ts",
@@ -16,7 +17,8 @@
16
17
  "changeset:version": "changeset version",
17
18
  "prepare": "npm run build",
18
19
  "prerelease": "npm run ci",
19
- "release": "changeset publish"
20
+ "release": "changeset publish",
21
+ "type-check": "tsc --noEmit"
20
22
  },
21
23
  "type": "module",
22
24
  "main": "dist/index.js",
@@ -72,7 +74,13 @@
72
74
  "cmdk": "^1.1.1",
73
75
  "date-fns": "^3.6.0",
74
76
  "dompurify": "^3.2.5",
75
- "lodash": "^4.17.21",
77
+ "lodash.capitalize": "^4.2.1",
78
+ "lodash.get": "^4.4.2",
79
+ "lodash.groupby": "^4.6.0",
80
+ "lodash.isnull": "^3.0.0",
81
+ "lodash.mergewith": "^4.6.2",
82
+ "lodash.omit": "^4.5.0",
83
+ "lodash.omitby": "^4.6.0",
76
84
  "lucide-react": "0.477.0",
77
85
  "postcss": "^8.5.3",
78
86
  "react-day-picker": "^8.10.1",
@@ -94,6 +102,13 @@
94
102
  "@testing-library/react": "^16.2.0",
95
103
  "@testing-library/user-event": "^14.6.1",
96
104
  "@types/jsdom": "^21.1.7",
105
+ "@types/lodash.capitalize": "^4.2.9",
106
+ "@types/lodash.get": "^4.4.9",
107
+ "@types/lodash.groupby": "^4.6.9",
108
+ "@types/lodash.isnull": "^3.0.9",
109
+ "@types/lodash.mergewith": "^4.6.9",
110
+ "@types/lodash.omit": "^4.5.9",
111
+ "@types/lodash.omitby": "^4.6.9",
97
112
  "@types/node": "^22.13.4",
98
113
  "@types/react": "^19.0.10",
99
114
  "@vitest/coverage-istanbul": "^3.0.8",
@@ -1,2 +0,0 @@
1
- var e={basic_information:{index:0,name:"basic_information"},contract_details:{index:1,name:"contract_details"},benefits:{index:2,name:"benefits"},review:{index:3,name:"review"}};export{e as a};
2
- //# sourceMappingURL=chunk-2PXGLWCY.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/flows/Onboarding/utils.ts"],"sourcesContent":["import { Step } from '@/src/flows/useStepState';\n\ntype StepKeys =\n | 'basic_information'\n | 'contract_details'\n | 'benefits'\n | 'review';\n\nexport const STEPS: Record<StepKeys, Step> = {\n basic_information: { index: 0, name: 'basic_information' },\n contract_details: { index: 1, name: 'contract_details' },\n benefits: { index: 2, name: 'benefits' },\n review: { index: 3, name: 'review' },\n} as const;\n"],"mappings":"AAQO,IAAMA,EAAgC,CAC3C,kBAAmB,CAAE,MAAO,EAAG,KAAM,mBAAoB,EACzD,iBAAkB,CAAE,MAAO,EAAG,KAAM,kBAAmB,EACvD,SAAU,CAAE,MAAO,EAAG,KAAM,UAAW,EACvC,OAAQ,CAAE,MAAO,EAAG,KAAM,QAAS,CACrC","names":["STEPS"]}
@@ -1,2 +0,0 @@
1
- import{a as o}from"./chunk-AYDF3IFZ.js";import{object as c}from"yup";function d(n){let t=n.reduce((e,r)=>(e[r.name]=r.schema,e),{});return c(t)}o(d,"buildValidationSchema");function u(n,t){return Object.entries(n).reduce((e,[r,a])=>(e[r]=t.includes(r)?a==="yes":a,e),{})}o(u,"parseFormRadioValues");export{d as a,u as b};
2
- //# sourceMappingURL=chunk-36UPHOJS.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/flows/utils.ts"],"sourcesContent":["import { AnyObjectSchema, object } from 'yup';\nimport { Field } from './types';\n\n/**\n * Build the validation schema for the form.\n * @returns\n */\nexport function buildValidationSchema(fields: Field[]) {\n const fieldsSchema = fields.reduce<Record<string, AnyObjectSchema>>(\n (fieldsSchemaAcc, field) => {\n fieldsSchemaAcc[field.name] = field.schema as AnyObjectSchema;\n return fieldsSchemaAcc;\n },\n {},\n );\n return object(fieldsSchema) as AnyObjectSchema;\n}\n\ntype ParsedRadioValues = Record<string, unknown>;\n\n/**\n * Parses the form values to convert radio button values from 'yes'/'no' to boolean.\n *\n * @param values - The form values as a record of key-value pairs.\n * @param fieldKeys - An array of field keys that represent radio button fields.\n * @returns A new object with the parsed values, where radio button fields are converted to boolean.\n *\n * @example\n * const values = {\n * ack: 'yes',\n * confidential: 'no',\n * username: 'john_doe',\n * };\n * const fieldKeys = ['ack', 'confidential'];\n * const parsedValues = parseFormRadioValues(values, fieldKeys);\n * // Output: { ack: true, confidential: false, username: 'john_doe' }\n */\nexport function parseFormRadioValues(\n values: Record<string, unknown>,\n fieldKeys: string[],\n) {\n return Object.entries(values).reduce<ParsedRadioValues>(\n (acc, [key, value]) => {\n acc[key] = fieldKeys.includes(key) ? value === 'yes' : value;\n return acc;\n },\n {},\n );\n}\n"],"mappings":"wCAAA,OAA0B,UAAAA,MAAc,MAOjC,SAASC,EAAsBC,EAAiB,CACrD,IAAMC,EAAeD,EAAO,OAC1B,CAACE,EAAiBC,KAChBD,EAAgBC,EAAM,IAAI,EAAIA,EAAM,OAC7BD,GAET,CAAC,CACH,EACA,OAAOE,EAAOH,CAAY,CAC5B,CATgBI,EAAAN,EAAA,yBA8BT,SAASO,EACdC,EACAC,EACA,CACA,OAAO,OAAO,QAAQD,CAAM,EAAE,OAC5B,CAACE,EAAK,CAACC,EAAKC,CAAK,KACfF,EAAIC,CAAG,EAAIF,EAAU,SAASE,CAAG,EAAIC,IAAU,MAAQA,EAChDF,GAET,CAAC,CACH,CACF,CAXgBJ,EAAAC,EAAA","names":["object","buildValidationSchema","fields","fieldsSchema","fieldsSchemaAcc","field","object","__name","parseFormRadioValues","values","fieldKeys","acc","key","value"]}
@@ -1,2 +0,0 @@
1
- import{a}from"./chunk-5ETXP2QF.js";import{a as e}from"./chunk-AYDF3IFZ.js";import*as o from"react";import*as t from"@radix-ui/react-tooltip";function l({delayDuration:i=0,...r}){return o.createElement(t.Provider,{"data-slot":"tooltip-provider",delayDuration:i,...r})}e(l,"TooltipProvider");function d({...i}){return o.createElement(l,null,o.createElement(t.Root,{"data-slot":"tooltip",...i}))}e(d,"Tooltip");function s({...i}){return o.createElement(t.Trigger,{"data-slot":"tooltip-trigger",...i})}e(s,"TooltipTrigger");function f({className:i,sideOffset:r=0,children:p,...n}){return o.createElement(t.Portal,null,o.createElement(t.Content,{"data-slot":"tooltip-content",sideOffset:r,className:a("bg-primary text-primary-foreground shadow-md border animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance",i),...n},p,o.createElement(t.Arrow,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})))}e(f,"TooltipContent");export{l as a,d as b,s as c,f as d};
2
- //# sourceMappingURL=chunk-3FVI5JIC.js.map
@@ -1,2 +0,0 @@
1
- import{a as e}from"./chunk-5ETXP2QF.js";import{a as t}from"./chunk-AYDF3IFZ.js";import{Slot as d}from"@radix-ui/react-slot";import{cva as u}from"class-variance-authority";import*as o from"react";var p=u("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none aria-invalid:ring-destructive/20 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90",outline:"border border-input bg-background shadow-xs",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-link-button-primary underline-offset-4 hover:underline button-link"},size:{default:"h-9 px-4 py-7 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9",link:"px-0"}},defaultVariants:{variant:"default",size:"default"}});function b({className:n,variant:r,size:a,asChild:s=!1,...i}){return o.createElement(s?d:"button",{"data-slot":"button",className:e(p({variant:r,size:a,className:n}),"RemoteFlows__Button"),...i})}t(b,"Button");export{p as a,b};
2
- //# sourceMappingURL=chunk-56BNVYTD.js.map
@@ -1,2 +0,0 @@
1
- import{a}from"./chunk-MESREYTZ.js";import{b as s}from"./chunk-5ETXP2QF.js";import{a as o}from"./chunk-AYDF3IFZ.js";import r from"react";function n({grossSalary:t,currency:e}){return r.createElement("div",null,r.createElement("div",{className:"flex justify-between items-center mb-2"},r.createElement("h3",{className:"font-medium text-primary-foreground"},"Gross Salary"),r.createElement("span",{className:"font-semibold text-lg"},s(t,e))),r.createElement(a,null))}o(n,"CostCalculatorGrossSalary");export{n as a};
2
- //# sourceMappingURL=chunk-6A3F6JG6.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/flows/CostCalculator/Results/CostCalculatorGrossSalary.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Separator } from '@/src/components/ui/separator';\nimport { formatCurrency } from '@/src/lib/utils';\n\ntype CostCalculatorGrossSalaryProps = {\n grossSalary: number;\n currency: string;\n};\n\nexport function CostCalculatorGrossSalary({\n grossSalary,\n currency,\n}: CostCalculatorGrossSalaryProps) {\n return (\n <div>\n <div className=\"flex justify-between items-center mb-2\">\n <h3 className=\"font-medium text-primary-foreground\">Gross Salary</h3>\n <span className=\"font-semibold text-lg\">\n {formatCurrency(grossSalary, currency)}\n </span>\n </div>\n <Separator />\n </div>\n );\n}\n"],"mappings":"mHAAA,OAAOA,MAAW,QAUX,SAASC,EAA0B,CACxC,YAAAC,EACA,SAAAC,CACF,EAAmC,CACjC,OACEC,EAAA,cAAC,WACCA,EAAA,cAAC,OAAI,UAAU,0CACbA,EAAA,cAAC,MAAG,UAAU,uCAAsC,cAAY,EAChEA,EAAA,cAAC,QAAK,UAAU,yBACbC,EAAeH,EAAaC,CAAQ,CACvC,CACF,EACAC,EAAA,cAACE,EAAA,IAAU,CACb,CAEJ,CAfgBC,EAAAN,EAAA","names":["React","CostCalculatorGrossSalary","grossSalary","currency","React","formatCurrency","Separator","__name"]}
@@ -1,2 +0,0 @@
1
- import{a as m}from"./chunk-Q64URAIN.js";import{b as r}from"./chunk-DZYFSFZ7.js";import{a as o}from"./chunk-AYDF3IFZ.js";import a from"react";function p({onSubmit:n}){let{terminationBag:i}=r();return a.createElement(m,{onSubmit:o(async t=>{await n?.(i?.parseFormValues(t)),i?.next()},"handleSubmit")})}o(p,"TerminationDetailsForm");export{p as a};
2
- //# sourceMappingURL=chunk-6TYJC6YS.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/flows/Termination/TerminationDetailsForm.tsx"],"sourcesContent":["import React from 'react';\nimport { useTerminationContext } from './context';\nimport { TerminationFormValues } from '@/src/flows/Termination/types';\nimport { TerminationForm } from '@/src/flows/Termination/TerminationForm';\n\ntype TerminationDetailsFormProps = {\n /*\n * The function is called when the form is submitted. It receives the form values as an argument.\n */\n onSubmit?: (payload: TerminationFormValues) => void | Promise<void>;\n};\n\nexport function TerminationDetailsForm({\n onSubmit,\n}: TerminationDetailsFormProps) {\n const { terminationBag } = useTerminationContext();\n const handleSubmit = async (values: TerminationFormValues) => {\n await onSubmit?.(\n terminationBag?.parseFormValues(values) as TerminationFormValues,\n );\n terminationBag?.next();\n };\n\n return <TerminationForm onSubmit={handleSubmit} />;\n}\n"],"mappings":"wHAAA,OAAOA,MAAW,QAYX,SAASC,EAAuB,CACrC,SAAAC,CACF,EAAgC,CAC9B,GAAM,CAAE,eAAAC,CAAe,EAAIC,EAAsB,EAQjD,OAAOC,EAAA,cAACC,EAAA,CAAgB,SAPHC,EAAA,MAAOC,GAAkC,CAC5D,MAAMN,IACJC,GAAgB,gBAAgBK,CAAM,CACxC,EACAL,GAAgB,KAAK,CACvB,EALqB,gBAO2B,CAClD,CAZgBI,EAAAN,EAAA","names":["React","TerminationDetailsForm","onSubmit","terminationBag","useTerminationContext","React","TerminationForm","__name","values"]}
@@ -1,2 +0,0 @@
1
- import{b as r}from"./chunk-OLJ2S6A6.js";import{b as n}from"./chunk-56BNVYTD.js";import{a as e}from"./chunk-5ETXP2QF.js";import{a as o}from"./chunk-AYDF3IFZ.js";import i from"react";function _({children:s,...t}){let{form:m,formId:l,costCalculatorBag:u}=r();return i.createElement(n,{...t,type:"reset",className:e("RemoteFlows__CostCalculatorForm__ResetButton",t.className),form:l,onClick:a=>{u?.resetForm(),m.reset(),t.onClick?.(a)}},s)}o(_,"CostCalculatorResetButton");export{_ as a};
2
- //# sourceMappingURL=chunk-7CYG2RHP.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/flows/CostCalculator/CostCalculatorResetButton.tsx"],"sourcesContent":["import { Button } from '@/src/components/ui/button';\nimport React, { ButtonHTMLAttributes, PropsWithChildren } from 'react';\nimport { useCostCalculatorContext } from './context';\nimport { cn } from '@/src/lib/utils';\n\nexport function CostCalculatorResetButton({\n children,\n ...props\n}: PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>>) {\n const { form, formId, costCalculatorBag } = useCostCalculatorContext();\n return (\n <Button\n {...props}\n type=\"reset\"\n className={cn(\n 'RemoteFlows__CostCalculatorForm__ResetButton',\n props.className,\n )}\n form={formId}\n onClick={(evt) => {\n costCalculatorBag?.resetForm();\n form.reset();\n props.onClick?.(evt);\n }}\n >\n {children}\n </Button>\n );\n}\n"],"mappings":"gKACA,OAAOA,MAAwD,QAIxD,SAASC,EAA0B,CACxC,SAAAC,EACA,GAAGC,CACL,EAA+D,CAC7D,GAAM,CAAE,KAAAC,EAAM,OAAAC,EAAQ,kBAAAC,CAAkB,EAAIC,EAAyB,EACrE,OACEC,EAAA,cAACC,EAAA,CACE,GAAGN,EACJ,KAAK,QACL,UAAWO,EACT,+CACAP,EAAM,SACR,EACA,KAAME,EACN,QAAUM,GAAQ,CAChBL,GAAmB,UAAU,EAC7BF,EAAK,MAAM,EACXD,EAAM,UAAUQ,CAAG,CACrB,GAECT,CACH,CAEJ,CAvBgBU,EAAAX,EAAA","names":["React","CostCalculatorResetButton","children","props","form","formId","costCalculatorBag","useCostCalculatorContext","React","Button","cn","evt","__name"]}
@@ -1,2 +0,0 @@
1
- import{c as n}from"./chunk-VRQXHCFR.js";import{a as m}from"./chunk-IDSJI7KQ.js";import{b as a}from"./chunk-6HGUGIYJ.js";import{a as o}from"./chunk-AYDF3IFZ.js";import s from"react";import{useForm as S}from"react-hook-form";function w({onSubmit:i,onError:d,onSuccess:c}){let{contractAmendment:{stepState:l,isSubmitting:u,onSubmit:f,fields:C},formId:p}=a(),r=S({defaultValues:l.values?.form}),A=o(async e=>{let F=n(e,C,{isPartialValidation:!1});await i?.(F);let t=await f(e);t.error?d?.(t.error):c?.(t.data)},"handleSubmit");return u?null:s.createElement(m,{...r},s.createElement("form",{id:p,onSubmit:r.handleSubmit(A),className:"RemoteFlows__ContractAmendmentConfirmationForm"}))}o(w,"ContractAmendmentConfirmationForm");export{w as a};
2
- //# sourceMappingURL=chunk-ABR3B66K.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/flows/ContractAmendment/ContractAmendmentConfirmationForm.tsx"],"sourcesContent":["import {\n ContractAmendmentResponse,\n PostCreateContractAmendmentError,\n} from '@/src/client';\nimport { parseJSFToValidate } from '@/src/components/form/utils';\nimport { Form } from '@/src/components/ui/form';\nimport React from 'react';\nimport { FieldValues, useForm } from 'react-hook-form';\nimport { useContractAmendmentContext } from './context';\n\ntype ContractAmendmentConfirmationFormProps = {\n /**\n * Callback function to be called when the contract amendment form is submitted.\n * This function is called before the contract amendment is submitted.\n * It can be used to perform any additional validation or processing before\n * the contract amendment is submitted.\n * @param values\n * @returns\n */\n onSubmit?: (values: FieldValues) => Promise<void>;\n /**\n * Callback function to be called when the contract amendment fails.\n * @param error\n * @returns\n */\n onError?: (error: PostCreateContractAmendmentError) => void;\n /**\n * Callback function to be called when the contract amendment is successfully submitted.\n * @param data\n * @returns\n */\n onSuccess?: (data: ContractAmendmentResponse) => void;\n};\n\nexport function ContractAmendmentConfirmationForm({\n onSubmit,\n onError,\n onSuccess,\n}: ContractAmendmentConfirmationFormProps) {\n const {\n contractAmendment: {\n stepState,\n isSubmitting,\n onSubmit: submitContractAmendment,\n fields,\n },\n formId,\n } = useContractAmendmentContext();\n const form = useForm({\n defaultValues: stepState.values?.form,\n });\n\n const handleSubmit = async (values: FieldValues) => {\n const parsedValues = parseJSFToValidate(values, fields, {\n isPartialValidation: false,\n });\n await onSubmit?.(parsedValues);\n\n const contractAmendmentResult = await submitContractAmendment(values);\n\n if (contractAmendmentResult.error) {\n onError?.(\n contractAmendmentResult.error as PostCreateContractAmendmentError,\n );\n } else {\n onSuccess?.(contractAmendmentResult.data as ContractAmendmentResponse);\n }\n };\n\n // Ensure that step\n if (isSubmitting) {\n return null;\n }\n\n return (\n <Form {...form}>\n <form\n id={formId}\n onSubmit={form.handleSubmit(handleSubmit)}\n className=\"RemoteFlows__ContractAmendmentConfirmationForm\"\n ></form>\n </Form>\n );\n}\n"],"mappings":"gKAMA,OAAOA,MAAW,QAClB,OAAsB,WAAAC,MAAe,kBA2B9B,SAASC,EAAkC,CAChD,SAAAC,EACA,QAAAC,EACA,UAAAC,CACF,EAA2C,CACzC,GAAM,CACJ,kBAAmB,CACjB,UAAAC,EACA,aAAAC,EACA,SAAUC,EACV,OAAAC,CACF,EACA,OAAAC,CACF,EAAIC,EAA4B,EAC1BC,EAAOC,EAAQ,CACnB,cAAeP,EAAU,QAAQ,IACnC,CAAC,EAEKQ,EAAeC,EAAA,MAAOC,GAAwB,CAClD,IAAMC,EAAeC,EAAmBF,EAAQP,EAAQ,CACtD,oBAAqB,EACvB,CAAC,EACD,MAAMN,IAAWc,CAAY,EAE7B,IAAME,EAA0B,MAAMX,EAAwBQ,CAAM,EAEhEG,EAAwB,MAC1Bf,IACEe,EAAwB,KAC1B,EAEAd,IAAYc,EAAwB,IAAiC,CAEzE,EAfqB,gBAkBrB,OAAIZ,EACK,KAIPa,EAAA,cAACC,EAAA,CAAM,GAAGT,GACRQ,EAAA,cAAC,QACC,GAAIV,EACJ,SAAUE,EAAK,aAAaE,CAAY,EACxC,UAAU,iDACX,CACH,CAEJ,CAjDgBC,EAAAb,EAAA","names":["React","useForm","ContractAmendmentConfirmationForm","onSubmit","onError","onSuccess","stepState","isSubmitting","submitContractAmendment","fields","formId","useContractAmendmentContext","form","useForm","handleSubmit","__name","values","parsedValues","parseJSFToValidate","contractAmendmentResult","React","Form"]}
@@ -1,2 +0,0 @@
1
- import{a as s}from"./chunk-NE547PW4.js";import{b as a}from"./chunk-WS3C3WIJ.js";import{a as m}from"./chunk-JRQSZHUU.js";import{b as i}from"./chunk-56BNVYTD.js";import{a as o}from"./chunk-AYDF3IFZ.js";import y from"react";function w({onSubmit:u,onSuccess:d,onError:n,...e}){let{onboardingBag:r}=a(),p=s(),{mutateAsync:c}=m(p),l=o(async()=>{try{if(await u?.(),!r.employmentId)throw new Error("Employment ID is required");let t=await c({employment_id:r.employmentId});if(t.data?.data){d?.(t.data.data);return}t.error&&n?.(t.error)}catch(t){n?.(t)}},"handleSubmit");return y.createElement(i,{...e,onClick:()=>{l()}},e.children)}o(w,"OnboardingInvite");export{w as a};
2
- //# sourceMappingURL=chunk-ALRU77S5.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/flows/Onboarding/OnboardingInvite.tsx"],"sourcesContent":["import React, { ButtonHTMLAttributes, PropsWithChildren } from 'react';\nimport { useEmploymentInvite } from './hooks';\nimport { Button } from '@/src/components/ui/button';\nimport { mutationToPromise } from '@/src/lib/mutations';\nimport { SuccessResponse } from '@/src/client';\nimport { useOnboardingContext } from './context';\n\ntype OnboardingInviteProps = PropsWithChildren<\n ButtonHTMLAttributes<HTMLButtonElement> & {\n onSuccess?: (data: SuccessResponse) => void;\n onError?: (error: unknown) => void;\n onSubmit?: () => void;\n }\n>;\n\nexport function OnboardingInvite({\n onSubmit,\n onSuccess,\n onError,\n ...props\n}: OnboardingInviteProps) {\n const { onboardingBag } = useOnboardingContext();\n const employmentInviteMutation = useEmploymentInvite();\n\n const { mutateAsync: employmentInviteMutationAsync } = mutationToPromise(\n employmentInviteMutation,\n );\n\n const handleSubmit = async () => {\n try {\n await onSubmit?.();\n\n if (!onboardingBag.employmentId) {\n throw new Error('Employment ID is required');\n }\n\n const response = await employmentInviteMutationAsync({\n employment_id: onboardingBag.employmentId,\n });\n if (response.data?.data) {\n onSuccess?.(response.data.data);\n return;\n }\n if (response.error) {\n onError?.(response.error);\n }\n } catch (error) {\n onError?.(error);\n }\n };\n\n return (\n <Button\n {...props}\n onClick={() => {\n handleSubmit();\n }}\n >\n {props.children}\n </Button>\n );\n}\n"],"mappings":"wMAAA,OAAOA,MAAwD,QAexD,SAASC,EAAiB,CAC/B,SAAAC,EACA,UAAAC,EACA,QAAAC,EACA,GAAGC,CACL,EAA0B,CACxB,GAAM,CAAE,cAAAC,CAAc,EAAIC,EAAqB,EACzCC,EAA2BC,EAAoB,EAE/C,CAAE,YAAaC,CAA8B,EAAIC,EACrDH,CACF,EAEMI,EAAeC,EAAA,SAAY,CAC/B,GAAI,CAGF,GAFA,MAAMX,IAAW,EAEb,CAACI,EAAc,aACjB,MAAM,IAAI,MAAM,2BAA2B,EAG7C,IAAMQ,EAAW,MAAMJ,EAA8B,CACnD,cAAeJ,EAAc,YAC/B,CAAC,EACD,GAAIQ,EAAS,MAAM,KAAM,CACvBX,IAAYW,EAAS,KAAK,IAAI,EAC9B,MACF,CACIA,EAAS,OACXV,IAAUU,EAAS,KAAK,CAE5B,OAASC,EAAO,CACdX,IAAUW,CAAK,CACjB,CACF,EArBqB,gBAuBrB,OACEC,EAAA,cAACC,EAAA,CACE,GAAGZ,EACJ,QAAS,IAAM,CACbO,EAAa,CACf,GAECP,EAAM,QACT,CAEJ,CA9CgBQ,EAAAZ,EAAA","names":["React","OnboardingInvite","onSubmit","onSuccess","onError","props","onboardingBag","useOnboardingContext","employmentInviteMutation","useEmploymentInvite","employmentInviteMutationAsync","mutationToPromise","handleSubmit","__name","response","error","React","Button"]}
@@ -1,2 +0,0 @@
1
- var c=Object.defineProperty;var d=(a,b)=>c(a,"name",{value:b,configurable:!0});export{d as a};
2
- //# sourceMappingURL=chunk-AYDF3IFZ.js.map
@@ -1,2 +0,0 @@
1
- import{a as e}from"./chunk-LNKYOAKF.js";import{b as i}from"./chunk-WS3C3WIJ.js";import{a}from"./chunk-AYDF3IFZ.js";import f from"react";function l({onSubmit:m,onSuccess:s,onError:t}){let{onboardingBag:r}=i(),p=a(async n=>{try{await m?.(r.parseFormValues(n));let o=await r.onSubmit(n);if(o?.data?.data){s?.(o?.data?.data),r?.next();return}o?.error&&t?.(o?.error)}catch(o){t?.(o)}},"handleSubmit");return f.createElement(e,{defaultValues:r.stepState.values?.basic_information||r.initialValues.basic_information,onSubmit:p})}a(l,"BasicInformationStep");export{l as a};
2
- //# sourceMappingURL=chunk-CFRYIKSR.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/flows/Onboarding/BasicInformationStep.tsx"],"sourcesContent":["import React from 'react';\nimport { useOnboardingContext } from './context';\nimport { OnboardingForm } from '@/src/flows/Onboarding/OnboardingForm';\nimport { BasicInformationFormPayload } from '@/src/flows/Onboarding/types';\nimport { EmploymentCreationResponse } from '@/src/client';\nimport { $TSFixMe } from '@remoteoss/json-schema-form';\n\ntype BasicInformationStepProps = {\n /*\n * The function is called when the form is submitted. It receives the form values as an argument.\n */\n onSubmit?: (payload: BasicInformationFormPayload) => void | Promise<void>;\n /*\n * The function is called when the form submission is successful.\n */\n onSuccess?: (data: EmploymentCreationResponse) => void;\n /*\n * The function is called when an error occurs during form submission.\n */\n onError?: (error: Error) => void;\n};\n\nexport function BasicInformationStep({\n onSubmit,\n onSuccess,\n onError,\n}: BasicInformationStepProps) {\n const { onboardingBag } = useOnboardingContext();\n const handleSubmit = async (payload: $TSFixMe) => {\n try {\n await onSubmit?.(\n onboardingBag.parseFormValues(payload) as BasicInformationFormPayload,\n );\n const response = await onboardingBag.onSubmit(payload);\n if (response?.data?.data) {\n onSuccess?.(response?.data?.data as EmploymentCreationResponse);\n onboardingBag?.next();\n return;\n }\n if (response?.error) {\n onError?.(response?.error);\n }\n } catch (error: unknown) {\n onError?.(error as Error);\n }\n };\n\n return (\n <OnboardingForm\n defaultValues={\n onboardingBag.stepState.values?.basic_information ||\n onboardingBag.initialValues.basic_information\n }\n onSubmit={handleSubmit}\n />\n );\n}\n"],"mappings":"mHAAA,OAAOA,MAAW,QAsBX,SAASC,EAAqB,CACnC,SAAAC,EACA,UAAAC,EACA,QAAAC,CACF,EAA8B,CAC5B,GAAM,CAAE,cAAAC,CAAc,EAAIC,EAAqB,EACzCC,EAAeC,EAAA,MAAOC,GAAsB,CAChD,GAAI,CACF,MAAMP,IACJG,EAAc,gBAAgBI,CAAO,CACvC,EACA,IAAMC,EAAW,MAAML,EAAc,SAASI,CAAO,EACrD,GAAIC,GAAU,MAAM,KAAM,CACxBP,IAAYO,GAAU,MAAM,IAAkC,EAC9DL,GAAe,KAAK,EACpB,MACF,CACIK,GAAU,OACZN,IAAUM,GAAU,KAAK,CAE7B,OAASC,EAAgB,CACvBP,IAAUO,CAAc,CAC1B,CACF,EAjBqB,gBAmBrB,OACEC,EAAA,cAACC,EAAA,CACC,cACER,EAAc,UAAU,QAAQ,mBAChCA,EAAc,cAAc,kBAE9B,SAAUE,EACZ,CAEJ,CAlCgBC,EAAAP,EAAA","names":["React","BasicInformationStep","onSubmit","onSuccess","onError","onboardingBag","useOnboardingContext","handleSubmit","__name","payload","response","error","React","OnboardingForm"]}
@@ -1,2 +0,0 @@
1
- import{a as r}from"./chunk-Q64URAIN.js";import{b as m}from"./chunk-DZYFSFZ7.js";import{a as o}from"./chunk-AYDF3IFZ.js";import a from"react";function p({onSubmit:n}){let{terminationBag:i}=m();return a.createElement(r,{onSubmit:o(async t=>{await n?.(i?.parseFormValues(t)),i?.next()},"handleSubmit")})}o(p,"PaidTimeOffForm");export{p as a};
2
- //# sourceMappingURL=chunk-CKEVRQRG.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/flows/Termination/PaidTimeOffForm.tsx"],"sourcesContent":["import React from 'react';\nimport { useTerminationContext } from './context';\nimport { TerminationFormValues } from '@/src/flows/Termination/types';\nimport { TerminationForm } from '@/src/flows/Termination/TerminationForm';\n\ntype PaidTimeOffFormProps = {\n /*\n * The function is called when the form is submitted. It receives the form values as an argument.\n */\n onSubmit?: (payload: TerminationFormValues) => void | Promise<void>;\n};\n\nexport function PaidTimeOffForm({ onSubmit }: PaidTimeOffFormProps) {\n const { terminationBag } = useTerminationContext();\n const handleSubmit = async (values: TerminationFormValues) => {\n await onSubmit?.(\n terminationBag?.parseFormValues(values) as TerminationFormValues,\n );\n terminationBag?.next();\n };\n\n return <TerminationForm onSubmit={handleSubmit} />;\n}\n"],"mappings":"wHAAA,OAAOA,MAAW,QAYX,SAASC,EAAgB,CAAE,SAAAC,CAAS,EAAyB,CAClE,GAAM,CAAE,eAAAC,CAAe,EAAIC,EAAsB,EAQjD,OAAOC,EAAA,cAACC,EAAA,CAAgB,SAPHC,EAAA,MAAOC,GAAkC,CAC5D,MAAMN,IACJC,GAAgB,gBAAgBK,CAAM,CACxC,EACAL,GAAgB,KAAK,CACvB,EALqB,gBAO2B,CAClD,CAVgBI,EAAAN,EAAA","names":["React","PaidTimeOffForm","onSubmit","terminationBag","useTerminationContext","React","TerminationForm","__name","values"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/flows/Termination/TimeOff.tsx"],"sourcesContent":["import { EmploymentShowResponse, ListTimeoffResponse } from '@/src/client';\nimport { useEmploymentQuery, useTimeOffQuery } from '@/src/common/hooks';\nimport { useTerminationContext } from '@/src/flows/Termination/context';\nimport React from 'react';\n\nexport const TimeOff = ({\n render,\n}: {\n render: (props: {\n employment: EmploymentShowResponse | undefined;\n timeoff: ListTimeoffResponse | undefined;\n }) => React.ReactNode;\n}) => {\n const { terminationBag } = useTerminationContext();\n const { data: employment } = useEmploymentQuery({\n employmentId: terminationBag.employmentId,\n });\n\n const { data: timeoff } = useTimeOffQuery({\n employmentId: terminationBag.employmentId,\n status: 'taken',\n });\n\n return render({ employment, timeoff });\n};\n"],"mappings":"+HAKO,IAAMA,EAAUC,EAAA,CAAC,CACtB,OAAAC,CACF,IAKM,CACJ,GAAM,CAAE,eAAAC,CAAe,EAAIC,EAAsB,EAC3C,CAAE,KAAMC,CAAW,EAAIC,EAAmB,CAC9C,aAAcH,EAAe,YAC/B,CAAC,EAEK,CAAE,KAAMI,CAAQ,EAAIC,EAAgB,CACxC,aAAcL,EAAe,aAC7B,OAAQ,OACV,CAAC,EAED,OAAOD,EAAO,CAAE,WAAAG,EAAY,QAAAE,CAAQ,CAAC,CACvC,EAnBuB","names":["TimeOff","__name","render","terminationBag","useTerminationContext","employment","useEmploymentQuery","timeoff","useTimeOffQuery"]}
@@ -1,2 +0,0 @@
1
- import{d as s,e}from"./chunk-GRYAM4FZ.js";import{a as l}from"./chunk-OLJ2S6A6.js";import{b as a}from"./chunk-A4RX3KRZ.js";import{a as r}from"./chunk-AYDF3IFZ.js";import g,{useId as y}from"react";import{useForm as p}from"react-hook-form";var v=r(({estimationOptions:n=s,defaultValues:o={countryRegionSlug:"",currencySlug:"",salary:""},options:i,render:u})=>{let c=y(),t=e({defaultRegion:o.countryRegionSlug,estimationOptions:n,options:i}),m=a(t.handleValidation),C=p({resolver:m,defaultValues:{country:o?.countryRegionSlug,currency:o?.currencySlug,region:"",salary:o?.salary},shouldUnregister:!0,mode:"onBlur"});return g.createElement(l.Provider,{value:{form:C,formId:c,costCalculatorBag:t}},u(t))},"CostCalculatorFlow");export{v as a};
2
- //# sourceMappingURL=chunk-DE5FSFYL.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/flows/CostCalculator/CostCalculatorFlow.tsx"],"sourcesContent":["import { useJsonSchemasValidationFormResolver } from '@/src/components/form/yupValidationResolver';\nimport { CostCalculatorContext } from '@/src/flows/CostCalculator/context';\nimport {\n defaultEstimationOptions,\n useCostCalculator,\n} from '@/src/flows/CostCalculator/hooks';\nimport {\n CostCalculatorEstimationOptions,\n JSFModify,\n} from '@/src/flows/CostCalculator/types';\nimport React, { useId } from 'react';\nimport { useForm } from 'react-hook-form';\n\nexport type CostCalculatorFlowProps = {\n /**\n * Estimation params allows you to customize the parameters sent to the /cost-calculator/estimation endpoint.\n */\n estimationOptions?: CostCalculatorEstimationOptions;\n /**\n * Default values for the form fields.\n */\n defaultValues?: Partial<{\n /**\n * Default value for the country field.\n */\n countryRegionSlug: string;\n /**\n * Default value for the currency field.\n */\n currencySlug: string;\n /**\n * Default value for the salary field.\n */\n salary: string;\n }>;\n options?: {\n jsfModify?: JSFModify;\n };\n render: (\n costCalculatorBag: ReturnType<typeof useCostCalculator>,\n ) => React.ReactNode;\n};\n\nexport const CostCalculatorFlow = ({\n estimationOptions = defaultEstimationOptions,\n defaultValues = {\n countryRegionSlug: '',\n currencySlug: '',\n salary: '',\n },\n options,\n render,\n}: CostCalculatorFlowProps) => {\n const formId = useId();\n const costCalculatorBag = useCostCalculator({\n defaultRegion: defaultValues.countryRegionSlug,\n estimationOptions,\n options,\n });\n const resolver = useJsonSchemasValidationFormResolver(\n // @ts-expect-error no matching type\n costCalculatorBag.handleValidation,\n );\n\n const form = useForm({\n resolver,\n defaultValues: {\n country: defaultValues?.countryRegionSlug,\n currency: defaultValues?.currencySlug,\n region: '',\n salary: defaultValues?.salary,\n },\n shouldUnregister: true,\n mode: 'onBlur',\n });\n\n return (\n <CostCalculatorContext.Provider\n value={{\n form,\n formId: formId,\n costCalculatorBag,\n }}\n >\n {render(costCalculatorBag)}\n </CostCalculatorContext.Provider>\n );\n};\n"],"mappings":"kKAUA,OAAOA,GAAS,SAAAC,MAAa,QAC7B,OAAS,WAAAC,MAAe,kBAgCjB,IAAMC,EAAqBC,EAAA,CAAC,CACjC,kBAAAC,EAAoBC,EACpB,cAAAC,EAAgB,CACd,kBAAmB,GACnB,aAAc,GACd,OAAQ,EACV,EACA,QAAAC,EACA,OAAAC,CACF,IAA+B,CAC7B,IAAMC,EAASC,EAAM,EACfC,EAAoBC,EAAkB,CAC1C,cAAeN,EAAc,kBAC7B,kBAAAF,EACA,QAAAG,CACF,CAAC,EACKM,EAAWC,EAEfH,EAAkB,gBACpB,EAEMI,EAAOC,EAAQ,CACnB,SAAAH,EACA,cAAe,CACb,QAASP,GAAe,kBACxB,SAAUA,GAAe,aACzB,OAAQ,GACR,OAAQA,GAAe,MACzB,EACA,iBAAkB,GAClB,KAAM,QACR,CAAC,EAED,OACEW,EAAA,cAACC,EAAsB,SAAtB,CACC,MAAO,CACL,KAAAH,EACA,OAAQN,EACR,kBAAAE,CACF,GAECH,EAAOG,CAAiB,CAC3B,CAEJ,EA5CkC","names":["React","useId","useForm","CostCalculatorFlow","__name","estimationOptions","defaultEstimationOptions","defaultValues","options","render","formId","useId","costCalculatorBag","useCostCalculator","resolver","useJsonSchemasValidationFormResolver","form","useForm","React","CostCalculatorContext"]}
@@ -1,2 +0,0 @@
1
- import{a as p}from"./chunk-DYB3RWP7.js";import{b as d}from"./chunk-56BNVYTD.js";import{a as s}from"./chunk-5ETXP2QF.js";import{a as m}from"./chunk-AYDF3IFZ.js";import o from"react";import*as a from"react";import{Drawer as l}from"vaul";var f=m(({shouldScaleBackground:r=!0,...e})=>a.createElement(l.Root,{shouldScaleBackground:r,...e}),"Drawer");f.displayName="Drawer";var y=l.Trigger,h=l.Portal,P=l.Close,N=a.forwardRef(({className:r,...e},i)=>a.createElement(l.Overlay,{ref:i,className:s("fixed inset-0 z-50 bg-black/80",r),...e}));N.displayName=l.Overlay.displayName;var D=a.forwardRef(({className:r,children:e,...i},c)=>a.createElement(h,null,a.createElement(N,null),a.createElement(l.Content,{ref:c,className:s("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",r),...i},a.createElement("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),e)));D.displayName="DrawerContent";var w=m(({className:r,...e})=>a.createElement("div",{className:s("grid gap-1.5 p-4 text-center sm:text-left",r),...e}),"DrawerHeader");w.displayName="DrawerHeader";var C=m(({className:r,...e})=>a.createElement("div",{className:s("mt-auto flex flex-col gap-2 p-4",r),...e}),"DrawerFooter");C.displayName="DrawerFooter";var u=a.forwardRef(({className:r,...e},i)=>a.createElement(l.Title,{ref:i,className:s("text-lg font-semibold leading-none tracking-tight",r),...e}));u.displayName=l.Title.displayName;var v=a.forwardRef(({className:r,...e},i)=>a.createElement(l.Description,{ref:i,className:s("text-sm text-muted-foreground",r),...e}));v.displayName=l.Description.displayName;import*as n from"react";import*as t from"@radix-ui/react-scroll-area";var g=n.forwardRef(({className:r,children:e,...i},c)=>n.createElement(t.Root,{ref:c,className:s("relative overflow-hidden",r),...i},n.createElement(t.Viewport,{className:"h-full w-full rounded-[inherit]"},e),n.createElement(b,null),n.createElement(t.Corner,null)));g.displayName=t.Root.displayName;var b=n.forwardRef(({className:r,orientation:e="vertical",...i},c)=>n.createElement(t.ScrollAreaScrollbar,{ref:c,orientation:e,className:s("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",r),...i},n.createElement(t.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})));b.displayName=t.ScrollAreaScrollbar.displayName;import{X as S}from"lucide-react";var O=m(({label:r="Disclaimer"})=>o.createElement(f,null,o.createElement(y,{asChild:!0},o.createElement(d,{variant:"link",size:"link"},r)),o.createElement(D,null,o.createElement(w,null,o.createElement(P,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none"},o.createElement(S,{className:"h-4 w-4"}),o.createElement("span",{className:"sr-only"},"Close")),o.createElement(u,null,p?.data.title),o.createElement(v,null,"For more details read our"," ",o.createElement(d,{variant:"link",size:"link",asChild:!0},o.createElement("a",{href:p?.data.html_url,target:"_blank",rel:"noopener noreferrer"},"Disclaimer")))),o.createElement(g,{className:"px-4 pb-4 overflow-y-auto max-h-[calc(80vh-120px)] cost-calculator-disclaimer-drawer-scroll-area"},o.createElement("div",{className:"cost-calculator-disclaimer-drawer-body",dangerouslySetInnerHTML:{__html:p?.data.body??""}})))),"CostCalculatorDisclaimer");export{O as a};
2
- //# sourceMappingURL=chunk-DGPRFQYK.js.map