@remoteoss/remote-flows 1.2.0 → 1.2.2

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 (277) hide show
  1. package/dist/chunk-23OYALRY.js +2 -0
  2. package/dist/chunk-23OYALRY.js.map +1 -0
  3. package/dist/{chunk-ZSX2O4ZJ.js → chunk-3ALAJXRV.js} +2 -2
  4. package/dist/{chunk-D3YUACHO.js → chunk-3TZG2IN7.js} +2 -2
  5. package/dist/{chunk-KDMBZNAE.js → chunk-46FT5RHQ.js} +2 -2
  6. package/dist/{chunk-O6YXA5AM.js → chunk-4STFNBEP.js} +2 -2
  7. package/dist/{chunk-BGWVXKFX.js → chunk-5FYGD7NK.js} +2 -2
  8. package/dist/{chunk-TVPY6KPQ.js → chunk-5JLTIH7G.js} +2 -2
  9. package/dist/chunk-5S66VYFD.js +2 -0
  10. package/dist/chunk-5S66VYFD.js.map +1 -0
  11. package/dist/{chunk-XEUZL7O2.js → chunk-65HLULDL.js} +2 -2
  12. package/dist/chunk-6GTRAHWJ.js +2 -0
  13. package/dist/chunk-6GTRAHWJ.js.map +1 -0
  14. package/dist/chunk-6P4DTWYK.js +2 -0
  15. package/dist/chunk-6P4DTWYK.js.map +1 -0
  16. package/dist/{chunk-M2EKZ2FC.js → chunk-6SRDRMBU.js} +2 -2
  17. package/dist/chunk-6SRDRMBU.js.map +1 -0
  18. package/dist/chunk-7RREQLI5.js +2 -0
  19. package/dist/chunk-7RREQLI5.js.map +1 -0
  20. package/dist/{chunk-VUY7ZZAD.js → chunk-A3K4Q2U6.js} +2 -2
  21. package/dist/{chunk-5VPMZXGU.js → chunk-BAWJZ6MA.js} +2 -2
  22. package/dist/{chunk-ALRODBM2.js → chunk-BEWGN2JK.js} +2 -2
  23. package/dist/{chunk-3SAV2OEE.js → chunk-BHYFPY64.js} +2 -2
  24. package/dist/{chunk-77EBKLW6.js → chunk-C74N2AWG.js} +2 -2
  25. package/dist/{chunk-RNULWNWR.js → chunk-CULOWG5X.js} +2 -2
  26. package/dist/chunk-DRGQQXWZ.js +2 -0
  27. package/dist/chunk-DRGQQXWZ.js.map +1 -0
  28. package/dist/chunk-E25DZ75Z.js +2 -0
  29. package/dist/chunk-E25DZ75Z.js.map +1 -0
  30. package/dist/chunk-E5PHO3SS.js +2 -0
  31. package/dist/chunk-E5PHO3SS.js.map +1 -0
  32. package/dist/chunk-EDVJBPCB.js +2 -0
  33. package/dist/chunk-EDVJBPCB.js.map +1 -0
  34. package/dist/chunk-ERRQIROU.js +2 -0
  35. package/dist/chunk-ERRQIROU.js.map +1 -0
  36. package/dist/chunk-F3KEIVSE.js +2 -0
  37. package/dist/chunk-F3KEIVSE.js.map +1 -0
  38. package/dist/{chunk-F53TRJ4K.js → chunk-FKLQBAJ5.js} +2 -2
  39. package/dist/{chunk-DS5MV4BA.js → chunk-GBZXVNGQ.js} +2 -2
  40. package/dist/chunk-H6YNMT4M.js +2 -0
  41. package/dist/chunk-H6YNMT4M.js.map +1 -0
  42. package/dist/{chunk-UVA4PFNM.js → chunk-HAV7FPRM.js} +2 -2
  43. package/dist/{chunk-Z47XN6ZT.js → chunk-IOZFJ65G.js} +2 -2
  44. package/dist/{chunk-7YY7DH4I.js → chunk-KCXAXVC5.js} +2 -2
  45. package/dist/{chunk-WUZ5OZ42.js → chunk-KY2JSZI3.js} +2 -2
  46. package/dist/{chunk-T4KJKYPC.js → chunk-LJUHIEEZ.js} +2 -2
  47. package/dist/chunk-LQBVRVXH.js +2 -0
  48. package/dist/chunk-LQBVRVXH.js.map +1 -0
  49. package/dist/chunk-M2TLNSTK.js +2 -0
  50. package/dist/chunk-M2TLNSTK.js.map +1 -0
  51. package/dist/{chunk-ASSO5FYG.js → chunk-MNSIBSAM.js} +2 -2
  52. package/dist/{chunk-L23UIJDU.js → chunk-O37C4LZF.js} +2 -2
  53. package/dist/{chunk-COKMRJQ7.js → chunk-OUI554QS.js} +2 -2
  54. package/dist/{chunk-PTHW7GI4.js → chunk-QJ5MCAIN.js} +2 -2
  55. package/dist/{chunk-GT6DVQEB.js → chunk-QYWA5XM4.js} +2 -2
  56. package/dist/{chunk-NVZHJOA3.js → chunk-RNM46ZUE.js} +2 -2
  57. package/dist/{chunk-BP4PHE44.js → chunk-RTKKWC4M.js} +2 -2
  58. package/dist/{chunk-NCWPOV3B.js → chunk-RVIGZOGF.js} +2 -2
  59. package/dist/{chunk-MUILMUKC.js → chunk-S2FD3J22.js} +2 -2
  60. package/dist/chunk-SIYKTLFS.js +2 -0
  61. package/dist/chunk-SIYKTLFS.js.map +1 -0
  62. package/dist/chunk-T6HCUFYI.js +2 -0
  63. package/dist/chunk-T6HCUFYI.js.map +1 -0
  64. package/dist/{chunk-FLNGPYQ2.js → chunk-TVJYCR33.js} +2 -2
  65. package/dist/chunk-TVJYCR33.js.map +1 -0
  66. package/dist/{chunk-OL7SFTJV.js → chunk-UTWP5CJZ.js} +2 -2
  67. package/dist/chunk-XGVSEXYA.js +2 -0
  68. package/dist/chunk-XGVSEXYA.js.map +1 -0
  69. package/dist/chunk-XRI6PRXK.js +2 -0
  70. package/dist/chunk-XRI6PRXK.js.map +1 -0
  71. package/dist/chunk-Y2NSR2N6.js +2 -0
  72. package/dist/chunk-Y2NSR2N6.js.map +1 -0
  73. package/dist/chunk-Y5P5IJRN.js +2 -0
  74. package/dist/chunk-Y5P5IJRN.js.map +1 -0
  75. package/dist/{chunk-LD2UDBK4.js → chunk-ZP2BE7U6.js} +2 -2
  76. package/dist/flows/ContractAmendment/ContractAmendmentBack.js +1 -1
  77. package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
  78. package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +3 -3
  79. package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
  80. package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
  81. package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
  82. package/dist/flows/ContractAmendment/ContractAmendmentSubmit.js +1 -1
  83. package/dist/flows/ContractAmendment/context.d.ts +3 -3
  84. package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
  85. package/dist/flows/ContractAmendment/index.d.ts +3 -3
  86. package/dist/flows/ContractAmendment/index.js +1 -1
  87. package/dist/flows/ContractAmendment/types.d.ts +2 -2
  88. package/dist/flows/ContractAmendment/utils.d.ts +1 -1
  89. package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +5 -5
  90. package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
  91. package/dist/flows/ContractorOnboarding/api.d.ts +2 -2
  92. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
  93. package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
  94. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +5 -5
  95. package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
  96. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +5 -5
  97. package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
  98. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +5 -5
  99. package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
  100. package/dist/flows/ContractorOnboarding/components/OnboardingBack.js +1 -1
  101. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
  102. package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
  103. package/dist/flows/ContractorOnboarding/components/OnboardingSubmit.js +1 -1
  104. package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +5 -5
  105. package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
  106. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
  107. package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
  108. package/dist/flows/ContractorOnboarding/context.d.ts +5 -5
  109. package/dist/flows/ContractorOnboarding/hooks.d.ts +5 -5
  110. package/dist/flows/ContractorOnboarding/hooks.js +1 -1
  111. package/dist/flows/ContractorOnboarding/index.d.ts +5 -5
  112. package/dist/flows/ContractorOnboarding/index.js +1 -1
  113. package/dist/flows/ContractorOnboarding/types.d.ts +5 -5
  114. package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
  115. package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
  116. package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
  117. package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
  118. package/dist/flows/CostCalculator/CostCalculatorResetButton.js +1 -1
  119. package/dist/flows/CostCalculator/CostCalculatorSubmitButton.js +1 -1
  120. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +2 -2
  121. package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
  122. package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +2 -2
  123. package/dist/flows/CostCalculator/api.d.ts +2 -2
  124. package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
  125. package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
  126. package/dist/flows/CostCalculator/context.d.ts +3 -3
  127. package/dist/flows/CostCalculator/hooks.d.ts +3 -3
  128. package/dist/flows/CostCalculator/hooks.js +1 -1
  129. package/dist/flows/CostCalculator/index.d.ts +3 -3
  130. package/dist/flows/CostCalculator/index.js +1 -1
  131. package/dist/flows/CostCalculator/types.d.ts +2 -2
  132. package/dist/flows/CostCalculator/utils.d.ts +3 -3
  133. package/dist/flows/CostCalculator/utils.js +1 -1
  134. package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
  135. package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
  136. package/dist/flows/Onboarding/api.d.ts +6 -6
  137. package/dist/flows/Onboarding/api.js +1 -1
  138. package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
  139. package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
  140. package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +4 -4
  141. package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
  142. package/dist/flows/Onboarding/components/BenefitsStep.d.ts +4 -4
  143. package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
  144. package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +4 -4
  145. package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
  146. package/dist/flows/Onboarding/components/OnboardingBack.js +1 -1
  147. package/dist/flows/Onboarding/components/OnboardingForm.d.ts +4 -4
  148. package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
  149. package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
  150. package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
  151. package/dist/flows/Onboarding/components/OnboardingSubmit.js +1 -1
  152. package/dist/flows/Onboarding/components/ReviewStep.d.ts +4 -4
  153. package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
  154. package/dist/flows/Onboarding/components/SaveDraftButton.js +1 -1
  155. package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +4 -4
  156. package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
  157. package/dist/flows/Onboarding/context.d.ts +4 -4
  158. package/dist/flows/Onboarding/hooks.d.ts +4 -4
  159. package/dist/flows/Onboarding/hooks.js +1 -1
  160. package/dist/flows/Onboarding/index.d.ts +4 -4
  161. package/dist/flows/Onboarding/index.js +1 -1
  162. package/dist/flows/Onboarding/types.d.ts +4 -4
  163. package/dist/flows/Onboarding/utils.d.ts +4 -4
  164. package/dist/flows/Onboarding/utils.js +1 -1
  165. package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -4
  166. package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
  167. package/dist/flows/Termination/EmployeeComunicationForm.d.ts +4 -4
  168. package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
  169. package/dist/flows/Termination/PaidTimeOffForm.d.ts +4 -4
  170. package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
  171. package/dist/flows/Termination/TerminationBack.js +1 -1
  172. package/dist/flows/Termination/TerminationDetailsForm.d.ts +4 -4
  173. package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
  174. package/dist/flows/Termination/TerminationFlow.d.ts +4 -4
  175. package/dist/flows/Termination/TerminationFlow.js +1 -1
  176. package/dist/flows/Termination/TerminationForm.d.ts +4 -4
  177. package/dist/flows/Termination/TerminationForm.js +1 -1
  178. package/dist/flows/Termination/TerminationSubmit.js +1 -1
  179. package/dist/flows/Termination/api.d.ts +5 -5
  180. package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
  181. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +6 -6
  182. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.js +1 -1
  183. package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +6 -6
  184. package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +6 -6
  185. package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
  186. package/dist/flows/Termination/context.d.ts +4 -4
  187. package/dist/flows/Termination/hooks.d.ts +4 -4
  188. package/dist/flows/Termination/hooks.js +1 -1
  189. package/dist/flows/Termination/index.d.ts +6 -6
  190. package/dist/flows/Termination/index.js +1 -1
  191. package/dist/flows/Termination/json-schemas/schema.d.ts +4 -4
  192. package/dist/flows/Termination/types.d.ts +4 -4
  193. package/dist/flows/Termination/utils.d.ts +4 -4
  194. package/dist/flows/types.d.ts +5 -6
  195. package/dist/index.d.ts +8 -8
  196. package/dist/index.js +1 -1
  197. package/dist/index.js.map +1 -1
  198. package/dist/internals.js +1 -1
  199. package/dist/{mutations-9qiDR92y.d.ts → mutations-CPqUOEmz.d.ts} +1 -1
  200. package/dist/{remoteFlows-MePlSSWv.d.ts → remoteFlows-CLgJcdkS.d.ts} +36 -18
  201. package/dist/{types-VZNnRHGB.d.ts → types-BGV7PQbp.d.ts} +2 -2
  202. package/dist/{types-BFDVSvVP.d.ts → types-B_ZvICFS.d.ts} +4 -5
  203. package/dist/{types-DDcdRWu_.d.ts → types-Ckh2r3F3.d.ts} +2 -2
  204. package/dist/{types-BTxMhXje.d.ts → types-epJRqrJU.d.ts} +4 -4
  205. package/dist/{types.gen-UyEyxhzQ.d.ts → types.gen-D2nbxMA0.d.ts} +1 -1
  206. package/package.json +6 -2
  207. package/dist/chunk-26DGUFCY.js +0 -2
  208. package/dist/chunk-26DGUFCY.js.map +0 -1
  209. package/dist/chunk-3JVRFY6F.js +0 -2
  210. package/dist/chunk-3JVRFY6F.js.map +0 -1
  211. package/dist/chunk-4P5BLP5U.js +0 -2
  212. package/dist/chunk-4P5BLP5U.js.map +0 -1
  213. package/dist/chunk-6YXSWOKH.js +0 -2
  214. package/dist/chunk-6YXSWOKH.js.map +0 -1
  215. package/dist/chunk-7FMR3EIX.js +0 -2
  216. package/dist/chunk-7FMR3EIX.js.map +0 -1
  217. package/dist/chunk-7WTIUK53.js +0 -2
  218. package/dist/chunk-7WTIUK53.js.map +0 -1
  219. package/dist/chunk-BZUYUGQF.js +0 -2
  220. package/dist/chunk-BZUYUGQF.js.map +0 -1
  221. package/dist/chunk-ELXVVBRD.js +0 -2
  222. package/dist/chunk-ELXVVBRD.js.map +0 -1
  223. package/dist/chunk-FLNGPYQ2.js.map +0 -1
  224. package/dist/chunk-FXRIYGSV.js +0 -2
  225. package/dist/chunk-FXRIYGSV.js.map +0 -1
  226. package/dist/chunk-KG63T7OU.js +0 -2
  227. package/dist/chunk-KG63T7OU.js.map +0 -1
  228. package/dist/chunk-M2EKZ2FC.js.map +0 -1
  229. package/dist/chunk-MDDI5GLL.js +0 -2
  230. package/dist/chunk-MDDI5GLL.js.map +0 -1
  231. package/dist/chunk-MKE27NUF.js +0 -2
  232. package/dist/chunk-MKE27NUF.js.map +0 -1
  233. package/dist/chunk-NIGMIGF6.js +0 -2
  234. package/dist/chunk-NIGMIGF6.js.map +0 -1
  235. package/dist/chunk-OA7477F5.js +0 -2
  236. package/dist/chunk-OA7477F5.js.map +0 -1
  237. package/dist/chunk-QIZEGFKJ.js +0 -2
  238. package/dist/chunk-QIZEGFKJ.js.map +0 -1
  239. package/dist/chunk-QP3VWGCS.js +0 -2
  240. package/dist/chunk-QP3VWGCS.js.map +0 -1
  241. package/dist/chunk-SGFXAOTZ.js +0 -2
  242. package/dist/chunk-SGFXAOTZ.js.map +0 -1
  243. package/dist/chunk-STPJXT2A.js +0 -2
  244. package/dist/chunk-STPJXT2A.js.map +0 -1
  245. package/dist/chunk-V2L3UV7M.js +0 -2
  246. package/dist/chunk-V2L3UV7M.js.map +0 -1
  247. /package/dist/{chunk-ZSX2O4ZJ.js.map → chunk-3ALAJXRV.js.map} +0 -0
  248. /package/dist/{chunk-D3YUACHO.js.map → chunk-3TZG2IN7.js.map} +0 -0
  249. /package/dist/{chunk-KDMBZNAE.js.map → chunk-46FT5RHQ.js.map} +0 -0
  250. /package/dist/{chunk-O6YXA5AM.js.map → chunk-4STFNBEP.js.map} +0 -0
  251. /package/dist/{chunk-BGWVXKFX.js.map → chunk-5FYGD7NK.js.map} +0 -0
  252. /package/dist/{chunk-TVPY6KPQ.js.map → chunk-5JLTIH7G.js.map} +0 -0
  253. /package/dist/{chunk-XEUZL7O2.js.map → chunk-65HLULDL.js.map} +0 -0
  254. /package/dist/{chunk-VUY7ZZAD.js.map → chunk-A3K4Q2U6.js.map} +0 -0
  255. /package/dist/{chunk-5VPMZXGU.js.map → chunk-BAWJZ6MA.js.map} +0 -0
  256. /package/dist/{chunk-ALRODBM2.js.map → chunk-BEWGN2JK.js.map} +0 -0
  257. /package/dist/{chunk-3SAV2OEE.js.map → chunk-BHYFPY64.js.map} +0 -0
  258. /package/dist/{chunk-77EBKLW6.js.map → chunk-C74N2AWG.js.map} +0 -0
  259. /package/dist/{chunk-RNULWNWR.js.map → chunk-CULOWG5X.js.map} +0 -0
  260. /package/dist/{chunk-F53TRJ4K.js.map → chunk-FKLQBAJ5.js.map} +0 -0
  261. /package/dist/{chunk-DS5MV4BA.js.map → chunk-GBZXVNGQ.js.map} +0 -0
  262. /package/dist/{chunk-UVA4PFNM.js.map → chunk-HAV7FPRM.js.map} +0 -0
  263. /package/dist/{chunk-Z47XN6ZT.js.map → chunk-IOZFJ65G.js.map} +0 -0
  264. /package/dist/{chunk-7YY7DH4I.js.map → chunk-KCXAXVC5.js.map} +0 -0
  265. /package/dist/{chunk-WUZ5OZ42.js.map → chunk-KY2JSZI3.js.map} +0 -0
  266. /package/dist/{chunk-T4KJKYPC.js.map → chunk-LJUHIEEZ.js.map} +0 -0
  267. /package/dist/{chunk-ASSO5FYG.js.map → chunk-MNSIBSAM.js.map} +0 -0
  268. /package/dist/{chunk-L23UIJDU.js.map → chunk-O37C4LZF.js.map} +0 -0
  269. /package/dist/{chunk-COKMRJQ7.js.map → chunk-OUI554QS.js.map} +0 -0
  270. /package/dist/{chunk-PTHW7GI4.js.map → chunk-QJ5MCAIN.js.map} +0 -0
  271. /package/dist/{chunk-GT6DVQEB.js.map → chunk-QYWA5XM4.js.map} +0 -0
  272. /package/dist/{chunk-NVZHJOA3.js.map → chunk-RNM46ZUE.js.map} +0 -0
  273. /package/dist/{chunk-BP4PHE44.js.map → chunk-RTKKWC4M.js.map} +0 -0
  274. /package/dist/{chunk-NCWPOV3B.js.map → chunk-RVIGZOGF.js.map} +0 -0
  275. /package/dist/{chunk-MUILMUKC.js.map → chunk-S2FD3J22.js.map} +0 -0
  276. /package/dist/{chunk-OL7SFTJV.js.map → chunk-UTWP5CJZ.js.map} +0 -0
  277. /package/dist/{chunk-LD2UDBK4.js.map → chunk-ZP2BE7U6.js.map} +0 -0
