@remoteoss/remote-flows 0.21.1 → 0.23.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 (346) hide show
  1. package/README.md +1 -1
  2. package/dist/{utils-CjDMg_Yr.d.ts → ZendeskTriggerButton-FSCvhzTG.d.ts} +10 -1
  3. package/dist/{chunk-VSUEF4AY.js → chunk-2DSNHYHZ.js} +2 -2
  4. package/dist/{chunk-47A5JNKX.js → chunk-2T2N5226.js} +2 -2
  5. package/dist/chunk-2UAG6WDW.js +2 -0
  6. package/dist/{chunk-ISWLTY4E.js → chunk-3A47R5RQ.js} +2 -2
  7. package/dist/{chunk-SFX34GRA.js → chunk-3W7RKLJX.js} +2 -2
  8. package/dist/{chunk-TK6JU3ZG.js → chunk-3XDJ2LRT.js} +2 -2
  9. package/dist/chunk-43WMZDDH.js +2 -0
  10. package/dist/chunk-43WMZDDH.js.map +1 -0
  11. package/dist/{chunk-EAIJKDY4.js → chunk-4HT7RNFP.js} +2 -2
  12. package/dist/{chunk-CLW7CVDG.js → chunk-4NAVUB7D.js} +2 -2
  13. package/dist/{chunk-OUO2RTM4.js → chunk-4SIGN3ZP.js} +2 -2
  14. package/dist/chunk-4T6PRR6R.js +2 -0
  15. package/dist/chunk-4T6PRR6R.js.map +1 -0
  16. package/dist/{chunk-QP36XXCQ.js → chunk-5A54AHAT.js} +2 -2
  17. package/dist/{chunk-RLLBHQWS.js → chunk-5H5INKOY.js} +2 -2
  18. package/dist/{chunk-RVEQJNZI.js → chunk-5ZR7EFPY.js} +2 -2
  19. package/dist/{chunk-U3XZWSEU.js → chunk-64NSBY5G.js} +2 -2
  20. package/dist/{chunk-VOJHAIEH.js → chunk-6VRUYYUV.js} +2 -2
  21. package/dist/{chunk-ODI4OPN7.js → chunk-7IZGKQII.js} +2 -2
  22. package/dist/{chunk-WPMPTV76.js → chunk-7R347KBY.js} +2 -2
  23. package/dist/{chunk-SV2PWH6Y.js → chunk-A7T27JCJ.js} +2 -2
  24. package/dist/{chunk-AKHJDD35.js → chunk-AFRA4BIW.js} +2 -2
  25. package/dist/chunk-AHBACWMD.js +2 -0
  26. package/dist/chunk-AHBACWMD.js.map +1 -0
  27. package/dist/{chunk-ORBIA4S3.js → chunk-ANGJCT4I.js} +2 -2
  28. package/dist/chunk-B7I7YVNK.js +2 -0
  29. package/dist/chunk-B7I7YVNK.js.map +1 -0
  30. package/dist/{chunk-EKK7R3M6.js → chunk-BCXRPHWY.js} +2 -2
  31. package/dist/{chunk-4Q7KTWXP.js → chunk-BNHN4CEM.js} +2 -2
  32. package/dist/{chunk-VHJFIDOX.js → chunk-BV3PGYSH.js} +2 -2
  33. package/dist/chunk-CGUTMSAU.js +2 -0
  34. package/dist/chunk-CGUTMSAU.js.map +1 -0
  35. package/dist/{chunk-XASIKHZL.js → chunk-CNDSIADP.js} +2 -2
  36. package/dist/{chunk-WY3KCHHG.js → chunk-CRHH6IPF.js} +2 -2
  37. package/dist/{chunk-BCSSGG6E.js → chunk-D6X2WCEG.js} +2 -2
  38. package/dist/{chunk-L2GYSHXS.js → chunk-DPY77ASH.js} +2 -2
  39. package/dist/{chunk-AXES4NFY.js → chunk-DTHBG6BD.js} +2 -2
  40. package/dist/{chunk-SDIBOMMT.js → chunk-DUD7B2IY.js} +2 -2
  41. package/dist/{chunk-ZZNI7IY2.js → chunk-EKKRQI6B.js} +2 -2
  42. package/dist/chunk-FBJCDOO7.js +2 -0
  43. package/dist/{chunk-VXPJXQP3.js.map → chunk-FBJCDOO7.js.map} +1 -1
  44. package/dist/{chunk-LJ36642G.js → chunk-FMBYJANY.js} +2 -2
  45. package/dist/chunk-G34OX26W.js +2 -0
  46. package/dist/chunk-G34OX26W.js.map +1 -0
  47. package/dist/{chunk-L5CORHOG.js → chunk-G4QOEPDP.js} +2 -2
  48. package/dist/{chunk-56D2YDS2.js → chunk-GKS3W6KT.js} +2 -2
  49. package/dist/{chunk-KSHPBRPW.js → chunk-H425RKFI.js} +2 -2
  50. package/dist/{chunk-UCLVNY25.js → chunk-HEQLPSHZ.js} +2 -2
  51. package/dist/{chunk-ZZ6MU7PF.js → chunk-HPBT677J.js} +2 -2
  52. package/dist/{chunk-S2AQQVM7.js → chunk-HPHWQU34.js} +2 -2
  53. package/dist/chunk-HYIC33YR.js +2 -0
  54. package/dist/chunk-HYIC33YR.js.map +1 -0
  55. package/dist/{chunk-XRB4Y7WT.js → chunk-ILPYR7RQ.js} +2 -2
  56. package/dist/{chunk-XQ5TL23G.js → chunk-IM525UMG.js} +2 -2
  57. package/dist/{chunk-XQ5TL23G.js.map → chunk-IM525UMG.js.map} +1 -1
  58. package/dist/{chunk-MISHDUB2.js → chunk-IXAWEBRI.js} +2 -2
  59. package/dist/{chunk-MISHDUB2.js.map → chunk-IXAWEBRI.js.map} +1 -1
  60. package/dist/{chunk-XGPCOHUF.js → chunk-IYGJ5QJB.js} +2 -2
  61. package/dist/chunk-JF3KJ6PA.js +2 -0
  62. package/dist/chunk-JF3KJ6PA.js.map +1 -0
  63. package/dist/{chunk-5EP45OQV.js → chunk-JVSD4JOU.js} +2 -2
  64. package/dist/{chunk-DPIKH7BI.js → chunk-L2IKFFQX.js} +2 -2
  65. package/dist/{chunk-IQ2HRDC4.js → chunk-LEXD5FVL.js} +2 -2
  66. package/dist/{chunk-G343WOO7.js → chunk-LUDRB7LC.js} +2 -2
  67. package/dist/chunk-LUDRB7LC.js.map +1 -0
  68. package/dist/{chunk-5JGYNS2O.js → chunk-LWGVLLBH.js} +2 -2
  69. package/dist/{chunk-PAZGF4C3.js → chunk-MQ6F5LE4.js} +2 -2
  70. package/dist/{chunk-QBEJBOGL.js → chunk-MQWVZSGH.js} +2 -2
  71. package/dist/{chunk-W676SMID.js → chunk-N6KOPITR.js} +2 -2
  72. package/dist/{chunk-3MS7FYSY.js → chunk-NGTESOKF.js} +2 -2
  73. package/dist/{chunk-XRU2O525.js → chunk-NIH7XLAK.js} +2 -2
  74. package/dist/{chunk-AWK7AF5V.js → chunk-O4DIUKVP.js} +2 -2
  75. package/dist/{chunk-LSGVE623.js → chunk-OIN3HGOQ.js} +2 -2
  76. package/dist/{chunk-OEEUSIOB.js → chunk-OW5QGJD4.js} +2 -2
  77. package/dist/{chunk-A6QURRVL.js → chunk-P5WUODPR.js} +2 -2
  78. package/dist/{chunk-2GCMLKO2.js → chunk-PAT3EA43.js} +2 -2
  79. package/dist/{chunk-FCAGJMPU.js → chunk-PD24XKD6.js} +2 -2
  80. package/dist/{chunk-C535PFLI.js → chunk-PKRI35YC.js} +2 -2
  81. package/dist/{chunk-PTACLZHT.js → chunk-PWPFCC6I.js} +2 -2
  82. package/dist/{chunk-JE2MYS37.js → chunk-Q4BKFSTW.js} +2 -2
  83. package/dist/{chunk-KRL5QCOA.js → chunk-Q5ZRKZMK.js} +2 -2
  84. package/dist/{chunk-ZXA3CCPB.js → chunk-QIQTM4HB.js} +2 -2
  85. package/dist/chunk-QIQTM4HB.js.map +1 -0
  86. package/dist/{chunk-GFNIN6CJ.js → chunk-RDCWARSM.js} +2 -2
  87. package/dist/{chunk-I2URNHWK.js → chunk-RF5SLMJF.js} +2 -2
  88. package/dist/{chunk-QMUSEX2P.js → chunk-S2XKE7EA.js} +2 -2
  89. package/dist/{chunk-H6G4PPLM.js → chunk-SA3D5OH4.js} +2 -2
  90. package/dist/{chunk-B25LAMRX.js → chunk-SGJSMTYG.js} +2 -2
  91. package/dist/{chunk-GSNOUE4L.js → chunk-TB75BHYW.js} +2 -2
  92. package/dist/{chunk-Z2G2XC43.js → chunk-TWIUL2P3.js} +2 -2
  93. package/dist/{chunk-JNPIBIHZ.js → chunk-U2LOBJFU.js} +2 -2
  94. package/dist/{chunk-CCW6FKQ3.js → chunk-UPXJJBXZ.js} +2 -2
  95. package/dist/{chunk-VOW6W24S.js → chunk-VT4GSXMI.js} +2 -2
  96. package/dist/chunk-WVDTHFGS.js +2 -0
  97. package/dist/chunk-WVDTHFGS.js.map +1 -0
  98. package/dist/{chunk-3GDPOMQP.js → chunk-XMAQ4NRR.js} +2 -2
  99. package/dist/{chunk-G2NIQGHZ.js → chunk-ZQ6MG635.js} +2 -2
  100. package/dist/{chunk-3T43ERBA.js → chunk-ZSCKSEAA.js} +2 -2
  101. package/dist/flows/ContractAmendment/ContractAmendmentBack.js +1 -1
  102. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
  103. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +1 -1
  104. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +3 -3
  105. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  106. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
  107. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  108. package/dist/flows/ContractAmendment/ContractAmendmentSubmit.js +1 -1
  109. package/dist/flows/ContractAmendment/context.d.ts +3 -3
  110. package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
  111. package/dist/flows/ContractAmendment/hooks.js +1 -1
  112. package/dist/flows/ContractAmendment/index.d.ts +3 -3
  113. package/dist/flows/ContractAmendment/index.js +1 -1
  114. package/dist/flows/ContractAmendment/utils.d.ts +1 -1
  115. package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +5 -5
  116. package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
  117. package/dist/flows/ContractorOnboarding/api.d.ts +2 -2
  118. package/dist/flows/ContractorOnboarding/api.js +1 -1
  119. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
  120. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
  121. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +5 -5
  122. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
  123. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +5 -5
  124. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
  125. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +5 -5
  126. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
  127. package/dist/flows/ContractorOnboarding/components/OnboardingBack.js +1 -1
  128. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
  129. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
  130. package/dist/flows/ContractorOnboarding/components/OnboardingSubmit.js +1 -1
  131. package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +5 -5
  132. package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
  133. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
  134. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
  135. package/dist/flows/ContractorOnboarding/context.d.ts +6 -6
  136. package/dist/flows/ContractorOnboarding/hooks.d.ts +5 -5
  137. package/dist/flows/ContractorOnboarding/hooks.js +1 -1
  138. package/dist/flows/ContractorOnboarding/index.d.ts +5 -5
  139. package/dist/flows/ContractorOnboarding/index.js +1 -1
  140. package/dist/flows/ContractorOnboarding/types.d.ts +5 -5
  141. package/dist/flows/CostCalculator/CostCalculatorDisclaimer.js +1 -1
  142. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
  143. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  144. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
  145. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  146. package/dist/flows/CostCalculator/CostCalculatorResetButton.js +1 -1
  147. package/dist/flows/CostCalculator/CostCalculatorSubmitButton.js +1 -1
  148. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +1 -1
  149. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  150. package/dist/flows/CostCalculator/Results/CostCalculatorBenefitsBreakdown.js +1 -1
  151. package/dist/flows/CostCalculator/Results/CostCalculatorContributionsBreakdown.js +1 -1
  152. package/dist/flows/CostCalculator/Results/CostCalculatorExtraStatutoryPaymentsBreakdown.js +1 -1
  153. package/dist/flows/CostCalculator/Results/CostCalculatorGrossSalary.js +1 -1
  154. package/dist/flows/CostCalculator/Results/CostCalculatorIndirectTax.js +1 -1
  155. package/dist/flows/CostCalculator/Results/CostCalculatorResults.d.ts +1 -1
  156. package/dist/flows/CostCalculator/Results/CostCalculatorResults.js +1 -1
  157. package/dist/flows/CostCalculator/Results/CostCalculatorResultsChart.js +1 -1
  158. package/dist/flows/CostCalculator/Results/CostCalculatorTotalCost.js +1 -1
  159. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +1 -1
  160. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.js +1 -1
  161. package/dist/flows/CostCalculator/api.d.ts +1 -1
  162. package/dist/flows/CostCalculator/api.js +1 -1
  163. package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
  164. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  165. package/dist/flows/CostCalculator/context.d.ts +3 -3
  166. package/dist/flows/CostCalculator/hooks.d.ts +3 -3
  167. package/dist/flows/CostCalculator/hooks.js +1 -1
  168. package/dist/flows/CostCalculator/index.d.ts +3 -3
  169. package/dist/flows/CostCalculator/index.js +1 -1
  170. package/dist/flows/CostCalculator/types.d.ts +1 -1
  171. package/dist/flows/CostCalculator/utils.d.ts +3 -3
  172. package/dist/flows/CostCalculator/utils.js +1 -1
  173. package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
  174. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  175. package/dist/flows/Onboarding/api.d.ts +6 -6
  176. package/dist/flows/Onboarding/api.js +1 -1
  177. package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
  178. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  179. package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +4 -4
  180. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  181. package/dist/flows/Onboarding/components/BenefitsStep.d.ts +4 -4
  182. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  183. package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +4 -4
  184. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  185. package/dist/flows/Onboarding/components/OnboardingBack.js +1 -1
  186. package/dist/flows/Onboarding/components/OnboardingForm.d.ts +4 -4
  187. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  188. package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
  189. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  190. package/dist/flows/Onboarding/components/OnboardingSubmit.js +1 -1
  191. package/dist/flows/Onboarding/components/ReviewStep.d.ts +4 -4
  192. package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
  193. package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +4 -4
  194. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  195. package/dist/flows/Onboarding/context.d.ts +5 -5
  196. package/dist/flows/Onboarding/hooks.d.ts +4 -4
  197. package/dist/flows/Onboarding/hooks.js +1 -1
  198. package/dist/flows/Onboarding/index.d.ts +4 -4
  199. package/dist/flows/Onboarding/index.js +1 -1
  200. package/dist/flows/Onboarding/types.d.ts +4 -4
  201. package/dist/flows/Onboarding/utils.d.ts +4 -4
  202. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +16 -13
  203. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  204. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +16 -10
  205. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  206. package/dist/flows/Termination/PaidTimeOffForm.d.ts +16 -10
  207. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  208. package/dist/flows/Termination/TerminationBack.js +1 -1
  209. package/dist/flows/Termination/TerminationDetailsForm.d.ts +16 -10
  210. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  211. package/dist/flows/Termination/TerminationFlow.d.ts +11 -51
  212. package/dist/flows/Termination/TerminationFlow.js +1 -1
  213. package/dist/flows/Termination/TerminationForm.d.ts +14 -2
  214. package/dist/flows/Termination/TerminationForm.js +1 -1
  215. package/dist/flows/Termination/TerminationSubmit.js +1 -1
  216. package/dist/flows/Termination/TimeOff.d.ts +1 -1
  217. package/dist/flows/Termination/TimeOff.js +1 -1
  218. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +8 -0
  219. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.js +2 -0
  220. package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +2 -0
  221. package/dist/flows/Termination/components/TerminationReasonsDetailContent/TerminationReasonsDetailContent.js +2 -0
  222. package/dist/flows/Termination/components/TerminationReasonsDetailContent/TerminationReasonsDetailContent.js.map +1 -0
  223. package/dist/flows/Termination/context.d.ts +9 -6
  224. package/dist/flows/Termination/hooks.d.ts +12 -98
  225. package/dist/flows/Termination/hooks.js +1 -1
  226. package/dist/flows/Termination/index.d.ts +10 -15
  227. package/dist/flows/Termination/index.js +1 -1
  228. package/dist/flows/Termination/json-schemas/jsonSchema.d.ts +61 -66
  229. package/dist/flows/Termination/json-schemas/jsonSchema.js +1 -1
  230. package/dist/flows/Termination/json-schemas/paidTimeOff.d.ts +26 -0
  231. package/dist/flows/Termination/json-schemas/paidTimeOff.js +1 -1
  232. package/dist/flows/Termination/json-schemas/schema.js +1 -1
  233. package/dist/flows/Termination/types.d.ts +16 -23
  234. package/dist/flows/api.d.ts +14 -2
  235. package/dist/flows/api.js +1 -1
  236. package/dist/flows/types.d.ts +1 -1
  237. package/dist/index.css +1 -1
  238. package/dist/index.css.map +1 -1
  239. package/dist/index.d.ts +55 -21
  240. package/dist/index.js +1 -1
  241. package/dist/index.js.map +1 -1
  242. package/dist/internals.d.ts +47 -55
  243. package/dist/internals.js +1 -1
  244. package/dist/{mutations-B7htnE-g.d.ts → mutations-juOpbR-A.d.ts} +1 -1
  245. package/dist/{remoteFlows-DR6mSxki.d.ts → remoteFlows-D1VLPcdi.d.ts} +1 -1
  246. package/dist/{types-XaAblF6e.d.ts → types-CBySMyLF.d.ts} +5 -5
  247. package/dist/{types-DEybNxfT.d.ts → types-CCzA9vuJ.d.ts} +4 -4
  248. package/dist/types-Cl_jsVYv.d.ts +174 -0
  249. package/dist/{types.gen-N_N1mlfc.d.ts → types.gen-CxiSXabT.d.ts} +94 -1
  250. package/package.json +1 -2
  251. package/dist/chunk-4NLAHGUV.js +0 -2
  252. package/dist/chunk-4NLAHGUV.js.map +0 -1
  253. package/dist/chunk-AIN5YFNL.js +0 -2
  254. package/dist/chunk-CKHZP3O3.js +0 -2
  255. package/dist/chunk-CKHZP3O3.js.map +0 -1
  256. package/dist/chunk-E5PSJ75C.js +0 -2
  257. package/dist/chunk-E5PSJ75C.js.map +0 -1
  258. package/dist/chunk-G343WOO7.js.map +0 -1
  259. package/dist/chunk-HC56JKI2.js +0 -2
  260. package/dist/chunk-HC56JKI2.js.map +0 -1
  261. package/dist/chunk-HH4YP6QX.js +0 -2
  262. package/dist/chunk-HH4YP6QX.js.map +0 -1
  263. package/dist/chunk-HTCONTKZ.js +0 -2
  264. package/dist/chunk-HTCONTKZ.js.map +0 -1
  265. package/dist/chunk-VXPJXQP3.js +0 -2
  266. package/dist/chunk-W5DG5WWJ.js +0 -2
  267. package/dist/chunk-W5DG5WWJ.js.map +0 -1
  268. package/dist/chunk-X5F5HHFQ.js +0 -2
  269. package/dist/chunk-X5F5HHFQ.js.map +0 -1
  270. package/dist/chunk-ZXA3CCPB.js.map +0 -1
  271. package/dist/flows/Termination/TerminationDialogInfoContent/TerminationDialogInfoContent.js +0 -2
  272. package/dist/flows/Termination/TerminationReasonsDetailContent/TerminationReasonsDetailContent.js +0 -2
  273. /package/dist/{chunk-VSUEF4AY.js.map → chunk-2DSNHYHZ.js.map} +0 -0
  274. /package/dist/{chunk-47A5JNKX.js.map → chunk-2T2N5226.js.map} +0 -0
  275. /package/dist/{chunk-AIN5YFNL.js.map → chunk-2UAG6WDW.js.map} +0 -0
  276. /package/dist/{chunk-ISWLTY4E.js.map → chunk-3A47R5RQ.js.map} +0 -0
  277. /package/dist/{chunk-SFX34GRA.js.map → chunk-3W7RKLJX.js.map} +0 -0
  278. /package/dist/{chunk-TK6JU3ZG.js.map → chunk-3XDJ2LRT.js.map} +0 -0
  279. /package/dist/{chunk-EAIJKDY4.js.map → chunk-4HT7RNFP.js.map} +0 -0
  280. /package/dist/{chunk-CLW7CVDG.js.map → chunk-4NAVUB7D.js.map} +0 -0
  281. /package/dist/{chunk-OUO2RTM4.js.map → chunk-4SIGN3ZP.js.map} +0 -0
  282. /package/dist/{chunk-QP36XXCQ.js.map → chunk-5A54AHAT.js.map} +0 -0
  283. /package/dist/{chunk-RLLBHQWS.js.map → chunk-5H5INKOY.js.map} +0 -0
  284. /package/dist/{chunk-RVEQJNZI.js.map → chunk-5ZR7EFPY.js.map} +0 -0
  285. /package/dist/{chunk-U3XZWSEU.js.map → chunk-64NSBY5G.js.map} +0 -0
  286. /package/dist/{chunk-VOJHAIEH.js.map → chunk-6VRUYYUV.js.map} +0 -0
  287. /package/dist/{chunk-ODI4OPN7.js.map → chunk-7IZGKQII.js.map} +0 -0
  288. /package/dist/{chunk-WPMPTV76.js.map → chunk-7R347KBY.js.map} +0 -0
  289. /package/dist/{chunk-SV2PWH6Y.js.map → chunk-A7T27JCJ.js.map} +0 -0
  290. /package/dist/{chunk-AKHJDD35.js.map → chunk-AFRA4BIW.js.map} +0 -0
  291. /package/dist/{chunk-ORBIA4S3.js.map → chunk-ANGJCT4I.js.map} +0 -0
  292. /package/dist/{chunk-EKK7R3M6.js.map → chunk-BCXRPHWY.js.map} +0 -0
  293. /package/dist/{chunk-4Q7KTWXP.js.map → chunk-BNHN4CEM.js.map} +0 -0
  294. /package/dist/{chunk-VHJFIDOX.js.map → chunk-BV3PGYSH.js.map} +0 -0
  295. /package/dist/{chunk-XASIKHZL.js.map → chunk-CNDSIADP.js.map} +0 -0
  296. /package/dist/{chunk-WY3KCHHG.js.map → chunk-CRHH6IPF.js.map} +0 -0
  297. /package/dist/{chunk-BCSSGG6E.js.map → chunk-D6X2WCEG.js.map} +0 -0
  298. /package/dist/{chunk-L2GYSHXS.js.map → chunk-DPY77ASH.js.map} +0 -0
  299. /package/dist/{chunk-AXES4NFY.js.map → chunk-DTHBG6BD.js.map} +0 -0
  300. /package/dist/{chunk-SDIBOMMT.js.map → chunk-DUD7B2IY.js.map} +0 -0
  301. /package/dist/{chunk-ZZNI7IY2.js.map → chunk-EKKRQI6B.js.map} +0 -0
  302. /package/dist/{chunk-LJ36642G.js.map → chunk-FMBYJANY.js.map} +0 -0
  303. /package/dist/{chunk-L5CORHOG.js.map → chunk-G4QOEPDP.js.map} +0 -0
  304. /package/dist/{chunk-56D2YDS2.js.map → chunk-GKS3W6KT.js.map} +0 -0
  305. /package/dist/{chunk-KSHPBRPW.js.map → chunk-H425RKFI.js.map} +0 -0
  306. /package/dist/{chunk-UCLVNY25.js.map → chunk-HEQLPSHZ.js.map} +0 -0
  307. /package/dist/{chunk-ZZ6MU7PF.js.map → chunk-HPBT677J.js.map} +0 -0
  308. /package/dist/{chunk-S2AQQVM7.js.map → chunk-HPHWQU34.js.map} +0 -0
  309. /package/dist/{chunk-XRB4Y7WT.js.map → chunk-ILPYR7RQ.js.map} +0 -0
  310. /package/dist/{chunk-XGPCOHUF.js.map → chunk-IYGJ5QJB.js.map} +0 -0
  311. /package/dist/{chunk-5EP45OQV.js.map → chunk-JVSD4JOU.js.map} +0 -0
  312. /package/dist/{chunk-DPIKH7BI.js.map → chunk-L2IKFFQX.js.map} +0 -0
  313. /package/dist/{chunk-IQ2HRDC4.js.map → chunk-LEXD5FVL.js.map} +0 -0
  314. /package/dist/{chunk-5JGYNS2O.js.map → chunk-LWGVLLBH.js.map} +0 -0
  315. /package/dist/{chunk-PAZGF4C3.js.map → chunk-MQ6F5LE4.js.map} +0 -0
  316. /package/dist/{chunk-QBEJBOGL.js.map → chunk-MQWVZSGH.js.map} +0 -0
  317. /package/dist/{chunk-W676SMID.js.map → chunk-N6KOPITR.js.map} +0 -0
  318. /package/dist/{chunk-3MS7FYSY.js.map → chunk-NGTESOKF.js.map} +0 -0
  319. /package/dist/{chunk-XRU2O525.js.map → chunk-NIH7XLAK.js.map} +0 -0
  320. /package/dist/{chunk-AWK7AF5V.js.map → chunk-O4DIUKVP.js.map} +0 -0
  321. /package/dist/{chunk-LSGVE623.js.map → chunk-OIN3HGOQ.js.map} +0 -0
  322. /package/dist/{chunk-OEEUSIOB.js.map → chunk-OW5QGJD4.js.map} +0 -0
  323. /package/dist/{chunk-A6QURRVL.js.map → chunk-P5WUODPR.js.map} +0 -0
  324. /package/dist/{chunk-2GCMLKO2.js.map → chunk-PAT3EA43.js.map} +0 -0
  325. /package/dist/{chunk-FCAGJMPU.js.map → chunk-PD24XKD6.js.map} +0 -0
  326. /package/dist/{chunk-C535PFLI.js.map → chunk-PKRI35YC.js.map} +0 -0
  327. /package/dist/{chunk-PTACLZHT.js.map → chunk-PWPFCC6I.js.map} +0 -0
  328. /package/dist/{chunk-JE2MYS37.js.map → chunk-Q4BKFSTW.js.map} +0 -0
  329. /package/dist/{chunk-KRL5QCOA.js.map → chunk-Q5ZRKZMK.js.map} +0 -0
  330. /package/dist/{chunk-GFNIN6CJ.js.map → chunk-RDCWARSM.js.map} +0 -0
  331. /package/dist/{chunk-I2URNHWK.js.map → chunk-RF5SLMJF.js.map} +0 -0
  332. /package/dist/{chunk-QMUSEX2P.js.map → chunk-S2XKE7EA.js.map} +0 -0
  333. /package/dist/{chunk-H6G4PPLM.js.map → chunk-SA3D5OH4.js.map} +0 -0
  334. /package/dist/{chunk-B25LAMRX.js.map → chunk-SGJSMTYG.js.map} +0 -0
  335. /package/dist/{chunk-GSNOUE4L.js.map → chunk-TB75BHYW.js.map} +0 -0
  336. /package/dist/{chunk-Z2G2XC43.js.map → chunk-TWIUL2P3.js.map} +0 -0
  337. /package/dist/{chunk-JNPIBIHZ.js.map → chunk-U2LOBJFU.js.map} +0 -0
  338. /package/dist/{chunk-CCW6FKQ3.js.map → chunk-UPXJJBXZ.js.map} +0 -0
  339. /package/dist/{chunk-VOW6W24S.js.map → chunk-VT4GSXMI.js.map} +0 -0
  340. /package/dist/{chunk-3GDPOMQP.js.map → chunk-XMAQ4NRR.js.map} +0 -0
  341. /package/dist/{chunk-G2NIQGHZ.js.map → chunk-ZQ6MG635.js.map} +0 -0
  342. /package/dist/{chunk-3T43ERBA.js.map → chunk-ZSCKSEAA.js.map} +0 -0
  343. /package/dist/flows/Termination/{TerminationDialogInfoContent/TerminationDialogInfoContent.js.map → components/PaidTimeOff/PaidTimeOff.js.map} +0 -0
  344. /package/dist/flows/Termination/{TerminationDialogInfoContent → components/TerminationDialogInfoContent}/TerminationDialogInfoContent.d.ts +0 -0
  345. /package/dist/flows/Termination/{TerminationReasonsDetailContent/TerminationReasonsDetailContent.js.map → components/TerminationDialogInfoContent/TerminationDialogInfoContent.js.map} +0 -0
  346. /package/dist/flows/Termination/{TerminationReasonsDetailContent → components/TerminationReasonsDetailContent}/TerminationReasonsDetailContent.d.ts +0 -0
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/RemoteFlowsProvider.tsx","../src/lib/applyTheme.ts","../src/theme.tsx","../src/environments.ts","../src/useAuth.ts"],"sourcesContent":["import { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport type { PropsWithChildren } from 'react';\nimport React from 'react';\n\nimport { ThemeProvider } from '@/src/theme';\nimport { FormFieldsContext, RemoteFlowContext } from './context';\nimport { Components, RemoteFlowsSDKProps } from './types/remoteFlows';\nimport { useAuth } from './useAuth';\n\nconst queryClient = new QueryClient();\n\ntype RemoteFlowContextWrapperProps = {\n auth: RemoteFlowsSDKProps['auth'];\n children: React.ReactNode;\n environment?: RemoteFlowsSDKProps['environment'];\n proxy?: RemoteFlowsSDKProps['proxy'];\n authId?: RemoteFlowsSDKProps['authId'];\n};\n\nfunction RemoteFlowContextWrapper({\n children,\n auth,\n authId,\n proxy,\n environment,\n}: RemoteFlowContextWrapperProps) {\n const remoteApiClient = useAuth({\n auth,\n authId,\n options: {\n proxy,\n environment,\n },\n });\n return (\n <RemoteFlowContext.Provider value={{ client: remoteApiClient.current }}>\n {children}\n </RemoteFlowContext.Provider>\n );\n}\n\nexport function FormFieldsProvider({\n children,\n components,\n}: PropsWithChildren<{\n components?: Components;\n}>) {\n return (\n <FormFieldsContext.Provider\n value={components ? { components } : { components: {} }}\n >\n {children}\n </FormFieldsContext.Provider>\n );\n}\n\nexport function RemoteFlows({\n auth,\n authId,\n children,\n components,\n theme,\n proxy,\n environment,\n}: PropsWithChildren<RemoteFlowsSDKProps>) {\n return (\n <QueryClientProvider client={queryClient}>\n <FormFieldsProvider components={components}>\n <RemoteFlowContextWrapper\n auth={auth}\n authId={authId}\n proxy={proxy}\n environment={environment}\n >\n <ThemeProvider theme={theme}>{children}</ThemeProvider>\n </RemoteFlowContextWrapper>\n </FormFieldsProvider>\n </QueryClientProvider>\n );\n}\n","import {\n CssThemeBorder,\n CssThemeColors,\n CssThemeFont,\n CssThemeSpacing,\n ThemeColors,\n ThemeFont,\n ThemeProviderProps,\n} from '@/src/types/theme';\n\nfunction setCssProperties(variables: Record<string, string>) {\n const root = document.documentElement;\n Object.keys(variables).forEach((v) => {\n const propertyVal = variables[v];\n if (propertyVal) {\n root.style.setProperty(v, propertyVal);\n }\n });\n}\n\nfunction mapThemeColors(colors: ThemeColors): CssThemeColors {\n const result: CssThemeColors = {};\n Object.keys(colors).forEach((key) => {\n result[`--${key}` as keyof CssThemeColors] =\n colors[key as keyof ThemeColors];\n });\n return result;\n}\n\nfunction mapThemeSpacing(spacing: string): CssThemeSpacing {\n return {\n '--spacing': spacing,\n };\n}\n\nfunction mapThemeBorderRadius(borderRadius: string): CssThemeBorder {\n return {\n '--radius': borderRadius,\n };\n}\n\nfunction mapThemeFont(font: ThemeFont): CssThemeFont {\n return {\n '--fontSizeBase': font.fontSizeBase,\n };\n}\n\nexport function applyTheme(theme: ThemeProviderProps['theme']) {\n if (theme?.colors) {\n setCssProperties(mapThemeColors(theme.colors));\n }\n\n if (theme?.spacing) {\n setCssProperties(mapThemeSpacing(theme.spacing));\n }\n\n if (theme?.borderRadius) {\n setCssProperties(mapThemeBorderRadius(theme.borderRadius));\n }\n\n if (theme?.font) {\n setCssProperties(mapThemeFont(theme.font));\n }\n}\n","import { applyTheme } from '@/src/lib/applyTheme';\nimport { createContext, useEffect, useMemo } from 'react';\nimport { ThemeProviderProps } from './types/theme';\n\nconst ThemeContext = createContext<Omit<ThemeProviderProps, 'children'>>({\n theme: {},\n});\n\nexport function ThemeProvider(props: ThemeProviderProps) {\n useEffect(() => {\n if (props.theme && Object.keys(props.theme).length > 0) {\n applyTheme(props.theme);\n }\n }, [props.theme]);\n\n const value = useMemo(() => {\n return { theme: props.theme };\n }, [props.theme]);\n\n return (\n <ThemeContext.Provider value={value}>\n {props.children}\n </ThemeContext.Provider>\n );\n}\n","export const ENVIRONMENTS = {\n local: 'http://localhost:4000/api/eor',\n partners: 'https://gateway.partners.remote-sandbox.com',\n production: 'https://gateway.remote.com',\n sandbox: 'https://gateway.remote-sandbox.com',\n staging: 'https://gateway.niceremote.com',\n};\n","import { client } from '@/src/client/client.gen';\nimport { ENVIRONMENTS } from '@/src/environments';\nimport { createClient } from '@hey-api/client-fetch';\nimport { useQuery } from '@tanstack/react-query';\nimport { useRef } from 'react';\nimport { RemoteFlowsSDKProps } from './types/remoteFlows';\nimport { debug } from './lib/utils';\n\ntype AuthResponse = {\n accessToken: string;\n expiresIn: number;\n};\n\ntype Options = Partial<{\n environment: keyof typeof ENVIRONMENTS;\n proxy: RemoteFlowsSDKProps['proxy'];\n}>;\n\nfunction isValidUrl(url: string) {\n try {\n new URL(url);\n return true;\n } catch {\n return false;\n }\n}\n\nexport const useAuth = ({\n auth,\n options,\n authId = 'default',\n}: {\n auth: () => Promise<AuthResponse>;\n options?: Options;\n authId?: 'default' | 'client';\n}) => {\n const session = useRef<{ accessToken: string; expiresAt: number } | null>(\n null,\n );\n const { refetch } = useQuery({\n queryKey: ['auth', authId],\n queryFn: auth,\n enabled: false,\n });\n\n const baseUrl = options?.environment\n ? ENVIRONMENTS[options?.environment]\n : process.env.REMOTE_GATEWAY_URL;\n\n const clientConfig = client.getConfig();\n const npmPackageVersion = process.env.VERSION || 'unknown';\n\n if (options?.environment && options?.environment !== 'production') {\n debug(npmPackageVersion);\n }\n\n const isValidProxy = !!options?.proxy && isValidUrl(options.proxy.url);\n\n if (options?.proxy && !isValidProxy) {\n console.error('Invalid proxy URL provided. Using default base URL.');\n }\n\n return useRef(\n createClient({\n ...clientConfig,\n headers: {\n ...clientConfig.headers,\n ...(isValidProxy ? options?.proxy?.headers : {}),\n 'X-Client-Name': 'remote-flows-sdk',\n 'X-Client-Version': npmPackageVersion,\n },\n baseUrl: isValidProxy ? options.proxy?.url : baseUrl,\n auth: async () => {\n function hasTokenExpired(expiresAt: number | undefined) {\n return !expiresAt || Date.now() + 60000 > expiresAt;\n }\n if (!session.current || hasTokenExpired(session.current.expiresAt)) {\n const { data } = await refetch();\n if (data) {\n session.current = {\n accessToken: data.accessToken,\n expiresAt: Date.now() + data.expiresIn * 1000,\n };\n }\n }\n return session.current?.accessToken;\n },\n }),\n );\n};\n"],"mappings":"+pHAAA,OAAS,eAAAA,EAAa,uBAAAC,MAA2B,wBCUjD,SAASC,EAAiBC,EAAmC,CAC3D,IAAMC,EAAO,SAAS,gBACtB,OAAO,KAAKD,CAAS,EAAE,QAASE,GAAM,CACpC,IAAMC,EAAcH,EAAUE,CAAC,EAC3BC,GACFF,EAAK,MAAM,YAAYC,EAAGC,CAAW,CAEzC,CAAC,CACH,CARSC,EAAAL,EAAA,oBAUT,SAASM,EAAeC,EAAqC,CAC3D,IAAMC,EAAyB,CAAC,EAChC,cAAO,KAAKD,CAAM,EAAE,QAASE,GAAQ,CACnCD,EAAO,KAAKC,CAAG,EAA0B,EACvCF,EAAOE,CAAwB,CACnC,CAAC,EACMD,CACT,CAPSH,EAAAC,EAAA,kBAST,SAASI,EAAgBC,EAAkC,CACzD,MAAO,CACL,YAAaA,CACf,CACF,CAJSN,EAAAK,EAAA,mBAMT,SAASE,EAAqBC,EAAsC,CAClE,MAAO,CACL,WAAYA,CACd,CACF,CAJSR,EAAAO,EAAA,wBAMT,SAASE,EAAaC,EAA+B,CACnD,MAAO,CACL,iBAAkBA,EAAK,YACzB,CACF,CAJSV,EAAAS,EAAA,gBAMF,SAASE,EAAWC,EAAoC,CACzDA,GAAO,QACTjB,EAAiBM,EAAeW,EAAM,MAAM,CAAC,EAG3CA,GAAO,SACTjB,EAAiBU,EAAgBO,EAAM,OAAO,CAAC,EAG7CA,GAAO,cACTjB,EAAiBY,EAAqBK,EAAM,YAAY,CAAC,EAGvDA,GAAO,MACTjB,EAAiBc,EAAaG,EAAM,IAAI,CAAC,CAE7C,CAhBgBZ,EAAAW,EAAA,cC9ChB,OAAS,iBAAAE,EAAe,aAAAC,EAAW,WAAAC,MAAe,QAmB9C,cAAAC,MAAA,oBAhBJ,IAAMC,EAAeC,EAAoD,CACvE,MAAO,CAAC,CACV,CAAC,EAEM,SAASC,EAAcC,EAA2B,CACvDC,EAAU,IAAM,CACVD,EAAM,OAAS,OAAO,KAAKA,EAAM,KAAK,EAAE,OAAS,GACnDE,EAAWF,EAAM,KAAK,CAE1B,EAAG,CAACA,EAAM,KAAK,CAAC,EAEhB,IAAMG,EAAQC,EAAQ,KACb,CAAE,MAAOJ,EAAM,KAAM,GAC3B,CAACA,EAAM,KAAK,CAAC,EAEhB,OACEJ,EAACC,EAAa,SAAb,CAAsB,MAAOM,EAC3B,SAAAH,EAAM,SACT,CAEJ,CAhBgBK,EAAAN,EAAA,iBCRT,IAAMO,EAAe,CAC1B,MAAO,gCACP,SAAU,8CACV,WAAY,6BACZ,QAAS,qCACT,QAAS,gCACX,ECJA,OAAS,gBAAAC,MAAoB,wBAC7B,OAAS,YAAAC,MAAgB,wBACzB,OAAS,UAAAC,MAAc,QAcvB,SAASC,EAAWC,EAAa,CAC/B,GAAI,CACF,WAAI,IAAIA,CAAG,EACJ,EACT,MAAQ,CACN,MAAO,EACT,CACF,CAPSC,EAAAF,EAAA,cASF,IAAMG,EAAUD,EAAA,CAAC,CACtB,KAAAE,EACA,QAAAC,EACA,OAAAC,EAAS,SACX,IAIM,CACJ,IAAMC,EAAUC,EACd,IACF,EACM,CAAE,QAAAC,CAAQ,EAAIC,EAAS,CAC3B,SAAU,CAAC,OAAQJ,CAAM,EACzB,QAASF,EACT,QAAS,EACX,CAAC,EAEKO,EAAUN,GAAS,YACrBO,EAAaP,GAAS,WAAW,EACjC,6BAEEQ,EAAeC,EAAO,UAAU,EAChCC,EAAoB,SAEtBV,GAAS,aAAeA,GAAS,cAAgB,cACnDW,EAAMD,CAAiB,EAGzB,IAAME,EAAe,CAAC,CAACZ,GAAS,OAASL,EAAWK,EAAQ,MAAM,GAAG,EAErE,OAAIA,GAAS,OAAS,CAACY,GACrB,QAAQ,MAAM,qDAAqD,EAG9DT,EACLU,EAAa,CACX,GAAGL,EACH,QAAS,CACP,GAAGA,EAAa,QAChB,GAAII,EAAeZ,GAAS,OAAO,QAAU,CAAC,EAC9C,gBAAiB,mBACjB,mBAAoBU,CACtB,EACA,QAASE,EAAeZ,EAAQ,OAAO,IAAMM,EAC7C,KAAMT,EAAA,SAAY,CAChB,SAASiB,EAAgBC,EAA+B,CACtD,MAAO,CAACA,GAAa,KAAK,IAAI,EAAI,IAAQA,CAC5C,CACA,GAHSlB,EAAAiB,EAAA,mBAGL,CAACZ,EAAQ,SAAWY,EAAgBZ,EAAQ,QAAQ,SAAS,EAAG,CAClE,GAAM,CAAE,KAAAc,CAAK,EAAI,MAAMZ,EAAQ,EAC3BY,IACFd,EAAQ,QAAU,CAChB,YAAac,EAAK,YAClB,UAAW,KAAK,IAAI,EAAIA,EAAK,UAAY,GAC3C,EAEJ,CACA,OAAOd,EAAQ,SAAS,WAC1B,EAdM,OAeR,CAAC,CACH,CACF,EA9DuB,WJQnB,cAAAe,MAAA,oBA1BJ,IAAMC,EAAc,IAAIC,EAUxB,SAASC,GAAyB,CAChC,SAAAC,EACA,KAAAC,EACA,OAAAC,EACA,MAAAC,EACA,YAAAC,CACF,EAAkC,CAChC,IAAMC,EAAkBC,EAAQ,CAC9B,KAAAL,EACA,OAAAC,EACA,QAAS,CACP,MAAAC,EACA,YAAAC,CACF,CACF,CAAC,EACD,OACER,EAACW,EAAkB,SAAlB,CAA2B,MAAO,CAAE,OAAQF,EAAgB,OAAQ,EAClE,SAAAL,EACH,CAEJ,CApBSQ,EAAAT,GAAA,4BAsBF,SAASU,GAAmB,CACjC,SAAAT,EACA,WAAAU,CACF,EAEI,CACF,OACEd,EAACe,EAAkB,SAAlB,CACC,MAAOD,EAAa,CAAE,WAAAA,CAAW,EAAI,CAAE,WAAY,CAAC,CAAE,EAErD,SAAAV,EACH,CAEJ,CAbgBQ,EAAAC,GAAA,sBAeT,SAASG,GAAY,CAC1B,KAAAX,EACA,OAAAC,EACA,SAAAF,EACA,WAAAU,EACA,MAAAG,EACA,MAAAV,EACA,YAAAC,CACF,EAA2C,CACzC,OACER,EAACkB,EAAA,CAAoB,OAAQjB,EAC3B,SAAAD,EAACa,GAAA,CAAmB,WAAYC,EAC9B,SAAAd,EAACG,GAAA,CACC,KAAME,EACN,OAAQC,EACR,MAAOC,EACP,YAAaC,EAEb,SAAAR,EAACmB,EAAA,CAAc,MAAOF,EAAQ,SAAAb,EAAS,EACzC,EACF,EACF,CAEJ,CAvBgBQ,EAAAI,GAAA","names":["QueryClient","QueryClientProvider","setCssProperties","variables","root","v","propertyVal","__name","mapThemeColors","colors","result","key","mapThemeSpacing","spacing","mapThemeBorderRadius","borderRadius","mapThemeFont","font","applyTheme","theme","createContext","useEffect","useMemo","jsx","ThemeContext","createContext","ThemeProvider","props","useEffect","applyTheme","value","useMemo","__name","ENVIRONMENTS","createClient","useQuery","useRef","isValidUrl","url","__name","useAuth","auth","options","authId","session","useRef","refetch","useQuery","baseUrl","ENVIRONMENTS","clientConfig","client","npmPackageVersion","debug","isValidProxy","createClient","hasTokenExpired","expiresAt","data","jsx","queryClient","QueryClient","RemoteFlowContextWrapper","children","auth","authId","proxy","environment","remoteApiClient","useAuth","RemoteFlowContext","__name","FormFieldsProvider","components","FormFieldsContext","RemoteFlows","theme","QueryClientProvider","ThemeProvider"]}
1
+ {"version":3,"sources":["../src/RemoteFlowsProvider.tsx","../src/lib/applyTheme.ts","../src/theme.tsx","../src/environments.ts","../src/useAuth.ts"],"sourcesContent":["import { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport type { PropsWithChildren } from 'react';\nimport React from 'react';\n\nimport { ThemeProvider } from '@/src/theme';\nimport { FormFieldsContext, RemoteFlowContext } from './context';\nimport { Components, RemoteFlowsSDKProps } from './types/remoteFlows';\nimport { useAuth } from './useAuth';\n\nconst queryClient = new QueryClient();\n\ntype RemoteFlowContextWrapperProps = {\n auth: RemoteFlowsSDKProps['auth'];\n children: React.ReactNode;\n environment?: RemoteFlowsSDKProps['environment'];\n proxy?: RemoteFlowsSDKProps['proxy'];\n authId?: RemoteFlowsSDKProps['authId'];\n};\n\nfunction RemoteFlowContextWrapper({\n children,\n auth,\n authId,\n proxy,\n environment,\n}: RemoteFlowContextWrapperProps) {\n const remoteApiClient = useAuth({\n auth,\n authId,\n options: {\n proxy,\n environment,\n },\n });\n return (\n <RemoteFlowContext.Provider value={{ client: remoteApiClient.current }}>\n {children}\n </RemoteFlowContext.Provider>\n );\n}\n\nexport function FormFieldsProvider({\n children,\n components,\n}: PropsWithChildren<{\n components?: Components;\n}>) {\n return (\n <FormFieldsContext.Provider\n value={components ? { components } : { components: {} }}\n >\n {children}\n </FormFieldsContext.Provider>\n );\n}\n\nexport function RemoteFlows({\n auth,\n authId,\n children,\n components,\n theme,\n proxy,\n environment,\n}: PropsWithChildren<RemoteFlowsSDKProps>) {\n return (\n <QueryClientProvider client={queryClient}>\n <FormFieldsProvider components={components}>\n <RemoteFlowContextWrapper\n auth={auth}\n authId={authId}\n proxy={proxy}\n environment={environment}\n >\n <ThemeProvider theme={theme}>{children}</ThemeProvider>\n </RemoteFlowContextWrapper>\n </FormFieldsProvider>\n </QueryClientProvider>\n );\n}\n","import {\n CssThemeBorder,\n CssThemeColors,\n CssThemeFont,\n CssThemeSpacing,\n ThemeColors,\n ThemeFont,\n ThemeProviderProps,\n} from '@/src/types/theme';\n\nfunction setCssProperties(variables: Record<string, string>) {\n const root = document.documentElement;\n Object.keys(variables).forEach((v) => {\n const propertyVal = variables[v];\n if (propertyVal) {\n root.style.setProperty(v, propertyVal);\n }\n });\n}\n\nfunction mapThemeColors(colors: ThemeColors): CssThemeColors {\n const result: CssThemeColors = {};\n Object.keys(colors).forEach((key) => {\n result[`--${key}` as keyof CssThemeColors] =\n colors[key as keyof ThemeColors];\n });\n return result;\n}\n\nfunction mapThemeSpacing(spacing: string): CssThemeSpacing {\n return {\n '--spacing': spacing,\n };\n}\n\nfunction mapThemeBorderRadius(borderRadius: string): CssThemeBorder {\n return {\n '--radius': borderRadius,\n };\n}\n\nfunction mapThemeFont(font: ThemeFont): CssThemeFont {\n return {\n '--fontSizeBase': font.fontSizeBase,\n };\n}\n\nexport function applyTheme(theme: ThemeProviderProps['theme']) {\n if (theme?.colors) {\n setCssProperties(mapThemeColors(theme.colors));\n }\n\n if (theme?.spacing) {\n setCssProperties(mapThemeSpacing(theme.spacing));\n }\n\n if (theme?.borderRadius) {\n setCssProperties(mapThemeBorderRadius(theme.borderRadius));\n }\n\n if (theme?.font) {\n setCssProperties(mapThemeFont(theme.font));\n }\n}\n","import { applyTheme } from '@/src/lib/applyTheme';\nimport { createContext, useEffect, useMemo } from 'react';\nimport { ThemeProviderProps } from './types/theme';\n\nconst ThemeContext = createContext<Omit<ThemeProviderProps, 'children'>>({\n theme: {},\n});\n\nexport function ThemeProvider(props: ThemeProviderProps) {\n useEffect(() => {\n if (props.theme && Object.keys(props.theme).length > 0) {\n applyTheme(props.theme);\n }\n }, [props.theme]);\n\n const value = useMemo(() => {\n return { theme: props.theme };\n }, [props.theme]);\n\n return (\n <ThemeContext.Provider value={value}>\n {props.children}\n </ThemeContext.Provider>\n );\n}\n","export const ENVIRONMENTS = {\n local: 'http://localhost:4000/api/eor',\n partners: 'https://gateway.partners.remote-sandbox.com',\n production: 'https://gateway.remote.com',\n sandbox: 'https://gateway.remote-sandbox.com',\n staging: 'https://gateway.niceremote.com',\n};\n","import { client } from '@/src/client/client.gen';\nimport { ENVIRONMENTS } from '@/src/environments';\nimport { createClient } from '@hey-api/client-fetch';\nimport { useQuery } from '@tanstack/react-query';\nimport { useRef } from 'react';\nimport { RemoteFlowsSDKProps } from './types/remoteFlows';\nimport { debug } from './lib/utils';\n\ntype AuthResponse = {\n accessToken: string;\n expiresIn: number;\n};\n\ntype Options = Partial<{\n environment: keyof typeof ENVIRONMENTS;\n proxy: RemoteFlowsSDKProps['proxy'];\n}>;\n\nfunction isValidUrl(url: string) {\n try {\n new URL(url);\n return true;\n } catch {\n return false;\n }\n}\n\nexport const useAuth = ({\n auth,\n options,\n authId = 'default',\n}: {\n auth: () => Promise<AuthResponse>;\n options?: Options;\n authId?: 'default' | 'client';\n}) => {\n const session = useRef<{ accessToken: string; expiresAt: number } | null>(\n null,\n );\n const { refetch } = useQuery({\n queryKey: ['auth', authId],\n queryFn: auth,\n enabled: false,\n });\n\n const baseUrl = options?.environment\n ? ENVIRONMENTS[options?.environment]\n : process.env.REMOTE_GATEWAY_URL;\n\n const clientConfig = client.getConfig();\n const npmPackageVersion = process.env.VERSION || 'unknown';\n\n if (options?.environment && options?.environment !== 'production') {\n debug(npmPackageVersion);\n }\n\n const isValidProxy = !!options?.proxy && isValidUrl(options.proxy.url);\n\n if (options?.proxy && !isValidProxy) {\n console.error('Invalid proxy URL provided. Using default base URL.');\n }\n\n return useRef(\n createClient({\n ...clientConfig,\n headers: {\n ...clientConfig.headers,\n ...(isValidProxy ? options?.proxy?.headers : {}),\n 'X-Client-Name': 'remote-flows-sdk',\n 'X-Client-Version': npmPackageVersion,\n },\n baseUrl: isValidProxy ? options.proxy?.url : baseUrl,\n auth: async () => {\n function hasTokenExpired(expiresAt: number | undefined) {\n return !expiresAt || Date.now() + 60000 > expiresAt;\n }\n if (!session.current || hasTokenExpired(session.current.expiresAt)) {\n const { data } = await refetch();\n if (data) {\n session.current = {\n accessToken: data.accessToken,\n expiresAt: Date.now() + data.expiresIn * 1000,\n };\n }\n }\n return session.current?.accessToken;\n },\n }),\n );\n};\n"],"mappings":"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","names":["QueryClient","QueryClientProvider","setCssProperties","variables","root","v","propertyVal","__name","mapThemeColors","colors","result","key","mapThemeSpacing","spacing","mapThemeBorderRadius","borderRadius","mapThemeFont","font","applyTheme","theme","createContext","useEffect","useMemo","jsx","ThemeContext","createContext","ThemeProvider","props","useEffect","applyTheme","value","useMemo","__name","ENVIRONMENTS","createClient","useQuery","useRef","isValidUrl","url","__name","useAuth","auth","options","authId","session","useRef","refetch","useQuery","baseUrl","ENVIRONMENTS","clientConfig","client","npmPackageVersion","debug","isValidProxy","createClient","hasTokenExpired","expiresAt","data","jsx","queryClient","QueryClient","RemoteFlowContextWrapper","children","auth","authId","proxy","environment","remoteApiClient","useAuth","RemoteFlowContext","__name","FormFieldsProvider","components","FormFieldsContext","RemoteFlows","theme","QueryClientProvider","ThemeProvider"]}
@@ -1,8 +1,8 @@
1
- export { c as cn } from './utils-CjDMg_Yr.js';
1
+ export { Z as ZendeskTriggerButton, c as cn } from './ZendeskTriggerButton-FSCvhzTG.js';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import * as class_variance_authority_types from 'class-variance-authority/types';
4
4
  import { VariantProps } from 'class-variance-authority';
5
- import * as React$1 from 'react';
5
+ import * as React from 'react';
6
6
  import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
7
7
  import { Drawer as Drawer$1 } from 'vaul';
8
8
  import * as DialogPrimitive from '@radix-ui/react-dialog';
@@ -16,91 +16,83 @@ import 'clsx';
16
16
  import 'yup';
17
17
 
18
18
  declare const buttonVariants: (props?: ({
19
- variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
20
- size?: "default" | "link" | "sm" | "lg" | "icon" | null | undefined;
19
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
20
+ size?: "link" | "default" | "sm" | "lg" | "icon" | null | undefined;
21
21
  } & class_variance_authority_types.ClassProp) | undefined) => string;
22
- declare function Button({ className, variant, size, asChild, ...props }: React$1.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
22
+ declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
23
23
  asChild?: boolean;
24
24
  }): react_jsx_runtime.JSX.Element;
