@remoteoss/remote-flows 0.31.0 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -8
- package/dist/{chunk-OUSDXTNH.js → chunk-2W2XD7ZY.js} +2 -2
- package/dist/chunk-2W2XD7ZY.js.map +1 -0
- package/dist/{chunk-ACQ3OEOE.js → chunk-5AG4K2EA.js} +2 -2
- package/dist/{chunk-FQYK5BJV.js → chunk-5CVD5WZZ.js} +2 -2
- package/dist/chunk-5CVD5WZZ.js.map +1 -0
- package/dist/{chunk-BWJAHRV6.js → chunk-5KZXFQLZ.js} +2 -2
- package/dist/{chunk-LWGVLLBH.js → chunk-5OZPBBXS.js} +2 -2
- package/dist/chunk-5P7INAU2.js +2 -0
- package/dist/chunk-5P7INAU2.js.map +1 -0
- package/dist/{chunk-T2FGDQSU.js → chunk-6FWFRVQE.js} +2 -2
- package/dist/{chunk-5PPUPDYP.js → chunk-76DHIEN7.js} +2 -2
- package/dist/{chunk-XDNUJY3V.js → chunk-7CJX7I3M.js} +2 -2
- package/dist/{chunk-LGJYIUSH.js → chunk-7YQAVDVX.js} +2 -2
- package/dist/chunk-7YQAVDVX.js.map +1 -0
- package/dist/{chunk-PEHK6NHL.js → chunk-A477TZFC.js} +2 -2
- package/dist/{chunk-HWEJIPSK.js → chunk-AA7QB3QQ.js} +1 -1
- package/dist/{chunk-HS4VEURD.js → chunk-AM2IRFHQ.js} +2 -2
- package/dist/{chunk-FPJLWY23.js → chunk-B6IVJUEH.js} +2 -2
- package/dist/{chunk-PNAZ6US5.js → chunk-COBQ4WSJ.js} +2 -2
- package/dist/{chunk-OIVWGY5Z.js → chunk-CW3MAP5L.js} +2 -2
- package/dist/{chunk-H3ZR4EW5.js → chunk-DPWL4KNA.js} +2 -2
- package/dist/{chunk-YXXCHMX3.js → chunk-DXFA52BU.js} +2 -2
- package/dist/{chunk-AVX6IOGC.js → chunk-DXIO72S4.js} +2 -2
- package/dist/{chunk-OOCCLRPH.js → chunk-DZ2R72O5.js} +2 -2
- package/dist/{chunk-5ENAY65Y.js → chunk-E4CABUTS.js} +2 -2
- package/dist/{chunk-GWICTLVR.js → chunk-EM5UYWUQ.js} +2 -2
- package/dist/{chunk-E76DWINZ.js → chunk-ENW4DCDU.js} +2 -2
- package/dist/{chunk-JTOLQCOG.js → chunk-FRTJ4KWA.js} +2 -2
- package/dist/{chunk-GD425MMM.js → chunk-GCJCNDJ3.js} +2 -2
- package/dist/{chunk-NCNXUNBB.js → chunk-GKD2WI2W.js} +2 -2
- package/dist/chunk-GKD2WI2W.js.map +1 -0
- package/dist/chunk-GOGPCCBS.js +2 -0
- package/dist/chunk-GOGPCCBS.js.map +1 -0
- package/dist/{chunk-FJPQPOK3.js → chunk-HBHVB56P.js} +2 -2
- package/dist/{chunk-CYDWBHAA.js → chunk-HO2TIG7R.js} +2 -2
- package/dist/{chunk-QFOYD5Q4.js → chunk-HZDCZFR5.js} +2 -2
- package/dist/chunk-HZDCZFR5.js.map +1 -0
- package/dist/{chunk-OLRZ3U4A.js → chunk-IHNYOUXP.js} +2 -2
- package/dist/chunk-IHNYOUXP.js.map +1 -0
- package/dist/{chunk-4X77DTSW.js → chunk-IUEXOXFA.js} +2 -2
- package/dist/{chunk-SQENUVY5.js → chunk-K2BWF2HC.js} +2 -2
- package/dist/{chunk-H7L735T7.js → chunk-L3D2AK3X.js} +2 -2
- package/dist/{chunk-SXN63FPH.js → chunk-LQAHRGU4.js} +2 -2
- package/dist/{chunk-4OAWZYH7.js → chunk-LV5R6H3D.js} +2 -2
- package/dist/{chunk-LYK6PNAY.js → chunk-M2CI2UDK.js} +2 -2
- package/dist/{chunk-OQJWLV7V.js → chunk-MZB24YJP.js} +2 -2
- package/dist/chunk-OKM7DRCF.js +2 -0
- package/dist/{chunk-ANHUECRI.js → chunk-P7JZC65P.js} +2 -2
- package/dist/{chunk-IJR44ISO.js → chunk-QIVDIOJG.js} +2 -2
- package/dist/{chunk-JBUNDNKJ.js → chunk-QWJFYQK3.js} +1 -1
- package/dist/{chunk-QW322WRX.js → chunk-SHP4ULHS.js} +2 -2
- package/dist/chunk-SHP4ULHS.js.map +1 -0
- package/dist/{chunk-EGSRN2CQ.js → chunk-SO3YQ4WT.js} +2 -2
- package/dist/{chunk-UBN6O7B5.js → chunk-SPQO42TA.js} +2 -2
- package/dist/{chunk-VSMVVIBA.js → chunk-SRRY72CZ.js} +2 -2
- package/dist/chunk-THMWKOHC.js +2 -0
- package/dist/chunk-THMWKOHC.js.map +1 -0
- package/dist/{chunk-NBFJOIV2.js → chunk-TWVFLXVF.js} +2 -2
- package/dist/chunk-U4JVXNOG.js +2 -0
- package/dist/chunk-U4JVXNOG.js.map +1 -0
- package/dist/{chunk-WBN4ZSGC.js → chunk-UJKTTTGB.js} +2 -2
- package/dist/{chunk-6TY7IKSG.js → chunk-WBRWVTZK.js} +2 -2
- package/dist/chunk-WJ6YJFD4.js +2 -0
- package/dist/chunk-WJ6YJFD4.js.map +1 -0
- package/dist/{chunk-GHV4Q4MB.js → chunk-WMPKW7HC.js} +2 -2
- package/dist/{chunk-2MG7YOPU.js → chunk-WW5UCMQZ.js} +2 -2
- package/dist/chunk-WW5UCMQZ.js.map +1 -0
- package/dist/chunk-WXUIXZ7P.js +2 -0
- package/dist/chunk-WXUIXZ7P.js.map +1 -0
- package/dist/{chunk-R7W3BT6P.js → chunk-X6CD3FMG.js} +2 -2
- package/dist/{chunk-UZXTPQ47.js → chunk-XPL5XOQ4.js} +2 -2
- package/dist/{chunk-26ZOPH2I.js → chunk-XPOLXRYT.js} +2 -2
- package/dist/{chunk-7FAT6WCC.js → chunk-YDJVQRND.js} +2 -2
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +4 -3
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
- package/dist/flows/ContractAmendment/context.d.ts +4 -3
- package/dist/flows/ContractAmendment/hooks.d.ts +4 -3
- package/dist/flows/ContractAmendment/hooks.js +1 -1
- package/dist/flows/ContractAmendment/index.d.ts +4 -3
- package/dist/flows/ContractAmendment/index.js +1 -1
- package/dist/flows/ContractAmendment/types.d.ts +1 -0
- package/dist/flows/ContractAmendment/utils.d.ts +1 -1
- package/dist/flows/ContractAmendment/utils.js +1 -1
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +6 -5
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
- package/dist/flows/ContractorOnboarding/api.d.ts +3 -2
- package/dist/flows/ContractorOnboarding/api.js +1 -1
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +5 -4
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +6 -5
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +6 -5
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +6 -5
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
- package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
- package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
- package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +6 -5
- package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +5 -4
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/ContractorOnboarding/context.d.ts +6 -5
- package/dist/flows/ContractorOnboarding/hooks.d.ts +6 -5
- package/dist/flows/ContractorOnboarding/hooks.js +1 -1
- package/dist/flows/ContractorOnboarding/index.d.ts +6 -5
- package/dist/flows/ContractorOnboarding/index.js +1 -1
- package/dist/flows/ContractorOnboarding/types.d.ts +6 -5
- package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +4 -3
- package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +4 -3
- package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
- package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +2 -1
- package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorBenefitsBreakdown.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorContributionsBreakdown.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorExtraStatutoryPaymentsBreakdown.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorGrossSalary.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorResults.d.ts +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorResults.js +1 -1
- package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +2 -1
- package/dist/flows/CostCalculator/api.d.ts +2 -1
- package/dist/flows/CostCalculator/api.js +1 -1
- package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
- package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
- package/dist/flows/CostCalculator/context.d.ts +4 -3
- package/dist/flows/CostCalculator/hooks.d.ts +4 -3
- package/dist/flows/CostCalculator/hooks.js +1 -1
- package/dist/flows/CostCalculator/index.d.ts +4 -3
- package/dist/flows/CostCalculator/index.js +1 -1
- package/dist/flows/CostCalculator/types.d.ts +2 -1
- package/dist/flows/CostCalculator/utils.d.ts +4 -3
- package/dist/flows/CostCalculator/utils.js +1 -1
- package/dist/flows/Onboarding/OnboardingFlow.d.ts +5 -4
- package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
- package/dist/flows/Onboarding/api.d.ts +7 -6
- package/dist/flows/Onboarding/api.js +1 -1
- package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
- package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
- package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +5 -4
- package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/Onboarding/components/BenefitsStep.d.ts +5 -4
- package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
- package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +5 -4
- package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingForm.d.ts +5 -4
- package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
- package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
- package/dist/flows/Onboarding/components/ReviewStep.d.ts +5 -4
- package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
- package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +5 -4
- package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/Onboarding/context.d.ts +5 -4
- package/dist/flows/Onboarding/hooks.d.ts +5 -4
- package/dist/flows/Onboarding/hooks.js +1 -1
- package/dist/flows/Onboarding/index.d.ts +5 -4
- package/dist/flows/Onboarding/index.js +1 -1
- package/dist/flows/Onboarding/types.d.ts +5 -4
- package/dist/flows/Onboarding/utils.d.ts +5 -4
- package/dist/flows/Termination/AdditionalDetailsForm.d.ts +5 -4
- package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
- package/dist/flows/Termination/EmployeeComunicationForm.d.ts +5 -4
- package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
- package/dist/flows/Termination/PaidTimeOffForm.d.ts +5 -4
- package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
- package/dist/flows/Termination/TerminationDetailsForm.d.ts +5 -4
- package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
- package/dist/flows/Termination/TerminationFlow.d.ts +5 -4
- package/dist/flows/Termination/TerminationFlow.js +1 -1
- package/dist/flows/Termination/TerminationForm.d.ts +5 -4
- package/dist/flows/Termination/TerminationForm.js +1 -1
- package/dist/flows/Termination/api.d.ts +26 -7
- package/dist/flows/Termination/api.js +1 -1
- package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +9 -5
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +9 -5
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +9 -5
- package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
- package/dist/flows/Termination/context.d.ts +5 -4
- package/dist/flows/Termination/hooks.d.ts +5 -4
- package/dist/flows/Termination/hooks.js +1 -1
- package/dist/flows/Termination/index.d.ts +7 -6
- package/dist/flows/Termination/index.js +1 -1
- package/dist/flows/Termination/json-schemas/jsonSchema.js +1 -1
- package/dist/flows/Termination/json-schemas/schema.d.ts +5 -4
- package/dist/flows/Termination/json-schemas/schema.js +1 -1
- package/dist/flows/Termination/types.d.ts +5 -4
- package/dist/flows/Termination/utils.d.ts +5 -4
- package/dist/flows/types.d.ts +3 -1
- package/dist/index.d.ts +10 -9
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internals.d.ts +10 -1
- package/dist/internals.js +1 -1
- package/dist/{mutations-poZZkLvk.d.ts → mutations-Cdk0PM78.d.ts} +1 -1
- package/dist/{remoteFlows-DzRZRhQq.d.ts → remoteFlows-DUivEPPh.d.ts} +41 -6
- package/dist/{types-CpgnTLWW.d.ts → types-BZBdCzER.d.ts} +3 -3
- package/dist/{types-CTSYWNx-.d.ts → types-C-X7siUr.d.ts} +2 -2
- package/dist/{types-BNjv7eD0.d.ts → types-OcTc56P-.d.ts} +1 -1
- package/dist/{types-6uSA0-an.d.ts → types-pohqJTkr.d.ts} +4 -4
- package/dist/{types.gen-B2u-cOXI.d.ts → types.gen-D0ZCnKWv.d.ts} +1 -1
- package/package.json +2 -1
- package/dist/chunk-2L3ISQJL.js +0 -2
- package/dist/chunk-2L3ISQJL.js.map +0 -1
- package/dist/chunk-2MG7YOPU.js.map +0 -1
- package/dist/chunk-7WDO47KQ.js +0 -2
- package/dist/chunk-7WDO47KQ.js.map +0 -1
- package/dist/chunk-7XDJV7LA.js +0 -2
- package/dist/chunk-7XDJV7LA.js.map +0 -1
- package/dist/chunk-A2KMKSSC.js +0 -2
- package/dist/chunk-A2KMKSSC.js.map +0 -1
- package/dist/chunk-CFIJKJXD.js +0 -2
- package/dist/chunk-CFIJKJXD.js.map +0 -1
- package/dist/chunk-D6X2WCEG.js +0 -2
- package/dist/chunk-D6X2WCEG.js.map +0 -1
- package/dist/chunk-FQYK5BJV.js.map +0 -1
- package/dist/chunk-JCKQQFA4.js +0 -2
- package/dist/chunk-LGJYIUSH.js.map +0 -1
- package/dist/chunk-NCNXUNBB.js.map +0 -1
- package/dist/chunk-OLRZ3U4A.js.map +0 -1
- package/dist/chunk-OUSDXTNH.js.map +0 -1
- package/dist/chunk-PAQW5BFW.js +0 -2
- package/dist/chunk-PAQW5BFW.js.map +0 -1
- package/dist/chunk-QFOYD5Q4.js.map +0 -1
- package/dist/chunk-QW322WRX.js.map +0 -1
- package/dist/chunk-ZX5OIIJX.js +0 -1
- package/dist/chunk-ZX5OIIJX.js.map +0 -1
- package/dist/flows/api.d.ts +0 -33
- package/dist/flows/api.js +0 -2
- package/dist/flows/api.js.map +0 -1
- /package/dist/{chunk-ACQ3OEOE.js.map → chunk-5AG4K2EA.js.map} +0 -0
- /package/dist/{chunk-BWJAHRV6.js.map → chunk-5KZXFQLZ.js.map} +0 -0
- /package/dist/{chunk-LWGVLLBH.js.map → chunk-5OZPBBXS.js.map} +0 -0
- /package/dist/{chunk-T2FGDQSU.js.map → chunk-6FWFRVQE.js.map} +0 -0
- /package/dist/{chunk-5PPUPDYP.js.map → chunk-76DHIEN7.js.map} +0 -0
- /package/dist/{chunk-XDNUJY3V.js.map → chunk-7CJX7I3M.js.map} +0 -0
- /package/dist/{chunk-PEHK6NHL.js.map → chunk-A477TZFC.js.map} +0 -0
- /package/dist/{chunk-HWEJIPSK.js.map → chunk-AA7QB3QQ.js.map} +0 -0
- /package/dist/{chunk-HS4VEURD.js.map → chunk-AM2IRFHQ.js.map} +0 -0
- /package/dist/{chunk-FPJLWY23.js.map → chunk-B6IVJUEH.js.map} +0 -0
- /package/dist/{chunk-PNAZ6US5.js.map → chunk-COBQ4WSJ.js.map} +0 -0
- /package/dist/{chunk-OIVWGY5Z.js.map → chunk-CW3MAP5L.js.map} +0 -0
- /package/dist/{chunk-H3ZR4EW5.js.map → chunk-DPWL4KNA.js.map} +0 -0
- /package/dist/{chunk-YXXCHMX3.js.map → chunk-DXFA52BU.js.map} +0 -0
- /package/dist/{chunk-AVX6IOGC.js.map → chunk-DXIO72S4.js.map} +0 -0
- /package/dist/{chunk-OOCCLRPH.js.map → chunk-DZ2R72O5.js.map} +0 -0
- /package/dist/{chunk-5ENAY65Y.js.map → chunk-E4CABUTS.js.map} +0 -0
- /package/dist/{chunk-GWICTLVR.js.map → chunk-EM5UYWUQ.js.map} +0 -0
- /package/dist/{chunk-E76DWINZ.js.map → chunk-ENW4DCDU.js.map} +0 -0
- /package/dist/{chunk-JTOLQCOG.js.map → chunk-FRTJ4KWA.js.map} +0 -0
- /package/dist/{chunk-GD425MMM.js.map → chunk-GCJCNDJ3.js.map} +0 -0
- /package/dist/{chunk-FJPQPOK3.js.map → chunk-HBHVB56P.js.map} +0 -0
- /package/dist/{chunk-CYDWBHAA.js.map → chunk-HO2TIG7R.js.map} +0 -0
- /package/dist/{chunk-4X77DTSW.js.map → chunk-IUEXOXFA.js.map} +0 -0
- /package/dist/{chunk-SQENUVY5.js.map → chunk-K2BWF2HC.js.map} +0 -0
- /package/dist/{chunk-H7L735T7.js.map → chunk-L3D2AK3X.js.map} +0 -0
- /package/dist/{chunk-SXN63FPH.js.map → chunk-LQAHRGU4.js.map} +0 -0
- /package/dist/{chunk-4OAWZYH7.js.map → chunk-LV5R6H3D.js.map} +0 -0
- /package/dist/{chunk-LYK6PNAY.js.map → chunk-M2CI2UDK.js.map} +0 -0
- /package/dist/{chunk-OQJWLV7V.js.map → chunk-MZB24YJP.js.map} +0 -0
- /package/dist/{chunk-JCKQQFA4.js.map → chunk-OKM7DRCF.js.map} +0 -0
- /package/dist/{chunk-ANHUECRI.js.map → chunk-P7JZC65P.js.map} +0 -0
- /package/dist/{chunk-IJR44ISO.js.map → chunk-QIVDIOJG.js.map} +0 -0
- /package/dist/{chunk-JBUNDNKJ.js.map → chunk-QWJFYQK3.js.map} +0 -0
- /package/dist/{chunk-EGSRN2CQ.js.map → chunk-SO3YQ4WT.js.map} +0 -0
- /package/dist/{chunk-UBN6O7B5.js.map → chunk-SPQO42TA.js.map} +0 -0
- /package/dist/{chunk-VSMVVIBA.js.map → chunk-SRRY72CZ.js.map} +0 -0
- /package/dist/{chunk-NBFJOIV2.js.map → chunk-TWVFLXVF.js.map} +0 -0
- /package/dist/{chunk-WBN4ZSGC.js.map → chunk-UJKTTTGB.js.map} +0 -0
- /package/dist/{chunk-6TY7IKSG.js.map → chunk-WBRWVTZK.js.map} +0 -0
- /package/dist/{chunk-GHV4Q4MB.js.map → chunk-WMPKW7HC.js.map} +0 -0
- /package/dist/{chunk-R7W3BT6P.js.map → chunk-X6CD3FMG.js.map} +0 -0
- /package/dist/{chunk-UZXTPQ47.js.map → chunk-XPL5XOQ4.js.map} +0 -0
- /package/dist/{chunk-26ZOPH2I.js.map → chunk-XPOLXRYT.js.map} +0 -0
- /package/dist/{chunk-7FAT6WCC.js.map → chunk-YDJVQRND.js.map} +0 -0
package/dist/flows/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { modify } from '@remoteoss/json-schema-form';
|
|
2
|
+
import { modify as modify$1 } from '@remoteoss/json-schema-form-next';
|
|
2
3
|
|
|
3
4
|
type Success<T> = {
|
|
4
5
|
data: T;
|
|
@@ -34,6 +35,7 @@ type Field = {
|
|
|
34
35
|
};
|
|
35
36
|
type JSONSchemaFormType = 'address_details' | 'administrative_details' | 'bank_account_details' | 'employment_basic_information' | 'contractor_basic_information' | 'contractor_contract_details' | 'billing_address_details' | 'contract_details' | 'emergency_contact' | 'employment_document_details' | 'personal_details' | 'pricing_plan_details' | 'global_payroll_administrative_details' | 'global_payroll_contract_details' | 'global_payroll_personal_details' | 'benefit_renewal_request';
|
|
36
37
|
type JSFModify = Parameters<typeof modify>[1];
|
|
38
|
+
type JSFModifyNext = Parameters<typeof modify$1>[1];
|
|
37
39
|
type FlowOptions = {
|
|
38
40
|
jsfModify?: JSFModify;
|
|
39
41
|
jsonSchemaVersion?: {
|
|
@@ -46,4 +48,4 @@ type FlowOptions = {
|
|
|
46
48
|
};
|
|
47
49
|
};
|
|
48
50
|
|
|
49
|
-
export type { Field, FlowOptions, JSFModify, JSONSchemaFormType, Result };
|
|
51
|
+
export type { Field, FlowOptions, JSFModify, JSFModifyNext, JSONSchemaFormType, Result };
|
package/dist/index.d.ts
CHANGED
|
@@ -19,29 +19,30 @@ export { useContractAmendment } from './flows/ContractAmendment/hooks.js';
|
|
|
19
19
|
export { TerminationFlow } from './flows/Termination/TerminationFlow.js';
|
|
20
20
|
export { TerminationReasonsDetailContent } from './flows/Termination/components/TerminationReasonsDetailContent/TerminationReasonsDetailContent.js';
|
|
21
21
|
export { TerminationDialogInfoContent } from './flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js';
|
|
22
|
-
export { A as AdditionalDetailsFormValues, E as EmployeeCommunicationFormValues, P as PaidTimeOffFormValues, c as TerminationDetailsFormValues, a as TerminationFlowProps, T as TerminationFormValues, b as TerminationRenderProps } from './types-
|
|
22
|
+
export { A as AdditionalDetailsFormValues, E as EmployeeCommunicationFormValues, P as PaidTimeOffFormValues, c as TerminationDetailsFormValues, a as TerminationFlowProps, T as TerminationFormValues, b as TerminationRenderProps } from './types-C-X7siUr.js';
|
|
23
23
|
export { PaidTimeOffProps } from './flows/Termination/components/PaidTimeOff/PaidTimeOff.js';
|
|
24
24
|
export { AcknowledgeInformationFeesProps } from './flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js';
|
|
25
25
|
export { AcknowledgeInformationProps } from './flows/Termination/components/AcknowledgeInformation/AcknowledgeInformation.js';
|
|
26
26
|
export { OnboardingFlow } from './flows/Onboarding/OnboardingFlow.js';
|
|
27
27
|
export { OnboardingInviteProps } from './flows/Onboarding/components/OnboardingInvite.js';
|
|
28
|
-
export { B as BasicInformationFormPayload, c as BenefitsFormPayload, C as ContractDetailsFormPayload, e as CreditRiskState, d as CreditRiskStatus, E as Employment, f as OnboardingRenderProps, a as SelectCountryFormPayload, b as SelectCountrySuccess } from './types-
|
|
28
|
+
export { B as BasicInformationFormPayload, c as BenefitsFormPayload, C as ContractDetailsFormPayload, e as CreditRiskState, d as CreditRiskStatus, E as Employment, f as OnboardingRenderProps, a as SelectCountryFormPayload, b as SelectCountrySuccess } from './types-BZBdCzER.js';
|
|
29
29
|
export { ContractorOnboardingFlow } from './flows/ContractorOnboarding/ContractorOnboarding.js';
|
|
30
|
-
export { e as ContractPreviewFormPayload, f as ContractPreviewResponse, C as ContractorOnboardingContractDetailsFormPayload, d as ContractorOnboardingContractDetailsResponse, a as ContractorOnboardingFlowProps, b as ContractorOnboardingRenderProps, P as PricingPlanFormPayload, c as PricingPlanResponse } from './types-
|
|
31
|
-
export { c as PaidTimeoffBreakdownResponse, u as useEmploymentQuery, f as useMagicLink, d as usePaidTimeoffBreakdownQuery, e as useTimeOffLeavePoliciesSummaryQuery, b as useTimeOffQuery } from './types-
|
|
30
|
+
export { e as ContractPreviewFormPayload, f as ContractPreviewResponse, C as ContractorOnboardingContractDetailsFormPayload, d as ContractorOnboardingContractDetailsResponse, a as ContractorOnboardingFlowProps, b as ContractorOnboardingRenderProps, P as PricingPlanFormPayload, c as PricingPlanResponse } from './types-pohqJTkr.js';
|
|
31
|
+
export { c as PaidTimeoffBreakdownResponse, u as useEmploymentQuery, f as useMagicLink, d as usePaidTimeoffBreakdownQuery, e as useTimeOffLeavePoliciesSummaryQuery, b as useTimeOffQuery } from './types-OcTc56P-.js';
|
|
32
32
|
export { Z as ZendeskTriggerButton, t as transformYupErrorsIntoObject } from './ZendeskTriggerButton-Dditzyfj.js';
|
|
33
33
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
34
34
|
import { PropsWithChildren } from 'react';
|
|
35
|
-
import { R as RemoteFlowsSDKProps } from './remoteFlows-
|
|
36
|
-
export { $ as $TSFixMe, B as ButtonComponentProps, C as Components, D as DrawerComponentProps, F as FieldComponentProps, b as FieldSetToggleComponentProps, M as Meta, S as StatementComponentProps, Z as ZendeskDrawerComponentProps } from './remoteFlows-
|
|
37
|
-
export {
|
|
38
|
-
export { F as FieldError, N as NormalizedFieldError } from './mutations-
|
|
35
|
+
import { R as RemoteFlowsSDKProps } from './remoteFlows-DUivEPPh.js';
|
|
36
|
+
export { $ as $TSFixMe, B as ButtonComponentProps, C as Components, D as DrawerComponentProps, F as FieldComponentProps, b as FieldSetToggleComponentProps, c as FileComponentProps, M as Meta, S as StatementComponentProps, Z as ZendeskDrawerComponentProps } from './remoteFlows-DUivEPPh.js';
|
|
37
|
+
export { v as Company, C as ContractAmendmentAutomatableResponse, t as CostCalculatorEmployment, j as CostCalculatorEstimateResponse, a0 as Currency, u as EmploymentCreationResponse, A as EmploymentResponse, O as OffboardingResponse, S as SuccessResponse } from './types.gen-D0ZCnKWv.js';
|
|
38
|
+
export { F as FieldError, N as NormalizedFieldError } from './mutations-Cdk0PM78.js';
|
|
39
39
|
import 'react-hook-form';
|
|
40
40
|
import 'yup';
|
|
41
41
|
import './types-Zg1n_9wh.js';
|
|
42
42
|
import './flows/CostCalculator/constants.js';
|
|
43
43
|
import './flows/types.js';
|
|
44
44
|
import '@remoteoss/json-schema-form';
|
|
45
|
+
import '@remoteoss/json-schema-form-next';
|
|
45
46
|
import '@tanstack/react-query';
|
|
46
47
|
import './flows/ContractAmendment/ContractAmendmentBack.js';
|
|
47
48
|
import './flows/ContractAmendment/types.js';
|
|
@@ -61,7 +62,7 @@ import './flows/ContractorOnboarding/utils.js';
|
|
|
61
62
|
import './flows/ContractorOnboarding/components/BasicInformationStep.js';
|
|
62
63
|
import 'clsx';
|
|
63
64
|
|
|
64
|
-
declare function RemoteFlows({ auth,
|
|
65
|
+
declare function RemoteFlows({ auth, children, components, theme, proxy, environment, errorBoundary, }: PropsWithChildren<RemoteFlowsSDKProps>): react_jsx_runtime.JSX.Element;
|
|
65
66
|
|
|
66
67
|
declare function convertFromCents(amount?: number | string | null): number | null;
|
|
67
68
|
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./chunk-FZ7FWFJX.js";import{a as
|
|
1
|
+
import"./chunk-FZ7FWFJX.js";import{a as ft}from"./chunk-DPWL4KNA.js";import{a as mt}from"./chunk-QIQTM4HB.js";import{a as ht}from"./chunk-COBQ4WSJ.js";import"./chunk-LV5R6H3D.js";import"./chunk-P5WUODPR.js";import"./chunk-WW5UCMQZ.js";import"./chunk-ID3ZF7QT.js";import"./chunk-IUEXOXFA.js";import"./chunk-QIVDIOJG.js";import"./chunk-IWA5B4U6.js";import"./chunk-7VOQAVM4.js";import"./chunk-5AG4K2EA.js";import"./chunk-EHAZWZ3O.js";import"./chunk-Q2N5SOKO.js";import"./chunk-U4JVXNOG.js";import"./chunk-OKM7DRCF.js";import"./chunk-NX7MM6XR.js";import"./chunk-ZXGAFQXW.js";import"./chunk-VDRNNOVA.js";import"./chunk-LMYJ6V44.js";import"./chunk-XFD3ULUF.js";import"./chunk-RR55GUDT.js";import"./chunk-DFJNVGK4.js";import"./chunk-SGE4DLC3.js";import"./chunk-GULCZWSK.js";import"./chunk-7CJX7I3M.js";import"./chunk-76DHIEN7.js";import"./chunk-DZ2R72O5.js";import"./chunk-5CVD5WZZ.js";import"./chunk-6VRUYYUV.js";import"./chunk-MRYRNB7Y.js";import"./chunk-Z3BMF4BO.js";import{a as O}from"./chunk-DXIO72S4.js";import"./chunk-SPQO42TA.js";import"./chunk-E4CABUTS.js";import"./chunk-BCXRPHWY.js";import"./chunk-MQWVZSGH.js";import{a as j}from"./chunk-H425RKFI.js";import{a as N}from"./chunk-DXFA52BU.js";import"./chunk-DTHBG6BD.js";import"./chunk-WBRWVTZK.js";import"./chunk-WMPKW7HC.js";import"./chunk-ZSCKSEAA.js";import"./chunk-ZE3YT3Q6.js";import{a as wt}from"./chunk-X6CD3FMG.js";import"./chunk-OIN3HGOQ.js";import"./chunk-Z7WBY27D.js";import"./chunk-5KHLOGTR.js";import"./chunk-LQAHRGU4.js";import"./chunk-M2CI2UDK.js";import"./chunk-6FWFRVQE.js";import"./chunk-GCJCNDJ3.js";import"./chunk-ZQ6MG635.js";import"./chunk-HZDCZFR5.js";import"./chunk-L3D2AK3X.js";import"./chunk-GKD2WI2W.js";import"./chunk-EM5UYWUQ.js";import"./chunk-VAIBLWOY.js";import"./chunk-PGWKJ6FK.js";import{a as T}from"./chunk-SHP4ULHS.js";import{b as C,d as z}from"./chunk-7YQAVDVX.js";import"./chunk-CW3MAP5L.js";import"./chunk-VFRHMNLJ.js";import"./chunk-HO2TIG7R.js";import{a as P}from"./chunk-AM2IRFHQ.js";import{a as W}from"./chunk-ANGJCT4I.js";import{a as E}from"./chunk-UPXJJBXZ.js";import{d as L,e as A}from"./chunk-XPOLXRYT.js";import"./chunk-HN5HLFTB.js";import"./chunk-KSHK3ZPX.js";import"./chunk-DKFUZO5P.js";import{a as S}from"./chunk-Q4BKFSTW.js";import{a as _}from"./chunk-DYB3RWP7.js";import"./chunk-A7ZJQCNU.js";import{a as bt}from"./chunk-HBHVB56P.js";import"./chunk-DPY77ASH.js";import"./chunk-B6IVJUEH.js";import"./chunk-ENW4DCDU.js";import"./chunk-P7JZC65P.js";import"./chunk-SRRY72CZ.js";import"./chunk-TWVFLXVF.js";import"./chunk-2W2XD7ZY.js";import"./chunk-5ZR7EFPY.js";import"./chunk-SO3YQ4WT.js";import"./chunk-TOA3JILU.js";import"./chunk-YDJVQRND.js";import"./chunk-XNOLBKZC.js";import"./chunk-5KZXFQLZ.js";import"./chunk-WVJDCDGZ.js";import"./chunk-XPL5XOQ4.js";import"./chunk-AP56UUME.js";import"./chunk-R2MHAPWD.js";import"./chunk-3UDG4IJO.js";import"./chunk-ZOTFS35J.js";import"./chunk-QWJFYQK3.js";import"./chunk-7R347KBY.js";import"./chunk-AFRA4BIW.js";import"./chunk-3A47R5RQ.js";import"./chunk-Z5WMKCRJ.js";import{a as ut}from"./chunk-UJKTTTGB.js";import{a as it}from"./chunk-IHNYOUXP.js";import{a as ct}from"./chunk-OW5QGJD4.js";import{a as vt}from"./chunk-K2BWF2HC.js";import{a as st,b as lt,c as dt,d as pt,e as gt}from"./chunk-A477TZFC.js";import"./chunk-FRTJ4KWA.js";import"./chunk-5P7INAU2.js";import"./chunk-WJ6YJFD4.js";import"./chunk-THMWKOHC.js";import"./chunk-BV3PGYSH.js";import"./chunk-2YTBWEC7.js";import"./chunk-GOGPCCBS.js";import"./chunk-HPHWQU34.js";import{a as F,b as R}from"./chunk-MZB24YJP.js";import"./chunk-PD24XKD6.js";import"./chunk-TWIUL2P3.js";import{a as v}from"./chunk-AA7QB3QQ.js";import"./chunk-PJBAQZ6G.js";import"./chunk-EKKRQI6B.js";import"./chunk-WVDTHFGS.js";import{a as u,c as h}from"./chunk-3ZWDIEEM.js";import{a as nt}from"./chunk-5OZPBBXS.js";import"./chunk-CNDSIADP.js";import{b as k}from"./chunk-WXUIXZ7P.js";import"./chunk-MQ6F5LE4.js";import"./chunk-TVZAFTPT.js";import{c as B,d as m}from"./chunk-43WMZDDH.js";import{a}from"./chunk-P37U34EQ.js";import{QueryClient as $,QueryClientProvider as J}from"@tanstack/react-query";import{useMemo as tt}from"react";function l(t){let r=document.documentElement;Object.keys(t).forEach(e=>{let i=t[e];i&&r.style.setProperty(e,i)})}a(l,"setCssProperties");function D(t){let r={};return Object.keys(t).forEach(e=>{r[`--${e}`]=t[e]}),r}a(D,"mapThemeColors");function I(t){return{"--spacing":t}}a(I,"mapThemeSpacing");function q(t){return{"--radius":t}}a(q,"mapThemeBorderRadius");function V(t){return{"--fontSizeBase":t.fontSizeBase}}a(V,"mapThemeFont");function f(t){t?.colors&&l(D(t.colors)),t?.spacing&&l(I(t.spacing)),t?.borderRadius&&l(q(t.borderRadius)),t?.font&&l(V(t.font))}a(f,"applyTheme");import{createContext as M,useEffect as U,useMemo as Y}from"react";import{jsx as K}from"react/jsx-runtime";var H=M({theme:{}});function w(t){U(()=>{t.theme&&Object.keys(t.theme).length>0&&f(t.theme)},[t.theme]);let r=Y(()=>({theme:t.theme}),[t.theme]);return K(H.Provider,{value:r,children:t.children})}a(w,"ThemeProvider");import{createClient as X}from"@hey-api/client-fetch";var b={local:"http://localhost:4000/api/eor",partners:"https://gateway.partners.remote-sandbox.com",production:"https://gateway.remote.com",sandbox:"https://gateway.remote-sandbox.com",staging:"https://gateway.niceremote.com"};var g="0.32.0";function Q(t){try{return new URL(t),!0}catch{return!1}}a(Q,"isValidUrl");function x(t,r){let e={current:null},i=r?.environment?b[r?.environment]:"https://gateway.remote.com",s=v.getConfig();r?.environment&&r?.environment!=="production"&&m(g);let c=!!r?.proxy&&Q(r.proxy.url);return r?.proxy&&!c&&console.error("Invalid proxy URL provided. Using default base URL."),X({...s,headers:{...s.headers,...c?r?.proxy?.headers:{},"X-Client-Name":"remote-flows-sdk","X-Client-Version":g},baseUrl:c?r.proxy?.url:i,auth:a(async()=>{function p(o){return!o||Date.now()+6e4>o}if(a(p,"hasTokenExpired"),!e.current||p(e.current.expiresAt))try{let o=await t();e.current={accessToken:o.accessToken,expiresAt:Date.now()+o.expiresIn*1e3}}catch(o){console.error("Failed to fetch auth token:",o);return}return e.current?.accessToken},"auth")})}a(x,"createClient");import{Component as Z}from"react";import{jsx as y}from"react/jsx-runtime";var G=a(()=>y("div",{style:{padding:"20px",border:"1px solid #dc2626",borderRadius:"4px",backgroundColor:"#fef2f2",color:"#991b1b"},children:"Something went wrong in RemoteFlows. Please refresh the page."}),"FallbackErrorBoundary"),d=class extends Z{static{a(this,"RemoteFlowsErrorBoundary")}constructor(r){super(r),this.state={hasError:!1,error:null}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,e){if(console.error("[RemoteFlows] Error caught:",r,e),this.props.errorBoundary?.useParentErrorBoundary)throw r}render(){return this.state.hasError&&this.state.error?this.props.errorBoundary?.fallback?typeof this.props.errorBoundary?.fallback=="function"?this.props.errorBoundary?.fallback(this.state.error):this.props.errorBoundary?.fallback:y(G,{}):this.props.children}};import{jsx as n}from"react/jsx-runtime";var rt=new $;function at({children:t,client:r}){return n(h.Provider,{value:{client:r},children:t})}a(at,"RemoteFlowContextWrapper");function et({children:t,components:r}){return n(u.Provider,{value:r?{components:r}:{components:{}},children:t})}a(et,"FormFieldsProvider");function ot({auth:t,children:r,components:e,theme:i,proxy:s,environment:c,errorBoundary:p={useParentErrorBoundary:!0}}){let o=tt(()=>x(t,{environment:c,proxy:s}),[t,c,s]);return n(d,{errorBoundary:p,children:n(J,{client:rt,children:n(et,{components:e,children:n(at,{client:o,children:n(w,{theme:i,children:r})})})})})}a(ot,"RemoteFlows");export{nt as ContractAmendmentConfirmationForm,ut as ContractAmendmentFlow,it as ContractAmendmentForm,ct as ContractAmendmentSubmit,bt as ContractorOnboardingFlow,S as CostCalculatorDisclaimer,T as CostCalculatorFlow,P as CostCalculatorForm,W as CostCalculatorResetButton,O as CostCalculatorResults,E as CostCalculatorSubmitButton,N as EstimationResults,wt as OnboardingFlow,ot as RemoteFlows,j as SummaryResults,ft as TerminationDialogInfoContent,ht as TerminationFlow,mt as TerminationReasonsDetailContent,R as ZendeskTriggerButton,C as buildCostCalculatorEstimationPayload,k as convertFromCents,_ as disclaimerData,B as transformYupErrorsIntoObject,vt as useContractAmendment,z as useCostCalculator,A as useCostCalculatorEstimationCsv,L as useCostCalculatorEstimationPdf,st as useEmploymentQuery,gt as useMagicLink,dt as usePaidTimeoffBreakdownQuery,pt as useTimeOffLeavePoliciesSummaryQuery,lt as useTimeOffQuery,F as zendeskArticles};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/RemoteFlowsProvider.tsx","../src/lib/applyTheme.ts","../src/theme.tsx","../src/environments.ts","../src/useAuth.ts"],"sourcesContent":["import { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport type { PropsWithChildren } from 'react';\nimport React from 'react';\n\nimport { ThemeProvider } from '@/src/theme';\nimport { FormFieldsContext, RemoteFlowContext } from './context';\nimport { Components, RemoteFlowsSDKProps } from './types/remoteFlows';\nimport { useAuth } from './useAuth';\n\nconst queryClient = new QueryClient();\n\ntype RemoteFlowContextWrapperProps = {\n auth: RemoteFlowsSDKProps['auth'];\n children: React.ReactNode;\n environment?: RemoteFlowsSDKProps['environment'];\n proxy?: RemoteFlowsSDKProps['proxy'];\n authId?: RemoteFlowsSDKProps['authId'];\n};\n\nfunction RemoteFlowContextWrapper({\n children,\n auth,\n authId,\n proxy,\n environment,\n}: RemoteFlowContextWrapperProps) {\n const remoteApiClient = useAuth({\n auth,\n authId,\n options: {\n proxy,\n environment,\n },\n });\n return (\n <RemoteFlowContext.Provider value={{ client: remoteApiClient.current }}>\n {children}\n </RemoteFlowContext.Provider>\n );\n}\n\nexport function FormFieldsProvider({\n children,\n components,\n}: PropsWithChildren<{\n components?: Components;\n}>) {\n return (\n <FormFieldsContext.Provider\n value={components ? { components } : { components: {} }}\n >\n {children}\n </FormFieldsContext.Provider>\n );\n}\n\nexport function RemoteFlows({\n auth,\n authId,\n children,\n components,\n theme,\n proxy,\n environment,\n}: PropsWithChildren<RemoteFlowsSDKProps>) {\n return (\n <QueryClientProvider client={queryClient}>\n <FormFieldsProvider components={components}>\n <RemoteFlowContextWrapper\n auth={auth}\n authId={authId}\n proxy={proxy}\n environment={environment}\n >\n <ThemeProvider theme={theme}>{children}</ThemeProvider>\n </RemoteFlowContextWrapper>\n </FormFieldsProvider>\n </QueryClientProvider>\n );\n}\n","import {\n CssThemeBorder,\n CssThemeColors,\n CssThemeFont,\n CssThemeSpacing,\n ThemeColors,\n ThemeFont,\n ThemeProviderProps,\n} from '@/src/types/theme';\n\nfunction setCssProperties(variables: Record<string, string>) {\n const root = document.documentElement;\n Object.keys(variables).forEach((v) => {\n const propertyVal = variables[v];\n if (propertyVal) {\n root.style.setProperty(v, propertyVal);\n }\n });\n}\n\nfunction mapThemeColors(colors: ThemeColors): CssThemeColors {\n const result: CssThemeColors = {};\n Object.keys(colors).forEach((key) => {\n result[`--${key}` as keyof CssThemeColors] =\n colors[key as keyof ThemeColors];\n });\n return result;\n}\n\nfunction mapThemeSpacing(spacing: string): CssThemeSpacing {\n return {\n '--spacing': spacing,\n };\n}\n\nfunction mapThemeBorderRadius(borderRadius: string): CssThemeBorder {\n return {\n '--radius': borderRadius,\n };\n}\n\nfunction mapThemeFont(font: ThemeFont): CssThemeFont {\n return {\n '--fontSizeBase': font.fontSizeBase,\n };\n}\n\nexport function applyTheme(theme: ThemeProviderProps['theme']) {\n if (theme?.colors) {\n setCssProperties(mapThemeColors(theme.colors));\n }\n\n if (theme?.spacing) {\n setCssProperties(mapThemeSpacing(theme.spacing));\n }\n\n if (theme?.borderRadius) {\n setCssProperties(mapThemeBorderRadius(theme.borderRadius));\n }\n\n if (theme?.font) {\n setCssProperties(mapThemeFont(theme.font));\n }\n}\n","import { applyTheme } from '@/src/lib/applyTheme';\nimport { createContext, useEffect, useMemo } from 'react';\nimport { ThemeProviderProps } from './types/theme';\n\nconst ThemeContext = createContext<Omit<ThemeProviderProps, 'children'>>({\n theme: {},\n});\n\nexport function ThemeProvider(props: ThemeProviderProps) {\n useEffect(() => {\n if (props.theme && Object.keys(props.theme).length > 0) {\n applyTheme(props.theme);\n }\n }, [props.theme]);\n\n const value = useMemo(() => {\n return { theme: props.theme };\n }, [props.theme]);\n\n return (\n <ThemeContext.Provider value={value}>\n {props.children}\n </ThemeContext.Provider>\n );\n}\n","export const ENVIRONMENTS = {\n local: 'http://localhost:4000/api/eor',\n partners: 'https://gateway.partners.remote-sandbox.com',\n production: 'https://gateway.remote.com',\n sandbox: 'https://gateway.remote-sandbox.com',\n staging: 'https://gateway.niceremote.com',\n};\n","import { client } from '@/src/client/client.gen';\nimport { ENVIRONMENTS } from '@/src/environments';\nimport { createClient } from '@hey-api/client-fetch';\nimport { useQuery } from '@tanstack/react-query';\nimport { useRef } from 'react';\nimport { RemoteFlowsSDKProps } from './types/remoteFlows';\nimport { debug } from './lib/utils';\n\ntype AuthResponse = {\n accessToken: string;\n expiresIn: number;\n};\n\ntype Options = Partial<{\n environment: keyof typeof ENVIRONMENTS;\n proxy: RemoteFlowsSDKProps['proxy'];\n}>;\n\nfunction isValidUrl(url: string) {\n try {\n new URL(url);\n return true;\n } catch {\n return false;\n }\n}\n\nexport const useAuth = ({\n auth,\n options,\n authId = 'default',\n}: {\n auth: () => Promise<AuthResponse>;\n options?: Options;\n authId?: 'default' | 'client';\n}) => {\n const session = useRef<{ accessToken: string; expiresAt: number } | null>(\n null,\n );\n const { refetch } = useQuery({\n queryKey: ['auth', authId],\n queryFn: auth,\n enabled: false,\n });\n\n const baseUrl = options?.environment\n ? ENVIRONMENTS[options?.environment]\n : process.env.REMOTE_GATEWAY_URL;\n\n const clientConfig = client.getConfig();\n const npmPackageVersion = process.env.VERSION || 'unknown';\n\n if (options?.environment && options?.environment !== 'production') {\n debug(npmPackageVersion);\n }\n\n const isValidProxy = !!options?.proxy && isValidUrl(options.proxy.url);\n\n if (options?.proxy && !isValidProxy) {\n console.error('Invalid proxy URL provided. Using default base URL.');\n }\n\n return useRef(\n createClient({\n ...clientConfig,\n headers: {\n ...clientConfig.headers,\n ...(isValidProxy ? options?.proxy?.headers : {}),\n 'X-Client-Name': 'remote-flows-sdk',\n 'X-Client-Version': npmPackageVersion,\n },\n baseUrl: isValidProxy ? options.proxy?.url : baseUrl,\n auth: async () => {\n function hasTokenExpired(expiresAt: number | undefined) {\n return !expiresAt || Date.now() + 60000 > expiresAt;\n }\n if (!session.current || hasTokenExpired(session.current.expiresAt)) {\n const { data } = await refetch();\n if (data) {\n session.current = {\n accessToken: data.accessToken,\n expiresAt: Date.now() + data.expiresIn * 1000,\n };\n }\n }\n return session.current?.accessToken;\n },\n }),\n );\n};\n"],"mappings":"s9HAAA,OAAS,eAAAA,EAAa,uBAAAC,MAA2B,wBCUjD,SAASC,EAAiBC,EAAmC,CAC3D,IAAMC,EAAO,SAAS,gBACtB,OAAO,KAAKD,CAAS,EAAE,QAASE,GAAM,CACpC,IAAMC,EAAcH,EAAUE,CAAC,EAC3BC,GACFF,EAAK,MAAM,YAAYC,EAAGC,CAAW,CAEzC,CAAC,CACH,CARSC,EAAAL,EAAA,oBAUT,SAASM,EAAeC,EAAqC,CAC3D,IAAMC,EAAyB,CAAC,EAChC,cAAO,KAAKD,CAAM,EAAE,QAASE,GAAQ,CACnCD,EAAO,KAAKC,CAAG,EAA0B,EACvCF,EAAOE,CAAwB,CACnC,CAAC,EACMD,CACT,CAPSH,EAAAC,EAAA,kBAST,SAASI,EAAgBC,EAAkC,CACzD,MAAO,CACL,YAAaA,CACf,CACF,CAJSN,EAAAK,EAAA,mBAMT,SAASE,EAAqBC,EAAsC,CAClE,MAAO,CACL,WAAYA,CACd,CACF,CAJSR,EAAAO,EAAA,wBAMT,SAASE,EAAaC,EAA+B,CACnD,MAAO,CACL,iBAAkBA,EAAK,YACzB,CACF,CAJSV,EAAAS,EAAA,gBAMF,SAASE,EAAWC,EAA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,OAAQF,EAAgB,OAAQ,EAClE,SAAAL,EACH,CAEJ,CApBSQ,EAAAT,GAAA,4BAsBF,SAASU,GAAmB,CACjC,SAAAT,EACA,WAAAU,CACF,EAEI,CACF,OACEd,EAACe,EAAkB,SAAlB,CACC,MAAOD,EAAa,CAAE,WAAAA,CAAW,EAAI,CAAE,WAAY,CAAC,CAAE,EAErD,SAAAV,EACH,CAEJ,CAbgBQ,EAAAC,GAAA,sBAeT,SAASG,GAAY,CAC1B,KAAAX,EACA,OAAAC,EACA,SAAAF,EACA,WAAAU,EACA,MAAAG,EACA,MAAAV,EACA,YAAAC,CACF,EAA2C,CACzC,OACER,EAACkB,EAAA,CAAoB,OAAQjB,GAC3B,SAAAD,EAACa,GAAA,CAAmB,WAAYC,EAC9B,SAAAd,EAACG,GAAA,CACC,KAAME,EACN,OAAQC,EACR,MAAOC,EACP,YAAaC,EAEb,SAAAR,EAACmB,EAAA,CAAc,MAAOF,EAAQ,SAAAb,EAAS,EACzC,EACF,EACF,CAEJ,CAvBgBQ,EAAAI,GAAA","names":["QueryClient","QueryClientProvider","setCssProperties","variables","root","v","propertyVal","__name","mapThemeColors","colors","result","key","mapThemeSpacing","spacing","mapThemeBorderRadius","borderRadius","mapThemeFont","font","applyTheme","theme","createContext","useEffect","useMemo","jsx","ThemeContext","createContext","ThemeProvider","props","useEffect","applyTheme","value","useMemo","__name","ENVIRONMENTS","createClient","useQuery","useRef","isValidUrl","url","__name","useAuth","auth","options","authId","session","useRef","refetch","useQuery","baseUrl","ENVIRONMENTS","clientConfig","client","npmPackageVersion","debug","isValidProxy","createClient","hasTokenExpired","expiresAt","data","jsx","queryClient","QueryClient","RemoteFlowContextWrapper","children","auth","authId","proxy","environment","remoteApiClient","useAuth","RemoteFlowContext","__name","FormFieldsProvider","components","FormFieldsContext","RemoteFlows","theme","QueryClientProvider","ThemeProvider"]}
|
|
1
|
+
{"version":3,"sources":["../src/RemoteFlowsProvider.tsx","../src/lib/applyTheme.ts","../src/theme.tsx","../src/auth/createClient.ts","../src/environments.ts","../src/lib/version.ts","../src/components/error-handling/RemoteFlowsErrorBoundary.tsx"],"sourcesContent":["import { QueryClient, QueryClientProvider } from '@tanstack/react-query';\nimport type { PropsWithChildren } from 'react';\nimport React, { useMemo } from 'react';\n\nimport { ThemeProvider } from '@/src/theme';\nimport { FormFieldsContext, RemoteFlowContext } from './context';\nimport { Components, RemoteFlowsSDKProps } from './types/remoteFlows';\nimport { createClient } from '@/src/auth/createClient';\nimport { Client } from '@hey-api/client-fetch';\nimport { RemoteFlowsErrorBoundary } from '@/src/components/error-handling/RemoteFlowsErrorBoundary';\n\nconst queryClient = new QueryClient();\n\ntype RemoteFlowContextWrapperProps = {\n children: React.ReactNode;\n client: Client;\n};\n\nfunction RemoteFlowContextWrapper({\n children,\n client,\n}: RemoteFlowContextWrapperProps) {\n return (\n <RemoteFlowContext.Provider value={{ client }}>\n {children}\n </RemoteFlowContext.Provider>\n );\n}\n\nexport function FormFieldsProvider({\n children,\n components,\n}: PropsWithChildren<{\n components?: Components;\n}>) {\n return (\n <FormFieldsContext.Provider\n value={components ? { components } : { components: {} }}\n >\n {children}\n </FormFieldsContext.Provider>\n );\n}\n\nexport function RemoteFlows({\n auth,\n children,\n components,\n theme,\n proxy,\n environment,\n errorBoundary = { useParentErrorBoundary: true },\n}: PropsWithChildren<RemoteFlowsSDKProps>) {\n const client = useMemo(\n () => createClient(auth, { environment, proxy }),\n [auth, environment, proxy],\n );\n return (\n <RemoteFlowsErrorBoundary errorBoundary={errorBoundary}>\n <QueryClientProvider client={queryClient}>\n <FormFieldsProvider components={components}>\n <RemoteFlowContextWrapper client={client}>\n <ThemeProvider theme={theme}>{children}</ThemeProvider>\n </RemoteFlowContextWrapper>\n </FormFieldsProvider>\n </QueryClientProvider>\n </RemoteFlowsErrorBoundary>\n );\n}\n","import {\n CssThemeBorder,\n CssThemeColors,\n CssThemeFont,\n CssThemeSpacing,\n ThemeColors,\n ThemeFont,\n ThemeProviderProps,\n} from '@/src/types/theme';\n\nfunction setCssProperties(variables: Record<string, string>) {\n const root = document.documentElement;\n Object.keys(variables).forEach((v) => {\n const propertyVal = variables[v];\n if (propertyVal) {\n root.style.setProperty(v, propertyVal);\n }\n });\n}\n\nfunction mapThemeColors(colors: ThemeColors): CssThemeColors {\n const result: CssThemeColors = {};\n Object.keys(colors).forEach((key) => {\n result[`--${key}` as keyof CssThemeColors] =\n colors[key as keyof ThemeColors];\n });\n return result;\n}\n\nfunction mapThemeSpacing(spacing: string): CssThemeSpacing {\n return {\n '--spacing': spacing,\n };\n}\n\nfunction mapThemeBorderRadius(borderRadius: string): CssThemeBorder {\n return {\n '--radius': borderRadius,\n };\n}\n\nfunction mapThemeFont(font: ThemeFont): CssThemeFont {\n return {\n '--fontSizeBase': font.fontSizeBase,\n };\n}\n\nexport function applyTheme(theme: ThemeProviderProps['theme']) {\n if (theme?.colors) {\n setCssProperties(mapThemeColors(theme.colors));\n }\n\n if (theme?.spacing) {\n setCssProperties(mapThemeSpacing(theme.spacing));\n }\n\n if (theme?.borderRadius) {\n setCssProperties(mapThemeBorderRadius(theme.borderRadius));\n }\n\n if (theme?.font) {\n setCssProperties(mapThemeFont(theme.font));\n }\n}\n","import { applyTheme } from '@/src/lib/applyTheme';\nimport { createContext, useEffect, useMemo } from 'react';\nimport { ThemeProviderProps } from './types/theme';\n\nconst ThemeContext = createContext<Omit<ThemeProviderProps, 'children'>>({\n theme: {},\n});\n\nexport function ThemeProvider(props: ThemeProviderProps) {\n useEffect(() => {\n if (props.theme && Object.keys(props.theme).length > 0) {\n applyTheme(props.theme);\n }\n }, [props.theme]);\n\n const value = useMemo(() => {\n return { theme: props.theme };\n }, [props.theme]);\n\n return (\n <ThemeContext.Provider value={value}>\n {props.children}\n </ThemeContext.Provider>\n );\n}\n","import { createClient as createHeyApiClient } from '@hey-api/client-fetch';\nimport { client } from '@/src/client/client.gen';\nimport { ENVIRONMENTS } from '@/src/environments';\nimport { npmPackageVersion } from '@/src/lib/version';\nimport { RemoteFlowsSDKProps } from '@/src/types/remoteFlows';\nimport { debug } from '@/src/lib/utils';\n\ntype AuthResponse = {\n accessToken: string;\n expiresIn: number;\n};\n\ntype Options = Partial<{\n environment: keyof typeof ENVIRONMENTS;\n proxy: RemoteFlowsSDKProps['proxy'];\n}>;\n\nfunction isValidUrl(url: string) {\n try {\n new URL(url);\n return true;\n } catch {\n return false;\n }\n}\n\nexport function createClient(\n auth: () => Promise<AuthResponse>,\n options?: Options,\n) {\n const sessionRef = {\n current: null as { accessToken: string; expiresAt: number } | null,\n };\n\n const baseUrl = options?.environment\n ? ENVIRONMENTS[options?.environment]\n : process.env.REMOTE_GATEWAY_URL;\n\n const clientConfig = client.getConfig();\n\n if (options?.environment && options?.environment !== 'production') {\n debug(npmPackageVersion);\n }\n\n const isValidProxy = !!options?.proxy && isValidUrl(options.proxy.url);\n\n if (options?.proxy && !isValidProxy) {\n console.error('Invalid proxy URL provided. Using default base URL.');\n }\n\n return createHeyApiClient({\n ...clientConfig,\n headers: {\n ...clientConfig.headers,\n ...(isValidProxy ? options?.proxy?.headers : {}),\n 'X-Client-Name': 'remote-flows-sdk',\n 'X-Client-Version': npmPackageVersion,\n },\n baseUrl: isValidProxy ? options.proxy?.url : baseUrl,\n auth: async () => {\n function hasTokenExpired(expiresAt: number | undefined) {\n return !expiresAt || Date.now() + 60000 > expiresAt;\n }\n\n if (\n !sessionRef.current ||\n hasTokenExpired(sessionRef.current.expiresAt)\n ) {\n try {\n const data = await auth();\n sessionRef.current = {\n accessToken: data.accessToken,\n expiresAt: Date.now() + data.expiresIn * 1000,\n };\n } catch (error) {\n console.error('Failed to fetch auth token:', error);\n return undefined;\n }\n }\n return sessionRef.current?.accessToken;\n },\n });\n}\n","export const ENVIRONMENTS = {\n local: 'http://localhost:4000/api/eor',\n partners: 'https://gateway.partners.remote-sandbox.com',\n production: 'https://gateway.remote.com',\n sandbox: 'https://gateway.remote-sandbox.com',\n staging: 'https://gateway.niceremote.com',\n};\n","/**\n * SDK version constant\n * Retrieved from package.json at build time\n * Falls back to 'unknown' if VERSION env var is not set\n */\nexport const npmPackageVersion = process.env.VERSION || 'unknown';\n","import { Component, ErrorInfo, ReactNode } from 'react';\n\ntype ErrorBoundaryState = {\n hasError: boolean;\n error: Error | null;\n};\n\ninterface RemoteFlowsErrorBoundaryProps {\n children: ReactNode;\n /**\n * Error boundary configuration.\n */\n errorBoundary?: {\n /**\n * If true, re-throws errors to parent error boundary.\n * If false, shows fallback UI to prevent crashes.\n * @default false\n */\n useParentErrorBoundary?: boolean;\n /**\n * Custom fallback UI to show when an error occurs.\n * fallback only works when rethrow is false.\n * If not provided, shows default error message.\n */\n fallback?: ReactNode | ((error: Error) => ReactNode);\n };\n}\n\nexport const FallbackErrorBoundary = () => {\n return (\n <div\n style={{\n padding: '20px',\n border: '1px solid #dc2626',\n borderRadius: '4px',\n backgroundColor: '#fef2f2',\n color: '#991b1b',\n }}\n >\n Something went wrong in RemoteFlows. Please refresh the page.\n </div>\n );\n};\n\nexport class RemoteFlowsErrorBoundary extends Component<\n RemoteFlowsErrorBoundaryProps,\n ErrorBoundaryState\n> {\n constructor(props: RemoteFlowsErrorBoundaryProps) {\n super(props);\n this.state = {\n hasError: false,\n error: null,\n };\n }\n\n static getDerivedStateFromError(error: Error): ErrorBoundaryState {\n return {\n hasError: true,\n error,\n };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo): void {\n console.error('[RemoteFlows] Error caught:', error, errorInfo);\n\n if (this.props.errorBoundary?.useParentErrorBoundary) {\n throw error;\n }\n }\n\n render(): ReactNode {\n if (this.state.hasError && this.state.error) {\n // If custom fallback provided, use it\n if (this.props.errorBoundary?.fallback) {\n return typeof this.props.errorBoundary?.fallback === 'function'\n ? this.props.errorBoundary?.fallback(this.state.error)\n : this.props.errorBoundary?.fallback;\n }\n\n // Default fallback\n return <FallbackErrorBoundary />;\n }\n\n return this.props.children;\n }\n}\n"],"mappings":"y5HAAA,OAAS,eAAAA,EAAa,uBAAAC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EACH,CAEJ,CATSG,EAAAJ,GAAA,4BAWF,SAASK,GAAmB,CACjC,SAAAJ,EACA,WAAAK,CACF,EAEI,CACF,OACET,EAACU,EAAkB,SAAlB,CACC,MAAOD,EAAa,CAAE,WAAAA,CAAW,EAAI,CAAE,WAAY,CAAC,CAAE,EAErD,SAAAL,EACH,CAEJ,CAbgBG,EAAAC,GAAA,sBAeT,SAASG,GAAY,CAC1B,KAAAC,EACA,SAAAR,EACA,WAAAK,EACA,MAAAI,EACA,MAAAC,EACA,YAAAC,EACA,cAAAC,EAAgB,CAAE,uBAAwB,EAAK,CACjD,EAA2C,CACzC,IAAMX,EAASY,GACb,IAAMC,EAAaN,EAAM,CAAE,YAAAG,EAAa,MAAAD,CAAM,CAAC,EAC/C,CAACF,EAAMG,EAAaD,CAAK,CAC3B,EACA,OACEd,EAACmB,EAAA,CAAyB,cAAeH,EACvC,SAAAhB,EAACoB,EAAA,CAAoB,OAAQnB,GAC3B,SAAAD,EAACQ,GAAA,CAAmB,WAAYC,EAC9B,SAAAT,EAACG,GAAA,CAAyB,OAAQE,EAChC,SAAAL,EAACqB,EAAA,CAAc,MAAOR,EAAQ,SAAAT,EAAS,EACzC,EACF,EACF,EACF,CAEJ,CAxBgBG,EAAAI,GAAA","names":["QueryClient","QueryClientProvider","useMemo","setCssProperties","variables","root","v","propertyVal","__name","mapThemeColors","colors","result","key","mapThemeSpacing","spacing","mapThemeBorderRadius","borderRadius","mapThemeFont","font","applyTheme","theme","createContext","useEffect","useMemo","jsx","ThemeContext","createContext","ThemeProvider","props","useEffect","applyTheme","value","useMemo","__name","createHeyApiClient","ENVIRONMENTS","npmPackageVersion","isValidUrl","url","__name","createClient","auth","options","sessionRef","baseUrl","ENVIRONMENTS","clientConfig","client","debug","npmPackageVersion","isValidProxy","createHeyApiClient","hasTokenExpired","expiresAt","data","error","Component","jsx","FallbackErrorBoundary","__name","RemoteFlowsErrorBoundary","Component","props","error","errorInfo","jsx","queryClient","QueryClient","RemoteFlowContextWrapper","children","client","RemoteFlowContext","__name","FormFieldsProvider","components","FormFieldsContext","RemoteFlows","auth","theme","proxy","environment","errorBoundary","useMemo","createClient","RemoteFlowsErrorBoundary","QueryClientProvider","ThemeProvider"]}
|
package/dist/internals.d.ts
CHANGED
|
@@ -78,6 +78,15 @@ declare function Badge({ className, variant, asChild, ...props }: React.Componen
|
|
|
78
78
|
asChild?: boolean;
|
|
79
79
|
}): react_jsx_runtime.JSX.Element;
|
|
80
80
|
|
|
81
|
+
type FileUploaderProps = {
|
|
82
|
+
onChange: (files: File[]) => void;
|
|
83
|
+
className?: string;
|
|
84
|
+
multiple?: boolean;
|
|
85
|
+
accept?: string;
|
|
86
|
+
files?: File[];
|
|
87
|
+
};
|
|
88
|
+
declare function FileUploader({ onChange, className, multiple, accept, files: externalFiles, }: FileUploaderProps): react_jsx_runtime.JSX.Element;
|
|
89
|
+
|
|
81
90
|
declare function Input({ className, type, ...props }: React.ComponentProps<'input'>): react_jsx_runtime.JSX.Element;
|
|
82
91
|
|
|
83
92
|
declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
@@ -95,4 +104,4 @@ declare function SelectItem({ className, children, ...props }: React.ComponentPr
|
|
|
95
104
|
|
|
96
105
|
declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
97
106
|
|
|
98
|
-
export { Alert, AlertDescription, AlertTitle, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Drawer, DrawerContent, DrawerHeader, DrawerTitle, DrawerTrigger, Input, Label, RadioGroup, RadioGroupItem, ScrollArea, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Tabs, TabsContent, TabsList, TabsTrigger, badgeVariants, buttonVariants };
|
|
107
|
+
export { Alert, AlertDescription, AlertTitle, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Drawer, DrawerContent, DrawerHeader, DrawerTitle, DrawerTrigger, FileUploader, Input, Label, RadioGroup, RadioGroupItem, ScrollArea, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Tabs, TabsContent, TabsList, TabsTrigger, badgeVariants, buttonVariants };
|
package/dist/internals.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as R,b as S,c as T}from"./chunk-QWJFYQK3.js";import{a as N,b as O,c as P,d as Q}from"./chunk-7R347KBY.js";import{a as H,b as I,c as J,d as K,e as L,f as M}from"./chunk-AFRA4BIW.js";import{a as G}from"./chunk-3A47R5RQ.js";import{a as j,b as m,c as n,d as o,e as p,g as q,h as r,i as s,j as t,k as w,l as x,m as y,n as z,o as A,p as B,q as C,r as D,s as E,t as F}from"./chunk-GOGPCCBS.js";import{a as u,b as v}from"./chunk-HPHWQU34.js";import{b as i}from"./chunk-MZB24YJP.js";import{a as c}from"./chunk-PD24XKD6.js";import{a as d,b as e,d as f,e as g,f as h}from"./chunk-TWIUL2P3.js";import"./chunk-AA7QB3QQ.js";import{a as k,b as l}from"./chunk-WVDTHFGS.js";import"./chunk-3ZWDIEEM.js";import{a as b}from"./chunk-MQ6F5LE4.js";import{a}from"./chunk-43WMZDDH.js";import"./chunk-P37U34EQ.js";export{D as Alert,F as AlertDescription,E as AlertTitle,v as Badge,l as Button,H as Card,L as CardContent,K as CardDescription,M as CardFooter,I as CardHeader,J as CardTitle,j as Checkbox,R as Collapsible,T as CollapsibleContent,S as CollapsibleTrigger,w as Dialog,y as DialogContent,C as DialogDescription,A as DialogFooter,z as DialogHeader,B as DialogTitle,x as DialogTrigger,d as Drawer,f as DrawerContent,g as DrawerHeader,h as DrawerTitle,e as DrawerTrigger,m as FileUploader,c as Input,b as Label,n as RadioGroup,o as RadioGroupItem,G as ScrollArea,p as Select,s as SelectContent,t as SelectItem,r as SelectTrigger,q as SelectValue,N as Tabs,Q as TabsContent,O as TabsList,P as TabsTrigger,i as ZendeskTriggerButton,u as badgeVariants,k as buttonVariants,a as cn};
|
|
2
2
|
//# sourceMappingURL=internals.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ControllerRenderProps, FieldValues, ControllerFieldState } from 'react-hook-form';
|
|
2
2
|
import React__default, { PropsWithChildren, ReactNode } from 'react';
|
|
3
3
|
import { AnySchema } from 'yup';
|
|
4
|
-
import {
|
|
4
|
+
import { a2 as HelpCenterArticle } from './types.gen-D0ZCnKWv.js';
|
|
5
5
|
import { S as SupportedTypes } from './types-Zg1n_9wh.js';
|
|
6
6
|
|
|
7
7
|
type ThemeProviderProps = PropsWithChildren<{
|
|
@@ -48,6 +48,20 @@ type ColumnDef<T = $TSFixMe> = {
|
|
|
48
48
|
render?: (value: $TSFixMe, row: T, index: number) => React__default.ReactNode;
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
+
/**
|
|
52
|
+
* Base type for field metadata passed to custom field components.
|
|
53
|
+
* Extends JSFField with optional metadata for extensibility.
|
|
54
|
+
*/
|
|
55
|
+
type FieldDataProps = Partial<JSFField> & {
|
|
56
|
+
metadata?: Record<string, unknown>;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
type FieldFileDataProps = FieldDataProps & {
|
|
60
|
+
accept?: string;
|
|
61
|
+
multiple?: boolean;
|
|
62
|
+
maxFileSize?: number;
|
|
63
|
+
};
|
|
64
|
+
|
|
51
65
|
type AuthResponse = {
|
|
52
66
|
accessToken: string;
|
|
53
67
|
expiresIn: number;
|
|
@@ -113,9 +127,7 @@ type FieldComponentProps = {
|
|
|
113
127
|
* Metadata derived from JSON schema parsing that provides additional context and validation rules for the field.
|
|
114
128
|
* Contains properties defined in the original JSON schema such as type, format, constraints, etc.
|
|
115
129
|
*/
|
|
116
|
-
fieldData:
|
|
117
|
-
metadata?: Record<string, unknown>;
|
|
118
|
-
};
|
|
130
|
+
fieldData: FieldDataProps;
|
|
119
131
|
};
|
|
120
132
|
/**
|
|
121
133
|
* Props for custom button components.
|
|
@@ -162,9 +174,14 @@ type FieldSetToggleComponentProps = {
|
|
|
162
174
|
className?: string;
|
|
163
175
|
children?: React.ReactNode;
|
|
164
176
|
};
|
|
177
|
+
type TypesWithoutFile = Exclude<SupportedTypes, 'file'>;
|
|
178
|
+
type FileComponentProps = FieldComponentProps & {
|
|
179
|
+
fieldData: FieldFileDataProps;
|
|
180
|
+
};
|
|
165
181
|
type Components = {
|
|
166
|
-
[K in
|
|
182
|
+
[K in TypesWithoutFile]?: React.ComponentType<FieldComponentProps>;
|
|
167
183
|
} & {
|
|
184
|
+
file?: React.ComponentType<FileComponentProps>;
|
|
168
185
|
statement?: React.ComponentType<StatementComponentProps>;
|
|
169
186
|
button?: React.ComponentType<ButtonComponentProps>;
|
|
170
187
|
fieldsetToggle?: React.ComponentType<FieldSetToggleComponentProps>;
|
|
@@ -199,10 +216,28 @@ type RemoteFlowsSDKProps = Omit<ThemeProviderProps, 'children'> & {
|
|
|
199
216
|
[key: string]: string;
|
|
200
217
|
};
|
|
201
218
|
};
|
|
219
|
+
/**
|
|
220
|
+
* Error boundary configuration.
|
|
221
|
+
*/
|
|
222
|
+
errorBoundary?: {
|
|
223
|
+
/**
|
|
224
|
+
* If true, re-throws errors to parent error boundary.
|
|
225
|
+
* If false, shows fallback UI to prevent crashes.
|
|
226
|
+
* @default false
|
|
227
|
+
*/
|
|
228
|
+
useParentErrorBoundary?: boolean;
|
|
229
|
+
/**
|
|
230
|
+
* Custom fallback UI to show when an error occurs.
|
|
231
|
+
* fallback only works when rethrow is false.
|
|
232
|
+
* If not provided, shows default error message.
|
|
233
|
+
*/
|
|
234
|
+
fallback?: ReactNode | ((error: Error) => ReactNode);
|
|
235
|
+
};
|
|
202
236
|
/**
|
|
203
237
|
* ID to use for the auth query.
|
|
204
238
|
* If we navigate from one page to another with a different authentication method,
|
|
205
239
|
* we need to use a different authId.
|
|
240
|
+
* @deprecated will be removed in a major version, behavior stays the same for now.
|
|
206
241
|
*/
|
|
207
242
|
authId?: 'default' | 'client';
|
|
208
243
|
};
|
|
@@ -222,4 +257,4 @@ type MetaValues = {
|
|
|
222
257
|
};
|
|
223
258
|
type Meta = Record<string, MetaValues>;
|
|
224
259
|
|
|
225
|
-
export type { $TSFixMe as $, ButtonComponentProps as B, Components as C, DrawerComponentProps as D, FieldComponentProps as F, JSFFieldset as J, Meta as M, RemoteFlowsSDKProps as R, StatementComponentProps as S, ZendeskDrawerComponentProps as Z, JSFField as a, FieldSetToggleComponentProps as b };
|
|
260
|
+
export type { $TSFixMe as $, ButtonComponentProps as B, Components as C, DrawerComponentProps as D, FieldComponentProps as F, JSFFieldset as J, Meta as M, RemoteFlowsSDKProps as R, StatementComponentProps as S, ZendeskDrawerComponentProps as Z, JSFField as a, FieldSetToggleComponentProps as b, FileComponentProps as c };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { u as EmploymentCreationResponse, A as EmploymentResponse, S as SuccessResponse, y as PostCreateEmployment2Error, B as PatchUpdateEmployment2Error, G as PutUpdateBenefitOfferError, E as Employment$1, z as EmploymentCreateParams } from './types.gen-D0ZCnKWv.js';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import { OnboardingBack } from './flows/Onboarding/components/OnboardingBack.js';
|
|
4
4
|
import { OnboardingInvite } from './flows/Onboarding/components/OnboardingInvite.js';
|
|
5
|
-
import { N as NormalizedFieldError, S as SuccessResponse$1, E as ErrorResponse } from './mutations-
|
|
5
|
+
import { N as NormalizedFieldError, S as SuccessResponse$1, E as ErrorResponse } from './mutations-Cdk0PM78.js';
|
|
6
6
|
import { OnboardingSubmit } from './flows/Onboarding/components/OnboardingSubmit.js';
|
|
7
|
-
import { C as Components, M as Meta, J as JSFFieldset } from './remoteFlows-
|
|
7
|
+
import { C as Components, M as Meta, J as JSFFieldset } from './remoteFlows-DUivEPPh.js';
|
|
8
8
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
9
9
|
import * as React$1 from 'react';
|
|
10
10
|
import * as _remoteoss_json_schema_form from '@remoteoss/json-schema-form';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { O as OffboardingResponse,
|
|
1
|
+
import { O as OffboardingResponse, a1 as PayrollCalendarEor, E as Employment, T as TerminationDetailsParams, N as PostCreateOffboardingError } from './types.gen-D0ZCnKWv.js';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import { E as ErrorResponse, S as SuccessResponse } from './mutations-
|
|
3
|
+
import { E as ErrorResponse, S as SuccessResponse } from './mutations-Cdk0PM78.js';
|
|
4
4
|
import * as React$1 from 'react';
|
|
5
5
|
import * as _remoteoss_json_schema_form from '@remoteoss/json-schema-form';
|
|
6
6
|
import { $TSFixMe } from '@remoteoss/json-schema-form';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as Employment,
|
|
1
|
+
import { E as Employment, Q as ListTimeoffResponse, R as TimeoffStatus, W as TimeoffType, X as ListLeavePoliciesSummaryResponse, Y as MagicLinkResponse, Z as UnprocessableEntityResponse, _ as MagicLinkParams } from './types.gen-D0ZCnKWv.js';
|
|
2
2
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
3
3
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
4
4
|
import { ContractAmendmentParams } from './flows/ContractAmendment/types.js';
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { E as Employment, F as File,
|
|
1
|
+
import { E as Employment, F as File, g as CreateContractDocumentResponse, d as SignContractDocument, S as SuccessResponse } from './types.gen-D0ZCnKWv.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-Cdk0PM78.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-DUivEPPh.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-BZBdCzER.js';
|
|
16
16
|
import { FlowOptions, JSFModify } from './flows/types.js';
|
|
17
17
|
import { OnboardingInvite } from './flows/Onboarding/components/OnboardingInvite.js';
|
|
18
18
|
|
|
@@ -1639,4 +1639,4 @@ type PostManageContractorPlusSubscriptionSubscriptionErrors = {
|
|
|
1639
1639
|
};
|
|
1640
1640
|
type PostManageContractorPlusSubscriptionSubscriptionError = PostManageContractorPlusSubscriptionSubscriptionErrors[keyof PostManageContractorPlusSubscriptionSubscriptionErrors];
|
|
1641
1641
|
|
|
1642
|
-
export type {
|
|
1642
|
+
export type { CreateOffboardingParams as $, EmploymentResponse as A, PatchUpdateEmployment2Error as B, ContractAmendmentAutomatableResponse as C, EmploymentFullParams as D, Employment as E, File as F, PutUpdateBenefitOfferError as G, ConvertCurrencyResponse as H, PostConvertRawCurrencyConverterError as I, ConvertCurrencyParams as J, PostCreateContractEligibilityError as K, CreateContractEligibilityParams as L, ManageContractorPlusSubscriptionOperationsParams as M, PostCreateOffboardingError as N, OffboardingResponse as O, PostAutomatableContractAmendmentError as P, ListTimeoffResponse as Q, TimeoffStatus as R, SuccessResponse as S, TerminationDetailsParams as T, UnifiedEmploymentUpsertBenefitOffersRequest as U, ValidationError as V, TimeoffType as W, ListLeavePoliciesSummaryResponse as X, MagicLinkResponse as Y, UnprocessableEntityResponse as Z, MagicLinkParams as _, ContractAmendmentResponse as a, Currency as a0, PayrollCalendarEor as a1, HelpCenterArticle as a2, PostCreateContractAmendmentError as b, PostSignContractDocumentError as c, SignContractDocument as d, ContractorSubscriptionsSummary as e, PostManageContractorPlusSubscriptionSubscriptionError as f, CreateContractDocumentResponse as g, PostCreateContractDocumentError as h, CreateContractDocument as i, CostCalculatorEstimateResponse as j, PostCreateEstimationError as k, CostCalculatorEstimatePdfResponse as l, PostCreateEstimationPdfError as m, CostCalculatorEstimateParams as n, CostCalculatorEstimateCsvResponse as o, PostCreateEstimationCsvError as p, MinimalRegion 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.32.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",
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
"@radix-ui/react-tabs": "^1.1.3",
|
|
77
77
|
"@radix-ui/react-tooltip": "^1.1.8",
|
|
78
78
|
"@remoteoss/json-schema-form": "0.11.10-beta.0",
|
|
79
|
+
"@remoteoss/json-schema-form-next": "npm:@remoteoss/json-schema-form@1.2.7",
|
|
79
80
|
"@tailwindcss/cli": "^4.0.9",
|
|
80
81
|
"@tailwindcss/postcss": "^4.0.9",
|
|
81
82
|
"@tanstack/react-query": "^5.67.2",
|
package/dist/chunk-2L3ISQJL.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as s}from"./chunk-JCKQQFA4.js";import{a as n}from"./chunk-XFD3ULUF.js";import{b as i}from"./chunk-HWEJIPSK.js";import{d as a}from"./chunk-3ZWDIEEM.js";import{a as r}from"./chunk-P37U34EQ.js";import{modify as c}from"@remoteoss/json-schema-form";import{useMutation as l,useQuery as p}from"@tanstack/react-query";import{createHeadlessForm as y}from"@remoteoss/json-schema-form";var V=r(()=>{let{client:o}=a();return l({mutationFn:r(e=>i({client:o,body:e}),"mutationFn")})},"useCreateTermination"),M=r(({formValues:o,jsfModify:e,step:m})=>p({queryKey:["rmt-flows-termination-schema",m],queryFn:r(()=>s[m]??n,"queryFn"),select:r(({data:f})=>{let t=f?.schema||{};if(e){let{schema:u}=c(t,e);t=u}return y(t||{},{initialValues:o||{}})},"select")}),"useTerminationSchema");export{V as a,M as b};
|
|
2
|
-
//# sourceMappingURL=chunk-2L3ISQJL.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/api.ts"],"sourcesContent":["import { postCreateOffboarding } from '@/src/client/sdk.gen';\nimport { CreateOffboardingParams } from '@/src/client/types.gen';\nimport { useClient } from '@/src/context';\nimport { TerminationFormValues } from '@/src/flows/Termination/types';\nimport { JSFModify } from '@/src/flows/types';\nimport { Client } from '@hey-api/client-fetch';\nimport { modify } from '@remoteoss/json-schema-form';\nimport { useMutation, useQuery } from '@tanstack/react-query';\nimport { createHeadlessForm } from '@remoteoss/json-schema-form';\nimport { defaultSchema } from '@/src/flows/Termination/json-schemas/defaultSchema';\nimport { schema } from '@/src/flows/Termination/json-schemas/schema';\n\nexport const useCreateTermination = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: (payload: CreateOffboardingParams) => {\n return postCreateOffboarding({\n client: client as Client,\n body: payload,\n });\n },\n });\n};\n\nexport const useTerminationSchema = ({\n formValues,\n jsfModify,\n step,\n}: {\n formValues?: TerminationFormValues;\n jsfModify?: JSFModify;\n step?: string;\n}) => {\n return useQuery({\n queryKey: ['rmt-flows-termination-schema', step],\n queryFn: () => {\n return schema[step as keyof typeof schema] ?? defaultSchema;\n },\n select: ({ data }) => {\n let jsfSchema = data?.schema || {};\n if (jsfModify) {\n const { schema } = modify(jsfSchema, jsfModify);\n jsfSchema = schema;\n }\n const form = createHeadlessForm(jsfSchema || {}, {\n initialValues: formValues || {},\n });\n return form;\n },\n });\n};\n"],"mappings":"wMAMA,OAAS,UAAAA,MAAc,8BACvB,OAAS,eAAAC,EAAa,YAAAC,MAAgB,wBACtC,OAAS,sBAAAC,MAA0B,8BAI5B,IAAMC,EAAuBC,EAAA,IAAM,CACxC,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAU,EAC7B,OAAOC,EAAY,CACjB,WAAYH,EAACI,GACJC,EAAsB,CAC3B,OAAQJ,EACR,KAAMG,CACR,CAAC,EAJS,aAMd,CAAC,CACH,EAVoC,wBAYvBE,EAAuBN,EAAA,CAAC,CACnC,WAAAO,EACA,UAAAC,EACA,KAAAC,CACF,IAKSC,EAAS,CACd,SAAU,CAAC,+BAAgCD,CAAI,EAC/C,QAAST,EAAA,IACAW,EAAOF,CAA2B,GAAKG,EADvC,WAGT,OAAQZ,EAAA,CAAC,CAAE,KAAAa,CAAK,IAAM,CACpB,IAAIC,EAAYD,GAAM,QAAU,CAAC,EACjC,GAAIL,EAAW,CACb,GAAM,CAAE,OAAAG,CAAO,EAAII,EAAOD,EAAWN,CAAS,EAC9CM,EAAYH,CACd,CAIA,OAHaK,EAAmBF,GAAa,CAAC,EAAG,CAC/C,cAAeP,GAAc,CAAC,CAChC,CAAC,CAEH,EAVQ,SAWV,CAAC,EAzBiC","names":["modify","useMutation","useQuery","createHeadlessForm","useCreateTermination","__name","client","useClient","useMutation","payload","postCreateOffboarding","useTerminationSchema","formValues","jsfModify","step","useQuery","schema","defaultSchema","data","jsfSchema","modify","createHeadlessForm"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/Termination/hooks.tsx","../src/common/api/payroll-calendars.ts","../src/common/employment.ts"],"sourcesContent":["import { $TSFixMe, createHeadlessForm } from '@remoteoss/json-schema-form';\nimport omitBy from 'lodash.omitby';\nimport isNull from 'lodash.isnull';\nimport { format, isFuture, parseISO, subDays } from 'date-fns';\nimport { useMemo } from 'react';\nimport {\n CreateOffboardingParams,\n TerminationDetailsParams,\n} from '@/src/client';\nimport { mutationToPromise } from '@/src/lib/mutations';\nimport { parseJSFToValidate } from '@/src/components/form/utils';\nimport {\n EmployeeCommunicationFormValues,\n PaidTimeOffFormValues,\n TerminationDetailsFormValues,\n TerminationFlowProps,\n TerminationFormValues,\n} from '@/src/flows/Termination/types';\nimport omit from 'lodash.omit';\nimport { parseFormRadioValues } from '@/src/flows/utils';\nimport { useStepState } from '@/src/flows/useStepState';\nimport {\n buildInitialValues,\n calculateMinTerminationDate,\n calculateProposedTerminationDateStatement,\n STEPS,\n} from '@/src/flows/Termination/utils';\nimport { jsonSchema } from '@/src/flows/Termination/json-schemas/jsonSchema';\nimport { terminationDetailsSchema } from '@/src/flows/Termination/json-schemas/terminationDetails';\nimport { useCreateTermination, useTerminationSchema } from '@/src/flows/api';\nimport { createInformationField } from '@/src/components/form/jsf-utils/createFields';\nimport { cn, ZendeskTriggerButton } from '@/src/internals';\nimport { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\nimport { PaidTimeOff } from '@/src/flows/Termination/components/PaidTimeOff/PaidTimeOff';\nimport { PaidTimeOffContainer } from '@/src/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer';\nimport { useEmploymentQuery } from '@/src/common/api';\nimport { AcknowledgeInformationContainer } from '@/src/flows/Termination/components/AcknowledgeInformation/AcknowledgeInfomationContainer';\nimport { AcknowledgeInformation } from '@/src/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformation';\nimport { AcknowledgeInformationFees } from '@/src/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees';\nimport { usePayrollCalendars } from '@/src/common/api/payroll-calendars';\nimport { isInProbationPeriod } from '@/src/common/employment';\n\ntype TerminationHookProps = Omit<TerminationFlowProps, 'render'>;\n\nexport const useTermination = ({\n employmentId,\n options,\n initialValues: terminationInitialValues,\n}: TerminationHookProps) => {\n const { fieldValues, setFieldValues, stepState, previousStep, nextStep } =\n useStepState<keyof typeof STEPS, TerminationFormValues>(STEPS);\n\n const { data: employment } = useEmploymentQuery({ employmentId });\n\n const { data: payrollCalendars } = usePayrollCalendars({\n query: {\n year: new Date().getFullYear().toString(),\n countryCode: employment?.country?.code,\n },\n options: {\n enabled: Boolean(employment?.country?.code),\n },\n });\n\n const isEmployeeInProbationPeriod = isInProbationPeriod(\n employment?.probation_period_end_date,\n );\n\n const minTerminationDate = calculateMinTerminationDate(payrollCalendars);\n const minDate = useMemo(\n () =>\n isEmployeeInProbationPeriod\n ? format(new Date(), 'yyyy-MM-dd')\n : format(minTerminationDate, 'yyyy-MM-dd'),\n [isEmployeeInProbationPeriod, minTerminationDate],\n );\n\n const hasFutureStartDate = Boolean(\n employment?.provisional_start_date &&\n isFuture(parseISO(employment.provisional_start_date)),\n );\n\n const initialValues = buildInitialValues(\n {\n ...stepState.values?.employee_communication,\n ...stepState.values?.termination_details,\n ...stepState.values?.paid_time_off,\n ...stepState.values?.additional_information,\n ...terminationInitialValues,\n },\n hasFutureStartDate,\n );\n\n const formValues = useMemo(\n () => ({\n ...stepState.values?.[stepState.currentStep.name as keyof typeof STEPS], // Restore values for the current step\n ...initialValues,\n ...fieldValues,\n }),\n [stepState.values, stepState.currentStep.name, fieldValues, initialValues],\n );\n\n const proposedTerminationDateStatement =\n calculateProposedTerminationDateStatement({\n minTerminationDate,\n isEmployeeInProbationPeriod,\n selectedDate: parseISO(formValues.proposed_termination_date),\n });\n\n const customFields = useMemo(() => {\n const originalTerminationReasonOptions =\n terminationDetailsSchema.data.schema.properties.termination_reason.oneOf;\n\n const terminationReasonOptions = hasFutureStartDate\n ? originalTerminationReasonOptions.filter(\n (option: $TSFixMe) =>\n option.const === 'cancellation_before_start_date',\n )\n : originalTerminationReasonOptions.filter(\n (option: $TSFixMe) =>\n option.const !== 'cancellation_before_start_date',\n );\n\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 termination_reason: {\n ...(options?.jsfModify?.fields?.termination_reason as $TSFixMe),\n oneOf: terminationReasonOptions,\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 external\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 proposed_termination_date: {\n ...(options?.jsfModify?.fields\n ?.proposed_termination_date as $TSFixMe),\n 'x-jsf-presentation': {\n ...(\n options?.jsfModify?.fields?.proposed_termination_date as $TSFixMe\n )?.['x-jsf-presentation'],\n minDate: minDate,\n ...(formValues.termination_reason ===\n 'cancellation_before_start_date' &&\n employment?.provisional_start_date\n ? {\n maxDate: format(\n subDays(parseISO(employment.provisional_start_date), 1),\n 'yyyy-MM-dd',\n ),\n }\n : {}),\n ...proposedTerminationDateStatement,\n },\n ...(formValues.termination_reason === 'cancellation_before_start_date'\n ? {\n 'x-jsf-errorMessage': {\n maximum:\n \"The proposed termination date must be before the employee's start date.\",\n },\n }\n : {}),\n },\n paid_time_off_info: {\n ...(options?.jsfModify?.fields?.paid_time_off_info as $TSFixMe),\n 'x-jsf-presentation': {\n ...(options?.jsfModify?.fields?.paid_time_off_info as $TSFixMe)?.[\n 'x-jsf-presentation'\n ],\n Component: () => {\n const CustomComponent = (\n options?.jsfModify?.fields?.paid_time_off_info as $TSFixMe\n )?.['x-jsf-presentation']?.Component;\n\n return (\n <PaidTimeOffContainer\n employeeName={employment?.basic_information?.name as string}\n proposedTerminationDate={formValues.proposed_termination_date}\n employmentId={employmentId}\n employment={employment}\n render={(props) => {\n if (CustomComponent) {\n return <CustomComponent {...props} />;\n }\n return <PaidTimeOff {...props} />;\n }}\n />\n );\n },\n },\n },\n acknowledge_termination_procedure_info: {\n ...(options?.jsfModify?.fields\n ?.acknowledge_termination_procedure_info as $TSFixMe),\n 'x-jsf-presentation': {\n ...(\n options?.jsfModify?.fields\n ?.acknowledge_termination_procedure_info as $TSFixMe\n )?.['x-jsf-presentation'],\n Component: () => {\n const CustomComponent = (\n options?.jsfModify?.fields\n ?.acknowledge_termination_procedure_info as $TSFixMe\n )?.['x-jsf-presentation']?.Component;\n\n return (\n <AcknowledgeInformationContainer\n render={(props) => {\n if (CustomComponent) {\n return <CustomComponent {...props} />;\n }\n return <AcknowledgeInformation {...props} />;\n }}\n />\n );\n },\n },\n },\n acknowledge_termination_procedure_fees_info: {\n ...(options?.jsfModify?.fields\n ?.acknowledge_termination_procedure_fees_info as $TSFixMe),\n 'x-jsf-presentation': {\n ...(\n options?.jsfModify?.fields\n ?.acknowledge_termination_procedure_fees_info as $TSFixMe\n )?.['x-jsf-presentation'],\n Component: () => {\n const zendeskIds = {\n involuntaryOffboardingServiceChargeZendeskId:\n zendeskArticles.involuntaryOffboardingServiceCharge,\n reconciliationInvoiceZendeskId:\n zendeskArticles.reconciliationInvoice,\n };\n\n const CustomComponent = (\n options?.jsfModify?.fields\n ?.acknowledge_termination_procedure_fees_info as $TSFixMe\n )?.['x-jsf-presentation']?.Component;\n\n if (CustomComponent) {\n return <CustomComponent {...zendeskIds} />;\n }\n\n return <AcknowledgeInformationFees {...zendeskIds} />;\n },\n },\n },\n },\n };\n }, [\n employment,\n employmentId,\n formValues.proposed_termination_date,\n formValues.termination_reason,\n hasFutureStartDate,\n minDate,\n options?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info,\n options?.jsfModify?.fields?.acknowledge_termination_procedure_info,\n options?.jsfModify?.fields?.paid_time_off_info,\n options?.jsfModify?.fields?.proposed_termination_date,\n options?.jsfModify?.fields?.proposed_termination_date_info,\n options?.jsfModify?.fields?.risk_assesment_info,\n options?.jsfModify?.fields?.termination_reason,\n proposedTerminationDateStatement,\n ]);\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 isDirty = Boolean(Object.keys(fieldValues).length > 0);\n\n return {\n /**\n * Employment id passed useful to be used between components\n */\n employmentId,\n /**\n * Employment data\n */\n employment,\n\n /**\n * Current form field values, we use formValues to let the user know about all the current form values\n */\n fieldValues: formValues,\n\n /**\n * Indicates if the form is dirty\n */\n isDirty,\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: setFieldValues,\n /**\n * Function to parse form values before submission\n * @param values - Form values to parse\n * @returns Parsed form values\n */\n parseFormValues: (\n values: TerminationFormValues,\n includeAllFields: boolean = false,\n ):\n | EmployeeCommunicationFormValues\n | TerminationDetailsFormValues\n | PaidTimeOffFormValues\n | TerminationFormValues => {\n if (includeAllFields) {\n return parseJSFToValidate(values, entireTerminationSchema.fields, {\n isPartialValidation: true,\n }) as TerminationFormValues;\n }\n\n if (terminationHeadlessForm) {\n return parseJSFToValidate(values, terminationHeadlessForm?.fields, {\n isPartialValidation: true,\n }) as\n | EmployeeCommunicationFormValues\n | TerminationDetailsFormValues\n | PaidTimeOffFormValues;\n }\n return {} as $TSFixMe;\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 { useQuery } from '@tanstack/react-query';\nimport { getIndexEorPayrollCalendar } from '@/src/client';\nimport { useClient } from '@/src/context';\nimport { Client } from '@hey-api/client-fetch';\n\nexport const usePayrollCalendars = ({\n query,\n options,\n}: {\n query?: {\n year?: string;\n countryCode?: string;\n };\n options?: {\n enabled?: boolean;\n };\n}) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['payroll-calendars'],\n queryFn: () =>\n getIndexEorPayrollCalendar({\n client: client as Client,\n query: {\n year: query?.year,\n country_code: query?.countryCode,\n },\n }),\n enabled: options?.enabled,\n select: (data) => data.data?.data?.payroll_calendars?.[0],\n });\n};\n","import { isFuture, isToday, parseISO } from 'date-fns';\n\nexport const isInProbationPeriod = (probationEndDate: string | undefined) => {\n if (!probationEndDate) return false;\n\n const parsedProbationEndDate = parseISO(probationEndDate);\n\n return isFuture(parsedProbationEndDate) || isToday(parsedProbationEndDate);\n};\n"],"mappings":"kyBAAA,OAAmB,sBAAAA,OAA0B,8BAC7C,OAAOC,OAAY,gBACnB,OAAOC,OAAY,gBACnB,OAAS,UAAAC,E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A6B,MACzB,CACE,mBAAoB,CAClB,KAAMF,EAAa,gCACnB,KAAMA,EAAa,sCACrB,CACF,EACA,OASAI,GAAoBC,EACxBL,EARqB,CACrB,uBACA,eACA,6BACA,4BACF,CAKA,EAEMM,GAAmBC,GACvBH,GACA,kCACA,wCACF,EAEMI,GAA+CC,GACnD,CACE,GAAGH,GACH,GAAGH,CACL,EACAO,EACF,EAQA,OAAOd,GAN6C,CAClD,cAAevD,EACf,oBAAqBmE,GACrB,KAAM,aACR,CAEqC,CACvC,CAGF,CA9DepE,EAAA0D,GAAA,YAgEf,SAASa,IAAO,CACdhE,EAAa,CACf,CAFSP,EAAAuE,GAAA,QAIT,SAASC,IAAO,CACdhE,EAAS,CACX,CAFSR,EAAAwE,GAAA,QAIT,IAAMC,GAAkB,OAAO,KAAKrE,CAAW,EAAE,OAAS,EAE1D,MAAO,CAIL,aAAAH,EAIA,WAAAU,EAKA,YAAagB,EAKb,QAAA8C,GAIA,UAAAnE,EAIA,OAAQ0C,GAAyB,QAAU,CAAC,EAI5C,UAAWC,GAIX,aAAcK,EAAkB,UAIhC,cAAe7B,EAMf,iBAAkBzB,EAAC2D,GAAkC,CACnD,GAAIX,EAAyB,CAC3B,IAAMY,EAAeC,EACnBF,EACAX,GAAyB,MAC3B,EACA,OAAOA,GAAyB,iBAAiBY,CAAY,CAC/D,CACA,OAAO,IACT,EATkB,oBAclB,kBAAmBvD,EAMnB,gBAAiBL,EAAA,CACf2D,EACAe,EAA4B,KAMxBA,EACKb,EAAmBF,EAAQR,EAAwB,OAAQ,CAChE,oBAAqB,EACvB,CAAC,EAGCH,EACKa,EAAmBF,EAAQX,GAAyB,OAAQ,CACjE,oBAAqB,EACvB,CAAC,EAKI,CAAC,EAtBO,mBA6BjB,SAAAU,GAMA,KAAAa,GAMA,KAAAC,EACF,CACF,EArc8B","names":["createHeadlessForm","omitBy","isNull","format","isFuture","parseISO","subDays","useMemo","omit","useQuery","usePayrollCalendars","__name","query","options","client","useClient","useQuery","getIndexEorPayrollCalendar","data","isFuture","isToday","parseISO","isInProbationPeriod","__name","probationEndDate","parsedProbationEndDate","parseISO","isFuture","isToday","Fragment","jsx","jsxs","useTermination","__name","employmentId","options","terminationInitialValues","fieldValues","setFieldValues","stepState","previousStep","nextStep","useStepState","STEPS","employment","useEmploymentQuery","payrollCalendars","usePayrollCalendars","isEmployeeInProbationPeriod","isInProbationPeriod","minTerminationDate","calculateMinTerminationDate","minDate","useMemo","format","hasFutureStartDate","isFuture","parseISO","initialValues","buildInitialValues","formValues","proposedTerminationDateStatement","calculateProposedTerminationDateStatement","customFields","originalTerminationReasonOptions","terminationDetailsSchema","terminationReasonOptions","option","createInformationField","ZendeskTriggerButton","zendeskArticles","cn","subDays","CustomComponent","PaidTimeOffContainer","props","PaidTimeOff","AcknowledgeInformationContainer","AcknowledgeInformation","zendeskIds","AcknowledgeInformationFees","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","isDirty","includeAllFields"]}
|