@remoteoss/remote-flows 0.22.0 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{utils-CjDMg_Yr.d.ts → ZendeskTriggerButton-FSCvhzTG.d.ts} +10 -1
- package/dist/{chunk-X5DMQNEM.js → chunk-2DSNHYHZ.js} +2 -2
- package/dist/{chunk-5QP2BAUT.js → chunk-2T2N5226.js} +2 -2
- package/dist/chunk-2UAG6WDW.js +2 -0
- package/dist/{chunk-WEYUB6DC.js → chunk-3W7RKLJX.js} +2 -2
- package/dist/{chunk-KJSZIASL.js → chunk-3XDJ2LRT.js} +2 -2
- package/dist/{chunk-K4NAASBM.js → chunk-4HT7RNFP.js} +2 -2
- package/dist/{chunk-2WDEVWIE.js → chunk-4NAVUB7D.js} +2 -2
- package/dist/{chunk-QU3NSFU5.js → chunk-4SIGN3ZP.js} +2 -2
- package/dist/chunk-4T6PRR6R.js +2 -0
- package/dist/{chunk-DKA2EUPQ.js.map → chunk-4T6PRR6R.js.map} +1 -1
- package/dist/{chunk-QP36XXCQ.js → chunk-5A54AHAT.js} +2 -2
- package/dist/{chunk-22JS3T6G.js → chunk-5H5INKOY.js} +2 -2
- package/dist/{chunk-C4AVUIG2.js → chunk-5ZR7EFPY.js} +2 -2
- package/dist/{chunk-JG7FV7OZ.js → chunk-64NSBY5G.js} +2 -2
- package/dist/{chunk-5N4L2G7Q.js → chunk-6VRUYYUV.js} +2 -2
- package/dist/{chunk-3I6ONATN.js → chunk-7IZGKQII.js} +2 -2
- package/dist/{chunk-EIVHHLR5.js → chunk-A7T27JCJ.js} +2 -2
- package/dist/{chunk-CELNQ7KS.js → chunk-AHBACWMD.js} +2 -2
- package/dist/{chunk-C4SMHWP4.js → chunk-ANGJCT4I.js} +2 -2
- package/dist/{chunk-XICA45G2.js → chunk-B7I7YVNK.js} +2 -2
- package/dist/{chunk-DHJZVBVD.js → chunk-BNHN4CEM.js} +2 -2
- package/dist/chunk-CGUTMSAU.js +2 -0
- package/dist/chunk-CGUTMSAU.js.map +1 -0
- package/dist/{chunk-5SKMAYLG.js → chunk-CRHH6IPF.js} +2 -2
- package/dist/{chunk-QIAZQLSG.js → chunk-DPY77ASH.js} +2 -2
- package/dist/{chunk-J26AI33Z.js → chunk-DUD7B2IY.js} +2 -2
- package/dist/{chunk-BPJHPGTL.js → chunk-EKKRQI6B.js} +2 -2
- package/dist/chunk-FBJCDOO7.js +2 -0
- package/dist/{chunk-VXPJXQP3.js.map → chunk-FBJCDOO7.js.map} +1 -1
- package/dist/{chunk-A6X6N2G7.js → chunk-FMBYJANY.js} +2 -2
- package/dist/chunk-G34OX26W.js +2 -0
- package/dist/chunk-G34OX26W.js.map +1 -0
- package/dist/{chunk-6L7JELHX.js → chunk-G4QOEPDP.js} +2 -2
- package/dist/{chunk-2U4VW5TT.js → chunk-GKS3W6KT.js} +2 -2
- package/dist/{chunk-2VWU5VNU.js → chunk-HEQLPSHZ.js} +2 -2
- package/dist/{chunk-TWD2IDAS.js → chunk-HPBT677J.js} +2 -2
- package/dist/chunk-HYIC33YR.js +2 -0
- package/dist/chunk-HYIC33YR.js.map +1 -0
- package/dist/{chunk-MRVBOQLW.js → chunk-ILPYR7RQ.js} +2 -2
- package/dist/{chunk-CHQK23RH.js → chunk-IM525UMG.js} +2 -2
- package/dist/{chunk-CHQK23RH.js.map → chunk-IM525UMG.js.map} +1 -1
- package/dist/{chunk-MISHDUB2.js → chunk-IXAWEBRI.js} +2 -2
- package/dist/{chunk-MISHDUB2.js.map → chunk-IXAWEBRI.js.map} +1 -1
- package/dist/{chunk-VE36I6G6.js → chunk-IYGJ5QJB.js} +2 -2
- package/dist/{chunk-PJUC5WAJ.js → chunk-JF3KJ6PA.js} +2 -2
- package/dist/{chunk-5EP45OQV.js → chunk-JVSD4JOU.js} +2 -2
- package/dist/{chunk-ULHGAKFT.js → chunk-L2IKFFQX.js} +2 -2
- package/dist/{chunk-XHOQSIXZ.js → chunk-LEXD5FVL.js} +2 -2
- package/dist/{chunk-MFKGLMRJ.js → chunk-LUDRB7LC.js} +2 -2
- package/dist/chunk-LUDRB7LC.js.map +1 -0
- package/dist/{chunk-NHYBFEXA.js → chunk-N6KOPITR.js} +2 -2
- package/dist/{chunk-OOUYQLIE.js → chunk-NGTESOKF.js} +2 -2
- package/dist/{chunk-GLUERRJ2.js → chunk-NIH7XLAK.js} +2 -2
- package/dist/{chunk-XTLLWD7O.js → chunk-O4DIUKVP.js} +2 -2
- package/dist/{chunk-IUU4MOLL.js → chunk-OIN3HGOQ.js} +2 -2
- package/dist/{chunk-D52VU4UO.js → chunk-OW5QGJD4.js} +2 -2
- package/dist/{chunk-BVCBX72U.js → chunk-P5WUODPR.js} +2 -2
- package/dist/{chunk-2GCMLKO2.js → chunk-PAT3EA43.js} +2 -2
- package/dist/{chunk-GECFDGI7.js → chunk-PKRI35YC.js} +2 -2
- package/dist/{chunk-GUHBW4V3.js → chunk-PWPFCC6I.js} +2 -2
- package/dist/{chunk-XKSAKI3P.js → chunk-Q4BKFSTW.js} +2 -2
- package/dist/{chunk-2NGJN5IE.js → chunk-Q5ZRKZMK.js} +2 -2
- package/dist/{chunk-GOB6DUFS.js → chunk-QIQTM4HB.js} +1 -1
- package/dist/chunk-QIQTM4HB.js.map +1 -0
- package/dist/{chunk-TGUF5Q7J.js → chunk-RDCWARSM.js} +2 -2
- package/dist/{chunk-T6BYBXQA.js → chunk-RF5SLMJF.js} +2 -2
- package/dist/{chunk-D5KITGC6.js → chunk-S2XKE7EA.js} +2 -2
- package/dist/{chunk-V6I3EMYX.js → chunk-SA3D5OH4.js} +2 -2
- package/dist/{chunk-B25LAMRX.js → chunk-SGJSMTYG.js} +2 -2
- package/dist/{chunk-FVFXPT3Y.js → chunk-TB75BHYW.js} +2 -2
- package/dist/{chunk-JX3OQNNM.js → chunk-U2LOBJFU.js} +2 -2
- package/dist/{chunk-RJGWAZBE.js → chunk-UPXJJBXZ.js} +2 -2
- package/dist/{chunk-IK6IRESD.js → chunk-VT4GSXMI.js} +2 -2
- package/dist/chunk-WVDTHFGS.js +2 -0
- package/dist/chunk-WVDTHFGS.js.map +1 -0
- package/dist/{chunk-V2PJW577.js → chunk-XMAQ4NRR.js} +2 -2
- package/dist/{chunk-7EDGHYMX.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/ContractAmendmentFlow.d.ts +3 -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 +3 -3
- package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
- package/dist/flows/ContractAmendment/hooks.js +1 -1
- package/dist/flows/ContractAmendment/index.d.ts +3 -3
- package/dist/flows/ContractAmendment/index.js +1 -1
- package/dist/flows/ContractAmendment/utils.d.ts +1 -1
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
- package/dist/flows/ContractorOnboarding/api.d.ts +2 -2
- package/dist/flows/ContractorOnboarding/api.js +1 -1
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +5 -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 +5 -5
- package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/ContractorOnboarding/context.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/hooks.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/hooks.js +1 -1
- package/dist/flows/ContractorOnboarding/index.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/index.js +1 -1
- package/dist/flows/ContractorOnboarding/types.d.ts +5 -5
- package/dist/flows/CostCalculator/CostCalculatorDisclaimer.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
- package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -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 +1 -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 +1 -1
- package/dist/flows/CostCalculator/api.d.ts +1 -1
- package/dist/flows/CostCalculator/api.js +1 -1
- package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
- package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
- package/dist/flows/CostCalculator/context.d.ts +3 -3
- package/dist/flows/CostCalculator/hooks.d.ts +3 -3
- package/dist/flows/CostCalculator/hooks.js +1 -1
- package/dist/flows/CostCalculator/index.d.ts +3 -3
- package/dist/flows/CostCalculator/index.js +1 -1
- package/dist/flows/CostCalculator/types.d.ts +1 -1
- package/dist/flows/CostCalculator/utils.d.ts +3 -3
- package/dist/flows/CostCalculator/utils.js +1 -1
- package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
- package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
- package/dist/flows/Onboarding/api.d.ts +4 -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 +4 -4
- package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/Onboarding/components/BenefitsStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
- package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +4 -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 +4 -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 +4 -4
- package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
- package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/Onboarding/context.d.ts +4 -4
- package/dist/flows/Onboarding/hooks.d.ts +4 -4
- package/dist/flows/Onboarding/hooks.js +1 -1
- package/dist/flows/Onboarding/index.d.ts +4 -4
- package/dist/flows/Onboarding/index.js +1 -1
- package/dist/flows/Onboarding/types.d.ts +4 -4
- package/dist/flows/Onboarding/utils.d.ts +4 -4
- package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -4
- package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
- package/dist/flows/Termination/EmployeeComunicationForm.d.ts +4 -4
- package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
- package/dist/flows/Termination/PaidTimeOffForm.d.ts +4 -4
- package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
- package/dist/flows/Termination/TerminationBack.js +1 -1
- package/dist/flows/Termination/TerminationDetailsForm.d.ts +4 -4
- package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
- package/dist/flows/Termination/TerminationFlow.d.ts +4 -4
- package/dist/flows/Termination/TerminationFlow.js +1 -1
- package/dist/flows/Termination/TerminationForm.d.ts +4 -4
- package/dist/flows/Termination/TerminationForm.js +1 -1
- package/dist/flows/Termination/TerminationSubmit.js +1 -1
- package/dist/flows/Termination/TimeOff.d.ts +1 -1
- package/dist/flows/Termination/TimeOff.js +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +8 -0
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.js +2 -0
- package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +2 -0
- package/dist/flows/Termination/components/TerminationReasonsDetailContent/TerminationReasonsDetailContent.js +2 -0
- package/dist/flows/Termination/components/TerminationReasonsDetailContent/TerminationReasonsDetailContent.js.map +1 -0
- package/dist/flows/Termination/context.d.ts +4 -4
- package/dist/flows/Termination/hooks.d.ts +4 -4
- package/dist/flows/Termination/hooks.js +1 -1
- package/dist/flows/Termination/index.d.ts +6 -6
- package/dist/flows/Termination/index.js +1 -1
- package/dist/flows/Termination/json-schemas/jsonSchema.d.ts +10 -0
- package/dist/flows/Termination/json-schemas/jsonSchema.js +1 -1
- package/dist/flows/Termination/json-schemas/paidTimeOff.d.ts +10 -0
- package/dist/flows/Termination/json-schemas/paidTimeOff.js +1 -1
- package/dist/flows/Termination/json-schemas/schema.js +1 -1
- package/dist/flows/Termination/types.d.ts +4 -4
- package/dist/flows/api.d.ts +4 -4
- package/dist/flows/api.js +1 -1
- package/dist/flows/types.d.ts +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +53 -14
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internals.d.ts +45 -53
- package/dist/internals.js +1 -1
- package/dist/{mutations-BxS-iGnr.d.ts → mutations-juOpbR-A.d.ts} +1 -1
- package/dist/{remoteFlows-DnbCoINb.d.ts → remoteFlows-D1VLPcdi.d.ts} +1 -1
- package/dist/{types-pEe84X2Z.d.ts → types-CBySMyLF.d.ts} +4 -4
- package/dist/{types-BnLDzD9Z.d.ts → types-CCzA9vuJ.d.ts} +3 -3
- package/dist/{types-D31aAyFm.d.ts → types-Cl_jsVYv.d.ts} +2 -2
- package/dist/{types.gen-DOXoUj5J.d.ts → types.gen-CxiSXabT.d.ts} +94 -1
- package/package.json +1 -1
- package/dist/chunk-DKA2EUPQ.js +0 -2
- package/dist/chunk-E773NPNL.js +0 -2
- package/dist/chunk-E773NPNL.js.map +0 -1
- package/dist/chunk-GOB6DUFS.js.map +0 -1
- package/dist/chunk-HTCONTKZ.js +0 -2
- package/dist/chunk-HTCONTKZ.js.map +0 -1
- package/dist/chunk-MFKGLMRJ.js.map +0 -1
- package/dist/chunk-PSEOAELN.js +0 -2
- package/dist/chunk-PSEOAELN.js.map +0 -1
- package/dist/chunk-VXPJXQP3.js +0 -2
- package/dist/chunk-Z442TFR6.js +0 -2
- package/dist/flows/Termination/TerminationDialogInfoContent/TerminationDialogInfoContent.js +0 -2
- package/dist/flows/Termination/TerminationReasonsDetailContent/TerminationReasonsDetailContent.js +0 -2
- /package/dist/{chunk-X5DMQNEM.js.map → chunk-2DSNHYHZ.js.map} +0 -0
- /package/dist/{chunk-5QP2BAUT.js.map → chunk-2T2N5226.js.map} +0 -0
- /package/dist/{chunk-Z442TFR6.js.map → chunk-2UAG6WDW.js.map} +0 -0
- /package/dist/{chunk-WEYUB6DC.js.map → chunk-3W7RKLJX.js.map} +0 -0
- /package/dist/{chunk-KJSZIASL.js.map → chunk-3XDJ2LRT.js.map} +0 -0
- /package/dist/{chunk-K4NAASBM.js.map → chunk-4HT7RNFP.js.map} +0 -0
- /package/dist/{chunk-2WDEVWIE.js.map → chunk-4NAVUB7D.js.map} +0 -0
- /package/dist/{chunk-QU3NSFU5.js.map → chunk-4SIGN3ZP.js.map} +0 -0
- /package/dist/{chunk-QP36XXCQ.js.map → chunk-5A54AHAT.js.map} +0 -0
- /package/dist/{chunk-22JS3T6G.js.map → chunk-5H5INKOY.js.map} +0 -0
- /package/dist/{chunk-C4AVUIG2.js.map → chunk-5ZR7EFPY.js.map} +0 -0
- /package/dist/{chunk-JG7FV7OZ.js.map → chunk-64NSBY5G.js.map} +0 -0
- /package/dist/{chunk-5N4L2G7Q.js.map → chunk-6VRUYYUV.js.map} +0 -0
- /package/dist/{chunk-3I6ONATN.js.map → chunk-7IZGKQII.js.map} +0 -0
- /package/dist/{chunk-EIVHHLR5.js.map → chunk-A7T27JCJ.js.map} +0 -0
- /package/dist/{chunk-CELNQ7KS.js.map → chunk-AHBACWMD.js.map} +0 -0
- /package/dist/{chunk-C4SMHWP4.js.map → chunk-ANGJCT4I.js.map} +0 -0
- /package/dist/{chunk-XICA45G2.js.map → chunk-B7I7YVNK.js.map} +0 -0
- /package/dist/{chunk-DHJZVBVD.js.map → chunk-BNHN4CEM.js.map} +0 -0
- /package/dist/{chunk-5SKMAYLG.js.map → chunk-CRHH6IPF.js.map} +0 -0
- /package/dist/{chunk-QIAZQLSG.js.map → chunk-DPY77ASH.js.map} +0 -0
- /package/dist/{chunk-J26AI33Z.js.map → chunk-DUD7B2IY.js.map} +0 -0
- /package/dist/{chunk-BPJHPGTL.js.map → chunk-EKKRQI6B.js.map} +0 -0
- /package/dist/{chunk-A6X6N2G7.js.map → chunk-FMBYJANY.js.map} +0 -0
- /package/dist/{chunk-6L7JELHX.js.map → chunk-G4QOEPDP.js.map} +0 -0
- /package/dist/{chunk-2U4VW5TT.js.map → chunk-GKS3W6KT.js.map} +0 -0
- /package/dist/{chunk-2VWU5VNU.js.map → chunk-HEQLPSHZ.js.map} +0 -0
- /package/dist/{chunk-TWD2IDAS.js.map → chunk-HPBT677J.js.map} +0 -0
- /package/dist/{chunk-MRVBOQLW.js.map → chunk-ILPYR7RQ.js.map} +0 -0
- /package/dist/{chunk-VE36I6G6.js.map → chunk-IYGJ5QJB.js.map} +0 -0
- /package/dist/{chunk-PJUC5WAJ.js.map → chunk-JF3KJ6PA.js.map} +0 -0
- /package/dist/{chunk-5EP45OQV.js.map → chunk-JVSD4JOU.js.map} +0 -0
- /package/dist/{chunk-ULHGAKFT.js.map → chunk-L2IKFFQX.js.map} +0 -0
- /package/dist/{chunk-XHOQSIXZ.js.map → chunk-LEXD5FVL.js.map} +0 -0
- /package/dist/{chunk-NHYBFEXA.js.map → chunk-N6KOPITR.js.map} +0 -0
- /package/dist/{chunk-OOUYQLIE.js.map → chunk-NGTESOKF.js.map} +0 -0
- /package/dist/{chunk-GLUERRJ2.js.map → chunk-NIH7XLAK.js.map} +0 -0
- /package/dist/{chunk-XTLLWD7O.js.map → chunk-O4DIUKVP.js.map} +0 -0
- /package/dist/{chunk-IUU4MOLL.js.map → chunk-OIN3HGOQ.js.map} +0 -0
- /package/dist/{chunk-D52VU4UO.js.map → chunk-OW5QGJD4.js.map} +0 -0
- /package/dist/{chunk-BVCBX72U.js.map → chunk-P5WUODPR.js.map} +0 -0
- /package/dist/{chunk-2GCMLKO2.js.map → chunk-PAT3EA43.js.map} +0 -0
- /package/dist/{chunk-GECFDGI7.js.map → chunk-PKRI35YC.js.map} +0 -0
- /package/dist/{chunk-GUHBW4V3.js.map → chunk-PWPFCC6I.js.map} +0 -0
- /package/dist/{chunk-XKSAKI3P.js.map → chunk-Q4BKFSTW.js.map} +0 -0
- /package/dist/{chunk-2NGJN5IE.js.map → chunk-Q5ZRKZMK.js.map} +0 -0
- /package/dist/{chunk-TGUF5Q7J.js.map → chunk-RDCWARSM.js.map} +0 -0
- /package/dist/{chunk-T6BYBXQA.js.map → chunk-RF5SLMJF.js.map} +0 -0
- /package/dist/{chunk-D5KITGC6.js.map → chunk-S2XKE7EA.js.map} +0 -0
- /package/dist/{chunk-V6I3EMYX.js.map → chunk-SA3D5OH4.js.map} +0 -0
- /package/dist/{chunk-B25LAMRX.js.map → chunk-SGJSMTYG.js.map} +0 -0
- /package/dist/{chunk-FVFXPT3Y.js.map → chunk-TB75BHYW.js.map} +0 -0
- /package/dist/{chunk-JX3OQNNM.js.map → chunk-U2LOBJFU.js.map} +0 -0
- /package/dist/{chunk-RJGWAZBE.js.map → chunk-UPXJJBXZ.js.map} +0 -0
- /package/dist/{chunk-IK6IRESD.js.map → chunk-VT4GSXMI.js.map} +0 -0
- /package/dist/{chunk-V2PJW577.js.map → chunk-XMAQ4NRR.js.map} +0 -0
- /package/dist/{chunk-7EDGHYMX.js.map → chunk-ZQ6MG635.js.map} +0 -0
- /package/dist/flows/Termination/{TerminationDialogInfoContent/TerminationDialogInfoContent.js.map → components/PaidTimeOff/PaidTimeOff.js.map} +0 -0
- /package/dist/flows/Termination/{TerminationDialogInfoContent → components/TerminationDialogInfoContent}/TerminationDialogInfoContent.d.ts +0 -0
- /package/dist/flows/Termination/{TerminationReasonsDetailContent/TerminationReasonsDetailContent.js.map → components/TerminationDialogInfoContent/TerminationDialogInfoContent.js.map} +0 -0
- /package/dist/flows/Termination/{TerminationReasonsDetailContent → components/TerminationReasonsDetailContent}/TerminationReasonsDetailContent.d.ts +0 -0
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/RemoteFlowsProvider.tsx","../src/lib/applyTheme.ts","../src/theme.tsx","../src/environments.ts","../src/useAuth.ts"],"sourcesContent":["import { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport type { PropsWithChildren } from 'react';\nimport React from 'react';\n\nimport { ThemeProvider } from '@/src/theme';\nimport { FormFieldsContext, RemoteFlowContext } from './context';\nimport { Components, RemoteFlowsSDKProps } from './types/remoteFlows';\nimport { useAuth } from './useAuth';\n\nconst queryClient = new QueryClient();\n\ntype RemoteFlowContextWrapperProps = {\n auth: RemoteFlowsSDKProps['auth'];\n children: React.ReactNode;\n environment?: RemoteFlowsSDKProps['environment'];\n proxy?: RemoteFlowsSDKProps['proxy'];\n authId?: RemoteFlowsSDKProps['authId'];\n};\n\nfunction RemoteFlowContextWrapper({\n children,\n auth,\n authId,\n proxy,\n environment,\n}: RemoteFlowContextWrapperProps) {\n const remoteApiClient = useAuth({\n auth,\n authId,\n options: {\n proxy,\n environment,\n },\n });\n return (\n <RemoteFlowContext.Provider value={{ client: remoteApiClient.current }}>\n {children}\n </RemoteFlowContext.Provider>\n );\n}\n\nexport function FormFieldsProvider({\n children,\n components,\n}: PropsWithChildren<{\n components?: Components;\n}>) {\n return (\n <FormFieldsContext.Provider\n value={components ? { components } : { components: {} }}\n >\n {children}\n </FormFieldsContext.Provider>\n );\n}\n\nexport function RemoteFlows({\n auth,\n authId,\n children,\n components,\n theme,\n proxy,\n environment,\n}: PropsWithChildren<RemoteFlowsSDKProps>) {\n return (\n <QueryClientProvider client={queryClient}>\n <FormFieldsProvider components={components}>\n <RemoteFlowContextWrapper\n auth={auth}\n authId={authId}\n proxy={proxy}\n environment={environment}\n >\n <ThemeProvider theme={theme}>{children}</ThemeProvider>\n </RemoteFlowContextWrapper>\n </FormFieldsProvider>\n </QueryClientProvider>\n );\n}\n","import {\n CssThemeBorder,\n CssThemeColors,\n CssThemeFont,\n CssThemeSpacing,\n ThemeColors,\n ThemeFont,\n ThemeProviderProps,\n} from '@/src/types/theme';\n\nfunction setCssProperties(variables: Record<string, string>) {\n const root = document.documentElement;\n Object.keys(variables).forEach((v) => {\n const propertyVal = variables[v];\n if (propertyVal) {\n root.style.setProperty(v, propertyVal);\n }\n });\n}\n\nfunction mapThemeColors(colors: ThemeColors): CssThemeColors {\n const result: CssThemeColors = {};\n Object.keys(colors).forEach((key) => {\n result[`--${key}` as keyof CssThemeColors] =\n colors[key as keyof ThemeColors];\n });\n return result;\n}\n\nfunction mapThemeSpacing(spacing: string): CssThemeSpacing {\n return {\n '--spacing': spacing,\n };\n}\n\nfunction mapThemeBorderRadius(borderRadius: string): CssThemeBorder {\n return {\n '--radius': borderRadius,\n };\n}\n\nfunction mapThemeFont(font: ThemeFont): CssThemeFont {\n return {\n '--fontSizeBase': font.fontSizeBase,\n };\n}\n\nexport function applyTheme(theme: ThemeProviderProps['theme']) {\n if (theme?.colors) {\n setCssProperties(mapThemeColors(theme.colors));\n }\n\n if (theme?.spacing) {\n setCssProperties(mapThemeSpacing(theme.spacing));\n }\n\n if (theme?.borderRadius) {\n setCssProperties(mapThemeBorderRadius(theme.borderRadius));\n }\n\n if (theme?.font) {\n setCssProperties(mapThemeFont(theme.font));\n }\n}\n","import { applyTheme } from '@/src/lib/applyTheme';\nimport { createContext, useEffect, useMemo } from 'react';\nimport { ThemeProviderProps } from './types/theme';\n\nconst ThemeContext = createContext<Omit<ThemeProviderProps, 'children'>>({\n theme: {},\n});\n\nexport function ThemeProvider(props: ThemeProviderProps) {\n useEffect(() => {\n if (props.theme && Object.keys(props.theme).length > 0) {\n applyTheme(props.theme);\n }\n }, [props.theme]);\n\n const value = useMemo(() => {\n return { theme: props.theme };\n }, [props.theme]);\n\n return (\n <ThemeContext.Provider value={value}>\n {props.children}\n </ThemeContext.Provider>\n );\n}\n","export const ENVIRONMENTS = {\n local: 'http://localhost:4000/api/eor',\n partners: 'https://gateway.partners.remote-sandbox.com',\n production: 'https://gateway.remote.com',\n sandbox: 'https://gateway.remote-sandbox.com',\n staging: 'https://gateway.niceremote.com',\n};\n","import { client } from '@/src/client/client.gen';\nimport { ENVIRONMENTS } from '@/src/environments';\nimport { createClient } from '@hey-api/client-fetch';\nimport { useQuery } from '@tanstack/react-query';\nimport { useRef } from 'react';\nimport { RemoteFlowsSDKProps } from './types/remoteFlows';\nimport { debug } from './lib/utils';\n\ntype AuthResponse = {\n accessToken: string;\n expiresIn: number;\n};\n\ntype Options = Partial<{\n environment: keyof typeof ENVIRONMENTS;\n proxy: RemoteFlowsSDKProps['proxy'];\n}>;\n\nfunction isValidUrl(url: string) {\n try {\n new URL(url);\n return true;\n } catch {\n return false;\n }\n}\n\nexport const useAuth = ({\n auth,\n options,\n authId = 'default',\n}: {\n auth: () => Promise<AuthResponse>;\n options?: Options;\n authId?: 'default' | 'client';\n}) => {\n const session = useRef<{ accessToken: string; expiresAt: number } | null>(\n null,\n );\n const { refetch } = useQuery({\n queryKey: ['auth', authId],\n queryFn: auth,\n enabled: false,\n });\n\n const baseUrl = options?.environment\n ? ENVIRONMENTS[options?.environment]\n : process.env.REMOTE_GATEWAY_URL;\n\n const clientConfig = client.getConfig();\n const npmPackageVersion = process.env.VERSION || 'unknown';\n\n if (options?.environment && options?.environment !== 'production') {\n debug(npmPackageVersion);\n }\n\n const isValidProxy = !!options?.proxy && isValidUrl(options.proxy.url);\n\n if (options?.proxy && !isValidProxy) {\n console.error('Invalid proxy URL provided. Using default base URL.');\n }\n\n return useRef(\n createClient({\n ...clientConfig,\n headers: {\n ...clientConfig.headers,\n ...(isValidProxy ? options?.proxy?.headers : {}),\n 'X-Client-Name': 'remote-flows-sdk',\n 'X-Client-Version': npmPackageVersion,\n },\n baseUrl: isValidProxy ? options.proxy?.url : baseUrl,\n auth: async () => {\n function hasTokenExpired(expiresAt: number | undefined) {\n return !expiresAt || Date.now() + 60000 > expiresAt;\n }\n if (!session.current || hasTokenExpired(session.current.expiresAt)) {\n const { data } = await refetch();\n if (data) {\n session.current = {\n accessToken: data.accessToken,\n expiresAt: Date.now() + data.expiresIn * 1000,\n };\n }\n }\n return session.current?.accessToken;\n },\n }),\n );\n};\n"],"mappings":"+pHAAA,OAAS,eAAAA,EAAa,uBAAAC,MAA2B,wBCUjD,SAASC,EAAiBC,EAAmC,CAC3D,IAAMC,EAAO,SAAS,gBACtB,OAAO,KAAKD,CAAS,EAAE,QAASE,GAAM,CACpC,IAAMC,EAAcH,EAAUE,CAAC,EAC3BC,GACFF,EAAK,MAAM,YAAYC,EAAGC,CAAW,CAEzC,CAAC,CACH,CARSC,EAAAL,EAAA,oBAUT,SAASM,EAAeC,EAAqC,CAC3D,IAAMC,EAAyB,CAAC,EAChC,cAAO,KAAKD,CAAM,EAAE,QAASE,GAAQ,CACnCD,EAAO,KAAKC,CAAG,EAA0B,EACvCF,EAAOE,CAAwB,CACnC,CAAC,EACMD,CACT,CAPSH,EAAAC,EAAA,kBAST,SAASI,EAAgBC,EAAkC,CACzD,MAAO,CACL,YAAaA,CACf,CACF,CAJSN,EAAAK,EAAA,mBAMT,SAASE,EAAqBC,EAAsC,CAClE,MAAO,CACL,WAAYA,CACd,CACF,CAJSR,EAAAO,EAAA,wBAMT,SAASE,EAAaC,EAA+B,CACnD,MAAO,CACL,iBAAkBA,EAAK,YACzB,CACF,CAJSV,EAAAS,EAAA,gBAMF,SAASE,EAAWC,EAAoC,CACzDA,GAAO,QACTjB,EAAiBM,EAAeW,EAAM,MAAM,CAAC,EAG3CA,GAAO,SACTjB,EAAiBU,EAAgBO,EAAM,OAAO,CAAC,EAG7CA,GAAO,cACTjB,EAAiBY,EAAqBK,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AAlB,CACC,MAAOD,EAAa,CAAE,WAAAA,CAAW,EAAI,CAAE,WAAY,CAAC,CAAE,EAErD,SAAAV,EACH,CAEJ,CAbgBQ,EAAAC,GAAA,sBAeT,SAASG,GAAY,CAC1B,KAAAX,EACA,OAAAC,EACA,SAAAF,EACA,WAAAU,EACA,MAAAG,EACA,MAAAV,EACA,YAAAC,CACF,EAA2C,CACzC,OACER,EAACkB,EAAA,CAAoB,OAAQjB,EAC3B,SAAAD,EAACa,GAAA,CAAmB,WAAYC,EAC9B,SAAAd,EAACG,GAAA,CACC,KAAME,EACN,OAAQC,EACR,MAAOC,EACP,YAAaC,EAEb,SAAAR,EAACmB,EAAA,CAAc,MAAOF,EAAQ,SAAAb,EAAS,EACzC,EACF,EACF,CAEJ,CAvBgBQ,EAAAI,GAAA","names":["QueryClient","QueryClientProvider","setCssProperties","variables","root","v","propertyVal","__name","mapThemeColors","colors","result","key","mapThemeSpacing","spacing","mapThemeBorderRadius","borderRadius","mapThemeFont","font","applyTheme","theme","createContext","useEffect","useMemo","jsx","ThemeContext","createContext","ThemeProvider","props","useEffect","applyTheme","value","useMemo","__name","ENVIRONMENTS","createClient","useQuery","useRef","isValidUrl","url","__name","useAuth","auth","options","authId","session","useRef","refetch","useQuery","baseUrl","ENVIRONMENTS","clientConfig","client","npmPackageVersion","debug","isValidProxy","createClient","hasTokenExpired","expiresAt","data","jsx","queryClient","QueryClient","RemoteFlowContextWrapper","children","auth","authId","proxy","environment","remoteApiClient","useAuth","RemoteFlowContext","__name","FormFieldsProvider","components","FormFieldsContext","RemoteFlows","theme","QueryClientProvider","ThemeProvider"]}
|
|
1
|
+
{"version":3,"sources":["../src/RemoteFlowsProvider.tsx","../src/lib/applyTheme.ts","../src/theme.tsx","../src/environments.ts","../src/useAuth.ts"],"sourcesContent":["import { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport type { PropsWithChildren } from 'react';\nimport React from 'react';\n\nimport { ThemeProvider } from '@/src/theme';\nimport { FormFieldsContext, RemoteFlowContext } from './context';\nimport { Components, RemoteFlowsSDKProps } from './types/remoteFlows';\nimport { useAuth } from './useAuth';\n\nconst queryClient = new QueryClient();\n\ntype RemoteFlowContextWrapperProps = {\n auth: RemoteFlowsSDKProps['auth'];\n children: React.ReactNode;\n environment?: RemoteFlowsSDKProps['environment'];\n proxy?: RemoteFlowsSDKProps['proxy'];\n authId?: RemoteFlowsSDKProps['authId'];\n};\n\nfunction RemoteFlowContextWrapper({\n children,\n auth,\n authId,\n proxy,\n environment,\n}: RemoteFlowContextWrapperProps) {\n const remoteApiClient = useAuth({\n auth,\n authId,\n options: {\n proxy,\n environment,\n },\n });\n return (\n <RemoteFlowContext.Provider value={{ client: remoteApiClient.current }}>\n {children}\n </RemoteFlowContext.Provider>\n );\n}\n\nexport function FormFieldsProvider({\n children,\n components,\n}: PropsWithChildren<{\n components?: Components;\n}>) {\n return (\n <FormFieldsContext.Provider\n value={components ? { components } : { components: {} }}\n >\n {children}\n </FormFieldsContext.Provider>\n );\n}\n\nexport function RemoteFlows({\n auth,\n authId,\n children,\n components,\n theme,\n proxy,\n environment,\n}: PropsWithChildren<RemoteFlowsSDKProps>) {\n return (\n <QueryClientProvider client={queryClient}>\n <FormFieldsProvider components={components}>\n <RemoteFlowContextWrapper\n auth={auth}\n authId={authId}\n proxy={proxy}\n environment={environment}\n >\n <ThemeProvider theme={theme}>{children}</ThemeProvider>\n </RemoteFlowContextWrapper>\n </FormFieldsProvider>\n </QueryClientProvider>\n );\n}\n","import {\n CssThemeBorder,\n CssThemeColors,\n CssThemeFont,\n CssThemeSpacing,\n ThemeColors,\n ThemeFont,\n ThemeProviderProps,\n} from '@/src/types/theme';\n\nfunction setCssProperties(variables: Record<string, string>) {\n const root = document.documentElement;\n Object.keys(variables).forEach((v) => {\n const propertyVal = variables[v];\n if (propertyVal) {\n root.style.setProperty(v, propertyVal);\n }\n });\n}\n\nfunction mapThemeColors(colors: ThemeColors): CssThemeColors {\n const result: CssThemeColors = {};\n Object.keys(colors).forEach((key) => {\n result[`--${key}` as keyof CssThemeColors] =\n colors[key as keyof ThemeColors];\n });\n return result;\n}\n\nfunction mapThemeSpacing(spacing: string): CssThemeSpacing {\n return {\n '--spacing': spacing,\n };\n}\n\nfunction mapThemeBorderRadius(borderRadius: string): CssThemeBorder {\n return {\n '--radius': borderRadius,\n };\n}\n\nfunction mapThemeFont(font: ThemeFont): CssThemeFont {\n return {\n '--fontSizeBase': font.fontSizeBase,\n };\n}\n\nexport function applyTheme(theme: ThemeProviderProps['theme']) {\n if (theme?.colors) {\n setCssProperties(mapThemeColors(theme.colors));\n }\n\n if (theme?.spacing) {\n setCssProperties(mapThemeSpacing(theme.spacing));\n }\n\n if (theme?.borderRadius) {\n setCssProperties(mapThemeBorderRadius(theme.borderRadius));\n }\n\n if (theme?.font) {\n setCssProperties(mapThemeFont(theme.font));\n }\n}\n","import { applyTheme } from '@/src/lib/applyTheme';\nimport { createContext, useEffect, useMemo } from 'react';\nimport { ThemeProviderProps } from './types/theme';\n\nconst ThemeContext = createContext<Omit<ThemeProviderProps, 'children'>>({\n theme: {},\n});\n\nexport function ThemeProvider(props: ThemeProviderProps) {\n useEffect(() => {\n if (props.theme && Object.keys(props.theme).length > 0) {\n applyTheme(props.theme);\n }\n }, [props.theme]);\n\n const value = useMemo(() => {\n return { theme: props.theme };\n }, [props.theme]);\n\n return (\n <ThemeContext.Provider value={value}>\n {props.children}\n </ThemeContext.Provider>\n );\n}\n","export const ENVIRONMENTS = {\n local: 'http://localhost:4000/api/eor',\n partners: 'https://gateway.partners.remote-sandbox.com',\n production: 'https://gateway.remote.com',\n sandbox: 'https://gateway.remote-sandbox.com',\n staging: 'https://gateway.niceremote.com',\n};\n","import { client } from '@/src/client/client.gen';\nimport { ENVIRONMENTS } from '@/src/environments';\nimport { createClient } from '@hey-api/client-fetch';\nimport { useQuery } from '@tanstack/react-query';\nimport { useRef } from 'react';\nimport { RemoteFlowsSDKProps } from './types/remoteFlows';\nimport { debug } from './lib/utils';\n\ntype AuthResponse = {\n accessToken: string;\n expiresIn: number;\n};\n\ntype Options = Partial<{\n environment: keyof typeof ENVIRONMENTS;\n proxy: RemoteFlowsSDKProps['proxy'];\n}>;\n\nfunction isValidUrl(url: string) {\n try {\n new URL(url);\n return true;\n } catch {\n return false;\n }\n}\n\nexport const useAuth = ({\n auth,\n options,\n authId = 'default',\n}: {\n auth: () => Promise<AuthResponse>;\n options?: Options;\n authId?: 'default' | 'client';\n}) => {\n const session = useRef<{ accessToken: string; expiresAt: number } | null>(\n null,\n );\n const { refetch } = useQuery({\n queryKey: ['auth', authId],\n queryFn: auth,\n enabled: false,\n });\n\n const baseUrl = options?.environment\n ? ENVIRONMENTS[options?.environment]\n : process.env.REMOTE_GATEWAY_URL;\n\n const clientConfig = client.getConfig();\n const npmPackageVersion = process.env.VERSION || 'unknown';\n\n if (options?.environment && options?.environment !== 'production') {\n debug(npmPackageVersion);\n }\n\n const isValidProxy = !!options?.proxy && isValidUrl(options.proxy.url);\n\n if (options?.proxy && !isValidProxy) {\n console.error('Invalid proxy URL provided. Using default base URL.');\n }\n\n return useRef(\n createClient({\n ...clientConfig,\n headers: {\n ...clientConfig.headers,\n ...(isValidProxy ? options?.proxy?.headers : {}),\n 'X-Client-Name': 'remote-flows-sdk',\n 'X-Client-Version': npmPackageVersion,\n },\n baseUrl: isValidProxy ? options.proxy?.url : baseUrl,\n auth: async () => {\n function hasTokenExpired(expiresAt: number | undefined) {\n return !expiresAt || Date.now() + 60000 > expiresAt;\n }\n if (!session.current || hasTokenExpired(session.current.expiresAt)) {\n const { data } = await refetch();\n if (data) {\n session.current = {\n accessToken: data.accessToken,\n expiresAt: Date.now() + data.expiresIn * 1000,\n };\n }\n }\n return session.current?.accessToken;\n },\n }),\n );\n};\n"],"mappings":"utHAAA,OAAS,eAAAA,EAAa,uBAAAC,MAA2B,wBCUjD,SAASC,EAAiBC,EAAmC,CAC3D,IAAMC,EAAO,SAAS,gBACtB,OAAO,KAAKD,CAAS,EAAE,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AEJ,CAvBgBQ,EAAAI,GAAA","names":["QueryClient","QueryClientProvider","setCssProperties","variables","root","v","propertyVal","__name","mapThemeColors","colors","result","key","mapThemeSpacing","spacing","mapThemeBorderRadius","borderRadius","mapThemeFont","font","applyTheme","theme","createContext","useEffect","useMemo","jsx","ThemeContext","createContext","ThemeProvider","props","useEffect","applyTheme","value","useMemo","__name","ENVIRONMENTS","createClient","useQuery","useRef","isValidUrl","url","__name","useAuth","auth","options","authId","session","useRef","refetch","useQuery","baseUrl","ENVIRONMENTS","clientConfig","client","npmPackageVersion","debug","isValidProxy","createClient","hasTokenExpired","expiresAt","data","jsx","queryClient","QueryClient","RemoteFlowContextWrapper","children","auth","authId","proxy","environment","remoteApiClient","useAuth","RemoteFlowContext","__name","FormFieldsProvider","components","FormFieldsContext","RemoteFlows","theme","QueryClientProvider","ThemeProvider"]}
|
package/dist/internals.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { c as cn } from './
|
|
1
|
+
export { Z as ZendeskTriggerButton, c as cn } from './ZendeskTriggerButton-FSCvhzTG.js';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
|
-
import * as React
|
|
5
|
+
import * as React from 'react';
|
|
6
6
|
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
7
7
|
import { Drawer as Drawer$1 } from 'vaul';
|
|
8
8
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
@@ -19,88 +19,80 @@ declare const buttonVariants: (props?: ({
|
|
|
19
19
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
20
20
|
size?: "link" | "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
21
21
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
22
|
-
declare function Button({ className, variant, size, asChild, ...props }: React
|
|
22
|
+
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
23
23
|
asChild?: boolean;
|
|
24
24
|
}): react_jsx_runtime.JSX.Element;
|
|
25
25
|
|
|
26
|
-
interface CardProps extends React
|
|
26
|
+
interface CardProps extends React.ComponentProps<'div'> {
|
|
27
27
|
direction?: 'row' | 'col';
|
|
28
28
|
}
|
|
29
29
|
declare function Card({ className, direction, ...props }: CardProps): react_jsx_runtime.JSX.Element;
|
|
30
|
-
declare function CardHeader({ className, ...props }: React
|
|
31
|
-
declare function CardTitle({ className, ...props }: React
|
|
32
|
-
declare function CardDescription({ className, ...props }: React
|
|
33
|
-
declare function CardContent({ className, ...props }: React
|
|
34
|
-
declare function CardFooter({ className, ...props }: React
|
|
30
|
+
declare function CardHeader({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
31
|
+
declare function CardTitle({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
32
|
+
declare function CardDescription({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
33
|
+
declare function CardContent({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
34
|
+
declare function CardFooter({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
35
35
|
|
|
36
|
-
declare const Collapsible: React
|
|
37
|
-
declare const CollapsibleTrigger: React
|
|
38
|
-
declare const CollapsibleContent: React
|
|
36
|
+
declare const Collapsible: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleProps & React.RefAttributes<HTMLDivElement>>;
|
|
37
|
+
declare const CollapsibleTrigger: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
38
|
+
declare const CollapsibleContent: React.ForwardRefExoticComponent<CollapsiblePrimitive.CollapsibleContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
39
39
|
|
|
40
40
|
declare const Drawer: {
|
|
41
|
-
({ shouldScaleBackground, ...props }: React
|
|
41
|
+
({ shouldScaleBackground, ...props }: React.ComponentProps<typeof Drawer$1.Root>): react_jsx_runtime.JSX.Element;
|
|
42
42
|
displayName: string;
|
|
43
43
|
};
|
|
44
|
-
declare const DrawerTrigger: React
|
|
45
|
-
declare const DrawerContent: React
|
|
44
|
+
declare const DrawerTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
45
|
+
declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
46
46
|
showHandle?: boolean;
|
|
47
|
-
} & React
|
|
47
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
48
48
|
declare const DrawerHeader: {
|
|
49
|
-
({ className, ...props }: React
|
|
49
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
50
50
|
displayName: string;
|
|
51
51
|
};
|
|
52
|
-
declare const DrawerTitle: React
|
|
52
|
+
declare const DrawerTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
53
53
|
|
|
54
|
-
declare function Dialog({ ...props }: React
|
|
55
|
-
declare function DialogTrigger({ ...props }: React
|
|
56
|
-
declare function DialogContent({ className, children, ...props }: React
|
|
57
|
-
declare function DialogHeader({ className, ...props }: React
|
|
58
|
-
declare function DialogFooter({ className, ...props }: React
|
|
59
|
-
declare function DialogTitle({ className, ...props }: React
|
|
60
|
-
declare function DialogDescription({ className, ...props }: React
|
|
54
|
+
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
55
|
+
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
56
|
+
declare function DialogContent({ className, children, ...props }: React.ComponentProps<typeof DialogPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
57
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
58
|
+
declare function DialogFooter({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
59
|
+
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): react_jsx_runtime.JSX.Element;
|
|
60
|
+
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): react_jsx_runtime.JSX.Element;
|
|
61
61
|
|
|
62
|
-
declare function Tabs({ className, ...props }: React
|
|
63
|
-
declare function TabsList({ className, ...props }: React
|
|
64
|
-
declare function TabsTrigger({ className, ...props }: React
|
|
65
|
-
declare function TabsContent({ className, ...props }: React
|
|
62
|
+
declare function Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
63
|
+
declare function TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>): react_jsx_runtime.JSX.Element;
|
|
64
|
+
declare function TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
65
|
+
declare function TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
66
66
|
|
|
67
67
|
declare const alertVariants: (props?: ({
|
|
68
68
|
variant?: "default" | "warning" | "destructive" | null | undefined;
|
|
69
69
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
70
|
-
declare function Alert({ className, variant, ...props }: React
|
|
71
|
-
declare function AlertTitle({ className, ...props }: React
|
|
72
|
-
declare function AlertDescription({ className, ...props }: React
|
|
70
|
+
declare function Alert({ className, variant, ...props }: React.ComponentProps<'div'> & VariantProps<typeof alertVariants>): react_jsx_runtime.JSX.Element;
|
|
71
|
+
declare function AlertTitle({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
72
|
+
declare function AlertDescription({ className, ...props }: React.ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
73
73
|
|
|
74
74
|
declare const badgeVariants: (props?: ({
|
|
75
75
|
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
76
76
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
77
|
-
declare function Badge({ className, variant, asChild, ...props }: React
|
|
77
|
+
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
78
78
|
asChild?: boolean;
|
|
79
79
|
}): react_jsx_runtime.JSX.Element;
|
|
80
80
|
|
|
81
|
-
declare function Input({ className, type, ...props }: React
|
|
81
|
+
declare function Input({ className, type, ...props }: React.ComponentProps<'input'>): react_jsx_runtime.JSX.Element;
|
|
82
82
|
|
|
83
|
-
declare function Label({ className, ...props }: React
|
|
83
|
+
declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
84
84
|
|
|
85
|
-
declare const Checkbox: React
|
|
85
|
+
declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
86
86
|
|
|
87
|
-
declare function RadioGroup({ className, ...props }: React
|
|
88
|
-
declare function RadioGroupItem({ className, ...props }: React
|
|
87
|
+
declare function RadioGroup({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
88
|
+
declare function RadioGroupItem({ className, ...props }: React.ComponentProps<typeof RadioGroupPrimitive.Item>): react_jsx_runtime.JSX.Element;
|
|
89
89
|
|
|
90
|
-
declare function Select({ ...props }: React
|
|
91
|
-
declare function SelectValue({ ...props }: React
|
|
92
|
-
declare function SelectTrigger({ className, children, ...props }: React
|
|
93
|
-
declare function SelectContent({ className, children, position, ...props }: React
|
|
94
|
-
declare function SelectItem({ className, children, ...props }: React
|
|
90
|
+
declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
91
|
+
declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): react_jsx_runtime.JSX.Element;
|
|
92
|
+
declare function SelectTrigger({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
93
|
+
declare function SelectContent({ className, children, position, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
94
|
+
declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): react_jsx_runtime.JSX.Element;
|
|
95
95
|
|
|
96
|
-
declare const ScrollArea: React
|
|
96
|
+
declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
97
97
|
|
|
98
|
-
|
|
99
|
-
zendeskId: number;
|
|
100
|
-
className?: string;
|
|
101
|
-
onClick?: (zendeskId: number) => void;
|
|
102
|
-
children?: React.ReactNode;
|
|
103
|
-
}
|
|
104
|
-
declare function ZendeskTriggerButton({ zendeskId, className, onClick, children, }: ZendeskTriggerButtonProps): react_jsx_runtime.JSX.Element;
|
|
105
|
-
|
|
106
|
-
export { Alert, AlertDescription, AlertTitle, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Drawer, DrawerContent, DrawerHeader, DrawerTitle, DrawerTrigger, Input, Label, RadioGroup, RadioGroupItem, ScrollArea, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Tabs, TabsContent, TabsList, TabsTrigger, ZendeskTriggerButton, badgeVariants, buttonVariants };
|
|
98
|
+
export { Alert, AlertDescription, AlertTitle, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Drawer, DrawerContent, DrawerHeader, DrawerTitle, DrawerTrigger, Input, Label, RadioGroup, RadioGroupItem, ScrollArea, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Tabs, TabsContent, TabsList, TabsTrigger, badgeVariants, buttonVariants };
|
package/dist/internals.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as Q,b as R,c as S}from"./chunk-JBUNDNKJ.js";import{a as M,b as N,c as O,d as P}from"./chunk-7R347KBY.js";import{a as G,b as H,c as I,d as J,e as K,f as L}from"./chunk-AFRA4BIW.js";import{a as i}from"./chunk-
|
|
1
|
+
import{a as Q,b as R,c as S}from"./chunk-JBUNDNKJ.js";import{a as M,b as N,c as O,d as P}from"./chunk-7R347KBY.js";import{a as G,b as H,c as I,d as J,e as K,f as L}from"./chunk-AFRA4BIW.js";import{a as i}from"./chunk-B7I7YVNK.js";import{a as F}from"./chunk-3A47R5RQ.js";import{a as d,b as e,d as f,e as g,f as h}from"./chunk-TWIUL2P3.js";import{a as j,b as m,c as n,d as o,f as p,g as q,h as r,i as s,j as v,k as w,l as x,m as y,n as z,o as A,p as B,q as C,r as D,s as E}from"./chunk-D6X2WCEG.js";import{a as t,b as u}from"./chunk-HPHWQU34.js";import{a as c}from"./chunk-PD24XKD6.js";import"./chunk-ZX5OIIJX.js";import"./chunk-IXAWEBRI.js";import{a as k,b as l}from"./chunk-WVDTHFGS.js";import"./chunk-3ZWDIEEM.js";import{a as b}from"./chunk-MQ6F5LE4.js";import{a}from"./chunk-43WMZDDH.js";import"./chunk-P37U34EQ.js";export{C as Alert,E as AlertDescription,D as AlertTitle,u as Badge,l as Button,G as Card,K as CardContent,J as CardDescription,L as CardFooter,H as CardHeader,I as CardTitle,j as Checkbox,Q as Collapsible,S as CollapsibleContent,R as CollapsibleTrigger,v as Dialog,x as DialogContent,B as DialogDescription,z as DialogFooter,y as DialogHeader,A as DialogTitle,w as DialogTrigger,d as Drawer,f as DrawerContent,g as DrawerHeader,h as DrawerTitle,e as DrawerTrigger,c as Input,b as Label,m as RadioGroup,n as RadioGroupItem,F as ScrollArea,o as Select,r as SelectContent,s as SelectItem,q as SelectTrigger,p as SelectValue,M as Tabs,P as TabsContent,N as TabsList,O as TabsTrigger,i as ZendeskTriggerButton,t as badgeVariants,k as buttonVariants,a as cn};
|
|
2
2
|
//# sourceMappingURL=internals.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ControllerRenderProps, FieldValues, ControllerFieldState } from 'react-hook-form';
|
|
2
2
|
import { PropsWithChildren, ReactNode } from 'react';
|
|
3
3
|
import { AnySchema } from 'yup';
|
|
4
|
-
import {
|
|
4
|
+
import { _ as HelpCenterArticle } from './types.gen-CxiSXabT.js';
|
|
5
5
|
import { S as SupportedTypes } from './types-Zg1n_9wh.js';
|
|
6
6
|
|
|
7
7
|
type ThemeProviderProps = PropsWithChildren<{
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { j as Employment, F as File, g as CreateContractDocumentResponse, f as SignContractDocument, S as SuccessResponse } from './types.gen-
|
|
1
|
+
import { j as Employment, F as File, g as CreateContractDocumentResponse, f as SignContractDocument, S as SuccessResponse } from './types.gen-CxiSXabT.js';
|
|
2
2
|
import { OnboardingBack } from './flows/ContractorOnboarding/components/OnboardingBack.js';
|
|
3
3
|
import { OnboardingSubmit } from './flows/ContractorOnboarding/components/OnboardingSubmit.js';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
|
-
import { N as NormalizedFieldError } from './mutations-
|
|
5
|
+
import { N as NormalizedFieldError } from './mutations-juOpbR-A.js';
|
|
6
6
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
7
7
|
import * as _remoteoss_json_schema_form from '@remoteoss/json-schema-form';
|
|
8
8
|
import { Fields } from '@remoteoss/json-schema-form';
|
|
9
9
|
import * as React$1 from 'react';
|
|
10
10
|
import { STEPS } from './flows/ContractorOnboarding/utils.js';
|
|
11
11
|
import { Step } from './flows/useStepState.js';
|
|
12
|
-
import { M as Meta, J as JSFFieldset, $ as $TSFixMe } from './remoteFlows-
|
|
12
|
+
import { M as Meta, J as JSFFieldset, $ as $TSFixMe } from './remoteFlows-D1VLPcdi.js';
|
|
13
13
|
import { FieldValues } from 'react-hook-form';
|
|
14
14
|
import { BasicInformationStep } from './flows/ContractorOnboarding/components/BasicInformationStep.js';
|
|
15
|
-
import { g as SelectCountryStep } from './types-
|
|
15
|
+
import { g as SelectCountryStep } from './types-CCzA9vuJ.js';
|
|
16
16
|
import { FlowOptions, JSFModify } from './flows/types.js';
|
|
17
17
|
import { OnboardingInvite } from './flows/Onboarding/components/OnboardingInvite.js';
|
|
18
18
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { u as EmploymentCreationResponse, A as EmploymentResponse, S as SuccessResponse, y as PostCreateEmployment2Error, B as PatchUpdateEmployment2Error, G as PutUpdateBenefitOfferError, j as Employment$1, z as EmploymentCreateParams } from './types.gen-
|
|
1
|
+
import { u as EmploymentCreationResponse, A as EmploymentResponse, S as SuccessResponse, y as PostCreateEmployment2Error, B as PatchUpdateEmployment2Error, G as PutUpdateBenefitOfferError, j as Employment$1, z as EmploymentCreateParams } from './types.gen-CxiSXabT.js';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import { OnboardingBack } from './flows/Onboarding/components/OnboardingBack.js';
|
|
4
4
|
import { OnboardingInvite } from './flows/Onboarding/components/OnboardingInvite.js';
|
|
5
|
-
import { N as NormalizedFieldError, S as SuccessResponse$1, E as ErrorResponse } from './mutations-
|
|
5
|
+
import { N as NormalizedFieldError, S as SuccessResponse$1, E as ErrorResponse } from './mutations-juOpbR-A.js';
|
|
6
6
|
import { OnboardingSubmit } from './flows/Onboarding/components/OnboardingSubmit.js';
|
|
7
|
-
import { C as Components, M as Meta, J as JSFFieldset } from './remoteFlows-
|
|
7
|
+
import { C as Components, M as Meta, J as JSFFieldset } from './remoteFlows-D1VLPcdi.js';
|
|
8
8
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
9
9
|
import * as React$1 from 'react';
|
|
10
10
|
import * as _remoteoss_json_schema_form from '@remoteoss/json-schema-form';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { O as OffboardingResponse, P as PostCreateOffboardingError,
|
|
1
|
+
import { O as OffboardingResponse, P as PostCreateOffboardingError, $ as TerminationDetailsParams } from './types.gen-CxiSXabT.js';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import { E as ErrorResponse, S as SuccessResponse } from './mutations-
|
|
3
|
+
import { E as ErrorResponse, S as SuccessResponse } from './mutations-juOpbR-A.js';
|
|
4
4
|
import * as _remoteoss_json_schema_form from '@remoteoss/json-schema-form';
|
|
5
5
|
import { $TSFixMe } from '@remoteoss/json-schema-form';
|
|
6
6
|
import { Step } from './flows/useStepState.js';
|
|
@@ -263,6 +263,17 @@ type CostCalculatorEmploymentParam = {
|
|
|
263
263
|
regional_to_employer_exchange_rate?: string;
|
|
264
264
|
title?: string;
|
|
265
265
|
};
|
|
266
|
+
type UnlimitedDaysandHoursResponse = {
|
|
267
|
+
type: 'unlimited';
|
|
268
|
+
};
|
|
269
|
+
/**
|
|
270
|
+
* Includes requested timeoffs (not approved) in the past or in the future.
|
|
271
|
+
*/
|
|
272
|
+
type LimitedDaysandHoursResponse = {
|
|
273
|
+
days: number;
|
|
274
|
+
hours: number;
|
|
275
|
+
type: 'limited';
|
|
276
|
+
};
|
|
266
277
|
/**
|
|
267
278
|
* A supported country on Remote
|
|
268
279
|
*/
|
|
@@ -604,6 +615,12 @@ type CostCalculatorCosts = {
|
|
|
604
615
|
*/
|
|
605
616
|
monthly_total: number;
|
|
606
617
|
};
|
|
618
|
+
/**
|
|
619
|
+
* Response schema for listing leave policies summary
|
|
620
|
+
*/
|
|
621
|
+
type ListLeavePoliciesSummaryResponse = {
|
|
622
|
+
data: Array<LeavePolicySummary>;
|
|
623
|
+
};
|
|
607
624
|
/**
|
|
608
625
|
* The details of the requested changes for the contract amendment.
|
|
609
626
|
*/
|
|
@@ -769,6 +786,73 @@ type OnboardingTasks = {
|
|
|
769
786
|
personal_details: TaskDescription;
|
|
770
787
|
pricing_plan_details: TaskDescription;
|
|
771
788
|
};
|
|
789
|
+
/**
|
|
790
|
+
* Leave Policy Summary
|
|
791
|
+
*/
|
|
792
|
+
type LeavePolicySummary = {
|
|
793
|
+
/**
|
|
794
|
+
* The annual balance represents the balance for the current entitlement period.
|
|
795
|
+
* Unlike the regular balance, it does not account for accrued value and only considers the annual entitlement as the basis for calculations.
|
|
796
|
+
*
|
|
797
|
+
*/
|
|
798
|
+
annual_balance: UnlimitedDaysandHoursResponse | LimitedDaysandHoursResponse;
|
|
799
|
+
/**
|
|
800
|
+
* The annual entitlement represents what an employee is entitled to in the current entitlement period.
|
|
801
|
+
* It does not account for any accrued value.
|
|
802
|
+
*
|
|
803
|
+
*/
|
|
804
|
+
annual_entitlement: UnlimitedDaysandHoursResponse | LimitedDaysandHoursResponse;
|
|
805
|
+
/**
|
|
806
|
+
* The balance is the entitlement minus the taken timeoff (i.e 10 entitlement - 3 taken = 7 balance)
|
|
807
|
+
*/
|
|
808
|
+
balance: UnlimitedDaysandHoursResponse | LimitedDaysandHoursResponse;
|
|
809
|
+
/**
|
|
810
|
+
* The current entitlement is the accrued time entitled for the employee plus any other extra entitlements (such as carryover).
|
|
811
|
+
*/
|
|
812
|
+
current_entitlement: UnlimitedDaysandHoursResponse | LimitedDaysandHoursResponse;
|
|
813
|
+
leave_policy: EmployeeLeavePolicy;
|
|
814
|
+
/**
|
|
815
|
+
* Includes requested timeoffs (not approved) in the past or in the future.
|
|
816
|
+
*/
|
|
817
|
+
pending_approval: {
|
|
818
|
+
days: number;
|
|
819
|
+
hours: number;
|
|
820
|
+
type: 'limited';
|
|
821
|
+
};
|
|
822
|
+
/**
|
|
823
|
+
* Includes all time off (past and future, pending or approved).
|
|
824
|
+
*/
|
|
825
|
+
taken: {
|
|
826
|
+
days: number;
|
|
827
|
+
hours: number;
|
|
828
|
+
type: 'limited';
|
|
829
|
+
};
|
|
830
|
+
/**
|
|
831
|
+
* Includes all upcoming approved time off.
|
|
832
|
+
*/
|
|
833
|
+
upcoming_approved: {
|
|
834
|
+
days: number;
|
|
835
|
+
hours: number;
|
|
836
|
+
type: 'limited';
|
|
837
|
+
};
|
|
838
|
+
/**
|
|
839
|
+
* Includes all upcoming requested time off.
|
|
840
|
+
*/
|
|
841
|
+
upcoming_requested: {
|
|
842
|
+
days: number;
|
|
843
|
+
hours: number;
|
|
844
|
+
type: 'limited';
|
|
845
|
+
};
|
|
846
|
+
/**
|
|
847
|
+
* Includes only approved time off in the past.
|
|
848
|
+
*/
|
|
849
|
+
used: {
|
|
850
|
+
days: number;
|
|
851
|
+
hours: number;
|
|
852
|
+
type: 'limited';
|
|
853
|
+
};
|
|
854
|
+
working_hours_per_day: number;
|
|
855
|
+
};
|
|
772
856
|
type EmploymentCreationResponse = {
|
|
773
857
|
data?: {
|
|
774
858
|
employment?: EmploymentBasicResponse;
|
|
@@ -794,6 +878,15 @@ type SuccessResponse = {
|
|
|
794
878
|
status?: string;
|
|
795
879
|
};
|
|
796
880
|
};
|
|
881
|
+
/**
|
|
882
|
+
* Leave Policy abstraction representation for the employee
|
|
883
|
+
*/
|
|
884
|
+
type EmployeeLeavePolicy = {
|
|
885
|
+
description: string | null;
|
|
886
|
+
leave_type: TimeoffType;
|
|
887
|
+
name: string;
|
|
888
|
+
unit: 'days' | 'hours' | 'unlimited';
|
|
889
|
+
};
|
|
797
890
|
/**
|
|
798
891
|
* Magic link params
|
|
799
892
|
*/
|
|
@@ -1488,4 +1581,4 @@ type PostSignContractDocumentErrors = {
|
|
|
1488
1581
|
};
|
|
1489
1582
|
type PostSignContractDocumentError = PostSignContractDocumentErrors[keyof PostSignContractDocumentErrors];
|
|
1490
1583
|
|
|
1491
|
-
export type { EmploymentResponse as A, PatchUpdateEmployment2Error as B, CreateOffboardingParams as C, EmploymentFullParams as D, EmploymentShowResponse as E, File as F, PutUpdateBenefitOfferError as G, MagicLinkResponse as H, UnprocessableEntityResponse as I, MagicLinkParams as J, ConvertCurrencyResponse as K, ListTimeoffResponse as L, MinimalRegion as M, PostConvertRawCurrencyConverterError as N, OffboardingResponse as O, PostCreateOffboardingError as P, ConvertCurrencyParams as Q, PostCreateContractEligibilityError as R, SuccessResponse as S, CreateContractEligibilityParams as T, UnifiedEmploymentUpsertBenefitOffersRequest as U, ValidationError as V, TimeoffStatus as W,
|
|
1584
|
+
export type { TerminationDetailsParams as $, EmploymentResponse as A, PatchUpdateEmployment2Error as B, CreateOffboardingParams as C, EmploymentFullParams as D, EmploymentShowResponse as E, File as F, PutUpdateBenefitOfferError as G, MagicLinkResponse as H, UnprocessableEntityResponse as I, MagicLinkParams as J, ConvertCurrencyResponse as K, ListTimeoffResponse as L, MinimalRegion as M, PostConvertRawCurrencyConverterError as N, OffboardingResponse as O, PostCreateOffboardingError as P, ConvertCurrencyParams as Q, PostCreateContractEligibilityError as R, SuccessResponse as S, CreateContractEligibilityParams as T, UnifiedEmploymentUpsertBenefitOffersRequest as U, ValidationError as V, TimeoffStatus as W, TimeoffType as X, ListLeavePoliciesSummaryResponse as Y, Currency as Z, HelpCenterArticle as _, ContractAmendmentAutomatableResponse as a, PostAutomatableContractAmendmentError as b, ContractAmendmentResponse as c, PostCreateContractAmendmentError as d, PostSignContractDocumentError as e, SignContractDocument as f, CreateContractDocumentResponse as g, PostCreateContractDocumentError as h, CreateContractDocument as i, Employment as j, CostCalculatorEstimateResponse as k, PostCreateEstimationError as l, CostCalculatorEstimatePdfResponse as m, PostCreateEstimationPdfError as n, CostCalculatorEstimateParams as o, CostCalculatorEstimateCsvResponse as p, PostCreateEstimationCsvError as q, MinimalCountry as r, EmploymentTermType as s, CostCalculatorEmployment as t, EmploymentCreationResponse as u, Company as v, PostInviteEmploymentInvitationError as w, PostCreateRiskReserveError as x, PostCreateEmployment2Error as y, EmploymentCreateParams as z };
|
package/package.json
CHANGED
package/dist/chunk-DKA2EUPQ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e={data:{version:7,schema:{additionalProperties:!1,allOf:[{if:{properties:{agrees_to_pto_amount:{const:"no"}},required:["agrees_to_pto_amount"]},then:{properties:{agrees_to_pto_amount_notes:{type:"string"}},required:["agrees_to_pto_amount_notes"]},else:{properties:{agrees_to_pto_amount_notes:!1,timesheet_file:!1}}}],properties:{timeoff_statement:{type:"null",title:"Timeoff statement","x-jsf-presentation":{inputType:"hidden",statement:{title:"Make sure these paid time off records are correct",description:"You must pay the employee for any unused accrued paid time off, so please check these records carefully.",inputType:"statement",severity:"warning"},meta:{ignoreValue:!0}}},agrees_to_pto_amount:{description:"",oneOf:[{const:"yes",description:"",title:"Yes"},{const:"no",description:"",title:"No"}],title:"Are these paid time off records correct?",type:"string","x-jsf-presentation":{direction:"column",inputType:"radio"}},agrees_to_pto_amount_notes:{description:"Please provide details regarding any additional days taken, including specific dates, or any other inaccuracy in the time off data.",maxLength:1e3,title:"Provide time off details",type:["string","null"],"x-jsf-presentation":{inputType:"textarea"}},timesheet_file:{description:"Upload a timesheet exported from your HR software. This way we can compare and confirm the total number of Paid time off.",title:"Timesheet document",type:["string","null"],"x-jsf-presentation":{inputType:"file",accept:".pdf"}}},required:["agrees_to_pto_amount"],type:"object","x-jsf-order":["timeoff_statement","agrees_to_pto_amount","agrees_to_pto_amount_notes","timesheet_file"]}}};export{e as a};
|
|
2
|
-
//# sourceMappingURL=chunk-DKA2EUPQ.js.map
|
package/dist/chunk-E773NPNL.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-43WMZDDH.js";import{a as t}from"./chunk-P37U34EQ.js";import{Slot as i}from"@radix-ui/react-slot";import{cva as d}from"class-variance-authority";import{jsx as p}from"react/jsx-runtime";var u=d("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none aria-invalid:ring-destructive/20 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90",outline:"border border-input bg-background shadow-xs",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-link-button-primary underline-offset-4 hover:underline button-link"},size:{default:"h-9 px-4 py-7 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9",link:"px-0"}},defaultVariants:{variant:"default",size:"default"}});function b({className:o,variant:n,size:r,asChild:a=!1,...s}){return p(a?i:"button",{"data-slot":"button",className:e(u({variant:n,size:r,className:o}),"RemoteFlows__Button"),...s})}t(b,"Button");export{u as a,b};
|
|
2
|
-
//# sourceMappingURL=chunk-E773NPNL.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/ui/button.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\n\nimport { cn } from '@/src/lib/utils';\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none aria-invalid:ring-destructive/20 aria-invalid:border-destructive\",\n {\n variants: {\n variant: {\n default:\n 'bg-primary text-primary-foreground shadow-xs hover:bg-primary/90',\n destructive:\n 'bg-destructive text-white shadow-xs hover:bg-destructive/90',\n outline: 'border border-input bg-background shadow-xs',\n secondary:\n 'bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-link-button-primary underline-offset-4 hover:underline button-link',\n },\n size: {\n default: 'h-9 px-4 py-7 has-[>svg]:px-3',\n sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',\n lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',\n icon: 'size-9',\n link: 'px-0',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nfunction Button({\n className,\n variant,\n size,\n asChild = false,\n ...props\n}: React.ComponentProps<'button'> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n }) {\n const Comp = asChild ? Slot : 'button';\n\n return (\n <Comp\n data-slot='button'\n className={cn(\n buttonVariants({ variant, size, className }),\n 'RemoteFlows__Button',\n )}\n {...props}\n />\n );\n}\n\nexport { Button, buttonVariants };\n"],"mappings":"gFAAA,OAAS,QAAAA,MAAY,uBACrB,OAAS,OAAAC,MAA8B,2BAgDnC,cAAAC,MAAA,oBA3CJ,IAAMC,EAAiBC,EACrB,yVACA,CACE,SAAU,CACR,QAAS,CACP,QACE,mEACF,YACE,8DACF,QAAS,8CACT,UACE,yEACF,MAAO,+CACP,KAAM,yEACR,EACA,KAAM,CACJ,QAAS,gCACT,GAAI,gDACJ,GAAI,uCACJ,KAAM,SACN,KAAM,MACR,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,SACR,CACF,CACF,EAEA,SAASC,EAAO,CACd,UAAAC,EACA,QAAAC,EACA,KAAAC,EACA,QAAAC,EAAU,GACV,GAAGC,CACL,EAGK,CAGH,OACER,EAHWO,EAAUE,EAAO,SAG3B,CACC,YAAU,SACV,UAAWC,EACTT,EAAe,CAAE,QAAAI,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,EAC3C,qBACF,EACC,GAAGI,EACN,CAEJ,CAtBSG,EAAAR,EAAA","names":["Slot","cva","jsx","buttonVariants","cva","Button","className","variant","size","asChild","props","Slot","cn","__name"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/Termination/TerminationReasonsDetailContent/TerminationReasonsDetailContent.tsx"],"sourcesContent":["import { cn } from '@/src/lib/utils';\n\nconst terminationReasonsList = [\n {\n label: 'Misconduct',\n description:\n 'The employee is being dismissed due to unacceptable or improper behavior.',\n },\n {\n label: 'Performance',\n description:\n 'When dismissing an employee for poor performance, employers are required by law to do so fairly. This means giving the employee reasonable opportunity to improve their performance prior to termination.',\n },\n {\n label: 'Workforce reduction',\n description:\n 'The employee’s position is being made redundant, and a layoff is underway.',\n },\n {\n label: 'Values',\n description: 'The employee is misaligned with the company’s values.',\n },\n {\n label: 'Compliance issue',\n description:\n 'Use this option if the employee violated key policies, processes or procedures. For example, they failed to comply with their employment agreement’s confidentiality clause.',\n },\n {\n label: 'Incapacity to perform inherent duties',\n description:\n 'Use this option if the employee is physically or mentally unable to fulfill the work requirements of their role.',\n },\n {\n label: 'Mutual agreement',\n description:\n 'Employee and employer made a mutual decision to end the relationship.',\n },\n {\n label: 'Decision to cancel hiring before the employee started',\n description:\n 'Use this option only if the employee has not started work yet.',\n },\n {\n label: 'Job abandonment',\n description:\n 'The employee has failed to appear for work; the Employer has been unsuccessful in establishing communications with the employee and does not know the employee’s whereabouts.',\n },\n {\n label: 'Dissatisfaction with EOR service',\n description: (\n <span>\n We’re sorry to see you go. If there is anything we can do to improve or\n if there is any remaining feedback you want to give us, please reach out\n to{' '}\n <a\n href='mailto:help@remote.com'\n target='_blank'\n rel='noopener noreferrer'\n >\n help@remote.com\n </a>\n .\n </span>\n ),\n },\n {\n label: 'End of fixed-term contract',\n description:\n 'Use this option when the employee fixed-term contract is coming to an end and will not be renewed or extended.',\n },\n];\nexport const TerminationReasonsDetailContent = () => {\n return (\n <>\n <h3 className={cn('RemoteFlows__TerminationReasonsDetailContent__Title')}>\n {' '}\n Why is this important?\n </h3>\n <p\n className={cn(\n 'RemoteFlows__TerminationReasonsDetailContent__Description',\n )}\n >\n We're here to help you follow all applicable labor laws when terminating\n an employee. Here are all the legal reasons for termination. Please read\n them to make sure you enter the correct reason in the platform.\n </p>\n\n <h4\n className={cn('RemoteFlows__TerminationReasonsDetailContent__Subtitle')}\n >\n Termination Reasons\n </h4>\n <ul\n className={cn(\n 'RemoteFlows__TerminationReasonsDetailContent__List list-disc list-inside',\n )}\n >\n {terminationReasonsList.map((reason) => (\n <li\n className={cn(\n 'RemoteFlows__TerminationReasonsDetailContent__ListItem',\n )}\n key={reason.label}\n >\n <span\n className={cn(\n 'RemoteFlows__TerminationReasonsDetailContent__ListItemLabel',\n )}\n >\n {reason.label}\n </span>\n <span\n className={cn(\n 'RemoteFlows__TerminationReasonsDetailContent__ListItemDescription',\n )}\n >\n {reason.description}\n </span>\n </li>\n ))}\n </ul>\n </>\n );\n};\n"],"mappings":"gFAkDM,OAuBF,YAAAA,EAnBI,OAAAC,EAJF,QAAAC,MAAA,oBAhDN,IAAMC,EAAyB,CAC7B,CACE,MAAO,aACP,YACE,2EACJ,EACA,CACE,MAAO,cACP,YACE,2MACJ,EACA,CACE,MAAO,sBACP,YACE,iFACJ,EACA,CACE,MAAO,SACP,YAAa,4DACf,EACA,CACE,MAAO,mBACP,YACE,mLACJ,EACA,CACE,MAAO,wCACP,YACE,kHACJ,EACA,CACE,MAAO,mBACP,YACE,uEACJ,EACA,CACE,MAAO,wDACP,YACE,gEACJ,EACA,CACE,MAAO,kBACP,YACE,oLACJ,EACA,CACE,MAAO,mCACP,YACED,EAAC,QAAK,qKAGD,IACHD,EAAC,KACC,KAAK,yBACL,OAAO,SACP,IAAI,sBACL,2BAED,EAAI,KAEN,CAEJ,EACA,CACE,MAAO,6BACP,YACE,gHACJ,CACF,EACaG,EAAkCC,EAAA,IAE3CH,EAAAF,EAAA,CACE,UAAAE,EAAC,MAAG,UAAWI,EAAG,qDAAqD,EACpE,cAAI,0BAEP,EACAL,EAAC,KACC,UAAWK,EACT,2DACF,EACD,6NAID,EAEAL,EAAC,MACC,UAAWK,EAAG,wDAAwD,EACvE,+BAED,EACAL,EAAC,MACC,UAAWK,EACT,0EACF,EAEC,SAAAH,EAAuB,IAAKI,GAC3BL,EAAC,MACC,UAAWI,EACT,wDACF,EAGA,UAAAL,EAAC,QACC,UAAWK,EACT,6DACF,EAEC,SAAAC,EAAO,MACV,EACAN,EAAC,QACC,UAAWK,EACT,mEACF,EAEC,SAAAC,EAAO,YACV,IAfKA,EAAO,KAgBd,CACD,EACH,GACF,EAnD2C","names":["Fragment","jsx","jsxs","terminationReasonsList","TerminationReasonsDetailContent","__name","cn","reason"]}
|
package/dist/chunk-HTCONTKZ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{F as i,t as o}from"./chunk-MISHDUB2.js";import{d as n}from"./chunk-3ZWDIEEM.js";import{a as e}from"./chunk-P37U34EQ.js";import{useQuery as s}from"@tanstack/react-query";var p=e(({employmentId:t})=>{let{client:r}=n();return s({queryKey:["employment",t],retry:!1,queryFn:e(()=>o({client:r,headers:{Authorization:""},path:{employment_id:t}}),"queryFn"),select:e(({data:m})=>m,"select")})},"useEmploymentQuery"),c=e(({employmentId:t,status:r})=>{let{client:m}=n();return s({queryKey:["timeoff",t,r],retry:!1,queryFn:e(()=>i({client:m,headers:{Authorization:""},query:{employment_id:t,status:r}}),"queryFn"),select:e(({data:u})=>u,"select")})},"useTimeOffQuery");export{p as a,c as b};
|
|
2
|
-
//# sourceMappingURL=chunk-HTCONTKZ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/common/api.ts"],"sourcesContent":["import {\n getIndexTimeoff,\n getShowEmployment,\n TimeoffStatus,\n} from '@/src/client';\nimport { useClient } from '@/src/context';\nimport { ContractAmendmentParams } from '@/src/flows/ContractAmendment/types';\nimport { Client } from '@hey-api/client-fetch';\nimport { useQuery } from '@tanstack/react-query';\n\ntype UseEmployment = Pick<ContractAmendmentParams, 'employmentId'>;\n\n/**\n * Hook to retrieve employment details for a specific employment ID.\n *\n * @param {Object} params - The parameters for the query.\n * @param {string} params.employmentId - The ID of the employment to fetch details for.\n * @returns {UseQueryResult<any, unknown>} - The result of the query, including the employment details.\n */\nexport const useEmploymentQuery = ({ employmentId }: UseEmployment) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['employment', employmentId],\n retry: false,\n queryFn: () => {\n return getShowEmployment({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n path: { employment_id: employmentId },\n });\n },\n select: ({ data }) => data,\n });\n};\n\n/**\n * Hook to retrieve time off data for a specific employment.\n *\n * @param {Object} params - The parameters for the query.\n * @param {string} [params.employmentId] - The ID of the employment to fetch time off data for.\n * @param {TimeoffStatus} [params.status] - The status of the time off requests to filter by (e.g., 'approved', 'pending').\n * @returns {UseQueryResult<any, unknown>} - The result of the query, including the time off data.\n *\n */\nexport const useTimeOffQuery = ({\n employmentId,\n status,\n}: {\n employmentId?: string;\n status?: TimeoffStatus;\n}) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['timeoff', employmentId, status],\n retry: false,\n queryFn: () => {\n return getIndexTimeoff({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n query: {\n employment_id: employmentId,\n status: status,\n },\n });\n },\n select: ({ data }) => data,\n });\n};\n"],"mappings":"+HAQA,OAAS,YAAAA,MAAgB,wBAWlB,IAAMC,EAAqBC,EAAA,CAAC,CAAE,aAAAC,CAAa,IAAqB,CACrE,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAU,EAC7B,OAAOC,EAAS,CACd,SAAU,CAAC,aAAcH,CAAY,EACrC,MAAO,GACP,QAASD,EAAA,IACAK,EAAkB,CACvB,OAAQH,EACR,QAAS,CACP,cAAe,EACjB,EACA,KAAM,CAAE,cAAeD,CAAa,CACtC,CAAC,EAPM,WAST,OAAQD,EAAA,CAAC,CAAE,KAAAM,CAAK,IAAMA,EAAd,SACV,CAAC,CACH,EAhBkC,sBA2BrBC,EAAkBP,EAAA,CAAC,CAC9B,aAAAC,EACA,OAAAO,CACF,IAGM,CACJ,GAAM,CAAE,OAAAN,CAAO,EAAIC,EAAU,EAC7B,OAAOC,EAAS,CACd,SAAU,CAAC,UAAWH,EAAcO,CAAM,EAC1C,MAAO,GACP,QAASR,EAAA,IACAS,EAAgB,CACrB,OAAQP,EACR,QAAS,CACP,cAAe,EACjB,EACA,MAAO,CACL,cAAeD,EACf,OAAQO,CACV,CACF,CAAC,EAVM,WAYT,OAAQR,EAAA,CAAC,CAAE,KAAAM,CAAK,IAAMA,EAAd,SACV,CAAC,CACH,EAzB+B","names":["useQuery","useEmploymentQuery","__name","employmentId","client","useClient","useQuery","getShowEmployment","data","useTimeOffQuery","status","getIndexTimeoff"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/Termination/TerminationDialogInfoContent/TerminationDialogInfoContent.tsx"],"sourcesContent":["import { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\nimport { cn, ZendeskTriggerButton } from '@/src/internals';\n\nconst terminationSteps = [\n 'You submit your termination request.',\n 'We review your request along with the employment agreement, local labor laws, and any collective bargaining agreements in place.',\n 'A lifecycle specialist contacts you if they need additional details. Sometimes they will request a call.',\n 'Depending on the country-specific laws and the terms of the employment agreement, we may need to seek additional legal advice. We’ll let you know if there are additional charges before proceeding.',\n 'Terms and conditions for the termination are finalized.',\n 'You verbally communicate the termination to the employee.',\n 'We share termination documents with the employee.',\n 'The employee signs the termination documents if required.',\n 'We process the final salary and offboard the employee.',\n];\n\nexport const TerminationDialogInfoContent = () => {\n return (\n <>\n <h3 className={cn('RemoteFlows__TerminationDialogInfoContent__Title')}>\n Please read carefully before you continue\n </h3>\n <p\n className={cn('RemoteFlows__TerminationDialogInfoContent__Description')}\n >\n Please do not inform the employee of the termination. We'll lead\n communication with them after you submit this form and we finalize the\n termination terms.\n </p>\n <p\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription',\n )}\n >\n If you already informed them, that's okay. We'll ask for the details\n regarding that communication and take it from there.\n </p>\n\n <ZendeskTriggerButton\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm',\n )}\n zendeskId={zendeskArticles.terminationEmployeeCommunication}\n >\n Learn more about employee communication\n </ZendeskTriggerButton>\n\n <h3\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ProcessTitle',\n )}\n >\n The termination process\n </h3>\n\n <ul\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ProcessList list-disc list-inside',\n )}\n >\n {terminationSteps.map((step, index) => (\n <li\n key={index}\n className={cn(\n 'RemoteFlows__TerminationDialogInfoContent__ProcessListItem',\n )}\n >\n {step}\n </li>\n ))}\n </ul>\n </>\n );\n};\n"],"mappings":"gKAiBI,mBAAAA,EACE,OAAAC,EADF,QAAAC,MAAA,oBAdJ,IAAMC,EAAmB,CACvB,uCACA,mIACA,2GACA,4MACA,0DACA,4DACA,oDACA,4DACA,wDACF,EAEaC,EAA+BC,EAAA,IAExCH,EAAAF,EAAA,CACE,UAAAC,EAAC,MAAG,UAAWK,EAAG,kDAAkD,EAAG,qDAEvE,EACAL,EAAC,KACC,UAAWK,EAAG,wDAAwD,EACvE,sKAID,EACAL,EAAC,KACC,UAAWK,EACT,uHACF,EACD,qIAGD,EAEAL,EAACM,EAAA,CACC,UAAWD,EACT,yEACF,EACA,UAAWE,EAAgB,iCAC5B,mDAED,EAEAP,EAAC,MACC,UAAWK,EACT,yDACF,EACD,mCAED,EAEAL,EAAC,MACC,UAAWK,EACT,8EACF,EAEC,SAAAH,EAAiB,IAAI,CAACM,EAAMC,IAC3BT,EAAC,MAEC,UAAWK,EACT,4DACF,EAEC,SAAAG,GALIC,CAMP,CACD,EACH,GACF,EAvDwC","names":["Fragment","jsx","jsxs","terminationSteps","TerminationDialogInfoContent","__name","cn","ZendeskTriggerButton","zendeskArticles","step","index"]}
|
package/dist/chunk-PSEOAELN.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as g}from"./chunk-PJUC5WAJ.js";import{a as F}from"./chunk-S4XU4SE7.js";import{a as _}from"./chunk-32GSS4UM.js";import{a as y}from"./chunk-7XRPOR7L.js";import{a as u}from"./chunk-XICA45G2.js";import{a as S,b as V}from"./chunk-2NGJN5IE.js";import{a as T}from"./chunk-PJBAQZ6G.js";import{a as c}from"./chunk-Z5WMKCRJ.js";import{c as m}from"./chunk-PAQW5BFW.js";import{a as r}from"./chunk-43WMZDDH.js";import{a as e}from"./chunk-P37U34EQ.js";import{createHeadlessForm as H}from"@remoteoss/json-schema-form";import L from"lodash.omitby";import O from"lodash.isnull";import A from"lodash.omit";import{useMemo as q}from"react";import{jsx as h,jsxs as B}from"react/jsx-runtime";function f(n,o,d){return{presentation:{inputType:"hidden",Component:e(()=>B("div",{className:r("RemoteFlows__InformationStatement",d?.className),children:[h("h3",{className:r("RemoteFlows__InformationStatement__Title"),children:n}),h("p",{className:r("RemoteFlows__InformationStatement__Description"),children:o})]}),"Component")}}}e(f,"createInformationField");import{Fragment as U,jsx as Z,jsxs as W}from"react/jsx-runtime";function K(n){return{confidential:"",customer_informed_employee:"",customer_informed_employee_date:"",customer_informed_employee_description:"",personal_email:"",termination_reason:void 0,reason_description:"",termination_reason_files:[],will_challenge_termination:"",will_challenge_termination_description:null,agrees_to_pto_amount:"",agrees_to_pto_amount_notes:null,acknowledge_termination_procedure:!1,additional_comments:"",proposed_termination_date:"",risk_assessment_reasons:[],timesheet_file:void 0,...n}}e(K,"buildInitialValues");var Fe=e(({employmentId:n,options:o,initialValues:d})=>{let{fieldValues:P,setFieldValues:k,stepState:i,previousStep:w,nextStep:N}=T(F),M={...i.values?.[i.currentStep.name],...P},x=q(()=>({fields:{risk_assesment_info:f("Offboarding risk assessment","Employees may be protected from termination if they fall into certain categories. To help avoid claims from employees, let us know if the employee is part of one or more of these categories. Select all that apply.",{className:o?.jsfModify?.fields?.risk_assesment_info?.["x-jsf-presentation"]?.className}),proposed_termination_date_info:f("Proposed termination date",W(U,{children:["In most cases, we must provide notice to the employee before termination. The required notice period depends on local labor laws, the employment agreement, and other factors. We'll use those factors to determine the required notice period.",Z(u,{zendeskId:_.terminationNoticePeriods,className:r("text-sm",o?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.zendeskTriggerButtonClassName),children:"Learn about notice periods"})]}),{className:o?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.className})}}),[o?.jsfModify]),{data:s,isLoading:b}=V({formValues:M,jsfModify:{...o?.jsfModify,fields:{...o?.jsfModify?.fields,...x?.fields}},step:i.currentStep.name}),l=H(g.data.schema),p=S(),{mutateAsync:C}=y(p);async function j(a){if(!n)throw new Error("Employment id is missing");if(s){let t=m(a,l.fields,{isPartialValidation:!0}),{customer_informed_employee:I}=t,$=I==="yes"?{employee_awareness:{date:t.customer_informed_employee_date,note:t.customer_informed_employee_description}}:void 0,D=c(t,["agrees_to_pto_amount","confidential","customer_informed_employee","will_challenge_termination"]),J=A(D,"customer_informed_employee_date","customer_informed_employee_description"),z=L({...J,...$},O);return C({employment_id:n,termination_details:z,type:"termination"})}}e(j,"onSubmit");function v(){w()}e(v,"back");function R(){N()}e(R,"next");let E=K({...i.values?.employee_communication,...i.values?.termination_details,...i.values?.paid_time_off,...i.values?.additional_information,...d});return{employmentId:n,stepState:i,fields:s?.fields||[],isLoading:b,isSubmitting:p.isPending,initialValues:E,handleValidation:e(a=>{if(s){let t=m(a,s?.fields);return s?.handleValidation(t)}return null},"handleValidation"),checkFieldUpdates:e(a=>{if(l){let t=m(a,l?.fields,{isPartialValidation:!0});k(t)}},"checkFieldUpdates"),parseFormValues:e(a=>m(a,l.fields,{isPartialValidation:!0}),"parseFormValues"),onSubmit:j,back:v,next:R}},"useTermination");export{Fe as a};
|
|
2
|
-
//# sourceMappingURL=chunk-PSEOAELN.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/Termination/hooks.tsx","../src/components/form/jsf-utils/createFields.tsx"],"sourcesContent":["import {\n CreateOffboardingParams,\n TerminationDetailsParams,\n} from '@/src/client';\nimport { mutationToPromise } from '@/src/lib/mutations';\nimport { $TSFixMe, createHeadlessForm } from '@remoteoss/json-schema-form';\nimport omitBy from 'lodash.omitby';\nimport isNull from 'lodash.isnull';\nimport { parseJSFToValidate } from '@/src/components/form/utils';\nimport {\n TerminationFlowProps,\n TerminationFormValues,\n} from '@/src/flows/Termination/types';\nimport omit from 'lodash.omit';\nimport { parseFormRadioValues } from '@/src/flows/utils';\nimport { useStepState } from '@/src/flows/useStepState';\nimport { STEPS } from '@/src/flows/Termination/utils';\nimport { jsonSchema } from '@/src/flows/Termination/json-schemas/jsonSchema';\nimport { useCreateTermination, useTerminationSchema } from '@/src/flows/api';\nimport { useMemo } from 'react';\nimport { createInformationField } from '@/src/components/form/jsf-utils/createFields';\nimport { cn, ZendeskTriggerButton } from '@/src/internals';\nimport { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\n\nfunction buildInitialValues(\n stepsInitialValues: Partial<TerminationFormValues>,\n): TerminationFormValues {\n const initialValues: TerminationFormValues = {\n confidential: '',\n customer_informed_employee: '',\n customer_informed_employee_date: '',\n customer_informed_employee_description: '',\n personal_email: '',\n termination_reason: undefined,\n reason_description: '',\n termination_reason_files: [],\n will_challenge_termination: '',\n will_challenge_termination_description: null,\n agrees_to_pto_amount: '',\n agrees_to_pto_amount_notes: null,\n acknowledge_termination_procedure: false,\n additional_comments: '',\n proposed_termination_date: '',\n risk_assessment_reasons: [],\n timesheet_file: undefined,\n ...stepsInitialValues,\n };\n\n return initialValues;\n}\n\ntype TerminationHookProps = Omit<TerminationFlowProps, 'render'>;\n\nexport const useTermination = ({\n employmentId,\n options,\n initialValues: terminationInitialValues,\n}: TerminationHookProps) => {\n const { fieldValues, setFieldValues, stepState, previousStep, nextStep } =\n useStepState<keyof typeof STEPS, TerminationFormValues>(STEPS);\n\n const formValues = {\n ...stepState.values?.[stepState.currentStep.name as keyof typeof STEPS], // Restore values for the current step\n ...fieldValues,\n };\n\n const customFields = useMemo(() => {\n return {\n fields: {\n risk_assesment_info: createInformationField(\n 'Offboarding risk assessment',\n 'Employees may be protected from termination if they fall into certain categories. To help avoid claims from employees, let us know if the employee is part of one or more of these categories. Select all that apply.',\n {\n className: (\n options?.jsfModify?.fields?.risk_assesment_info as $TSFixMe\n )?.['x-jsf-presentation']?.className,\n },\n ),\n proposed_termination_date_info: createInformationField(\n 'Proposed termination date',\n <>\n In most cases, we must provide notice to the employee before\n termination. The required notice period depends on local labor laws,\n the employment agreement, and other factors. We'll use those factors\n to determine the required notice period.\n <ZendeskTriggerButton\n zendeskId={zendeskArticles.terminationNoticePeriods}\n className={cn(\n 'text-sm',\n (\n options?.jsfModify?.fields\n ?.proposed_termination_date_info as $TSFixMe\n )?.['x-jsf-presentation']?.zendeskTriggerButtonClassName,\n )}\n >\n Learn about notice periods\n </ZendeskTriggerButton>\n </>,\n {\n className: (\n options?.jsfModify?.fields\n ?.proposed_termination_date_info as $TSFixMe\n )?.['x-jsf-presentation']?.className,\n },\n ),\n },\n };\n }, [options?.jsfModify]);\n\n const { data: terminationHeadlessForm, isLoading: isLoadingTermination } =\n useTerminationSchema({\n formValues: formValues,\n jsfModify: {\n ...options?.jsfModify,\n fields: {\n ...options?.jsfModify?.fields,\n ...customFields?.fields,\n },\n },\n step: stepState.currentStep.name,\n });\n\n const entireTerminationSchema = createHeadlessForm(jsonSchema.data.schema);\n\n const createTermination = useCreateTermination();\n const { mutateAsync } = mutationToPromise(createTermination);\n\n async function onSubmit(values: TerminationFormValues) {\n if (!employmentId) {\n throw new Error('Employment id is missing');\n }\n\n if (terminationHeadlessForm) {\n // this is a hack because I need to validate all form values with the entire schema\n const parsedValues = parseJSFToValidate(\n values,\n entireTerminationSchema.fields,\n { isPartialValidation: true },\n );\n\n const { customer_informed_employee: customerInformedEmployee } =\n parsedValues;\n\n const employeeAwareness =\n customerInformedEmployee === 'yes'\n ? {\n employee_awareness: {\n date: parsedValues.customer_informed_employee_date,\n note: parsedValues.customer_informed_employee_description,\n },\n }\n : undefined;\n\n const radioFieldKeys = [\n 'agrees_to_pto_amount',\n 'confidential',\n 'customer_informed_employee',\n 'will_challenge_termination',\n ];\n\n const parsedRadioValues = parseFormRadioValues(\n parsedValues,\n radioFieldKeys,\n );\n\n const normalizedValues = omit(\n parsedRadioValues,\n 'customer_informed_employee_date',\n 'customer_informed_employee_description',\n );\n\n const terminationDetails: TerminationDetailsParams = omitBy(\n {\n ...normalizedValues,\n ...employeeAwareness,\n },\n isNull,\n ) as unknown as TerminationDetailsParams;\n\n const terminationPayload: CreateOffboardingParams = {\n employment_id: employmentId,\n termination_details: terminationDetails,\n type: 'termination',\n };\n\n return mutateAsync(terminationPayload);\n }\n\n return;\n }\n\n function back() {\n previousStep();\n }\n\n function next() {\n nextStep();\n }\n\n const initialValues = buildInitialValues({\n ...stepState.values?.employee_communication,\n ...stepState.values?.termination_details,\n ...stepState.values?.paid_time_off,\n ...stepState.values?.additional_information,\n ...terminationInitialValues,\n });\n\n return {\n /**\n * Employment id passed useful to be used between components\n */\n employmentId,\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 contract amendment schema\n */\n fields: terminationHeadlessForm?.fields || [],\n /**\n * Loading state indicating if the termination schema is being fetched\n */\n isLoading: isLoadingTermination,\n /**\n * Loading state indicating if a contract amendment mutation is in progress\n */\n isSubmitting: createTermination.isPending,\n /**\n * Initial form values\n */\n initialValues: initialValues,\n /**\n * Function to validate form values against the contract amendment schema\n * @param values - Form values to validate\n * @returns Validation result or null if no schema is available\n */\n handleValidation: (values: TerminationFormValues) => {\n if (terminationHeadlessForm) {\n const parsedValues = parseJSFToValidate(\n values,\n terminationHeadlessForm?.fields,\n );\n return terminationHeadlessForm?.handleValidation(parsedValues);\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: (values: Partial<TerminationFormValues>) => {\n if (entireTerminationSchema) {\n const parsedValues = parseJSFToValidate(\n values,\n entireTerminationSchema?.fields,\n { isPartialValidation: true },\n );\n setFieldValues(parsedValues as TerminationFormValues);\n }\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: (values: TerminationFormValues) => {\n return parseJSFToValidate(values, entireTerminationSchema.fields, {\n isPartialValidation: true,\n });\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","import { cn } from '@/src/lib/utils';\nimport { $TSFixMe } from '@/src/types/remoteFlows';\n\ntype JSFPresentationConfig = {\n inputType?: string;\n Component?: React.ComponentType<$TSFixMe>;\n hidden?: boolean;\n [key: string]: unknown;\n};\n\ntype JSFFieldConfig = {\n 'x-jsf-presentation'?: JSFPresentationConfig;\n [key: string]: unknown;\n};\n\n/**\n * Creates an information field with standard styling\n */\nexport function createInformationField(\n title: React.ReactNode,\n description: React.ReactNode,\n options?: {\n className?: string;\n },\n): JSFFieldConfig {\n return {\n presentation: {\n inputType: 'hidden',\n Component: () => (\n <div\n className={cn(\n 'RemoteFlows__InformationStatement',\n options?.className,\n )}\n >\n <h3 className={cn('RemoteFlows__InformationStatement__Title')}>\n {title}\n </h3>\n <p className={cn('RemoteFlows__InformationStatement__Description')}>\n {description}\n </p>\n </div>\n ),\n },\n };\n}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C,EAAA6B,EAAA,YAgEf,SAASa,GAAO,CACdlC,EAAa,CACf,CAFSR,EAAA0C,EAAA,QAIT,SAASC,GAAO,CACdlC,EAAS,CACX,CAFST,EAAA2C,EAAA,QAIT,IAAMC,EAAgB9C,EAAmB,CACvC,GAAGS,EAAU,QAAQ,uBACrB,GAAGA,EAAU,QAAQ,oBACrB,GAAGA,EAAU,QAAQ,cACrB,GAAGA,EAAU,QAAQ,uBACrB,GAAGH,CACL,CAAC,EAED,MAAO,CAIL,aAAAF,EAIA,UAAAK,EAIA,OAAQY,GAAyB,QAAU,CAAC,EAI5C,UAAWC,EAIX,aAAcK,EAAkB,UAIhC,cAAemB,EAMf,iBAAkB5C,EAAC8B,GAAkC,CACnD,GAAIX,EAAyB,CAC3B,IAAMY,EAAeC,EACnBF,EACAX,GAAyB,MAC3B,EACA,OAAOA,GAAyB,iBAAiBY,CAAY,CAC/D,CACA,OAAO,IACT,EATkB,oBAclB,kBAAmB/B,EAAC8B,GAA2C,CAC7D,GAAIR,EAAyB,CAC3B,IAAMS,EAAeC,EACnBF,EACAR,GAAyB,OACzB,CAAE,oBAAqB,EAAK,CAC9B,EACAhB,EAAeyB,CAAqC,CACtD,CACF,EATmB,qBAenB,gBAAiB/B,EAAC8B,GACTE,EAAmBF,EAAQR,EAAwB,OAAQ,CAChE,oBAAqB,EACvB,CAAC,EAHc,mBAUjB,SAAAO,EAMA,KAAAa,EAMA,KAAAC,CACF,CACF,EA7O8B","names":["createHeadlessForm","omitBy","isNull","omit","useMemo","jsx","jsxs","createInformationField","title","description","options","__name","cn","Fragment","jsx","jsxs","buildInitialValues","stepsInitialValues","__name","useTermination","employmentId","options","terminationInitialValues","fieldValues","setFieldValues","stepState","previousStep","nextStep","useStepState","STEPS","formValues","customFields","useMemo","createInformationField","ZendeskTriggerButton","zendeskArticles","cn","terminationHeadlessForm","isLoadingTermination","useTerminationSchema","entireTerminationSchema","createHeadlessForm","jsonSchema","createTermination","useCreateTermination","mutateAsync","mutationToPromise","onSubmit","values","parsedValues","parseJSFToValidate","customerInformedEmployee","employeeAwareness","parsedRadioValues","parseFormRadioValues","normalizedValues","omit","terminationDetails","omitBy","isNull","back","next","initialValues"]}
|
package/dist/chunk-VXPJXQP3.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as R}from"./chunk-WVJDCDGZ.js";import{A as M,D as k,d as F,f as C,i as g,j as S,l as j,n as w,o as v,q as E,s as O,t as q,u as P,w as x,x as V}from"./chunk-MISHDUB2.js";import{b as U}from"./chunk-Z5WMKCRJ.js";import{d as a}from"./chunk-3ZWDIEEM.js";import{a as b}from"./chunk-PAQW5BFW.js";import{a as n}from"./chunk-P37U34EQ.js";import{createHeadlessForm as p,modify as d}from"@remoteoss/json-schema-form";import{useMutation as c,useQuery as f}from"@tanstack/react-query";var $=n(t=>{let{client:r}=a();return f({queryKey:["employment",t],retry:!1,enabled:!!t,select:n(({data:e})=>e?.data.employment,"select"),queryFn:n(async()=>{let e=await q({client:r,headers:{Authorization:""},path:{employment_id:t}});if(e.error||!e.data)throw new Error("Failed to fetch employment data");return e},"queryFn")})},"useEmployment"),ee=n(t=>{let{client:r}=a();return f({queryKey:["company",t],retry:!1,enabled:!!t,queryFn:n(async()=>{let e=await v({client:r,headers:{Authorization:""},path:{company_id:t}});if(e.error||!e.data)throw new Error("Failed to fetch employment data");return e},"queryFn"),select:n(({data:e})=>e.data.company,"select")})},"useCompany"),te=n(t=>{let{client:r}=a();return f({queryKey:["benefit-offers",t],retry:!1,enabled:!!t,queryFn:n(async()=>g({client:r,path:{employment_id:t}}).then(e=>{if(e.error||!e.data)throw new Error("Failed to fetch benefit offers data");return e}),"queryFn"),select:n(({data:e})=>e?.data?.reduce((o,s)=>({...o,[s.benefit_group.slug]:{value:s.benefit_tier?.slug??"no",...s.benefit_group?.filter?.slug?{filter:s.benefit_group?.filter?.slug}:{}}}),{}),"select")})},"useBenefitOffers"),ne=n(()=>{let{client:t}=a();return c({mutationFn:n(r=>k({client:t,headers:{Authorization:""},path:r}),"mutationFn")})},"useEmploymentInvite"),re=n(()=>{let{client:t}=a();return c({mutationFn:n(r=>w({client:t,body:r}),"mutationFn")})},"useCreateReserveInvoice"),oe=n(({countryCode:t,form:r,fieldValues:e,options:o,query:s={}})=>{let{client:i}=a(),m=o?.jsonSchemaVersion?.form_schema?.[r]?{json_schema_version:o.jsonSchemaVersion.form_schema[r]}:{};return f({queryKey:["onboarding-json-schema-form",t,r],retry:!1,queryFn:n(async()=>{let l=await E({client:i,headers:{Authorization:""},path:{country_code:t,form:r},query:{skip_benefits:!0,...s,...m}});if(l.error||!l.data)throw new Error("Failed to fetch onboarding schema");return l},"queryFn"),enabled:o?.queryOptions?.enabled,select:n(({data:l})=>{let u=l?.data||{};if(o&&o.jsfModify){let{schema:y}=d(u,o.jsfModify);u=y}let z=U(u.properties||{},"money").reduce((y,_)=>(y[_]=b(e[_]),y),{}),A={...e,...z};return{meta:{"x-jsf-fieldsets":u["x-jsf-fieldsets"]},...p(u,{initialValues:A})}},"select")})},"useJSONSchemaForm"),se=n((t,r,e)=>{let o=e?.jsonSchemaVersion?.benefit_offers_form_schema?{json_schema_version:e.jsonSchemaVersion.benefit_offers_form_schema}:{},{client:s}=a();return f({queryKey:["benefit-offers-schema",t],retry:!1,enabled:!!t,queryFn:n(async()=>{let i=await O({client:s,path:{employment_id:t},query:o});if(i.error||!i.data)throw new Error("Failed to fetch benefit offers schema");return i},"queryFn"),select:n(({data:i})=>{let m=i?.data?.schema||{};if(e&&e.jsfModify?.benefits){let{schema:h}=d(m,e.jsfModify.benefits);m=h}let l=Object.keys(r).length>0;return p(m,{initialValues:l?{...r}:{}})},"select")})},"useBenefitOffersSchema"),ae=n(t=>{let{client:r}=a(),e=t?.jsonSchemaVersion?.form_schema?.employment_basic_information?{json_schema_version:t.jsonSchemaVersion.form_schema.employment_basic_information}:{};return c({mutationFn:n(o=>C({client:r,headers:{Authorization:""},body:o,query:{...e}}),"mutationFn")})},"useCreateEmployment"),ie=n(t=>{let{client:r}=a(),e={employment_basic_information_json_schema_version:t?.jsonSchemaVersion?.form_schema?.employment_basic_information,employment_contract_details_json_schema_version:t?.jsonSchemaVersion?.form_schema?.contract_details},o=Object.fromEntries(Object.entries(e).filter(([,s])=>s!==void 0));return c({mutationFn:n(({employmentId:s,...i})=>P({client:r,headers:{Authorization:""},body:i,path:{employment_id:s},query:{skip_benefits:!0,...o}}),"mutationFn")})},"useUpdateEmployment"),ce=n(t=>{let{client:r}=a();return c({mutationFn:n(({employmentId:e,...o})=>{let s=t?.jsonSchemaVersion?.benefit_offers_form_schema?{json_schema_version:t.jsonSchemaVersion.benefit_offers_form_schema}:{};return S({client:r,body:o,path:{employment_id:e},query:{...s}})},"mutationFn")})},"useUpdateBenefitsOffers"),me=n(()=>{let{client:t}=a();return c({mutationFn:n(r=>j({client:t,headers:{Authorization:""},body:r}),"mutationFn")})},"useMagicLink"),B=n(t=>{let{client:r}=a();return f({...t,queryKey:["countries"],retry:!1,queryFn:n(async()=>{let e=await V({client:r,headers:{Authorization:""}});if(e.error||!e.data)throw new Error("Failed to fetch supported countries");return e},"queryFn"),select:n(({data:e})=>e?.data?.filter(o=>o.eor_onboarding).map(o=>({label:o.name,value:o.code}))||[],"select")})},"useCountries"),le=n(t=>{let{data:r,isLoading:e}=B(t?.queryOptions),{schema:o}=d(R.data.schema,t?.jsfModify||{}),s=p(o);if(r){let i=s.fields.find(m=>m.name==="country");i&&(i.options=r)}return{isLoading:e,selectCountryForm:s}},"useCountriesSchemaField"),ue=n(({type:t="spread"})=>{let{client:r}=a();return c({mutationFn:n(e=>(t==="no_spread"?F:M)({client:r,body:e}),"mutationFn")})},"useConvertCurrency"),fe=n(()=>{let{client:t}=a();return c({mutationFn:n(({employmentId:r,...e})=>x({client:t,path:{employment_id:r},body:e}),"mutationFn")})},"useUpsertContractEligibility");export{$ as a,ee as b,te as c,ne as d,re as e,oe as f,se as g,ae as h,ie as i,ce as j,me as k,le as l,ue as m,fe as n};
|
|
2
|
-
//# sourceMappingURL=chunk-VXPJXQP3.js.map
|
package/dist/chunk-Z442TFR6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as o}from"./chunk-N6G4VZXF.js";import{a as m}from"./chunk-DKA2EUPQ.js";import{a as e}from"./chunk-GC23RRCI.js";import{a as i}from"./chunk-XSHHMBMT.js";var p={employee_communication:o,termination_details:e,paid_time_off:m,additional_information:i};export{p as a};
|
|
2
|
-
//# sourceMappingURL=chunk-Z442TFR6.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"../../../chunk-MFKGLMRJ.js";import"../../../chunk-32GSS4UM.js";import"../../../chunk-JBUNDNKJ.js";import"../../../chunk-7R347KBY.js";import"../../../chunk-AFRA4BIW.js";import"../../../chunk-XICA45G2.js";import"../../../chunk-3A47R5RQ.js";import"../../../chunk-TWIUL2P3.js";import"../../../chunk-D6X2WCEG.js";import"../../../chunk-HPHWQU34.js";import"../../../chunk-PD24XKD6.js";import"../../../chunk-ZX5OIIJX.js";import"../../../chunk-MISHDUB2.js";import"../../../chunk-E773NPNL.js";import"../../../chunk-3ZWDIEEM.js";import"../../../chunk-MQ6F5LE4.js";import"../../../chunk-43WMZDDH.js";import"../../../chunk-P37U34EQ.js";export{a as TerminationDialogInfoContent};
|
|
2
|
-
//# sourceMappingURL=TerminationDialogInfoContent.js.map
|
|
File without changes
|
|
File without changes
|
|
File without changes
|