@remoteoss/remote-flows 0.10.0 → 0.11.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.
- package/dist/{chunk-NHAVKODB.js → chunk-3CUVTXRN.js} +2 -2
- package/dist/chunk-3LOVCTCN.js +2 -0
- package/dist/chunk-3LOVCTCN.js.map +1 -0
- package/dist/{chunk-IQOX5IEE.js → chunk-3Z5ZZUO4.js} +2 -2
- package/dist/{chunk-IQOX5IEE.js.map → chunk-3Z5ZZUO4.js.map} +1 -1
- package/dist/chunk-47VYBPE2.js +2 -0
- package/dist/chunk-47VYBPE2.js.map +1 -0
- package/dist/{chunk-E366OTIT.js → chunk-4OEBYZLZ.js} +2 -2
- package/dist/chunk-5E44DBDD.js +2 -0
- package/dist/chunk-5E44DBDD.js.map +1 -0
- package/dist/{chunk-WWMMQZA3.js → chunk-5GUK7MEN.js} +2 -2
- package/dist/chunk-5I6VWJSC.js +2 -0
- package/dist/chunk-5I6VWJSC.js.map +1 -0
- package/dist/chunk-5KKDB7Q7.js +2 -0
- package/dist/chunk-5KKDB7Q7.js.map +1 -0
- package/dist/{chunk-FMWLGLES.js → chunk-77AF2QOD.js} +2 -2
- package/dist/chunk-7TIIT23F.js +2 -0
- package/dist/chunk-7TIIT23F.js.map +1 -0
- package/dist/chunk-AIB34WOA.js +2 -0
- package/dist/chunk-AIB34WOA.js.map +1 -0
- package/dist/{chunk-KMC45C2J.js → chunk-AJVD3O4D.js} +2 -2
- package/dist/chunk-ANCX2TZH.js +2 -0
- package/dist/{chunk-J3MB4Z6R.js.map → chunk-ANCX2TZH.js.map} +1 -1
- package/dist/{chunk-3IXBMIHE.js → chunk-AVA4MEFP.js} +2 -2
- package/dist/{chunk-WFET4MKU.js → chunk-BDZEPXIS.js} +2 -2
- package/dist/{chunk-DS2TO37X.js → chunk-BY5S6EQJ.js} +2 -2
- package/dist/{chunk-XCFIBTQN.js → chunk-CHSULXMN.js} +2 -2
- package/dist/{chunk-SHFIZENN.js → chunk-CSK44J23.js} +2 -2
- package/dist/{chunk-UPRUP24B.js → chunk-D25W2VVQ.js} +2 -2
- package/dist/chunk-D25W2VVQ.js.map +1 -0
- package/dist/{chunk-XSRHFJ3Z.js → chunk-DHT7HDHC.js} +2 -2
- package/dist/chunk-DR7VGNO2.js +2 -0
- package/dist/chunk-DY5CSCPI.js +2 -0
- package/dist/chunk-DY5CSCPI.js.map +1 -0
- package/dist/{chunk-MWLD2A2O.js → chunk-EE54SK65.js} +2 -2
- package/dist/chunk-EGQJ7UBR.js +2 -0
- package/dist/chunk-EGQJ7UBR.js.map +1 -0
- package/dist/{chunk-PRK34ZQH.js → chunk-EW24LQRE.js} +2 -2
- package/dist/chunk-F6U6WDMP.js +2 -0
- package/dist/chunk-F6U6WDMP.js.map +1 -0
- package/dist/{chunk-3QXOTVAD.js → chunk-FBYLX5NA.js} +2 -2
- package/dist/{chunk-YS7XEJJP.js → chunk-G7WJUXZU.js} +2 -2
- package/dist/{chunk-33W6YDCH.js → chunk-GAOBYAJE.js} +2 -2
- package/dist/{chunk-MHEIW3JW.js → chunk-GBD3OCAW.js} +2 -2
- package/dist/{chunk-7R6GAOQG.js → chunk-GCVZ4AY2.js} +2 -2
- package/dist/{chunk-UNTCBVHB.js → chunk-GGBEM452.js} +2 -2
- package/dist/{chunk-N6CK5HE6.js → chunk-GJQ33XQ4.js} +2 -2
- package/dist/{chunk-UWKND5NL.js → chunk-GK3OO5SX.js} +2 -2
- package/dist/chunk-GMA7VTFX.js +2 -0
- package/dist/chunk-GMA7VTFX.js.map +1 -0
- package/dist/{chunk-4HHGKSGL.js → chunk-H2SFR2GL.js} +2 -2
- package/dist/chunk-ILMVHOL2.js +2 -0
- package/dist/chunk-ILMVHOL2.js.map +1 -0
- package/dist/{chunk-7ULN2UW6.js → chunk-KG72IMCX.js} +2 -2
- package/dist/{chunk-ERMOQBXU.js → chunk-KHVEYIMF.js} +2 -2
- package/dist/{chunk-S3C5DJXJ.js → chunk-LIGRV2J5.js} +2 -2
- package/dist/chunk-LT4ALDRM.js +2 -0
- package/dist/chunk-LT4ALDRM.js.map +1 -0
- package/dist/{chunk-G4NBJTHB.js → chunk-MDSGLUUB.js} +2 -2
- package/dist/{chunk-KCXP2NOU.js → chunk-N7PSO5ZD.js} +2 -2
- package/dist/chunk-NBCZF2FO.js +2 -0
- package/dist/chunk-NBCZF2FO.js.map +1 -0
- package/dist/{chunk-XLBQWKQ2.js → chunk-NC3VBBHC.js} +2 -2
- package/dist/{chunk-WHW3ZCTH.js → chunk-NVJYAX22.js} +2 -2
- package/dist/chunk-QI6LLU2N.js +2 -0
- package/dist/chunk-QI6LLU2N.js.map +1 -0
- package/dist/{chunk-OTTIURMN.js → chunk-QQ7KPOLK.js} +2 -2
- package/dist/{chunk-QP755MNN.js → chunk-QVN32YBL.js} +2 -2
- package/dist/chunk-R2SDR47E.js +2 -0
- package/dist/chunk-R2SDR47E.js.map +1 -0
- package/dist/{chunk-FCABBFQ5.js → chunk-R7L6CI5J.js} +2 -2
- package/dist/{chunk-QNSEFFNN.js → chunk-RMVG6YBI.js} +2 -2
- package/dist/{chunk-5TNWGN5T.js → chunk-RUVKAPO5.js} +2 -2
- package/dist/{chunk-FW6EQA43.js → chunk-S7ZMHO5I.js} +2 -2
- package/dist/{chunk-3TQVP4BP.js → chunk-SQICIS7B.js} +2 -2
- package/dist/{chunk-FC7NRKYF.js → chunk-SZOOX2KY.js} +2 -2
- package/dist/chunk-T3L72MV6.js +2 -0
- package/dist/chunk-T3L72MV6.js.map +1 -0
- package/dist/{chunk-ZCIUF3NB.js → chunk-TJK6MTGG.js} +2 -2
- package/dist/{chunk-CLY6BS36.js → chunk-TPSZDGQJ.js} +2 -2
- package/dist/{chunk-CLY6BS36.js.map → chunk-TPSZDGQJ.js.map} +1 -1
- package/dist/{chunk-NAVGSG5R.js → chunk-VD65AUOI.js} +2 -2
- package/dist/{chunk-WJA7PQ2J.js → chunk-WYXN7WW6.js} +2 -2
- package/dist/{chunk-HHE7W23D.js → chunk-XI3AQ3RM.js} +2 -2
- package/dist/chunk-Y4VNFI7K.js +2 -0
- package/dist/chunk-Y4VNFI7K.js.map +1 -0
- package/dist/{chunk-Y4R7VMZM.js → chunk-YRLBMLSA.js} +2 -2
- package/dist/chunk-Z3BMF4BO.js +1 -0
- package/dist/chunk-ZHL2SULA.js +2 -0
- package/dist/chunk-ZHL2SULA.js.map +1 -0
- package/dist/{chunk-ZKNJTAP7.js → chunk-ZSBWDLBS.js} +2 -2
- package/dist/flows/ContractAmendment/ContractAmendmentBack.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentSubmit.js +1 -1
- package/dist/flows/ContractAmendment/context.d.ts +1 -1
- package/dist/flows/ContractAmendment/hooks.d.ts +1 -1
- package/dist/flows/ContractAmendment/hooks.js +1 -1
- package/dist/flows/ContractAmendment/index.d.ts +1 -1
- package/dist/flows/ContractAmendment/index.js +1 -1
- package/dist/flows/ContractAmendment/utils.d.ts +1 -1
- package/dist/flows/CostCalculator/CostCalculatorDisclaimer.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +4 -6
- package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -1
- package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorResetButton.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorSubmitButton.js +1 -1
- package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +42 -0
- package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +2 -0
- package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js.map +1 -0
- package/dist/flows/CostCalculator/Results/CostCalculatorBenefitsBreakdown.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorContributionsBreakdown.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorExtraStatutoryPaymentsBreakdown.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorGrossSalary.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorIndirectTax.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorResults.d.ts +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorResults.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorResultsChart.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorTotalCost.js +1 -1
- package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +9 -0
- package/dist/flows/CostCalculator/SummaryResults/SummaryResults.js +2 -0
- package/dist/flows/CostCalculator/SummaryResults/SummaryResults.js.map +1 -0
- package/dist/flows/CostCalculator/api.d.ts +1 -1
- package/dist/flows/CostCalculator/api.js +1 -1
- package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -1
- package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
- package/dist/flows/CostCalculator/context.d.ts +1 -1
- package/dist/flows/CostCalculator/hooks.d.ts +9 -7
- package/dist/flows/CostCalculator/hooks.js +1 -1
- package/dist/flows/CostCalculator/index.d.ts +5 -3
- package/dist/flows/CostCalculator/index.js +1 -1
- package/dist/flows/CostCalculator/jsonSchema.d.ts +8 -0
- package/dist/flows/CostCalculator/jsonSchema.js +1 -1
- package/dist/flows/CostCalculator/types.d.ts +10 -2
- package/dist/flows/CostCalculator/utils.d.ts +1 -1
- package/dist/flows/CostCalculator/utils.js +1 -1
- package/dist/flows/Onboarding/OnboardingFlow.d.ts +1 -1
- package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
- package/dist/flows/Onboarding/api.d.ts +5 -3
- package/dist/flows/Onboarding/api.js +1 -1
- package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
- package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +1 -1
- package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/Onboarding/components/BenefitsStep.d.ts +1 -1
- package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
- package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +1 -1
- package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingBack.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingForm.d.ts +1 -1
- package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +1 -1
- package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingSubmit.js +1 -1
- package/dist/flows/Onboarding/components/ReviewStep.d.ts +1 -1
- package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +1 -1
- package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/Onboarding/context.d.ts +1 -1
- package/dist/flows/Onboarding/hooks.d.ts +1 -1
- package/dist/flows/Onboarding/hooks.js +1 -1
- package/dist/flows/Onboarding/index.d.ts +1 -1
- package/dist/flows/Onboarding/index.js +1 -1
- package/dist/flows/Onboarding/types.d.ts +1 -1
- package/dist/flows/Onboarding/utils.d.ts +1 -1
- package/dist/flows/Termination/AdditionalDetailsForm.d.ts +1 -1
- package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
- package/dist/flows/Termination/EmployeeComunicationForm.d.ts +1 -1
- package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
- package/dist/flows/Termination/PaidTimeOffForm.d.ts +1 -1
- package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
- package/dist/flows/Termination/TerminationBack.js +1 -1
- package/dist/flows/Termination/TerminationDetailsForm.d.ts +1 -1
- package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
- package/dist/flows/Termination/TerminationFlow.d.ts +1 -1
- package/dist/flows/Termination/TerminationFlow.js +1 -1
- package/dist/flows/Termination/TerminationForm.d.ts +1 -1
- package/dist/flows/Termination/TerminationForm.js +1 -1
- package/dist/flows/Termination/TerminationSubmit.js +1 -1
- package/dist/flows/Termination/TimeOff.d.ts +1 -1
- package/dist/flows/Termination/TimeOff.js +1 -1
- package/dist/flows/Termination/context.d.ts +1 -1
- package/dist/flows/Termination/hooks.d.ts +1 -1
- package/dist/flows/Termination/hooks.js +1 -1
- package/dist/flows/Termination/index.d.ts +1 -1
- package/dist/flows/Termination/index.js +1 -1
- package/dist/flows/Termination/json-schemas/schema.js +1 -1
- package/dist/flows/Termination/types.d.ts +1 -1
- package/dist/flows/types.d.ts +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +15 -5
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internals.d.ts +54 -58
- package/dist/internals.js +1 -1
- package/dist/internals.js.map +1 -1
- package/dist/{types.gen-D9fBRSTj.d.ts → types.gen-CVPKMCVh.d.ts} +29 -17
- package/package.json +5 -2
- package/dist/chunk-2NDBK2EZ.js +0 -2
- package/dist/chunk-2NDBK2EZ.js.map +0 -1
- package/dist/chunk-2Y22JKVE.js +0 -2
- package/dist/chunk-45N2S6JG.js +0 -2
- package/dist/chunk-45N2S6JG.js.map +0 -1
- package/dist/chunk-C3KZEPUZ.js +0 -2
- package/dist/chunk-C3KZEPUZ.js.map +0 -1
- package/dist/chunk-D24ATLAM.js +0 -2
- package/dist/chunk-D24ATLAM.js.map +0 -1
- package/dist/chunk-E6DC4DXP.js +0 -2
- package/dist/chunk-E6DC4DXP.js.map +0 -1
- package/dist/chunk-ERUG7FR3.js +0 -2
- package/dist/chunk-ERUG7FR3.js.map +0 -1
- package/dist/chunk-FQNVKX3N.js +0 -2
- package/dist/chunk-FQNVKX3N.js.map +0 -1
- package/dist/chunk-HGLI6PUM.js +0 -2
- package/dist/chunk-HGLI6PUM.js.map +0 -1
- package/dist/chunk-IS7BYXY6.js +0 -2
- package/dist/chunk-IS7BYXY6.js.map +0 -1
- package/dist/chunk-IV5GLWFN.js +0 -2
- package/dist/chunk-IV5GLWFN.js.map +0 -1
- package/dist/chunk-J3MB4Z6R.js +0 -2
- package/dist/chunk-JNAFD452.js +0 -2
- package/dist/chunk-JNAFD452.js.map +0 -1
- package/dist/chunk-UBAEG2IO.js +0 -2
- package/dist/chunk-UBAEG2IO.js.map +0 -1
- package/dist/chunk-UPRUP24B.js.map +0 -1
- package/dist/chunk-XHBYAMFV.js +0 -2
- package/dist/chunk-XHBYAMFV.js.map +0 -1
- package/dist/chunk-XJ7PCWMR.js +0 -2
- package/dist/chunk-XJ7PCWMR.js.map +0 -1
- package/dist/chunk-YJXRJTOH.js +0 -1
- package/dist/chunk-ZRXXVXV4.js +0 -2
- package/dist/chunk-ZRXXVXV4.js.map +0 -1
- /package/dist/{chunk-NHAVKODB.js.map → chunk-3CUVTXRN.js.map} +0 -0
- /package/dist/{chunk-E366OTIT.js.map → chunk-4OEBYZLZ.js.map} +0 -0
- /package/dist/{chunk-WWMMQZA3.js.map → chunk-5GUK7MEN.js.map} +0 -0
- /package/dist/{chunk-FMWLGLES.js.map → chunk-77AF2QOD.js.map} +0 -0
- /package/dist/{chunk-KMC45C2J.js.map → chunk-AJVD3O4D.js.map} +0 -0
- /package/dist/{chunk-3IXBMIHE.js.map → chunk-AVA4MEFP.js.map} +0 -0
- /package/dist/{chunk-WFET4MKU.js.map → chunk-BDZEPXIS.js.map} +0 -0
- /package/dist/{chunk-DS2TO37X.js.map → chunk-BY5S6EQJ.js.map} +0 -0
- /package/dist/{chunk-XCFIBTQN.js.map → chunk-CHSULXMN.js.map} +0 -0
- /package/dist/{chunk-SHFIZENN.js.map → chunk-CSK44J23.js.map} +0 -0
- /package/dist/{chunk-XSRHFJ3Z.js.map → chunk-DHT7HDHC.js.map} +0 -0
- /package/dist/{chunk-2Y22JKVE.js.map → chunk-DR7VGNO2.js.map} +0 -0
- /package/dist/{chunk-MWLD2A2O.js.map → chunk-EE54SK65.js.map} +0 -0
- /package/dist/{chunk-PRK34ZQH.js.map → chunk-EW24LQRE.js.map} +0 -0
- /package/dist/{chunk-3QXOTVAD.js.map → chunk-FBYLX5NA.js.map} +0 -0
- /package/dist/{chunk-YS7XEJJP.js.map → chunk-G7WJUXZU.js.map} +0 -0
- /package/dist/{chunk-33W6YDCH.js.map → chunk-GAOBYAJE.js.map} +0 -0
- /package/dist/{chunk-MHEIW3JW.js.map → chunk-GBD3OCAW.js.map} +0 -0
- /package/dist/{chunk-7R6GAOQG.js.map → chunk-GCVZ4AY2.js.map} +0 -0
- /package/dist/{chunk-UNTCBVHB.js.map → chunk-GGBEM452.js.map} +0 -0
- /package/dist/{chunk-N6CK5HE6.js.map → chunk-GJQ33XQ4.js.map} +0 -0
- /package/dist/{chunk-UWKND5NL.js.map → chunk-GK3OO5SX.js.map} +0 -0
- /package/dist/{chunk-4HHGKSGL.js.map → chunk-H2SFR2GL.js.map} +0 -0
- /package/dist/{chunk-7ULN2UW6.js.map → chunk-KG72IMCX.js.map} +0 -0
- /package/dist/{chunk-ERMOQBXU.js.map → chunk-KHVEYIMF.js.map} +0 -0
- /package/dist/{chunk-S3C5DJXJ.js.map → chunk-LIGRV2J5.js.map} +0 -0
- /package/dist/{chunk-G4NBJTHB.js.map → chunk-MDSGLUUB.js.map} +0 -0
- /package/dist/{chunk-KCXP2NOU.js.map → chunk-N7PSO5ZD.js.map} +0 -0
- /package/dist/{chunk-XLBQWKQ2.js.map → chunk-NC3VBBHC.js.map} +0 -0
- /package/dist/{chunk-WHW3ZCTH.js.map → chunk-NVJYAX22.js.map} +0 -0
- /package/dist/{chunk-OTTIURMN.js.map → chunk-QQ7KPOLK.js.map} +0 -0
- /package/dist/{chunk-QP755MNN.js.map → chunk-QVN32YBL.js.map} +0 -0
- /package/dist/{chunk-FCABBFQ5.js.map → chunk-R7L6CI5J.js.map} +0 -0
- /package/dist/{chunk-QNSEFFNN.js.map → chunk-RMVG6YBI.js.map} +0 -0
- /package/dist/{chunk-5TNWGN5T.js.map → chunk-RUVKAPO5.js.map} +0 -0
- /package/dist/{chunk-FW6EQA43.js.map → chunk-S7ZMHO5I.js.map} +0 -0
- /package/dist/{chunk-3TQVP4BP.js.map → chunk-SQICIS7B.js.map} +0 -0
- /package/dist/{chunk-FC7NRKYF.js.map → chunk-SZOOX2KY.js.map} +0 -0
- /package/dist/{chunk-ZCIUF3NB.js.map → chunk-TJK6MTGG.js.map} +0 -0
- /package/dist/{chunk-NAVGSG5R.js.map → chunk-VD65AUOI.js.map} +0 -0
- /package/dist/{chunk-WJA7PQ2J.js.map → chunk-WYXN7WW6.js.map} +0 -0
- /package/dist/{chunk-HHE7W23D.js.map → chunk-XI3AQ3RM.js.map} +0 -0
- /package/dist/{chunk-Y4R7VMZM.js.map → chunk-YRLBMLSA.js.map} +0 -0
- /package/dist/{chunk-YJXRJTOH.js.map → chunk-Z3BMF4BO.js.map} +0 -0
- /package/dist/{chunk-ZKNJTAP7.js.map → chunk-ZSBWDLBS.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as H}from"./chunk-WHW3ZCTH.js";import{a as fe,b as Oe,c as Be,d as Ae,e as Ve,f as Ue,g as Je,h as ze,i as Ge,j as qe,k as Ke,l as Ye,m as ye,n as Xe,o as he,p as _e,r as ve}from"./chunk-HHE7W23D.js";import{b as je}from"./chunk-YS7XEJJP.js";import{b as S}from"./chunk-3ZWDIEEM.js";import{a as ge,b as L}from"./chunk-SHFIZENN.js";import{a as Z,b as ee,c as v,d as We,e as Ee,f as Le,g as He,h as b,i as w,j as k,k as P,l as R,m as D}from"./chunk-33W6YDCH.js";import{e as Me,g as $e}from"./chunk-MXFDOIUA.js";import{a as _,e as te}from"./chunk-HGLI6PUM.js";import{a}from"./chunk-P37U34EQ.js";import{Fragment as ko}from"react";import{Fragment as Wt,jsx as O,jsxs as oe}from"react/jsx-runtime";function re({name:e,defaultValue:t,description:n,label:o,onChange:i,multiple:r,options:p,component:F,...f}){let{components:c}=S(),{control:s}=v(),u=a((d,m,g)=>{let l=g.value?[...g.value]:[];m?l.includes(d)||g.onChange([...l,d]):g.onChange(l.filter(y=>y!==d))},"handleCheckboxChange");return O(b,{control:s,name:e,defaultValue:t,render:({field:d,fieldState:m})=>{let g=F||c?.checkbox;if(g){let l={name:e,description:n,label:o,defaultValue:t,multiple:r,options:p,...f};return O(g,{field:{...d,onChange:a(y=>{if(r){let{checked:C,value:x}=y.target;u(x,C,d),i?.(C);return}d.onChange(y),i?.(y)},"onChange")},fieldState:m,fieldData:l})}return oe(w,{"data-field":e,className:_(`RemoteFlows__CheckBoxField__Item__${e}`),children:[O(P,{children:oe(Wt,{children:[p&&r?O(k,{children:o}):null,p&&r?p.map(l=>oe("div",{className:"flex space-x-2",children:[O(fe,{id:l.value,onCheckedChange:y=>{u(l.value,y===!0,d),i?.(y,l.value)},checked:d.value?.includes(l.value),className:"RemoteFlows__CheckBox__Input"}),O(k,{htmlFor:l.value,className:"mb-0 RemoteFlows__CheckBox__Label",children:l.label})]},l.value)):oe("div",{className:"flex space-x-2",children:[O(fe,{id:e,onCheckedChange:l=>{d.onChange(l),i?.(l)},checked:d.value,className:"RemoteFlows__CheckBox__Input"}),O(k,{htmlFor:e,className:"mb-0 RemoteFlows__CheckBox__Label",children:o})]})]})}),n&&O(R,{children:n}),m.error&&O(D,{})]})}})}a(re,"CheckBoxField");import{CalendarIcon as Ot}from"lucide-react";import{PopoverClose as Bt}from"@radix-ui/react-popover";import{ChevronLeft as Et,ChevronRight as Lt}from"lucide-react";import{DayPicker as Ht}from"react-day-picker";import{jsx as Ce}from"react/jsx-runtime";function Qe({className:e,classNames:t,showOutsideDays:n=!0,...o}){return Ce(Ht,{showOutsideDays:n,className:_("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:_(ge({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:_("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",o.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:_(ge({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",...t},components:{IconLeft:a(({className:i,...r})=>Ce(Et,{className:_("size-4",i),...r}),"IconLeft"),IconRight:a(({className:i,...r})=>Ce(Lt,{className:_("size-4",i),...r}),"IconRight")},...o})}a(Qe,"Calendar");import*as B from"@radix-ui/react-popover";import{jsx as ne}from"react/jsx-runtime";function ae({...e}){return ne(B.Root,{"data-slot":"popover",...e})}a(ae,"Popover");function se({...e}){return ne(B.Trigger,{"data-slot":"popover-trigger",...e})}a(se,"PopoverTrigger");function ie({className:e,align:t="center",sideOffset:n=4,...o}){return ne(B.Portal,{children:ne(B.Content,{"data-slot":"popover-content",align:t,sideOffset:n,className:_("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),...o})})}a(ie,"PopoverContent");import{format as Ze}from"date-fns";import{Fragment as At,jsx as I,jsxs as xe}from"react/jsx-runtime";function et({description:e,label:t,name:n,minDate:o,onChange:i,component:r,...p}){let{components:F}=S(),{control:f}=v(),c;return p.meta?.mot&&typeof p.meta.mot=="number"?c=$e(p.meta.mot):o&&(c=new Date(o)),I(b,{control:f,name:n,render:({field:s,fieldState:u})=>{let d=r||F?.date;if(d){let m={description:e,label:t,name:n,onChange:i,...c&&{minDate:c.toISOString()},...p};return I(d,{field:{...s,onChange:a(g=>{s.onChange(g),i?.(g)},"onChange")},fieldState:u,fieldData:m})}return xe(w,{"data-field":n,className:`flex flex-col RemoteFlows__DatePickerField__Item__${n}`,children:[I(k,{className:"RemoteFlows__DatePickerField__Label",children:t}),xe(ae,{children:[I(se,{asChild:!0,children:I(P,{children:I("div",{children:xe(L,{type:"button",variant:"outline",className:_("w-full pl-3 text-left font-normal",!s.value&&"text-muted-foreground"),"data-testid":`date-picker-button-${n}`,children:[s.value&&I(At,{children:Ze(s.value,"yyyy-MM-dd")}),I(Ot,{className:"ml-auto h-4 w-4 opacity-50"})]})})})}),I(ie,{className:"w-auto p-0 RemoteFlows__DatepickerField__PopoverContent",align:"start",children:I(Qe,{mode:"single",className:"RemoteFlows__DatepickerField__Calendar",selected:s.value?new Date(s.value):void 0,onSelect:m=>{s.onChange(m?Ze(m,"yyyy-MM-dd"):null),i?.(m)},defaultMonth:c,components:{DayContent:a(m=>I(Bt,{children:m.date.getDate()}),"DayContent")},...c&&{disabled:a(m=>m<c,"disabled")}})})]}),e?I(R,{children:e}):null,u.error&&I(D,{className:"RemoteFlows__DatePickerField__Error"})]})}})}a(et,"DatePickerField");import{AlertCircle as Vt}from"lucide-react";import{jsx as le,jsxs as Ut}from"react/jsx-runtime";function me({title:e,description:t,severity:n}){let{components:o}=S();if(o?.statement){let i=o?.statement;return le(i,{data:{title:e,description:t,severity:n}})}return Ut(Oe,{variant:"warning",children:[le(Vt,{className:"h-4 w-4"}),e&&le(Be,{children:e}),le(Ae,{children:t})]})}a(me,"Statement");import{Fragment as Jt,useEffect as zt,useRef as tt}from"react";import{jsx as Q,jsxs as Se}from"react/jsx-runtime";function be({label:e,name:t,fields:n,description:o,components:i,statement:r,isFlatFieldset:p,extra:F}){let{watch:f,trigger:c,formState:s}=v(),u=n.map(({name:l})=>`${t}.${l}`),d=f(u),m=tt(d),g=tt(null);return zt(()=>{let l=d,y=m.current,C=s.isSubmitted||s.submitCount>0,x=!1;for(let N=0;N<l.length;N++)if(l[N]!==void 0&&y[N]!==l[N]){x=!0;break}return x&&C&&(g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{c()},50)),m.current=[...l],()=>{g.current&&clearTimeout(g.current)}},[d,c,s.isSubmitted,s.submitCount]),Se("fieldset",{className:_("border-1 border-input p-4 rounded-xl",`RemoteFlows__FieldSetField__${t}`),children:[Q("legend",{className:"text-sm font-semibold px-2",children:e}),o?Q("div",{className:"mb-5 RemoteFlows__FieldSetField__Description",dangerouslySetInnerHTML:{__html:o}}):null,Se("div",{className:"grid gap-4",children:[n.map(l=>{l.calculateDynamicProperties&&(l={...l,...l.calculateDynamicProperties(d,l)||{}});let y=q[l.type];if(l.isVisible===!1||l.deprecated)return null;if(l.Component){let{Component:C}=l;return Q(C,{...l},l.name)}return l.type==="select"&&l.multiple&&(y=q["multi-select"]),Se(Jt,{children:[Q(y,{...l,name:`${p?l.name:`${t}.${l.name}`}`,component:i?.[l.type]}),l.extra?l.extra:null]},`${p?l.name:`${t}.${l.name}`}`)}),F||null,r?Q(me,{...r}):null]})]})}a(be,"FieldSetField");import{useState as Gt,useRef as qt}from"react";import{Upload as Kt,X as Yt}from"lucide-react";import{jsx as A,jsxs as ke}from"react/jsx-runtime";function ot({onChange:e,className:t,multiple:n}){let[o,i]=Gt([]),r=qt(null),p=a(c=>{c.preventDefault(),r.current?.click()},"handleClick"),F=a(c=>{if(c.target.files&&c.target.files.length>0){let s=Array.from(c.target.files);i(s),e(c)}},"handleChange"),f=a(c=>{i(s=>s.filter(u=>u!==c))},"onRemoveFile");return ke("div",{className:_("flex flex-col items-start gap-4",t),children:[A("input",{type:"file",ref:r,onChange:F,className:"hidden","aria-label":"File upload",multiple:n}),ke(L,{type:"button",onClick:p,className:"gap-2",children:[A(Kt,{className:"h-4 w-4"}),"Choose File"]}),o.length===0&&A("div",{className:"text-sm",children:n?A("span",{className:"font-medium",children:"No files selected. You can select multiple files"}):A("span",{className:"font-medium",children:"No file selected."})}),o.length>0&&o.map((c,s)=>ke("div",{className:"text-sm flex items-center gap-2",children:["Selected file: ",A("span",{className:"font-medium",children:c.name})," (",Math.round(c.size/1024)," KB)",A(L,{variant:"ghost",onClick:()=>f(c),children:A(Yt,{})})]},s))]})}a(ot,"FileUploader");import{jsx as V,jsxs as Xt}from"react/jsx-runtime";var jt=a(e=>new Promise((t,n)=>{let o=new FileReader;o.readAsDataURL(e),o.onload=()=>t(o.result),o.onerror=i=>n(i)}),"toBase64"),rt=a(async e=>{let t=e.target.files?Array.from(e.target.files):[];return await Promise.all(t.map(async o=>{let i=await jt(o);return{name:o.name,content:i.split(",")[1]}}))},"convertFilesToBase64");function nt({name:e,description:t,label:n,multiple:o,onChange:i,component:r,...p}){let{components:F}=S(),{control:f}=v();return V(b,{control:f,name:e,render:({field:c,fieldState:s})=>{let u=r||F?.file;if(u){let d={name:e,description:t,label:n,multiple:o,...p};return V(u,{field:{...c,value:null,onChange:a(async m=>{let g=await rt(m);c.onChange(g),i?.(g)},"onChange")},fieldState:s,fieldData:d})}return Xt(w,{"data-field":e,className:`RemoteFlows__FileUpload__Item__${e}`,children:[V(k,{className:"RemoteFlows__FileUpload__Label",children:n}),V(P,{children:V(ot,{onChange:async d=>{let m=await rt(d);c.onChange(m),i?.(m)},multiple:o,className:_("RemoteFlows__FileUpload__Input")})}),t&&V("div",{className:"flex items-center justify-between",children:V(R,{className:"RemoteFlows__FileUpload__Description",children:t})}),s.error&&V(D,{className:"RemoteFlows__FileUpload__Error"})]})}})}a(nt,"FileUploadField");import{jsx as Ne}from"react/jsx-runtime";function ce(e){let{components:t}=S(),{control:n}=v(),o=e.component||t?.number;return o?Ne(b,{control:n,name:e.name,render:({field:i,fieldState:r})=>Ne(o,{field:{...i,onChange:a(p=>{i.onChange(p),e.onChange?.(p)},"onChange")},fieldState:r,fieldData:e})}):Ne(H,{...e,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$"})}a(ce,"NumberField");import{Fragment as Qt}from"react";import{jsx as $,jsxs as we}from"react/jsx-runtime";function at({name:e,defaultValue:t,description:n,label:o,options:i,onChange:r,component:p,...F}){let{components:f}=S(),{control:c}=v();return $(b,{control:c,name:e,defaultValue:t,render:({field:s,fieldState:u})=>{let d=p||f?.radio;if(d){let m={name:e,defaultValue:t,description:n,label:o,options:i,...F};return $(d,{field:{...s,onChange:a(g=>{s.onChange(g),r?.(g)},"onChange")},fieldState:u,fieldData:m})}return we(w,{className:_("space-y-3",`RemoteFlows__RadioGroupField__Item__${e}`),"data-field":e,children:[$(k,{children:o}),$(P,{children:$(Ve,{"aria-label":o||e,onValueChange:m=>{s.onChange(m),r?.(m)},value:s.value,className:"flex flex-col space-y-3",children:i?.map(m=>$(Qt,{children:we(w,{"data-field":e,className:"flex items-start space-x-3 space-y-0 gap-0 RemoteFlows__RadioField__Item",children:[$(P,{children:$(Ue,{value:m.value,className:"RemoteFlows__RadioField__Input",disabled:m.disabled})}),we("div",{children:[$(k,{className:"font-normal mb-0 RemoteFlows__RadioField__Label",children:m.label}),m.description&&$(R,{className:"mt-2",children:m.description})]})]})},m.value))})}),n&&$(R,{children:n}),u.error&&$(D,{})]})}})}a(at,"RadioGroupField");import{jsx as M,jsxs as st}from"react/jsx-runtime";function it({label:e,name:t,options:n,defaultValue:o,description:i,onChange:r,component:p,...F}){let{control:f}=v(),{components:c}=S();return M(b,{defaultValue:o,control:f,name:t,render:({field:s,fieldState:u})=>{let d=p||c?.select;if(d){let m={label:e,name:t,options:n,defaultValue:o,description:i,onChange:r,...F};return M(d,{field:{...s,onChange:a(g=>{let l=F.jsonType==="number"?Number(g):g;s.onChange(l),r?.(l)},"onChange")},fieldState:u,fieldData:m})}return st(w,{"data-field":t,className:`RemoteFlows__SelectField__Item__${t}`,children:[M(k,{className:"RemoteFlows__SelectField__Label",children:e}),M(P,{children:M("div",{className:"relative",children:st(Je,{value:s.value||"",onValueChange:m=>{let g=F.jsonType==="number"?Number(m):m;s.onChange(g),r?.(g)},children:[M(qe,{className:"RemoteFlows__SelectField__Trigger","aria-invalid":!!u.error,"aria-label":e,children:M("span",{className:"absolute",children:M(Ge,{placeholder:e})})}),M(Ke,{className:"RemoteFlows__SelectField__Content",children:M(ze,{className:"RemoteFlows__SelectField__Group",children:n.map(m=>M(Ye,{value:m.value,className:"RemoteFlows__SelectField__SelectItem",children:m.label},m.value))})})]})})}),i&&M(R,{children:i}),u.error&&M(D,{})]})}})}a(it,"SelectField");import{useState as no}from"react";import{Fragment as Zt,useState as eo}from"react";import{Check as to,ChevronDownIcon as oo,X as ro}from"lucide-react";import{Command as K}from"cmdk";import{SearchIcon as Fn}from"lucide-react";import{jsx as Y,jsxs as hn}from"react/jsx-runtime";function lt({className:e,...t}){return Y(K,{"data-slot":"command",className:_("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}a(lt,"Command");function mt({className:e,...t}){return Y(K.List,{"data-slot":"command-list",className:_("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}a(mt,"CommandList");function ct({...e}){return Y(K.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}a(ct,"CommandEmpty");function dt({className:e,...t}){return Y(K.Group,{"data-slot":"command-group",className:_("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),...t})}a(dt,"CommandGroup");function pt({className:e,...t}){return Y(K.Separator,{"data-slot":"command-separator",className:_("bg-border -mx-1 h-px",e),...t})}a(pt,"CommandSeparator");function ut({className:e,...t}){return Y(K.Item,{"data-slot":"command-item",className:_("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),...t})}a(ut,"CommandItem");import{jsx as W,jsxs as j}from"react/jsx-runtime";function de({options:e,selected:t,onChange:n,placeholder:o,...i}){let[r,p]=eo(!1),F=a(s=>{n(t.filter(u=>u.value!==s.value))},"handleUnselect"),f=e.some(s=>s.category),c=e.reduce((s,u)=>{let d=u.category||"Uncategorized";return s[d]||(s[d]=[]),s[d].push(u),s},{});return j(ae,{open:r,onOpenChange:p,...i,children:[W(se,{children:j(L,{variant:"outline",role:"combobox","aria-expanded":r,className:"w-full justify-between font-normal",type:"button",children:[W("div",{className:"flex gap-1 flex-wrap overflow-x-auto max-h-[2.5rem] items-center",children:t.length>0?t.map(s=>j(je,{variant:"secondary",className:"mr-1 mb-1",children:[s.label,W("div",{role:"button",tabIndex:0,"aria-label":`remove ${s.label}`,className:"ml-1 ring-offset-background rounded-full outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 cursor-pointer",onKeyDown:u=>{u.key==="Enter"&&F(s)},onMouseDown:u=>{u.preventDefault(),u.stopPropagation()},onClick:()=>F(s),children:W(ro,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},s.label)):W("span",{className:"text-foreground",children:o})}),W(oo,{className:"size-4"})]})}),W(ie,{align:"start",className:"w-full p-0",children:W(lt,{children:j(mt,{children:[W(ct,{children:"No item found."}),Object.entries(c).map(([s,u],d)=>j(Zt,{children:[d>0&&W(pt,{}),W(dt,{heading:f?s:void 0,children:u.map(m=>{let g=t.some(l=>l.value===m.value);return j(ut,{onSelect:()=>{n(g?t.filter(l=>l.value!==m.value):[...t,m])},children:[W(to,{className:_("mr-2 h-4 w-4",g?"opacity-100":"opacity-0")}),m.label]},m.label)})})]},s))]})})})]})}a(de,"MultiSelect");import{jsx as U,jsxs as ao}from"react/jsx-runtime";function Ft({label:e,name:t,options:n,defaultValue:o,description:i,onChange:r,$meta:p,component:F,...f}){let{control:c}=v(),{components:s}=S(),[u,d]=no([]);return U(b,{defaultValue:o,control:c,name:t,render:({field:m,fieldState:g})=>{let l=F||s?.countries;if(l){let x={label:e,name:t,options:n,defaultValue:o,description:i,onChange:r,$meta:p,...f};return U(l,{field:{...m,onChange:a(N=>{m.onChange(N),r?.(N)},"onChange")},fieldState:g,fieldData:x})}let y=[...Object.entries(p?.regions||{}).map(([x,N])=>({value:N,label:x,category:"Regions"})),...Object.entries(p?.subregions||{}).map(([x,N])=>({value:N,label:x,category:"Subregions"})),...n.map(x=>({...x,value:x.value,label:x.label,category:"Countries"}))],C=a(x=>{let N=x.map(({value:$t})=>$t);m.onChange(N),r?.(N),d(x)},"handleChange");return ao(w,{"data-field":t,className:`RemoteFlows__CountryField__Item__${t}`,children:[U(k,{className:"RemoteFlows__CountryField__Label",children:e}),U(P,{children:U(de,{options:y,selected:u,onChange:C,...f})}),i&&U(R,{children:i}),g.error&&U(D,{})]})}})}a(Ft,"CountryField");import*as ft from"react";import{jsx as so}from"react/jsx-runtime";var Pe=ft.forwardRef(({className:e,...t},n)=>so("textarea",{className:_("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:n,...t}));Pe.displayName="Textarea";import{jsx as J,jsxs as Re}from"react/jsx-runtime";function gt({name:e,description:t,label:n,onChange:o,maxLength:i,component:r,...p}){let{components:F}=S(),{control:f}=v();return J(b,{control:f,name:e,render:({field:c,fieldState:s})=>{let u=r||F?.textarea;if(u){let m={name:e,description:t,label:n,maxLength:i,...p};return J(u,{field:{...c,onChange:a(g=>{c.onChange(g),o?.(g)},"onChange")},fieldState:s,fieldData:m})}let d=c.value?.length??0;return Re(w,{"data-field":e,className:`RemoteFlows__TextArea__Item__${e}`,children:[J(k,{className:"RemoteFlows__TextArea__Label",children:n}),J(P,{children:J(Pe,{...c,value:c.value??"",onChange:m=>{c.onChange(m),o?.(m)},className:_(s.error&&"border-red-500 focus-visible:ring-red-500","RemoteFlows__TextArea__Input"),placeholder:n})}),(t||i)&&Re("div",{className:"flex items-center justify-between",children:[t&&J(R,{className:"RemoteFlows__TextArea__Description",children:t}),i&&Re("span",{className:"text-sm ml-auto RemoteFlows__TextArea__MaxLength",children:[d,"/",i]})]}),s.error&&J(D,{className:"RemoteFlows__TextArea__Error"})]})}})}a(gt,"TextAreaField");import{jsx as De}from"react/jsx-runtime";function yt(e){let{components:t}=S(),{control:n}=v(),o=e.component||t?.email;return o?De(b,{control:n,name:e.name,render:({field:i,fieldState:r})=>De(o,{field:{...i,onChange:a(p=>{i.onChange(p),e.onChange?.(p)},"onChange")},fieldState:r,fieldData:e})}):De(H,{...e,type:"email"})}a(yt,"EmailField");import{jsx as ht}from"react/jsx-runtime";function _t(e){let{control:t}=v();return ht(b,{control:t,name:e.name,render:({field:n})=>ht("input",{...n,type:"hidden"})})}a(_t,"HiddenField");import Fo,{useEffect as fo,useState as Pt}from"react";var vt=a((e,t,n)=>{if(e&&"reportValidity"in e){let o=Z(n,t);e.setCustomValidity(o&&o.message||""),e.reportValidity()}},"r"),Te=a((e,t)=>{for(let n in t.fields){let o=t.fields[n];o&&o.ref&&"reportValidity"in o.ref?vt(o.ref,n,e):o&&o.refs&&o.refs.forEach(i=>vt(i,n,e))}},"o"),xt=a((e,t)=>{t.shouldUseNativeValidation&&Te(e,t);let n={};for(let o in e){let i=Z(t.fields,o),r=Object.assign(e[o]||{},{ref:i&&i.ref});if(io(t.names||Object.keys(e),o)){let p=Object.assign({},Z(n,o));ee(p,"root",r),ee(n,o,p)}else ee(n,o,r)}return n},"s"),io=a((e,t)=>{let n=Ct(t);return e.some(o=>Ct(o).match(`^${n}\\.\\d+`))},"i");function Ct(e){return e.replace(/\]|\[/g,"")}a(Ct,"n");function St(e,t,n){return t===void 0&&(t={}),n===void 0&&(n={}),function(o,i,r){try{return Promise.resolve(function(p,F){try{var f=(t.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[n.mode==="sync"?"validateSync":"validate"](o,Object.assign({abortEarly:!1},t,{context:i}))).then(function(c){return r.shouldUseNativeValidation&&Te({},r),{values:n.raw?Object.assign({},o):c,errors:{}}}))}catch(c){return F(c)}return f&&f.then?f.then(void 0,F):f}(0,function(p){if(!p.inner)throw p;return{values:{},errors:xt((F=p,f=!r.shouldUseNativeValidation&&r.criteriaMode==="all",(F.inner||[]).reduce(function(c,s){if(c[s.path]||(c[s.path]={message:s.message,type:s.type}),f){var u=c[s.path].types,d=u&&u[s.type];c[s.path]=We(s.path,f,c,s.type,d?[].concat(d,s.message):s.message)}return c},{})),r)};var F,f}))}catch(p){return Promise.reject(p)}}}a(St,"o");import*as T from"yup";import bt from"lodash.groupby";import X from"lodash.capitalize";var kt=60,pe=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"];function lo(e){if(e<60)return`${e}m`;let t=Math.floor(e/kt),n=e%kt;return n>0?`${t}h${n}m`:`${t}h`}a(lo,"convertBreakDurationToHours");function Nt(e){let t=e.reduce((n,o)=>o.hours+n,0);return Number(t.toFixed(2))}a(Nt,"calculateTotalWorkHours");function mo(e,t){let n=t.map(({day:r})=>r.toLowerCase()),o=n.indexOf(e),i=null;for(;o<n.length&&!i;){let r=n[o],p=n[o+1],F=pe.indexOf(r)+1;pe[F]===p||(i=r),o+=1}return i}a(mo,"findLastConsecutiveDay");function co(e){return e.start_time&&e.end_time&&(typeof e.hours=="number"?e.hours:Number.parseInt(e.hours))>0}a(co,"shouldSummarizeSchedule");function po(e){return Number.parseInt(e.break_duration_minutes)>0}a(po,"shouldSummarizeBreaks");function wt(e){let t=e.filter(co),n=bt(t,F=>`${F.start_time}|${F.end_time}`),o=e.filter(po),i=bt(o,"break_duration_minutes"),r=Object.keys(n).map(F=>{let f=n[F],c=f[0].day,[s,u]=F.split("|"),d=`from <span>${s.replace(":","h")}</span> to <span>${u.replace(":","h")}</span>`,m=mo(c,f),l=(m?f.findIndex(y=>y.day===m):-1)===f.length-1;return f.length===1?`${X(c)}, ${d}`:!l||!m?f.reduce((y,C,x)=>{let N=X(C.day);return x===f.length-1?`${y}and ${N}, ${d}`:`${y}<span>${N}</span>, `},""):`<span>${X(c)}</span> to <span>${X(m)}</span>, ${d}`}),p=Object.keys(i).reverse().map((F,f)=>{let c=f===0,s=i[F],u=lo(parseInt(F,10));if(Object.keys(i).length===1)return`With ${u} daily breaks`;if(s.length===1){let d=`${u} break on ${X(s[0].day)}.`;return c?`With ${d}`:d}return s.reduce((d,m,g)=>{let l=X(m.day);return g===0?`${d} ${l}`:g===s.length-1?`${d}, and ${l}.`:`${d}, ${l}`},c?`With ${u} break on`:`${u} break on`)});return{workHoursSummary:r,breakSummary:p}}a(wt,"buildWorkScheduleSummary");function Ie(e){let{checked:t,start_time:n,end_time:o,break_duration_minutes:i}=e;if(!t)return 0;let[r,p]=n.split(":").map(Number),[F,f]=o.split(":").map(Number),c=r*60+p,d=(F*60+f-c-Number.parseInt(i||"0"))/60;return d===Math.floor(d)?d:Number(d.toFixed(2))}a(Ie,"calculateHours");var uo={monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat",sunday:"Sun"};function ue(e){return uo[e]}a(ue,"getShortWeekday");import{jsx as h,jsxs as E}from"react/jsx-runtime";var go=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:a(e=>e.required("Required"),"then"),otherwise:a(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:a(e=>e.required("Required"),"then"),otherwise:a(e=>e.optional().nullable(),"otherwise")}),hours:T.number().default(0),break_duration_minutes:T.string().default("0")}),yo=T.object({schedule:T.array(go)});function ho({defaultSchedule:e,onSubmit:t}){let[n,o]=Pt(!1),i=pe.map(l=>{let y=e.find(C=>C.day.toLowerCase()===ue(l).toLowerCase()||C.day.toLowerCase()===l.toLowerCase());return y?{...y,day:ue(l),checked:!0}:{...e[0],checked:!1,day:ue(l)}}),r=Le({defaultValues:{schedule:i},resolver:St(yo)}),{handleSubmit:p,watch:F,reset:f,control:c,formState:s}=r,{fields:u}=Ee({name:"schedule",control:c}),d=F("schedule");function m(l){let y=l.schedule.filter(({checked:C})=>C).map(C=>({...C,hours:Ie(C)}));t(y),o(!1)}a(m,"handleSubmitWorkingHours");function g(){f(),o(!1)}return a(g,"handleCancel"),h("div",{className:"flex items-center justify-between",children:E(ye,{open:n,onOpenChange:o,children:[h(Xe,{asChild:!0,children:h(L,{variant:"link",className:"flex items-center p-0 RemoteFlows__WorkScheduleSelectionForm__Trigger",children:"Edit Schedule"})}),E(he,{className:"max-w-5xl max-h-[90vh] overflow-y-auto px-8 py-4 RemoteFlows__WorkScheduleSelectionForm__Content",children:[h(_e,{children:h(ve,{className:"RemoteFlows__WorkScheduleSelectionForm__Title",children:"Edit employee working hours"})}),h(He,{...r,children:E("form",{className:"space-y-4 RemoteFlows__WorkScheduleSelectionForm__Form",children:[E("div",{className:"rounded-lg",children:[h("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."}),E("div",{className:"grid grid-cols-12 gap-4 text-sm font-medium text-gray-500 uppercase tracking-wide RemoteFlows__WorkScheduleSelectionForm__Header",children:[h("div",{className:"col-span-2"}),h("div",{className:"col-span-3 text-center",children:"START"}),h("div",{className:"col-span-1 text-center"}),h("div",{className:"col-span-3 text-center",children:"END"}),h("div",{className:"col-span-2 text-center",children:"HOURS"})]}),h("div",{className:"RemoteFlows__WorkScheduleSelectionForm__Rows",children:u.map((l,y)=>{let C=d[y],x=Ie(C);return E(Fo.Fragment,{children:[E("div",{className:"grid grid-cols-12 gap-4 items-center py-2 RemoteFlows__WorkScheduleSelectionForm__Row-Hours",children:[h("div",{className:"col-span-2 flex items-center gap-3",children:h(re,{label:l.day,name:`schedule.${y}.checked`})}),h("div",{className:"col-span-3",children:h(H,{name:`schedule.${y}.start_time`,includeErrorMessage:!1})}),h("div",{className:"col-span-1 text-center text-gray-500",children:"to"}),h("div",{className:"col-span-3",children:h(H,{name:`schedule.${y}.end_time`,includeErrorMessage:!1})}),h("div",{className:"col-span-2 text-center text-gray-600",children:isNaN(x)?"-":`${x} hours`})]}),E("div",{className:"grid grid-cols-12 gap-4 items-center py-2 RemoteFlows__WorkScheduleSelectionForm__Row-Break",children:[h("div",{className:"col-span-2 text-gray-500",children:"Break"}),h("div",{className:"col-span-2",children:h(H,{name:`schedule.${y}.break_duration_minutes`,includeErrorMessage:!1})}),h("div",{className:"col-span-2 text-gray-500",children:"minutes"}),h("div",{className:"col-span-4"})]})]},l.id)})})]}),Object.keys(s.errors).length>0&&h("p",{className:"text-destructive text-sm mb-0",children:"Invalid time format (HH:mm)"}),E("div",{className:"flex gap-4 pt-4",children:[h(L,{type:"button",className:"reset-button",variant:"outline",onClick:g,children:"Cancel"}),h(L,{type:"button",className:"submit-button",onClick:p(m),children:"Save Schedule"})]})]})})]})]})})}a(ho,"WorkScheduleSelectionForm");function Rt(e){let{components:t}=S(),{setValue:n,control:o,watch:i}=v(),r=i(e.name),[p,F]=Pt(r),{workHoursSummary:f,breakSummary:c}=wt(p),s=Nt(p);fo(()=>{n(e.name,p)},[p,e.name,n]);function u(m){F(m)}a(u,"onSubmit");let d=e.component||t?.["work-schedule"];return d?h(b,{control:o,name:e.name,render:({field:m,fieldState:g})=>h(d,{field:{...m,onChange:a(l=>{m.onChange(l),e.onChange?.(l)},"onChange")},fieldState:g,fieldData:{...e,defaultFormattedValue:{workHoursSummary:f,breakSummary:c,totalWorkHours:s}}})}):E("div",{className:"flex flex-col gap-3 RemoteFlows__WorkScheduleField",children:[h("p",{className:"text-sm RemoteFlows__WorkScheduleField__Title",children:"Work hours"}),E("div",{className:"flex flex-col gap-1 RemoteFlows__WorkScheduleField__Summary",children:[h("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__WorkHours",dangerouslySetInnerHTML:{__html:f.join(", ")}}),h("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__Break",children:c.join()}),E("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__Total",children:["Total of ",h("span",{children:s})," hours per week"]}),h(ho,{defaultSchedule:p,onSubmit:u})]})]})}a(Rt,"WorkScheduleField");import{useState as _o}from"react";import{jsx as z,jsxs as vo}from"react/jsx-runtime";function Dt({label:e,name:t,options:n,defaultValue:o,description:i,onChange:r,component:p,...F}){let{control:f}=v(),{components:c}=S(),[s,u]=_o();return z(b,{defaultValue:o,control:f,name:t,render:({field:d,fieldState:m})=>{let g=p||c?.["multi-select"];if(g){let y={label:e,name:t,options:n,defaultValue:o,description:i,onChange:r,...F};return z(g,{field:{...d,onChange:a(C=>{d.onChange(C),r?.(C)},"onChange")},fieldState:m,fieldData:y})}let l=s||n.filter(y=>d.value.includes(y.value));return vo(w,{"data-field":t,className:`RemoteFlows__SelectField__Item__${t}`,children:[z(k,{className:"RemoteFlows__SelectField__Label",children:e}),z(P,{children:z(de,{options:n,selected:l,onChange:y=>{let C=y.map(({value:x})=>x);d.onChange(C),r?.(C),u(y)},...F})}),i&&z(R,{children:i}),m.error&&z(D,{})]})}})}a(Dt,"MultiSelectField");import{jsx as Co}from"react/jsx-runtime";var Tt=a(e=>Co(ce,{maxLength:15,...e}),"MoneyField");var q={checkbox:re,text:H,email:yt,money:Tt,select:it,"multi-select":Dt,radio:at,number:ce,file:nt,fieldset:be,"fieldset-flat":be,date:et,textarea:gt,countries:Ft,hidden:_t,"work-schedule":Rt};import{useEffect as xo}from"react";import{Fragment as So,jsx as Fe,jsxs as bo}from"react/jsx-runtime";function It({name:e,value:t,description:n,statement:o,label:i}){let{setValue:r}=v();return xo(()=>{r(e,t)},[]),Fe("div",{children:o?bo(So,{children:[Fe("p",{className:`text-sm RemoteFlows__ForcedValue__Title__${e}`,dangerouslySetInnerHTML:{__html:te(o?.title||i)}}),Fe("p",{className:`text-xs RemoteFlows__ForcedValue__Description__${e}`,dangerouslySetInnerHTML:{__html:te(o?.description||n)}})]}):Fe("p",{className:`text-xs RemoteFlows__ForcedValue__Description__${e}`,dangerouslySetInnerHTML:{__html:te(n)}})})}a(It,"ForcedValueField");import{Fragment as wo,jsx as G,jsxs as Mt}from"react/jsx-runtime";function No(e){return e.const!==void 0&&e.const===e.default&&e.inputType!=="checkbox"&&e.inputType!=="hidden"}a(No,"checkFieldHasForcedValue");var xs=a(({fields:e,fieldsets:t,fieldValues:n,components:o})=>{if(!e||e.length===0)return null;let i=t&&n?Me({fields:e,fieldsets:t,values:n}):e;return G(wo,{children:i.map(r=>{if(r.calculateDynamicProperties&&(r={...r,...r.calculateDynamicProperties(n,r)||{}}),r.isVisible===!1||r.deprecated)return null;if(No(r))return G(It,{name:r.name,description:r.description,value:r.const,statement:r.statement,label:r.label},r.name);if(r.Component){let{Component:F}=r;return G(F,{...r},r.name)}let p=q[r.type];return r.type==="select"&&r.multiple&&(p=q["multi-select"]),r.type==="fieldset"?G(p,{...r,components:o},r.name):r.type==="fieldset-flat"?G(p,{...r,components:o,isFlatFieldset:!0},r.name):p?Mt(ko,{children:[G(p,{...r,component:o&&o[r.type]}),r.statement?G(me,{...r.statement}):null,r.extra?r.extra:null]},r.name):Mt("p",{className:"error",children:["Field type ",r.type," not supported"]})})})},"JSONSchemaFormFields");export{xs as a};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as H}from"./chunk-NVJYAX22.js";import{a as fe,b as Oe,c as Be,d as Ae,e as Ve,f as Ue,g as Je,h as ze,i as Ge,j as qe,k as Ke,l as Ye,m as ye,n as Xe,o as he,p as _e,r as ve}from"./chunk-XI3AQ3RM.js";import{b as je}from"./chunk-G7WJUXZU.js";import{b as S}from"./chunk-3ZWDIEEM.js";import{a as ge,b as L}from"./chunk-CSK44J23.js";import{a as Z,b as ee,c as v,d as We,e as Ee,f as Le,g as He,h as b,i as w,j as k,k as P,l as R,m as D}from"./chunk-GAOBYAJE.js";import{e as Me,g as $e}from"./chunk-MXFDOIUA.js";import{a as _,e as te}from"./chunk-3LOVCTCN.js";import{a}from"./chunk-P37U34EQ.js";import{Fragment as ko}from"react";import{Fragment as Wt,jsx as O,jsxs as oe}from"react/jsx-runtime";function re({name:e,defaultValue:t,description:n,label:o,onChange:i,multiple:r,options:p,component:F,...f}){let{components:c}=S(),{control:s}=v(),u=a((d,m,g)=>{let l=g.value?[...g.value]:[];m?l.includes(d)||g.onChange([...l,d]):g.onChange(l.filter(y=>y!==d))},"handleCheckboxChange");return O(b,{control:s,name:e,defaultValue:t,render:({field:d,fieldState:m})=>{let g=F||c?.checkbox;if(g){let l={name:e,description:n,label:o,defaultValue:t,multiple:r,options:p,...f};return O(g,{field:{...d,onChange:a(y=>{if(r){let{checked:C,value:x}=y.target;u(x,C,d),i?.(C);return}d.onChange(y),i?.(y)},"onChange")},fieldState:m,fieldData:l})}return oe(w,{"data-field":e,className:_(`RemoteFlows__CheckBoxField__Item__${e}`),children:[O(P,{children:oe(Wt,{children:[p&&r?O(k,{children:o}):null,p&&r?p.map(l=>oe("div",{className:"flex space-x-2",children:[O(fe,{id:l.value,onCheckedChange:y=>{u(l.value,y===!0,d),i?.(y,l.value)},checked:d.value?.includes(l.value),className:"RemoteFlows__CheckBox__Input"}),O(k,{htmlFor:l.value,className:"mb-0 RemoteFlows__CheckBox__Label",children:l.label})]},l.value)):oe("div",{className:"flex space-x-2",children:[O(fe,{id:e,onCheckedChange:l=>{d.onChange(l),i?.(l)},checked:d.value,className:"RemoteFlows__CheckBox__Input"}),O(k,{htmlFor:e,className:"mb-0 RemoteFlows__CheckBox__Label",children:o})]})]})}),n&&O(R,{children:n}),m.error&&O(D,{})]})}})}a(re,"CheckBoxField");import{CalendarIcon as Ot}from"lucide-react";import{PopoverClose as Bt}from"@radix-ui/react-popover";import{ChevronLeft as Et,ChevronRight as Lt}from"lucide-react";import{DayPicker as Ht}from"react-day-picker";import{jsx as Ce}from"react/jsx-runtime";function Qe({className:e,classNames:t,showOutsideDays:n=!0,...o}){return Ce(Ht,{showOutsideDays:n,className:_("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:_(ge({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:_("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",o.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:_(ge({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",...t},components:{IconLeft:a(({className:i,...r})=>Ce(Et,{className:_("size-4",i),...r}),"IconLeft"),IconRight:a(({className:i,...r})=>Ce(Lt,{className:_("size-4",i),...r}),"IconRight")},...o})}a(Qe,"Calendar");import*as B from"@radix-ui/react-popover";import{jsx as ne}from"react/jsx-runtime";function ae({...e}){return ne(B.Root,{"data-slot":"popover",...e})}a(ae,"Popover");function se({...e}){return ne(B.Trigger,{"data-slot":"popover-trigger",...e})}a(se,"PopoverTrigger");function ie({className:e,align:t="center",sideOffset:n=4,...o}){return ne(B.Portal,{children:ne(B.Content,{"data-slot":"popover-content",align:t,sideOffset:n,className:_("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),...o})})}a(ie,"PopoverContent");import{format as Ze}from"date-fns";import{Fragment as At,jsx as I,jsxs as xe}from"react/jsx-runtime";function et({description:e,label:t,name:n,minDate:o,onChange:i,component:r,...p}){let{components:F}=S(),{control:f}=v(),c;return p.meta?.mot&&typeof p.meta.mot=="number"?c=$e(p.meta.mot):o&&(c=new Date(o)),I(b,{control:f,name:n,render:({field:s,fieldState:u})=>{let d=r||F?.date;if(d){let m={description:e,label:t,name:n,onChange:i,...c&&{minDate:c.toISOString()},...p};return I(d,{field:{...s,onChange:a(g=>{s.onChange(g),i?.(g)},"onChange")},fieldState:u,fieldData:m})}return xe(w,{"data-field":n,className:`flex flex-col RemoteFlows__DatePickerField__Item__${n}`,children:[I(k,{className:"RemoteFlows__DatePickerField__Label",children:t}),xe(ae,{children:[I(se,{asChild:!0,children:I(P,{children:I("div",{children:xe(L,{type:"button",variant:"outline",className:_("w-full pl-3 text-left font-normal",!s.value&&"text-muted-foreground"),"data-testid":`date-picker-button-${n}`,children:[s.value&&I(At,{children:Ze(s.value,"yyyy-MM-dd")}),I(Ot,{className:"ml-auto h-4 w-4 opacity-50"})]})})})}),I(ie,{className:"w-auto p-0 RemoteFlows__DatepickerField__PopoverContent",align:"start",children:I(Qe,{mode:"single",className:"RemoteFlows__DatepickerField__Calendar",selected:s.value?new Date(s.value):void 0,onSelect:m=>{s.onChange(m?Ze(m,"yyyy-MM-dd"):null),i?.(m)},defaultMonth:c,components:{DayContent:a(m=>I(Bt,{children:m.date.getDate()}),"DayContent")},...c&&{disabled:a(m=>m<c,"disabled")}})})]}),e?I(R,{children:e}):null,u.error&&I(D,{className:"RemoteFlows__DatePickerField__Error"})]})}})}a(et,"DatePickerField");import{AlertCircle as Vt}from"lucide-react";import{jsx as le,jsxs as Ut}from"react/jsx-runtime";function me({title:e,description:t,severity:n}){let{components:o}=S();if(o?.statement){let i=o?.statement;return le(i,{data:{title:e,description:t,severity:n}})}return Ut(Oe,{variant:"warning",children:[le(Vt,{className:"h-4 w-4"}),e&&le(Be,{children:e}),le(Ae,{children:t})]})}a(me,"Statement");import{Fragment as Jt,useEffect as zt,useRef as tt}from"react";import{jsx as Q,jsxs as Se}from"react/jsx-runtime";function be({label:e,name:t,fields:n,description:o,components:i,statement:r,isFlatFieldset:p,extra:F}){let{watch:f,trigger:c,formState:s}=v(),u=n.map(({name:l})=>`${t}.${l}`),d=f(u),m=tt(d),g=tt(null);return zt(()=>{let l=d,y=m.current,C=s.isSubmitted||s.submitCount>0,x=!1;for(let N=0;N<l.length;N++)if(l[N]!==void 0&&y[N]!==l[N]){x=!0;break}return x&&C&&(g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{c()},50)),m.current=[...l],()=>{g.current&&clearTimeout(g.current)}},[d,c,s.isSubmitted,s.submitCount]),Se("fieldset",{className:_("border-1 border-input p-4 rounded-xl",`RemoteFlows__FieldSetField__${t}`),children:[Q("legend",{className:"text-sm font-semibold px-2",children:e}),o?Q("div",{className:"mb-5 RemoteFlows__FieldSetField__Description",dangerouslySetInnerHTML:{__html:o}}):null,Se("div",{className:"grid gap-4",children:[n.map(l=>{l.calculateDynamicProperties&&(l={...l,...l.calculateDynamicProperties(d,l)||{}});let y=q[l.type];if(l.isVisible===!1||l.deprecated)return null;if(l.Component){let{Component:C}=l;return Q(C,{...l},l.name)}return l.type==="select"&&l.multiple&&(y=q["multi-select"]),Se(Jt,{children:[Q(y,{...l,name:`${p?l.name:`${t}.${l.name}`}`,component:i?.[l.type]}),l.extra?l.extra:null]},`${p?l.name:`${t}.${l.name}`}`)}),F||null,r?Q(me,{...r}):null]})]})}a(be,"FieldSetField");import{useState as Gt,useRef as qt}from"react";import{Upload as Kt,X as Yt}from"lucide-react";import{jsx as A,jsxs as ke}from"react/jsx-runtime";function ot({onChange:e,className:t,multiple:n}){let[o,i]=Gt([]),r=qt(null),p=a(c=>{c.preventDefault(),r.current?.click()},"handleClick"),F=a(c=>{if(c.target.files&&c.target.files.length>0){let s=Array.from(c.target.files);i(s),e(c)}},"handleChange"),f=a(c=>{i(s=>s.filter(u=>u!==c))},"onRemoveFile");return ke("div",{className:_("flex flex-col items-start gap-4",t),children:[A("input",{type:"file",ref:r,onChange:F,className:"hidden","aria-label":"File upload",multiple:n}),ke(L,{type:"button",onClick:p,className:"gap-2",children:[A(Kt,{className:"h-4 w-4"}),"Choose File"]}),o.length===0&&A("div",{className:"text-sm",children:n?A("span",{className:"font-medium",children:"No files selected. You can select multiple files"}):A("span",{className:"font-medium",children:"No file selected."})}),o.length>0&&o.map((c,s)=>ke("div",{className:"text-sm flex items-center gap-2",children:["Selected file: ",A("span",{className:"font-medium",children:c.name})," (",Math.round(c.size/1024)," KB)",A(L,{variant:"ghost",onClick:()=>f(c),children:A(Yt,{})})]},s))]})}a(ot,"FileUploader");import{jsx as V,jsxs as Xt}from"react/jsx-runtime";var jt=a(e=>new Promise((t,n)=>{let o=new FileReader;o.readAsDataURL(e),o.onload=()=>t(o.result),o.onerror=i=>n(i)}),"toBase64"),rt=a(async e=>{let t=e.target.files?Array.from(e.target.files):[];return await Promise.all(t.map(async o=>{let i=await jt(o);return{name:o.name,content:i.split(",")[1]}}))},"convertFilesToBase64");function nt({name:e,description:t,label:n,multiple:o,onChange:i,component:r,...p}){let{components:F}=S(),{control:f}=v();return V(b,{control:f,name:e,render:({field:c,fieldState:s})=>{let u=r||F?.file;if(u){let d={name:e,description:t,label:n,multiple:o,...p};return V(u,{field:{...c,value:null,onChange:a(async m=>{let g=await rt(m);c.onChange(g),i?.(g)},"onChange")},fieldState:s,fieldData:d})}return Xt(w,{"data-field":e,className:`RemoteFlows__FileUpload__Item__${e}`,children:[V(k,{className:"RemoteFlows__FileUpload__Label",children:n}),V(P,{children:V(ot,{onChange:async d=>{let m=await rt(d);c.onChange(m),i?.(m)},multiple:o,className:_("RemoteFlows__FileUpload__Input")})}),t&&V("div",{className:"flex items-center justify-between",children:V(R,{className:"RemoteFlows__FileUpload__Description",children:t})}),s.error&&V(D,{className:"RemoteFlows__FileUpload__Error"})]})}})}a(nt,"FileUploadField");import{jsx as Ne}from"react/jsx-runtime";function ce(e){let{components:t}=S(),{control:n}=v(),o=e.component||t?.number;return o?Ne(b,{control:n,name:e.name,render:({field:i,fieldState:r})=>Ne(o,{field:{...i,onChange:a(p=>{i.onChange(p),e.onChange?.(p)},"onChange")},fieldState:r,fieldData:e})}):Ne(H,{...e,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$"})}a(ce,"NumberField");import{Fragment as Qt}from"react";import{jsx as $,jsxs as we}from"react/jsx-runtime";function at({name:e,defaultValue:t,description:n,label:o,options:i,onChange:r,component:p,...F}){let{components:f}=S(),{control:c}=v();return $(b,{control:c,name:e,defaultValue:t,render:({field:s,fieldState:u})=>{let d=p||f?.radio;if(d){let m={name:e,defaultValue:t,description:n,label:o,options:i,...F};return $(d,{field:{...s,onChange:a(g=>{s.onChange(g),r?.(g)},"onChange")},fieldState:u,fieldData:m})}return we(w,{className:_("space-y-3",`RemoteFlows__RadioGroupField__Item__${e}`),"data-field":e,children:[$(k,{children:o}),$(P,{children:$(Ve,{"aria-label":o||e,onValueChange:m=>{s.onChange(m),r?.(m)},value:s.value,className:"flex flex-col space-y-3",children:i?.map(m=>$(Qt,{children:we(w,{"data-field":e,className:"flex items-start space-x-3 space-y-0 gap-0 RemoteFlows__RadioField__Item",children:[$(P,{children:$(Ue,{value:m.value,className:"RemoteFlows__RadioField__Input",disabled:m.disabled})}),we("div",{children:[$(k,{className:"font-normal mb-0 RemoteFlows__RadioField__Label",children:m.label}),m.description&&$(R,{className:"mt-2",children:m.description})]})]})},m.value))})}),n&&$(R,{children:n}),u.error&&$(D,{})]})}})}a(at,"RadioGroupField");import{jsx as M,jsxs as st}from"react/jsx-runtime";function it({label:e,name:t,options:n,defaultValue:o,description:i,onChange:r,component:p,...F}){let{control:f}=v(),{components:c}=S();return M(b,{defaultValue:o,control:f,name:t,render:({field:s,fieldState:u})=>{let d=p||c?.select;if(d){let m={label:e,name:t,options:n,defaultValue:o,description:i,onChange:r,...F};return M(d,{field:{...s,onChange:a(g=>{let l=F.jsonType==="number"?Number(g):g;s.onChange(l),r?.(l)},"onChange")},fieldState:u,fieldData:m})}return st(w,{"data-field":t,className:`RemoteFlows__SelectField__Item__${t}`,children:[M(k,{className:"RemoteFlows__SelectField__Label",children:e}),M(P,{children:M("div",{className:"relative",children:st(Je,{value:s.value||"",onValueChange:m=>{let g=F.jsonType==="number"?Number(m):m;s.onChange(g),r?.(g)},children:[M(qe,{className:"RemoteFlows__SelectField__Trigger","aria-invalid":!!u.error,"aria-label":e,children:M("span",{className:"absolute",children:M(Ge,{placeholder:e})})}),M(Ke,{className:"RemoteFlows__SelectField__Content",children:M(ze,{className:"RemoteFlows__SelectField__Group",children:n.map(m=>M(Ye,{value:m.value,className:"RemoteFlows__SelectField__SelectItem",children:m.label},m.value))})})]})})}),i&&M(R,{children:i}),u.error&&M(D,{})]})}})}a(it,"SelectField");import{useState as no}from"react";import{Fragment as Zt,useState as eo}from"react";import{Check as to,ChevronDownIcon as oo,X as ro}from"lucide-react";import{Command as K}from"cmdk";import{SearchIcon as Fn}from"lucide-react";import{jsx as Y,jsxs as hn}from"react/jsx-runtime";function lt({className:e,...t}){return Y(K,{"data-slot":"command",className:_("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}a(lt,"Command");function mt({className:e,...t}){return Y(K.List,{"data-slot":"command-list",className:_("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}a(mt,"CommandList");function ct({...e}){return Y(K.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}a(ct,"CommandEmpty");function dt({className:e,...t}){return Y(K.Group,{"data-slot":"command-group",className:_("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),...t})}a(dt,"CommandGroup");function pt({className:e,...t}){return Y(K.Separator,{"data-slot":"command-separator",className:_("bg-border -mx-1 h-px",e),...t})}a(pt,"CommandSeparator");function ut({className:e,...t}){return Y(K.Item,{"data-slot":"command-item",className:_("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),...t})}a(ut,"CommandItem");import{jsx as W,jsxs as j}from"react/jsx-runtime";function de({options:e,selected:t,onChange:n,placeholder:o,...i}){let[r,p]=eo(!1),F=a(s=>{n(t.filter(u=>u.value!==s.value))},"handleUnselect"),f=e.some(s=>s.category),c=e.reduce((s,u)=>{let d=u.category||"Uncategorized";return s[d]||(s[d]=[]),s[d].push(u),s},{});return j(ae,{open:r,onOpenChange:p,...i,children:[W(se,{children:j(L,{variant:"outline",role:"combobox","aria-expanded":r,className:"w-full justify-between font-normal",type:"button",children:[W("div",{className:"flex gap-1 flex-wrap overflow-x-auto max-h-[2.5rem] items-center",children:t.length>0?t.map(s=>j(je,{variant:"secondary",className:"mr-1 mb-1",children:[s.label,W("div",{role:"button",tabIndex:0,"aria-label":`remove ${s.label}`,className:"ml-1 ring-offset-background rounded-full outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 cursor-pointer",onKeyDown:u=>{u.key==="Enter"&&F(s)},onMouseDown:u=>{u.preventDefault(),u.stopPropagation()},onClick:()=>F(s),children:W(ro,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},s.label)):W("span",{className:"text-foreground",children:o})}),W(oo,{className:"size-4"})]})}),W(ie,{align:"start",className:"w-full p-0",children:W(lt,{children:j(mt,{children:[W(ct,{children:"No item found."}),Object.entries(c).map(([s,u],d)=>j(Zt,{children:[d>0&&W(pt,{}),W(dt,{heading:f?s:void 0,children:u.map(m=>{let g=t.some(l=>l.value===m.value);return j(ut,{onSelect:()=>{n(g?t.filter(l=>l.value!==m.value):[...t,m])},children:[W(to,{className:_("mr-2 h-4 w-4",g?"opacity-100":"opacity-0")}),m.label]},m.label)})})]},s))]})})})]})}a(de,"MultiSelect");import{jsx as U,jsxs as ao}from"react/jsx-runtime";function Ft({label:e,name:t,options:n,defaultValue:o,description:i,onChange:r,$meta:p,component:F,...f}){let{control:c}=v(),{components:s}=S(),[u,d]=no([]);return U(b,{defaultValue:o,control:c,name:t,render:({field:m,fieldState:g})=>{let l=F||s?.countries;if(l){let x={label:e,name:t,options:n,defaultValue:o,description:i,onChange:r,$meta:p,...f};return U(l,{field:{...m,onChange:a(N=>{m.onChange(N),r?.(N)},"onChange")},fieldState:g,fieldData:x})}let y=[...Object.entries(p?.regions||{}).map(([x,N])=>({value:N,label:x,category:"Regions"})),...Object.entries(p?.subregions||{}).map(([x,N])=>({value:N,label:x,category:"Subregions"})),...n.map(x=>({...x,value:x.value,label:x.label,category:"Countries"}))],C=a(x=>{let N=x.map(({value:$t})=>$t);m.onChange(N),r?.(N),d(x)},"handleChange");return ao(w,{"data-field":t,className:`RemoteFlows__CountryField__Item__${t}`,children:[U(k,{className:"RemoteFlows__CountryField__Label",children:e}),U(P,{children:U(de,{options:y,selected:u,onChange:C,...f})}),i&&U(R,{children:i}),g.error&&U(D,{})]})}})}a(Ft,"CountryField");import*as ft from"react";import{jsx as so}from"react/jsx-runtime";var Pe=ft.forwardRef(({className:e,...t},n)=>so("textarea",{className:_("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:n,...t}));Pe.displayName="Textarea";import{jsx as J,jsxs as Re}from"react/jsx-runtime";function gt({name:e,description:t,label:n,onChange:o,maxLength:i,component:r,...p}){let{components:F}=S(),{control:f}=v();return J(b,{control:f,name:e,render:({field:c,fieldState:s})=>{let u=r||F?.textarea;if(u){let m={name:e,description:t,label:n,maxLength:i,...p};return J(u,{field:{...c,onChange:a(g=>{c.onChange(g),o?.(g)},"onChange")},fieldState:s,fieldData:m})}let d=c.value?.length??0;return Re(w,{"data-field":e,className:`RemoteFlows__TextArea__Item__${e}`,children:[J(k,{className:"RemoteFlows__TextArea__Label",children:n}),J(P,{children:J(Pe,{...c,value:c.value??"",onChange:m=>{c.onChange(m),o?.(m)},className:_(s.error&&"border-red-500 focus-visible:ring-red-500","RemoteFlows__TextArea__Input"),placeholder:n})}),(t||i)&&Re("div",{className:"flex items-center justify-between",children:[t&&J(R,{className:"RemoteFlows__TextArea__Description",children:t}),i&&Re("span",{className:"text-sm ml-auto RemoteFlows__TextArea__MaxLength",children:[d,"/",i]})]}),s.error&&J(D,{className:"RemoteFlows__TextArea__Error"})]})}})}a(gt,"TextAreaField");import{jsx as De}from"react/jsx-runtime";function yt(e){let{components:t}=S(),{control:n}=v(),o=e.component||t?.email;return o?De(b,{control:n,name:e.name,render:({field:i,fieldState:r})=>De(o,{field:{...i,onChange:a(p=>{i.onChange(p),e.onChange?.(p)},"onChange")},fieldState:r,fieldData:e})}):De(H,{...e,type:"email"})}a(yt,"EmailField");import{jsx as ht}from"react/jsx-runtime";function _t(e){let{control:t}=v();return ht(b,{control:t,name:e.name,render:({field:n})=>ht("input",{...n,type:"hidden"})})}a(_t,"HiddenField");import Fo,{useEffect as fo,useState as Pt}from"react";var vt=a((e,t,n)=>{if(e&&"reportValidity"in e){let o=Z(n,t);e.setCustomValidity(o&&o.message||""),e.reportValidity()}},"r"),Te=a((e,t)=>{for(let n in t.fields){let o=t.fields[n];o&&o.ref&&"reportValidity"in o.ref?vt(o.ref,n,e):o&&o.refs&&o.refs.forEach(i=>vt(i,n,e))}},"o"),xt=a((e,t)=>{t.shouldUseNativeValidation&&Te(e,t);let n={};for(let o in e){let i=Z(t.fields,o),r=Object.assign(e[o]||{},{ref:i&&i.ref});if(io(t.names||Object.keys(e),o)){let p=Object.assign({},Z(n,o));ee(p,"root",r),ee(n,o,p)}else ee(n,o,r)}return n},"s"),io=a((e,t)=>{let n=Ct(t);return e.some(o=>Ct(o).match(`^${n}\\.\\d+`))},"i");function Ct(e){return e.replace(/\]|\[/g,"")}a(Ct,"n");function St(e,t,n){return t===void 0&&(t={}),n===void 0&&(n={}),function(o,i,r){try{return Promise.resolve(function(p,F){try{var f=(t.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[n.mode==="sync"?"validateSync":"validate"](o,Object.assign({abortEarly:!1},t,{context:i}))).then(function(c){return r.shouldUseNativeValidation&&Te({},r),{values:n.raw?Object.assign({},o):c,errors:{}}}))}catch(c){return F(c)}return f&&f.then?f.then(void 0,F):f}(0,function(p){if(!p.inner)throw p;return{values:{},errors:xt((F=p,f=!r.shouldUseNativeValidation&&r.criteriaMode==="all",(F.inner||[]).reduce(function(c,s){if(c[s.path]||(c[s.path]={message:s.message,type:s.type}),f){var u=c[s.path].types,d=u&&u[s.type];c[s.path]=We(s.path,f,c,s.type,d?[].concat(d,s.message):s.message)}return c},{})),r)};var F,f}))}catch(p){return Promise.reject(p)}}}a(St,"o");import*as T from"yup";import bt from"lodash.groupby";import X from"lodash.capitalize";var kt=60,pe=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"];function lo(e){if(e<60)return`${e}m`;let t=Math.floor(e/kt),n=e%kt;return n>0?`${t}h${n}m`:`${t}h`}a(lo,"convertBreakDurationToHours");function Nt(e){let t=e.reduce((n,o)=>o.hours+n,0);return Number(t.toFixed(2))}a(Nt,"calculateTotalWorkHours");function mo(e,t){let n=t.map(({day:r})=>r.toLowerCase()),o=n.indexOf(e),i=null;for(;o<n.length&&!i;){let r=n[o],p=n[o+1],F=pe.indexOf(r)+1;pe[F]===p||(i=r),o+=1}return i}a(mo,"findLastConsecutiveDay");function co(e){return e.start_time&&e.end_time&&(typeof e.hours=="number"?e.hours:Number.parseInt(e.hours))>0}a(co,"shouldSummarizeSchedule");function po(e){return Number.parseInt(e.break_duration_minutes)>0}a(po,"shouldSummarizeBreaks");function wt(e){let t=e.filter(co),n=bt(t,F=>`${F.start_time}|${F.end_time}`),o=e.filter(po),i=bt(o,"break_duration_minutes"),r=Object.keys(n).map(F=>{let f=n[F],c=f[0].day,[s,u]=F.split("|"),d=`from <span>${s.replace(":","h")}</span> to <span>${u.replace(":","h")}</span>`,m=mo(c,f),l=(m?f.findIndex(y=>y.day===m):-1)===f.length-1;return f.length===1?`${X(c)}, ${d}`:!l||!m?f.reduce((y,C,x)=>{let N=X(C.day);return x===f.length-1?`${y}and ${N}, ${d}`:`${y}<span>${N}</span>, `},""):`<span>${X(c)}</span> to <span>${X(m)}</span>, ${d}`}),p=Object.keys(i).reverse().map((F,f)=>{let c=f===0,s=i[F],u=lo(parseInt(F,10));if(Object.keys(i).length===1)return`With ${u} daily breaks`;if(s.length===1){let d=`${u} break on ${X(s[0].day)}.`;return c?`With ${d}`:d}return s.reduce((d,m,g)=>{let l=X(m.day);return g===0?`${d} ${l}`:g===s.length-1?`${d}, and ${l}.`:`${d}, ${l}`},c?`With ${u} break on`:`${u} break on`)});return{workHoursSummary:r,breakSummary:p}}a(wt,"buildWorkScheduleSummary");function Ie(e){let{checked:t,start_time:n,end_time:o,break_duration_minutes:i}=e;if(!t)return 0;let[r,p]=n.split(":").map(Number),[F,f]=o.split(":").map(Number),c=r*60+p,d=(F*60+f-c-Number.parseInt(i||"0"))/60;return d===Math.floor(d)?d:Number(d.toFixed(2))}a(Ie,"calculateHours");var uo={monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat",sunday:"Sun"};function ue(e){return uo[e]}a(ue,"getShortWeekday");import{jsx as h,jsxs as E}from"react/jsx-runtime";var go=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:a(e=>e.required("Required"),"then"),otherwise:a(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:a(e=>e.required("Required"),"then"),otherwise:a(e=>e.optional().nullable(),"otherwise")}),hours:T.number().default(0),break_duration_minutes:T.string().default("0")}),yo=T.object({schedule:T.array(go)});function ho({defaultSchedule:e,onSubmit:t}){let[n,o]=Pt(!1),i=pe.map(l=>{let y=e.find(C=>C.day.toLowerCase()===ue(l).toLowerCase()||C.day.toLowerCase()===l.toLowerCase());return y?{...y,day:ue(l),checked:!0}:{...e[0],checked:!1,day:ue(l)}}),r=Le({defaultValues:{schedule:i},resolver:St(yo)}),{handleSubmit:p,watch:F,reset:f,control:c,formState:s}=r,{fields:u}=Ee({name:"schedule",control:c}),d=F("schedule");function m(l){let y=l.schedule.filter(({checked:C})=>C).map(C=>({...C,hours:Ie(C)}));t(y),o(!1)}a(m,"handleSubmitWorkingHours");function g(){f(),o(!1)}return a(g,"handleCancel"),h("div",{className:"flex items-center justify-between",children:E(ye,{open:n,onOpenChange:o,children:[h(Xe,{asChild:!0,children:h(L,{variant:"link",className:"flex items-center p-0 RemoteFlows__WorkScheduleSelectionForm__Trigger",children:"Edit Schedule"})}),E(he,{className:"max-w-5xl max-h-[90vh] overflow-y-auto px-8 py-4 RemoteFlows__WorkScheduleSelectionForm__Content",children:[h(_e,{children:h(ve,{className:"RemoteFlows__WorkScheduleSelectionForm__Title",children:"Edit employee working hours"})}),h(He,{...r,children:E("form",{className:"space-y-4 RemoteFlows__WorkScheduleSelectionForm__Form",children:[E("div",{className:"rounded-lg",children:[h("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."}),E("div",{className:"grid grid-cols-12 gap-4 text-sm font-medium text-gray-500 uppercase tracking-wide RemoteFlows__WorkScheduleSelectionForm__Header",children:[h("div",{className:"col-span-2"}),h("div",{className:"col-span-3 text-center",children:"START"}),h("div",{className:"col-span-1 text-center"}),h("div",{className:"col-span-3 text-center",children:"END"}),h("div",{className:"col-span-2 text-center",children:"HOURS"})]}),h("div",{className:"RemoteFlows__WorkScheduleSelectionForm__Rows",children:u.map((l,y)=>{let C=d[y],x=Ie(C);return E(Fo.Fragment,{children:[E("div",{className:"grid grid-cols-12 gap-4 items-center py-2 RemoteFlows__WorkScheduleSelectionForm__Row-Hours",children:[h("div",{className:"col-span-2 flex items-center gap-3",children:h(re,{label:l.day,name:`schedule.${y}.checked`})}),h("div",{className:"col-span-3",children:h(H,{name:`schedule.${y}.start_time`,includeErrorMessage:!1})}),h("div",{className:"col-span-1 text-center text-gray-500",children:"to"}),h("div",{className:"col-span-3",children:h(H,{name:`schedule.${y}.end_time`,includeErrorMessage:!1})}),h("div",{className:"col-span-2 text-center text-gray-600",children:isNaN(x)?"-":`${x} hours`})]}),E("div",{className:"grid grid-cols-12 gap-4 items-center py-2 RemoteFlows__WorkScheduleSelectionForm__Row-Break",children:[h("div",{className:"col-span-2 text-gray-500",children:"Break"}),h("div",{className:"col-span-2",children:h(H,{name:`schedule.${y}.break_duration_minutes`,includeErrorMessage:!1})}),h("div",{className:"col-span-2 text-gray-500",children:"minutes"}),h("div",{className:"col-span-4"})]})]},l.id)})})]}),Object.keys(s.errors).length>0&&h("p",{className:"text-destructive text-sm mb-0",children:"Invalid time format (HH:mm)"}),E("div",{className:"flex gap-4 pt-4",children:[h(L,{type:"button",className:"reset-button",variant:"outline",onClick:g,children:"Cancel"}),h(L,{type:"button",className:"submit-button",onClick:p(m),children:"Save Schedule"})]})]})})]})]})})}a(ho,"WorkScheduleSelectionForm");function Rt(e){let{components:t}=S(),{setValue:n,control:o,watch:i}=v(),r=i(e.name),[p,F]=Pt(r),{workHoursSummary:f,breakSummary:c}=wt(p),s=Nt(p);fo(()=>{n(e.name,p)},[p,e.name,n]);function u(m){F(m)}a(u,"onSubmit");let d=e.component||t?.["work-schedule"];return d?h(b,{control:o,name:e.name,render:({field:m,fieldState:g})=>h(d,{field:{...m,onChange:a(l=>{m.onChange(l),e.onChange?.(l)},"onChange")},fieldState:g,fieldData:{...e,defaultFormattedValue:{workHoursSummary:f,breakSummary:c,totalWorkHours:s}}})}):E("div",{className:"flex flex-col gap-3 RemoteFlows__WorkScheduleField",children:[h("p",{className:"text-sm RemoteFlows__WorkScheduleField__Title",children:"Work hours"}),E("div",{className:"flex flex-col gap-1 RemoteFlows__WorkScheduleField__Summary",children:[h("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__WorkHours",dangerouslySetInnerHTML:{__html:f.join(", ")}}),h("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__Break",children:c.join()}),E("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__Total",children:["Total of ",h("span",{children:s})," hours per week"]}),h(ho,{defaultSchedule:p,onSubmit:u})]})]})}a(Rt,"WorkScheduleField");import{useState as _o}from"react";import{jsx as z,jsxs as vo}from"react/jsx-runtime";function Dt({label:e,name:t,options:n,defaultValue:o,description:i,onChange:r,component:p,...F}){let{control:f}=v(),{components:c}=S(),[s,u]=_o();return z(b,{defaultValue:o,control:f,name:t,render:({field:d,fieldState:m})=>{let g=p||c?.["multi-select"];if(g){let y={label:e,name:t,options:n,defaultValue:o,description:i,onChange:r,...F};return z(g,{field:{...d,onChange:a(C=>{d.onChange(C),r?.(C)},"onChange")},fieldState:m,fieldData:y})}let l=s||n.filter(y=>d.value.includes(y.value));return vo(w,{"data-field":t,className:`RemoteFlows__SelectField__Item__${t}`,children:[z(k,{className:"RemoteFlows__SelectField__Label",children:e}),z(P,{children:z(de,{options:n,selected:l,onChange:y=>{let C=y.map(({value:x})=>x);d.onChange(C),r?.(C),u(y)},...F})}),i&&z(R,{children:i}),m.error&&z(D,{})]})}})}a(Dt,"MultiSelectField");import{jsx as Co}from"react/jsx-runtime";var Tt=a(e=>Co(ce,{maxLength:15,...e}),"MoneyField");var q={checkbox:re,text:H,email:yt,money:Tt,select:it,"multi-select":Dt,radio:at,number:ce,file:nt,fieldset:be,"fieldset-flat":be,date:et,textarea:gt,countries:Ft,hidden:_t,"work-schedule":Rt};import{useEffect as xo}from"react";import{Fragment as So,jsx as Fe,jsxs as bo}from"react/jsx-runtime";function It({name:e,value:t,description:n,statement:o,label:i}){let{setValue:r}=v();return xo(()=>{r(e,t)},[]),Fe("div",{children:o?bo(So,{children:[Fe("p",{className:`text-sm RemoteFlows__ForcedValue__Title__${e}`,dangerouslySetInnerHTML:{__html:te(o?.title||i)}}),Fe("p",{className:`text-xs RemoteFlows__ForcedValue__Description__${e}`,dangerouslySetInnerHTML:{__html:te(o?.description||n)}})]}):Fe("p",{className:`text-xs RemoteFlows__ForcedValue__Description__${e}`,dangerouslySetInnerHTML:{__html:te(n)}})})}a(It,"ForcedValueField");import{Fragment as wo,jsx as G,jsxs as Mt}from"react/jsx-runtime";function No(e){return e.const!==void 0&&e.const===e.default&&e.inputType!=="checkbox"&&e.inputType!=="hidden"}a(No,"checkFieldHasForcedValue");var xs=a(({fields:e,fieldsets:t,fieldValues:n,components:o})=>{if(!e||e.length===0)return null;let i=t&&n?Me({fields:e,fieldsets:t,values:n}):e;return G(wo,{children:i.map(r=>{if(r.calculateDynamicProperties&&(r={...r,...r.calculateDynamicProperties(n,r)||{}}),r.isVisible===!1||r.deprecated)return null;if(No(r))return G(It,{name:r.name,description:r.description,value:r.const,statement:r.statement,label:r.label},r.name);if(r.Component){let{Component:F}=r;return G(F,{...r},r.name)}let p=q[r.type];return r.type==="select"&&r.multiple&&(p=q["multi-select"]),r.type==="fieldset"?G(p,{...r,components:o},r.name):r.type==="fieldset-flat"?G(p,{...r,components:o,isFlatFieldset:!0},r.name):p?Mt(ko,{children:[G(p,{...r,component:o&&o[r.type]}),r.statement?G(me,{...r.statement}):null,r.extra?r.extra:null]},r.name):Mt("p",{className:"error",children:["Field type ",r.type," not supported"]})})})},"JSONSchemaFormFields");export{xs as a};
|
|
2
|
+
//# sourceMappingURL=chunk-AVA4MEFP.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as r}from"./chunk-3LOVCTCN.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as t,jsxs as e}from"react/jsx-runtime";function n({totalCost:a,currency:s}){return t("div",{className:"pt-2 mt-4 border-t-2 border-gray-200",children:e("div",{className:"flex justify-between items-center",children:[t("h3",{className:"font-bold text-primary-foreground-800",children:"Total Cost"}),t("span",{className:"font-bold text-xl",children:r(a,s)})]})})}o(n,"CostCalculatorTotalCost");export{n as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BDZEPXIS.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as g}from"./chunk-PGWKJ6FK.js";import{d as f,e as w}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as g}from"./chunk-PGWKJ6FK.js";import{d as f,e as w}from"./chunk-47VYBPE2.js";import{a as m}from"./chunk-QW4JPW6J.js";import{b as y}from"./chunk-3ZWDIEEM.js";import{b as E}from"./chunk-CSK44J23.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as R}from"react/jsx-runtime";function A({onSubmit:S,onSuccess:d,onError:o,render:u,...r}){let{components:I}=y(),{onboardingBag:t,setCreditScore:c}=g(),n=f(),i=w(),{mutateAsync:b}=m(n),{mutateAsync:_}=m(i),l=a(async()=>{try{if(await S?.(),t.creditRiskStatus==="deposit_required"&&t.employmentId&&t.employment?.status&&!t.isEmploymentReadOnly){let e=await _({employment_slug:t.employmentId});if(e.data){await d?.({data:e.data,employmentStatus:"created_awaiting_reserve"}),c?.(s=>({...s,showReserveInvoice:!0})),t.refetchEmployment();return}e.error&&o?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}else if(t.employmentId){let e=await b({employment_id:t.employmentId});if(e.data){await d?.({data:e.data,employmentStatus:"invited"}),c?.(s=>({...s,showInviteSuccessful:!0})),t.refetchEmployment();return}e.error&&o?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}}catch(e){o?.({error:e,rawError:e,fieldErrors:[]})}},"handleSubmit"),p=t.creditRiskStatus==="deposit_required"&&t.employment?.status&&!t.isEmploymentReadOnly,v=I?.button;return v?R(v,{...r,disabled:n.isPending||i.isPending||r.disabled,onClick:e=>{l(),r.onClick?.(e)},children:u({employmentStatus:p?"created_awaiting_reserve":"invited"})}):R(E,{...r,disabled:n.isPending||i.isPending||r.disabled,onClick:()=>{l()},children:u({employmentStatus:p?"created_awaiting_reserve":"invited"})})}a(A,"OnboardingInvite");export{A as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BY5S6EQJ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-3LOVCTCN.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as o}from"react/jsx-runtime";function a({className:i,type:r,...n}){return o("input",{type:r,"data-slot":"input",className:t("shadow-xs border-input file:text-foreground placeholder:text-muted-foreground flex h-9 w-full min-w-0 rounded-xl border bg-transparent px-4 py-7 text-sm transition-[color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-focused","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",i),...n})}e(a,"Input");export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-CHSULXMN.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-3LOVCTCN.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-CSK44J23.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e={data:{version:7,schema:{additionalProperties:!1,properties:{country:{title:"Country",description:"",type:"string",oneOf:[],"x-jsf-presentation":{inputType:"select"}},region:{title:"Region",description:"",type:"string",oneOf:[],"x-jsf-presentation":{inputType:"select"}},currency:{title:"Currency",description:"",type:"string",oneOf:[],"x-jsf-presentation":{inputType:"select"}},salary:{description:"",title:"Salary",type:"integer","x-jsf-presentation":{inputType:"money"},"x-jsf-errorMessage":{required:"Salary is required"}}},required:["country","currency","salary"],type:"object","x-jsf-order":["country","region","currency","salary"]}}};export{e as a};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
var e={data:{version:7,schema:{additionalProperties:!1,properties:{country:{title:"Country",description:"",type:"string",oneOf:[],"x-jsf-presentation":{inputType:"select"}},region:{title:"Region",description:"",type:"string",oneOf:[],"x-jsf-presentation":{inputType:"select"}},currency:{title:"Currency",description:"",type:"string",oneOf:[],"x-jsf-presentation":{inputType:"select"}},salary:{description:"",title:"Salary",type:"integer","x-jsf-presentation":{inputType:"money"},"x-jsf-errorMessage":{required:"Salary is required"}},salary_converted:{description:"Whether the salary is expressed in regional or employer currency",title:"Salary in employer currency",type:"boolean","x-jsf-presentation":{inputType:"hidden"}}},required:["country","currency","salary","salary_converted"],type:"object","x-jsf-order":["country","region","currency","salary"]}}};export{e as a};
|
|
2
|
+
//# sourceMappingURL=chunk-D25W2VVQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/flows/CostCalculator/jsonSchema.ts"],"sourcesContent":["export const jsonSchema = {\n data: {\n version: 7,\n schema: {\n additionalProperties: false,\n properties: {\n country: {\n title: 'Country',\n description: '',\n type: 'string',\n oneOf: [],\n 'x-jsf-presentation': {\n inputType: 'select',\n },\n },\n region: {\n title: 'Region',\n description: '',\n type: 'string',\n oneOf: [],\n 'x-jsf-presentation': {\n inputType: 'select',\n },\n },\n currency: {\n title: 'Currency',\n description: '',\n type: 'string',\n oneOf: [],\n 'x-jsf-presentation': {\n inputType: 'select',\n },\n },\n salary: {\n description: '',\n title: 'Salary',\n type: 'integer',\n 'x-jsf-presentation': {\n inputType: 'money',\n },\n 'x-jsf-errorMessage': {\n required: 'Salary is required',\n },\n },\n salary_converted: {\n description:\n 'Whether the salary is expressed in regional or employer currency',\n title: 'Salary in employer currency',\n type: 'boolean',\n 'x-jsf-presentation': {\n inputType: 'hidden',\n },\n },\n },\n required: ['country', 'currency', 'salary', 'salary_converted'],\n type: 'object',\n 'x-jsf-order': ['country', 'region', 'currency', 'salary'],\n },\n },\n};\n"],"mappings":"AAAO,IAAMA,EAAa,CACxB,KAAM,CACJ,QAAS,EACT,OAAQ,CACN,qBAAsB,GACtB,WAAY,CACV,QAAS,CACP,MAAO,UACP,YAAa,GACb,KAAM,SACN,MAAO,CAAC,EACR,qBAAsB,CACpB,UAAW,QACb,CACF,EACA,OAAQ,CACN,MAAO,SACP,YAAa,GACb,KAAM,SACN,MAAO,CAAC,EACR,qBAAsB,CACpB,UAAW,QACb,CACF,EACA,SAAU,CACR,MAAO,WACP,YAAa,GACb,KAAM,SACN,MAAO,CAAC,EACR,qBAAsB,CACpB,UAAW,QACb,CACF,EACA,OAAQ,CACN,YAAa,GACb,MAAO,SACP,KAAM,UACN,qBAAsB,CACpB,UAAW,OACb,EACA,qBAAsB,CACpB,SAAU,oBACZ,CACF,EACA,iBAAkB,CAChB,YACE,mEACF,MAAO,8BACP,KAAM,UACN,qBAAsB,CACpB,UAAW,QACb,CACF,CACF,EACA,SAAU,CAAC,UAAW,WAAY,SAAU,kBAAkB,EAC9D,KAAM,SACN,cAAe,CAAC,UAAW,SAAU,WAAY,QAAQ,CAC3D,CACF,CACF","names":["jsonSchema"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as v}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as v}from"./chunk-GGBEM452.js";import{a as A}from"./chunk-QW4JPW6J.js";import{a as l,b as _}from"./chunk-AYJ63EZH.js";import{c as E,n as w,x as b}from"./chunk-EGQJ7UBR.js";import{a as M}from"./chunk-PJBAQZ6G.js";import{d}from"./chunk-3ZWDIEEM.js";import{a as j,c as S}from"./chunk-MXFDOIUA.js";import{a as t}from"./chunk-P37U34EQ.js";import{createHeadlessForm as I,modify as R}from"@remoteoss/json-schema-form";import{useMutation as Q,useQuery as B}from"@tanstack/react-query";var J=t(({countryCode:a,employment:r,fieldValues:n,options:e})=>{let{client:u}=d(),m=e?.jsonSchemaVersion?.contract_amendments?{json_schema_version:e.jsonSchemaVersion.contract_amendments}:{};return B({queryKey:["contract-amendment-schema"],retry:!1,queryFn:t(async()=>{let o=await E({client:u,headers:{Authorization:""},query:{employment_id:r?.data?.employment?.id,country_code:a,...m}});if(o.error||!o.data)throw new Error("Failed to fetch contract amendment schema");return o},"queryFn"),enabled:!!r,select:t(({data:o})=>{let c=o?.data||{};if(e&&e.jsfModify){let{schema:f}=R(c,e.jsfModify);c=f}let s={...n,annual_gross_salary:n?.annual_gross_salary?j(n?.annual_gross_salary):void 0},y=Object.keys(s).length>0;return I(c,{initialValues:y?s:_(r)})},"select")})},"useContractAmendmentSchemaQuery"),K=t(a=>{let{client:r}=d(),n=a?.jsonSchemaVersion?.contract_amendments?{json_schema_version:a.jsonSchemaVersion.contract_amendments}:{};return Q({mutationFn:t(e=>w({client:r,headers:{Authorization:""},body:e,query:{...n}}),"mutationFn")})},"useCreateContractAmendmentMutation"),U=t(a=>{let{client:r}=d(),n=a?.jsonSchemaVersion?.contract_amendments?{json_schema_version:a.jsonSchemaVersion.contract_amendments}:{};return Q({mutationFn:t(e=>b({client:r,headers:{Authorization:""},body:e,query:{...n}}),"mutationFn")})},"useAutomatableContractAmendmentMutation"),ae=t(({employmentId:a,countryCode:r,options:n})=>{let{fieldValues:e,setFieldValues:u,stepState:m,nextStep:o,previousStep:c}=M(l),{data:s,isLoading:y,isError:V,error:f}=v({employmentId:a}),{data:i,isLoading:q,isError:L,error:T}=J({employment:s,countryCode:r,fieldValues:{...m.values?.[m.currentStep.name],...e},options:n}),k=_(s,i?.fields),F=K(n),g=U(n);async function O(p){let h=S(p,i?.fields||[],{isPartialValidation:!1}),P={employment_id:s?.data.employment?.id,amendment_contract_id:s?.data.employment?.active_contract_id,contract_amendment:{...h}};switch(m.currentStep.name){case l.form.name:{let{mutateAsync:C}=A(g),H=await C(P);return o(),H}case l.confirmation_form.name:{let{mutateAsync:C}=A(F);return C(P)}default:throw new Error("Invalid step state")}}t(O,"onSubmit");function z(p){if(i){let h=S(p,i?.fields);return i?.handleValidation(h)}return null}t(z,"handleValidation");function x(){c()}return t(x,"back"),{stepState:m,fields:i?.fields||[],isLoading:y||q,isError:V||L,error:f||T,isSubmitting:g.isPending||F.isPending,initialValues:k,values:e,handleValidation:z,checkFieldUpdates:u,onSubmit:O,back:x}},"useContractAmendment");export{ae as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DHT7HDHC.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as i}from"./chunk-XSHHMBMT.js";import{a as o}from"./chunk-JODJFARP.js";import{a as m}from"./chunk-W5DG5WWJ.js";import{a as e}from"./chunk-VX2UC3HG.js";var p={employee_communication:o,termination_details:e,paid_time_off:m,additional_information:i};export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DR7VGNO2.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as s}from"./chunk-NBCZF2FO.js";import{a as o}from"./chunk-ANCX2TZH.js";import{a as n}from"./chunk-Y4VNFI7K.js";import{a as r}from"./chunk-P37U34EQ.js";import{Fragment as p,jsx as i,jsxs as m}from"react/jsx-runtime";var v=r(({currencies:{from:t,to:a},salary_conversion_properties:e,conversionType:c="no_spread",...l})=>{let d={label:e?.label||"Salary conversion",description:e?.description||m(p,{children:["The conversion is based on the Remote FX rate."," ",i(n,{className:"text-sm",zendeskId:s.remoteFxRate,children:"Learn more \u2197"})]})};return i(o,{...l,sourceCurrency:t,targetCurrency:a,conversionFieldName:"salary_conversion",conversionProperties:d,classNamePrefix:"RemoteFlows-Salary",conversionType:c})},"SalaryField");export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DY5CSCPI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/flows/CostCalculator/components/SalaryField.tsx"],"sourcesContent":["import { CurrencyConversionField } from '@/src/components/form/fields/CurrencyConversionField';\nimport { ZendeskTriggerButton } from '@/src/components/shared/zendesk-drawer/ZendeskTriggerButton';\nimport { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\nimport { JSFField } from '@/src/types/remoteFlows';\n\ntype SalaryFieldProps = JSFField & {\n currencies: {\n from: string;\n to: string;\n };\n salary_conversion_properties?: {\n label?: string;\n description?: string;\n };\n conversionType?: 'spread' | 'no_spread';\n};\n\nexport const SalaryField = ({\n currencies: { from, to },\n salary_conversion_properties,\n conversionType = 'no_spread',\n ...props\n}: SalaryFieldProps) => {\n const conversionProperties = {\n label: salary_conversion_properties?.label || 'Salary conversion',\n description: salary_conversion_properties?.description || (\n <>\n The conversion is based on the Remote FX rate.{' '}\n <ZendeskTriggerButton\n className=\"text-sm\"\n zendeskId={zendeskArticles.remoteFxRate}\n >\n Learn more ↗\n </ZendeskTriggerButton>\n </>\n ),\n };\n\n return (\n <CurrencyConversionField\n {...props}\n sourceCurrency={from}\n targetCurrency={to}\n conversionFieldName=\"salary_conversion\"\n conversionProperties={conversionProperties}\n classNamePrefix=\"RemoteFlows-Salary\"\n conversionType={conversionType}\n />\n );\n};\n"],"mappings":"gKA0BM,mBAAAA,EAEE,OAAAC,EAFF,QAAAC,MAAA,oBATC,IAAMC,EAAcC,EAAA,CAAC,CAC1B,WAAY,CAAE,KAAAC,EAAM,GAAAC,CAAG,EACvB,6BAAAC,EACA,eAAAC,EAAiB,YACjB,GAAGC,CACL,IAAwB,CACtB,IAAMC,EAAuB,CAC3B,MAAOH,GAA8B,OAAS,oBAC9C,YAAaA,GAA8B,aACzCL,EAAAF,EAAA,CAAE,2DAC+C,IAC/CC,EAACU,EAAA,CACC,UAAU,UACV,UAAWC,EAAgB,aAC5B,6BAED,GACF,CAEJ,EAEA,OACEX,EAACY,EAAA,CACE,GAAGJ,EACJ,eAAgBJ,EAChB,eAAgBC,EAChB,oBAAoB,oBACpB,qBAAsBI,EACtB,gBAAgB,qBAChB,eAAgBF,EAClB,CAEJ,EAhC2B","names":["Fragment","jsx","jsxs","SalaryField","__name","from","to","salary_conversion_properties","conversionType","props","conversionProperties","ZendeskTriggerButton","zendeskArticles","CurrencyConversionField"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as s}from"./chunk-PGWKJ6FK.js";import{b as i}from"./chunk-3ZWDIEEM.js";import{b as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as s}from"./chunk-PGWKJ6FK.js";import{b as i}from"./chunk-3ZWDIEEM.js";import{b as u}from"./chunk-CSK44J23.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as m}from"react/jsx-runtime";function f({children:o,onClick:a,...n}){let{onboardingBag:{back:c,isEmploymentReadOnly:B}}=s(),{components:d}=i(),r=t(p=>{B||c(),a?.(p)},"onBackHandler"),e=d?.button;return e?m(e,{...n,onClick:r,children:o}):m(u,{...n,onClick:r,children:o})}t(f,"OnboardingBack");export{f as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EE54SK65.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t}from"./chunk-P37U34EQ.js";import{formDataBodySerializer as i}from"@hey-api/client-fetch";import{createClient as o,createConfig as n}from"@hey-api/client-fetch";var r=o(n({baseUrl:"https://gateway.remote.com/"}));var c=t(e=>(e?.client??r).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/offboardings",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateOffboarding");var h=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contract-amendments/schema",...e}),"getShowContractAmendmentSchema");var m=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/currency-converter/raw",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postConvertRawCurrencyConverter");var d=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/employments",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateEmployment2"),y=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/help-center-articles/{id}",...e}),"getShowHelpCenterArticle");var E=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/estimation",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateEstimation");var u=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/benefit-offers",...e}),"getIndexBenefitOffer"),w=t(e=>(e.client??r).put({security:[{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/benefit-offers",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"putUpdateBenefitOffer");var C=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/magic-link",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postGenerateMagicLink");var T=t(e=>(e?.client??r).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/estimation-pdf",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateEstimationPdf");var O=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/risk-reserve",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateRiskReserve"),x=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/companies/{company_id}",...e}),"getShowCompany");var f=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contract-amendments",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateContractAmendment");var b=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/countries/{country_code}/{form}",...e}),"getShowFormCountry");var P=t(e=>(e?.client??r).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/countries",...e}),"getIndexCountry");var R=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/benefit-offers/schema",...e}),"getShowSchema");var D=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}",...e}),"getShowEmployment"),G=t(e=>(e.client??r).patch({security:[{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"patchUpdateEmployment2");var v=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/cost-calculator/regions/{slug}/fields",...e}),"getShowRegionField");var g=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/contract-eligibility",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postCreateContractEligibility"),I=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"}],url:"/v1/countries",...e}),"getSupportedCountry");var S=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"}],url:"/v1/currency-converter/effective",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postConvertWithSpreadCurrencyConverter");var U=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/contract-amendments/automatable",...e,headers:{"Content-Type":"application/json",...e?.headers}}),"postAutomatableContractAmendment");var k=t(e=>(e?.client??r).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/company-currencies",...e}),"getIndexCompanyCurrency");var B=t(e=>(e.client??r).post({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/employments/{employment_id}/invite",...e}),"postInviteEmploymentInvitation");var q=t(e=>(e.client??r).get({security:[{scheme:"bearer",type:"http"},{scheme:"bearer",type:"http"}],url:"/v1/timeoff",...e}),"getIndexTimeoff");export{r as a,c as b,h as c,m as d,d as e,y as f,E as g,u as h,w as i,C as j,T as k,O as l,x as m,f as n,b as o,P as p,R as q,D as r,G as s,v as t,g as u,I as v,S as w,U as x,k as y,B as z,q as A};
|
|
2
|
+
//# sourceMappingURL=chunk-EGQJ7UBR.js.map
|