@remoteoss/remote-flows 0.30.0 → 0.32.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/README.md +46 -8
- package/dist/{chunk-7TX2YY4K.js → chunk-2W2XD7ZY.js} +2 -2
- package/dist/chunk-2W2XD7ZY.js.map +1 -0
- package/dist/chunk-3ZWDIEEM.js +2 -0
- package/dist/chunk-3ZWDIEEM.js.map +1 -0
- package/dist/{chunk-WMICWLC3.js → chunk-5AG4K2EA.js} +2 -2
- package/dist/{chunk-DXTLNOCG.js → chunk-5CVD5WZZ.js} +2 -2
- package/dist/chunk-5CVD5WZZ.js.map +1 -0
- package/dist/{chunk-DYXTJBSK.js → chunk-5KHLOGTR.js} +2 -2
- package/dist/{chunk-7RFJWDXS.js → chunk-5KZXFQLZ.js} +2 -2
- package/dist/{chunk-LWGVLLBH.js → chunk-5OZPBBXS.js} +2 -2
- package/dist/chunk-5P7INAU2.js +2 -0
- package/dist/chunk-5P7INAU2.js.map +1 -0
- package/dist/{chunk-K2L2NSOM.js → chunk-5ZR7EFPY.js} +2 -2
- package/dist/{chunk-KVAGMBSU.js → chunk-6FWFRVQE.js} +2 -2
- package/dist/{chunk-LLM6MDNY.js → chunk-6VRUYYUV.js} +2 -2
- package/dist/{chunk-ZF4BLPXL.js → chunk-76DHIEN7.js} +2 -2
- package/dist/{chunk-D7WCSZGW.js → chunk-7CJX7I3M.js} +2 -2
- package/dist/{chunk-7OL54VKA.js → chunk-7YQAVDVX.js} +2 -2
- package/dist/chunk-7YQAVDVX.js.map +1 -0
- package/dist/chunk-A477TZFC.js +2 -0
- package/dist/chunk-A477TZFC.js.map +1 -0
- package/dist/chunk-AA7QB3QQ.js +2 -0
- package/dist/{chunk-2CDCTUVY.js.map → chunk-AA7QB3QQ.js.map} +1 -1
- package/dist/{chunk-QAOGIYQL.js → chunk-AM2IRFHQ.js} +2 -2
- package/dist/{chunk-HYOJP6J5.js → chunk-ANGJCT4I.js} +2 -2
- package/dist/{chunk-SOYN4LOZ.js → chunk-B6IVJUEH.js} +2 -2
- package/dist/{chunk-RYXRWMF4.js → chunk-BV3PGYSH.js} +2 -2
- package/dist/{chunk-KFJJXMAH.js → chunk-COBQ4WSJ.js} +2 -2
- package/dist/{chunk-TW7Z6G37.js → chunk-CW3MAP5L.js} +2 -2
- package/dist/chunk-DFJNVGK4.js +2 -0
- package/dist/chunk-DFJNVGK4.js.map +1 -0
- package/dist/{chunk-4CIYPTKM.js → chunk-DPWL4KNA.js} +2 -2
- package/dist/{chunk-OHAAAVNB.js → chunk-DPY77ASH.js} +2 -2
- package/dist/{chunk-PFKNQGOD.js → chunk-DXFA52BU.js} +2 -2
- package/dist/{chunk-YBB6BOW7.js → chunk-DXIO72S4.js} +2 -2
- package/dist/{chunk-EL5QIDYZ.js → chunk-DZ2R72O5.js} +2 -2
- package/dist/{chunk-67V3DFV4.js → chunk-E4CABUTS.js} +2 -2
- package/dist/{chunk-5NARH23N.js → chunk-EKKRQI6B.js} +2 -2
- package/dist/{chunk-PEHALKVU.js → chunk-EM5UYWUQ.js} +2 -2
- package/dist/{chunk-6GUXV7XA.js → chunk-ENW4DCDU.js} +2 -2
- package/dist/{chunk-JTOLQCOG.js → chunk-FRTJ4KWA.js} +2 -2
- package/dist/{chunk-YP7Q47E2.js → chunk-GCJCNDJ3.js} +2 -2
- package/dist/chunk-GKD2WI2W.js +2 -0
- package/dist/chunk-GKD2WI2W.js.map +1 -0
- package/dist/chunk-GOGPCCBS.js +2 -0
- package/dist/chunk-GOGPCCBS.js.map +1 -0
- package/dist/{chunk-7JUP5JEY.js → chunk-HBHVB56P.js} +2 -2
- package/dist/{chunk-FDBUFHR3.js → chunk-HO2TIG7R.js} +2 -2
- package/dist/{chunk-XLAKJHGV.js → chunk-HZDCZFR5.js} +2 -2
- package/dist/chunk-HZDCZFR5.js.map +1 -0
- package/dist/{chunk-HMUIT2NU.js → chunk-ID3ZF7QT.js} +2 -2
- package/dist/{chunk-U24UNO6X.js → chunk-IHNYOUXP.js} +2 -2
- package/dist/chunk-IHNYOUXP.js.map +1 -0
- package/dist/chunk-IUEXOXFA.js +2 -0
- package/dist/chunk-IUEXOXFA.js.map +1 -0
- package/dist/{chunk-RCWBOOZF.js → chunk-K2BWF2HC.js} +2 -2
- package/dist/{chunk-5ORIDYIK.js → chunk-L3D2AK3X.js} +2 -2
- package/dist/{chunk-ZF6MZYBK.js → chunk-LQAHRGU4.js} +2 -2
- package/dist/{chunk-6GQZCUUR.js → chunk-LV5R6H3D.js} +2 -2
- package/dist/{chunk-PEOWIEYM.js → chunk-M2CI2UDK.js} +2 -2
- package/dist/{chunk-UOOM7V2D.js → chunk-MZB24YJP.js} +2 -2
- package/dist/{chunk-GTWY3JK3.js → chunk-OIN3HGOQ.js} +2 -2
- package/dist/{chunk-Z47JQN3R.js → chunk-OW5QGJD4.js} +2 -2
- package/dist/{chunk-HBRO74FQ.js → chunk-P5WUODPR.js} +2 -2
- package/dist/{chunk-JK5K2S7N.js → chunk-P7JZC65P.js} +2 -2
- package/dist/chunk-Q2N5SOKO.js +2 -0
- package/dist/chunk-Q2N5SOKO.js.map +1 -0
- package/dist/{chunk-JBUNDNKJ.js → chunk-QWJFYQK3.js} +1 -1
- package/dist/{chunk-BKWNJMNJ.js → chunk-SHP4ULHS.js} +2 -2
- package/dist/chunk-SHP4ULHS.js.map +1 -0
- package/dist/{chunk-ZZWX3C6V.js → chunk-SO3YQ4WT.js} +2 -2
- package/dist/{chunk-WNGPZXEX.js → chunk-SPQO42TA.js} +2 -2
- package/dist/{chunk-RGGU6BNB.js → chunk-SRRY72CZ.js} +2 -2
- package/dist/chunk-THMWKOHC.js +2 -0
- package/dist/chunk-THMWKOHC.js.map +1 -0
- package/dist/{chunk-664GOQG3.js → chunk-TWVFLXVF.js} +2 -2
- package/dist/chunk-U4JVXNOG.js +2 -0
- package/dist/chunk-U4JVXNOG.js.map +1 -0
- package/dist/{chunk-DTZ23AE6.js → chunk-UJKTTTGB.js} +2 -2
- package/dist/{chunk-2N5A6EGD.js → chunk-UPXJJBXZ.js} +2 -2
- package/dist/{chunk-YP2JBYAK.js → chunk-WBRWVTZK.js} +2 -2
- package/dist/chunk-WJ6YJFD4.js +2 -0
- package/dist/chunk-WJ6YJFD4.js.map +1 -0
- package/dist/{chunk-OIIALEVF.js → chunk-WMPKW7HC.js} +2 -2
- package/dist/chunk-WW5UCMQZ.js +2 -0
- package/dist/chunk-WW5UCMQZ.js.map +1 -0
- package/dist/chunk-WXUIXZ7P.js +2 -0
- package/dist/chunk-WXUIXZ7P.js.map +1 -0
- package/dist/{chunk-HTJZUAVS.js → chunk-X6CD3FMG.js} +2 -2
- package/dist/chunk-XNOLBKZC.js +2 -0
- package/dist/chunk-XNOLBKZC.js.map +1 -0
- package/dist/{chunk-HX34JCPL.js → chunk-XPL5XOQ4.js} +2 -2
- package/dist/{chunk-CHDWFMD3.js → chunk-XPOLXRYT.js} +2 -2
- package/dist/{chunk-QRD43QJA.js → chunk-YDJVQRND.js} +2 -2
- package/dist/{chunk-EVSDVI2G.js → chunk-ZQ6MG635.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 +4 -3
- 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 +4 -3
- package/dist/flows/ContractAmendment/hooks.d.ts +4 -3
- package/dist/flows/ContractAmendment/hooks.js +1 -1
- package/dist/flows/ContractAmendment/index.d.ts +4 -3
- package/dist/flows/ContractAmendment/index.js +1 -1
- package/dist/flows/ContractAmendment/types.d.ts +1 -0
- package/dist/flows/ContractAmendment/utils.d.ts +1 -1
- package/dist/flows/ContractAmendment/utils.js +1 -1
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +6 -5
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
- package/dist/flows/ContractorOnboarding/api.d.ts +3 -2
- package/dist/flows/ContractorOnboarding/api.js +1 -1
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +5 -4
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +6 -5
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +6 -5
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +6 -5
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
- package/dist/flows/ContractorOnboarding/components/OnboardingBack.js +1 -1
- package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
- package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
- package/dist/flows/ContractorOnboarding/components/OnboardingSubmit.js +1 -1
- package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +6 -5
- package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +5 -4
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/ContractorOnboarding/context.d.ts +6 -5
- package/dist/flows/ContractorOnboarding/hooks.d.ts +6 -5
- package/dist/flows/ContractorOnboarding/hooks.js +1 -1
- package/dist/flows/ContractorOnboarding/index.d.ts +6 -5
- package/dist/flows/ContractorOnboarding/index.js +1 -1
- package/dist/flows/ContractorOnboarding/types.d.ts +6 -5
- package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +4 -3
- package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +4 -3
- 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 +2 -1
- package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
- 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/CostCalculatorResults.d.ts +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorResults.js +1 -1
- package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +2 -1
- package/dist/flows/CostCalculator/api.d.ts +2 -1
- package/dist/flows/CostCalculator/api.js +1 -1
- package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
- package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
- package/dist/flows/CostCalculator/context.d.ts +4 -3
- package/dist/flows/CostCalculator/hooks.d.ts +4 -3
- package/dist/flows/CostCalculator/hooks.js +1 -1
- package/dist/flows/CostCalculator/index.d.ts +4 -3
- package/dist/flows/CostCalculator/index.js +1 -1
- package/dist/flows/CostCalculator/types.d.ts +2 -1
- package/dist/flows/CostCalculator/utils.d.ts +4 -3
- package/dist/flows/CostCalculator/utils.js +1 -1
- package/dist/flows/Onboarding/OnboardingFlow.d.ts +5 -4
- package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
- package/dist/flows/Onboarding/api.d.ts +5 -4
- package/dist/flows/Onboarding/api.js +1 -1
- package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
- package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
- package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +5 -4
- package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/Onboarding/components/BenefitsStep.d.ts +5 -4
- package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
- package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +5 -4
- 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 +5 -4
- package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
- 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 +5 -4
- package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
- package/dist/flows/Onboarding/components/SaveDraftButton.js +1 -1
- package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +5 -4
- package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/Onboarding/context.d.ts +5 -4
- package/dist/flows/Onboarding/hooks.d.ts +5 -4
- package/dist/flows/Onboarding/hooks.js +1 -1
- package/dist/flows/Onboarding/index.d.ts +5 -4
- package/dist/flows/Onboarding/index.js +1 -1
- package/dist/flows/Onboarding/types.d.ts +5 -4
- package/dist/flows/Onboarding/utils.d.ts +5 -4
- package/dist/flows/Onboarding/utils.js +1 -1
- package/dist/flows/Termination/AdditionalDetailsForm.d.ts +5 -5
- package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
- package/dist/flows/Termination/EmployeeComunicationForm.d.ts +5 -5
- package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
- package/dist/flows/Termination/PaidTimeOffForm.d.ts +5 -5
- package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
- package/dist/flows/Termination/TerminationBack.js +1 -1
- package/dist/flows/Termination/TerminationDetailsForm.d.ts +5 -5
- package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
- package/dist/flows/Termination/TerminationFlow.d.ts +5 -5
- package/dist/flows/Termination/TerminationFlow.js +1 -1
- package/dist/flows/Termination/TerminationForm.d.ts +5 -5
- package/dist/flows/Termination/TerminationForm.js +1 -1
- package/dist/flows/Termination/TerminationSubmit.js +1 -1
- package/dist/flows/Termination/api.d.ts +106 -0
- package/dist/flows/Termination/api.js +2 -0
- package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +10 -5
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.js +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +10 -5
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +10 -5
- package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
- package/dist/flows/Termination/context.d.ts +25 -5
- package/dist/flows/Termination/hooks.d.ts +5 -5
- package/dist/flows/Termination/hooks.js +1 -1
- package/dist/flows/Termination/index.d.ts +8 -7
- package/dist/flows/Termination/index.js +1 -1
- package/dist/flows/Termination/json-schemas/schema.d.ts +14 -3
- package/dist/flows/Termination/types.d.ts +5 -5
- package/dist/flows/Termination/utils.d.ts +13 -6
- package/dist/flows/Termination/utils.js +1 -1
- package/dist/flows/types.d.ts +3 -1
- package/dist/index.d.ts +12 -17
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internals.d.ts +10 -1
- package/dist/internals.js +1 -1
- package/dist/{mutations-BdkQ8BEQ.d.ts → mutations-Cdk0PM78.d.ts} +1 -1
- package/dist/{remoteFlows-nNmmcD-T.d.ts → remoteFlows-DUivEPPh.d.ts} +41 -7
- package/dist/{types-BOXcQDia.d.ts → types-BZBdCzER.d.ts} +4 -4
- package/dist/{types-5wwUT05a.d.ts → types-C-X7siUr.d.ts} +46 -5
- package/dist/{types-CNHUaKN_.d.ts → types-OcTc56P-.d.ts} +3 -74
- package/dist/{types-omiJJgNz.d.ts → types-pohqJTkr.d.ts} +4 -4
- package/dist/{types.gen-BS9UfhS-.d.ts → types.gen-D0ZCnKWv.d.ts} +18 -1
- package/package.json +2 -1
- package/dist/chunk-2CDCTUVY.js +0 -2
- package/dist/chunk-56LJAMZC.js +0 -2
- package/dist/chunk-56LJAMZC.js.map +0 -1
- package/dist/chunk-7OL54VKA.js.map +0 -1
- package/dist/chunk-7TX2YY4K.js.map +0 -1
- package/dist/chunk-A6GJNXUZ.js +0 -2
- package/dist/chunk-A6GJNXUZ.js.map +0 -1
- package/dist/chunk-BB3WWKGA.js +0 -2
- package/dist/chunk-BB3WWKGA.js.map +0 -1
- package/dist/chunk-BKWNJMNJ.js.map +0 -1
- package/dist/chunk-CFIJKJXD.js +0 -2
- package/dist/chunk-CFIJKJXD.js.map +0 -1
- package/dist/chunk-D64MAPTD.js +0 -2
- package/dist/chunk-D64MAPTD.js.map +0 -1
- package/dist/chunk-D6X2WCEG.js +0 -2
- package/dist/chunk-D6X2WCEG.js.map +0 -1
- package/dist/chunk-DXTLNOCG.js.map +0 -1
- package/dist/chunk-EHS4ERDW.js +0 -2
- package/dist/chunk-EHS4ERDW.js.map +0 -1
- package/dist/chunk-HJYHCWGX.js +0 -2
- package/dist/chunk-HJYHCWGX.js.map +0 -1
- package/dist/chunk-LJYCBMDS.js +0 -2
- package/dist/chunk-LJYCBMDS.js.map +0 -1
- package/dist/chunk-PAQW5BFW.js +0 -2
- package/dist/chunk-PAQW5BFW.js.map +0 -1
- package/dist/chunk-QGWCUGLN.js +0 -2
- package/dist/chunk-QGWCUGLN.js.map +0 -1
- package/dist/chunk-S4XU4SE7.js +0 -2
- package/dist/chunk-S4XU4SE7.js.map +0 -1
- package/dist/chunk-U24UNO6X.js.map +0 -1
- package/dist/chunk-XFJPUKYR.js +0 -2
- package/dist/chunk-XFJPUKYR.js.map +0 -1
- package/dist/chunk-XLAKJHGV.js.map +0 -1
- package/dist/chunk-ZX5OIIJX.js +0 -1
- package/dist/chunk-ZX5OIIJX.js.map +0 -1
- package/dist/flows/api.d.ts +0 -34
- package/dist/flows/api.js +0 -2
- /package/dist/{chunk-WMICWLC3.js.map → chunk-5AG4K2EA.js.map} +0 -0
- /package/dist/{chunk-DYXTJBSK.js.map → chunk-5KHLOGTR.js.map} +0 -0
- /package/dist/{chunk-7RFJWDXS.js.map → chunk-5KZXFQLZ.js.map} +0 -0
- /package/dist/{chunk-LWGVLLBH.js.map → chunk-5OZPBBXS.js.map} +0 -0
- /package/dist/{chunk-K2L2NSOM.js.map → chunk-5ZR7EFPY.js.map} +0 -0
- /package/dist/{chunk-KVAGMBSU.js.map → chunk-6FWFRVQE.js.map} +0 -0
- /package/dist/{chunk-LLM6MDNY.js.map → chunk-6VRUYYUV.js.map} +0 -0
- /package/dist/{chunk-ZF4BLPXL.js.map → chunk-76DHIEN7.js.map} +0 -0
- /package/dist/{chunk-D7WCSZGW.js.map → chunk-7CJX7I3M.js.map} +0 -0
- /package/dist/{chunk-QAOGIYQL.js.map → chunk-AM2IRFHQ.js.map} +0 -0
- /package/dist/{chunk-HYOJP6J5.js.map → chunk-ANGJCT4I.js.map} +0 -0
- /package/dist/{chunk-SOYN4LOZ.js.map → chunk-B6IVJUEH.js.map} +0 -0
- /package/dist/{chunk-RYXRWMF4.js.map → chunk-BV3PGYSH.js.map} +0 -0
- /package/dist/{chunk-KFJJXMAH.js.map → chunk-COBQ4WSJ.js.map} +0 -0
- /package/dist/{chunk-TW7Z6G37.js.map → chunk-CW3MAP5L.js.map} +0 -0
- /package/dist/{chunk-4CIYPTKM.js.map → chunk-DPWL4KNA.js.map} +0 -0
- /package/dist/{chunk-OHAAAVNB.js.map → chunk-DPY77ASH.js.map} +0 -0
- /package/dist/{chunk-PFKNQGOD.js.map → chunk-DXFA52BU.js.map} +0 -0
- /package/dist/{chunk-YBB6BOW7.js.map → chunk-DXIO72S4.js.map} +0 -0
- /package/dist/{chunk-EL5QIDYZ.js.map → chunk-DZ2R72O5.js.map} +0 -0
- /package/dist/{chunk-67V3DFV4.js.map → chunk-E4CABUTS.js.map} +0 -0
- /package/dist/{chunk-5NARH23N.js.map → chunk-EKKRQI6B.js.map} +0 -0
- /package/dist/{chunk-PEHALKVU.js.map → chunk-EM5UYWUQ.js.map} +0 -0
- /package/dist/{chunk-6GUXV7XA.js.map → chunk-ENW4DCDU.js.map} +0 -0
- /package/dist/{chunk-JTOLQCOG.js.map → chunk-FRTJ4KWA.js.map} +0 -0
- /package/dist/{chunk-YP7Q47E2.js.map → chunk-GCJCNDJ3.js.map} +0 -0
- /package/dist/{chunk-7JUP5JEY.js.map → chunk-HBHVB56P.js.map} +0 -0
- /package/dist/{chunk-FDBUFHR3.js.map → chunk-HO2TIG7R.js.map} +0 -0
- /package/dist/{chunk-HMUIT2NU.js.map → chunk-ID3ZF7QT.js.map} +0 -0
- /package/dist/{chunk-RCWBOOZF.js.map → chunk-K2BWF2HC.js.map} +0 -0
- /package/dist/{chunk-5ORIDYIK.js.map → chunk-L3D2AK3X.js.map} +0 -0
- /package/dist/{chunk-ZF6MZYBK.js.map → chunk-LQAHRGU4.js.map} +0 -0
- /package/dist/{chunk-6GQZCUUR.js.map → chunk-LV5R6H3D.js.map} +0 -0
- /package/dist/{chunk-PEOWIEYM.js.map → chunk-M2CI2UDK.js.map} +0 -0
- /package/dist/{chunk-UOOM7V2D.js.map → chunk-MZB24YJP.js.map} +0 -0
- /package/dist/{chunk-GTWY3JK3.js.map → chunk-OIN3HGOQ.js.map} +0 -0
- /package/dist/{chunk-Z47JQN3R.js.map → chunk-OW5QGJD4.js.map} +0 -0
- /package/dist/{chunk-HBRO74FQ.js.map → chunk-P5WUODPR.js.map} +0 -0
- /package/dist/{chunk-JK5K2S7N.js.map → chunk-P7JZC65P.js.map} +0 -0
- /package/dist/{chunk-JBUNDNKJ.js.map → chunk-QWJFYQK3.js.map} +0 -0
- /package/dist/{chunk-ZZWX3C6V.js.map → chunk-SO3YQ4WT.js.map} +0 -0
- /package/dist/{chunk-WNGPZXEX.js.map → chunk-SPQO42TA.js.map} +0 -0
- /package/dist/{chunk-RGGU6BNB.js.map → chunk-SRRY72CZ.js.map} +0 -0
- /package/dist/{chunk-664GOQG3.js.map → chunk-TWVFLXVF.js.map} +0 -0
- /package/dist/{chunk-DTZ23AE6.js.map → chunk-UJKTTTGB.js.map} +0 -0
- /package/dist/{chunk-2N5A6EGD.js.map → chunk-UPXJJBXZ.js.map} +0 -0
- /package/dist/{chunk-YP2JBYAK.js.map → chunk-WBRWVTZK.js.map} +0 -0
- /package/dist/{chunk-OIIALEVF.js.map → chunk-WMPKW7HC.js.map} +0 -0
- /package/dist/{chunk-HTJZUAVS.js.map → chunk-X6CD3FMG.js.map} +0 -0
- /package/dist/{chunk-HX34JCPL.js.map → chunk-XPL5XOQ4.js.map} +0 -0
- /package/dist/{chunk-CHDWFMD3.js.map → chunk-XPOLXRYT.js.map} +0 -0
- /package/dist/{chunk-QRD43QJA.js.map → chunk-YDJVQRND.js.map} +0 -0
- /package/dist/{chunk-EVSDVI2G.js.map → chunk-ZQ6MG635.js.map} +0 -0
- /package/dist/flows/{api.js.map → Termination/api.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as f}from"./chunk-KSHK3ZPX.js";import{a as F}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as f}from"./chunk-KSHK3ZPX.js";import{a as F}from"./chunk-WJ6YJFD4.js";import{b as p}from"./chunk-2YTBWEC7.js";import{g as C}from"./chunk-CNDSIADP.js";import{g as E}from"./chunk-43WMZDDH.js";import{a as n}from"./chunk-P37U34EQ.js";import{useEffect as R}from"react";import{jsx as u}from"react/jsx-runtime";function T({onSubmit:S,onError:w,onSuccess:y,onErrorWithFields:c,shouldResetForm:d,resetFields:a}){let{form:e,formId:V,costCalculatorBag:o}=f(),{formState:{isSubmitSuccessful:s}}=e;R(()=>{if(s&&d){o?.resetForm(),e.reset();return}if(s&&a){let t={...e.getValues()};a.forEach(r=>{t[r]=""}),o?.resetForm(),e.reset(t)}},[s,e,d,o,a]);let b=n(async i=>{try{let t=o?.parseFormValues(i);o?.meta?.fields&&(o.meta.fields=E(i,o.fields),o.meta.fields.employer_currency_slug=o.meta.fields.currency);let r=await o?.onSubmit(t);if(await S?.(t),r?.data&&!r.error){let l={data:{...r.data.data,employments:r.data.data.employments?.map(m=>({...m,title:t.estimation_title}))}};await y?.(l)}else throw{data:null,error:r?.error,fieldErrors:r?.fieldErrors,rawError:r?.rawError}}catch(t){let r=t,l=r.fieldErrors;if(c){let m=o?.meta?.fields,h=p(l,m);c({error:r.error,rawError:r.rawError,fieldErrors:h})}else w?.(r.error)}},"handleSubmit");return u(C,{...e,children:u("form",{id:V,onSubmit:e.handleSubmit(b),className:"space-y-4 RemoteFlows__CostCalculatorForm",children:u(F,{fields:o?.fields??[]})})})}n(T,"CostCalculatorForm");export{T as a};
|
|
2
|
+
//# sourceMappingURL=chunk-AM2IRFHQ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as l}from"./chunk-KSHK3ZPX.js";import{b as C}from"./chunk-WVDTHFGS.js";import{b as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as l}from"./chunk-KSHK3ZPX.js";import{b as C}from"./chunk-WVDTHFGS.js";import{b as i}from"./chunk-3ZWDIEEM.js";import{a as c}from"./chunk-43WMZDDH.js";import{a as u}from"./chunk-P37U34EQ.js";import{jsx as a}from"react/jsx-runtime";function R({children:e,...t}){let{form:r,formId:n,costCalculatorBag:s}=l(),{components:f}=i(),m=f?.button;return m?a(m,{...t,type:"reset",form:n,onClick:o=>{s?.resetForm(),r.reset(),t.onClick?.(o)},children:e}):a(C,{...t,type:"reset",className:c("RemoteFlows__CostCalculatorForm__ResetButton",t.className),form:n,onClick:o=>{s?.resetForm(),r.reset(),t.onClick?.(o)},children:e})}u(R,"CostCalculatorResetButton");export{R as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ANGJCT4I.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-2W2XD7ZY.js";import{b as t}from"./chunk-TOA3JILU.js";import{b as e}from"./chunk-2YTBWEC7.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as P}from"react/jsx-runtime";function S({onSubmit:l,onSuccess:d,onError:n}){let{contractorOnboardingBag:o}=t(),c=i(async a=>{try{await l?.(o.parseFormValues(a));let r=await o.onSubmit(a);if(r?.data){await d?.(r?.data),o?.next();return}if(r?.error){let p=e(r?.fieldErrors||[],o.meta?.fields?.pricing_plan);n?.({error:r?.error,rawError:r?.rawError,fieldErrors:p})}}catch(r){n?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),m=o.stepState.values?.pricing_plan||o.initialValues.pricing_plan;return P(s,{defaultValues:m,onSubmit:c})}i(S,"PricingPlanStep");export{S as a};
|
|
2
|
+
//# sourceMappingURL=chunk-B6IVJUEH.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as g}from"./chunk-PD24XKD6.js";import{b as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as g}from"./chunk-PD24XKD6.js";import{b as c}from"./chunk-3ZWDIEEM.js";import{c as _,h as d,i as u,j as x,k as C,l as T,m as R}from"./chunk-CNDSIADP.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as o,jsxs as E}from"react/jsx-runtime";function J({name:t,description:m,label:r,type:f,onChange:s,component:w,includeErrorMessage:I=!0,additionalProps:P={},maxLength:l,...h}){let{components:N}=c(),{control:D}=_();return o(d,{control:D,name:t,render:({field:e,fieldState:F})=>{let i=w||N?.text;if(i){let n={name:t,description:m,label:r,type:f,onChange:s,metadata:P,maxLength:l,...h};return o(i,{field:{...e,onChange:a(p=>{e.onChange(p),s?.(p)},"onChange")},fieldState:F,fieldData:n})}return E(u,{"data-field":t,className:`RemoteFlows__TextField__Item__${t}`,children:[r&&o(x,{className:"RemoteFlows__TextField__Label",children:r}),o(C,{children:o(g,{...e,value:e.value??"",onChange:n=>{e.onChange(n),s?.(n)},className:"RemoteFlows__TextField__Input",placeholder:r,maxLength:l})}),m&&o(T,{className:"RemoteFlows__TextField__Description",children:m}),I&&F.error&&o(R,{className:"RemoteFlows__TextField__Error"})]})}})}a(J,"TextField");export{J as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BV3PGYSH.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-LV5R6H3D.js";import{a as r}from"./chunk-P5WUODPR.js";import{a as t}from"./chunk-WW5UCMQZ.js";import{a as f}from"./chunk-7CJX7I3M.js";import{a as e}from"./chunk-76DHIEN7.js";import{a as p}from"./chunk-DZ2R72O5.js";import{a as n}from"./chunk-6VRUYYUV.js";import{a as m}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{useId as c}from"react";import{jsx as F}from"react/jsx-runtime";var k=i(({employmentId:l,render:T,options:d,initialValues:s})=>{let u=c(),o=t({employmentId:l,options:d,initialValues:s});return F(m.Provider,{value:{formId:u,terminationBag:o},children:T({terminationBag:o,components:{SubmitButton:r,Back:n,EmployeeComunicationStep:e,TerminationDetailsStep:a,PaidTimeOffStep:p,AdditionalDetailsStep:f}})})},"TerminationFlow");export{k as a};
|
|
2
|
+
//# sourceMappingURL=chunk-COBQ4WSJ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-HO2TIG7R.js";import{a as m,b as y}from"./chunk-MZB24YJP.js";import{c}from"./chunk-CNDSIADP.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as N}from"react";import{Fragment as b,jsx as v,jsxs as C}from"react/jsx-runtime";var R=t(({currencies:{from:d,to:F},shouldSwapOrder:s,salary_conversion_properties:a,conversionType:_="no_spread",defaultValue:r,...e})=>{let{setValue:n,getValues:i}=c(),f={label:a?.label||"Salary conversion",description:a?.description||C(b,{children:["The conversion is based on the Remote FX rate."," ",v(y,{className:"text-sm",zendeskId:m.remoteFxRate,children:"Learn more \u2197"})]})},g=s?"salary_conversion":e.name,u=s?e.name:"salary_conversion";return N(()=>{if(s){let o=i(e.name);o?(n("salary_conversion",o),n("salary_converted","salary_conversion")):r&&(n("salary_conversion",r),n("salary_converted","salary_conversion"))}else{let o=i("salary_conversion");o?(n(e.name,o),n("salary_converted",e.name)):r&&(n(e.name,r),n("salary_converted",e.name))}},[s,r,n,i,e.name]),v(l,{...e,sourceCurrency:d,targetCurrency:F,mainFieldName:g,conversionFieldName:u,conversionProperties:f,classNamePrefix:"RemoteFlows-Salary",conversionType:_})},"SalaryField");export{R as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CW3MAP5L.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-SGE4DLC3.js";import{a as t}from"./chunk-P37U34EQ.js";import{format as m}from"date-fns";var i="long",f=.01,u=8,l=3;function c(r){return Math.abs(r)<f&&r!==0}t(c,"shouldDisplayAsHours");function D({days:r,hours:o}){return r+o/u}t(D,"getDaysAndHoursAsDecimal");function e(r){let o=10**l,n=Math.round(Math.abs(r)*o)/o;return r<0?-n:n}t(e,"roundToDecimals");function d(r,o){let n=e(r);if(o==="short")return`${n}h`;let s=a({number:r,singular:"hour",plural:"hours",followCopyGuidelines:!1,showNumber:!1});return`${n} ${s}`}t(d,"formatAsHours");function y(r,o){return r*u+o}t(y,"convertToTotalHours");function p(r){return{days:Math.floor(r/u),hours:r%u}}t(p,"convertTotalHoursToDaysAndHours");function A(r,o){let n=e(r);if(o==="short")return`${n}d`;let s=a({number:r,singular:"day",plural:"days",followCopyGuidelines:!1,showNumber:!1});return`${n} ${s}`}t(A,"formatAsDays");function H(r,o=i){let n=D(r);return c(n)?d(y(r.days,r.hours),o):A(n,o)}t(H,"formatAsDecimal");function F(r){return{days:Math.max(r.days,0),hours:Math.max(r.hours,0)}}t(F,"clampNegativeValuesIfApplicable");var x=t(r=>m(r,"MMM d"),"formatMonthDayInLocalTime");export{y as a,p as b,H as c,F as d,x as e};
|
|
2
|
+
//# sourceMappingURL=chunk-DFJNVGK4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/time.ts"],"sourcesContent":["import { getSingularPluralUnit } from '@/src/lib/i18n';\nimport { format } from 'date-fns';\n\nexport type DaysAndHours = {\n hours: number;\n days: number;\n};\ntype FormatDaysAndHoursSuffixFormat = 'short' | 'long';\n\nconst DEFAULT_SUFFIX_FORMAT: FormatDaysAndHoursSuffixFormat = 'long';\n\n/**\n * Threshold below which decimal day values should be displayed in hours instead\n * of days. Very small day values are more meaningful when shown as hours.\n */\nconst DECIMAL_DAYS_DISPLAY_THRESHOLD = 0.01;\n\n/**\n * Default number of hours in a work day.\n */\nconst DEFAULT_WORK_HOURS = 8;\n\n/**\n * Default number of decimal places to round to.\n */\nconst DEFAULT_DECIMAL_PLACES = 3;\n\n/**\n * Determines whether a decimal day value should be displayed as hours for\n * better readability.\n */\nfunction shouldDisplayAsHours(decimal: number): boolean {\n return Math.abs(decimal) < DECIMAL_DAYS_DISPLAY_THRESHOLD && decimal !== 0;\n}\n\n/**\n * Converts days and hours into a decimal representation.\n * Designed to handle integer hours (-7 to 7) and future integer minutes (-59 to 59).\n *\n * @example\n * getDaysAndHoursAsDecimal({ days: 1, hours: 4 }) // 1.5\n * getDaysAndHoursAsDecimal({ days: 0, hours: 3 }) // 0.375\n */\nfunction getDaysAndHoursAsDecimal({ days, hours }: DaysAndHours): number {\n return days + hours / DEFAULT_WORK_HOURS;\n}\n\n/**\n * Rounds a number to 2 decimal places using symmetric rounding (away from zero).\n */\nfunction roundToDecimals(value: number): number {\n const multiplier = 10 ** DEFAULT_DECIMAL_PLACES;\n\n // Math.round() uses \"Round half toward positive infinity\", so we round using\n // absolute value to achieve symmetric rounding\n const rounded = Math.round(Math.abs(value) * multiplier) / multiplier;\n // preserve original sign\n return value < 0 ? -rounded : rounded;\n}\n\n/**\n * Formats a time duration as hours with the specified suffix format.\n */\nfunction formatAsHours(\n hours: number,\n suffixFormat: FormatDaysAndHoursSuffixFormat,\n): string {\n const roundedHours = roundToDecimals(hours);\n\n if (suffixFormat === 'short') return `${roundedHours}h`;\n\n const hoursText = getSingularPluralUnit({\n number: hours,\n singular: 'hour',\n plural: 'hours',\n followCopyGuidelines: false,\n showNumber: false,\n });\n return `${roundedHours} ${hoursText}`;\n}\n\n/**\n * Converts days and hours into total hours based on standard work day\n */\nexport function convertToTotalHours(days: number, hours: number): number {\n return days * DEFAULT_WORK_HOURS + hours;\n}\n\nexport function convertTotalHoursToDaysAndHours(\n totalHours: number,\n): DaysAndHours {\n return {\n days: Math.floor(totalHours / DEFAULT_WORK_HOURS),\n hours: totalHours % DEFAULT_WORK_HOURS,\n };\n}\n\n/**\n * Formats a time duration as decimal days with the specified suffix format.\n */\nfunction formatAsDays(\n decimal: number,\n suffixFormat: FormatDaysAndHoursSuffixFormat,\n): string {\n const roundedDecimal = roundToDecimals(decimal);\n\n if (suffixFormat === 'short') return `${roundedDecimal}d`;\n\n const daysText = getSingularPluralUnit({\n number: decimal,\n singular: 'day',\n plural: 'days',\n followCopyGuidelines: false,\n showNumber: false,\n });\n return `${roundedDecimal} ${daysText}`;\n}\n\n/**\n * Converts time off quantities into decimal format for display.\n *\n * Always returns a formatted decimal string with appropriate units.\n * Useful when you need a precise decimal representation of any time duration.\n *\n * @example\n * formatAsDecimal({ days: 1, hours: 4 }) // \"1.5 days\"\n * formatAsDecimal({ days: 2, hours: 0 }) // \"2 days\"\n * formatAsDecimal({ days: 0, hours: -3 }) // \"-0.38 days\"\n */\nexport function formatAsDecimal(\n daysAndHours: DaysAndHours,\n suffixFormat: FormatDaysAndHoursSuffixFormat = DEFAULT_SUFFIX_FORMAT,\n): string {\n const decimal = getDaysAndHoursAsDecimal(daysAndHours);\n\n if (shouldDisplayAsHours(decimal)) {\n return formatAsHours(\n convertToTotalHours(daysAndHours.days, daysAndHours.hours),\n suffixFormat,\n );\n }\n\n return formatAsDays(decimal, suffixFormat);\n}\n\nexport function clampNegativeValuesIfApplicable(\n daysAndHours: DaysAndHours,\n): DaysAndHours {\n return {\n days: Math.max(daysAndHours.days, 0),\n hours: Math.max(daysAndHours.hours, 0),\n };\n}\n\nexport const formatMonthDayInLocalTime = (datetime: Date) =>\n format(datetime, 'MMM d');\n"],"mappings":"2EACA,OAAS,UAAAA,MAAc,WAQvB,IAAMC,EAAwD,OAMxDC,EAAiC,IAKjCC,EAAqB,EAKrBC,EAAyB,EAM/B,SAASC,EAAqBC,EAA0B,CACtD,OAAO,KAAK,IAAIA,CAAO,EAAIJ,GAAkCI,IAAY,CAC3E,CAFSC,EAAAF,EAAA,wBAYT,SAASG,EAAyB,CAAE,KAAAC,EAAM,MAAAC,CAAM,EAAyB,CACvE,OAAOD,EAAOC,EAAQP,CACxB,CAFSI,EAAAC,EAAA,4BAOT,SAASG,EAAgBC,EAAuB,CAC9C,IAAMC,EAAa,IAAMT,EAInBU,EAAU,KAAK,MAAM,KAAK,IAAIF,CAAK,EAAIC,CAAU,EAAIA,EAE3D,OAAOD,EAAQ,EAAI,CAACE,EAAUA,CAChC,CARSP,EAAAI,EAAA,mBAaT,SAASI,EACPL,EACAM,EACQ,CACR,IAAMC,EAAeN,EAAgBD,CAAK,EAE1C,GAAIM,IAAiB,QAAS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_PLACES","shouldDisplayAsHours","decimal","__name","getDaysAndHoursAsDecimal","days","hours","roundToDecimals","value","multiplier","rounded","formatAsHours","suffixFormat","roundedHours","hoursText","getSingularPluralUnit","convertToTotalHours","convertTotalHoursToDaysAndHours","totalHours","formatAsDays","roundedDecimal","daysText","formatAsDecimal","daysAndHours","clampNegativeValuesIfApplicable","formatMonthDayInLocalTime","datetime","format"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n,b as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n,b as i}from"./chunk-MZB24YJP.js";import{a as e}from"./chunk-43WMZDDH.js";import{a as o}from"./chunk-P37U34EQ.js";import{Fragment as s,jsx as t,jsxs as m}from"react/jsx-runtime";var r=["You submit your termination request.","We review your request along with the employment agreement, local labor laws, and any collective bargaining agreements in place.","A lifecycle specialist contacts you if they need additional details. Sometimes they will request a call.","Depending on the country-specific laws and the terms of the employment agreement, we may need to seek additional legal advice. We\u2019ll let you know if there are additional charges before proceeding.","Terms and conditions for the termination are finalized.","You verbally communicate the termination to the employee.","We share termination documents with the employee.","The employee signs the termination documents if required.","We process the final salary and offboard the employee."],h=o(()=>m(s,{children:[t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__Title"),children:"Please read carefully before you continue"}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description"),children:"Please do not inform the employee of the termination. We'll lead communication with them after you submit this form and we finalize the termination terms."}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription"),children:"If you already informed them, that's okay. We'll ask for the details regarding that communication and take it from there."}),t(i,{className:e("RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm"),zendeskId:n.terminationEmployeeCommunication,children:"Learn more about employee communication"}),t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessTitle"),children:"The termination process"}),t("ul",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessList list-disc list-inside"),children:r.map((a,l)=>t("li",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessListItem"),children:a},l))})]}),"TerminationDialogInfoContent");export{h as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DPWL4KNA.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as e}from"./chunk-TOA3JILU.js";import{b as i}from"./chunk-WVDTHFGS.js";import{b as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as e}from"./chunk-TOA3JILU.js";import{b as i}from"./chunk-WVDTHFGS.js";import{b as m}from"./chunk-3ZWDIEEM.js";import{a as u}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function p({children:t,...o}){let{formId:n}=e(),{components:f}=m(),r=f?.button;return r?s(r,{...o,form:n,children:t}):s(i,{...o,form:n,children:t})}u(p,"OnboardingSubmit");export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DPY77ASH.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as R,b as x,c as N,d as A}from"./chunk-DTHBG6BD.js";import{a as T}from"./chunk-ZE3YT3Q6.js";import{a as C}from"./chunk-AFRA4BIW.js";import{a as w,b as f}from"./chunk-UOOM7V2D.js";import{b as B}from"./chunk-WVDTHFGS.js";import{a as i,b as n,e as F}from"./chunk-43WMZDDH.js";import{a as d}from"./chunk-P37U34EQ.js";import{MoreHorizontal as G}from"lucide-react";import{useState as P}from"react";import{Fragment as U,jsx as g,jsxs as E}from"react/jsx-runtime";function L({actions:e=[],className:r,label:l,"data-testid":a}){let[_,m]=P(!1);return E("div",{className:i("relative",r),children:[g(B,{"data-testid":a,variant:"ghost","aria-label":l,className:"h-8 w-8 p-0",onClick:()=>m(!_),children:g(G,{className:"h-4 w-4"})}),_&&E(U,{children:[g("div",{className:"fixed inset-0 z-40",onClick:()=>m(!1)}),g("div",{className:"absolute right-0 top-1/2 mt-1 bg-white border border-gray-200 rounded-md shadow-lg z-50 min-w-[120px]",children:e.map((c,u)=>g("button",{"data-testid":`${a}-${c.label.toLowerCase().replace(" ","-")}`,className:i("w-full text-left px-2 py-1.5 text-sm hover:bg-gray-100",c.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>{c.onClick(),m(!1)},disabled:c.disabled,children:c.label},u))})]})]})}d(L,"ActionsDropdown");import{ChevronDown as S,Info as $}from"lucide-react";import j from"react-flagpack";import{useState as O}from"react";import{Fragment as b,jsx as o,jsxs as t}from"react/jsx-runtime";var Z={GB:"GB-UKM"},K=d(({title:e,country:r,region:l,annualGrossSalary:a,onDelete:_,onExportPdf:m,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:m},{label:"Delete",onClick:_}];return t("div",{className:"RemoteFlows__EstimationResults__Header flex justify-between",children:[t("div",{className:"flex flex-row items-center gap-6",children:[o("div",{className:"RemoteFlows__EstimationResultsHeader__FlagContainer flex h-16 w-16 items-center justify-center rounded-lg bg-[#F4F4F5]",children:o(j,{code:Z[r.alpha_2_code]||r.alpha_2_code})}),t("div",{className:"space-y-1",children:[o("h2",{"data-testid":"estimation-results-header-title",className:"RemoteFlows__EstimationResultsHeader__Title text-lg font-medium leading-none text-[#181818]",children:e}),t("p",{className:"RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]",children:[r.name," ",l?` (${l.name})`:""]}),t("p",{"data-testid":"estimation-results-header-annual-gross-salary",className:"RemoteFlows__EstimationResultsHeader__AnnualGrossSalary text-xs text-[#71717A]",children:[o("span",{className:"text-[#181818]",children:"Employee annual gross salary:"})," ",a]})]})]}),o(L,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),V=d(()=>({steps:[{id:"add-employment-details",title:"Add employment details",description:"You add employee employments details."},{id:"invite-employee",title:"Invite employee",description:"Hire receives an email invitation from Remote to start the self-enrollment process."},{id:"verify-information",title:"Verify information",description:"Remote prepares the Employment Agreement and verifies all the information."},{id:"sign-contract",title:"Sign contract",description:"All parties sign the Employment Agreement and are ready to start. \u{1F389}"}],helpText:"For customers who accept Remote's Terms of Service (ToS), the employee onboarding timeline starts once the employee has been invited to the platform and completed self enrollment.",zendeskArticleId:w.employeeOnboardingTimeline}),"getOnboardingTimelineData");function Y({minimumOnboardingDays:e,data:r,className:l}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",l),children:t(x,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4",children:t("div",{className:"flex items-center justify-between w-full",children:[o("span",{className:"RemoteFlows__OnboardingTimeline__Title text-base font-medium text-[#0F172A]",children:"Onboarding timeline"}),e!=null&&t("span",{className:"RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4",children:[e," days"]})]})}),t(A,{className:"px-0 pb-4",children:[o("ul",{className:"RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2",children:r.steps.map(a=>t("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:a.title})," ","- ",a.description]},a.id))}),t("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[r.helpText,r.zendeskArticleId&&o(f,{zendeskId:r.zendeskArticleId,children:"Learn more"})]})]})]})})}d(Y,"OnboardingTimeline");function q({className:e,countryBenefitsUrl:r,countryGuideUrl:l,country:a}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__HiringSection w-full",e),children:t(x,{value:"timeline",className:"RemoteFlows__HiringSection__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__HiringSection__AccordionTrigger hover:no-underline px-0 py-4",children:o("div",{className:"flex items-center justify-between w-full",children:t("span",{className:"text-base font-medium text-[#0F172A]",children:["Hiring in ",a.name]})})}),o(A,{children:t("div",{className:"flex flex-col gap-1",children:[l&&o("a",{href:l,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),r&&o("a",{href:r,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}d(q,"HiringSection");function J({isMultipleCurrency:e,className:r}){return t("div",{className:i("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",r),children:[o("span",{"aria-hidden":!0}),e?t(b,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):t(b,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}d(J,"EstimationHeaders");function I({label:e,amounts:r,className:l,children:a}){let[_,m]=O(!0);return t("div",{className:i("RemoteFlows__EstimationResults__Row",l),children:[t("div",{className:"RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center",children:[t("div",{className:"RemoteFlows__EstimationRow__LabelContainer flex items-center gap-2",children:[o("span",{className:i("RemoteFlows__EstimationRow__Title min-w-[140px] font-medium text-[#09090B]"),children:e}),o("button",{onClick:()=>m(!_),className:"RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded",children:o(S,{className:`h-4 w-4 text-muted-foreground transition-transform ${_?"rotate-180":""}`})})]}),Array.isArray(r)?r.map((c,u)=>o("span",{className:i("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:c},u)):t(b,{children:[o("span",{}),o("span",{className:i("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:r})]})]}),_&&a&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:a})]})}d(I,"EstimationRow");function Q({item:e,isMultipleCurrency:r,level:l=0}){let[a,_]=O(!1),m=e.children&&e.children.length>0,c=l>0,u=e.isCollapsible||m;return t("li",{className:i("RemoteFlows__BreakdownList__Item pb-3",c&&"pb-1"),children:[t("div",{className:i(r?"RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between":"RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between"),children:[t("div",{className:i("RemoteFlows__BreakdownList__LabelContainer flex items-center gap-2",c&&"pl-3"),children:[!c&&o("span",{className:"RemoteFlows__BreakdownList__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0","aria-hidden":"true"}),u?t("button",{onClick:()=>_(!a),className:"RemoteFlows__BreakdownList__CollapseButton flex items-center gap-2 hover:bg-gray-100 rounded p-1",children:[o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B]"),children:e.label}),o(S,{className:`RemoteFlows__BreakdownList__ChevronDown h-3 w-3 text-muted-foreground transition-transform ${a?"rotate-180":""}`})]}):o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B] p-1"),children:e.label}),e.tooltip&&o(T,{content:t(b,{children:[o("span",{dangerouslySetInnerHTML:{__html:F(e.tooltip)}})," ",e.zendeskId&&o(f,{zendeskId:Number(e.zendeskId),children:"Learn more"})]}),children:o("button",{className:"RemoteFlows__BreakdownList__InfoButton p-1 hover:bg-gray-100 rounded",children:o($,{className:i("RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground",c?"h-3 w-3":"h-4 w-4")})})})]}),r?t(b,{children:[o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employee-amount",className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"}),o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employer-amount",className:i("RemoteFlows__BreakdownList__EmployerAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__EmployerAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__EmployerAmountText--NotNested text-[#09090B]"),children:e.employerAmount||"\u2014"})]}):o("span",{"data-testid":e.dataSelector,className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"})]}),m&&a&&o("div",{className:"mt-1",children:o(k,{items:e.children,isMultipleCurrency:r,level:l+1})})]})}d(Q,"BreakdownListItem");function k({items:e,isMultipleCurrency:r,className:l,level:a}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",l),children:e.map((_,m)=>o(Q,{item:_,isMultipleCurrency:r,level:a},m))})}d(k,"BreakdownList");var pe=d(({estimation:e,title:r,components:l,onDelete:a,onExportPdf:_,onEdit:m})=>{let c=l?.HiringSection||q,u=l?.OnboardingTimeline||Y,z=l?.Header||K,h=l?.Footer,H=V(),p=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,v=e.employer_currency_costs.monthly_management_fee,D=e.region.code!==e.country.code,M=n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.symbol);return t(C,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(z,{title:r,annualGrossSalary:M,region:D?e.region:void 0,country:e.country,onDelete:a,onExportPdf:_,onEdit:m})}),t("div",{className:"RemoteFlows__Separator",children:[o(J,{isMultipleCurrency:p,className:"mb-3"}),o(I,{label:"Monthly total cost",amounts:p?[n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.symbol),n(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.symbol)]:n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.symbol),children:o(k,{items:[{label:"Gross monthly salary",regionalAmount:n(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_gross_salary,e.employer_currency_costs.currency.symbol),zendeskId:w.extraPayments.toString(),tooltip:"This country respects extra payments on top of the gross salary."},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.monthly_contributions_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_contributions_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.monthly_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.monthly_benefits_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_benefits_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.monthly_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Monthly fee",regionalAmount:n(e.regional_currency_costs.monthly_management_fee,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_management_fee,e.employer_currency_costs.currency.symbol),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})]}),o("div",{className:"RemoteFlows__Separator",children:o(I,{label:"Annual total cost",amounts:p?[n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.symbol),n(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.symbol)]:n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.symbol),children:o(k,{items:[{label:"Gross annual salary",dataSelector:"annual-gross-salary",regionalAmount:n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.symbol)},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_contributions_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.annual_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.annual_benefits_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_benefits_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.annual_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Extra statutory payments",regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.extra_statutory_payments_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.extra_statutory_payments_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Annual fee",regionalAmount:n(e.regional_currency_costs.annual_management_fee,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_management_fee,e.employer_currency_costs.currency.symbol),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})}),o("div",{className:"RemoteFlows__Separator",children:o(u,{minimumOnboardingDays:e.minimum_onboarding_time,data:H})}),o(c,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),h&&o(h,{})]})},"EstimationResults");export{pe as a};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as R,b as x,c as N,d as A}from"./chunk-DTHBG6BD.js";import{a as T}from"./chunk-ZE3YT3Q6.js";import{a as C}from"./chunk-AFRA4BIW.js";import{a as w,b as f}from"./chunk-MZB24YJP.js";import{b as B}from"./chunk-WVDTHFGS.js";import{a as i,b as n,e as F}from"./chunk-43WMZDDH.js";import{a as d}from"./chunk-P37U34EQ.js";import{MoreHorizontal as G}from"lucide-react";import{useState as P}from"react";import{Fragment as U,jsx as g,jsxs as E}from"react/jsx-runtime";function L({actions:e=[],className:r,label:l,"data-testid":a}){let[_,m]=P(!1);return E("div",{className:i("relative",r),children:[g(B,{"data-testid":a,variant:"ghost","aria-label":l,className:"h-8 w-8 p-0",onClick:()=>m(!_),children:g(G,{className:"h-4 w-4"})}),_&&E(U,{children:[g("div",{className:"fixed inset-0 z-40",onClick:()=>m(!1)}),g("div",{className:"absolute right-0 top-1/2 mt-1 bg-white border border-gray-200 rounded-md shadow-lg z-50 min-w-[120px]",children:e.map((c,u)=>g("button",{"data-testid":`${a}-${c.label.toLowerCase().replace(" ","-")}`,className:i("w-full text-left px-2 py-1.5 text-sm hover:bg-gray-100",c.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>{c.onClick(),m(!1)},disabled:c.disabled,children:c.label},u))})]})]})}d(L,"ActionsDropdown");import{ChevronDown as S,Info as $}from"lucide-react";import j from"react-flagpack";import{useState as O}from"react";import{Fragment as b,jsx as o,jsxs as t}from"react/jsx-runtime";var Z={GB:"GB-UKM"},K=d(({title:e,country:r,region:l,annualGrossSalary:a,onDelete:_,onExportPdf:m,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:m},{label:"Delete",onClick:_}];return t("div",{className:"RemoteFlows__EstimationResults__Header flex justify-between",children:[t("div",{className:"flex flex-row items-center gap-6",children:[o("div",{className:"RemoteFlows__EstimationResultsHeader__FlagContainer flex h-16 w-16 items-center justify-center rounded-lg bg-[#F4F4F5]",children:o(j,{code:Z[r.alpha_2_code]||r.alpha_2_code})}),t("div",{className:"space-y-1",children:[o("h2",{"data-testid":"estimation-results-header-title",className:"RemoteFlows__EstimationResultsHeader__Title text-lg font-medium leading-none text-[#181818]",children:e}),t("p",{className:"RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]",children:[r.name," ",l?` (${l.name})`:""]}),t("p",{"data-testid":"estimation-results-header-annual-gross-salary",className:"RemoteFlows__EstimationResultsHeader__AnnualGrossSalary text-xs text-[#71717A]",children:[o("span",{className:"text-[#181818]",children:"Employee annual gross salary:"})," ",a]})]})]}),o(L,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),V=d(()=>({steps:[{id:"add-employment-details",title:"Add employment details",description:"You add employee employments details."},{id:"invite-employee",title:"Invite employee",description:"Hire receives an email invitation from Remote to start the self-enrollment process."},{id:"verify-information",title:"Verify information",description:"Remote prepares the Employment Agreement and verifies all the information."},{id:"sign-contract",title:"Sign contract",description:"All parties sign the Employment Agreement and are ready to start. \u{1F389}"}],helpText:"For customers who accept Remote's Terms of Service (ToS), the employee onboarding timeline starts once the employee has been invited to the platform and completed self enrollment.",zendeskArticleId:w.employeeOnboardingTimeline}),"getOnboardingTimelineData");function Y({minimumOnboardingDays:e,data:r,className:l}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",l),children:t(x,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4",children:t("div",{className:"flex items-center justify-between w-full",children:[o("span",{className:"RemoteFlows__OnboardingTimeline__Title text-base font-medium text-[#0F172A]",children:"Onboarding timeline"}),e!=null&&t("span",{className:"RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4",children:[e," days"]})]})}),t(A,{className:"px-0 pb-4",children:[o("ul",{className:"RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2",children:r.steps.map(a=>t("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:a.title})," ","- ",a.description]},a.id))}),t("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[r.helpText,r.zendeskArticleId&&o(f,{zendeskId:r.zendeskArticleId,children:"Learn more"})]})]})]})})}d(Y,"OnboardingTimeline");function q({className:e,countryBenefitsUrl:r,countryGuideUrl:l,country:a}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__HiringSection w-full",e),children:t(x,{value:"timeline",className:"RemoteFlows__HiringSection__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__HiringSection__AccordionTrigger hover:no-underline px-0 py-4",children:o("div",{className:"flex items-center justify-between w-full",children:t("span",{className:"text-base font-medium text-[#0F172A]",children:["Hiring in ",a.name]})})}),o(A,{children:t("div",{className:"flex flex-col gap-1",children:[l&&o("a",{href:l,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),r&&o("a",{href:r,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}d(q,"HiringSection");function J({isMultipleCurrency:e,className:r}){return t("div",{className:i("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",r),children:[o("span",{"aria-hidden":!0}),e?t(b,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):t(b,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}d(J,"EstimationHeaders");function I({label:e,amounts:r,className:l,children:a}){let[_,m]=O(!0);return t("div",{className:i("RemoteFlows__EstimationResults__Row",l),children:[t("div",{className:"RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center",children:[t("div",{className:"RemoteFlows__EstimationRow__LabelContainer flex items-center gap-2",children:[o("span",{className:i("RemoteFlows__EstimationRow__Title min-w-[140px] font-medium text-[#09090B]"),children:e}),o("button",{onClick:()=>m(!_),className:"RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded",children:o(S,{className:`h-4 w-4 text-muted-foreground transition-transform ${_?"rotate-180":""}`})})]}),Array.isArray(r)?r.map((c,u)=>o("span",{className:i("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:c},u)):t(b,{children:[o("span",{}),o("span",{className:i("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:r})]})]}),_&&a&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:a})]})}d(I,"EstimationRow");function Q({item:e,isMultipleCurrency:r,level:l=0}){let[a,_]=O(!1),m=e.children&&e.children.length>0,c=l>0,u=e.isCollapsible||m;return t("li",{className:i("RemoteFlows__BreakdownList__Item pb-3",c&&"pb-1"),children:[t("div",{className:i(r?"RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between":"RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between"),children:[t("div",{className:i("RemoteFlows__BreakdownList__LabelContainer flex items-center gap-2",c&&"pl-3"),children:[!c&&o("span",{className:"RemoteFlows__BreakdownList__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0","aria-hidden":"true"}),u?t("button",{onClick:()=>_(!a),className:"RemoteFlows__BreakdownList__CollapseButton flex items-center gap-2 hover:bg-gray-100 rounded p-1",children:[o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B]"),children:e.label}),o(S,{className:`RemoteFlows__BreakdownList__ChevronDown h-3 w-3 text-muted-foreground transition-transform ${a?"rotate-180":""}`})]}):o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B] p-1"),children:e.label}),e.tooltip&&o(T,{content:t(b,{children:[o("span",{dangerouslySetInnerHTML:{__html:F(e.tooltip)}})," ",e.zendeskId&&o(f,{zendeskId:Number(e.zendeskId),children:"Learn more"})]}),children:o("button",{className:"RemoteFlows__BreakdownList__InfoButton p-1 hover:bg-gray-100 rounded",children:o($,{className:i("RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground",c?"h-3 w-3":"h-4 w-4")})})})]}),r?t(b,{children:[o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employee-amount",className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"}),o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employer-amount",className:i("RemoteFlows__BreakdownList__EmployerAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__EmployerAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__EmployerAmountText--NotNested text-[#09090B]"),children:e.employerAmount||"\u2014"})]}):o("span",{"data-testid":e.dataSelector,className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"})]}),m&&a&&o("div",{className:"mt-1",children:o(k,{items:e.children,isMultipleCurrency:r,level:l+1})})]})}d(Q,"BreakdownListItem");function k({items:e,isMultipleCurrency:r,className:l,level:a}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",l),children:e.map((_,m)=>o(Q,{item:_,isMultipleCurrency:r,level:a},m))})}d(k,"BreakdownList");var pe=d(({estimation:e,title:r,components:l,onDelete:a,onExportPdf:_,onEdit:m})=>{let c=l?.HiringSection||q,u=l?.OnboardingTimeline||Y,z=l?.Header||K,h=l?.Footer,H=V(),p=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,v=e.employer_currency_costs.monthly_management_fee,D=e.region.code!==e.country.code,M=n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.symbol);return t(C,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(z,{title:r,annualGrossSalary:M,region:D?e.region:void 0,country:e.country,onDelete:a,onExportPdf:_,onEdit:m})}),t("div",{className:"RemoteFlows__Separator",children:[o(J,{isMultipleCurrency:p,className:"mb-3"}),o(I,{label:"Monthly total cost",amounts:p?[n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.symbol),n(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.symbol)]:n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.symbol),children:o(k,{items:[{label:"Gross monthly salary",regionalAmount:n(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_gross_salary,e.employer_currency_costs.currency.symbol),zendeskId:w.extraPayments.toString(),tooltip:"This country respects extra payments on top of the gross salary."},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.monthly_contributions_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_contributions_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.monthly_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.monthly_benefits_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_benefits_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.monthly_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Monthly fee",regionalAmount:n(e.regional_currency_costs.monthly_management_fee,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.monthly_management_fee,e.employer_currency_costs.currency.symbol),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})]}),o("div",{className:"RemoteFlows__Separator",children:o(I,{label:"Annual total cost",amounts:p?[n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.symbol),n(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.symbol)]:n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.symbol),children:o(k,{items:[{label:"Gross annual salary",dataSelector:"annual-gross-salary",regionalAmount:n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.symbol)},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_contributions_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.annual_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.annual_benefits_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_benefits_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.annual_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Extra statutory payments",regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_total,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.extra_statutory_payments_total,e.employer_currency_costs.currency.symbol),children:e.employer_currency_costs.extra_statutory_payments_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_breakdown?.[y]?.amount,e.regional_currency_costs.currency.symbol),employerAmount:n(s.amount,e.employer_currency_costs.currency.symbol),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Annual fee",regionalAmount:n(e.regional_currency_costs.annual_management_fee,e.regional_currency_costs.currency.symbol),employerAmount:n(e.employer_currency_costs.annual_management_fee,e.employer_currency_costs.currency.symbol),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})}),o("div",{className:"RemoteFlows__Separator",children:o(u,{minimumOnboardingDays:e.minimum_onboarding_time,data:H})}),o(c,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),h&&o(h,{})]})},"EstimationResults");export{pe as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DXFA52BU.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as N}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as N}from"./chunk-SPQO42TA.js";import{a as R}from"./chunk-E4CABUTS.js";import{a as P}from"./chunk-BCXRPHWY.js";import{a as S}from"./chunk-MQWVZSGH.js";import{a as v}from"./chunk-WBRWVTZK.js";import{a as B}from"./chunk-WMPKW7HC.js";import{a as x,b as k,c as i}from"./chunk-7R347KBY.js";import{a as h,b as p,c as g,d as w,e as T}from"./chunk-AFRA4BIW.js";import{b as f}from"./chunk-HPHWQU34.js";import{a as b}from"./chunk-43WMZDDH.js";import{a as _}from"./chunk-P37U34EQ.js";import{lazy as L,useState as V}from"react";import{Fragment as I,jsx as a,jsxs as r}from"react/jsx-runtime";var z=L(()=>import("./flows/CostCalculator/Results/CostCalculatorResultsChart.js"));function Y({employmentData:D,options:e}){let[o,E]=V("monthly"),n=D.employments?.[0];if(!n)return null;let t=n.employer_currency_costs,s=t.currency.symbol,m=o==="monthly"?t.monthly_gross_salary:t.annual_gross_salary,u=o==="monthly"?t.monthly_benefits_total:t.annual_benefits_total,y=o==="monthly"?t.monthly_contributions_total:t.annual_contributions_total,F=o==="monthly"?t.monthly_total:t.annual_total,l=o==="monthly"?null:t.extra_statutory_payments_breakdown,A=o==="monthly"?null:t.extra_statutory_payments_total,d=o==="monthly"?t.monthly_indirect_tax:t.annual_indirect_tax,c=o==="monthly"?t.monthly_benefits_breakdown:t.annual_benefits_breakdown,H=o==="monthly"?t.monthly_contributions_breakdown:t.annual_contributions_breakdown,C=[{name:"Gross Salary",value:m,color:e?.chartColors?.grossSalary??"#3b82f6"},{name:"Contributions",value:y,color:e?.chartColors?.contributions??"#f59e0b"}];return c&&C.push({name:"Benefits",value:u??0,color:e?.chartColors?.benefits??"#10b981"}),r(I,{children:[r("div",{className:"flex flex-col md:flex-row gap-4 md:items-center justify-between mb-6 RemoteFlows__CostCalculatorResults",children:[r("div",{className:"RemoteFlows__CostCalculatorResults__Header",children:[r("h2",{className:"text-xl font-semibold flex items-center gap-2",children:[a("span",{className:"flex items-center gap-1",children:e?.title??"Cost Calculator"}),a(f,{className:"ml-2",children:n.country.name})]}),a("p",{className:"text-primary-foreground font-medium mt-1",children:e?.description??`Total cost of employment in ${n.country.name}`})]}),a(x,{value:o,onValueChange:G=>E(G),className:"w-full md:w-auto RemoteFlows__CostCalculatorResults__Tabs",children:r(k,{className:"grid w-full md:w-[200px] grid-cols-2",children:[a(i,{value:"monthly",children:"Monthly"}),a(i,{value:"annual",children:"Annual"})]})})]}),r("div",{className:b("grid grid-cols-1 gap-6",e?.showChart?"md:grid-cols-3":"","RemoteFlows__CostCalculatorResults_CostBreakdown"),children:[r(h,{className:"md:col-span-2 rounded-lg",children:[r(p,{className:"pb-2",children:[a(g,{children:"Cost Breakdown"}),a(w,{children:"Detailed breakdown of all employer costs"})]}),a(T,{children:r("div",{className:"space-y-6",children:[a(R,{grossSalary:m,currency:s,hasExtraStatutoryPayment:n.has_extra_statutory_payment}),c?a(v,{benefitsBreakdown:c,benefitsTotal:u,currency:s}):null,a(B,{contributionsBreakdown:H,contributionsTotal:y,currency:s}),Array.isArray(l)&&l.length>0?a(N,{extraStatutoryPaymentsBreakdown:l,extraStatutoryPaymentsTotal:A,currency:s}):null,d?a(P,{indirectTax:d,currency:s}):null,a(S,{totalCost:F,currency:s})]})})]}),e?.showChart&&a(z,{chartData:C,currency:s})]})]})}_(Y,"CostCalculatorResults");export{Y as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DXIO72S4.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-5CVD5WZZ.js";import{b as m}from"./chunk-MRYRNB7Y.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as n}from"react/jsx-runtime";function u({onSubmit:r}){let{terminationBag:i}=m();return n(a,{onSubmit:o(async e=>{await r?.(i?.parseFormValues(e)),i?.next()},"handleSubmit")})}o(u,"PaidTimeOffForm");export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DZ2R72O5.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-ZSCKSEAA.js";import{a as m}from"./chunk-ZE3YT3Q6.js";import{a,b as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-ZSCKSEAA.js";import{a as m}from"./chunk-ZE3YT3Q6.js";import{a,b as e}from"./chunk-MZB24YJP.js";import{b as n}from"./chunk-WVDTHFGS.js";import{b as s}from"./chunk-43WMZDDH.js";import{a as o}from"./chunk-P37U34EQ.js";import{Info as f}from"lucide-react";import{Fragment as y,jsx as r,jsxs as t}from"react/jsx-runtime";function N({grossSalary:l,currency:p,hasExtraStatutoryPayment:c=!1}){return t("div",{children:[t("div",{className:"flex justify-between items-center mb-2",children:[t("div",{className:"flex items-center gap-2",children:[r("h3",{className:"font-medium text-primary-foreground",children:"Gross Salary"}),c&&r(m,{content:t(y,{children:[r("span",{children:"This country respects extra payments on top of the gross salary."})," ",r(e,{zendeskId:a.extraPayments,children:"Learn more"})]}),children:t(n,{variant:"ghost",size:"icon",className:"h-4 w-4 p-0 mt-2",children:[r(f,{className:"h-3 w-3 text-gray-400"}),r("span",{className:"sr-only",children:"Info"})]})})]}),r("span",{className:"font-semibold text-lg",children:s(l,p)})]}),r(i,{})]})}o(N,"CostCalculatorGrossSalary");export{N as a};
|
|
2
|
+
//# sourceMappingURL=chunk-E4CABUTS.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as i}from"./chunk-WVDTHFGS.js";import{b as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as i}from"./chunk-WVDTHFGS.js";import{b as u}from"./chunk-3ZWDIEEM.js";import{b as c}from"./chunk-TVZAFTPT.js";import{a as m}from"./chunk-P37U34EQ.js";import{jsx as C}from"react/jsx-runtime";function d({children:o,...t}){let{contractAmendment:{back:r}}=c(),{components:s}=u(),e=s?.button;return e?C(e,{...t,onClick:n=>{r(),t.onClick?.(n)},children:o}):C(i,{...t,onClick:n=>{r(),t.onClick?.(n)},children:o})}m(d,"ContractAmendmentBack");export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EKKRQI6B.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-HO2TIG7R.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as i}from"react/jsx-runtime";var l=e(({currency:n,desiredCurrency:o,annual_gross_salary_conversion_properties:r,...a})=>i(s,{...a,sourceCurrency:n,targetCurrency:o,conversionFieldName:"annual_gross_salary_conversion",conversionProperties:{...r,description:r?.description||"Estimated amount. This is an estimation. We calculate conversions based on spot rates that are subject to fluctuation over time."},classNamePrefix:"RemoteFlows-AnnualGrossSalary",conversionType:"no_spread"}),"AnnualGrossSalary");export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EM5UYWUQ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-2W2XD7ZY.js";import{b as a}from"./chunk-TOA3JILU.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function y({onSubmit:c,onSuccess:s,onError:e}){let{contractorOnboardingBag:o}=a(),u=t(async n=>{try{await c?.({countryCode:n.country});let r=await o.onSubmit(n);if(r?.data){await s?.(r?.data),o?.next();return}r?.error&&e?.({error:r.error,rawError:r.rawError,fieldErrors:[]})}catch(r){e?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),l=o.stepState.values?.select_country||o.initialValues.select_country;return d(i,{defaultValues:l,onSubmit:u})}t(y,"SelectCountryStep");export{y as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ENW4DCDU.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as o}from"./chunk-WXUIXZ7P.js";import{a as e}from"./chunk-P37U34EQ.js";var d={form:{index:0,name:"form"},confirmation_form:{index:1,name:"confirmation_form"}};function f(t,r){if(!t)return{};if(!r)return{...t.contract_details,effective_date:"",reason_for_change:"",job_title:t.job_title,additional_comments:"",annual_gross_salary:o(t.contract_details?.annual_gross_salary)};let s=r.map(n=>n.name),i=Object.keys(t?.contract_details||{});return{...s.reduce((n,a)=>{if(i.includes(a)){let c=t?.contract_details;n[a]=c[a]}return n},{}),effective_date:"",reason_for_change:"",job_title:t.job_title,additional_comments:"",annual_gross_salary:o(t.contract_details?.annual_gross_salary),additional_comments_toggle:!1}}e(f,"buildInitialValues");export{d as a,f as b};
|
|
2
|
+
//# sourceMappingURL=chunk-FRTJ4KWA.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-HZDCZFR5.js";import{b as n}from"./chunk-PGWKJ6FK.js";import{b as i}from"./chunk-2YTBWEC7.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as p}from"react/jsx-runtime";function F({onSubmit:l,onError:t,onSuccess:d}){let{onboardingBag:o}=n(),m=e(async a=>{try{await l?.(o.parseFormValues(a));let r=await o.onSubmit(a);if(r?.data){await d?.(r.data),o?.next();return}if(r?.error){let c=i(r?.fieldErrors||[],o.meta?.fields?.contract_details);t?.({error:r.error,rawError:r.rawError,fieldErrors:c})}}catch(r){t?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit");return p(s,{defaultValues:o.stepState.values?.contract_details||o.initialValues.contract_details,onSubmit:m})}e(F,"ContractDetailsStep");export{F as a};
|
|
2
|
+
//# sourceMappingURL=chunk-GCJCNDJ3.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as Le}from"./chunk-EM5UYWUQ.js";import{a as ke}from"./chunk-VAIBLWOY.js";import{a as Ce,b as Oe,c as Pe,d as Me,e as Te}from"./chunk-XNOLBKZC.js";import{a as ue,b as ye,c as pe,f as _e,g as Se,h as be,i as ge,j as Fe,k as Ee,m as he}from"./chunk-5KZXFQLZ.js";import{a as R}from"./chunk-2YTBWEC7.js";import{a as Ve}from"./chunk-PJBAQZ6G.js";import{c as h,d as L,f as W}from"./chunk-WXUIXZ7P.js";import{g as V}from"./chunk-43WMZDDH.js";import{a as l}from"./chunk-P37U34EQ.js";import{useEffect as st,useMemo as d,useRef as at,useState as we}from"react";import rt from"lodash.mergewith";import{jsx as Be}from"react/jsx-runtime";var ct={employment_basic_information:"basic_information",contract_details:"contract_details"},lt={select_country:null,basic_information:"employment_basic_information",contract_details:"contract_details",benefits:null,review:null},mt=l(({isLoadingBasicInformationForm:f,isLoadingContractDetailsForm:J,isLoadingEmployment:D,isLoadingBenefitsOffersSchema:I,isLoadingBenefitOffers:i,isLoadingCompany:N,isLoadingCountries:C,employmentStatus:s,employmentId:_,currentStepName:a,basicInformationFields:A,contractDetailsFields:c})=>{let O=f||J||D||I||i||N||C,r=s&&Pe.includes(s),k=s&&!Me.includes(s),w=!!(_&&r&&a!=="review"),B=O||w,j=!!(w&&!O&&A.length>0&&c.length>0);return{isLoading:B,isNavigatingToReview:j,isEmploymentReadOnly:r,canInvite:k}},"getLoadingStates"),ht=l(({employmentId:f,companyId:J,countryCode:D,type:I,options:i,skipSteps:N,externalId:C,initialValues:s})=>{let _=at({select_country:{},basic_information:{},contract_details:{},benefits:{}}),[a,A]=we(f),[c,O]=we(D||null),{data:r,isLoading:k,refetch:w}=ue(a);f&&r?.country?.code&&!c&&O(r.country.code);let{data:B,isLoading:j}=pe(a),{data:q,isLoading:G,refetch:je}=ye(J),qe=N?.includes("select_country")?Oe:Ce,{fieldValues:S,stepState:n,setFieldValues:ve,previousStep:Re,nextStep:Je,goToStep:U,setStepValues:$}=Ve(qe),{selectCountryForm:v,isLoading:z}=Ee({jsfModify:i?.jsfModify?.select_country,queryOptions:{enabled:n.currentStep.name==="select_country"}}),K=be(i),Y=ge(i),Q=Fe(i),De=he(),{mutateAsync:Ie}=R(K),{mutateAsync:X}=R(Y),{mutateAsync:Ne}=R(Q),Ae=lt[n.currentStep.name]||"employment_basic_information",Ue=ct[Ae],xe=r?.[Ue]||{},Z=l(({form:e,options:o={},query:m={}})=>{let H=Object.keys(S).length>0?{...s,...n.values?.[n.currentStep.name],...S}:{...s,...xe};return _e({countryCode:c,form:e,fieldValues:H,query:m,options:{...o,queryOptions:{enabled:o.queryOptions?.enabled??!0},jsonSchemaVersion:o.jsonSchemaVersion}})},"useJSONSchema"),He=!!(c&&(n.currentStep.name==="basic_information"||f)),We=!!(c&&(n.currentStep.name==="contract_details"||f)),{data:u,isLoading:ee}=Z({form:"employment_basic_information",options:{jsfModify:i?.jsfModify?.basic_information,jsonSchemaVersion:i?.jsonSchemaVersion,queryOptions:{enabled:He}}}),b=i?.jsfModify?.contract_details?.fields?.annual_gross_salary,x=b&&typeof b=="object"&&"presentation"in b?b.presentation:void 0,te=i?.jsfModify?.contract_details?.fields?.equity_compensation,Ge=d(()=>({fields:{annual_gross_salary:{...b,presentation:{annual_gross_salary_conversion_properties:{label:x?.annual_gross_salary_conversion_properties?.label,description:x?.annual_gross_salary_conversion_properties?.description},desiredCurrency:q?.desired_currency,Component:l(e=>Be(Le,{desiredCurrency:q?.desired_currency||"",...e}),"Component")}},equity_compensation:{...te,presentation:{calculateDynamicProperties:l((e,o)=>{let m=e.equity_compensation?.offer_equity_compensation,M=o?.meta?.cost;return{extra:Be(ke,{offerEquity:m,equityCost:M})}},"calculateDynamicProperties")}}}}),[b,x,q?.desired_currency,te]),$e=Te(i?.jsonSchemaVersion),{data:y,isLoading:ne}=Z({form:"contract_details",query:{employment_id:a},options:{jsfModify:{...i?.jsfModify?.contract_details,fields:{...i?.jsfModify?.contract_details?.fields,...Ge.fields}},queryOptions:{enabled:We},jsonSchemaVersion:$e}}),{data:P,isLoading:oe}=Se(a,S,i),ie=d(()=>{if(n.currentStep.name==="benefits"){let e={...n.values?.[n.currentStep.name],...S};return rt({},B,e)}return{}},[n.currentStep.name,B,n.values,S]),t=d(()=>({select_country:v?.fields||[],basic_information:u?.fields||[],contract_details:y?.fields||[],benefits:P?.fields||[],review:[]}),[v?.fields,u?.fields,y?.fields,P?.fields]),ze={select_country:null,basic_information:u?.meta["x-jsf-fieldsets"],contract_details:y?.meta["x-jsf-fieldsets"],benefits:null,review:null},{country:Ke,basic_information:se={},contract_details:ae={},status:re}=r||{},ce=Ke?.code,le=n.currentStep.name,g=d(()=>L(t.select_country,{country:c||ce||""}),[t.select_country,c,ce]),F=d(()=>{let e={...s,...se};return L(t.basic_information,e)},[t.basic_information,se,s]),p=d(()=>{let e={...s,...ae};return L(t.contract_details,e)},[t.contract_details,ae,s]),E=d(()=>{let e={...s,...ie};return L(t.benefits,e)},[t.benefits,ie,s]),Ye=d(()=>r?{select_country:g,basic_information:W(t.basic_information,F),contract_details:r?.contract_details!==null?W(t.contract_details,p):p,benefits:E}:{select_country:g,basic_information:F,contract_details:p,benefits:E},[g,F,p,E,r,t]),{isLoading:Qe,isNavigatingToReview:me,isEmploymentReadOnly:Xe,canInvite:Ze}=d(()=>mt({isLoadingBasicInformationForm:ee,isLoadingContractDetailsForm:ne,isLoadingEmployment:k,isLoadingBenefitsOffersSchema:oe,isLoadingBenefitOffers:j,isLoadingCompany:G,isLoadingCountries:z,employmentId:f,employmentStatus:re,basicInformationFields:t.basic_information,contractDetailsFields:t.contract_details,currentStepName:le}),[ee,ne,k,oe,j,G,z,f,re,t.basic_information,t.contract_details,le]);st(()=>{me&&(_.current={select_country:V(g,t.select_country),basic_information:V(F,t.basic_information),contract_details:V(p,t.contract_details),benefits:V(E,t.benefits)},$({select_country:g,basic_information:F,contract_details:p,benefits:E,review:{}}),U("review"))},[F,E,p,U,me,g,$,t.basic_information,t.benefits,t.contract_details,t.select_country]);let de=l(e=>v&&n.currentStep.name==="select_country"?e:u&&n.currentStep.name==="basic_information"?h(e,u?.fields,{isPartialValidation:!1}):y&&n.currentStep.name==="contract_details"?h(e,y?.fields,{isPartialValidation:!1}):{},"parseFormValues");async function et(e){let o=n.currentStep.name;o in _.current&&(_.current[o]=V(e,t[o]));let m=de(e);switch(je(),n.currentStep.name){case"select_country":return O(m.country),Promise.resolve({data:{countryCode:m.country}});case"basic_information":{let M=!a&&c,H=a&&c&&r?.country&&r?.country.code!==c;if(M||H){let it={basic_information:m,type:I,country_code:c,external_id:C};try{let T=await Ie(it),fe=T.data?.data?.employment?.id;return A(fe),await De.mutateAsync({employmentId:fe,eligible_to_work_in_residing_country:"citizen",employer_or_work_restrictions:!1}),T}catch(T){throw console.error("Error creating onboarding:",T),T}}else if(a)return X({employmentId:a,basic_information:m,pricing_plan_details:{frequency:"monthly"},external_id:C});return}case"contract_details":return X({employmentId:a,external_id:C,...{contract_details:m,pricing_plan_details:{frequency:"monthly"}}});case"benefits":return Ne({employmentId:a,...e})}}l(et,"onSubmit");function tt(){Re()}l(tt,"back");function nt(){Je()}l(nt,"next");function ot(e){U(e)}return l(ot,"goTo"),{employmentId:a,creditRiskStatus:q?.default_legal_entity_credit_risk_status,fieldValues:S,stepState:n,fields:t[n.currentStep.name],isLoading:Qe,isSubmitting:K.isPending||Y.isPending||Q.isPending,initialValues:Ye,handleValidation:l(e=>{if(n.currentStep.name==="select_country")return v.handleValidation(e);if(n.currentStep.name==="benefits"&&P){let o=h(e,P?.fields,{isPartialValidation:!1});return P?.handleValidation(o)}if(u&&n.currentStep.name==="basic_information"){let o=h(e,u?.fields,{isPartialValidation:!1});return u?.handleValidation(o)}if(y&&n.currentStep.name==="contract_details"){let o=h(e,y?.fields,{isPartialValidation:!1});return y?.handleValidation(o)}return null},"handleValidation"),checkFieldUpdates:ve,parseFormValues:de,onSubmit:et,back:tt,next:nt,goTo:ot,meta:{fields:_.current,fieldsets:ze[n.currentStep.name]},refetchEmployment:w,employment:r,isEmploymentReadOnly:Xe,canInvite:Ze}},"useOnboarding");export{ht as a};
|
|
2
|
+
//# sourceMappingURL=chunk-GKD2WI2W.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/flows/Onboarding/hooks.tsx"],"sourcesContent":["import {\n Employment,\n EmploymentCreateParams,\n EmploymentFullParams,\n} from '@/src/client';\nimport { Fields } from '@remoteoss/json-schema-form';\n\nimport { useStepState, Step } from '@/src/flows/useStepState';\nimport {\n disabledInviteButtonEmploymentStatus,\n getContractDetailsSchemaVersion,\n reviewStepAllowedEmploymentStatus,\n STEPS,\n STEPS_WITHOUT_SELECT_COUNTRY,\n} from '@/src/flows/Onboarding/utils';\nimport { prettifyFormValues } from '@/src/lib/utils';\nimport {\n getInitialValues,\n enableAckFields,\n parseJSFToValidate,\n} from '@/src/components/form/utils';\nimport { mutationToPromise } from '@/src/lib/mutations';\nimport { FieldValues } from 'react-hook-form';\nimport { OnboardingFlowProps } from '@/src/flows/Onboarding/types';\nimport { useEffect, useMemo, useRef, useState } from 'react';\nimport mergeWith from 'lodash.mergewith';\nimport {\n useBenefitOffers,\n useBenefitOffersSchema,\n useCompany,\n useCountriesSchemaField,\n useCreateEmployment,\n useEmployment,\n useJSONSchemaForm,\n useUpdateBenefitsOffers,\n useUpdateEmployment,\n useUpsertContractEligibility,\n} from '@/src/flows/Onboarding/api';\nimport { FlowOptions, JSFModify, JSONSchemaFormType } from '@/src/flows/types';\nimport { AnnualGrossSalary } from '@/src/flows/Onboarding/components/AnnualGrossSalary';\nimport { $TSFixMe, JSFField, JSFFieldset, Meta } from '@/src/types/remoteFlows';\nimport { EquityPriceDetails } from '@/src/flows/Onboarding/components/EquityPriceDetails';\n\ntype OnboardingHookProps = Omit<OnboardingFlowProps, 'render'>;\n\nconst jsonSchemaToEmployment: Partial<\n Record<JSONSchemaFormType, keyof Employment>\n> = {\n employment_basic_information: 'basic_information',\n contract_details: 'contract_details',\n};\n\nconst stepToFormSchemaMap: Record<\n keyof typeof STEPS,\n JSONSchemaFormType | null\n> = {\n select_country: null,\n basic_information: 'employment_basic_information',\n contract_details: 'contract_details',\n benefits: null,\n review: null,\n};\n\nconst getLoadingStates = ({\n isLoadingBasicInformationForm,\n isLoadingContractDetailsForm,\n isLoadingEmployment,\n isLoadingBenefitsOffersSchema,\n isLoadingBenefitOffers,\n isLoadingCompany,\n isLoadingCountries,\n employmentStatus,\n employmentId,\n currentStepName,\n basicInformationFields,\n contractDetailsFields,\n}: {\n isLoadingBasicInformationForm: boolean;\n isLoadingContractDetailsForm: boolean;\n isLoadingEmployment: boolean;\n isLoadingBenefitsOffersSchema: boolean;\n isLoadingBenefitOffers: boolean;\n isLoadingCompany: boolean;\n isLoadingCountries: boolean;\n employmentStatus?: Employment['status'];\n employmentId?: string;\n currentStepName: string;\n basicInformationFields: Fields;\n contractDetailsFields: Fields;\n}) => {\n const initialLoading =\n isLoadingBasicInformationForm ||\n isLoadingContractDetailsForm ||\n isLoadingEmployment ||\n isLoadingBenefitsOffersSchema ||\n isLoadingBenefitOffers ||\n isLoadingCompany ||\n isLoadingCountries;\n\n const isEmploymentReadOnly =\n employmentStatus &&\n reviewStepAllowedEmploymentStatus.includes(employmentStatus);\n\n const canInvite =\n employmentStatus &&\n !disabledInviteButtonEmploymentStatus.includes(employmentStatus);\n\n const shouldHandleReadOnlyEmployment = Boolean(\n employmentId && isEmploymentReadOnly && currentStepName !== 'review',\n );\n\n const isLoading = initialLoading || shouldHandleReadOnlyEmployment;\n\n const isNavigatingToReview = Boolean(\n shouldHandleReadOnlyEmployment &&\n !initialLoading &&\n basicInformationFields.length > 0 &&\n contractDetailsFields.length > 0,\n );\n\n return {\n isLoading,\n isNavigatingToReview,\n isEmploymentReadOnly,\n canInvite,\n };\n};\n\nexport const useOnboarding = ({\n employmentId,\n companyId,\n countryCode,\n type,\n options,\n skipSteps,\n externalId,\n initialValues: onboardingInitialValues,\n}: OnboardingHookProps) => {\n const fieldsMetaRef = useRef<{\n select_country: Meta;\n basic_information: Meta;\n contract_details: Meta;\n benefits: Meta;\n }>({\n select_country: {},\n basic_information: {},\n contract_details: {},\n benefits: {},\n });\n const [internalEmploymentId, setInternalEmploymentId] = useState<\n string | undefined\n >(employmentId);\n const [internalCountryCode, setInternalCountryCode] = useState<string | null>(\n countryCode || null,\n );\n const {\n data: employment,\n isLoading: isLoadingEmployment,\n refetch: refetchEmployment,\n } = useEmployment(internalEmploymentId);\n\n // if the employment is loaded, country code has not been set yet\n // we set the internal country code with the employment country code\n if (employmentId && employment?.country?.code && !internalCountryCode) {\n setInternalCountryCode(employment.country.code);\n }\n\n const { data: benefitOffers, isLoading: isLoadingBenefitOffers } =\n useBenefitOffers(internalEmploymentId);\n\n const {\n data: company,\n isLoading: isLoadingCompany,\n refetch: refetchCompany,\n } = useCompany(companyId);\n const stepsToUse = skipSteps?.includes('select_country')\n ? STEPS_WITHOUT_SELECT_COUNTRY\n : STEPS;\n\n const {\n fieldValues,\n stepState,\n setFieldValues,\n previousStep,\n nextStep,\n goToStep,\n setStepValues,\n } = useStepState(\n stepsToUse as Record<keyof typeof STEPS, Step<keyof typeof STEPS>>,\n );\n\n const { selectCountryForm, isLoading: isLoadingCountries } =\n useCountriesSchemaField({\n jsfModify: options?.jsfModify?.select_country,\n queryOptions: {\n enabled: stepState.currentStep.name === 'select_country',\n },\n });\n\n const createEmploymentMutation = useCreateEmployment(options);\n const updateEmploymentMutation = useUpdateEmployment(options);\n const updateBenefitsOffersMutation = useUpdateBenefitsOffers(options);\n const updateContractEligibilityMutation = useUpsertContractEligibility();\n const { mutateAsync: createEmploymentMutationAsync } = mutationToPromise(\n createEmploymentMutation,\n );\n const { mutateAsync: updateEmploymentMutationAsync } = mutationToPromise(\n updateEmploymentMutation,\n );\n const { mutateAsync: updateBenefitsOffersMutationAsync } = mutationToPromise(\n updateBenefitsOffersMutation,\n );\n\n const formType =\n stepToFormSchemaMap[stepState.currentStep.name] ||\n 'employment_basic_information';\n const employmentKey = jsonSchemaToEmployment[formType] as keyof Employment;\n const serverEmploymentData = (employment?.[employmentKey] || {}) as Record<\n string,\n unknown\n >;\n\n const useJSONSchema = ({\n form,\n options: jsonSchemaOptions = {},\n query = {},\n }: {\n form: JSONSchemaFormType;\n options?: {\n jsfModify?: JSFModify;\n queryOptions?: { enabled?: boolean };\n jsonSchemaVersion?: FlowOptions['jsonSchemaVersion'];\n };\n query?: Record<string, string>;\n }) => {\n const hasUserEnteredAnyValues = Object.keys(fieldValues).length > 0;\n // when you write on the fields, the values are stored in the fieldValues state\n // when values are stored in the stepState is when the user has navigated to the step\n // and then we have the values from the server and the onboardingInitialValues that the user can inject,\n const mergedFormValues = hasUserEnteredAnyValues\n ? {\n ...onboardingInitialValues,\n ...stepState.values?.[stepState.currentStep.name], // Restore values for the current step\n ...fieldValues,\n }\n : {\n ...onboardingInitialValues,\n ...serverEmploymentData,\n };\n\n return useJSONSchemaForm({\n countryCode: internalCountryCode as string,\n form: form,\n fieldValues: mergedFormValues,\n query,\n options: {\n ...jsonSchemaOptions,\n queryOptions: {\n enabled: jsonSchemaOptions.queryOptions?.enabled ?? true,\n },\n jsonSchemaVersion: jsonSchemaOptions.jsonSchemaVersion,\n },\n });\n };\n\n const isBasicInformationDetailsEnabled = Boolean(\n internalCountryCode &&\n (stepState.currentStep.name === 'basic_information' ||\n Boolean(employmentId)),\n );\n\n const isContractDetailsEnabled = Boolean(\n internalCountryCode &&\n (stepState.currentStep.name === 'contract_details' ||\n Boolean(employmentId)),\n );\n\n const {\n data: basicInformationForm,\n isLoading: isLoadingBasicInformationForm,\n } = useJSONSchema({\n form: 'employment_basic_information',\n options: {\n jsfModify: options?.jsfModify?.basic_information,\n jsonSchemaVersion: options?.jsonSchemaVersion,\n queryOptions: {\n enabled: isBasicInformationDetailsEnabled,\n },\n },\n });\n\n const annualGrossSalaryField =\n options?.jsfModify?.contract_details?.fields?.annual_gross_salary;\n const annualSalaryFieldPresentation =\n annualGrossSalaryField &&\n typeof annualGrossSalaryField === 'object' &&\n 'presentation' in annualGrossSalaryField\n ? (\n annualGrossSalaryField as {\n presentation?: {\n annual_gross_salary_conversion_properties?: {\n label?: string;\n description?: string;\n };\n };\n }\n ).presentation\n : undefined;\n\n const equityCompensationField =\n options?.jsfModify?.contract_details?.fields?.equity_compensation;\n\n const customFields = useMemo(\n () => ({\n fields: {\n annual_gross_salary: {\n ...annualGrossSalaryField,\n presentation: {\n annual_gross_salary_conversion_properties: {\n label:\n annualSalaryFieldPresentation\n ?.annual_gross_salary_conversion_properties?.label,\n description:\n annualSalaryFieldPresentation\n ?.annual_gross_salary_conversion_properties?.description,\n },\n desiredCurrency: company?.desired_currency,\n Component: (props: JSFField & { currency: string }) => {\n return (\n <AnnualGrossSalary\n desiredCurrency={company?.desired_currency || ''}\n {...props}\n />\n );\n },\n },\n },\n equity_compensation: {\n ...equityCompensationField,\n presentation: {\n calculateDynamicProperties: (\n values: FieldValues,\n field: JSFField,\n ) => {\n const offerEquity =\n values.equity_compensation?.offer_equity_compensation;\n const equityCost = field?.meta?.cost;\n\n return {\n extra: (\n <EquityPriceDetails\n offerEquity={offerEquity}\n equityCost={equityCost as $TSFixMe}\n />\n ),\n };\n },\n },\n },\n },\n }),\n [\n annualGrossSalaryField,\n annualSalaryFieldPresentation,\n company?.desired_currency,\n equityCompensationField,\n ],\n );\n\n const effectiveContractDetailsJsonSchemaVersion =\n getContractDetailsSchemaVersion(options?.jsonSchemaVersion);\n\n const { data: contractDetailsForm, isLoading: isLoadingContractDetailsForm } =\n useJSONSchema({\n form: 'contract_details',\n query: {\n employment_id: internalEmploymentId as string,\n },\n options: {\n jsfModify: {\n ...options?.jsfModify?.contract_details,\n fields: {\n ...options?.jsfModify?.contract_details?.fields,\n ...customFields.fields,\n },\n },\n queryOptions: {\n enabled: isContractDetailsEnabled,\n },\n jsonSchemaVersion: effectiveContractDetailsJsonSchemaVersion,\n },\n });\n\n const {\n data: benefitOffersSchema,\n isLoading: isLoadingBenefitsOffersSchema,\n } = useBenefitOffersSchema(\n internalEmploymentId as string,\n fieldValues,\n options,\n );\n\n const initialValuesBenefitOffers = useMemo(() => {\n if (stepState.currentStep.name === 'benefits') {\n const benefitsFormValues = {\n ...stepState.values?.[stepState.currentStep.name as keyof typeof STEPS], // Restore values for the current step\n ...fieldValues,\n };\n return mergeWith({}, benefitOffers, benefitsFormValues);\n }\n return {};\n }, [\n stepState.currentStep.name,\n benefitOffers,\n stepState.values,\n fieldValues,\n ]);\n\n const stepFields: Record<keyof typeof STEPS, Fields> = useMemo(\n () => ({\n select_country: selectCountryForm?.fields || [],\n basic_information: basicInformationForm?.fields || [],\n contract_details: contractDetailsForm?.fields || [],\n benefits: benefitOffersSchema?.fields || [],\n review: [],\n }),\n [\n selectCountryForm?.fields,\n basicInformationForm?.fields,\n contractDetailsForm?.fields,\n benefitOffersSchema?.fields,\n ],\n );\n\n const stepFieldsWithFlatFieldsets: Record<\n keyof typeof STEPS,\n JSFFieldset | null | undefined\n > = {\n select_country: null,\n basic_information: basicInformationForm?.meta['x-jsf-fieldsets'],\n contract_details: contractDetailsForm?.meta['x-jsf-fieldsets'],\n benefits: null,\n review: null,\n };\n\n const {\n country,\n basic_information: employmentBasicInformation = {},\n contract_details: employmentContractDetails = {},\n status: employmentStatus,\n } = employment || {};\n\n const employmentCountryCode = country?.code;\n const currentStepName = stepState.currentStep.name;\n\n const selectCountryInitialValues = useMemo(\n () =>\n getInitialValues(stepFields.select_country, {\n country: internalCountryCode || employmentCountryCode || '',\n }),\n [stepFields.select_country, internalCountryCode, employmentCountryCode],\n );\n\n const basicInformationInitialValues = useMemo(() => {\n const initialValues = {\n ...onboardingInitialValues,\n ...employmentBasicInformation,\n };\n\n return getInitialValues(stepFields.basic_information, initialValues);\n }, [\n stepFields.basic_information,\n employmentBasicInformation,\n onboardingInitialValues,\n ]);\n\n const contractDetailsInitialValues = useMemo(() => {\n const initialValues = {\n ...onboardingInitialValues,\n ...employmentContractDetails,\n };\n\n return getInitialValues(stepFields.contract_details, initialValues);\n }, [\n stepFields.contract_details,\n employmentContractDetails,\n onboardingInitialValues,\n ]);\n\n const benefitsInitialValues = useMemo(() => {\n const initialValues = {\n ...onboardingInitialValues,\n ...initialValuesBenefitOffers,\n };\n\n return getInitialValues(stepFields.benefits, initialValues);\n }, [\n stepFields.benefits,\n initialValuesBenefitOffers,\n onboardingInitialValues,\n ]);\n\n const initialValues = useMemo(() => {\n if (employment) {\n return {\n select_country: selectCountryInitialValues,\n // We don't store ack fields in the db, eg \"ack_start_date_ammendment\" for Argentina, and therefore is not returned in the employment response\n // So when an employmentId exists, it means that the user has already started the onboarding process, and we need to enable the ack fields\n basic_information: enableAckFields(\n stepFields['basic_information'],\n basicInformationInitialValues,\n ),\n contract_details:\n // if contract details is null, it means it has not been filled yet, so we can't enable the ack fields\n employment?.contract_details !== null\n ? enableAckFields(\n stepFields['contract_details'],\n contractDetailsInitialValues,\n )\n : contractDetailsInitialValues,\n benefits: benefitsInitialValues,\n };\n }\n return {\n select_country: selectCountryInitialValues,\n basic_information: basicInformationInitialValues,\n contract_details: contractDetailsInitialValues,\n benefits: benefitsInitialValues,\n };\n }, [\n selectCountryInitialValues,\n basicInformationInitialValues,\n contractDetailsInitialValues,\n benefitsInitialValues,\n employment,\n stepFields,\n ]);\n\n const { isLoading, isNavigatingToReview, isEmploymentReadOnly, canInvite } =\n useMemo(\n () =>\n getLoadingStates({\n isLoadingBasicInformationForm,\n isLoadingContractDetailsForm,\n isLoadingEmployment,\n isLoadingBenefitsOffersSchema,\n isLoadingBenefitOffers,\n isLoadingCompany,\n isLoadingCountries,\n employmentId,\n employmentStatus: employmentStatus,\n basicInformationFields: stepFields.basic_information,\n contractDetailsFields: stepFields.contract_details,\n currentStepName: currentStepName,\n }),\n [\n isLoadingBasicInformationForm,\n isLoadingContractDetailsForm,\n isLoadingEmployment,\n isLoadingBenefitsOffersSchema,\n isLoadingBenefitOffers,\n isLoadingCompany,\n isLoadingCountries,\n employmentId,\n employmentStatus,\n stepFields.basic_information,\n stepFields.contract_details,\n currentStepName,\n ],\n );\n\n useEffect(() => {\n if (isNavigatingToReview) {\n fieldsMetaRef.current = {\n select_country: prettifyFormValues(\n selectCountryInitialValues,\n stepFields.select_country,\n ),\n basic_information: prettifyFormValues(\n basicInformationInitialValues,\n stepFields.basic_information,\n ),\n contract_details: prettifyFormValues(\n contractDetailsInitialValues,\n stepFields.contract_details,\n ),\n benefits: prettifyFormValues(\n benefitsInitialValues,\n stepFields.benefits,\n ),\n };\n\n setStepValues({\n select_country: selectCountryInitialValues,\n basic_information: basicInformationInitialValues,\n contract_details: contractDetailsInitialValues,\n benefits: benefitsInitialValues,\n review: {},\n });\n\n goToStep('review');\n }\n }, [\n basicInformationInitialValues,\n benefitsInitialValues,\n contractDetailsInitialValues,\n goToStep,\n isNavigatingToReview,\n selectCountryInitialValues,\n setStepValues,\n stepFields.basic_information,\n stepFields.benefits,\n stepFields.contract_details,\n stepFields.select_country,\n ]);\n\n const parseFormValues = (values: FieldValues) => {\n if (selectCountryForm && stepState.currentStep.name === 'select_country') {\n return values;\n }\n if (\n basicInformationForm &&\n stepState.currentStep.name === 'basic_information'\n ) {\n return parseJSFToValidate(values, basicInformationForm?.fields, {\n isPartialValidation: false,\n });\n }\n\n if (\n contractDetailsForm &&\n stepState.currentStep.name === 'contract_details'\n ) {\n return parseJSFToValidate(values, contractDetailsForm?.fields, {\n isPartialValidation: false,\n });\n }\n\n return {};\n };\n\n async function onSubmit(values: FieldValues) {\n // Prettify values for the current step\n const currentStepName = stepState.currentStep.name;\n if (currentStepName in fieldsMetaRef.current) {\n fieldsMetaRef.current[\n currentStepName as keyof typeof fieldsMetaRef.current\n ] = prettifyFormValues(values, stepFields[currentStepName]);\n }\n\n const parsedValues = parseFormValues(values);\n refetchCompany();\n switch (stepState.currentStep.name) {\n case 'select_country': {\n setInternalCountryCode(parsedValues.country);\n return Promise.resolve({ data: { countryCode: parsedValues.country } });\n }\n case 'basic_information': {\n const isEmploymentNotLoaded =\n !internalEmploymentId && internalCountryCode;\n const hasChangedCountry =\n internalEmploymentId &&\n internalCountryCode &&\n employment?.country &&\n employment?.country.code !== internalCountryCode;\n if (isEmploymentNotLoaded || hasChangedCountry) {\n const payload: EmploymentCreateParams = {\n basic_information: parsedValues,\n type: type,\n country_code: internalCountryCode,\n external_id: externalId,\n };\n try {\n const response = await createEmploymentMutationAsync(payload);\n // @ts-expect-error the types from the response are not matching\n const employmentId = response.data?.data?.employment?.id;\n setInternalEmploymentId(employmentId);\n await updateContractEligibilityMutation.mutateAsync({\n employmentId: employmentId,\n eligible_to_work_in_residing_country: 'citizen',\n employer_or_work_restrictions: false,\n });\n\n return response;\n } catch (error) {\n console.error('Error creating onboarding:', error);\n throw error;\n }\n } else if (internalEmploymentId) {\n return updateEmploymentMutationAsync({\n employmentId: internalEmploymentId,\n basic_information: parsedValues,\n pricing_plan_details: {\n frequency: 'monthly',\n },\n external_id: externalId,\n });\n }\n\n return;\n }\n case 'contract_details': {\n const payload: EmploymentFullParams = {\n contract_details: parsedValues,\n pricing_plan_details: {\n frequency: 'monthly',\n },\n };\n return updateEmploymentMutationAsync({\n employmentId: internalEmploymentId as string,\n external_id: externalId,\n ...payload,\n });\n }\n\n case 'benefits': {\n return updateBenefitsOffersMutationAsync({\n employmentId: internalEmploymentId as string,\n ...values,\n });\n }\n }\n return;\n }\n\n function back() {\n previousStep();\n }\n\n function next() {\n nextStep();\n }\n\n function goTo(step: keyof typeof STEPS) {\n goToStep(step);\n }\n\n return {\n /**\n * Employment id passed useful to be used between components\n */\n employmentId: internalEmploymentId,\n\n /**\n * Credit risk status of the company, useful to know what to to show in the review step\n * The possible values are:\n * - not_started\n * - ready\n * - in_progress\n * - referred\n * - fail\n * - deposit_required\n * - no_deposit_required\n */\n\n creditRiskStatus: company?.default_legal_entity_credit_risk_status,\n /**\n * Current state of the form fields for the current step.\n */\n fieldValues,\n /**\n * Current step state containing the current step and total number of steps\n */\n stepState,\n /**\n * Array of form fields from the onboarding schema\n */\n fields: stepFields[stepState.currentStep.name],\n /**\n * Loading state indicating if the onboarding schema is being fetched\n */\n isLoading: isLoading,\n /**\n * Loading state indicating if the onboarding mutation is in progress\n */\n isSubmitting:\n createEmploymentMutation.isPending ||\n updateEmploymentMutation.isPending ||\n updateBenefitsOffersMutation.isPending,\n /**\n * Initial form values\n */\n initialValues,\n /**\n * Function to validate form values against the onboarding schema\n * @param values - Form values to validate\n * @returns Validation result or null if no schema is available\n */\n handleValidation: (values: FieldValues) => {\n if (stepState.currentStep.name === 'select_country') {\n return selectCountryForm.handleValidation(values);\n }\n if (stepState.currentStep.name === 'benefits' && benefitOffersSchema) {\n const parsedValues = parseJSFToValidate(\n values,\n benefitOffersSchema?.fields,\n { isPartialValidation: false },\n );\n\n return benefitOffersSchema?.handleValidation(parsedValues);\n }\n if (\n basicInformationForm &&\n stepState.currentStep.name === 'basic_information'\n ) {\n const parsedValues = parseJSFToValidate(\n values,\n basicInformationForm?.fields,\n { isPartialValidation: false },\n );\n return basicInformationForm?.handleValidation(parsedValues);\n }\n\n if (\n contractDetailsForm &&\n stepState.currentStep.name === 'contract_details'\n ) {\n const parsedValues = parseJSFToValidate(\n values,\n contractDetailsForm?.fields,\n { isPartialValidation: false },\n );\n return contractDetailsForm?.handleValidation(parsedValues);\n }\n\n return null;\n },\n /**\n * Function to update the current form field values\n * @param values - New form values to set\n */\n checkFieldUpdates: setFieldValues,\n\n /**\n * Function to parse form values before submission\n * @param values - Form values to parse\n * @returns Parsed form values\n */\n parseFormValues,\n\n /**\n * Function to handle form submission\n * @param values - Form values to submit\n * @returns Promise resolving to the mutation result\n */\n onSubmit,\n\n /**\n * Function to handle going back to the previous step\n * @returns {void}\n */\n back,\n\n /**\n * Function to handle going to the next step\n * @returns {void}\n */\n next,\n\n /**\n * Function to handle going to a specific step\n * @param step The step to go to.\n * @returns {void}\n */\n goTo,\n\n /**\n * Fields metadata for each step\n */\n meta: {\n fields: fieldsMetaRef.current,\n fieldsets: stepFieldsWithFlatFieldsets[stepState.currentStep.name],\n },\n\n /**\n * Function to refetch the employment data\n * @returns {void}\n */\n refetchEmployment,\n /**\n * Employment data\n */\n employment,\n\n /**\n * let's the user know that the employment cannot be edited, happens when employment.status is invited, created_awaiting_reserve or created_reserve_paid\n * @returns {boolean}\n */\n isEmploymentReadOnly,\n\n /**\n * let's the user know if the company can invite employees\n * @returns {boolean}\n */\n canInvite,\n };\n};\n"],"mappings":"meAwBA,OAAS,aAAAA,GAAW,WAAAC,EAAS,UAAAC,GAAQ,YAAAC,OAAgB,QACrD,OAAOC,OAAe,mBAgTN,cAAAC,OAAA,oBA5RhB,IAAMC,GAEF,CACF,6BAA8B,oBAC9B,iBAAkB,kBACpB,EAEMC,GAGF,CACF,eAAgB,KAChB,kBAAmB,+BACnB,iBAAkB,mBAClB,SAAU,KACV,OAAQ,IACV,EAEMC,GAAmBC,EAAA,CAAC,CACxB,8BAAAC,EACA,6BAAAC,EACA,oBAAAC,EACA,8BAAAC,EACA,uBAAAC,EACA,iBAAAC,EACA,mBAAAC,EACA,iBAAAC,EACA,aAAAC,EACA,gBAAAC,EACA,uBAAAC,EACA,sBAAAC,CACF,IAaM,CACJ,IAAMC,EACJZ,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,EAEIO,EACJN,GACAO,GAAkC,SAASP,CAAgB,EAEvDQ,EACJR,GACA,CAACS,GAAqC,SAAST,CAAgB,EAE3DU,EAAiC,GACrCT,GAAgBK,GAAwBJ,IAAoB,UAGxDS,EAAYN,GAAkBK,EAE9BE,EAAuB,GAC3BF,GACE,CAACL,GACDF,EAAuB,OAAS,GAChCC,EAAsB,OAAS,GAGnC,MAAO,CACL,UAAAO,EACA,qBAAAC,EACA,qBAAAN,EACA,UAAAE,CACF,CACF,EA/DyB,oBAiEZK,GAAgBrB,EAAA,CAAC,CAC5B,aAAAS,EACA,UAAAa,EACA,YAAAC,EACA,KAAAC,EACA,QAAAC,EACA,UAAAC,EACA,WAAAC,EACA,cAAeC,CACjB,IAA2B,CACzB,IAAMC,EAAgBC,GAKnB,CACD,eAAgB,CAAC,EACjB,kBAAmB,CAAC,EACpB,iBAAkB,CAAC,EACnB,SAAU,CAAC,CACb,CAAC,EACK,CAACC,EAAsBC,CAAuB,EAAIC,GAEtDxB,CAA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GAAA,QAIF,CAIL,aAAchG,EAcd,iBAAkBU,GAAS,wCAI3B,YAAAM,EAIA,UAAAC,EAIA,OAAQqD,EAAWrD,EAAU,YAAY,IAAI,EAI7C,UAAW7B,GAIX,aACEsC,EAAyB,WACzBE,EAAyB,WACzBE,EAA6B,UAI/B,cAAAiD,GAMA,iBAAkB9G,EAACwF,GAAwB,CACzC,GAAIxC,EAAU,YAAY,OAAS,iBACjC,OAAOO,EAAkB,iBAAiBiC,CAAM,EAElD,GAAIxC,EAAU,YAAY,OAAS,YAAcgD,EAAqB,CACpE,IAAMuB,EAAeF,EACnB7B,EACAQ,GAAqB,OACrB,CAAE,oBAAqB,EAAM,CAC/B,EAEA,OAAOA,GAAqB,iBAAiBuB,CAAY,CAC3D,CACA,GACEvC,GACAhC,EAAU,YAAY,OAAS,oBAC/B,CACA,IAAMuE,EAAeF,EACnB7B,EACAR,GAAsB,OACtB,CAAE,oBAAqB,EAAM,CAC/B,EACA,OAAOA,GAAsB,iBAAiBuC,CAAY,CAC5D,CAEA,GACExB,GACA/C,EAAU,YAAY,OAAS,mBAC/B,CACA,IAAMuE,EAAeF,EACnB7B,EACAO,GAAqB,OACrB,CAAE,oBAAqB,EAAM,CAC/B,EACA,OAAOA,GAAqB,iBAAiBwB,CAAY,CAC3D,CAEA,OAAO,IACT,EAtCkB,oBA2ClB,kBAAmBtE,GAOnB,gBAAAmE,GAOA,SAAAE,GAMA,KAAAO,GAMA,KAAAC,GAOA,KAAAC,GAKA,KAAM,CACJ,OAAQlG,EAAc,QACtB,UAAWyE,GAA4BtD,EAAU,YAAY,IAAI,CACnE,EAMA,kBAAAX,EAIA,WAAAD,EAMA,qBAAAtB,GAMA,UAAAE,EACF,CACF,EAhwB6B","names":["useEffect","useMemo","useRef","useState","mergeWith","jsx","jsonSchemaToEmployment","stepToFormSchemaMap","getLoadingStates","__name","isLoadingBasicInformationForm","isLoadingContractDetailsForm","isLoadingEmployment","isLoadingBenefitsOffersSchema","isLoadingBenefitOffers","isLoadingCompany","isLoadingCountries","employmentStatus","employmentId","currentStepName","basicInformationFields","contractDetailsFields","initialLoading","isEmploymentReadOnly","reviewStepAllowedEmploymentStatus","canInvite","disabledInviteButtonEmploymentStatus","shouldHandleReadOnlyEmployment","isLoading","isNavigatingToReview","useOnboarding","companyId","countryCode","type","options","skipSteps","externalId","onboardingInitialValues","fieldsMetaRef","useRef","internalEmploymentId","setInternalEmploymentId","useState","internalCountryCode","setInternalCountryCode","employment","refetchEmployment","useEmployment","benefitOffers","useBenefitOffers","company","refetchCompany","useCompany","stepsToUse","STEPS_WITHOUT_SELECT_COUNTRY","STEPS","fieldValues","stepState","setFieldValues","previousStep","nextStep","goToStep","setStepValues","useStepState","selectCountryForm","useCountriesSchemaField","createEmploymentMutation","useCreateEmployment","updateEmploymentMutation","useUpdateEmployment","updateBenefitsOffersMutation","useUpdateBenefitsOffers","updateContractEligibilityMutation","useUpsertContractEligibility","createEmploymentMutationAsync","mutationToPromise","updateEmploymentMutationAsync","updateBenefitsOffersMutationAsync","formType","employmentKey","serverEmploymentData","useJSONSchema","form","jsonSchemaOptions","query","mergedFormValues","useJSONSchemaForm","isBasicInformationDetailsEnabled","isContractDetailsEnabled","basicInformationForm","annualGrossSalaryField","annualSalaryFieldPresentation","equityCompensationField","customFields","useMemo","props","AnnualGrossSalary","values","field","offerEquity","equityCost","EquityPriceDetails","effectiveContractDetailsJsonSchemaVersion","getContractDetailsSchemaVersion","contractDetailsForm","benefitOffersSchema","useBenefitOffersSchema","initialValuesBenefitOffers","benefitsFormValues","mergeWith","stepFields","stepFieldsWithFlatFieldsets","country","employmentBasicInformation","employmentContractDetails","employmentCountryCode","selectCountryInitialValues","getInitialValues","basicInformationInitialValues","initialValues","contractDetailsInitialValues","benefitsInitialValues","enableAckFields","useEffect","prettifyFormValues","parseFormValues","parseJSFToValidate","onSubmit","parsedValues","isEmploymentNotLoaded","hasChangedCountry","payload","response","error","back","next","goTo","step"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as y}from"./chunk-WVDTHFGS.js";import{a}from"./chunk-43WMZDDH.js";import{a as o}from"./chunk-P37U34EQ.js";import*as w from"react";import*as f from"@radix-ui/react-checkbox";import{Check as B}from"lucide-react";import{jsx as h}from"react/jsx-runtime";var G=w.forwardRef(({className:e,...t},s)=>h(f.Root,{ref:s,className:a("peer h-4 w-4 shrink-0 rounded-sm border border-input ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-checkbox data-[state=checked]:text-primary",e),...t,children:h(f.Indicator,{className:a("flex items-center justify-center text-current"),children:h(B,{className:"h-4 w-4"})})}));G.displayName=f.Root.displayName;import{useState as F,useRef as U,useEffect as V}from"react";import{Upload as A,X as E}from"lucide-react";import{jsx as d,jsxs as P}from"react/jsx-runtime";var L=o(e=>e?e.split(",").map(t=>t.trim().toUpperCase()).join(", "):null,"getAcceptedFormats");function se({onChange:e,className:t,multiple:s,accept:g,files:u}){let[v,b]=F(u||[]),N=U(null);V(()=>{u&&u.length>0&&b(u)},[u]);let I=o(l=>{l.preventDefault(),N.current?.click()},"handleClick"),z=o(l=>{if(l.target.files&&l.target.files.length>0){let m=Array.from(l.target.files);b(m),e(m)}},"handleChange"),_=o(l=>{b(m=>m.filter(T=>T.name!==l.name)),e(v.filter(m=>m.name!==l.name))},"onRemoveFile"),D=L(g);return P("div",{className:a("flex flex-col items-start gap-4",t),children:[d("input",{type:"file",ref:N,onChange:z,className:"hidden","aria-label":"File upload",multiple:s,accept:g}),P(y,{type:"button",onClick:I,className:"gap-2",children:[d(A,{className:"h-4 w-4"}),"Choose File"]}),D&&P("div",{className:"text-sm text-gray-600",children:["Accepted formats:"," ",d("span",{className:"font-medium",children:D})]}),v.length===0&&d("div",{className:"text-sm",children:s?d("span",{className:"font-medium",children:"No files selected. You can select multiple files"}):d("span",{className:"font-medium",children:"No file selected."})}),v.length>0&&v.map((l,m)=>P("div",{className:"text-sm flex items-center gap-2",children:["Selected file: ",d("span",{className:"font-medium",children:l.name})," (",Math.round(l.size/1024)," KB)",d(y,{variant:"ghost",onClick:()=>_(l),children:d(E,{})})]},m))]})}o(se,"FileUploader");import*as p from"@radix-ui/react-radio-group";import{CircleIcon as M}from"lucide-react";import{jsx as x}from"react/jsx-runtime";function pe({className:e,...t}){return x(p.Root,{"data-slot":"radio-group",className:a("grid gap-3",e),...t})}o(pe,"RadioGroup");function ue({className:e,...t}){return x(p.Item,{"data-slot":"radio-group-item",className:a("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:x(p.Indicator,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:x(M,{className:"fill-radio absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})})})}o(ue,"RadioGroupItem");import*as i from"@radix-ui/react-select";import{CheckIcon as j,ChevronDownIcon as k,ChevronUpIcon as H}from"lucide-react";import{jsx as r,jsxs as C}from"react/jsx-runtime";function be({...e}){return r(i.Root,{"data-slot":"select",...e})}o(be,"Select");function ye({...e}){return r(i.Group,{"data-slot":"select-group",...e})}o(ye,"SelectGroup");function he({...e}){return r(i.Value,{"data-slot":"select-value",...e})}o(he,"SelectValue");function Ce({className:e,children:t,...s}){return C(i.Trigger,{"data-slot":"select-trigger",className:a("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex w-full items-center justify-between rounded-xl border bg-transparent px-4 py-7 text-sm whitespace-nowrap transition-[color] outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","focus-visible:border-focused",e),...s,children:[t,r(i.Icon,{asChild:!0,className:"absolute right-4",children:r(k,{className:"size-4"})})]})}o(Ce,"SelectTrigger");function Re({className:e,children:t,position:s="popper",...g}){return r(i.Portal,{children:C(i.Content,{"data-slot":"select-content",className:a("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 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-xl border",s==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:s,...g,children:[r(O,{}),r(i.Viewport,{className:a(s==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),r(X,{})]})})}o(Re,"SelectContent");function Se({className:e,children:t,...s}){return C(i.Item,{"data-slot":"select-item",className:a("focus:bg-accent focus:text-accent-foreground min-h-11 justify-between [&_svg:not([class*='text-'])]:text-muted-foreground flex w-full cursor-default items-center gap-2 py-2 px-4 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...s,children:[r(i.ItemText,{children:t}),r("span",{className:"flex size-3.5 items-center justify-center",children:r(i.ItemIndicator,{children:r(j,{className:"size-4"})})})]})}o(Se,"SelectItem");function O({className:e,...t}){return r(i.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:a("flex cursor-default items-center justify-center py-1",e),...t,children:r(H,{className:"size-4"})})}o(O,"SelectScrollUpButton");function X({className:e,...t}){return r(i.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:a("flex cursor-default items-center justify-center py-1",e),...t,children:r(k,{className:"size-4"})})}o(X,"SelectScrollDownButton");import*as n from"@radix-ui/react-dialog";import{XIcon as q}from"lucide-react";import{jsx as c,jsxs as R}from"react/jsx-runtime";function ze({...e}){return c(n.Root,{"data-slot":"dialog",...e})}o(ze,"Dialog");function _e({...e}){return c(n.Trigger,{"data-slot":"dialog-trigger",...e})}o(_e,"DialogTrigger");function K({...e}){return c(n.Portal,{"data-slot":"dialog-portal",...e})}o(K,"DialogPortal");function W({className:e,...t}){return c(n.Overlay,{"data-slot":"dialog-overlay",className:a("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}o(W,"DialogOverlay");function Te({className:e,children:t,...s}){return R(K,{"data-slot":"dialog-portal",children:[c(W,{}),R(n.Content,{"data-slot":"dialog-content",className:a("bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",e),...s,children:[t,R(n.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 RemoteFlows__Dialog__Close",children:[c(q,{}),c("span",{className:"sr-only",children:"Close"})]})]})]})}o(Te,"DialogContent");function Be({className:e,...t}){return c("div",{"data-slot":"dialog-header",className:a("flex flex-col gap-2 text-center sm:text-left",e),...t})}o(Be,"DialogHeader");function Ge({className:e,...t}){return c("div",{"data-slot":"dialog-footer",className:a("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}o(Ge,"DialogFooter");function Fe({className:e,...t}){return c(n.Title,{"data-slot":"dialog-title",className:a("text-lg leading-none font-semibold",e),...t})}o(Fe,"DialogTitle");function Ue({className:e,...t}){return c(n.Description,{"data-slot":"dialog-description",className:a("text-muted-foreground text-sm",e),...t})}o(Ue,"DialogDescription");import{cva as Y}from"class-variance-authority";import{jsx as S}from"react/jsx-runtime";var J=Y("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-card bg-warning border-warning-border [&>svg]:text-current"}},defaultVariants:{variant:"default"}});function je({className:e,variant:t,...s}){return S("div",{"data-slot":"alert",role:"alert",className:a(J({variant:t}),e),...s})}o(je,"Alert");function He({className:e,...t}){return S("div",{"data-slot":"alert-title",className:a("col-start-2 min-h-4 font-medium tracking-tight",e),...t})}o(He,"AlertTitle");function Oe({className:e,...t}){return S("div",{"data-slot":"alert-description",className:a("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed inline-block",e),...t})}o(Oe,"AlertDescription");export{G as a,se as b,pe as c,ue as d,be as e,ye as f,he as g,Ce as h,Re as i,Se as j,ze as k,_e as l,Te as m,Be as n,Ge as o,Fe as p,Ue as q,je as r,He as s,Oe as t};
|
|
2
|
+
//# sourceMappingURL=chunk-GOGPCCBS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/ui/checkbox.tsx","../src/components/ui/file-uploader.tsx","../src/components/ui/radio-group.tsx","../src/components/ui/select.tsx","../src/components/ui/dialog.tsx","../src/components/ui/alert.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox';\nimport { Check } from 'lucide-react';\n\nimport { cn } from '@/src/lib/utils';\n\nconst Checkbox = React.forwardRef<\n React.ComponentRef<typeof CheckboxPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <CheckboxPrimitive.Root\n ref={ref}\n className={cn(\n 'peer h-4 w-4 shrink-0 rounded-sm border border-input ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-checkbox data-[state=checked]:text-primary',\n className,\n )}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n className={cn('flex items-center justify-center text-current')}\n >\n <Check className='h-4 w-4' />\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n));\nCheckbox.displayName = CheckboxPrimitive.Root.displayName;\n\nexport { Checkbox };\n","import React, { useState, useRef, useEffect } from 'react';\nimport { Button } from '@/src/components/ui/button';\nimport { Upload, X } from 'lucide-react';\nimport { cn } from '@/src/lib/utils';\n\n// Convert accept string to readable format (e.g., \".pdf, .doc\" -> \"PDF, DOC\")\nconst getAcceptedFormats = (accept?: string) => {\n if (!accept) return null;\n return accept\n .split(',')\n .map((ext) => ext.trim().toUpperCase())\n .join(', ');\n};\n\ntype FileUploaderProps = {\n onChange: (files: File[]) => void;\n className?: string;\n multiple?: boolean;\n accept?: string;\n files?: File[];\n};\n\nexport function FileUploader({\n onChange,\n className,\n multiple,\n accept,\n files: externalFiles,\n}: FileUploaderProps) {\n const [files, setFiles] = useState<File[]>(externalFiles || []);\n const inputRef = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n if (externalFiles && externalFiles.length > 0) {\n setFiles(externalFiles);\n }\n }, [externalFiles]);\n\n const handleClick = (e: React.MouseEvent<HTMLButtonElement>) => {\n e.preventDefault();\n inputRef.current?.click();\n };\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (e.target.files && e.target.files.length > 0) {\n const newFiles = Array.from(e.target.files);\n\n setFiles(newFiles);\n onChange(newFiles);\n }\n };\n\n const onRemoveFile = (file: File) => {\n setFiles((prevFiles) => prevFiles.filter((f) => f.name !== file.name));\n onChange(files.filter((f) => f.name !== file.name));\n };\n\n const acceptedFormats = getAcceptedFormats(accept);\n\n return (\n <div className={cn('flex flex-col items-start gap-4', className)}>\n <input\n type='file'\n ref={inputRef}\n onChange={handleChange}\n className='hidden'\n aria-label='File upload'\n multiple={multiple}\n accept={accept}\n />\n <Button type='button' onClick={handleClick} className='gap-2'>\n <Upload className='h-4 w-4' />\n Choose File\n </Button>\n {acceptedFormats && (\n <div className='text-sm text-gray-600'>\n Accepted formats:{' '}\n <span className='font-medium'>{acceptedFormats}</span>\n </div>\n )}\n {files.length === 0 && (\n <div className='text-sm'>\n {!multiple ? (\n <span className='font-medium'>No file selected.</span>\n ) : (\n <span className='font-medium'>\n No files selected. You can select multiple files\n </span>\n )}\n </div>\n )}\n {files.length > 0 &&\n files.map((file, index) => (\n <div key={index} className='text-sm flex items-center gap-2'>\n Selected file: <span className='font-medium'>{file.name}</span> (\n {Math.round(file.size / 1024)} KB)\n <Button variant='ghost' onClick={() => onRemoveFile(file)}>\n <X />\n </Button>\n </div>\n ))}\n </div>\n );\n}\n","import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';\nimport { CircleIcon } from 'lucide-react';\nimport * as React from 'react';\n\nimport { cn } from '@/src/lib/utils';\n\nfunction RadioGroup({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {\n return (\n <RadioGroupPrimitive.Root\n data-slot='radio-group'\n className={cn('grid gap-3', className)}\n {...props}\n />\n );\n}\n\nfunction RadioGroupItem({\n className,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item>) {\n return (\n <RadioGroupPrimitive.Item\n data-slot='radio-group-item'\n className={cn(\n 'border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n data-slot='radio-group-indicator'\n className='relative flex items-center justify-center'\n >\n <CircleIcon className='fill-radio absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2' />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n}\n\nexport { RadioGroup, RadioGroupItem };\n","import * as React from 'react';\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';\n\nimport { cn } from '@/src/lib/utils';\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot='select' {...props} />;\n}\n\nfunction SelectGroup({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot='select-group' {...props} />;\n}\n\nfunction SelectValue({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot='select-value' {...props} />;\n}\n\nfunction SelectTrigger({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger>) {\n return (\n <SelectPrimitive.Trigger\n data-slot='select-trigger'\n className={cn(\n \"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive flex w-full items-center justify-between rounded-xl border bg-transparent px-4 py-7 text-sm whitespace-nowrap transition-[color] outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n 'focus-visible:border-focused',\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild className='absolute right-4'>\n <ChevronDownIcon className='size-4' />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\nfunction SelectContent({\n className,\n children,\n position = 'popper',\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot='select-content'\n className={cn(\n '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 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-xl border',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot='select-label'\n className={cn('px-2 py-1.5 text-sm font-medium', className)}\n {...props}\n />\n );\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot='select-item'\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground min-h-11 justify-between [&_svg:not([class*='text-'])]:text-muted-foreground flex w-full cursor-default items-center gap-2 py-2 px-4 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className,\n )}\n {...props}\n >\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n <span className='flex size-3.5 items-center justify-center'>\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className='size-4' />\n </SelectPrimitive.ItemIndicator>\n </span>\n </SelectPrimitive.Item>\n );\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot='select-separator'\n className={cn('bg-border pointer-events-none -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot='select-scroll-up-button'\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className,\n )}\n {...props}\n >\n <ChevronUpIcon className='size-4' />\n </SelectPrimitive.ScrollUpButton>\n );\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot='select-scroll-down-button'\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className,\n )}\n {...props}\n >\n <ChevronDownIcon className='size-4' />\n </SelectPrimitive.ScrollDownButton>\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n};\n","'use client';\n\nimport * as React from 'react';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { XIcon } from 'lucide-react';\n\nimport { cn } from '@/src/lib/utils';\n\nfunction Dialog({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot='dialog' {...props} />;\n}\n\nfunction DialogTrigger({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot='dialog-trigger' {...props} />;\n}\n\nfunction DialogPortal({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot='dialog-portal' {...props} />;\n}\n\nfunction DialogClose({\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot='dialog-close' {...props} />;\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot='dialog-overlay'\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DialogContent({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content>) {\n return (\n <DialogPortal data-slot='dialog-portal'>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot='dialog-content'\n className={cn(\n 'bg-background 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 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg',\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 RemoteFlows__Dialog__Close\">\n <XIcon />\n <span className='sr-only'>Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='dialog-header'\n className={cn('flex flex-col gap-2 text-center sm:text-left', className)}\n {...props}\n />\n );\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='dialog-footer'\n className={cn(\n 'flex flex-col-reverse gap-2 sm:flex-row sm:justify-end',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DialogTitle({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot='dialog-title'\n className={cn('text-lg leading-none font-semibold', className)}\n {...props}\n />\n );\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot='dialog-description'\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n );\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n","import { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\n\nimport { cn } from '@/src/lib/utils';\n\nconst alertVariants = cva(\n 'relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current',\n {\n variants: {\n variant: {\n default: 'bg-card text-card-foreground',\n destructive:\n 'text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90',\n warning:\n 'bg-card bg-warning border-warning-border [&>svg]:text-current',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nfunction Alert({\n className,\n variant,\n ...props\n}: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>) {\n return (\n <div\n data-slot='alert'\n role='alert'\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n );\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='alert-title'\n className={cn(\n 'col-start-2 min-h-4 font-medium tracking-tight',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction AlertDescription({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot='alert-description'\n className={cn(\n 'text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed inline-block',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Alert, AlertDescription, AlertTitle };\n"],"mappings":"mHAEA,UAAYA,MAAW,QACvB,UAAYC,MAAuB,2BACnC,OAAS,SAAAC,MAAa,eAmBhB,cAAAC,MAAA,oBAfN,IAAMC,EAAiB,aAGrB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC1BJ,EAAmB,OAAlB,CACC,IAAKI,EACL,UAAWC,EACT,qSACAH,CACF,EACC,GAAGC,EAEJ,SAAAH,EAAmB,YAAlB,CACC,UAAWK,EAAG,+CAA+C,EAE7D,SAAAL,EAACM,EAAA,CAAM,UAAU,UAAU,EAC7B,EACF,CACD,EACDL,EAAS,YAAgC,OAAK,YC3B9C,OAAgB,YAAAM,EAAU,UAAAC,EAAQ,aAAAC,MAAiB,QAEnD,OAAS,UAAAC,EAAQ,KAAAC,MAAS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CACR,QAAS,CACP,QAAS,+BACT,YACE,oGACF,QACE,+DACJ,CACF,EACA,gBAAiB,CACf,QAAS,SACX,CACF,CACF,EAEA,SAASC,GAAM,CACb,UAAAC,EACA,QAAAC,EACA,GAAGC,CACL,EAAqE,CACnE,OACEN,EAAC,OACC,YAAU,QACV,KAAK,QACL,UAAWO,EAAGN,EAAc,CAAE,QAAAI,CAAQ,CAAC,EAAGD,CAAS,EAClD,GAAGE,EACN,CAEJ,CAbSE,EAAAL,GAAA,SAeT,SAASM,GAAW,CAAE,UAAAL,EAAW,GAAGE,CAAM,EAAgC,CACxE,OACEN,EAAC,OACC,YAAU,cACV,UAAWO,EACT,kDACAH,CACF,EACC,GAAGE,EACN,CAEJ,CAXSE,EAAAC,GAAA,cAaT,SAASC,GAAiB,CACxB,UAAAN,EACA,GAAGE,CACL,EAAgC,CAC9B,OACEN,EAAC,OACC,YAAU,oBACV,UAAWO,EACT,8GACAH,CACF,EACC,GAAGE,EACN,CAEJ,CAdSE,EAAAE,GAAA","names":["React","CheckboxPrimitive","Check","jsx","Checkbox","className","props","ref","cn","Check","useState","useRef","useEffect","Upload","X","jsx","jsxs","getAcceptedFormats","__name","accept","ext","FileUploader","onChange","className","multiple","externalFiles","files","setFiles","useState","inputRef","useRef","useEffect","handleClick","e","handleChange","newFiles","onRemoveFile","file","prevFiles","f","acceptedFormats","cn","Button","Upload","index","X","RadioGroupPrimitive","CircleIcon","jsx","RadioGroup","className","props","cn","__name","RadioGroupItem","CircleIcon","SelectPrimitive","CheckIcon","ChevronDownIcon","ChevronUpIcon","jsx","jsxs","Select","props","__name","SelectGroup","SelectValue","SelectTrigger","className","children","cn","ChevronDownIcon","SelectContent","position","SelectScrollUpButton","SelectScrollDownButton","SelectItem","className","children","props","jsxs","cn","jsx","CheckIcon","__name","SelectScrollUpButton","className","props","jsx","cn","ChevronUpIcon","__name","SelectScrollDownButton","ChevronDownIcon","DialogPrimitive","XIcon","jsx","jsxs","Dialog","props","__name","DialogTrigger","DialogPortal","DialogOverlay","className","props","jsx","cn","__name","DialogContent","children","jsxs","DialogPortal","XIcon","DialogHeader","DialogFooter","DialogTitle","DialogDescription","cva","jsx","alertVariants","cva","Alert","className","variant","props","cn","__name","AlertTitle","AlertDescription"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-DPY77ASH.js";import{a as p}from"./chunk-B6IVJUEH.js";import{a as i}from"./chunk-ENW4DCDU.js";import{a as e}from"./chunk-P7JZC65P.js";import{a as c}from"./chunk-SRRY72CZ.js";import{a as d}from"./chunk-TWVFLXVF.js";import{a as n}from"./chunk-5ZR7EFPY.js";import{a as f}from"./chunk-SO3YQ4WT.js";import{a as t}from"./chunk-TOA3JILU.js";import{a}from"./chunk-YDJVQRND.js";import{a as r}from"./chunk-P37U34EQ.js";import{useId as u}from"react";import{jsx as v}from"react/jsx-runtime";var A=r(({render:g,employmentId:C,externalId:S,countryCode:b,skipSteps:s,initialValues:O,options:l})=>{let o=a({options:l,employmentId:C,externalId:S,countryCode:b,skipSteps:s,initialValues:O}),P=u();return v(t.Provider,{value:{contractorOnboardingBag:o,formId:P},children:g({contractorOnboardingBag:o,components:{BasicInformationStep:e,SelectCountryStep:i,BackButton:n,SubmitButton:m,PricingPlanStep:p,ContractDetailsStep:c,ContractPreviewStep:d,OnboardingInvite:f}})})},"ContractorOnboardingFlow");export{A as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HBHVB56P.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{l as K}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{l as K}from"./chunk-5KZXFQLZ.js";import{a as w}from"./chunk-BV3PGYSH.js";import{b as J}from"./chunk-3ZWDIEEM.js";import{c as G}from"./chunk-CNDSIADP.js";import{a as t,b as d,c as Me}from"./chunk-P37U34EQ.js";var L=d((Et,U)=>{"use strict";function Pe(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}t(Pe,"isObject");U.exports=Pe});var X=d(($t,V)=>{"use strict";var _e=typeof global=="object"&&global&&global.Object===Object&&global;V.exports=_e});var F=d((qt,z)=>{"use strict";var ke=X(),we=typeof self=="object"&&self&&self.Object===Object&&self,Le=ke||we||Function("return this")();z.exports=Le});var Y=d((It,Q)=>{"use strict";var Fe=F(),Ae=t(function(){return Fe.Date.now()},"now");Q.exports=Ae});var ee=d((Pt,Z)=>{"use strict";var We=/\s/;function De(e){for(var n=e.length;n--&&We.test(e.charAt(n)););return n}t(De,"trimmedEndIndex");Z.exports=De});var ne=d((kt,te)=>{"use strict";var Be=ee(),Ne=/^\s+/;function He(e){return e&&e.slice(0,Be(e)+1).replace(Ne,"")}t(He,"baseTrim");te.exports=He});var A=d((Lt,re)=>{"use strict";var Ge=F(),Je=Ge.Symbol;re.exports=Je});var ae=d((Ft,se)=>{"use strict";var oe=A(),ie=Object.prototype,Ke=ie.hasOwnProperty,Ue=ie.toString,O=oe?oe.toStringTag:void 0;function Ve(e){var n=Ke.call(e,O),r=e[O];try{e[O]=void 0;var o=!0}catch{}var s=Ue.call(e);return o&&(n?e[O]=r:delete e[O]),s}t(Ve,"getRawTag");se.exports=Ve});var ue=d((Wt,ce)=>{"use strict";var Xe=Object.prototype,ze=Xe.toString;function Qe(e){return ze.call(e)}t(Qe,"objectToString");ce.exports=Qe});var me=d((Bt,le)=>{"use strict";var fe=A(),Ye=ae(),Ze=ue(),et="[object Null]",tt="[object Undefined]",de=fe?fe.toStringTag:void 0;function nt(e){return e==null?e===void 0?tt:et:de&&de in Object(e)?Ye(e):Ze(e)}t(nt,"baseGetTag");le.exports=nt});var pe=d((Ht,ge)=>{"use strict";function rt(e){return e!=null&&typeof e=="object"}t(rt,"isObjectLike");ge.exports=rt});var ve=d((Jt,be)=>{"use strict";var ot=me(),it=pe(),st="[object Symbol]";function at(e){return typeof e=="symbol"||it(e)&&ot(e)==st}t(at,"isSymbol");be.exports=at});var Te=d((Ut,xe)=>{"use strict";var ct=ne(),ye=L(),ut=ve(),he=NaN,ft=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,lt=/^0o[0-7]+$/i,mt=parseInt;function gt(e){if(typeof e=="number")return e;if(ut(e))return he;if(ye(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=ye(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=ct(e);var r=dt.test(e);return r||lt.test(e)?mt(e.slice(2),r?2:8):ft.test(e)?he:+e}t(gt,"toNumber");xe.exports=gt});var je=d((Xt,Se)=>{"use strict";var pt=L(),W=Y(),Ce=Te(),bt="Expected a function",vt=Math.max,yt=Math.min;function ht(e,n,r){var o,s,p,l,a,c,m=0,E=!1,u=!1,h=!0;if(typeof e!="function")throw new TypeError(bt);n=Ce(n)||0,pt(r)&&(E=!!r.leading,u="maxWait"in r,p=u?vt(Ce(r.maxWait)||0,n):p,h="trailing"in r?!!r.trailing:h);function x(i){var g=o,y=s;return o=s=void 0,m=i,l=e.apply(y,g),l}t(x,"invokeFunc");function R(i){return m=i,a=setTimeout(v,n),E?x(i):l}t(R,"leadingEdge");function C(i){var g=i-c,y=i-m,M=n-g;return u?yt(M,p-y):M}t(C,"remainingWait");function $(i){var g=i-c,y=i-m;return c===void 0||g>=n||g<0||u&&y>=p}t($,"shouldInvoke");function v(){var i=W();if($(i))return b(i);a=setTimeout(v,C(i))}t(v,"timerExpired");function b(i){return a=void 0,h&&o?x(i):(o=s=void 0,l)}t(b,"trailingEdge");function q(){a!==void 0&&clearTimeout(a),m=0,o=c=s=a=void 0}t(q,"cancel");function I(){return a===void 0?l:b(W())}t(I,"flush");function S(){var i=W(),g=$(i);if(o=arguments,s=this,c=i,g){if(a===void 0)return R(c);if(u)return clearTimeout(a),a=setTimeout(v,n),x(c)}return a===void 0&&(a=setTimeout(v,n)),l}return t(S,"debounced"),S.cancel=q,S.flush=I,S}t(ht,"debounce");Se.exports=ht});import{useState as Ct,useCallback as St,useEffect as Re,useRef as $e}from"react";var Ee=Me(je(),1);import{useCallback as xt,useEffect as Tt,useRef as Oe}from"react";function D(e,n){let r=Oe(e);Tt(()=>{r.current=e},[e]);let o=Oe((0,Ee.default)(s=>{r.current(s)},n)).current;return xt(s=>{o(s)},[o])}t(D,"useDebounce");import{Fragment as Ot,jsx as T,jsxs as qe}from"react/jsx-runtime";var jt=t(({description:e,showConversion:n,targetCurrency:r,className:o,onClick:s})=>{let{components:p}=J(),l=n?`Hide ${r} conversion`:`Show ${r} conversion`,a=p?.button;return qe("span",{className:o,children:[e," ",a?T(a,{className:`${o.replace("-description","-button")}`,"data-type":"inline",onClick:s,children:l}):T("button",{className:`${o.replace("-description","-button")}`,onClick:s,children:l})]})},"DescriptionWithConversion"),cn=t(({sourceCurrency:e,targetCurrency:n,mainFieldName:r,conversionFieldName:o,conversionProperties:s,classNamePrefix:p,description:l,conversionType:a="spread",...c})=>{let[m,E]=Ct(!1),{setValue:u,watch:h}=G(),x=h(r||c.name),R=$e(!0),C=$e(new Map),$=e&&n&&e!==n,{mutateAsync:v}=K({type:a}),b=`${c.name}_converted`;Re(()=>{u(b,r||c.name)},[u,r,c.name,b]),Re(()=>{if(R.current){R.current=!1;return}u(o,"")},[e,o,u]);let q=St(async(f,j,k,B)=>{if(!f)return;let N=`${j}_${k}_${f}`,H=C.current.get(N);if(H){u(B,H.targetAmount);return}try{let P=await v({source_currency:j,target_currency:k,amount:Number(f)});if(P.data?.data?.conversion_data?.target_amount){let _=P.data.data.conversion_data.target_amount;if(_){u(B,_?.toString()),C.current.set(N,{targetAmount:_.toString()});let Ie=`${k}_${j}_${_}`;C.current.set(Ie,{targetAmount:f.toString()})}}}catch(P){console.error("Error converting currency:",P)}},[v,u]),I=D(f=>q(f,e,n,o),500),S=D(f=>q(f,n,e,r||c.name),500),i=t(f=>{u(b,r||c.name),m&&I(f.target.value)},"handleMainFieldChange"),g=t(f=>{u(b,o),S(f.target.value)},"handleConversionFieldChange"),y=t(f=>{f.preventDefault(),E(j=>!j),!m&&x&&I(x)},"toggleConversion"),M=$?T(jt,{targetCurrency:n,description:l,showConversion:m,className:`${p}-description`,onClick:y}):l;return qe(Ot,{children:[T(w,{...c,name:r||c.name,additionalProps:{currency:e},description:M,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:i}),m&&T(w,{additionalProps:{currency:n},name:o,label:s?.label||"Conversion",description:s?.description,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:g}),T("input",{type:"hidden",name:b,value:h(b)||r||c.name})]})},"CurrencyConversionField");export{cn as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HO2TIG7R.js.map
|