@remoteoss/remote-flows 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-7YVCTEDW.js → chunk-22JS3T6G.js} +2 -2
- package/dist/{chunk-KRL5QCOA.js → chunk-2NGJN5IE.js} +2 -2
- package/dist/{chunk-I3O6X5XB.js → chunk-2U4VW5TT.js} +2 -2
- package/dist/{chunk-WKTJKMHC.js → chunk-2VWU5VNU.js} +2 -2
- package/dist/{chunk-FE5CZPR7.js → chunk-2WDEVWIE.js} +2 -2
- package/dist/{chunk-HRA6BY3O.js → chunk-3A47R5RQ.js} +2 -2
- package/dist/{chunk-YLBQWZOK.js → chunk-3I6ONATN.js} +2 -2
- package/dist/chunk-43WMZDDH.js +2 -0
- package/dist/chunk-43WMZDDH.js.map +1 -0
- package/dist/{chunk-SERAGBDA.js → chunk-5N4L2G7Q.js} +2 -2
- package/dist/{chunk-NCS6X3XL.js → chunk-5QP2BAUT.js} +2 -2
- package/dist/{chunk-FS27V36X.js → chunk-5SKMAYLG.js} +2 -2
- package/dist/{chunk-3RAEG64W.js → chunk-6L7JELHX.js} +2 -2
- package/dist/{chunk-I5X2IPYD.js → chunk-7EDGHYMX.js} +2 -2
- package/dist/{chunk-M4EVWRWB.js → chunk-7R347KBY.js} +2 -2
- package/dist/{chunk-C4VLCUWK.js → chunk-A6X6N2G7.js} +2 -2
- package/dist/{chunk-ASKKS4Z3.js → chunk-AFRA4BIW.js} +2 -2
- package/dist/{chunk-MORMQBAF.js → chunk-BCXRPHWY.js} +2 -2
- package/dist/{chunk-UQYM3PBZ.js → chunk-BPJHPGTL.js} +2 -2
- package/dist/{chunk-ZJ3JHILJ.js → chunk-BV3PGYSH.js} +2 -2
- package/dist/{chunk-A7ZEA2WU.js → chunk-BVCBX72U.js} +2 -2
- package/dist/{chunk-PBXOHZN5.js → chunk-C4AVUIG2.js} +2 -2
- package/dist/{chunk-OJNWWRD5.js → chunk-C4SMHWP4.js} +2 -2
- package/dist/chunk-CELNQ7KS.js +2 -0
- package/dist/chunk-CELNQ7KS.js.map +1 -0
- package/dist/{chunk-BR7CQPJA.js → chunk-CHQK23RH.js} +2 -2
- package/dist/{chunk-U23SN7CM.js → chunk-CNDSIADP.js} +2 -2
- package/dist/{chunk-JWZIWG4T.js → chunk-D52VU4UO.js} +2 -2
- package/dist/{chunk-BRENSYKE.js → chunk-D5KITGC6.js} +2 -2
- package/dist/{chunk-C737VJYN.js → chunk-D6X2WCEG.js} +2 -2
- package/dist/{chunk-VRVK3X2R.js → chunk-DHJZVBVD.js} +2 -2
- package/dist/chunk-DKA2EUPQ.js +2 -0
- package/dist/chunk-DKA2EUPQ.js.map +1 -0
- package/dist/{chunk-CWEPL5J3.js → chunk-DTHBG6BD.js} +2 -2
- package/dist/{chunk-2QGDCMCE.js → chunk-E773NPNL.js} +2 -2
- package/dist/{chunk-YL46DDPK.js → chunk-EIVHHLR5.js} +2 -2
- package/dist/{chunk-JDK2CKH7.js → chunk-FVFXPT3Y.js} +2 -2
- package/dist/{chunk-U2THNES3.js → chunk-GECFDGI7.js} +2 -2
- package/dist/{chunk-PNET2M7R.js → chunk-GLUERRJ2.js} +2 -2
- package/dist/{chunk-KN4F5TMS.js → chunk-GOB6DUFS.js} +2 -2
- package/dist/{chunk-33L3KAS5.js → chunk-GUHBW4V3.js} +2 -2
- package/dist/{chunk-OIBVTGB4.js → chunk-H425RKFI.js} +2 -2
- package/dist/{chunk-R2VVXLL7.js → chunk-HPHWQU34.js} +2 -2
- package/dist/{chunk-DS565IWX.js → chunk-IK6IRESD.js} +2 -2
- package/dist/{chunk-MCAK5KPI.js → chunk-IUU4MOLL.js} +2 -2
- package/dist/{chunk-LTJBNOLY.js → chunk-J26AI33Z.js} +2 -2
- package/dist/{chunk-2ZT2TLPE.js → chunk-JG7FV7OZ.js} +2 -2
- package/dist/{chunk-DZ4UXMF3.js → chunk-JX3OQNNM.js} +2 -2
- package/dist/{chunk-GYX4DKK2.js → chunk-K4NAASBM.js} +2 -2
- package/dist/{chunk-R52D2I6X.js → chunk-KJSZIASL.js} +2 -2
- package/dist/{chunk-B3WXLC2R.js → chunk-LWGVLLBH.js} +2 -2
- package/dist/{chunk-ZCMFMCSZ.js → chunk-MFKGLMRJ.js} +2 -2
- package/dist/{chunk-XVW2URFK.js → chunk-MQ6F5LE4.js} +2 -2
- package/dist/{chunk-3PCSFTM3.js → chunk-MQWVZSGH.js} +2 -2
- package/dist/{chunk-YQKD74UF.js → chunk-MRVBOQLW.js} +2 -2
- package/dist/{chunk-IQRBTXZ4.js → chunk-NHYBFEXA.js} +2 -2
- package/dist/{chunk-VXCCAIWS.js → chunk-OOUYQLIE.js} +2 -2
- package/dist/{chunk-7IHBNPZK.js → chunk-PD24XKD6.js} +2 -2
- package/dist/chunk-PJUC5WAJ.js +2 -0
- package/dist/chunk-PJUC5WAJ.js.map +1 -0
- package/dist/chunk-PSEOAELN.js +2 -0
- package/dist/chunk-PSEOAELN.js.map +1 -0
- package/dist/{chunk-CSHVGHQR.js → chunk-QIAZQLSG.js} +2 -2
- package/dist/{chunk-4ULJIT4W.js → chunk-QU3NSFU5.js} +2 -2
- package/dist/{chunk-X4GAGLFN.js → chunk-RJGWAZBE.js} +2 -2
- package/dist/{chunk-GETLSRVM.js → chunk-T6BYBXQA.js} +2 -2
- package/dist/{chunk-LE3JY644.js → chunk-TGUF5Q7J.js} +2 -2
- package/dist/{chunk-M3B3ASM4.js → chunk-TWD2IDAS.js} +2 -2
- package/dist/{chunk-2I5DIIJP.js → chunk-TWIUL2P3.js} +2 -2
- package/dist/{chunk-VCO2QEJU.js → chunk-ULHGAKFT.js} +2 -2
- package/dist/{chunk-6F4YCVZE.js → chunk-V2PJW577.js} +2 -2
- package/dist/{chunk-QBECPUJM.js → chunk-V6I3EMYX.js} +2 -2
- package/dist/{chunk-Y36KZYCU.js → chunk-VE36I6G6.js} +2 -2
- package/dist/{chunk-E5IJ2M63.js → chunk-WEYUB6DC.js} +2 -2
- package/dist/{chunk-WCHQEQF5.js → chunk-X5DMQNEM.js} +2 -2
- package/dist/{chunk-ZN4VWMV2.js → chunk-XHOQSIXZ.js} +2 -2
- package/dist/chunk-XICA45G2.js +2 -0
- package/dist/chunk-XICA45G2.js.map +1 -0
- package/dist/{chunk-GNZJOPIS.js → chunk-XKSAKI3P.js} +2 -2
- package/dist/{chunk-4Q4OTL2P.js → chunk-XTLLWD7O.js} +2 -2
- package/dist/{chunk-AIN5YFNL.js → chunk-Z442TFR6.js} +2 -2
- package/dist/{chunk-QFZ3XVDT.js → chunk-ZSCKSEAA.js} +2 -2
- package/dist/flows/ContractAmendment/ContractAmendmentBack.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +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/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/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/CostCalculatorIndirectTax.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorResults.d.ts +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorResults.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorResultsChart.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorTotalCost.js +1 -1
- package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +1 -1
- package/dist/flows/CostCalculator/SummaryResults/SummaryResults.js +1 -1
- package/dist/flows/CostCalculator/api.d.ts +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/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 +16 -13
- package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
- package/dist/flows/Termination/EmployeeComunicationForm.d.ts +16 -10
- package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
- package/dist/flows/Termination/PaidTimeOffForm.d.ts +16 -10
- package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
- package/dist/flows/Termination/TerminationBack.js +1 -1
- package/dist/flows/Termination/TerminationDetailsForm.d.ts +16 -10
- package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
- package/dist/flows/Termination/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
- package/dist/flows/Termination/TerminationFlow.d.ts +11 -51
- package/dist/flows/Termination/TerminationFlow.js +1 -1
- package/dist/flows/Termination/TerminationForm.d.ts +14 -2
- package/dist/flows/Termination/TerminationForm.js +1 -1
- package/dist/flows/Termination/TerminationReasonsDetailContent/TerminationReasonsDetailContent.js +1 -1
- package/dist/flows/Termination/TerminationSubmit.js +1 -1
- package/dist/flows/Termination/TimeOff.d.ts +1 -1
- package/dist/flows/Termination/context.d.ts +8 -5
- package/dist/flows/Termination/hooks.d.ts +12 -98
- package/dist/flows/Termination/hooks.js +1 -1
- package/dist/flows/Termination/index.d.ts +8 -13
- package/dist/flows/Termination/index.js +1 -1
- package/dist/flows/Termination/json-schemas/jsonSchema.d.ts +51 -66
- package/dist/flows/Termination/json-schemas/jsonSchema.js +1 -1
- package/dist/flows/Termination/json-schemas/paidTimeOff.d.ts +16 -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 +16 -23
- package/dist/flows/api.d.ts +14 -2
- package/dist/flows/api.js +1 -1
- package/dist/index.d.ts +10 -15
- package/dist/index.js +1 -1
- package/dist/internals.js +1 -1
- package/dist/{mutations-CK4Y5P1M.d.ts → mutations-BxS-iGnr.d.ts} +1 -1
- package/dist/{remoteFlows-CeiBUgpD.d.ts → remoteFlows-DnbCoINb.d.ts} +1 -1
- package/dist/{types-DeIKH9Nn.d.ts → types-BnLDzD9Z.d.ts} +3 -3
- package/dist/types-D31aAyFm.d.ts +174 -0
- package/dist/{types-8MKjvKH1.d.ts → types-pEe84X2Z.d.ts} +4 -4
- package/dist/{types.gen-Bb9d9VOg.d.ts → types.gen-DOXoUj5J.d.ts} +1 -1
- package/package.json +1 -2
- package/dist/chunk-54KJP7WD.js +0 -2
- package/dist/chunk-54KJP7WD.js.map +0 -1
- package/dist/chunk-E5PSJ75C.js +0 -2
- package/dist/chunk-E5PSJ75C.js.map +0 -1
- package/dist/chunk-LB35HMUG.js +0 -2
- package/dist/chunk-LB35HMUG.js.map +0 -1
- package/dist/chunk-NDR27PRO.js +0 -2
- package/dist/chunk-NDR27PRO.js.map +0 -1
- package/dist/chunk-TGU24WSW.js +0 -2
- package/dist/chunk-TGU24WSW.js.map +0 -1
- package/dist/chunk-W5DG5WWJ.js +0 -2
- package/dist/chunk-W5DG5WWJ.js.map +0 -1
- /package/dist/{chunk-7YVCTEDW.js.map → chunk-22JS3T6G.js.map} +0 -0
- /package/dist/{chunk-KRL5QCOA.js.map → chunk-2NGJN5IE.js.map} +0 -0
- /package/dist/{chunk-I3O6X5XB.js.map → chunk-2U4VW5TT.js.map} +0 -0
- /package/dist/{chunk-WKTJKMHC.js.map → chunk-2VWU5VNU.js.map} +0 -0
- /package/dist/{chunk-FE5CZPR7.js.map → chunk-2WDEVWIE.js.map} +0 -0
- /package/dist/{chunk-HRA6BY3O.js.map → chunk-3A47R5RQ.js.map} +0 -0
- /package/dist/{chunk-YLBQWZOK.js.map → chunk-3I6ONATN.js.map} +0 -0
- /package/dist/{chunk-SERAGBDA.js.map → chunk-5N4L2G7Q.js.map} +0 -0
- /package/dist/{chunk-NCS6X3XL.js.map → chunk-5QP2BAUT.js.map} +0 -0
- /package/dist/{chunk-FS27V36X.js.map → chunk-5SKMAYLG.js.map} +0 -0
- /package/dist/{chunk-3RAEG64W.js.map → chunk-6L7JELHX.js.map} +0 -0
- /package/dist/{chunk-I5X2IPYD.js.map → chunk-7EDGHYMX.js.map} +0 -0
- /package/dist/{chunk-M4EVWRWB.js.map → chunk-7R347KBY.js.map} +0 -0
- /package/dist/{chunk-C4VLCUWK.js.map → chunk-A6X6N2G7.js.map} +0 -0
- /package/dist/{chunk-ASKKS4Z3.js.map → chunk-AFRA4BIW.js.map} +0 -0
- /package/dist/{chunk-MORMQBAF.js.map → chunk-BCXRPHWY.js.map} +0 -0
- /package/dist/{chunk-UQYM3PBZ.js.map → chunk-BPJHPGTL.js.map} +0 -0
- /package/dist/{chunk-ZJ3JHILJ.js.map → chunk-BV3PGYSH.js.map} +0 -0
- /package/dist/{chunk-A7ZEA2WU.js.map → chunk-BVCBX72U.js.map} +0 -0
- /package/dist/{chunk-PBXOHZN5.js.map → chunk-C4AVUIG2.js.map} +0 -0
- /package/dist/{chunk-OJNWWRD5.js.map → chunk-C4SMHWP4.js.map} +0 -0
- /package/dist/{chunk-BR7CQPJA.js.map → chunk-CHQK23RH.js.map} +0 -0
- /package/dist/{chunk-U23SN7CM.js.map → chunk-CNDSIADP.js.map} +0 -0
- /package/dist/{chunk-JWZIWG4T.js.map → chunk-D52VU4UO.js.map} +0 -0
- /package/dist/{chunk-BRENSYKE.js.map → chunk-D5KITGC6.js.map} +0 -0
- /package/dist/{chunk-C737VJYN.js.map → chunk-D6X2WCEG.js.map} +0 -0
- /package/dist/{chunk-VRVK3X2R.js.map → chunk-DHJZVBVD.js.map} +0 -0
- /package/dist/{chunk-CWEPL5J3.js.map → chunk-DTHBG6BD.js.map} +0 -0
- /package/dist/{chunk-2QGDCMCE.js.map → chunk-E773NPNL.js.map} +0 -0
- /package/dist/{chunk-YL46DDPK.js.map → chunk-EIVHHLR5.js.map} +0 -0
- /package/dist/{chunk-JDK2CKH7.js.map → chunk-FVFXPT3Y.js.map} +0 -0
- /package/dist/{chunk-U2THNES3.js.map → chunk-GECFDGI7.js.map} +0 -0
- /package/dist/{chunk-PNET2M7R.js.map → chunk-GLUERRJ2.js.map} +0 -0
- /package/dist/{chunk-KN4F5TMS.js.map → chunk-GOB6DUFS.js.map} +0 -0
- /package/dist/{chunk-33L3KAS5.js.map → chunk-GUHBW4V3.js.map} +0 -0
- /package/dist/{chunk-OIBVTGB4.js.map → chunk-H425RKFI.js.map} +0 -0
- /package/dist/{chunk-R2VVXLL7.js.map → chunk-HPHWQU34.js.map} +0 -0
- /package/dist/{chunk-DS565IWX.js.map → chunk-IK6IRESD.js.map} +0 -0
- /package/dist/{chunk-MCAK5KPI.js.map → chunk-IUU4MOLL.js.map} +0 -0
- /package/dist/{chunk-LTJBNOLY.js.map → chunk-J26AI33Z.js.map} +0 -0
- /package/dist/{chunk-2ZT2TLPE.js.map → chunk-JG7FV7OZ.js.map} +0 -0
- /package/dist/{chunk-DZ4UXMF3.js.map → chunk-JX3OQNNM.js.map} +0 -0
- /package/dist/{chunk-GYX4DKK2.js.map → chunk-K4NAASBM.js.map} +0 -0
- /package/dist/{chunk-R52D2I6X.js.map → chunk-KJSZIASL.js.map} +0 -0
- /package/dist/{chunk-B3WXLC2R.js.map → chunk-LWGVLLBH.js.map} +0 -0
- /package/dist/{chunk-ZCMFMCSZ.js.map → chunk-MFKGLMRJ.js.map} +0 -0
- /package/dist/{chunk-XVW2URFK.js.map → chunk-MQ6F5LE4.js.map} +0 -0
- /package/dist/{chunk-3PCSFTM3.js.map → chunk-MQWVZSGH.js.map} +0 -0
- /package/dist/{chunk-YQKD74UF.js.map → chunk-MRVBOQLW.js.map} +0 -0
- /package/dist/{chunk-IQRBTXZ4.js.map → chunk-NHYBFEXA.js.map} +0 -0
- /package/dist/{chunk-VXCCAIWS.js.map → chunk-OOUYQLIE.js.map} +0 -0
- /package/dist/{chunk-7IHBNPZK.js.map → chunk-PD24XKD6.js.map} +0 -0
- /package/dist/{chunk-CSHVGHQR.js.map → chunk-QIAZQLSG.js.map} +0 -0
- /package/dist/{chunk-4ULJIT4W.js.map → chunk-QU3NSFU5.js.map} +0 -0
- /package/dist/{chunk-X4GAGLFN.js.map → chunk-RJGWAZBE.js.map} +0 -0
- /package/dist/{chunk-GETLSRVM.js.map → chunk-T6BYBXQA.js.map} +0 -0
- /package/dist/{chunk-LE3JY644.js.map → chunk-TGUF5Q7J.js.map} +0 -0
- /package/dist/{chunk-M3B3ASM4.js.map → chunk-TWD2IDAS.js.map} +0 -0
- /package/dist/{chunk-2I5DIIJP.js.map → chunk-TWIUL2P3.js.map} +0 -0
- /package/dist/{chunk-VCO2QEJU.js.map → chunk-ULHGAKFT.js.map} +0 -0
- /package/dist/{chunk-6F4YCVZE.js.map → chunk-V2PJW577.js.map} +0 -0
- /package/dist/{chunk-QBECPUJM.js.map → chunk-V6I3EMYX.js.map} +0 -0
- /package/dist/{chunk-Y36KZYCU.js.map → chunk-VE36I6G6.js.map} +0 -0
- /package/dist/{chunk-E5IJ2M63.js.map → chunk-WEYUB6DC.js.map} +0 -0
- /package/dist/{chunk-WCHQEQF5.js.map → chunk-X5DMQNEM.js.map} +0 -0
- /package/dist/{chunk-ZN4VWMV2.js.map → chunk-XHOQSIXZ.js.map} +0 -0
- /package/dist/{chunk-GNZJOPIS.js.map → chunk-XKSAKI3P.js.map} +0 -0
- /package/dist/{chunk-4Q4OTL2P.js.map → chunk-XTLLWD7O.js.map} +0 -0
- /package/dist/{chunk-AIN5YFNL.js.map → chunk-Z442TFR6.js.map} +0 -0
- /package/dist/{chunk-QFZ3XVDT.js.map → chunk-ZSCKSEAA.js.map} +0 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import { O as OffboardingResponse, P as PostCreateOffboardingError, Z as TerminationDetailsParams } from './types.gen-DOXoUj5J.js';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import { E as ErrorResponse, S as SuccessResponse } from './mutations-BxS-iGnr.js';
|
|
4
|
+
import * as _remoteoss_json_schema_form from '@remoteoss/json-schema-form';
|
|
5
|
+
import { $TSFixMe } from '@remoteoss/json-schema-form';
|
|
6
|
+
import { Step } from './flows/useStepState.js';
|
|
7
|
+
import { StepTerminationKeys } from './flows/Termination/utils.js';
|
|
8
|
+
import { TerminationBack } from './flows/Termination/TerminationBack.js';
|
|
9
|
+
import { TerminationSubmit } from './flows/Termination/TerminationSubmit.js';
|
|
10
|
+
import { TimeOff } from './flows/Termination/TimeOff.js';
|
|
11
|
+
import { JSFModify } from './flows/types.js';
|
|
12
|
+
|
|
13
|
+
type AdditionalDetailsFormProps = {
|
|
14
|
+
requesterName: string;
|
|
15
|
+
onSubmit?: (payload: TerminationFormValues) => void | Promise<void>;
|
|
16
|
+
onError?: (error: Error) => void;
|
|
17
|
+
onSuccess?: (data: OffboardingResponse) => void | Promise<void>;
|
|
18
|
+
};
|
|
19
|
+
declare function AdditionalDetailsForm({ requesterName, onSubmit, onSuccess, onError, }: AdditionalDetailsFormProps): react_jsx_runtime.JSX.Element;
|
|
20
|
+
|
|
21
|
+
type EmployeeComunicationProps = {
|
|
22
|
+
onSubmit?: (payload: TerminationFormValues) => void | Promise<void>;
|
|
23
|
+
};
|
|
24
|
+
declare function EmployeeCommunicationForm({ onSubmit, }: EmployeeComunicationProps): react_jsx_runtime.JSX.Element;
|
|
25
|
+
|
|
26
|
+
type TerminationHookProps = Omit<TerminationFlowProps, 'render'>;
|
|
27
|
+
declare const useTermination: ({ employmentId, options, initialValues: terminationInitialValues, }: TerminationHookProps) => {
|
|
28
|
+
/**
|
|
29
|
+
* Employment id passed useful to be used between components
|
|
30
|
+
*/
|
|
31
|
+
employmentId: string;
|
|
32
|
+
/**
|
|
33
|
+
* Current step state containing the current step and total number of steps
|
|
34
|
+
*/
|
|
35
|
+
stepState: {
|
|
36
|
+
currentStep: Step<StepTerminationKeys>;
|
|
37
|
+
totalSteps: number;
|
|
38
|
+
values: {
|
|
39
|
+
paid_time_off: TerminationFormValues;
|
|
40
|
+
termination_details: TerminationFormValues;
|
|
41
|
+
employee_communication: TerminationFormValues;
|
|
42
|
+
additional_information: TerminationFormValues;
|
|
43
|
+
} | null;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Array of form fields from the contract amendment schema
|
|
47
|
+
*/
|
|
48
|
+
fields: _remoteoss_json_schema_form.Fields;
|
|
49
|
+
/**
|
|
50
|
+
* Loading state indicating if the termination schema is being fetched
|
|
51
|
+
*/
|
|
52
|
+
isLoading: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* Loading state indicating if a contract amendment mutation is in progress
|
|
55
|
+
*/
|
|
56
|
+
isSubmitting: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Initial form values
|
|
59
|
+
*/
|
|
60
|
+
initialValues: TerminationFormValues;
|
|
61
|
+
/**
|
|
62
|
+
* Function to validate form values against the contract amendment schema
|
|
63
|
+
* @param values - Form values to validate
|
|
64
|
+
* @returns Validation result or null if no schema is available
|
|
65
|
+
*/
|
|
66
|
+
handleValidation: (values: TerminationFormValues) => {
|
|
67
|
+
yupError: $TSFixMe;
|
|
68
|
+
formErrors: $TSFixMe;
|
|
69
|
+
} | null;
|
|
70
|
+
/**
|
|
71
|
+
* Function to update the current form field values
|
|
72
|
+
* @param values - New form values to set
|
|
73
|
+
*/
|
|
74
|
+
checkFieldUpdates: (values: Partial<TerminationFormValues>) => void;
|
|
75
|
+
/**
|
|
76
|
+
* Function to parse form values before submission
|
|
77
|
+
* @param values - Form values to parse
|
|
78
|
+
* @returns Parsed form values
|
|
79
|
+
*/
|
|
80
|
+
parseFormValues: (values: TerminationFormValues) => Record<string, any>;
|
|
81
|
+
/**
|
|
82
|
+
* Function to handle form submission
|
|
83
|
+
* @param values - Form values to submit
|
|
84
|
+
* @returns Promise resolving to the mutation result
|
|
85
|
+
*/
|
|
86
|
+
onSubmit: (values: TerminationFormValues) => Promise<(ErrorResponse<Error> | SuccessResponse<({
|
|
87
|
+
data: OffboardingResponse;
|
|
88
|
+
error: undefined;
|
|
89
|
+
} | {
|
|
90
|
+
data: undefined;
|
|
91
|
+
error: PostCreateOffboardingError;
|
|
92
|
+
}) & {
|
|
93
|
+
request: Request;
|
|
94
|
+
response: Response;
|
|
95
|
+
}>) | undefined>;
|
|
96
|
+
/**
|
|
97
|
+
* Function to handle going back to the previous step
|
|
98
|
+
* @returns {void}
|
|
99
|
+
*/
|
|
100
|
+
back: () => void;
|
|
101
|
+
/**
|
|
102
|
+
* Function to handle going to the next step
|
|
103
|
+
* @returns {void}
|
|
104
|
+
*/
|
|
105
|
+
next: () => void;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
type PaidTimeOffFormProps = {
|
|
109
|
+
onSubmit?: (payload: TerminationFormValues) => void | Promise<void>;
|
|
110
|
+
};
|
|
111
|
+
declare function PaidTimeOffForm({ onSubmit }: PaidTimeOffFormProps): react_jsx_runtime.JSX.Element;
|
|
112
|
+
|
|
113
|
+
type TerminationDetailsFormProps = {
|
|
114
|
+
onSubmit?: (payload: TerminationFormValues) => void | Promise<void>;
|
|
115
|
+
};
|
|
116
|
+
declare function TerminationDetailsForm({ onSubmit, }: TerminationDetailsFormProps): react_jsx_runtime.JSX.Element;
|
|
117
|
+
|
|
118
|
+
type TerminationFormValues = {
|
|
119
|
+
acknowledge_termination_procedure: boolean;
|
|
120
|
+
additional_comments: string;
|
|
121
|
+
agrees_to_pto_amount: string;
|
|
122
|
+
agrees_to_pto_amount_notes: string | null;
|
|
123
|
+
confidential: string;
|
|
124
|
+
customer_informed_employee: string;
|
|
125
|
+
customer_informed_employee_date: string | null;
|
|
126
|
+
customer_informed_employee_description: string | null;
|
|
127
|
+
personal_email: string;
|
|
128
|
+
proposed_termination_date: string;
|
|
129
|
+
reason_description: string;
|
|
130
|
+
risk_assessment_reasons: TerminationDetailsParams['risk_assessment_reasons'];
|
|
131
|
+
termination_reason: TerminationDetailsParams['termination_reason'] | undefined;
|
|
132
|
+
termination_reason_files: TerminationDetailsParams['termination_reason_files'];
|
|
133
|
+
timesheet_file: TerminationDetailsParams['timesheet_file'];
|
|
134
|
+
will_challenge_termination: string;
|
|
135
|
+
will_challenge_termination_description: string | null;
|
|
136
|
+
};
|
|
137
|
+
type TerminationRenderProps = {
|
|
138
|
+
/**
|
|
139
|
+
* The termination bag returned by the useTermination hook.
|
|
140
|
+
* This bag contains all the methods and properties needed to handle the termination flow.
|
|
141
|
+
* @see {@link useTermination}
|
|
142
|
+
*/
|
|
143
|
+
terminationBag: ReturnType<typeof useTermination>;
|
|
144
|
+
/**
|
|
145
|
+
* The components used in the termination flow.
|
|
146
|
+
* This includes different steps, submit button, back button and timeoff.
|
|
147
|
+
* @see {@link TerminationSubmit}
|
|
148
|
+
* @see {@link TimeOff}
|
|
149
|
+
* @see {@link TerminationBack}
|
|
150
|
+
* @see {@link EmployeeCommunicationForm}
|
|
151
|
+
* @see {@link TerminationDetailsForm}
|
|
152
|
+
* @see {@link PaidTimeOffForm}
|
|
153
|
+
* @see {@link AdditionalDetailsForm}
|
|
154
|
+
*/
|
|
155
|
+
components: {
|
|
156
|
+
SubmitButton: typeof TerminationSubmit;
|
|
157
|
+
TimeOff: typeof TimeOff;
|
|
158
|
+
Back: typeof TerminationBack;
|
|
159
|
+
EmployeeComunicationStep: typeof EmployeeCommunicationForm;
|
|
160
|
+
TerminationDetailsStep: typeof TerminationDetailsForm;
|
|
161
|
+
PaidTimeOffStep: typeof PaidTimeOffForm;
|
|
162
|
+
AdditionalDetailsStep: typeof AdditionalDetailsForm;
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
type TerminationFlowProps = {
|
|
166
|
+
employmentId: string;
|
|
167
|
+
render: ({ terminationBag, components, }: TerminationRenderProps) => React.ReactNode;
|
|
168
|
+
options?: {
|
|
169
|
+
jsfModify?: JSFModify;
|
|
170
|
+
};
|
|
171
|
+
initialValues?: Record<string, unknown>;
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
export { AdditionalDetailsForm as A, EmployeeCommunicationForm as E, PaidTimeOffForm as P, type TerminationFormValues as T, type TerminationFlowProps as a, type TerminationRenderProps as b, TerminationDetailsForm as c, useTermination as u };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { j as Employment, F as File, g as CreateContractDocumentResponse, f as SignContractDocument, S as SuccessResponse } from './types.gen-DOXoUj5J.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-BxS-iGnr.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-DnbCoINb.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-BnLDzD9Z.js';
|
|
16
16
|
import { FlowOptions, JSFModify } from './flows/types.js';
|
|
17
17
|
import { OnboardingInvite } from './flows/Onboarding/components/OnboardingInvite.js';
|
|
18
18
|
|
|
@@ -1488,4 +1488,4 @@ type PostSignContractDocumentErrors = {
|
|
|
1488
1488
|
};
|
|
1489
1489
|
type PostSignContractDocumentError = PostSignContractDocumentErrors[keyof PostSignContractDocumentErrors];
|
|
1490
1490
|
|
|
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,
|
|
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, Currency as X, HelpCenterArticle as Y, TerminationDetailsParams as Z, ContractAmendmentAutomatableResponse as a, PostAutomatableContractAmendmentError as b, ContractAmendmentResponse as c, PostCreateContractAmendmentError as d, PostSignContractDocumentError as e, SignContractDocument as f, CreateContractDocumentResponse as g, PostCreateContractDocumentError as h, CreateContractDocument as i, Employment as j, CostCalculatorEstimateResponse as k, PostCreateEstimationError as l, CostCalculatorEstimatePdfResponse as m, PostCreateEstimationPdfError as n, CostCalculatorEstimateParams as o, CostCalculatorEstimateCsvResponse as p, PostCreateEstimationCsvError as q, MinimalCountry as r, EmploymentTermType as s, CostCalculatorEmployment as t, EmploymentCreationResponse as u, Company as v, PostInviteEmploymentInvitationError as w, PostCreateRiskReserveError as x, PostCreateEmployment2Error as y, EmploymentCreateParams as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remoteoss/remote-flows",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "NODE_ENV=production tsup",
|
|
6
6
|
"ci": "npm run build && npm run check-format && npm run check-exports && npm run lint && npm run type-check && npm run test",
|
|
@@ -108,7 +108,6 @@
|
|
|
108
108
|
},
|
|
109
109
|
"devDependencies": {
|
|
110
110
|
"@arethetypeswrong/cli": "^0.17.3",
|
|
111
|
-
"@changesets/cli": "^2.28.1",
|
|
112
111
|
"@eslint/js": "^9.22.0",
|
|
113
112
|
"@hey-api/openapi-ts": "^0.64.4",
|
|
114
113
|
"@testing-library/jest-dom": "^6.6.3",
|
package/dist/chunk-54KJP7WD.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-P37U34EQ.js";import{clsx as s}from"clsx";import{twMerge as p}from"tailwind-merge";import u from"dompurify";function g(...e){return p(s(e))}a(g,"cn");function V(e,n="\u20AC"){if(e==null)return"-";let r=e/100;return`${n}${r.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}a(V,"formatCurrency");var f=a(e=>{let n={};return e.inner.forEach(r=>{r.path!==void 0&&(n[r.path]={type:r.type,errors:r.errors,inner:r.inner.map(i=>f(i))})}),n},"transformYupErrorsIntoObject");function A(e){window.RemoteFlowsSDK={version:e}}a(A,"debug");var c=a(e=>{let n=new Set(e?e.toLowerCase().split(" "):[]);return n.add("noopener"),n.add("noreferrer"),Array.from(n).join(" ")},"appendSecureRelValue");u.isSupported&&u.addHook("afterSanitizeAttributes",e=>{let n=e.getAttribute("target");if(e.tagName==="A"&&(!n||n!=="_self")){e.setAttribute("target","_blank");let r=e.getAttribute("rel");e.setAttribute("rel",c(r))}});var E=a(e=>u.sanitize(e,{ADD_ATTR:["target"]}),"sanitizeHtml");function d(e,n){return n?Object.fromEntries(Object.entries(e).map(([r,i])=>{if(i===void 0)return[r,void 0];let t=n.find(o=>o.name===r);if(t?.isVisible===!1||t?.deprecated)return[r,void 0];if(t?.type==="radio"||t?.type==="select"){let o=t.options.find(l=>l.value===i);return o?[r,{prettyValue:o?.label,label:t?.label,inputType:t?.type}]:void 0}if(t?.type==="checkbox"&&t?.const)return[r,{prettyValue:!0,label:t.label,inputType:t?.type}];if(t?.type==="countries"&&Array.isArray(i))return[r,{prettyValue:i.join(),label:t.label,inputType:t?.type}];if(t?.type==="fieldset"){let o=d(i,t.fields);if(!o.label&&o.value){let l={...o.value,label:t.label,inputType:t?.type};return[r,l]}return[r,o]}if(t?.type==="money")return[r,{prettyValue:i,label:t.label,inputType:t?.type,currency:t?.currency}];if(t)return[r,{prettyValue:i,label:t.label,inputType:t?.type}]}).filter(Boolean)):{}}a(d,"prettifyFormValues");export{g as a,V as b,f as c,A as d,E as e,d as f};
|
|
2
|
-
//# sourceMappingURL=chunk-54KJP7WD.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/utils.ts"],"sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\nimport { ValidationError } from 'yup';\nimport DOMPurify from 'dompurify';\nimport { Fields } from '@remoteoss/json-schema-form';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport function formatCurrency(\n amount: number | undefined | null,\n symbol = '€',\n): string {\n if (amount == null) {\n return '-';\n }\n\n const value = amount / 100;\n\n return `${symbol}${value.toLocaleString('en-US', {\n minimumFractionDigits: 2,\n maximumFractionDigits: 2,\n })}`;\n}\n\ntype YupError = Pick<ValidationError, 'type' | 'errors'> & {\n inner: Record<string, YupError>[];\n};\n\n/**\n * Transforms a Yup ValidationError object into a more readable object. The format is as follows:\n * {\n * [fieldName]: {\n * type: string,\n * errors: string[],\n * inner: YupError[],\n * },\n * }\n * @param errors\n * @returns\n */\nexport const transformYupErrorsIntoObject = (errors: ValidationError) => {\n const validationErrors: Record<string, YupError> = {};\n\n errors.inner.forEach((error: ValidationError) => {\n if (error.path !== undefined) {\n validationErrors[error.path] = {\n type: error.type,\n errors: error.errors,\n inner: error.inner.map((innerError) =>\n transformYupErrorsIntoObject(innerError),\n ),\n };\n }\n });\n\n return validationErrors;\n};\n\n/**\n * Debug utility to add version to window object\n * @param version - The version of the SDK\n */\nexport function debug(version: string) {\n window.RemoteFlowsSDK = {\n version,\n };\n}\n\n// Deduplicates rel values if necessary and appends noopener and noreferrer\nconst appendSecureRelValue = (rel: string | null) => {\n const attributes = new Set(rel ? rel.toLowerCase().split(' ') : []);\n\n attributes.add('noopener');\n attributes.add('noreferrer');\n\n return Array.from(attributes).join(' ');\n};\n\nif (DOMPurify.isSupported) {\n DOMPurify.addHook('afterSanitizeAttributes', (node) => {\n const target = node.getAttribute('target');\n\n // set value of target to be _blank with rel, or keep as _self if already set\n if (node.tagName === 'A' && (!target || target !== '_self')) {\n node.setAttribute('target', '_blank');\n const rel = node.getAttribute('rel');\n node.setAttribute('rel', appendSecureRelValue(rel));\n }\n });\n}\n\nexport const sanitizeHtml = (html: string) => {\n return DOMPurify.sanitize(html, { ADD_ATTR: ['target'] });\n};\n\n/**\n * Function to prettify form values. Returns a pretty value and label for each field.\n * @param values - Form values to prettify\n * @param fields - Form fields\n * @returns Prettified form values\n */\n// @ts-expect-error need to check function return type\nexport function prettifyFormValues(\n values: Record<string, unknown>,\n fields: Fields | undefined,\n) {\n if (!fields) {\n return {};\n }\n return Object.fromEntries(\n Object.entries(values)\n // @ts-expect-error need to check function return type\n .map(([key, value]) => {\n if (value === undefined) {\n return [key, undefined];\n }\n\n const field = fields.find((field) => field.name === key);\n\n if (field?.isVisible === false || field?.deprecated) {\n return [key, undefined];\n }\n\n if (field?.type === 'radio' || field?.type === 'select') {\n const option = (\n field.options as Array<{ value: string; label: string }>\n ).find((option) => option.value === value);\n\n if (option) {\n return [\n key,\n {\n prettyValue: option?.label,\n label: field?.label,\n inputType: field?.type,\n },\n ];\n }\n return;\n }\n\n if (field?.type === 'checkbox' && field?.const) {\n return [\n key,\n { prettyValue: true, label: field.label, inputType: field?.type },\n ];\n }\n\n if (field?.type === 'countries' && Array.isArray(value)) {\n return [\n key,\n {\n prettyValue: value.join(),\n label: field.label,\n inputType: field?.type,\n },\n ];\n }\n\n if (field?.type === 'fieldset') {\n // @ts-expect-error need to check function return type\n const prettiedFieldset = prettifyFormValues(\n value as Record<string, unknown>,\n field.fields as Fields,\n );\n\n // Handles benefits fieldset in specific\n if (!prettiedFieldset.label && prettiedFieldset.value) {\n const prettyValue: Record<string, unknown> = {\n ...prettiedFieldset.value,\n label: field.label,\n inputType: field?.type,\n };\n return [key, prettyValue];\n }\n\n return [key, prettiedFieldset];\n }\n\n if (field?.type === 'money') {\n return [\n key,\n {\n prettyValue: value,\n label: field.label,\n inputType: field?.type,\n currency: field?.currency,\n },\n ];\n }\n\n if (field) {\n return [\n key,\n { prettyValue: value, label: field.label, inputType: field?.type },\n ];\n }\n })\n .filter(Boolean),\n );\n}\n"],"mappings":"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","names":["clsx","twMerge","DOMPurify","cn","inputs","twMerge","clsx","__name","formatCurrency","amount","symbol","value","transformYupErrorsIntoObject","errors","validationErrors","error","innerError","debug","version","appendSecureRelValue","rel","attributes","DOMPurify","node","target","sanitizeHtml","html","prettifyFormValues","values","fields","key","field","option","prettiedFieldset","prettyValue"]}
|
package/dist/chunk-E5PSJ75C.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e={data:{version:7,schema:{additionalProperties:!1,allOf:[{if:{properties:{personal_email:{pattern:"^[a-zA-Z0-9 .]+$"}}},then:{properties:{personal_email:{"x-jsf-presentation":{statement:{title:"Please make sure to add the employee personal email so we can get in contact with the employee after the termination process takes effect.",inputType:"statement",severity:"warning"}}}}}},{if:{properties:{customer_informed_employee:{const:"yes"}},required:["customer_informed_employee"]},then:{properties:{customer_informed_employee_date:{type:"string"},customer_informed_employee_description:{type:"string"}},required:["customer_informed_employee_date","customer_informed_employee_description"]},else:{properties:{customer_informed_employee_date:!1,customer_informed_employee_description:!1}}},{if:{properties:{will_challenge_termination:{const:"yes"}},required:["will_challenge_termination"]},then:{properties:{will_challenge_termination_description:{type:"string"}},required:["will_challenge_termination_description"]},else:{properties:{will_challenge_termination_description:!1}}},{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:{confidential:{description:"Confidential requests are visible only to you. Non-confidential requests are visible to all admins in your company.",oneOf:[{const:"yes",description:"",title:"Yes"},{const:"no",description:"",title:"No"}],title:"Is this request confidential?",type:"string","x-jsf-presentation":{direction:"column",inputType:"radio",statement:{title:"Please do not inform the employee of their termination until we review your request for legal risks. When we approve your request, you can inform the employee and we'll take it from there.",inputType:"statement",severity:"warning"}}},customer_informed_employee:{description:"",oneOf:[{const:"yes",description:"",title:"Yes"},{const:"no",description:"",title:"No"}],title:"Have you informed the employee of the termination?",type:"string","x-jsf-presentation":{direction:"column",inputType:"radio"}},customer_informed_employee_date:{description:"",format:"date",maxLength:255,title:"When the employee was told about the termination",type:["string","null"],"x-jsf-presentation":{inputType:"date"}},customer_informed_employee_description:{description:"",maxLength:1e3,title:"How did you share this information?",type:["string","null"],"x-jsf-presentation":{inputType:"textarea"}},personal_email:{maxLength:255,title:"Employee's personal email",description:"We\u2019ll use this for post-termination communication.",format:"email",type:"string","x-jsf-presentation":{inputType:"email"}},termination_reason:{title:"Termination reason",description:"Make sure you choose an accurate termination reason to avoid unfair or unlawful dismissal claims.",type:"string",oneOf:[{const:"gross_misconduct",title:"Gross misconduct"},{const:"performance",title:"Performance"},{const:"workforce_reduction",title:"Workforce Reduction"},{const:"values",title:"Values"},{const:"compliance_issue",title:"Compliance issue"},{const:"incapacity_to_perform_inherent_duties",title:"Incapacity To perform inherent duties"},{const:"mutual_agreement",title:"Mutual agreement"},{const:"cancellation_before_start_date",title:"Decision to cancel hiring before the employee starts"},{const:"job_abandonment",title:"Job abandonment"},{const:"dissatisfaction_with_remote_service",title:"Dissatisfaction with EOR service"},{const:"end_of_fixed_term_contract_compliance_issue",title:"End of fixed-term contract"},{const:"other",title:"Other"}],"x-jsf-presentation":{inputType:"select"}},reason_description:{description:"",maxLength:1e3,title:"Termination reason details",type:"string","x-jsf-presentation":{inputType:"textarea"}},additional_comments:{description:"",maxLength:1e3,title:"Additional details regarding this termination process.",type:"string","x-jsf-presentation":{inputType:"textarea"}},termination_reason_files:{description:"Please upload any supporting documents regarding the termination reason.",title:"Termination reason files",type:"string","x-jsf-presentation":{inputType:"file",accept:".pdf",multiple:!0}},risk_assesment_info:{description:"",title:"Risk assessment info",type:"null","x-jsf-presentation":{inputType:"hidden"}},risk_assessment_reasons:{description:"",title:"This employee is...",type:"array",items:{anyOf:[{const:"sick_leave",title:"Currently on or recently returned from sick leave"},{const:"family_leave",title:"Currently on or recently returned from maternity, paternity, or other family leave"},{const:"pregnant_or_breastfeeding",title:"Pregnant or breastfeeding"},{const:"requested_medical_or_family_leave",title:"Requested medical or family leave"},{const:"disabled_or_health_condition",title:"Disabled or has a health condition"},{const:"member_of_union_or_works_council",title:"A member of a union or works council"},{const:"caring_responsibilities",title:"Caring responsibilities"},{const:"reported_concerns_with_workplace",title:"Reported any wrongdoing; raised any allegations of discrimination, harassment, retaliation, etc.; or asserted their employment rights or raised complaints about their working conditions"},{const:"none_of_these",title:"To the best of my knowledge, I am not aware of any of these"}]},"x-jsf-presentation":{inputType:"checkbox",direction:"column"}},will_challenge_termination:{description:"",oneOf:[{const:"yes",description:"",title:"Yes"},{const:"no",description:"",title:"No"}],title:"Do you consider it is likely that the employee will challenge their termination?",type:"string","x-jsf-presentation":{direction:"column",inputType:"radio"}},will_challenge_termination_description:{description:"",maxLength:1e3,title:"Please explain how the employee will challenge their termination",type:["string","null"],"x-jsf-presentation":{inputType:"textarea"}},proposed_termination_date_info:{description:"",title:"Proposed termination date info",type:"null","x-jsf-presentation":{inputType:"hidden"}},proposed_termination_date:{description:"",format:"date",maxLength:255,title:"Proposed termination date",type:"string","x-jsf-presentation":{inputType:"date"}},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"}},acknowledge_termination_procedure:{description:"",title:"I, {{requesterName}} have read and agree to the procedures as defined in the termination form.",type:"boolean","x-jsf-presentation":{direction:"column",inputType:"checkbox"}}},required:["confidential","customer_informed_employee","personal_email","termination_reason","reason_description","risk_assessment_reasons","will_challenge_termination","proposed_termination_date","agrees_to_pto_amount","acknowledge_termination_procedure"],type:"object","x-jsf-order":["is_confidential","customer_informed_employee","customer_informed_employee_date","customer_informed_employee_description","personal_email","termination_reason","reason_description","additional_comments","termination_reason_files","risk_assesment_info","risk_assessment_reasons","will_challenge_termination","will_challenge_termination_description","proposed_termination_date_info","proposed_termination_date","agrees_to_pto_amount","agrees_to_pto_amount_notes","timesheet_file","acknowledge_termination_procedure"]}}};export{e as a};
|
|
2
|
-
//# sourceMappingURL=chunk-E5PSJ75C.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/Termination/json-schemas/jsonSchema.ts"],"sourcesContent":["export const jsonSchema = {\n data: {\n version: 7,\n schema: {\n additionalProperties: false,\n allOf: [\n {\n if: {\n properties: {\n personal_email: {\n pattern: '^[a-zA-Z0-9 .]+$',\n },\n },\n },\n then: {\n properties: {\n personal_email: {\n 'x-jsf-presentation': {\n statement: {\n title:\n 'Please make sure to add the employee personal email so we can get in contact with the employee after the termination process takes effect.',\n inputType: 'statement',\n severity: 'warning',\n },\n },\n },\n },\n },\n },\n {\n if: {\n properties: {\n customer_informed_employee: {\n const: 'yes',\n },\n },\n required: ['customer_informed_employee'],\n },\n then: {\n properties: {\n customer_informed_employee_date: {\n type: 'string',\n },\n customer_informed_employee_description: {\n type: 'string',\n },\n },\n required: [\n 'customer_informed_employee_date',\n 'customer_informed_employee_description',\n ],\n },\n else: {\n properties: {\n customer_informed_employee_date: false,\n customer_informed_employee_description: false,\n },\n },\n },\n {\n if: {\n properties: {\n will_challenge_termination: {\n const: 'yes',\n },\n },\n required: ['will_challenge_termination'],\n },\n then: {\n properties: {\n will_challenge_termination_description: {\n type: 'string',\n },\n },\n required: ['will_challenge_termination_description'],\n },\n else: {\n properties: {\n will_challenge_termination_description: false,\n },\n },\n },\n {\n if: {\n properties: {\n agrees_to_pto_amount: {\n const: 'no',\n },\n },\n required: ['agrees_to_pto_amount'],\n },\n then: {\n properties: {\n agrees_to_pto_amount_notes: {\n type: 'string',\n },\n },\n required: ['agrees_to_pto_amount_notes'],\n },\n else: {\n properties: {\n agrees_to_pto_amount_notes: false,\n timesheet_file: false,\n },\n },\n },\n ],\n properties: {\n confidential: {\n description:\n 'Confidential requests are visible only to you. Non-confidential requests are visible to all admins in your company.',\n oneOf: [\n {\n const: 'yes',\n description: '',\n title: 'Yes',\n },\n {\n const: 'no',\n description: '',\n title: 'No',\n },\n ],\n title: 'Is this request confidential?',\n type: 'string',\n 'x-jsf-presentation': {\n direction: 'column',\n inputType: 'radio',\n statement: {\n title:\n \"Please do not inform the employee of their termination until we review your request for legal risks. When we approve your request, you can inform the employee and we'll take it from there.\",\n inputType: 'statement',\n severity: 'warning',\n },\n },\n },\n customer_informed_employee: {\n description: '',\n oneOf: [\n {\n const: 'yes',\n description: '',\n title: 'Yes',\n },\n {\n const: 'no',\n description: '',\n title: 'No',\n },\n ],\n title: 'Have you informed the employee of the termination?',\n type: 'string',\n 'x-jsf-presentation': {\n direction: 'column',\n inputType: 'radio',\n },\n },\n customer_informed_employee_date: {\n description: '',\n format: 'date',\n maxLength: 255,\n title: 'When the employee was told about the termination',\n type: ['string', 'null'],\n 'x-jsf-presentation': {\n inputType: 'date',\n },\n },\n customer_informed_employee_description: {\n description: '',\n maxLength: 1000,\n title: 'How did you share this information?',\n type: ['string', 'null'],\n 'x-jsf-presentation': {\n inputType: 'textarea',\n },\n },\n personal_email: {\n maxLength: 255,\n title: \"Employee's personal email\",\n description: 'We’ll use this for post-termination communication.',\n format: 'email',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'email',\n },\n },\n termination_reason: {\n title: 'Termination reason',\n description:\n 'Make sure you choose an accurate termination reason to avoid unfair or unlawful dismissal claims.',\n type: 'string',\n oneOf: [\n {\n const: 'gross_misconduct',\n title: 'Gross misconduct',\n },\n {\n const: 'performance',\n title: 'Performance',\n },\n {\n const: 'workforce_reduction',\n title: 'Workforce Reduction',\n },\n {\n const: 'values',\n title: 'Values',\n },\n {\n const: 'compliance_issue',\n title: 'Compliance issue',\n },\n {\n const: 'incapacity_to_perform_inherent_duties',\n title: 'Incapacity To perform inherent duties',\n },\n {\n const: 'mutual_agreement',\n title: 'Mutual agreement',\n },\n {\n const: 'cancellation_before_start_date',\n title: 'Decision to cancel hiring before the employee starts',\n },\n {\n const: 'job_abandonment',\n title: 'Job abandonment',\n },\n {\n const: 'dissatisfaction_with_remote_service',\n title: 'Dissatisfaction with EOR service',\n },\n {\n const: 'end_of_fixed_term_contract_compliance_issue',\n title: 'End of fixed-term contract',\n },\n {\n const: 'other',\n title: 'Other',\n },\n ],\n 'x-jsf-presentation': {\n inputType: 'select',\n },\n },\n reason_description: {\n description: '',\n maxLength: 1000,\n title: 'Termination reason details',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'textarea',\n },\n },\n additional_comments: {\n description: '',\n maxLength: 1000,\n title: 'Additional details regarding this termination process.',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'textarea',\n },\n },\n termination_reason_files: {\n description:\n 'Please upload any supporting documents regarding the termination reason.',\n title: 'Termination reason files',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'file',\n accept: '.pdf',\n multiple: true,\n },\n },\n risk_assesment_info: {\n description: '',\n title: 'Risk assessment info',\n type: 'null',\n 'x-jsf-presentation': {\n inputType: 'hidden',\n },\n },\n risk_assessment_reasons: {\n description: '',\n title: 'This employee is...',\n type: 'array',\n items: {\n anyOf: [\n {\n const: 'sick_leave',\n title: 'Currently on or recently returned from sick leave',\n },\n {\n const: 'family_leave',\n title:\n 'Currently on or recently returned from maternity, paternity, or other family leave',\n },\n {\n const: 'pregnant_or_breastfeeding',\n title: 'Pregnant or breastfeeding',\n },\n {\n const: 'requested_medical_or_family_leave',\n title: 'Requested medical or family leave',\n },\n {\n const: 'disabled_or_health_condition',\n title: 'Disabled or has a health condition',\n },\n {\n const: 'member_of_union_or_works_council',\n title: 'A member of a union or works council',\n },\n {\n const: 'caring_responsibilities',\n title: 'Caring responsibilities',\n },\n {\n const: 'reported_concerns_with_workplace',\n title:\n 'Reported any wrongdoing; raised any allegations of discrimination, harassment, retaliation, etc.; or asserted their employment rights or raised complaints about their working conditions',\n },\n {\n const: 'none_of_these',\n title:\n 'To the best of my knowledge, I am not aware of any of these',\n },\n ],\n },\n 'x-jsf-presentation': {\n inputType: 'checkbox',\n direction: 'column',\n },\n },\n will_challenge_termination: {\n description: '',\n oneOf: [\n {\n const: 'yes',\n description: '',\n title: 'Yes',\n },\n {\n const: 'no',\n description: '',\n title: 'No',\n },\n ],\n title:\n 'Do you consider it is likely that the employee will challenge their termination?',\n type: 'string',\n 'x-jsf-presentation': {\n direction: 'column',\n inputType: 'radio',\n },\n },\n will_challenge_termination_description: {\n description: '',\n maxLength: 1000,\n title:\n 'Please explain how the employee will challenge their termination',\n type: ['string', 'null'],\n 'x-jsf-presentation': {\n inputType: 'textarea',\n },\n },\n proposed_termination_date_info: {\n description: '',\n title: 'Proposed termination date info',\n type: 'null',\n 'x-jsf-presentation': {\n inputType: 'hidden',\n },\n },\n proposed_termination_date: {\n description: '',\n format: 'date',\n maxLength: 255,\n title: 'Proposed termination date',\n type: 'string',\n 'x-jsf-presentation': {\n inputType: 'date',\n },\n },\n agrees_to_pto_amount: {\n description: '',\n oneOf: [\n {\n const: 'yes',\n description: '',\n title: 'Yes',\n },\n {\n const: 'no',\n description: '',\n title: 'No',\n },\n ],\n title: 'Are these paid time off records correct?',\n type: 'string',\n 'x-jsf-presentation': {\n direction: 'column',\n inputType: 'radio',\n },\n },\n agrees_to_pto_amount_notes: {\n description:\n 'Please provide details regarding any additional days taken, including specific dates, or any other inaccuracy in the time off data.',\n maxLength: 1000,\n title: 'Provide time off details',\n type: ['string', 'null'],\n 'x-jsf-presentation': {\n inputType: 'textarea',\n },\n },\n timesheet_file: {\n description:\n 'Upload a timesheet exported from your HR software. This way we can compare and confirm the total number of Paid time off.',\n title: 'Timesheet document',\n type: ['string', 'null'],\n 'x-jsf-presentation': {\n inputType: 'file',\n accept: '.pdf',\n },\n },\n acknowledge_termination_procedure: {\n description: '',\n title:\n 'I, {{requesterName}} have read and agree to the procedures as defined in the termination form.',\n type: 'boolean',\n 'x-jsf-presentation': {\n direction: 'column',\n inputType: 'checkbox',\n },\n },\n },\n required: [\n 'confidential',\n 'customer_informed_employee',\n 'personal_email',\n 'termination_reason',\n 'reason_description',\n 'risk_assessment_reasons',\n 'will_challenge_termination',\n 'proposed_termination_date',\n 'agrees_to_pto_amount',\n 'acknowledge_termination_procedure',\n ],\n type: 'object',\n 'x-jsf-order': [\n 'is_confidential',\n 'customer_informed_employee',\n 'customer_informed_employee_date',\n 'customer_informed_employee_description',\n 'personal_email',\n 'termination_reason',\n 'reason_description',\n 'additional_comments',\n 'termination_reason_files',\n 'risk_assesment_info',\n 'risk_assessment_reasons',\n 'will_challenge_termination',\n 'will_challenge_termination_description',\n 'proposed_termination_date_info',\n 'proposed_termination_date',\n 'agrees_to_pto_amount',\n 'agrees_to_pto_amount_notes',\n 'timesheet_file',\n 'acknowledge_termination_procedure',\n ],\n },\n },\n};\n"],"mappings":"AAAO,IAAMA,EAAa,CACxB,KAAM,CACJ,QAAS,EACT,OAAQ,CACN,qBAAsB,GACtB,MAAO,CACL,CACE,GAAI,CACF,WAAY,CACV,eAAgB,CACd,QAAS,kBACX,CACF,CACF,EACA,KAAM,CACJ,WAAY,CACV,eAAgB,CACd,qBAAsB,CACpB,UAAW,CACT,MACE,6IACF,UAAW,YACX,SAAU,SACZ,CACF,CACF,CACF,CACF,CACF,EACA,CACE,GAAI,CACF,WAAY,CACV,2BAA4B,CAC1B,MAAO,KACT,CACF,EACA,SAAU,CAAC,4BAA4B,CACzC,EACA,KAAM,CACJ,WAAY,CACV,gCAAiC,CAC/B,KAAM,QACR,EACA,uCAAwC,CACtC,KAAM,QACR,CACF,EACA,SAAU,CACR,kCACA,wCACF,CACF,EACA,KAAM,CACJ,WAAY,CACV,gCAAiC,GACjC,uCAAwC,EAC1C,CACF,CACF,EACA,CACE,GAAI,CACF,WAAY,CACV,2BAA4B,CAC1B,MAAO,KACT,CACF,EACA,SAAU,CAAC,4BAA4B,CACzC,EACA,KAAM,CACJ,WAAY,CACV,uCAAwC,CACtC,KAAM,QACR,CACF,EACA,SAAU,CAAC,wCAAwC,CACrD,EACA,KAAM,CACJ,WAAY,CACV,uCAAwC,EAC1C,CACF,CACF,EACA,CACE,GAAI,CACF,WAAY,CACV,qBAAsB,CACpB,MAAO,IACT,CACF,EACA,SAAU,CAAC,sBAAsB,CACnC,EACA,KAAM,CACJ,WAAY,CACV,2BAA4B,CAC1B,KAAM,QACR,CACF,EACA,SAAU,CAAC,4BAA4B,CACzC,EACA,KAAM,CACJ,WAAY,CACV,2BAA4B,GAC5B,eAAgB,EAClB,CACF,CACF,CACF,EACA,WAAY,CACV,aAAc,CACZ,YACE,sHACF,MAAO,CACL,CACE,MAAO,MACP,YAAa,GACb,MAAO,KACT,EACA,CACE,MAAO,KACP,YAAa,GACb,MAAO,IACT,CACF,EACA,MAAO,gCACP,KAAM,SACN,qBAAsB,CACpB,UAAW,SACX,UAAW,QACX,UAAW,CACT,MACE,+LACF,UAAW,YACX,SAAU,SACZ,CACF,CACF,EACA,2BAA4B,CAC1B,YAAa,GACb,MAAO,CACL,CACE,MAAO,MACP,YAAa,GACb,MAAO,KACT,EACA,CACE,MAAO,KACP,YAAa,GACb,MAAO,IACT,CACF,EACA,MAAO,qDACP,KAAM,SACN,qBAAsB,CACpB,UAAW,SACX,UAAW,OACb,CACF,EACA,gCAAiC,CAC/B,YAAa,GACb,OAAQ,OACR,UAAW,IACX,MAAO,mDACP,KAAM,CAAC,SAAU,MAAM,EACvB,qBAAsB,CACpB,UAAW,MACb,CACF,EACA,uCAAwC,CACtC,YAAa,GACb,UAAW,IACX,MAAO,sCACP,KAAM,CAAC,SAAU,MAAM,EACvB,qBAAsB,CACpB,UAAW,UACb,CACF,EACA,eAAgB,CACd,UAAW,IACX,MAAO,4BACP,YAAa,0DACb,OAAQ,QACR,KAAM,SACN,qBAAsB,CACpB,UAAW,OACb,CACF,EACA,mBAAoB,CAClB,MAAO,qBACP,YACE,oGACF,KAAM,SACN,MAAO,CACL,CACE,MAAO,mBACP,MAAO,kBACT,EACA,CACE,MAAO,cACP,MAAO,aACT,EACA,CACE,MAAO,sBACP,MAAO,qBACT,EACA,CACE,MAAO,SACP,MAAO,QACT,EACA,CACE,MAAO,mBACP,MAAO,kBACT,EACA,CACE,MAAO,wCACP,MAAO,uCACT,EACA,CACE,MAAO,mBACP,MAAO,kBACT,EACA,CACE,MAAO,iCACP,MAAO,sDACT,EACA,CACE,MAAO,kBACP,MAAO,iBACT,EACA,CACE,MAAO,sCACP,MAAO,kCACT,EACA,CACE,MAAO,8CACP,MAAO,4BACT,EACA,CACE,MAAO,QACP,MAAO,OACT,CACF,EACA,qBAAsB,CACpB,UAAW,QACb,CACF,EACA,mBAAoB,CAClB,YAAa,GACb,UAAW,IACX,MAAO,6BACP,KAAM,SACN,qBAAsB,CACpB,UAAW,UACb,CACF,EACA,oBAAqB,CACnB,YAAa,GACb,UAAW,IACX,MAAO,yDACP,KAAM,SACN,qBAAsB,CACpB,UAAW,UACb,CACF,EACA,yBAA0B,CACxB,YACE,2EACF,MAAO,2BACP,KAAM,SACN,qBAAsB,CACpB,UAAW,OACX,OAAQ,OACR,SAAU,EACZ,CACF,EACA,oBAAqB,CACnB,YAAa,GACb,MAAO,uBACP,KAAM,OACN,qBAAsB,CACpB,UAAW,QACb,CACF,EACA,wBAAyB,CACvB,YAAa,GACb,MAAO,sBACP,KAAM,QACN,MAAO,CACL,MAAO,CACL,CACE,MAAO,aACP,MAAO,mDACT,EACA,CACE,MAAO,eACP,MACE,oFACJ,EACA,CACE,MAAO,4BACP,MAAO,2BACT,EACA,CACE,MAAO,oCACP,MAAO,mCACT,EACA,CACE,MAAO,+BACP,MAAO,oCACT,EACA,CACE,MAAO,mCACP,MAAO,sCACT,EACA,CACE,MAAO,0BACP,MAAO,yBACT,EACA,CACE,MAAO,mCACP,MACE,2LACJ,EACA,CACE,MAAO,gBACP,MACE,6DACJ,CACF,CACF,EACA,qBAAsB,CACpB,UAAW,WACX,UAAW,QACb,CACF,EACA,2BAA4B,CAC1B,YAAa,GACb,MAAO,CACL,CACE,MAAO,MACP,YAAa,GACb,MAAO,KACT,EACA,CACE,MAAO,KACP,YAAa,GACb,MAAO,IACT,CACF,EACA,MACE,mFACF,KAAM,SACN,qBAAsB,CACpB,UAAW,SACX,UAAW,OACb,CACF,EACA,uCAAwC,CACtC,YAAa,GACb,UAAW,IACX,MACE,mEACF,KAAM,CAAC,SAAU,MAAM,EACvB,qBAAsB,CACpB,UAAW,UACb,CACF,EACA,+BAAgC,CAC9B,YAAa,GACb,MAAO,iCACP,KAAM,OACN,qBAAsB,CACpB,UAAW,QACb,CACF,EACA,0BAA2B,CACzB,YAAa,GACb,OAAQ,OACR,UAAW,IACX,MAAO,4BACP,KAAM,SACN,qBAAsB,CACpB,UAAW,MACb,CACF,EACA,qBAAsB,CACpB,YAAa,GACb,MAAO,CACL,CACE,MAAO,MACP,YAAa,GACb,MAAO,KACT,EACA,CACE,MAAO,KACP,YAAa,GACb,MAAO,IACT,CACF,EACA,MAAO,2CACP,KAAM,SACN,qBAAsB,CACpB,UAAW,SACX,UAAW,OACb,CACF,EACA,2BAA4B,CAC1B,YACE,sIACF,UAAW,IACX,MAAO,2BACP,KAAM,CAAC,SAAU,MAAM,EACvB,qBAAsB,CACpB,UAAW,UACb,CACF,EACA,eAAgB,CACd,YACE,4HACF,MAAO,qBACP,KAAM,CAAC,SAAU,MAAM,EACvB,qBAAsB,CACpB,UAAW,OACX,OAAQ,MACV,CACF,EACA,kCAAmC,CACjC,YAAa,GACb,MACE,iGACF,KAAM,UACN,qBAAsB,CACpB,UAAW,SACX,UAAW,UACb,CACF,CACF,EACA,SAAU,CACR,eACA,6BACA,iBACA,qBACA,qBACA,0BACA,6BACA,4BACA,uBACA,mCACF,EACA,KAAM,SACN,cAAe,CACb,kBACA,6BACA,kCACA,yCACA,iBACA,qBACA,qBACA,sBACA,2BACA,sBACA,0BACA,6BACA,yCACA,iCACA,4BACA,uBACA,6BACA,iBACA,mCACF,CACF,CACF,CACF","names":["jsonSchema"]}
|
package/dist/chunk-LB35HMUG.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as S}from"./chunk-E5PSJ75C.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-TGU24WSW.js";import{a as g,b as V}from"./chunk-KRL5QCOA.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-54KJP7WD.js";import{a as e}from"./chunk-P37U34EQ.js";import{createHeadlessForm as B}from"@remoteoss/json-schema-form";import H from"lodash.omitby";import L from"lodash.isnull";import A from"lodash.omit";import{useMemo as O}from"react";import{jsx as h,jsxs as z}from"react/jsx-runtime";function f(n,o,d){return{presentation:{inputType:"hidden",Component:e(()=>z("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 Z,jsx as K,jsxs as U}from"react/jsx-runtime";function q(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(q,"buildInitialValues");var Te=e(({employmentId:n,options:o})=>{let{fieldValues:d,setFieldValues:P,stepState:i,previousStep:k,nextStep:w}=T(F),M={...i.values?.[i.currentStep.name],...d},N=O(()=>({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",U(Z,{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.",K(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:x}=V({formValues:M,jsfModify:{...o?.jsfModify,fields:{...o?.jsfModify?.fields,...N?.fields}},step:i.currentStep.name}),l=B(S.data.schema),p=g(),{mutateAsync:b}=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,E=I==="yes"?{employee_awareness:{date:t.customer_informed_employee_date,note:t.customer_informed_employee_description}}:void 0,J=c(t,["agrees_to_pto_amount","confidential","customer_informed_employee","will_challenge_termination"]),$=A(J,"customer_informed_employee_date","customer_informed_employee_description"),D=H({...$,...E},L);return b({employment_id:n,termination_details:D,type:"termination"})}}e(j,"onSubmit");function C(){k()}e(C,"back");function v(){w()}e(v,"next");let R=q({...i.values?.employee_communication,...i.values?.termination_details,...i.values?.paid_time_off,...i.values?.additional_information});return{employmentId:n,stepState:i,fields:s?.fields||[],isLoading:x,isSubmitting:p.isPending,initialValues:R,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});P(t)}},"checkFieldUpdates"),parseFormValues:e(a=>m(a,l.fields,{isPartialValidation:!0}),"parseFormValues"),onSubmit:j,back:C,next:v}},"useTermination");export{Te as a};
|
|
2
|
-
//# sourceMappingURL=chunk-LB35HMUG.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 { TerminationFormValues } 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 { JSFModify } from '@/src/flows/types';\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 = {\n employmentId: string;\n options?: {\n jsfModify?: JSFModify;\n };\n};\n\nexport const useTermination = ({\n employmentId,\n options,\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 });\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}\n"],"mappings":"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","names":["createHeadlessForm","omitBy","isNull","omit","useMemo","jsx","jsxs","createInformationField","title","description","options","__name","cn","Fragment","jsx","jsxs","buildInitialValues","stepsInitialValues","__name","useTermination","employmentId","options","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-NDR27PRO.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as p}from"./chunk-YLBQWZOK.js";import{a as m}from"./chunk-A7ZEA2WU.js";import{a as n}from"./chunk-B25LAMRX.js";import{a as e}from"./chunk-LB35HMUG.js";import{a as T}from"./chunk-QBECPUJM.js";import{a}from"./chunk-2ZT2TLPE.js";import{a as f}from"./chunk-DZ4UXMF3.js";import{a as r}from"./chunk-SERAGBDA.js";import{a as t}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{useId as c}from"react";import{jsx as u}from"react/jsx-runtime";var A=i(({employmentId:d,render:s,options:l})=>{let y=c(),o=e({employmentId:d,options:l});return u(t.Provider,{value:{formId:y,terminationBag:o},children:s({terminationBag:o,components:{SubmitButton:m,TimeOff:n,Back:r,EmployeeComunicationStep:a,TerminationDetailsStep:p,PaidTimeOffStep:f,AdditionalDetailsStep:T}})})},"TerminationFlow");export{A as a};
|
|
2
|
-
//# sourceMappingURL=chunk-NDR27PRO.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/Termination/TerminationFlow.tsx"],"sourcesContent":["import { TerminationContext } from '@/src/flows/Termination/context';\nimport React, { useId } from 'react';\nimport { useTermination } from '@/src/flows/Termination/hooks';\nimport { TerminationSubmit } from '@/src/flows/Termination/TerminationSubmit';\nimport { TimeOff } from '@/src/flows/Termination/TimeOff';\nimport { TerminationBack } from '@/src/flows/Termination/TerminationBack';\nimport { EmployeeCommunicationForm } from '@/src/flows/Termination/EmployeeComunicationForm';\nimport { TerminationDetailsForm } from '@/src/flows/Termination/TerminationDetailsForm';\nimport { PaidTimeOffForm } from '@/src/flows/Termination/PaidTimeOffForm';\nimport { AdditionalDetailsForm } from '@/src/flows/Termination/AdditionalDetailsForm';\nimport { JSFModify } from '@/src/flows/types';\n\nexport type TerminationRenderProps = {\n /**\n * The termination bag returned by the useTermination hook.\n * This bag contains all the methods and properties needed to handle the termination flow.\n * @see {@link useTermination}\n */\n terminationBag: ReturnType<typeof useTermination>;\n /**\n * The components used in the termination flow.\n * This includes different steps, submit button, back button and timeoff.\n * @see {@link TerminationSubmit}\n * @see {@link TimeOff}\n * @see {@link TerminationBack}\n * @see {@link EmployeeCommunicationForm}\n * @see {@link TerminationDetailsForm}\n * @see {@link PaidTimeOffForm}\n * @see {@link AdditionalDetailsForm}\n */\n components: {\n SubmitButton: typeof TerminationSubmit;\n TimeOff: typeof TimeOff;\n Back: typeof TerminationBack;\n EmployeeComunicationStep: typeof EmployeeCommunicationForm;\n TerminationDetailsStep: typeof TerminationDetailsForm;\n PaidTimeOffStep: typeof PaidTimeOffForm;\n AdditionalDetailsStep: typeof AdditionalDetailsForm;\n };\n};\n\ntype TerminationFlowProps = {\n employmentId: string;\n render: ({\n terminationBag,\n components,\n }: TerminationRenderProps) => React.ReactNode;\n options?: {\n jsfModify?: JSFModify;\n };\n};\n\nexport const TerminationFlow = ({\n employmentId,\n render,\n options,\n}: TerminationFlowProps) => {\n const formId = useId();\n const terminationBag = useTermination({ employmentId, options });\n\n return (\n <TerminationContext.Provider\n value={{\n formId: formId,\n terminationBag,\n }}\n >\n {render({\n terminationBag,\n components: {\n SubmitButton: TerminationSubmit,\n TimeOff: TimeOff,\n Back: TerminationBack,\n EmployeeComunicationStep: EmployeeCommunicationForm,\n TerminationDetailsStep: TerminationDetailsForm,\n PaidTimeOffStep: PaidTimeOffForm,\n AdditionalDetailsStep: AdditionalDetailsForm,\n },\n })}\n </TerminationContext.Provider>\n );\n};\n"],"mappings":"2YACA,OAAgB,SAAAA,MAAa,QA4DzB,cAAAC,MAAA,oBATG,IAAMC,EAAkBC,EAAA,CAAC,CAC9B,aAAAC,EACA,OAAAC,EACA,QAAAC,CACF,IAA4B,CAC1B,IAAMC,EAASC,EAAM,EACfC,EAAiBC,EAAe,CAAE,aAAAN,EAAc,QAAAE,CAAQ,CAAC,EAE/D,OACEL,EAACU,EAAmB,SAAnB,CACC,MAAO,CACL,OAAQJ,EACR,eAAAE,CACF,EAEC,SAAAJ,EAAO,CACN,eAAAI,EACA,WAAY,CACV,aAAcG,EACd,QAASC,EACT,KAAMC,EACN,yBAA0BC,EAC1B,uBAAwBC,EACxB,gBAAiBC,EACjB,sBAAuBC,CACzB,CACF,CAAC,EACH,CAEJ,EA7B+B","names":["useId","jsx","TerminationFlow","__name","employmentId","render","options","formId","useId","terminationBag","useTermination","TerminationContext","TerminationSubmit","TimeOff","TerminationBack","EmployeeCommunicationForm","TerminationDetailsForm","PaidTimeOffForm","AdditionalDetailsForm"]}
|
package/dist/chunk-TGU24WSW.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as b,b as h,d as C,e as Z,f as v,g as y}from"./chunk-2I5DIIJP.js";import{g as w}from"./chunk-MISHDUB2.js";import{b as f,d as g}from"./chunk-3ZWDIEEM.js";import{a as k,e as D}from"./chunk-54KJP7WD.js";import{a as e}from"./chunk-P37U34EQ.js";import{useQuery as F}from"@tanstack/react-query";var x=e((r,a)=>{let{client:s}=g();return F({queryKey:["zendesk-article",r],queryFn:e(async()=>{let t=await w({client:s,path:{id:Number(r)}});if(t.error)throw new Error(t.error.message||"Failed to fetch article");return t},"queryFn"),select:e(t=>{let o=t.data?.data.help_center_article;return o&&{...o,body:D(o.body||"")}},"select"),retry:!1,...a})},"useZendeskArticle");import{jsx as n,jsxs as l}from"react/jsx-runtime";var N=e(r=>`https://support.remote.com/hc/en-us/articles/${r}`,"buildZendeskURL"),T=e(({Trigger:r,zendeskId:a,open:s,onClose:t})=>{let{components:o}=f(),i=N(a),d=e(()=>{t?.()},"handleClose"),{data:c,isLoading:m,error:p}=x(a,{enabled:s}),u=o?.zendeskDrawer;return u?n(u,{open:s,onClose:d,data:c,isLoading:m,error:p,zendeskURL:i,Trigger:r}):l(b,{open:s,onOpenChange:R=>!R&&d(),direction:"right",children:[n(h,{asChild:!0,children:r}),n(C,{className:"h-full w-[540px] mt-0 ml-auto RemoteFlows_ZendeskDrawer",children:l("div",{className:"h-full flex flex-col",children:[l(Z,{children:[n(v,{children:c?.title}),l(y,{children:["For more details see our"," ",n("a",{href:i,target:"_blank",rel:"noopener noreferrer",children:"help article"})," "]})]}),m&&n("div",{children:"Loading..."}),p&&n("div",{className:"text-sm p-4 text-red-500",children:"Error loading article"}),n("div",{className:"flex-1 overflow-y-auto p-4 RemoteFlows_ZendeskDrawer__Content",dangerouslySetInnerHTML:{__html:c?.body||""}})]})})]})},"ZendeskDrawer");import{useState as L}from"react";import{jsx as _}from"react/jsx-runtime";function G({zendeskId:r,className:a,onClick:s,children:t}){let[o,i]=L(!1);return _(T,{zendeskId:r,open:o,onClose:()=>i(!1),Trigger:_("button",{onClick:e(()=>{i(!0),s?.(r)},"handleClick"),className:k("RemoteFlows__ZendeskTriggerButton text-blue-500 hover:underline inline-block mt-1 text-xs bg-transparent border-none cursor-pointer p-0",a),children:t})})}e(G,"ZendeskTriggerButton");export{G as a};
|
|
2
|
-
//# sourceMappingURL=chunk-TGU24WSW.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/shared/zendesk-drawer/api.ts","../src/components/shared/zendesk-drawer/ZendeskDrawer.tsx","../src/components/shared/zendesk-drawer/ZendeskTriggerButton.tsx"],"sourcesContent":["import { getShowHelpCenterArticle } from '@/src/client';\nimport { useClient } from '@/src/context';\nimport { sanitizeHtml } from '@/src/lib/utils';\nimport { Client } from '@hey-api/client-fetch';\nimport { useQuery } from '@tanstack/react-query';\n\nexport const useZendeskArticle = (\n zendeskId: number | null,\n queryOptions?: { enabled?: boolean },\n) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['zendesk-article', zendeskId],\n queryFn: async () => {\n const response = await getShowHelpCenterArticle({\n client: client as Client,\n path: {\n id: Number(zendeskId),\n },\n });\n\n if (response.error) {\n throw new Error(response.error.message || 'Failed to fetch article');\n }\n\n return response;\n },\n select: (data) => {\n const article = data.data?.data.help_center_article;\n if (article) {\n return {\n ...article,\n body: sanitizeHtml(article.body || ''),\n };\n }\n return article;\n },\n retry: false,\n ...queryOptions,\n });\n};\n","import { useZendeskArticle } from '@/src/components/shared/zendesk-drawer/api';\nimport {\n Drawer,\n DrawerTrigger,\n DrawerContent,\n DrawerDescription,\n DrawerHeader,\n DrawerTitle,\n} from '@/src/components/ui/drawer';\nimport { useFormFields } from '@/src/context';\n\nexport type ZendeskDrawerProps = {\n Trigger: React.ReactElement;\n zendeskId: number;\n open: boolean;\n onClose: () => void;\n};\n\nconst buildZendeskURL = (zendeskId: number) => {\n return `https://support.remote.com/hc/en-us/articles/${zendeskId}`;\n};\n\nexport const ZendeskDrawer = ({\n Trigger,\n zendeskId,\n open,\n onClose,\n}: ZendeskDrawerProps) => {\n const { components } = useFormFields();\n const zendeskURL = buildZendeskURL(zendeskId);\n\n const handleClose = () => {\n onClose?.();\n };\n\n const { data, isLoading, error } = useZendeskArticle(zendeskId, {\n enabled: open,\n });\n\n const CustomZendeskDrawer = components?.zendeskDrawer;\n\n if (CustomZendeskDrawer) {\n return (\n <CustomZendeskDrawer\n open={open}\n onClose={handleClose}\n data={data}\n isLoading={isLoading}\n error={error}\n zendeskURL={zendeskURL}\n Trigger={Trigger}\n />\n );\n }\n\n return (\n <Drawer\n open={open}\n onOpenChange={(open) => !open && handleClose()}\n direction='right'\n >\n <DrawerTrigger asChild>{Trigger}</DrawerTrigger>\n <DrawerContent className='h-full w-[540px] mt-0 ml-auto RemoteFlows_ZendeskDrawer'>\n <div className='h-full flex flex-col'>\n <DrawerHeader>\n <DrawerTitle>{data?.title}</DrawerTitle>\n <DrawerDescription>\n For more details see our{' '}\n <a href={zendeskURL} target='_blank' rel='noopener noreferrer'>\n help article\n </a>{' '}\n </DrawerDescription>\n </DrawerHeader>\n {isLoading && <div>Loading...</div>}\n {error && (\n <div className='text-sm p-4 text-red-500'>\n Error loading article\n </div>\n )}\n <div\n className='flex-1 overflow-y-auto p-4 RemoteFlows_ZendeskDrawer__Content'\n dangerouslySetInnerHTML={{\n __html: data?.body || '',\n }}\n ></div>\n </div>\n </DrawerContent>\n </Drawer>\n );\n};\n","import { cn } from '@/src/lib/utils';\nimport { ZendeskDrawer } from './ZendeskDrawer';\nimport { useState } from 'react';\n\ninterface ZendeskTriggerButtonProps {\n zendeskId: number;\n className?: string;\n onClick?: (zendeskId: number) => void;\n children?: React.ReactNode;\n}\n\nexport function ZendeskTriggerButton({\n zendeskId,\n className,\n onClick,\n children,\n}: ZendeskTriggerButtonProps) {\n const [isOpen, setIsOpen] = useState(false);\n\n const handleClick = () => {\n setIsOpen(true);\n onClick?.(zendeskId);\n };\n\n return (\n <ZendeskDrawer\n zendeskId={zendeskId}\n open={isOpen}\n onClose={() => setIsOpen(false)}\n Trigger={\n <button\n onClick={handleClick}\n className={cn(\n 'RemoteFlows__ZendeskTriggerButton text-blue-500 hover:underline inline-block mt-1 text-xs bg-transparent border-none cursor-pointer p-0',\n className,\n )}\n >\n {children}\n </button>\n }\n />\n );\n}\n"],"mappings":"yPAIA,OAAS,YAAAA,MAAgB,wBAElB,IAAMC,EAAoBC,EAAA,CAC/BC,EACAC,IACG,CACH,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAU,EAC7B,OAAOC,EAAS,CACd,SAAU,CAAC,kBAAmBJ,CAAS,EACvC,QAASD,EAAA,SAAY,CACnB,IAAMM,EAAW,MAAMC,EAAyB,CAC9C,OAAQJ,EACR,KAAM,CACJ,GAAI,OAAOF,CAAS,CACtB,CACF,CAAC,EAED,GAAIK,EAAS,MACX,MAAM,IAAI,MAAMA,EAAS,MAAM,SAAW,yBAAyB,EAGrE,OAAOA,CACT,EAbS,WAcT,OAAQN,EAACQ,GAAS,CAChB,IAAMC,EAAUD,EAAK,MAAM,KAAK,oBAChC,OAAIC,GACK,CACL,GAAGA,EACH,KAAMC,EAAaD,EAAQ,MAAQ,EAAE,CACvC,CAGJ,EATQ,UAUR,MAAO,GACP,GAAGP,CACL,CAAC,CACH,EAlCiC,qBCqC3B,cAAAS,EAuBM,QAAAC,MAvBN,oBAzBN,IAAMC,EAAkBC,EAACC,GAChB,gDAAgDA,CAAS,GAD1C,mBAIXC,EAAgBF,EAAA,CAAC,CAC5B,QAAAG,EACA,UAAAF,EACA,KAAAG,EACA,QAAAC,CACF,IAA0B,CACxB,GAAM,CAAE,WAAAC,CAAW,EAAIC,EAAc,EAC/BC,EAAaT,EAAgBE,CAAS,EAEtCQ,EAAcT,EAAA,IAAM,CACxBK,IAAU,CACZ,EAFoB,eAId,CAAE,KAAAK,EAAM,UAAAC,EAAW,MAAAC,CAAM,EAAIC,EAAkBZ,EAAW,CAC9D,QAASG,CACX,CAAC,EAEKU,EAAsBR,GAAY,cAExC,OAAIQ,EAEAjB,EAACiB,EAAA,CACC,KAAMV,EACN,QAASK,EACT,KAAMC,EACN,UAAWC,EACX,MAAOC,EACP,WAAYJ,EACZ,QAASL,EACX,EAKFL,EAACiB,EAAA,CACC,KAAMX,EACN,aAAeA,GAAS,CAACA,GAAQK,EAAY,EAC7C,UAAU,QAEV,UAAAZ,EAACmB,EAAA,CAAc,QAAO,GAAE,SAAAb,EAAQ,EAChCN,EAACoB,EAAA,CAAc,UAAU,0DACvB,SAAAnB,EAAC,OAAI,UAAU,uBACb,UAAAA,EAACoB,EAAA,CACC,UAAArB,EAACsB,EAAA,CAAa,SAAAT,GAAM,MAAM,EAC1BZ,EAACsB,EAAA,CAAkB,qCACQ,IACzBvB,EAAC,KAAE,KAAMW,EAAY,OAAO,SAAS,IAAI,sBAAsB,wBAE/D,EAAK,KACP,GACF,EACCG,GAAad,EAAC,OAAI,sBAAU,EAC5Be,GACCf,EAAC,OAAI,UAAU,2BAA2B,iCAE1C,EAEFA,EAAC,OACC,UAAU,gEACV,wBAAyB,CACvB,OAAQa,GAAM,MAAQ,EACxB,EACD,GACH,EACF,GACF,CAEJ,EAnE6B,iBCpB7B,OAAS,YAAAW,MAAgB,QA4BjB,cAAAC,MAAA,oBAnBD,SAASC,EAAqB,CACnC,UAAAC,EACA,UAAAC,EACA,QAAAC,EACA,SAAAC,CACF,EAA8B,CAC5B,GAAM,CAACC,EAAQC,CAAS,EAAIC,EAAS,EAAK,EAO1C,OACER,EAACS,EAAA,CACC,UAAWP,EACX,KAAMI,EACN,QAAS,IAAMC,EAAU,EAAK,EAC9B,QACEP,EAAC,UACC,QAZYU,EAAA,IAAM,CACxBH,EAAU,EAAI,EACdH,IAAUF,CAAS,CACrB,EAHoB,eAaZ,UAAWS,EACT,0IACAR,CACF,EAEC,SAAAE,EACH,EAEJ,CAEJ,CA/BgBK,EAAAT,EAAA","names":["useQuery","useZendeskArticle","__name","zendeskId","queryOptions","client","useClient","useQuery","response","getShowHelpCenterArticle","data","article","sanitizeHtml","jsx","jsxs","buildZendeskURL","__name","zendeskId","ZendeskDrawer","Trigger","open","onClose","components","useFormFields","zendeskURL","handleClose","data","isLoading","error","useZendeskArticle","CustomZendeskDrawer","Drawer","DrawerTrigger","DrawerContent","DrawerHeader","DrawerTitle","DrawerDescription","useState","jsx","ZendeskTriggerButton","zendeskId","className","onClick","children","isOpen","setIsOpen","useState","ZendeskDrawer","__name","cn"]}
|
package/dist/chunk-W5DG5WWJ.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:{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":["agrees_to_pto_amount","agrees_to_pto_amount_notes","timesheet_file"]}}};export{e as a};
|
|
2
|
-
//# sourceMappingURL=chunk-W5DG5WWJ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/Termination/json-schemas/paidTimeOff.ts"],"sourcesContent":["export const paidTimeOffSchema = {\n data: {\n version: 7,\n schema: {\n additionalProperties: false,\n allOf: [\n {\n if: {\n properties: {\n agrees_to_pto_amount: {\n const: 'no',\n },\n },\n required: ['agrees_to_pto_amount'],\n },\n then: {\n properties: {\n agrees_to_pto_amount_notes: {\n type: 'string',\n },\n },\n required: ['agrees_to_pto_amount_notes'],\n },\n else: {\n properties: {\n agrees_to_pto_amount_notes: false,\n timesheet_file: false,\n },\n },\n },\n ],\n properties: {\n agrees_to_pto_amount: {\n description: '',\n oneOf: [\n {\n const: 'yes',\n description: '',\n title: 'Yes',\n },\n {\n const: 'no',\n description: '',\n title: 'No',\n },\n ],\n title: 'Are these paid time off records correct?',\n type: 'string',\n 'x-jsf-presentation': {\n direction: 'column',\n inputType: 'radio',\n },\n },\n agrees_to_pto_amount_notes: {\n description:\n 'Please provide details regarding any additional days taken, including specific dates, or any other inaccuracy in the time off data.',\n maxLength: 1000,\n title: 'Provide time off details',\n type: ['string', 'null'],\n 'x-jsf-presentation': {\n inputType: 'textarea',\n },\n },\n timesheet_file: {\n description:\n 'Upload a timesheet exported from your HR software. This way we can compare and confirm the total number of Paid time off.',\n title: 'Timesheet document',\n type: ['string', 'null'],\n 'x-jsf-presentation': {\n inputType: 'file',\n accept: '.pdf',\n },\n },\n },\n required: ['agrees_to_pto_amount'],\n type: 'object',\n 'x-jsf-order': [\n 'agrees_to_pto_amount',\n 'agrees_to_pto_amount_notes',\n 'timesheet_file',\n ],\n },\n },\n};\n"],"mappings":"AAAO,IAAMA,EAAoB,CAC/B,KAAM,CACJ,QAAS,EACT,OAAQ,CACN,qBAAsB,GACtB,MAAO,CACL,CACE,GAAI,CACF,WAAY,CACV,qBAAsB,CACpB,MAAO,IACT,CACF,EACA,SAAU,CAAC,sBAAsB,CACnC,EACA,KAAM,CACJ,WAAY,CACV,2BAA4B,CAC1B,KAAM,QACR,CACF,EACA,SAAU,CAAC,4BAA4B,CACzC,EACA,KAAM,CACJ,WAAY,CACV,2BAA4B,GAC5B,eAAgB,EAClB,CACF,CACF,CACF,EACA,WAAY,CACV,qBAAsB,CACpB,YAAa,GACb,MAAO,CACL,CACE,MAAO,MACP,YAAa,GACb,MAAO,KACT,EACA,CACE,MAAO,KACP,YAAa,GACb,MAAO,IACT,CACF,EACA,MAAO,2CACP,KAAM,SACN,qBAAsB,CACpB,UAAW,SACX,UAAW,OACb,CACF,EACA,2BAA4B,CAC1B,YACE,sIACF,UAAW,IACX,MAAO,2BACP,KAAM,CAAC,SAAU,MAAM,EACvB,qBAAsB,CACpB,UAAW,UACb,CACF,EACA,eAAgB,CACd,YACE,4HACF,MAAO,qBACP,KAAM,CAAC,SAAU,MAAM,EACvB,qBAAsB,CACpB,UAAW,OACX,OAAQ,MACV,CACF,CACF,EACA,SAAU,CAAC,sBAAsB,EACjC,KAAM,SACN,cAAe,CACb,uBACA,6BACA,gBACF,CACF,CACF,CACF","names":["paidTimeOffSchema"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|