package/dist/internals.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a as L,b as M,c as N,d as O,e as P,f as Q,g as R,h as S}from"./chunk-BVDT43OO.js";import{a as F,b as G,c as H,d as I,e as J,f as K}from"./chunk-MXLQEDRJ.js";import{a as i,b as l,c as m,d as n,e as o,g as p,h as q,i as r,j as s,k as t,l as u,m as v,n as w,o as x,p as y,q as z,r as A,s as B,t as C,u as D,v as E}from"./chunk-ZIN2OWTH.js";import{a as d,b as e,c as f,d as g,e as h}from"./chunk-UOOUV52J.js";import{a as c}from"./chunk-72OH7PSF.js";import{a as j,b as k}from"./chunk-LJGCFFAT.js";import{a as b}from"./chunk-PMTKQME6.js";import{a}from"./chunk-L3Z2G32A.js";import"./chunk-P37U34EQ.js";export{C as Alert,E as AlertDescription,D as AlertTitle,u as Badge,k as Button,F as Card,J as CardContent,I as CardDescription,K as CardFooter,G as CardHeader,H as CardTitle,i as Checkbox,L as Collapsible,N as CollapsibleContent,M 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,l as FileUploader,c as Input,b as Label,m as RadioGroup,n as RadioGroupItem,S as ScrollArea,o as Select,r as SelectContent,s as SelectItem,q as SelectTrigger,p as SelectValue,O as Tabs,R as TabsContent,P as TabsList,Q as TabsTrigger,t as badgeVariants,j as buttonVariants,a as cn};
1
+ import{a as L,b as M,c as N,d as O,e as P,f as Q,g as R,h as S}from"./chunk-BVDT43OO.js";import{a as F,b as G,c as H,d as I,e as J,f as K}from"./chunk-MXLQEDRJ.js";import{a as k,b as l,c as m,d as n,e as o,g as p,h as q,i as r,j as s,k as t,l as u,m as v,n as w,o as x,p as y,q as z,r as A,s as B,t as C,u as D,v as E}from"./chunk-ZIN2OWTH.js";import{a as f,b as g,c as h,d as i,e as j}from"./chunk-UOOUV52J.js";import{a as c}from"./chunk-72OH7PSF.js";import{a as d,b as e}from"./chunk-LJGCFFAT.js";import{a as b}from"./chunk-PMTKQME6.js";import{a}from"./chunk-L3Z2G32A.js";import"./chunk-P37U34EQ.js";export{C as Alert,E as AlertDescription,D as AlertTitle,u as Badge,e as Button,F as Card,J as CardContent,I as CardDescription,K as CardFooter,G as CardHeader,H as CardTitle,k as Checkbox,L as Collapsible,N as CollapsibleContent,M as CollapsibleTrigger,v as Dialog,x as DialogContent,B as DialogDescription,z as DialogFooter,y as DialogHeader,A as DialogTitle,w as DialogTrigger,f as Drawer,h as DrawerContent,i as DrawerHeader,j as DrawerTitle,g as DrawerTrigger,l as FileUploader,c as Input,b as Label,m as RadioGroup,n as RadioGroupItem,S as ScrollArea,o as Select,r as SelectContent,s as SelectItem,q as SelectTrigger,p as SelectValue,O as Tabs,R as TabsContent,P as TabsList,Q as TabsTrigger,t as badgeVariants,d as buttonVariants,a as cn};
2
2
  //# sourceMappingURL=internals.js.map