25
25
 
26
- interface CardProps extends React$1.ComponentProps<'div'> {
26
+ interface CardProps extends React.ComponentProps<'div'> {
27
27
  direction?: 'row' | 'col';
28
28
  }
29
29
  declare function Card({ className, direction, ...props }: CardProps): react_jsx_runtime.JSX.Element;
30
- declare function CardHeader({ className, ...props }: React$1.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
31
- declare function CardTitle({ className, ...props }: React$1.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
32
- declare function CardDescription({ className, ...props }: React$1.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
33
- declare function CardContent({ className, ...props }: React$1.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
34
- declare function CardFooter({ className, ...props }: React$1.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
30
+ declare function CardHeader({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
31
+ declare function CardTitle({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
32
+ declare function CardDescription({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
33
+ declare function CardContent({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
34
+ declare function CardFooter({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
35
35
 
36
- declare const Collapsible: React$1.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & React$1.RefAttributes<HTMLDivElement>>;
37
- declare const CollapsibleTrigger: React$1.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
38
- declare const CollapsibleContent: React$1.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & React$1.RefAttributes<HTMLDivElement>>;
36
+ declare const Collapsible: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & React.RefAttributes<HTMLDivElement>>;
37
+ declare const CollapsibleTrigger: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & React.RefAttributes<HTMLButtonElement>>;
38
+ declare const CollapsibleContent: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & React.RefAttributes<HTMLDivElement>>;
39
39
 
40
40
  declare const Drawer: {
41
- ({ shouldScaleBackground, ...props }: React$1.ComponentProps<typeof Drawer$1.Root>): react_jsx_runtime.JSX.Element;
41
+ ({ shouldScaleBackground, ...props }: React.ComponentProps<typeof Drawer$1.Root>): react_jsx_runtime.JSX.Element;
42
42
  displayName: string;
43
43
  };
44
- declare const DrawerTrigger: React$1.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
45
- declare const DrawerContent: React$1.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
44
+ declare const DrawerTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
45
+ declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
46
46
  showHandle?: boolean;
47
- } & React$1.RefAttributes<HTMLDivElement>>;
47
+ } & React.RefAttributes<HTMLDivElement>>;
48
48
  declare const DrawerHeader: {
49
- ({ className, ...props }: React$1.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
49
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
50
50
  displayName: string;
51
51
  };
52
- declare const DrawerTitle: React$1.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>, "ref"> & React$1.RefAttributes<HTMLHeadingElement>>;
52
+ declare const DrawerTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
53
53
 
54
- declare function Dialog({ ...props }: React$1.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
55
- declare function DialogTrigger({ ...props }: React$1.ComponentProps<typeof DialogPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
56
- declare function DialogContent({ className, children, ...props }: React$1.ComponentProps<typeof DialogPrimitive.Content>): react_jsx_runtime.JSX.Element;
57
- declare function DialogHeader({ className, ...props }: React$1.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
58
- declare function DialogFooter({ className, ...props }: React$1.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
59
- declare function DialogTitle({ className, ...props }: React$1.ComponentProps<typeof DialogPrimitive.Title>): react_jsx_runtime.JSX.Element;
60
- declare function DialogDescription({ className, ...props }: React$1.ComponentProps<typeof DialogPrimitive.Description>): react_jsx_runtime.JSX.Element;
54
+ declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
55
+ declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
56
+ declare function DialogContent({ className, children, ...props }: React.ComponentProps<typeof DialogPrimitive.Content>): react_jsx_runtime.JSX.Element;
57
+ declare function DialogHeader({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
58
+ declare function DialogFooter({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
59
+ declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): react_jsx_runtime.JSX.Element;
60
+ declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): react_jsx_runtime.JSX.Element;
61
61
 
62
- declare function Tabs({ className, ...props }: React$1.ComponentProps<typeof TabsPrimitive.Root>): react_jsx_runtime.JSX.Element;
63
- declare function TabsList({ className, ...props }: React$1.ComponentProps<typeof TabsPrimitive.List>): react_jsx_runtime.JSX.Element;
64
- declare function TabsTrigger({ className, ...props }: React$1.ComponentProps<typeof TabsPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
65
- declare function TabsContent({ className, ...props }: React$1.ComponentProps<typeof TabsPrimitive.Content>): react_jsx_runtime.JSX.Element;
62
+ declare function Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>): react_jsx_runtime.JSX.Element;
63
+ declare function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>): react_jsx_runtime.JSX.Element;
64
+ declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
65
+ declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): react_jsx_runtime.JSX.Element;
66
66
 
67
67
  declare const alertVariants: (props?: ({
68
68
  variant?: "default" | "warning" | "destructive" | null | undefined;
69
69
  } & class_variance_authority_types.ClassProp) | undefined) => string;
70
- declare function Alert({ className, variant, ...props }: React$1.ComponentProps<'div'> & VariantProps<typeof alertVariants>): react_jsx_runtime.JSX.Element;
71
- declare function AlertTitle({ className, ...props }: React$1.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
72
- declare function AlertDescription({ className, ...props }: React$1.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
70
+ declare function Alert({ className, variant, ...props }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>): react_jsx_runtime.JSX.Element;
71
+ declare function AlertTitle({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
72
+ declare function AlertDescription({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
73
73
 
74
74
  declare const badgeVariants: (props?: ({
75
75
  variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
76
76
  } & class_variance_authority_types.ClassProp) | undefined) => string;
77
- declare function Badge({ className, variant, asChild, ...props }: React$1.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
77
+ declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
78
78
  asChild?: boolean;
79
79
  }): react_jsx_runtime.JSX.Element;
80
80
 
81
- declare function Input({ className, type, ...props }: React$1.ComponentProps<'input'>): react_jsx_runtime.JSX.Element;
81
+ declare function Input({ className, type, ...props }: React.ComponentProps<'input'>): react_jsx_runtime.JSX.Element;
82
82
 
83
- declare function Label({ className, ...props }: React$1.ComponentProps<typeof LabelPrimitive.Root>): react_jsx_runtime.JSX.Element;
83
+ declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): react_jsx_runtime.JSX.Element;
84
84
 
85
- declare const Checkbox: React$1.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
85
+ declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
86
86
 
87
- declare function RadioGroup({ className, ...props }: React$1.ComponentProps<typeof RadioGroupPrimitive.Root>): react_jsx_runtime.JSX.Element;
88
- declare function RadioGroupItem({ className, ...props }: React$1.ComponentProps<typeof RadioGroupPrimitive.Item>): react_jsx_runtime.JSX.Element;
87
+ declare function RadioGroup({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Root>): react_jsx_runtime.JSX.Element;
88
+ declare function RadioGroupItem({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Item>): react_jsx_runtime.JSX.Element;
89
89
 
90
- declare function Select({ ...props }: React$1.ComponentProps<typeof SelectPrimitive.Root>): react_jsx_runtime.JSX.Element;
91
- declare function SelectValue({ ...props }: React$1.ComponentProps<typeof SelectPrimitive.Value>): react_jsx_runtime.JSX.Element;
92
- declare function SelectTrigger({ className, children, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
93
- declare function SelectContent({ className, children, position, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Content>): react_jsx_runtime.JSX.Element;
94
- declare function SelectItem({ className, children, ...props }: React$1.ComponentProps<typeof SelectPrimitive.Item>): react_jsx_runtime.JSX.Element;
90
+ declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): react_jsx_runtime.JSX.Element;
91
+ declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): react_jsx_runtime.JSX.Element;
92
+ declare function SelectTrigger({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
93
+ declare function SelectContent({ className, children, position, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): react_jsx_runtime.JSX.Element;
94
+ declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): react_jsx_runtime.JSX.Element;
95
95
 
96
- declare const ScrollArea: React$1.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
96
+ declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
97
97
 
98
- interface ZendeskTriggerButtonProps {
99
- zendeskId: number;
100
- className?: string;
101
- onClick?: (zendeskId: number) => void;
102
- children?: React.ReactNode;
103
- }
104
- declare function ZendeskTriggerButton({ zendeskId, className, onClick, children, }: ZendeskTriggerButtonProps): react_jsx_runtime.JSX.Element;
105
-
106
- export { Alert, AlertDescription, AlertTitle, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Drawer, DrawerContent, DrawerHeader, DrawerTitle, DrawerTrigger, Input, Label, RadioGroup, RadioGroupItem, ScrollArea, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Tabs, TabsContent, TabsList, TabsTrigger, ZendeskTriggerButton, badgeVariants, buttonVariants };
98
+ export { Alert, AlertDescription, AlertTitle, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Drawer, DrawerContent, DrawerHeader, DrawerTitle, DrawerTrigger, Input, Label, RadioGroup, RadioGroupItem, ScrollArea, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Tabs, TabsContent, TabsList, TabsTrigger, badgeVariants, buttonVariants };
package/dist/internals.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a as Q,b as R,c as S}from"./chunk-JBUNDNKJ.js";import{a as M,b as N,c as O,d as P}from"./chunk-WPMPTV76.js";import{a as G,b as H,c as I,d as J,e as K,f as L}from"./chunk-AKHJDD35.js";import{a as F}from"./chunk-ISWLTY4E.js";import{a as i}from"./chunk-HH4YP6QX.js";import{a as d,b as e,d as f,e as g,f as h}from"./chunk-Z2G2XC43.js";import{a as j,b as m,c as n,d as o,f as p,g as q,h as r,i as s,j as v,k as w,l as x,m as y,n as z,o as A,p as B,q as C,r as D,s as E}from"./chunk-BCSSGG6E.js";import{a as t,b as u}from"./chunk-S2AQQVM7.js";import{a as c}from"./chunk-FCAGJMPU.js";import"./chunk-ZX5OIIJX.js";import"./chunk-MISHDUB2.js";import{a as k,b as l}from"./chunk-4NLAHGUV.js";import"./chunk-3ZWDIEEM.js";import{a as b}from"./chunk-PAZGF4C3.js";import{a}from"./chunk-HC56JKI2.js";import"./chunk-P37U34EQ.js";export{C as Alert,E as AlertDescription,D as AlertTitle,u as Badge,l as Button,G as Card,K as CardContent,J as CardDescription,L as CardFooter,H as CardHeader,I as CardTitle,j as Checkbox,Q as Collapsible,S as CollapsibleContent,R as CollapsibleTrigger,v as Dialog,x as DialogContent,B as DialogDescription,z as DialogFooter,y as DialogHeader,A as DialogTitle,w as DialogTrigger,d as Drawer,f as DrawerContent,g as DrawerHeader,h as DrawerTitle,e as DrawerTrigger,c as Input,b as Label,m as RadioGroup,n as RadioGroupItem,F as ScrollArea,o as Select,r as SelectContent,s as SelectItem,q as SelectTrigger,p as SelectValue,M as Tabs,P as TabsContent,N as TabsList,O as TabsTrigger,i as ZendeskTriggerButton,t as badgeVariants,k as buttonVariants,a as cn};
1
+ import{a as Q,b as R,c as S}from"./chunk-JBUNDNKJ.js";import{a as M,b as N,c as O,d as P}from"./chunk-7R347KBY.js";import{a as G,b as H,c as I,d as J,e as K,f as L}from"./chunk-AFRA4BIW.js";import{a as i}from"./chunk-B7I7YVNK.js";import{a as F}from"./chunk-3A47R5RQ.js";import{a as d,b as e,d as f,e as g,f as h}from"./chunk-TWIUL2P3.js";import{a as j,b as m,c as n,d as o,f as p,g as q,h as r,i as s,j as v,k as w,l as x,m as y,n as z,o as A,p as B,q as C,r as D,s as E}from"./chunk-D6X2WCEG.js";import{a as t,b as u}from"./chunk-HPHWQU34.js";import{a as c}from"./chunk-PD24XKD6.js";import"./chunk-ZX5OIIJX.js";import"./chunk-IXAWEBRI.js";import{a as k,b as l}from"./chunk-WVDTHFGS.js";import"./chunk-3ZWDIEEM.js";import{a as b}from"./chunk-MQ6F5LE4.js";import{a}from"./chunk-43WMZDDH.js";import"./chunk-P37U34EQ.js";export{C as Alert,E as AlertDescription,D as AlertTitle,u as Badge,l as Button,G as Card,K as CardContent,J as CardDescription,L as CardFooter,H as CardHeader,I as CardTitle,j as Checkbox,Q as Collapsible,S as CollapsibleContent,R as CollapsibleTrigger,v as Dialog,x as DialogContent,B as DialogDescription,z as DialogFooter,y as DialogHeader,A as DialogTitle,w as DialogTrigger,d as Drawer,f as DrawerContent,g as DrawerHeader,h as DrawerTitle,e as DrawerTrigger,c as Input,b as Label,m as RadioGroup,n as RadioGroupItem,F as ScrollArea,o as Select,r as SelectContent,s as SelectItem,q as SelectTrigger,p as SelectValue,M as Tabs,P as TabsContent,N as TabsList,O as TabsTrigger,i as ZendeskTriggerButton,t as badgeVariants,k as buttonVariants,a as cn};
2
2
  //# sourceMappingURL=internals.js.map
@@ -1,4 +1,4 @@
1
- import './remoteFlows-DR6mSxki.js';
1
+ import './remoteFlows-D1VLPcdi.js';
2
2
 
3
3
  interface SuccessResponse<D> {
4
4
  data: D;
@@ -1,7 +1,7 @@
1
1
  import { ControllerRenderProps, FieldValues, ControllerFieldState } from 'react-hook-form';
2
2
  import { PropsWithChildren, ReactNode } from 'react';
3
3
  import { AnySchema } from 'yup';
4
- import { Z as HelpCenterArticle } from './types.gen-N_N1mlfc.js';
4
+ import { _ as HelpCenterArticle } from './types.gen-CxiSXabT.js';
5
5
  import { S as SupportedTypes } from './types-Zg1n_9wh.js';
6
6
 
7
7
  type ThemeProviderProps = PropsWithChildren<{
@@ -1,18 +1,18 @@
1
- import { j as Employment, F as File, g as CreateContractDocumentResponse, f as SignContractDocument, S as SuccessResponse } from './types.gen-N_N1mlfc.js';
1
+ import { j as Employment, F as File, g as CreateContractDocumentResponse, f as SignContractDocument, S as SuccessResponse } from './types.gen-CxiSXabT.js';
2
2
  import { OnboardingBack } from './flows/ContractorOnboarding/components/OnboardingBack.js';
3
3
  import { OnboardingSubmit } from './flows/ContractorOnboarding/components/OnboardingSubmit.js';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
- import { N as NormalizedFieldError } from './mutations-B7htnE-g.js';
5
+ import { N as NormalizedFieldError } from './mutations-juOpbR-A.js';
6
6
  import * as _tanstack_query_core from '@tanstack/query-core';
7
7
  import * as _remoteoss_json_schema_form from '@remoteoss/json-schema-form';
8
8
  import { Fields } from '@remoteoss/json-schema-form';
9
9
  import * as React$1 from 'react';
10
10
  import { STEPS } from './flows/ContractorOnboarding/utils.js';
11
11
  import { Step } from './flows/useStepState.js';
12
- import { M as Meta, J as JSFFieldset, $ as $TSFixMe } from './remoteFlows-DR6mSxki.js';
12
+ import { M as Meta, J as JSFFieldset, $ as $TSFixMe } from './remoteFlows-D1VLPcdi.js';
13
13
  import { FieldValues } from 'react-hook-form';
14
14
  import { BasicInformationStep } from './flows/ContractorOnboarding/components/BasicInformationStep.js';
15
- import { g as SelectCountryStep } from './types-DEybNxfT.js';
15
+ import { g as SelectCountryStep } from './types-CCzA9vuJ.js';
16
16
  import { FlowOptions, JSFModify } from './flows/types.js';
17
17
  import { OnboardingInvite } from './flows/Onboarding/components/OnboardingInvite.js';
18
18
 
@@ -101,7 +101,7 @@ declare const useContractorOnboarding: ({ countryCode, externalId, employmentId,
101
101
  * @param values - Form values to parse
102
102
  * @returns Parsed form values
103
103
  */
104
- parseFormValues: (values: FieldValues) => Record<string, any>;
104
+ parseFormValues: (values: FieldValues) => FieldValues;
105
105
  /**
106
106
  * Function to validate form values against the onboarding schema
107
107
  * @param values - Form values to validate
@@ -1,10 +1,10 @@
1
- import { n as EmploymentCreationResponse, q as EmploymentResponse, S as SuccessResponse, o as PostCreateEmployment2Error, r as PatchUpdateEmployment2Error, t as PutUpdateBenefitOfferError, j as Employment$1, p as EmploymentCreateParams } from './types.gen-N_N1mlfc.js';
1
+ import { u as EmploymentCreationResponse, A as EmploymentResponse, S as SuccessResponse, y as PostCreateEmployment2Error, B as PatchUpdateEmployment2Error, G as PutUpdateBenefitOfferError, j as Employment$1, z as EmploymentCreateParams } from './types.gen-CxiSXabT.js';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import { OnboardingBack } from './flows/Onboarding/components/OnboardingBack.js';
4
4
  import { OnboardingInvite } from './flows/Onboarding/components/OnboardingInvite.js';
5
- import { N as NormalizedFieldError, S as SuccessResponse$1, E as ErrorResponse } from './mutations-B7htnE-g.js';
5
+ import { N as NormalizedFieldError, S as SuccessResponse$1, E as ErrorResponse } from './mutations-juOpbR-A.js';
6
6
  import { OnboardingSubmit } from './flows/Onboarding/components/OnboardingSubmit.js';
7
- import { C as Components, M as Meta, J as JSFFieldset } from './remoteFlows-DR6mSxki.js';
7
+ import { C as Components, M as Meta, J as JSFFieldset } from './remoteFlows-D1VLPcdi.js';
8
8
  import * as _tanstack_query_core from '@tanstack/query-core';
9
9
  import * as React$1 from 'react';
10
10
  import * as _remoteoss_json_schema_form from '@remoteoss/json-schema-form';
@@ -154,7 +154,7 @@ declare const useOnboarding: ({ employmentId, companyId, countryCode, type, opti
154
154
  * @param values - Form values to parse
155
155
  * @returns Parsed form values
156
156
  */
157
- parseFormValues: (values: FieldValues) => Record<string, any>;
157
+ parseFormValues: (values: FieldValues) => FieldValues;
158
158
  /**
159
159
  * Function to handle form submission
160
160
  * @param values - Form values to submit
@@ -0,0 +1,174 @@
1
+ import { O as OffboardingResponse, P as PostCreateOffboardingError, $ as TerminationDetailsParams } from './types.gen-CxiSXabT.js';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
+ import { E as ErrorResponse, S as SuccessResponse } from './mutations-juOpbR-A.js';
4
+ import * as _remoteoss_json_schema_form from '@remoteoss/json-schema-form';
5
+ import { $TSFixMe } from '@remoteoss/json-schema-form';
6
+ import { Step } from './flows/useStepState.js';
7
+ import { StepTerminationKeys } from './flows/Termination/utils.js';
8
+ import { TerminationBack } from './flows/Termination/TerminationBack.js';
9
+ import { TerminationSubmit } from './flows/Termination/TerminationSubmit.js';
10
+ import { TimeOff } from './flows/Termination/TimeOff.js';
11
+ import { JSFModify } from './flows/types.js';
12
+
13
+ type AdditionalDetailsFormProps = {
14
+ requesterName: string;
15
+ onSubmit?: (payload: TerminationFormValues) => void | Promise<void>;
16
+ onError?: (error: Error) => void;
17
+ onSuccess?: (data: OffboardingResponse) => void | Promise<void>;
18
+ };
19
+ declare function AdditionalDetailsForm({ requesterName, onSubmit, onSuccess, onError, }: AdditionalDetailsFormProps): react_jsx_runtime.JSX.Element;
20
+
21
+ type EmployeeComunicationProps = {
22
+ onSubmit?: (payload: TerminationFormValues) => void | Promise<void>;
23
+ };
24
+ declare function EmployeeCommunicationForm({ onSubmit, }: EmployeeComunicationProps): react_jsx_runtime.JSX.Element;
25
+
26
+ type TerminationHookProps = Omit<TerminationFlowProps, 'render'>;
27
+ declare const useTermination: ({ employmentId, options, initialValues: terminationInitialValues, }: TerminationHookProps) => {
28
+ /**
29
+ * Employment id passed useful to be used between components
30
+ */
31
+ employmentId: string;
32
+ /**
33
+ * Current step state containing the current step and total number of steps
34
+ */
35
+ stepState: {
36
+ currentStep: Step<StepTerminationKeys>;
37
+ totalSteps: number;
38
+ values: {
39
+ paid_time_off: TerminationFormValues;
40
+ termination_details: TerminationFormValues;
41
+ employee_communication: TerminationFormValues;
42
+ additional_information: TerminationFormValues;
43
+ } | null;
44
+ };
45
+ /**
46
+ * Array of form fields from the contract amendment schema
47
+ */
48
+ fields: _remoteoss_json_schema_form.Fields;
49
+ /**
50
+ * Loading state indicating if the termination schema is being fetched
51
+ */
52
+ isLoading: boolean;
53
+ /**
54
+ * Loading state indicating if a contract amendment mutation is in progress
55
+ */
56
+ isSubmitting: boolean;
57
+ /**
58
+ * Initial form values
59
+ */
60
+ initialValues: TerminationFormValues;
61
+ /**
62
+ * Function to validate form values against the contract amendment schema
63
+ * @param values - Form values to validate
64
+ * @returns Validation result or null if no schema is available
65
+ */
66
+ handleValidation: (values: TerminationFormValues) => {
67
+ yupError: $TSFixMe;
68
+ formErrors: $TSFixMe;
69
+ } | null;
70
+ /**
71
+ * Function to update the current form field values
72
+ * @param values - New form values to set
73
+ */
74
+ checkFieldUpdates: (values: Partial<TerminationFormValues>) => void;
75
+ /**
76
+ * Function to parse form values before submission
77
+ * @param values - Form values to parse
78
+ * @returns Parsed form values
79
+ */
80
+ parseFormValues: (values: TerminationFormValues) => Record<string, any>;
81
+ /**
82
+ * Function to handle form submission
83
+ * @param values - Form values to submit
84
+ * @returns Promise resolving to the mutation result
85
+ */
86
+ onSubmit: (values: TerminationFormValues) => Promise<(ErrorResponse<Error> | SuccessResponse<({
87
+ data: OffboardingResponse;
88
+ error: undefined;
89
+ } | {
90
+ data: undefined;
91
+ error: PostCreateOffboardingError;
92
+ }) & {
93
+ request: Request;
94
+ response: Response;
95
+ }>) | undefined>;
96
+ /**
97
+ * Function to handle going back to the previous step
98
+ * @returns {void}
99
+ */
100
+ back: () => void;
101
+ /**
102
+ * Function to handle going to the next step
103
+ * @returns {void}
104
+ */
105
+ next: () => void;
106
+ };
107
+
108
+ type PaidTimeOffFormProps = {
109
+ onSubmit?: (payload: TerminationFormValues) => void | Promise<void>;
110
+ };
111
+ declare function PaidTimeOffForm({ onSubmit }: PaidTimeOffFormProps): react_jsx_runtime.JSX.Element;
112
+
113
+ type TerminationDetailsFormProps = {
114
+ onSubmit?: (payload: TerminationFormValues) => void | Promise<void>;
115
+ };
116
+ declare function TerminationDetailsForm({ onSubmit, }: TerminationDetailsFormProps): react_jsx_runtime.JSX.Element;
117
+
118
+ type TerminationFormValues = {
119
+ acknowledge_termination_procedure: boolean;
120
+ additional_comments: string;
121
+ agrees_to_pto_amount: string;
122
+ agrees_to_pto_amount_notes: string | null;
123
+ confidential: string;
124
+ customer_informed_employee: string;
125
+ customer_informed_employee_date: string | null;
126
+ customer_informed_employee_description: string | null;
127
+ personal_email: string;
128
+ proposed_termination_date: string;
129
+ reason_description: string;
130
+ risk_assessment_reasons: TerminationDetailsParams['risk_assessment_reasons'];
131
+ termination_reason: TerminationDetailsParams['termination_reason'] | undefined;
132
+ termination_reason_files: TerminationDetailsParams['termination_reason_files'];
133
+ timesheet_file: TerminationDetailsParams['timesheet_file'];
134
+ will_challenge_termination: string;
135
+ will_challenge_termination_description: string | null;
136
+ };
137
+ type TerminationRenderProps = {
138
+ /**
139
+ * The termination bag returned by the useTermination hook.
140
+ * This bag contains all the methods and properties needed to handle the termination flow.
141
+ * @see {@link useTermination}
142
+ */
143
+ terminationBag: ReturnType<typeof useTermination>;
144
+ /**
145
+ * The components used in the termination flow.
146
+ * This includes different steps, submit button, back button and timeoff.
147
+ * @see {@link TerminationSubmit}
148
+ * @see {@link TimeOff}
149
+ * @see {@link TerminationBack}
150
+ * @see {@link EmployeeCommunicationForm}
151
+ * @see {@link TerminationDetailsForm}
152
+ * @see {@link PaidTimeOffForm}
153
+ * @see {@link AdditionalDetailsForm}
154
+ */
155
+ components: {
156
+ SubmitButton: typeof TerminationSubmit;
157
+ TimeOff: typeof TimeOff;
158
+ Back: typeof TerminationBack;
159
+ EmployeeComunicationStep: typeof EmployeeCommunicationForm;
160
+ TerminationDetailsStep: typeof TerminationDetailsForm;
161
+ PaidTimeOffStep: typeof PaidTimeOffForm;
162
+ AdditionalDetailsStep: typeof AdditionalDetailsForm;
163
+ };
164
+ };
165
+ type TerminationFlowProps = {
166
+ employmentId: string;
167
+ render: ({ terminationBag, components, }: TerminationRenderProps) => React.ReactNode;
168
+ options?: {
169
+ jsfModify?: JSFModify;
170
+ };
171
+ initialValues?: Record<string, unknown>;
172
+ };
173
+
174
+ export { AdditionalDetailsForm as A, EmployeeCommunicationForm as E, PaidTimeOffForm as P, type TerminationFormValues as T, type TerminationFlowProps as a, type TerminationRenderProps as b, TerminationDetailsForm as c, useTermination as u };
@@ -263,6 +263,17 @@ type CostCalculatorEmploymentParam = {
263
263
  regional_to_employer_exchange_rate?: string;
264
264
  title?: string;
265
265
  };
266
+ type UnlimitedDaysandHoursResponse = {
267
+ type: 'unlimited';
268
+ };
269
+ /**
270
+ * Includes requested timeoffs (not approved) in the past or in the future.
271
+ */
272
+ type LimitedDaysandHoursResponse = {
273
+ days: number;
274
+ hours: number;
275
+ type: 'limited';
276
+ };
266
277
  /**
267
278
  * A supported country on Remote
268
279
  */
@@ -604,6 +615,12 @@ type CostCalculatorCosts = {
604
615
  */
605
616
  monthly_total: number;
606
617
  };
618
+ /**
619
+ * Response schema for listing leave policies summary
620
+ */
621
+ type ListLeavePoliciesSummaryResponse = {
622
+ data: Array<LeavePolicySummary>;
623
+ };
607
624
  /**
608
625
  * The details of the requested changes for the contract amendment.
609
626
  */
@@ -769,6 +786,73 @@ type OnboardingTasks = {
769
786
  personal_details: TaskDescription;
770
787
  pricing_plan_details: TaskDescription;
771
788
  };
789
+ /**
790
+ * Leave Policy Summary
791
+ */
792
+ type LeavePolicySummary = {
793
+ /**
794
+ * The annual balance represents the balance for the current entitlement period.
795
+ * Unlike the regular balance, it does not account for accrued value and only considers the annual entitlement as the basis for calculations.
796
+ *
797
+ */
798
+ annual_balance: UnlimitedDaysandHoursResponse | LimitedDaysandHoursResponse;
799
+ /**
800
+ * The annual entitlement represents what an employee is entitled to in the current entitlement period.
801
+ * It does not account for any accrued value.
802
+ *
803
+ */
804
+ annual_entitlement: UnlimitedDaysandHoursResponse | LimitedDaysandHoursResponse;
805
+ /**
806
+ * The balance is the entitlement minus the taken timeoff (i.e 10 entitlement - 3 taken = 7 balance)
807
+ */
808
+ balance: UnlimitedDaysandHoursResponse | LimitedDaysandHoursResponse;
809
+ /**
810
+ * The current entitlement is the accrued time entitled for the employee plus any other extra entitlements (such as carryover).
811
+ */
812
+ current_entitlement: UnlimitedDaysandHoursResponse | LimitedDaysandHoursResponse;
813
+ leave_policy: EmployeeLeavePolicy;
814
+ /**
815
+ * Includes requested timeoffs (not approved) in the past or in the future.
816
+ */
817
+ pending_approval: {
818
+ days: number;
819
+ hours: number;
820
+ type: 'limited';
821
+ };
822
+ /**
823
+ * Includes all time off (past and future, pending or approved).
824
+ */
825
+ taken: {
826
+ days: number;
827
+ hours: number;
828
+ type: 'limited';
829
+ };
830
+ /**
831
+ * Includes all upcoming approved time off.
832
+ */
833
+ upcoming_approved: {
834
+ days: number;
835
+ hours: number;
836
+ type: 'limited';
837
+ };
838
+ /**
839
+ * Includes all upcoming requested time off.
840
+ */
841
+ upcoming_requested: {
842
+ days: number;
843
+ hours: number;
844
+ type: 'limited';
845
+ };
846
+ /**
847
+ * Includes only approved time off in the past.
848
+ */
849
+ used: {
850
+ days: number;
851
+ hours: number;
852
+ type: 'limited';
853
+ };
854
+ working_hours_per_day: number;
855
+ };
772
856
  type EmploymentCreationResponse = {
773
857
  data?: {
774
858
  employment?: EmploymentBasicResponse;
@@ -794,6 +878,15 @@ type SuccessResponse = {
794
878
  status?: string;
795
879
  };
796
880
  };
881
+ /**
882
+ * Leave Policy abstraction representation for the employee
883
+ */
884
+ type EmployeeLeavePolicy = {
885
+ description: string | null;
886
+ leave_type: TimeoffType;
887
+ name: string;
888
+ unit: 'days' | 'hours' | 'unlimited';
889
+ };
797
890
  /**
798
891
  * Magic link params
799
892
  */
@@ -1488,4 +1581,4 @@ type PostSignContractDocumentErrors = {
1488
1581
  };
1489
1582
  type PostSignContractDocumentError = PostSignContractDocumentErrors[keyof PostSignContractDocumentErrors];
1490
1583
 
1491
- export type { CreateContractEligibilityParams as A, CostCalculatorEstimateResponse as B, CreateOffboardingParams as C, PostCreateEstimationError as D, EmploymentShowResponse as E, File as F, CostCalculatorEstimatePdfResponse as G, PostCreateEstimationPdfError as H, CostCalculatorEstimateParams as I, CostCalculatorEstimateCsvResponse as J, PostCreateEstimationCsvError as K, MinimalRegion as L, MagicLinkResponse as M, MinimalCountry as N, OffboardingResponse as O, PostCreateOffboardingError as P, EmploymentTermType as Q, CostCalculatorEmployment as R, SuccessResponse as S, TerminationDetailsParams as T, UnifiedEmploymentUpsertBenefitOffersRequest as U, ValidationError as V, ListTimeoffResponse as W, TimeoffStatus as X, Currency as Y, HelpCenterArticle as Z, ContractAmendmentAutomatableResponse as a, PostAutomatableContractAmendmentError as b, ContractAmendmentResponse as c, PostCreateContractAmendmentError as d, PostSignContractDocumentError as e, SignContractDocument as f, CreateContractDocumentResponse as g, PostCreateContractDocumentError as h, CreateContractDocument as i, Employment as j, Company as k, PostInviteEmploymentInvitationError as l, PostCreateRiskReserveError as m, EmploymentCreationResponse as n, PostCreateEmployment2Error as o, EmploymentCreateParams as p, EmploymentResponse as q, PatchUpdateEmployment2Error as r, EmploymentFullParams as s, PutUpdateBenefitOfferError as t, UnprocessableEntityResponse as u, MagicLinkParams as v, ConvertCurrencyResponse as w, PostConvertRawCurrencyConverterError as x, ConvertCurrencyParams as y, PostCreateContractEligibilityError as z };
1584
+ export type { TerminationDetailsParams as $, EmploymentResponse as A, PatchUpdateEmployment2Error as B, CreateOffboardingParams as C, EmploymentFullParams as D, EmploymentShowResponse as E, File as F, PutUpdateBenefitOfferError as G, MagicLinkResponse as H, UnprocessableEntityResponse as I, MagicLinkParams as J, ConvertCurrencyResponse as K, ListTimeoffResponse as L, MinimalRegion as M, PostConvertRawCurrencyConverterError as N, OffboardingResponse as O, PostCreateOffboardingError as P, ConvertCurrencyParams as Q, PostCreateContractEligibilityError as R, SuccessResponse as S, CreateContractEligibilityParams as T, UnifiedEmploymentUpsertBenefitOffersRequest as U, ValidationError as V, TimeoffStatus as W, TimeoffType as X, ListLeavePoliciesSummaryResponse as Y, Currency as Z, HelpCenterArticle as _, ContractAmendmentAutomatableResponse as a, PostAutomatableContractAmendmentError as b, ContractAmendmentResponse as c, PostCreateContractAmendmentError as d, PostSignContractDocumentError as e, SignContractDocument as f, CreateContractDocumentResponse as g, PostCreateContractDocumentError as h, CreateContractDocument as i, Employment as j, CostCalculatorEstimateResponse as k, PostCreateEstimationError as l, CostCalculatorEstimatePdfResponse as m, PostCreateEstimationPdfError as n, CostCalculatorEstimateParams as o, CostCalculatorEstimateCsvResponse as p, PostCreateEstimationCsvError as q, MinimalCountry as r, EmploymentTermType as s, CostCalculatorEmployment as t, EmploymentCreationResponse as u, Company as v, PostInviteEmploymentInvitationError as w, PostCreateRiskReserveError as x, PostCreateEmployment2Error as y, EmploymentCreateParams as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remoteoss/remote-flows",
3
- "version": "0.21.1",
3
+ "version": "0.23.0",
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 type-check && npm run test",
@@ -108,7 +108,6 @@
108
108
  },
109
109
  "devDependencies": {
110
110
  "@arethetypeswrong/cli": "^0.17.3",
111
- "@changesets/cli": "^2.28.1",
112
111
  "@eslint/js": "^9.22.0",
113
112
  "@hey-api/openapi-ts": "^0.64.4",
114
113
  "@testing-library/jest-dom": "^6.6.3",
@@ -1,2 +0,0 @@
1
- import{a as e}from"./chunk-HC56JKI2.js";import{a as t}from"./chunk-P37U34EQ.js";import{Slot as i}from"@radix-ui/react-slot";import{cva as d}from"class-variance-authority";import{jsx as p}from"react/jsx-runtime";var u=d("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:o,variant:n,size:r,asChild:a=!1,...s}){return p(a?i:"button",{"data-slot":"button",className:e(u({variant:n,size:r,className:o}),"RemoteFlows__Button"),...s})}t(b,"Button");export{u as a,b};
2
- //# sourceMappingURL=chunk-4NLAHGUV.js.map