@@ -1,4 +1,4 @@
1
- import './remoteFlows-MePlSSWv.js';
1
+ import './remoteFlows-CLgJcdkS.js';
2
2
 
3
3
  interface SuccessResponse<D> {
4
4
  data: D;
@@ -1,6 +1,6 @@
1
- import React__default, { PropsWithChildren, ReactNode } from 'react';
1
+ import { PropsWithChildren, ReactNode } from 'react';
2
2
  import { AnySchema } from 'yup';
3
- import { X as HelpCenterArticle } from './types.gen-UyEyxhzQ.js';
3
+ import { Y as HelpCenterArticle } from './types.gen-D2nbxMA0.js';
4
4
  import { S as SupportedTypes } from './types-Zg1n_9wh.js';
5
5
  import { ControllerRenderProps, FieldValues, ControllerFieldState } from 'react-hook-form';
6
6
 
@@ -36,10 +36,10 @@ declare const ENVIRONMENTS: {
36
36
 
37
37
  type ColumnDef<T = $TSFixMe> = {
38
38
  id: keyof T;
39
- label: React__default.ReactNode;
39
+ label: React.ReactNode;
40
40
  className?: string;
41
41
  cellClassName?: string;
42
- render?: (value: $TSFixMe, row: T, index: number) => React__default.ReactNode;
42
+ render?: (value: $TSFixMe, row: T, index: number) => React.ReactNode;
43
43
  };
44
44
 
45
45
  type FieldFileDataProps = FieldDataProps & {
@@ -48,6 +48,15 @@ type FieldFileDataProps = FieldDataProps & {
48
48
  maxFileSize?: number;
49
49
  };
50
50
 
51
+ type DailySchedule = {
52
+ day: string;
53
+ start_time: string;
54
+ end_time: string;
55
+ hours: number;
56
+ break_duration_minutes: string;
57
+ checked: boolean;
58
+ };
59
+
51
60
  /**
52
61
  * Props for custom field components.
53
62
  * All custom field components receive these three props from React Hook Form's Controller.
@@ -78,6 +87,12 @@ type FieldComponentProps = {
78
87
  */
79
88
  type FieldDataProps = Partial<JSFField> & {
80
89
  metadata?: Record<string, unknown>;
90
+ meta?: {
91
+ helpCenter?: {
92
+ callToAction: string;
93
+ id: number;
94
+ };
95
+ };
81
96
  };
82
97
  type FileComponentProps = FieldComponentProps & {
83
98
  fieldData: FieldFileDataProps;
@@ -87,23 +102,11 @@ type FieldCountryDataProps = Omit<FieldDataProps, 'meta'> & {
87
102
  regions: Record<string, string[]>;
88
103
  subregions: Record<string, string[]>;
89
104
  };
90
- meta?: {
91
- helpCenter?: {
92
- callToAction: string;
93
- id: number;
94
- };
95
- };
96
105
  };
97
106
  type CountryComponentProps = FieldComponentProps & {
98
107
  fieldData: FieldCountryDataProps;
99
108
  };
100
109
  type DatePickerDataProps = Omit<FieldDataProps, 'meta'> & {
101
- meta?: {
102
- helpCenter?: {
103
- callToAction: string;
104
- id: number;
105
- };
106
- };
107
110
  minDate?: string;
108
111
  maxDate?: string;
109
112
  };
@@ -116,6 +119,18 @@ type TextFieldDataProps = FieldDataProps & {
116
119
  type TextFieldComponentProps = FieldComponentProps & {
117
120
  fieldData: TextFieldDataProps;
118
121
  };
122
+ type WorkScheduleDataProps = FieldDataProps & {
123
+ onSubmit: (data: DailySchedule[]) => void;
124
+ currentSchedule: DailySchedule[];
125
+ defaultFormattedValue: {
126
+ workHoursSummary: string[];
127
+ breakSummary: string[];
128
+ totalWorkHours: number;
129
+ };
130
+ };
131
+ type WorkScheduleComponentProps = FieldComponentProps & {
132
+ fieldData: WorkScheduleDataProps;
133
+ };
119
134
  /**
120
135
  * Props for custom statement components.
121
136
  */
@@ -164,6 +179,7 @@ type JSFField = {
164
179
  meta?: Record<string, unknown>;
165
180
  };
166
181
  type TableComponentProps<T = $TSFixMe> = {
182
+ ref: React.ForwardedRef<HTMLTableElement>;
167
183
  data: T[] | undefined;
168
184
  columns: ColumnDef<T>[];
169
185
  className?: string;
@@ -199,6 +215,7 @@ type DrawerComponentProps = {
199
215
  trigger: React.ReactElement;
200
216
  children?: React.ReactNode;
201
217
  direction?: 'left' | 'right';
218
+ className?: string;
202
219
  };
203
220
  type FieldSetToggleComponentProps = {
204
221
  isExpanded: boolean;
@@ -209,7 +226,7 @@ type FieldSetToggleComponentProps = {
209
226
  className?: string;
210
227
  children?: React.ReactNode;
211
228
  };
212
- type TypesWithoutFile = Exclude<SupportedTypes, 'file' | 'countries' | 'text'>;
229
+ type TypesWithoutFile = Exclude<SupportedTypes, 'file' | 'countries' | 'text' | 'work-schedule'>;
213
230
  type Components = {
214
231
  [K in TypesWithoutFile]?: React.ComponentType<FieldComponentProps>;
215
232
  } & {
@@ -222,6 +239,7 @@ type Components = {
222
239
  zendeskDrawer?: React.ComponentType<ZendeskDrawerComponentProps>;
223
240
  drawer?: React.ComponentType<DrawerComponentProps>;
224
241
  table?: React.ComponentType<TableComponentProps>;
242
+ 'work-schedule'?: React.ComponentType<WorkScheduleComponentProps>;
225
243
  };
226
244
  type RemoteFlowsSDKProps = Omit<ThemeProviderProps, 'children'> & {
227
245
  /**
@@ -284,4 +302,4 @@ type MetaValues = {
284
302
  };
285
303
  type Meta = Record<string, MetaValues>;
286
304
 
287
- export type { $TSFixMe as $, ButtonComponentProps as B, Components as C, DrawerComponentProps as D, FieldSetToggleComponentProps as F, JSFFieldset as J, Meta as M, RemoteFlowsSDKProps as R, StatementComponentProps as S, TextFieldComponentProps as T, ZendeskDrawerComponentProps as Z, JSFField as a, FieldComponentProps as b, FileComponentProps as c, CountryComponentProps as d, DatePickerComponentProps as e };
305
+ export type { $TSFixMe as $, ButtonComponentProps as B, Components as C, DrawerComponentProps as D, FieldSetToggleComponentProps as F, JSFFieldset as J, Meta as M, RemoteFlowsSDKProps as R, StatementComponentProps as S, TextFieldComponentProps as T, WorkScheduleComponentProps as W, ZendeskDrawerComponentProps as Z, JSFField as a, FieldComponentProps as b, FileComponentProps as c, CountryComponentProps as d, DatePickerComponentProps as e };
@@ -1,6 +1,6 @@
1
- import { O as OffboardingResponse, Y as PayrollCalendarEor, E as Employment, D as TerminationDetailsParams, N as NotFoundResponse, U as UnprocessableEntityResponse, T as TooManyRequestsResponse, B as BadRequestResponse, a as UnauthorizedResponse, R as RequestError } from './types.gen-UyEyxhzQ.js';
1
+ import { O as OffboardingResponse, X as PayrollCalendarEor, E as Employment, D as TerminationDetailsParams, N as NotFoundResponse, U as UnprocessableEntityResponse, T as TooManyRequestsResponse, B as BadRequestResponse, a as UnauthorizedResponse, R as RequestError } from './types.gen-D2nbxMA0.js';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
- import { E as ErrorResponse, S as SuccessResponse } from './mutations-9qiDR92y.js';
3
+ import { E as ErrorResponse, S as SuccessResponse } from './mutations-CPqUOEmz.js';
4
4
  import * as React$1 from 'react';
5
5
  import * as _remoteoss_json_schema_form_old from '@remoteoss/json-schema-form-old';
6
6
  import { $TSFixMe } from '@remoteoss/json-schema-form-old';
@@ -1,10 +1,10 @@
1
- import { r as EmploymentCreationResponse, v as EmploymentResponse, S as SuccessResponse, N as NotFoundResponse, U as UnprocessableEntityResponse, T as TooManyRequestsResponse, B as BadRequestResponse, a as UnauthorizedResponse, t as ConflictResponse, F as ForbiddenResponse, E as Employment$1, u as EmploymentCreateParams } from './types.gen-UyEyxhzQ.js';
1
+ import { r as EmploymentCreationResponse, v as EmploymentResponse, S as SuccessResponse, N as NotFoundResponse, U as UnprocessableEntityResponse, T as TooManyRequestsResponse, B as BadRequestResponse, a as UnauthorizedResponse, t as ConflictResponse, F as ForbiddenResponse, E as Employment$1, u as EmploymentCreateParams } from './types.gen-D2nbxMA0.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-9qiDR92y.js';
5
+ import { N as NormalizedFieldError, S as SuccessResponse$1, E as ErrorResponse } from './mutations-CPqUOEmz.js';
6
6
  import { OnboardingSubmit } from './flows/Onboarding/components/OnboardingSubmit.js';
7
- import { C as Components, M as Meta, J as JSFFieldset } from './remoteFlows-MePlSSWv.js';
7
+ import { C as Components, M as Meta, J as JSFFieldset } from './remoteFlows-CLgJcdkS.js';
8
8
  import * as _tanstack_query_core from '@tanstack/query-core';
9
9
  import * as React$1 from 'react';
10
10
  import { ValidationResult } from '@remoteoss/remote-json-schema-form-kit';
@@ -78,7 +78,6 @@ declare const STEPS_WITHOUT_SELECT_COUNTRY: Record<Exclude<StepKeys, 'select_cou
78
78
  declare const reviewStepAllowedEmploymentStatus: Employment['status'][];
79
79
  declare const disabledInviteButtonEmploymentStatus: Employment['status'][];
80
80
  declare const DEFAULT_VERSION = 1;
81
- declare const BASIC_INFORMATION_SCHEMA_VERSION = 1;
82
81
  /**
83
82
  * Resolves the effective contract details schema version for a country
84
83
  * Priority: country-specific > global > default by country
@@ -426,4 +425,4 @@ type Employment = Employment$1 & {
426
425
  };
427
426
  type CreditRiskState = 'deposit_required' | 'deposit_required_successful' | 'invite' | 'invite_successful' | 'referred' | null;
428
427
 
429
- export { type BasicInformationFormPayload as B, type ContractDetailsFormPayload as C, DEFAULT_VERSION as D, type Employment as E, type OnboardingFlowProps as O, ReviewStep as R, STEPS as S, type SelectCountryFormPayload as a, type SelectCountrySuccess as b, type BenefitsFormPayload as c, type CreditRiskStatus as d, type CreditRiskState as e, type OnboardingRenderProps as f, SelectCountryStep as g, BasicInformationStep as h, ContractDetailsStep as i, BenefitsStep as j, STEPS_WITHOUT_SELECT_COUNTRY as k, disabledInviteButtonEmploymentStatus as l, BASIC_INFORMATION_SCHEMA_VERSION as m, getContractDetailsSchemaVersion as n, reviewStepAllowedEmploymentStatus as r, useOnboarding as u };
428
+ export { type BasicInformationFormPayload as B, type ContractDetailsFormPayload as C, DEFAULT_VERSION as D, type Employment as E, type OnboardingFlowProps as O, ReviewStep as R, STEPS as S, type SelectCountryFormPayload as a, type SelectCountrySuccess as b, type BenefitsFormPayload as c, type CreditRiskStatus as d, type CreditRiskState as e, type OnboardingRenderProps as f, SelectCountryStep as g, BasicInformationStep as h, ContractDetailsStep as i, BenefitsStep as j, STEPS_WITHOUT_SELECT_COUNTRY as k, disabledInviteButtonEmploymentStatus as l, getContractDetailsSchemaVersion as m, reviewStepAllowedEmploymentStatus as r, useOnboarding as u };
@@ -1,4 +1,4 @@
1
- import { E as Employment, L as ListTimeoffResponse, G as TimeoffStatus, H as TimeoffType, I as ListLeavePoliciesSummaryResponse, J as MagicLinkResponse, U as UnprocessableEntityResponse, K as MagicLinkParams } from './types.gen-UyEyxhzQ.js';
1
+ import { E as Employment, L as ListTimeoffResponse, G as TimeoffStatus, H as TimeoffType, I as ListLeavePoliciesSummaryResponse, J as MagicLinkResponse, U as UnprocessableEntityResponse, K as MagicLinkParams } from './types.gen-D2nbxMA0.js';
2
2
  import * as _tanstack_query_core from '@tanstack/query-core';
3
3
  import * as _tanstack_react_query from '@tanstack/react-query';
4
4
  import { UseQueryResult } from '@tanstack/react-query';
@@ -140,4 +140,4 @@ type PaidTimeOffContainerProps = {
140
140
  render: (props: PaidTimeOffRenderProps) => React.ReactNode;
141
141
  };
142
142
 
143
- export { type PaidTimeOffRenderProps as P, type PaidTimeOffContainerProps as a, useTimeOffQuery as b, type PaidTimeoffBreakdownResponse as c, usePaidTimeoffBreakdownQuery as d, useTimeOffLeavePoliciesSummaryQuery as e, useMagicLink as f, useEmploymentQuery as u };
143
+ export { type PaidTimeOffRenderProps as P, type PaidTimeOffContainerProps as a, useTimeOffQuery as b, usePaidTimeoffBreakdownQuery as c, useTimeOffLeavePoliciesSummaryQuery as d, useMagicLink as e, useEmploymentQuery as u };
@@ -1,18 +1,18 @@
1
- import { E as Employment, e as File, g as CreateContractDocumentResponse, d as SignContractDocument, S as SuccessResponse } from './types.gen-UyEyxhzQ.js';
1
+ import { E as Employment, i as File, l as CreateContractDocumentResponse, h as SignContractDocument, S as SuccessResponse } from './types.gen-D2nbxMA0.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-9qiDR92y.js';
5
+ import { N as NormalizedFieldError } from './mutations-CPqUOEmz.js';
6
6
  import * as _tanstack_query_core from '@tanstack/query-core';
7
7
  import * as React$1 from 'react';
8
8
  import { ValidationResult } from '@remoteoss/remote-json-schema-form-kit';
9
9
  import { STEPS } from './flows/ContractorOnboarding/utils.js';
10
10
  import { Step } from './flows/useStepState.js';
11
- import { M as Meta, J as JSFFieldset, $ as $TSFixMe } from './remoteFlows-MePlSSWv.js';
11
+ import { M as Meta, J as JSFFieldset, $ as $TSFixMe } from './remoteFlows-CLgJcdkS.js';
12
12
  import { Fields } from '@remoteoss/json-schema-form-old';
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-BFDVSvVP.js';
15
+ import { g as SelectCountryStep } from './types-B_ZvICFS.js';
16
16
  import { FlowOptions, JSFModifyNext } from './flows/types.js';
17
17
  import { OnboardingInvite } from './flows/Onboarding/components/OnboardingInvite.js';
18
18
 
@@ -1688,4 +1688,4 @@ type PostAutomatableContractAmendmentErrors = {
1688
1688
  };
1689
1689
  type PostAutomatableContractAmendmentError = PostAutomatableContractAmendmentErrors[keyof PostAutomatableContractAmendmentErrors];
1690
1690
 
1691
- export type { CreateContractEligibilityParams as A, BadRequestResponse as B, ContractAmendmentAutomatableResponse as C, TerminationDetailsParams as D, Employment as E, ForbiddenResponse as F, TimeoffStatus as G, TimeoffType as H, ListLeavePoliciesSummaryResponse as I, MagicLinkResponse as J, MagicLinkParams as K, ListTimeoffResponse as L, ManageContractorPlusSubscriptionOperationsParams as M, NotFoundResponse as N, OffboardingResponse as O, PostCreateContractAmendmentError as P, CreateOffboardingParams as Q, RequestError as R, SuccessResponse as S, TooManyRequestsResponse as T, UnprocessableEntityResponse as U, ValidationError as V, Currency as W, HelpCenterArticle as X, PayrollCalendarEor as Y, UnauthorizedResponse as a, ContractAmendmentResponse as b, PostAutomatableContractAmendmentError as c, SignContractDocument as d, File as e, ContractorSubscriptionsSummary as f, CreateContractDocumentResponse as g, CreateContractDocument as h, CostCalculatorEstimateResponse as i, CostCalculatorEstimatePdfResponse as j, CostCalculatorEstimateParams as k, CostCalculatorEstimateCsvResponse as l, MinimalRegion as m, MinimalCountry as n, EmploymentTermType as o, CostCalculatorEmployment as p, PostCreateEstimationError as q, EmploymentCreationResponse as r, Company as s, ConflictResponse as t, EmploymentCreateParams as u, EmploymentResponse as v, EmploymentFullParams as w, UnifiedEmploymentUpsertBenefitOffersRequest as x, ConvertCurrencyResponse as y, ConvertCurrencyParams as z };
1691
+ export type { CreateContractEligibilityParams as A, BadRequestResponse as B, ContractAmendmentAutomatableResponse as C, TerminationDetailsParams as D, Employment as E, ForbiddenResponse as F, TimeoffStatus as G, TimeoffType as H, ListLeavePoliciesSummaryResponse as I, MagicLinkResponse as J, MagicLinkParams as K, ListTimeoffResponse as L, MinimalRegion as M, NotFoundResponse as N, OffboardingResponse as O, PostCreateContractAmendmentError as P, CreateOffboardingParams as Q, RequestError as R, SuccessResponse as S, TooManyRequestsResponse as T, UnprocessableEntityResponse as U, ValidationError as V, Currency as W, PayrollCalendarEor as X, HelpCenterArticle as Y, UnauthorizedResponse as a, ContractAmendmentResponse as b, PostAutomatableContractAmendmentError as c, CostCalculatorEstimateResponse as d, CostCalculatorEstimatePdfResponse as e, CostCalculatorEstimateParams as f, CostCalculatorEstimateCsvResponse as g, SignContractDocument as h, File as i, ContractorSubscriptionsSummary as j, ManageContractorPlusSubscriptionOperationsParams as k, CreateContractDocumentResponse as l, CreateContractDocument as m, MinimalCountry as n, EmploymentTermType as o, CostCalculatorEmployment as p, PostCreateEstimationError as q, EmploymentCreationResponse as r, Company as s, ConflictResponse as t, EmploymentCreateParams as u, EmploymentResponse as v, EmploymentFullParams as w, UnifiedEmploymentUpsertBenefitOffersRequest as x, ConvertCurrencyResponse as y, ConvertCurrencyParams as z };
package/package.json CHANGED
@@ -1,6 +1,10 @@
1
1
  {
2
2
  "name": "@remoteoss/remote-flows",
3
- "version": "1.2.0",
3
+ "version": "1.2.2",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "https://github.com/remoteoss/remote-flows.git"
7
+ },
4
8
  "scripts": {
5
9
  "build": "NODE_ENV=production tsup",
6
10
  "ci": "npm run build && npm run check-format && npm run check-exports && npm run lint && npm run type-check && npm run test",
@@ -21,7 +25,7 @@
21
25
  "type-check": "tsc --noEmit"
22
26
  },
23
27
  "engines": {
24
- "node": ">=16"
28
+ "node": ">=24"
25
29
  },
26
30
  "type": "module",
27
31
  "main": "dist/index.js",
@@ -1,2 +0,0 @@
1
- import{b as Q}from"./chunk-7FMR3EIX.js";import{a as H}from"./chunk-KGKDSOER.js";import{a as ye,b as Ve,c as ze,d as Ge,e as Ue,f as Je,g as qe,h as Ze,i as Ke,j as Ye,l as Xe,m as ve,n as Qe,o as xe,p as Se,r as be,t as je,u as eo,v as oo}from"./chunk-ZIN2OWTH.js";import{b as x}from"./chunk-KQPDXXG3.js";import{a as Ce,b as B}from"./chunk-LJGCFFAT.js";import{a as re,b as ne,c as v,d as Le,e as He,f as Be,g as Oe,h as b,i as P,j as k,k as N,l as D,m as w}from"./chunk-66N57DKF.js";import{g as Ae}from"./chunk-2SO4LW7V.js";import{a as y,e as ae}from"./chunk-L3Z2G32A.js";import{a as t}from"./chunk-P37U34EQ.js";import{Fragment as Gt,useEffect as Ut,useRef as tt}from"react";import{Fragment as it,jsx as A,jsxs as ie}from"react/jsx-runtime";function le({name:e,defaultValue:o,description:r,label:n,onChange:s,multiple:i,options:m,component:a,...d}){let{components:u}=x(),{control:l}=v(),f=t((p,h,g)=>{if(i&&g){let c=p.value?[...p.value]:[];h?c.includes(g)||p.onChange([...c,g]):p.onChange(c.filter(_=>_!==g))}else p.onChange(h)},"handleCheckboxChange");return A(b,{control:l,name:e,defaultValue:o,render:({field:p,fieldState:h})=>{let g=a||u?.checkbox;if(g){let c={name:e,description:r,label:n,defaultValue:o,multiple:i,options:m,...d};return A(g,{field:{...p,onChange:t((_,S)=>{f(p,_.target.checked,S),s?.(_.target.checked===!0,S)},"onChange")},fieldState:h,fieldData:c})}return ie(P,{"data-field":e,className:y(`RemoteFlows__CheckBoxField__Item__${e}`),children:[A(N,{children:ie(it,{children:[m&&i?A(k,{children:n}):null,m&&i?m.map(c=>ie("div",{className:"flex space-x-2",children:[A(ye,{id:c.value,onCheckedChange:_=>{f(p,_===!0,c.value),s?.(_===!0,c.value)},checked:p.value?.includes(c.value),className:"RemoteFlows__CheckBox__Input"}),A(k,{htmlFor:c.value,className:"mb-0 RemoteFlows__CheckBox__Label",children:c.label})]},c.value)):ie("div",{className:"flex space-x-2",children:[A(ye,{id:e,onCheckedChange:c=>{f(p,c===!0,e),s?.(c===!0,e)},checked:p.value,className:"RemoteFlows__CheckBox__Input"}),A(k,{htmlFor:e,className:"mb-0 RemoteFlows__CheckBox__Label",children:n})]})]})}),r&&A(D,{children:r}),h.error&&A(w,{})]})}})}t(le,"CheckBoxField");import{CalendarIcon as ct}from"lucide-react";import{format as no}from"date-fns";import*as O from"@radix-ui/react-popover";import{PopoverClose as to}from"@radix-ui/react-popover";import{jsx as se}from"react/jsx-runtime";function me({...e}){return se(O.Root,{"data-slot":"popover",...e})}t(me,"Popover");function de({...e}){return se(O.Trigger,{"data-slot":"popover-trigger",...e})}t(de,"PopoverTrigger");function ce({className:e,align:o="center",sideOffset:r=4,...n}){return se(O.Portal,{children:se(O.Content,{"data-slot":"popover-content",align:o,sideOffset:r,className:y("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...n})})}t(ce,"PopoverContent");import{ChevronLeft as lt,ChevronRight as st}from"lucide-react";import{DayPicker as mt}from"react-day-picker";import{jsx as ke}from"react/jsx-runtime";function ro({className:e,classNames:o,showOutsideDays:r=!0,...n}){return ke(mt,{showOutsideDays:r,className:y("p-3",e),classNames:{months:"flex flex-col sm:flex-row gap-2",month:"flex flex-col gap-4",caption:"flex justify-center pt-1 relative items-center w-full",caption_label:"text-sm font-medium",nav:"flex items-center gap-1",nav_button:y(Ce({variant:"outline"}),"size-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-x-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:y("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-range-end)]:rounded-r-md",n.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:y(Ce({variant:"ghost"}),"size-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start aria-selected:bg-primary aria-selected:text-primary-foreground",day_range_end:"day-range-end aria-selected:bg-primary aria-selected:text-primary-foreground",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...o},components:{IconLeft:t(({className:s,...i})=>ke(lt,{className:y("size-4",s),...i}),"IconLeft"),IconRight:t(({className:s,...i})=>ke(st,{className:y("size-4",s),...i}),"IconRight")},...n})}t(ro,"Calendar");import{jsx as dt}from"react/jsx-runtime";function pe({helpCenter:e}){return e?dt(Q,{zendeskId:e.id,children:e.callToAction}):null}t(pe,"HelpCenter");import{Fragment as pt,jsx as E,jsxs as ue}from"react/jsx-runtime";function ao({field:e,fieldData:o,fieldState:r}){let{name:n,label:s,description:i,minDate:m,maxDate:a}=o,d=m?new Date(m):void 0,u=a?new Date(a):void 0;return ue(P,{"data-field":n,className:`flex flex-col RemoteFlows__DatePickerField__Item__${n}`,children:[E(k,{className:"RemoteFlows__DatePickerField__Label",children:s}),ue(me,{children:[E(de,{asChild:!0,children:E(N,{children:E("div",{children:ue(B,{type:"button",variant:"outline",className:y("w-full pl-3 text-left font-normal",!e.value&&"text-muted-foreground"),"data-testid":`date-picker-button-${n}`,children:[e.value&&E(pt,{children:no(e.value,"yyyy-MM-dd")}),E(ct,{className:"ml-auto h-4 w-4 opacity-50"})]})})})}),E(ce,{className:"w-auto p-0 RemoteFlows__DatepickerField__PopoverContent",align:"start",children:E(ro,{mode:"single",className:"RemoteFlows__DatepickerField__Calendar",selected:e.value?new Date(e.value):void 0,onSelect:l=>{e.onChange(l?no(l,"yyyy-MM-dd"):null)},defaultMonth:d,components:{DayContent:t(l=>E(to,{children:l.date.getDate()}),"DayContent")},disabled:l=>!!(d&&l<d||u&&l>u)})})]}),i?ue(D,{children:[i," ",E(pe,{helpCenter:o.meta?.helpCenter})]}):null,r.error&&E(w,{className:"RemoteFlows__DatePickerField__Error"})]})}t(ao,"DatePickerFieldDefault");import{jsx as io}from"react/jsx-runtime";function lo({description:e,label:o,name:r,minDate:n,maxDate:s,onChange:i,component:m,...a}){let{components:d}=x(),{control:u}=v(),l;a.meta?.mot&&typeof a.meta.mot=="number"?l=Ae(a.meta.mot):n&&(l=new Date(`${n}T00:00:00`));let f;return s&&(f=new Date(`${s}T23:59:59`)),io(b,{control:u,name:r,render:({field:p,fieldState:h})=>{let c=m||d?.date||ao,_={description:e,label:o,name:r,onChange:i,...l&&{minDate:l.toISOString()},...f&&{maxDate:f.toISOString()},...a};return io(c,{field:{...p,onChange:t(S=>{p.onChange(S),i?.(S)},"onChange")},fieldState:h,fieldData:_})}})}t(lo,"DatePickerField");import{jsx as G,jsxs as ut}from"react/jsx-runtime";function so({field:e,fieldState:o,fieldData:r}){let{name:n,label:s,description:i,multiple:m,accept:a}=r;return ut(P,{"data-field":n,className:`RemoteFlows__FileUpload__Item__${n}`,children:[G(k,{className:"RemoteFlows__FileUpload__Label",children:s}),G(N,{children:G(Ve,{onChange:e.onChange,multiple:m,className:y("RemoteFlows__FileUpload__Input"),accept:a,files:e.value})}),i&&G("div",{className:"flex items-center justify-between",children:G(D,{className:"RemoteFlows__FileUpload__Description",children:i})}),o.error&&G(w,{className:"RemoteFlows__FileUpload__Error"})]})}t(so,"FileUploadFieldDefault");import{jsx as mo}from"react/jsx-runtime";var ft=t((e,o)=>{if(!o)return null;for(let r of e)if(r.size>o){let n=Math.round(o/1048576),s=Math.round(r.size/(1024*1024));return`File "${r.name}" exceeds maximum size of ${n}MB (file is ${s}MB)`}return null},"validateFileSize");function co({name:e,description:o,label:r,multiple:n,onChange:s,component:i,accept:m,maxSize:a,...d}){let{components:u}=x(),{control:l,setError:f,clearErrors:p}=v(),h=t(async(g,c)=>{let _=ft(g,a);if(_){f(e,{message:_});return}p(e),c.onChange(g),s?.(g)},"handleOnChange");return mo(b,{control:l,name:e,render:({field:g,fieldState:c})=>{let S=i||u?.file||so,R={name:e,description:o,label:r,multiple:n,accept:m,maxFileSize:a,...d};return mo(S,{field:{...g,value:g.value,onChange:t(async z=>h(z,g),"onChange")},fieldState:c,fieldData:R})}})}t(co,"FileUploadField");import{jsx as Ft}from"react/jsx-runtime";function po({field:e,fieldData:o}){return Ft(H,{type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",...e,...o})}t(po,"NumberFieldDefault");import{jsx as uo}from"react/jsx-runtime";function fe(e){let{components:o}=x(),{control:r}=v(),s=e.component||o?.number||po;return uo(b,{control:r,name:e.name,render:({field:i,fieldState:m})=>uo(s,{field:{...i,onChange:t(a=>{i.onChange(a),e.onChange?.(a)},"onChange")},fieldState:m,fieldData:e})})}t(fe,"NumberField");import{Fragment as gt}from"react";import{jsx as W,jsxs as Pe}from"react/jsx-runtime";var fo=t(({field:e,fieldData:o,fieldState:r})=>{let{name:n,label:s,description:i,options:m}=o;return W("fieldset",{className:y("space-y-3",`RemoteFlows__RadioGroupField__Item__${n}`),"data-field":n,children:Pe(P,{className:y("space-y-3",`RemoteFlows__RadioGroupField__Item__${n}`),"data-field":n,children:[W("legend",{children:s}),W(N,{children:W(ze,{"aria-label":s||n,onValueChange:a=>{e.onChange(a)},value:e.value,className:"flex flex-col space-y-3",children:m?.map(a=>W(gt,{children:Pe(P,{"data-field":n,className:"flex items-start space-x-3 space-y-0 gap-0 RemoteFlows__RadioField__Item",children:[W(N,{children:W(Ge,{value:a.value,className:"RemoteFlows__RadioField__Input",disabled:a.disabled})}),Pe("div",{children:[W(k,{className:"font-normal mb-0 RemoteFlows__RadioField__Label",children:a.label}),a.description&&W(D,{className:"mt-2",children:a.description})]})]})},a.value))})}),i&&W(D,{children:i}),r.error&&W(w,{})]})})},"RadioGroupFieldDefault");import{jsx as Fo}from"react/jsx-runtime";function go({name:e,defaultValue:o,description:r,label:n,options:s,onChange:i,component:m,...a}){let{components:d}=x(),{control:u}=v();return Fo(b,{control:u,name:e,defaultValue:o,render:({field:l,fieldState:f})=>{let h=m||d?.radio||fo,g={name:e,defaultValue:o,description:r,label:n,options:s,...a};return Fo(h,{field:{...l,onChange:t(c=>{l.onChange(c),i?.(c)},"onChange")},fieldState:f,fieldData:g})}})}t(go,"RadioGroupField");import{jsx as L,jsxs as ho}from"react/jsx-runtime";function _o({field:e,fieldState:o,fieldData:r}){let{name:n,label:s,description:i,options:m}=r;return ho(P,{"data-field":n,className:`RemoteFlows__SelectField__Item__${n}`,children:[L(k,{className:"RemoteFlows__SelectField__Label",children:s}),L(N,{children:L("div",{className:"relative",children:ho(Ue,{value:e.value||"",onValueChange:a=>{e.onChange(a)},children:[L(Ze,{className:"RemoteFlows__SelectField__Trigger","aria-invalid":!!o.error,"aria-label":s,children:L("span",{className:"absolute",children:L(qe,{placeholder:s})})}),L(Ke,{className:"RemoteFlows__SelectField__Content",children:L(Je,{className:"RemoteFlows__SelectField__Group",children:m?.map(a=>L(Ye,{value:a.value,className:"RemoteFlows__SelectField__SelectItem",disabled:a.disabled,children:a.label},a.value))})})]})})}),i&&L(D,{children:i}),o.error&&L(w,{})]})}t(_o,"SelectFieldDefault");import{jsx as yo}from"react/jsx-runtime";function Co({label:e,name:o,options:r,defaultValue:n,description:s,onChange:i,component:m,...a}){let{control:d}=v(),{components:u}=x();return yo(b,{defaultValue:n,control:d,name:o,render:({field:l,fieldState:f})=>{let h=m||u?.select||_o,g={label:e,name:o,options:r,defaultValue:n,description:s,onChange:i,...a};return yo(h,{field:{...l,onChange:t(c=>{let _=a.jsonType==="number"?Number(c):c;l.onChange(_),i?.(_)},"onChange")},fieldState:f,fieldData:g})}})}t(Co,"SelectField");import{useEffect as xt,useState as St}from"react";import{Fragment as ht,useState as _t}from"react";import{Check as yt,ChevronDownIcon as Ct,X as vt}from"lucide-react";import{Command as U}from"cmdk";import{SearchIcon as On}from"lucide-react";import{jsx as J,jsxs as Un}from"react/jsx-runtime";function vo({className:e,...o}){return J(U,{"data-slot":"command",className:y("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...o})}t(vo,"Command");function xo({className:e,...o}){return J(U.List,{"data-slot":"command-list",className:y("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...o})}t(xo,"CommandList");function So({...e}){return J(U.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}t(So,"CommandEmpty");function bo({className:e,...o}){return J(U.Group,{"data-slot":"command-group",className:y("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...o})}t(bo,"CommandGroup");function ko({className:e,...o}){return J(U.Separator,{"data-slot":"command-separator",className:y("bg-border -mx-1 h-px",e),...o})}t(ko,"CommandSeparator");function Po({className:e,...o}){return J(U.Item,{"data-slot":"command-item",className:y("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...o})}t(Po,"CommandItem");import{jsx as $,jsxs as q}from"react/jsx-runtime";function Fe({options:e,selected:o,onChange:r,placeholder:n,...s}){let[i,m]=_t(!1),a=t(l=>{r(o.filter(f=>f.value!==l.value))},"handleUnselect"),d=e.some(l=>l.category),u=e.reduce((l,f)=>{let p=f.category||"Uncategorized";return l[p]||(l[p]=[]),l[p].push(f),l},{});return q(me,{open:i,onOpenChange:m,...s,children:[$(de,{children:q(B,{variant:"outline",role:"combobox","aria-expanded":i,className:"w-full justify-between font-normal",type:"button",children:[$("div",{className:"flex gap-1 flex-wrap overflow-x-auto max-h-[2.5rem] items-center",children:o.length>0?o.map(l=>q(Xe,{variant:"secondary",className:"mr-1 mb-1",children:[l.label,$("div",{role:"button",tabIndex:0,"aria-label":`remove ${l.label}`,className:"ml-1 ring-offset-background rounded-full outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 cursor-pointer",onKeyDown:f=>{f.key==="Enter"&&a(l)},onMouseDown:f=>{f.preventDefault(),f.stopPropagation()},onClick:()=>a(l),children:$(vt,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},l.label)):$("span",{className:"text-foreground",children:n})}),$(Ct,{className:"size-4"})]})}),$(ce,{align:"start",className:"w-full p-0",children:$(vo,{children:q(xo,{children:[$(So,{children:"No item found."}),Object.entries(u).map(([l,f],p)=>q(ht,{children:[p>0&&$(ko,{}),$(bo,{heading:d?l:void 0,children:f.map(h=>{let g=o.some(c=>c.value===h.value);return q(Po,{onSelect:()=>{r(g?o.filter(c=>c.value!==h.value):[...o,h])},children:[$(yt,{className:y("mr-2 h-4 w-4",g?"opacity-100":"opacity-0")}),h.label]},h.label)})})]},l))]})})})]})}t(Fe,"MultiSelect");import{jsx as j,jsxs as No}from"react/jsx-runtime";function Do({field:e,fieldState:o,fieldData:r}){let[n,s]=St([]),i=t(a=>{let d=a.map(({value:u})=>u);e.onChange(d),s(a)},"handleChange");xt(()=>{e.value&&r.options&&s(e.value.map(a=>r?.options?.find(d=>d.value===a)))},[e.value,r.options]);let m=[...Object.entries(r.$meta?.regions||{}).map(([a,d])=>({value:d,label:a,category:"Regions"})),...Object.entries(r.$meta?.subregions||{}).map(([a,d])=>({value:d,label:a,category:"Subregions"})),...r.options?.map(a=>({...a,value:a.value,label:a.label,category:"Countries"}))||[]];return No(P,{"data-field":e.name,className:`RemoteFlows__CountryField__Item__${e.name}`,children:[j(k,{className:"RemoteFlows__CountryField__Label",children:r.label}),j(N,{children:j(Fe,{options:m,selected:n,onChange:i})}),r.description&&No(D,{children:[r.description," ",j(pe,{helpCenter:r.meta?.helpCenter})]}),o.error&&j(w,{})]})}t(Do,"CountryFieldDefault");import{jsx as wo}from"react/jsx-runtime";function Ro({label:e,name:o,options:r,defaultValue:n,description:s,onChange:i,$meta:m,component:a,...d}){let{control:u}=v(),{components:l}=x();return wo(b,{defaultValue:n,control:u,name:o,render:({field:f,fieldState:p})=>{let g=a||l?.countries||Do,c={label:e,name:o,options:r,defaultValue:n,description:s,onChange:i,$meta:m,...d};return wo(g,{field:{...f,onChange:t(_=>{f.onChange(_),i?.(_)},"onChange")},fieldState:p,fieldData:c})}})}t(Ro,"CountryField");import*as To from"react";import{jsx as bt}from"react/jsx-runtime";var Ne=To.forwardRef(({className:e,...o},r)=>bt("textarea",{className:y("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...o}));Ne.displayName="Textarea";import{jsx as ee,jsxs as De}from"react/jsx-runtime";function $o({field:e,fieldState:o,fieldData:r}){let{name:n,label:s,description:i,maxLength:m}=r,a=e.value?.length??0;return De(P,{"data-field":n,className:`RemoteFlows__TextArea__Item__${n}`,children:[ee(k,{className:"RemoteFlows__TextArea__Label",children:s}),ee(N,{children:ee(Ne,{...e,value:e.value??"",onChange:d=>{e.onChange(d)},className:y(o.error&&"border-red-500 focus-visible:ring-red-500","RemoteFlows__TextArea__Input"),placeholder:s})}),(i||m)&&De("div",{className:"flex items-center justify-between",children:[i&&ee(D,{className:"RemoteFlows__TextArea__Description",children:i}),m&&De("span",{className:"text-sm ml-auto RemoteFlows__TextArea__MaxLength",children:[a,"/",m]})]}),o.error&&ee(w,{className:"RemoteFlows__TextArea__Error"})]})}t($o,"TextAreaFieldDefault");import{jsx as Mo}from"react/jsx-runtime";function Io({name:e,description:o,label:r,onChange:n,maxLength:s,component:i,...m}){let{components:a}=x(),{control:d}=v();return Mo(b,{control:d,name:e,render:({field:u,fieldState:l})=>{let p=i||a?.textarea||$o,h={name:e,description:o,label:r,maxLength:s,...m};return Mo(p,{field:{...u,onChange:t(g=>{u.onChange(g),n?.(g)},"onChange")},fieldState:l,fieldData:h})}})}t(Io,"TextAreaField");import{jsx as kt}from"react/jsx-runtime";function Eo({field:e,fieldData:o}){return kt(H,{name:e.name,...o,type:"email"})}t(Eo,"EmailFieldDefault");import{jsx as Wo}from"react/jsx-runtime";function Lo(e){let{components:o}=x(),{control:r}=v(),s=e.component||o?.email||Eo;return Wo(b,{control:r,name:e.name,render:({field:i,fieldState:m})=>Wo(s,{field:{...i,onChange:t(a=>{i.onChange(a),e.onChange?.(a)},"onChange")},fieldState:m,fieldData:e})})}t(Lo,"EmailField");import{jsx as Ho}from"react/jsx-runtime";function Bo(e){let{control:o}=v();return Ho(b,{control:o,name:e.name,render:({field:r})=>Ho("input",{...r,type:"hidden"})})}t(Bo,"HiddenField");import $t,{useEffect as Mt,useState as Zo}from"react";var Ao=t((e,o,r)=>{if(e&&"reportValidity"in e){let n=re(r,o);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},"r"),we=t((e,o)=>{for(let r in o.fields){let n=o.fields[r];n&&n.ref&&"reportValidity"in n.ref?Ao(n.ref,r,e):n&&n.refs&&n.refs.forEach(s=>Ao(s,r,e))}},"o"),Vo=t((e,o)=>{o.shouldUseNativeValidation&&we(e,o);let r={};for(let n in e){let s=re(o.fields,n),i=Object.assign(e[n]||{},{ref:s&&s.ref});if(Pt(o.names||Object.keys(e),n)){let m=Object.assign({},re(r,n));ne(m,"root",i),ne(r,n,m)}else ne(r,n,i)}return r},"s"),Pt=t((e,o)=>{let r=Oo(o);return e.some(n=>Oo(n).match(`^${r}\\.\\d+`))},"i");function Oo(e){return e.replace(/\]|\[/g,"")}t(Oo,"n");function zo(e,o,r){return o===void 0&&(o={}),r===void 0&&(r={}),function(n,s,i){try{return Promise.resolve((function(m,a){try{var d=(o.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e[r.mode==="sync"?"validateSync":"validate"](n,Object.assign({abortEarly:!1},o,{context:s}))).then(function(u){return i.shouldUseNativeValidation&&we({},i),{values:r.raw?Object.assign({},n):u,errors:{}}}))}catch(u){return a(u)}return d&&d.then?d.then(void 0,a):d})(0,function(m){if(!m.inner)throw m;return{values:{},errors:Vo((a=m,d=!i.shouldUseNativeValidation&&i.criteriaMode==="all",(a.inner||[]).reduce(function(u,l){if(u[l.path]||(u[l.path]={message:l.message,type:l.type}),d){var f=u[l.path].types,p=f&&f[l.type];u[l.path]=Le(l.path,d,u,l.type,p?[].concat(p,l.message):l.message)}return u},{})),i)};var a,d}))}catch(m){return Promise.reject(m)}}}t(zo,"o");import*as T from"yup";import Go from"lodash.groupby";import Z from"lodash.capitalize";var Uo=60,ge=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"];function Nt(e){if(e<60)return`${e}m`;let o=Math.floor(e/Uo),r=e%Uo;return r>0?`${o}h${r}m`:`${o}h`}t(Nt,"convertBreakDurationToHours");function Jo(e){let o=e.reduce((r,n)=>n.hours+r,0);return Number(o.toFixed(2))}t(Jo,"calculateTotalWorkHours");function Dt(e,o){let r=o.map(({day:i})=>i.toLowerCase()),n=r.indexOf(e),s=null;for(;n<r.length&&!s;){let i=r[n],m=r[n+1],a=ge.indexOf(i)+1;ge[a]===m||(s=i),n+=1}return s}t(Dt,"findLastConsecutiveDay");function wt(e){return e.start_time&&e.end_time&&(typeof e.hours=="number"?e.hours:Number.parseInt(e.hours))>0}t(wt,"shouldSummarizeSchedule");function Rt(e){return Number.parseInt(e.break_duration_minutes)>0}t(Rt,"shouldSummarizeBreaks");function qo(e){let o=e.filter(wt),r=Go(o,a=>`${a.start_time}|${a.end_time}`),n=e.filter(Rt),s=Go(n,"break_duration_minutes"),i=Object.keys(r).map(a=>{let d=r[a],u=d[0].day,[l,f]=a.split("|"),p=`from <span>${l.replace(":","h")}</span> to <span>${f.replace(":","h")}</span>`,h=Dt(u,d),c=(h?d.findIndex(_=>_.day===h):-1)===d.length-1;return d.length===1?`${Z(u)}, ${p}`:!c||!h?d.reduce((_,S,R)=>{let z=Z(S.day);return R===d.length-1?`${_}and ${z}, ${p}`:`${_}<span>${z}</span>, `},""):`<span>${Z(u)}</span> to <span>${Z(h)}</span>, ${p}`}),m=Object.keys(s).reverse().map((a,d)=>{let u=d===0,l=s[a],f=Nt(parseInt(a,10));if(Object.keys(s).length===1)return`With ${f} daily breaks`;if(l.length===1){let p=`${f} break on ${Z(l[0].day)}.`;return u?`With ${p}`:p}return l.reduce((p,h,g)=>{let c=Z(h.day);return g===0?`${p} ${c}`:g===l.length-1?`${p}, and ${c}.`:`${p}, ${c}`},u?`With ${f} break on`:`${f} break on`)});return{workHoursSummary:i,breakSummary:m}}t(qo,"buildWorkScheduleSummary");function Re(e){let{checked:o,start_time:r,end_time:n,break_duration_minutes:s}=e;if(!o)return 0;let[i,m]=r.split(":").map(Number),[a,d]=n.split(":").map(Number),u=i*60+m,p=(a*60+d-u-Number.parseInt(s||"0"))/60;return p===Math.floor(p)?p:Number(p.toFixed(2))}t(Re,"calculateHours");var Tt={monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat",sunday:"Sun"};function he(e){return Tt[e]}t(he,"getShortWeekday");import{jsx as C,jsxs as M}from"react/jsx-runtime";var It=T.object({day:T.string().required(),checked:T.boolean().required(),start_time:T.string().matches(/^([01]\d|2[0-3]):([0-5]\d)$/,"Invalid time format (HH:mm)").when("checked",{is:!0,then:t(e=>e.required("Required"),"then"),otherwise:t(e=>e.optional().nullable(),"otherwise")}),end_time:T.string().matches(/^([01]\d|2[0-3]):([0-5]\d)$/,"Invalid time format (HH:mm)").when("checked",{is:!0,then:t(e=>e.required("Required"),"then"),otherwise:t(e=>e.optional().nullable(),"otherwise")}),hours:T.number().default(0),break_duration_minutes:T.string().default("0")}),Et=T.object({schedule:T.array(It)});function Wt({defaultSchedule:e,onSubmit:o}){let[r,n]=Zo(!1),s=ge.map(c=>{let _=e.find(S=>S.day.toLowerCase()===he(c).toLowerCase()||S.day.toLowerCase()===c.toLowerCase());return _?{..._,day:he(c),checked:!0}:{...e[0],checked:!1,day:he(c)}}),i=Be({defaultValues:{schedule:s},resolver:zo(Et)}),{handleSubmit:m,watch:a,reset:d,control:u,formState:l}=i,{fields:f}=He({name:"schedule",control:u}),p=a("schedule");function h(c){let _=c.schedule.filter(({checked:S})=>S).map(S=>({...S,hours:Re(S)}));o(_),n(!1)}t(h,"handleSubmitWorkingHours");function g(){d(),n(!1)}return t(g,"handleCancel"),C("div",{className:"flex items-center justify-between",children:M(ve,{open:r,onOpenChange:n,children:[C(Qe,{asChild:!0,children:C(B,{variant:"link",className:"flex items-center p-0 RemoteFlows__WorkScheduleSelectionForm__Trigger",children:"Edit Schedule"})}),M(xe,{className:"max-w-5xl max-h-[90vh] overflow-y-auto px-8 py-4 RemoteFlows__WorkScheduleSelectionForm__Content",children:[C(Se,{children:C(be,{className:"RemoteFlows__WorkScheduleSelectionForm__Title",children:"Edit employee working hours"})}),C(Oe,{...i,children:M("form",{className:"space-y-4 RemoteFlows__WorkScheduleSelectionForm__Form",children:[M("div",{className:"rounded-lg",children:[C("p",{className:"text-gray-600 text-sm mb-4 RemoteFlows__WorkScheduleSelectionForm__Description",children:"The times displayed are in the employee's time zone in the 24-hour format."}),M("div",{className:"grid grid-cols-12 gap-4 text-sm font-medium text-gray-500 uppercase tracking-wide RemoteFlows__WorkScheduleSelectionForm__Header",children:[C("div",{className:"col-span-2"}),C("div",{className:"col-span-3 text-center",children:"START"}),C("div",{className:"col-span-1 text-center"}),C("div",{className:"col-span-3 text-center",children:"END"}),C("div",{className:"col-span-2 text-center",children:"HOURS"})]}),C("div",{className:"RemoteFlows__WorkScheduleSelectionForm__Rows",children:f.map((c,_)=>{let S=p[_],R=Re(S);return M($t.Fragment,{children:[M("div",{className:"grid grid-cols-12 gap-4 items-center py-2 RemoteFlows__WorkScheduleSelectionForm__Row-Hours",children:[C("div",{className:"col-span-2 flex items-center gap-3",children:C(le,{label:c.day,name:`schedule.${_}.checked`})}),C("div",{className:"col-span-3",children:C(H,{name:`schedule.${_}.start_time`,includeErrorMessage:!1})}),C("div",{className:"col-span-1 text-center text-gray-500",children:"to"}),C("div",{className:"col-span-3",children:C(H,{name:`schedule.${_}.end_time`,includeErrorMessage:!1})}),C("div",{className:"col-span-2 text-center text-gray-600",children:isNaN(R)?"-":`${R} hours`})]}),M("div",{className:"grid grid-cols-12 gap-4 items-center py-2 RemoteFlows__WorkScheduleSelectionForm__Row-Break",children:[C("div",{className:"col-span-2 text-gray-500",children:"Break"}),C("div",{className:"col-span-2",children:C(H,{name:`schedule.${_}.break_duration_minutes`,includeErrorMessage:!1})}),C("div",{className:"col-span-2 text-gray-500",children:"minutes"}),C("div",{className:"col-span-4"})]})]},c.id)})})]}),Object.keys(l.errors).length>0&&C("p",{className:"text-destructive text-sm mb-0",children:"Invalid time format (HH:mm)"}),M("div",{className:"flex gap-4 pt-4",children:[C(B,{type:"button",className:"reset-button",variant:"outline",onClick:g,children:"Cancel"}),C(B,{type:"button",className:"submit-button",onClick:m(h),children:"Save Schedule"})]})]})})]})]})})}t(Wt,"WorkScheduleSelectionForm");function Ko(e){let{components:o}=x(),{setValue:r,control:n,watch:s}=v(),i=s(e.name),[m,a]=Zo(i),{workHoursSummary:d,breakSummary:u}=qo(m),l=Jo(m);Mt(()=>{r(e.name,m)},[m,e.name,r]);function f(h){a(h)}t(f,"onSubmit");let p=e.component||o?.["work-schedule"];return p?C(b,{control:n,name:e.name,render:({field:h,fieldState:g})=>C(p,{field:{...h,onChange:t(c=>{h.onChange(c),e.onChange?.(c)},"onChange")},fieldState:g,fieldData:{...e,defaultFormattedValue:{workHoursSummary:d,breakSummary:u,totalWorkHours:l}}})}):M("div",{className:"flex flex-col gap-3 RemoteFlows__WorkScheduleField",children:[C("p",{className:"text-sm RemoteFlows__WorkScheduleField__Title",children:"Work hours"}),M("div",{className:"flex flex-col gap-1 RemoteFlows__WorkScheduleField__Summary",children:[C("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__WorkHours",dangerouslySetInnerHTML:{__html:d.join(", ")}}),C("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__Break",children:u.join()}),M("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__Total",children:["Total of ",C("span",{children:l})," hours per week"]}),C(Wt,{defaultSchedule:m,onSubmit:f})]})]})}t(Ko,"WorkScheduleField");import{useEffect as Lt,useState as Ht}from"react";import{jsx as oe,jsxs as Bt}from"react/jsx-runtime";var Yo=t(({field:e,fieldState:o,fieldData:r})=>{let[n,s]=Ht([]),{name:i,label:m,description:a,options:d}=r,u=n||d?.filter(l=>e.value?.includes(l.value));return Lt(()=>{s(d?.filter(l=>e.value?.includes(l.value))||[])},[e.value,d]),Bt(P,{"data-field":i,className:`RemoteFlows__SelectField__Item__${i}`,children:[oe(k,{className:"RemoteFlows__SelectField__Label",children:m}),oe(N,{children:oe(Fe,{options:d||[],selected:u,onChange:l=>{let f=l.map(({value:p})=>p);e.onChange(f),s(l)}})}),a&&oe(D,{children:a}),o.error&&oe(w,{})]})},"MultiSelectFieldDefault");import{jsx as Xo}from"react/jsx-runtime";function Qo({label:e,name:o,options:r,defaultValue:n,description:s,onChange:i,component:m,...a}){let{control:d}=v(),{components:u}=x();return Xo(b,{defaultValue:n,control:d,name:o,render:({field:l,fieldState:f})=>{let h=m||u?.["multi-select"]||Yo,g={label:e,name:o,options:r,defaultValue:n,description:s,onChange:i,...a};return Xo(h,{field:{...l,onChange:t(c=>{l.onChange(c),i?.(c)},"onChange")},fieldState:f,fieldData:g})}})}t(Qo,"MultiSelectField");import{jsx as At}from"react/jsx-runtime";var jo=t(e=>At(fe,{maxLength:15,...e}),"MoneyField");var Te={checkbox:le,text:H,email:Lo,money:jo,select:Co,"multi-select":Qo,radio:go,number:fe,file:co,date:lo,textarea:Io,countries:Ro,hidden:Bo,"work-schedule":Ko};import{AlertCircle as Ot}from"lucide-react";import{jsx as $e,jsxs as Vt}from"react/jsx-runtime";function et({data:e}){let{title:o,description:r,severity:n}=e,i={warning:"warning",error:"destructive",info:"default",success:"warning"}[n]??"warning";return Vt(je,{variant:i,children:[$e(Ot,{className:"h-4 w-4"}),o&&$e(eo,{children:o}),r&&$e(oo,{dangerouslySetInnerHTML:{__html:r}})]})}t(et,"StatementDefault");import{jsx as zt}from"react/jsx-runtime";function ot({title:e,description:o,severity:r}){let{components:n}=x(),s=n?.statement??et;return zt(s,{data:{title:e,description:ae(o),severity:r}})}t(ot,"Statement");import{Fragment as qt,jsx as I,jsxs as V}from"react/jsx-runtime";var Jt=t(({isExpanded:e,onToggle:o,className:r,...n})=>I(B,{type:"button",className:y("RemoteFlows__Button RemoteFlows__FieldSetField__ToggleButton",r),variant:"default",onClick:o,...n,children:e?"Remove":"Define"}),"DefaultToggleButton");function rt({label:e,name:o,fields:r,description:n,components:s,statement:i,isFlatFieldset:m,extra:a,variant:d="outset",features:u,meta:l}){let{helpCenter:f}=l||{},{watch:p,setValue:h,trigger:g,formState:c}=v(),{components:_}=x(),S=u?.toggle?.stateField,R=S?p(S):u?.toggle?.defaultExpanded??!0,z=r.map(({name:F})=>`${o}.${F}`),te=p(z),Me=tt(te),K=tt(null),nt=t(()=>{S&&h(S,!R)},"toggleExpanded");Ut(()=>{let F=te,Y=Me.current,_e=c.isSubmitted||c.submitCount>0,We=!1;for(let X=0;X<F.length;X++)if(F[X]!==void 0&&Y[X]!==F[X]){We=!0;break}return We&&_e&&(K.current&&clearTimeout(K.current),K.current=setTimeout(()=>{g()},50)),Me.current=[...F],()=>{K.current&&clearTimeout(K.current)}},[te,g,c.isSubmitted,c.submitCount]);let at=_?.fieldsetToggle||Jt,Ie=`${o}-content`,Ee=`${o}-header`;return V("fieldset",{className:y("border-1 border-input p-4 rounded-xl","RemoteFlows__FieldSetField",`RemoteFlows__FieldSetField__${o}`),children:[I("legend",{className:y("text-sm font-semibold px-2",d==="inset"&&"hidden"),children:e}),f?.callToAction&&f?.id&&d==="outset"&&I(Q,{className:"RemoteFlows__FieldSetField__HelpCenterLink mb-3",zendeskId:f.id,children:f.callToAction}),d==="inset"&&V(qt,{children:[V("div",{className:"RemoteFlows__FieldSetField__Header",id:Ee,"data-state":R?"expanded":"collapsed","aria-expanded":R,children:[I("h3",{className:y("RemoteFlows__FieldSetField__Title"),children:e}),u?.toggle?.enabled&&I(at,{isExpanded:R,onToggle:nt,"aria-expanded":R,"aria-controls":Ie,"aria-label":`${R?"Hide":"Show"} ${e}`,className:y("RemoteFlows__FieldSetField__Toggle",u.toggle?.className),children:R?u.toggle.labels?.collapse??"Remove":u.toggle.labels?.expand??"Define"})]}),f?.callToAction&&f?.id&&I(Q,{className:"RemoteFlows__FieldSetField__HelpCenterLink mb-3",zendeskId:f.id,children:f.callToAction})]}),R&&V("div",{id:Ie,"aria-labelledby":Ee,role:"region",children:[n?I("div",{className:"mb-5 RemoteFlows__FieldSetField__Description",dangerouslySetInnerHTML:{__html:ae(n)}}):null,V("div",{className:"grid gap-4",children:[r.map(F=>{if(F.calculateDynamicProperties&&(F={...F,...F.calculateDynamicProperties(te,F)||{}}),F.isVisible===!1||F.deprecated)return null;if(F.inputType==="fieldset")return I(rt,{...F,name:`${m?F.name:`${o}.${F.name}`}`,components:s},`${m?F.name:`${o}.${F.name}`}`);if(F.inputType==="fieldset-flat")return I(rt,{...F,name:`${m?F.name:`${o}.${F.name}`}`,components:s,isFlatFieldset:!0},`${m?F.name:`${o}.${F.name}`}`);let Y=Te[F.inputType];if(F.Component){let{Component:_e}=F;return I(_e,{...F},F.name)}return Y?(F.inputType==="select"&&F.multiple&&(Y=Te["multi-select"]),V(Gt,{children:[I(Y,{...F,name:`${m?F.name:`${o}.${F.name}`}`,component:s?.[F.inputType]}),F.extra?F.extra:null]},`${m?F.name:`${o}.${F.name}`}`)):V("p",{className:"error",children:["Field type ",F.inputType," not supported"]})}),a||null,i?I(ot,{...i}):null]})]})]})}t(rt,"FieldSetField");export{Te as a,ot as b,rt as c};
2
- //# sourceMappingURL=chunk-26DGUFCY.js.map