@remoteoss/remote-flows 0.4.0-alpha.2 → 0.4.0-alpha.21
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 +82 -8
- package/dist/chunk-32RYPLZK.js +2 -0
- package/dist/chunk-32RYPLZK.js.map +1 -0
- package/dist/chunk-3BIRQAED.js +2 -0
- package/dist/chunk-3BIRQAED.js.map +1 -0
- package/dist/chunk-3HPG2L62.js +2 -0
- package/dist/chunk-3HPG2L62.js.map +1 -0
- package/dist/chunk-3IE2B2UE.js +2 -0
- package/dist/chunk-3IE2B2UE.js.map +1 -0
- package/dist/chunk-3NZ6PO4D.js +2 -0
- package/dist/chunk-3NZ6PO4D.js.map +1 -0
- package/dist/chunk-3QGKRPQ6.js +2 -0
- package/dist/chunk-3QGKRPQ6.js.map +1 -0
- package/dist/chunk-3R33SVSF.js +2 -0
- package/dist/chunk-3R33SVSF.js.map +1 -0
- package/dist/{chunk-WRDKLT4N.js → chunk-3ZWDIEEM.js} +2 -2
- package/dist/{chunk-KQ6TGZJS.js → chunk-5SMMQQXP.js} +2 -2
- package/dist/chunk-5SMMQQXP.js.map +1 -0
- package/dist/chunk-63BYEK44.js +2 -0
- package/dist/chunk-63BYEK44.js.map +1 -0
- package/dist/chunk-6653VQAG.js +2 -0
- package/dist/chunk-6653VQAG.js.map +1 -0
- package/dist/chunk-7TOZZQQJ.js +2 -0
- package/dist/chunk-7TOZZQQJ.js.map +1 -0
- package/dist/chunk-7ZH23EMZ.js +2 -0
- package/dist/chunk-7ZH23EMZ.js.map +1 -0
- package/dist/chunk-AIEAUPO6.js +2 -0
- package/dist/chunk-AIEAUPO6.js.map +1 -0
- package/dist/chunk-ARYI3WUN.js +2 -0
- package/dist/chunk-ARYI3WUN.js.map +1 -0
- package/dist/chunk-BF7QENCN.js +2 -0
- package/dist/chunk-BF7QENCN.js.map +1 -0
- package/dist/chunk-CEIK7DGY.js +2 -0
- package/dist/chunk-CEIK7DGY.js.map +1 -0
- package/dist/{chunk-A4RX3KRZ.js → chunk-CFIJKJXD.js} +2 -2
- package/dist/chunk-CSU6IQX3.js +2 -0
- package/dist/chunk-CSU6IQX3.js.map +1 -0
- package/dist/chunk-CTTXXEWI.js +2 -0
- package/dist/chunk-CTTXXEWI.js.map +1 -0
- package/dist/chunk-DOLJU76M.js +2 -0
- package/dist/chunk-DOLJU76M.js.map +1 -0
- package/dist/chunk-EEAMZPP6.js +2 -0
- package/dist/{chunk-GMGKIQLI.js.map → chunk-EEAMZPP6.js.map} +1 -1
- package/dist/chunk-EPLIVM3Y.js +2 -0
- package/dist/chunk-EPLIVM3Y.js.map +1 -0
- package/dist/chunk-ETMTVNOU.js +2 -0
- package/dist/chunk-ETMTVNOU.js.map +1 -0
- package/dist/chunk-EV5YPN4F.js +2 -0
- package/dist/chunk-EV5YPN4F.js.map +1 -0
- package/dist/chunk-FB5J7SRP.js +2 -0
- package/dist/chunk-FB5J7SRP.js.map +1 -0
- package/dist/chunk-FCHRSRS6.js +2 -0
- package/dist/chunk-FCHRSRS6.js.map +1 -0
- package/dist/chunk-FUIQ7D6L.js +2 -0
- package/dist/chunk-FUIQ7D6L.js.map +1 -0
- package/dist/chunk-GEYFQVQI.js +2 -0
- package/dist/{chunk-56BNVYTD.js.map → chunk-GEYFQVQI.js.map} +1 -1
- package/dist/chunk-ISOKYXYN.js +2 -0
- package/dist/chunk-ISOKYXYN.js.map +1 -0
- package/dist/{chunk-D3SD6MMV.js → chunk-JXCJLQRA.js} +2 -2
- package/dist/chunk-JXCJLQRA.js.map +1 -0
- package/dist/chunk-KFVOK5X5.js +2 -0
- package/dist/chunk-KFVOK5X5.js.map +1 -0
- package/dist/chunk-KM4XVL2X.js +2 -0
- package/dist/chunk-KM4XVL2X.js.map +1 -0
- package/dist/{chunk-5ETXP2QF.js → chunk-KPHSEIR3.js} +2 -2
- package/dist/{chunk-OLJ2S6A6.js → chunk-KSHK3ZPX.js} +2 -2
- package/dist/chunk-KSHK3ZPX.js.map +1 -0
- package/dist/chunk-LFIQVLFK.js +2 -0
- package/dist/chunk-LFIQVLFK.js.map +1 -0
- package/dist/chunk-LLIGZSYY.js +2 -0
- package/dist/chunk-LLIGZSYY.js.map +1 -0
- package/dist/chunk-LPR2D3EY.js +2 -0
- package/dist/chunk-LPR2D3EY.js.map +1 -0
- package/dist/{chunk-QOMUXX6W.js → chunk-LX7QBDSF.js} +2 -2
- package/dist/chunk-LX7QBDSF.js.map +1 -0
- package/dist/{chunk-N25EBX6R.js → chunk-MH6KKP6K.js} +2 -2
- package/dist/{chunk-N25EBX6R.js.map → chunk-MH6KKP6K.js.map} +1 -1
- package/dist/chunk-MNFM2TNK.js +2 -0
- package/dist/chunk-MNFM2TNK.js.map +1 -0
- package/dist/chunk-MNO47WC2.js +2 -0
- package/dist/chunk-MNO47WC2.js.map +1 -0
- package/dist/chunk-MO7KC4HE.js +2 -0
- package/dist/chunk-MO7KC4HE.js.map +1 -0
- package/dist/{chunk-DZYFSFZ7.js → chunk-MRYRNB7Y.js} +2 -2
- package/dist/chunk-MSBG52WO.js +2 -0
- package/dist/chunk-MSBG52WO.js.map +1 -0
- package/dist/chunk-N6NYXAXH.js +2 -0
- package/dist/chunk-N6NYXAXH.js.map +1 -0
- package/dist/chunk-O53436KO.js +2 -0
- package/dist/chunk-O53436KO.js.map +1 -0
- package/dist/chunk-P37U34EQ.js +2 -0
- package/dist/chunk-PGWKJ6FK.js +2 -0
- package/dist/chunk-PGWKJ6FK.js.map +1 -0
- package/dist/chunk-PJBAQZ6G.js +2 -0
- package/dist/chunk-PJBAQZ6G.js.map +1 -0
- package/dist/chunk-PJCUSCO4.js +2 -0
- package/dist/{chunk-MESREYTZ.js.map → chunk-PJCUSCO4.js.map} +1 -1
- package/dist/chunk-PWUYHFON.js +2 -0
- package/dist/chunk-PWUYHFON.js.map +1 -0
- package/dist/chunk-Q23DM4O3.js +2 -0
- package/dist/chunk-Q23DM4O3.js.map +1 -0
- package/dist/chunk-QW4JPW6J.js +2 -0
- package/dist/chunk-QW4JPW6J.js.map +1 -0
- package/dist/chunk-RXK4RLF6.js +2 -0
- package/dist/chunk-RXK4RLF6.js.map +1 -0
- package/dist/{chunk-FZ2HS6G7.js → chunk-S4XU4SE7.js} +1 -1
- package/dist/chunk-S4XU4SE7.js.map +1 -0
- package/dist/chunk-SIC7BRJ2.js +2 -0
- package/dist/chunk-SIC7BRJ2.js.map +1 -0
- package/dist/chunk-TNF6DNGM.js +2 -0
- package/dist/chunk-TNF6DNGM.js.map +1 -0
- package/dist/{chunk-6HGUGIYJ.js → chunk-TVZAFTPT.js} +2 -2
- package/dist/chunk-VNSF5IOL.js +2 -0
- package/dist/chunk-VNSF5IOL.js.map +1 -0
- package/dist/{chunk-UIAP5KT2.js → chunk-WASEFJAE.js} +2 -2
- package/dist/chunk-WASEFJAE.js.map +1 -0
- package/dist/chunk-WIRFNWEU.js +2 -0
- package/dist/chunk-WIRFNWEU.js.map +1 -0
- package/dist/chunk-WKK63LAY.js +2 -0
- package/dist/chunk-WKK63LAY.js.map +1 -0
- package/dist/chunk-WVJDCDGZ.js +2 -0
- package/dist/chunk-WVJDCDGZ.js.map +1 -0
- package/dist/chunk-XIPPSRO6.js +2 -0
- package/dist/chunk-XIPPSRO6.js.map +1 -0
- package/dist/chunk-XKSOWDLS.js +2 -0
- package/dist/chunk-XKSOWDLS.js.map +1 -0
- package/dist/chunk-XMDNHTKE.js +2 -0
- package/dist/chunk-XMDNHTKE.js.map +1 -0
- package/dist/chunk-XO3JWN33.js +2 -0
- package/dist/{chunk-GFBF55NR.js.map → chunk-XO3JWN33.js.map} +1 -1
- package/dist/chunk-YJXRJTOH.js +1 -0
- package/dist/chunk-YNQVZYFG.js +2 -0
- package/dist/chunk-YNQVZYFG.js.map +1 -0
- package/dist/chunk-YO4OQIFP.js +2 -0
- package/dist/{chunk-3FVI5JIC.js.map → chunk-YO4OQIFP.js.map} +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentBack.d.ts +3 -2
- package/dist/flows/ContractAmendment/ContractAmendmentBack.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +3 -3
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +6 -6
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +3 -3
- package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentSubmit.d.ts +3 -2
- package/dist/flows/ContractAmendment/ContractAmendmentSubmit.js +1 -1
- package/dist/flows/ContractAmendment/context.d.ts +6 -7
- package/dist/flows/ContractAmendment/context.js +1 -1
- package/dist/flows/ContractAmendment/hooks.d.ts +5 -6
- package/dist/flows/ContractAmendment/hooks.js +1 -1
- package/dist/flows/ContractAmendment/index.d.ts +4 -4
- package/dist/flows/ContractAmendment/index.js +1 -1
- package/dist/flows/ContractAmendment/types.d.ts +0 -2
- package/dist/flows/ContractAmendment/utils.d.ts +2 -2
- package/dist/flows/ContractAmendment/utils.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorDisclaimer.d.ts +2 -2
- package/dist/flows/CostCalculator/CostCalculatorDisclaimer.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +7 -7
- package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +9 -6
- package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorResetButton.d.ts +3 -2
- package/dist/flows/CostCalculator/CostCalculatorResetButton.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorSubmitButton.d.ts +3 -2
- package/dist/flows/CostCalculator/CostCalculatorSubmitButton.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorBenefitsBreakdown.d.ts +2 -2
- package/dist/flows/CostCalculator/Results/CostCalculatorBenefitsBreakdown.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorContributionsBreakdown.d.ts +2 -2
- package/dist/flows/CostCalculator/Results/CostCalculatorContributionsBreakdown.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorGrossSalary.d.ts +2 -2
- package/dist/flows/CostCalculator/Results/CostCalculatorGrossSalary.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorResults.d.ts +3 -3
- package/dist/flows/CostCalculator/Results/CostCalculatorResults.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorResultsChart.d.ts +2 -2
- package/dist/flows/CostCalculator/Results/CostCalculatorResultsChart.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorResultsChart.js.map +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorTotalCost.d.ts +2 -2
- package/dist/flows/CostCalculator/Results/CostCalculatorTotalCost.js +1 -1
- package/dist/flows/CostCalculator/api.d.ts +70 -0
- package/dist/flows/CostCalculator/api.js +2 -0
- package/dist/flows/CostCalculator/components/SalaryField.d.ts +20 -0
- package/dist/flows/CostCalculator/components/SalaryField.js +2 -0
- package/dist/flows/CostCalculator/context.d.ts +9 -7
- package/dist/flows/CostCalculator/context.js +1 -1
- package/dist/flows/CostCalculator/disclaimerUtils.js +1 -1
- package/dist/flows/CostCalculator/hooks.d.ts +6 -21
- package/dist/flows/CostCalculator/hooks.js +1 -1
- package/dist/flows/CostCalculator/index.d.ts +8 -3
- package/dist/flows/CostCalculator/index.js +1 -1
- package/dist/flows/CostCalculator/jsonSchema.js +1 -1
- package/dist/flows/CostCalculator/types.d.ts +16 -4
- package/dist/flows/CostCalculator/utils.d.ts +7 -4
- package/dist/flows/CostCalculator/utils.js +1 -1
- package/dist/flows/Onboarding/OnboardingFlow.d.ts +27 -14
- package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
- package/dist/flows/Onboarding/api.d.ts +126 -0
- package/dist/flows/Onboarding/api.js +2 -0
- package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +18 -0
- package/dist/flows/Onboarding/components/AnnualGrossSalary.js +2 -0
- package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +19 -0
- package/dist/flows/Onboarding/components/BasicInformationStep.js +2 -0
- package/dist/flows/Onboarding/{BenefitsStep.d.ts → components/BenefitsStep.d.ts} +14 -8
- package/dist/flows/Onboarding/components/BenefitsStep.js +2 -0
- package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +19 -0
- package/dist/flows/Onboarding/components/ContractDetailsStep.js +2 -0
- package/dist/flows/Onboarding/components/OnboardingBack.d.ts +7 -0
- package/dist/flows/Onboarding/components/OnboardingBack.js +2 -0
- package/dist/flows/Onboarding/components/OnboardingBack.js.map +1 -0
- package/dist/flows/Onboarding/{OnboardingForm.d.ts → components/OnboardingForm.d.ts} +8 -7
- package/dist/flows/Onboarding/components/OnboardingForm.js +2 -0
- package/dist/flows/Onboarding/components/OnboardingForm.js.map +1 -0
- package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +23 -0
- package/dist/flows/Onboarding/components/OnboardingInvite.js +2 -0
- package/dist/flows/Onboarding/components/OnboardingInvite.js.map +1 -0
- package/dist/flows/Onboarding/components/OnboardingSubmit.d.ts +6 -0
- package/dist/flows/Onboarding/components/OnboardingSubmit.js +2 -0
- package/dist/flows/Onboarding/components/OnboardingSubmit.js.map +1 -0
- package/dist/flows/Onboarding/components/ReviewStep.d.ts +37 -0
- package/dist/flows/Onboarding/components/ReviewStep.js +2 -0
- package/dist/flows/Onboarding/components/ReviewStep.js.map +1 -0
- package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +15 -0
- package/dist/flows/Onboarding/components/SaveDraftButton.js +2 -0
- package/dist/flows/Onboarding/components/SaveDraftButton.js.map +1 -0
- package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +19 -0
- package/dist/flows/Onboarding/components/SelectCountryStep.js +2 -0
- package/dist/flows/Onboarding/components/SelectCountryStep.js.map +1 -0
- package/dist/flows/Onboarding/context.d.ts +52 -12
- package/dist/flows/Onboarding/context.js +1 -1
- package/dist/flows/Onboarding/hooks.d.ts +70 -29
- package/dist/flows/Onboarding/hooks.js +1 -1
- package/dist/flows/Onboarding/index.d.ts +17 -12
- package/dist/flows/Onboarding/index.js +1 -1
- package/dist/flows/Onboarding/json-schemas/selectCountryStep.d.ts +24 -0
- package/dist/flows/Onboarding/json-schemas/selectCountryStep.js +2 -0
- package/dist/flows/Onboarding/json-schemas/selectCountryStep.js.map +1 -0
- package/dist/flows/Onboarding/types.d.ts +53 -6
- package/dist/flows/Onboarding/utils.d.ts +22 -3
- package/dist/flows/Onboarding/utils.js +1 -1
- package/dist/flows/Termination/AdditionalDetailsForm.d.ts +3 -3
- package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
- package/dist/flows/Termination/EmployeeComunicationForm.d.ts +3 -3
- package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
- package/dist/flows/Termination/PaidTimeOffForm.d.ts +3 -3
- package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
- package/dist/flows/Termination/TerminationBack.d.ts +3 -2
- package/dist/flows/Termination/TerminationBack.js +1 -1
- package/dist/flows/Termination/TerminationDetailsForm.d.ts +3 -3
- package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
- package/dist/flows/Termination/TerminationFlow.d.ts +8 -6
- package/dist/flows/Termination/TerminationFlow.js +1 -1
- package/dist/flows/Termination/TerminationForm.d.ts +3 -3
- package/dist/flows/Termination/TerminationForm.js +1 -1
- package/dist/flows/Termination/TerminationSubmit.d.ts +3 -2
- package/dist/flows/Termination/TerminationSubmit.js +1 -1
- package/dist/flows/Termination/TimeOff.d.ts +4 -4
- package/dist/flows/Termination/TimeOff.js +1 -1
- package/dist/flows/Termination/context.d.ts +7 -6
- package/dist/flows/Termination/context.js +1 -1
- package/dist/flows/Termination/hooks.d.ts +5 -4
- package/dist/flows/Termination/hooks.js +1 -1
- package/dist/flows/Termination/index.d.ts +5 -3
- package/dist/flows/Termination/index.js +1 -1
- package/dist/flows/Termination/json-schemas/additionalInformation.js +1 -1
- package/dist/flows/Termination/json-schemas/defaultSchema.js +1 -1
- package/dist/flows/Termination/json-schemas/employeeComunication.js +1 -1
- package/dist/flows/Termination/json-schemas/jsonSchema.js +1 -1
- package/dist/flows/Termination/json-schemas/paidTimeOff.js +1 -1
- package/dist/flows/Termination/json-schemas/schema.js +1 -1
- package/dist/flows/Termination/json-schemas/terminationDetails.js +1 -1
- package/dist/flows/Termination/types.d.ts +1 -1
- package/dist/flows/Termination/utils.d.ts +1 -1
- package/dist/flows/Termination/utils.js +1 -1
- package/dist/flows/types.d.ts +3 -4
- package/dist/flows/useStepState.d.ts +19 -6
- package/dist/flows/useStepState.js +1 -1
- package/dist/flows/utils.d.ts +3 -11
- package/dist/flows/utils.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +26 -17
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mutations-B6HWH-rZ.d.ts +22 -0
- package/dist/remoteFlows-DFkKjnDe.d.ts +149 -0
- package/dist/types-CxSFjQw5.d.ts +3 -0
- package/dist/{types.gen-D5alruJJ.d.ts → types.gen-DL1ycXOS.d.ts} +335 -2
- package/package.json +18 -3
- package/dist/chunk-2PXGLWCY.js +0 -2
- package/dist/chunk-2PXGLWCY.js.map +0 -1
- package/dist/chunk-2YWRQJ7P.js +0 -2
- package/dist/chunk-2YWRQJ7P.js.map +0 -1
- package/dist/chunk-36UPHOJS.js +0 -2
- package/dist/chunk-36UPHOJS.js.map +0 -1
- package/dist/chunk-3FVI5JIC.js +0 -2
- package/dist/chunk-56BNVYTD.js +0 -2
- package/dist/chunk-5CJPGBXJ.js +0 -2
- package/dist/chunk-5CJPGBXJ.js.map +0 -1
- package/dist/chunk-5OXN2O6C.js +0 -2
- package/dist/chunk-5OXN2O6C.js.map +0 -1
- package/dist/chunk-6A3F6JG6.js +0 -2
- package/dist/chunk-6A3F6JG6.js.map +0 -1
- package/dist/chunk-7CYG2RHP.js +0 -2
- package/dist/chunk-7CYG2RHP.js.map +0 -1
- package/dist/chunk-7OMSCFTM.js +0 -2
- package/dist/chunk-7OMSCFTM.js.map +0 -1
- package/dist/chunk-AYDF3IFZ.js +0 -2
- package/dist/chunk-BLPOQIGB.js +0 -2
- package/dist/chunk-BLPOQIGB.js.map +0 -1
- package/dist/chunk-CRHTUOZT.js +0 -2
- package/dist/chunk-CRHTUOZT.js.map +0 -1
- package/dist/chunk-D3SD6MMV.js.map +0 -1
- package/dist/chunk-DGPRFQYK.js +0 -2
- package/dist/chunk-DGPRFQYK.js.map +0 -1
- package/dist/chunk-DHRIURRT.js +0 -2
- package/dist/chunk-DHRIURRT.js.map +0 -1
- package/dist/chunk-EAAIAMTY.js +0 -2
- package/dist/chunk-EAAIAMTY.js.map +0 -1
- package/dist/chunk-EDNELJVE.js +0 -2
- package/dist/chunk-EDNELJVE.js.map +0 -1
- package/dist/chunk-FGBEOUQK.js +0 -1
- package/dist/chunk-FMT2OTOL.js +0 -2
- package/dist/chunk-FMT2OTOL.js.map +0 -1
- package/dist/chunk-FZ2HS6G7.js.map +0 -1
- package/dist/chunk-GFBF55NR.js +0 -2
- package/dist/chunk-GMGKIQLI.js +0 -2
- package/dist/chunk-GQD6NNYO.js +0 -2
- package/dist/chunk-GQD6NNYO.js.map +0 -1
- package/dist/chunk-GR6EY46K.js +0 -2
- package/dist/chunk-GR6EY46K.js.map +0 -1
- package/dist/chunk-HDQGO453.js +0 -2
- package/dist/chunk-HDQGO453.js.map +0 -1
- package/dist/chunk-I6NVZI7W.js +0 -2
- package/dist/chunk-I6NVZI7W.js.map +0 -1
- package/dist/chunk-IDSJI7KQ.js +0 -2
- package/dist/chunk-IDSJI7KQ.js.map +0 -1
- package/dist/chunk-J55S4SEH.js +0 -2
- package/dist/chunk-J55S4SEH.js.map +0 -1
- package/dist/chunk-JFOOILST.js +0 -2
- package/dist/chunk-JFOOILST.js.map +0 -1
- package/dist/chunk-JRQSZHUU.js +0 -2
- package/dist/chunk-JRQSZHUU.js.map +0 -1
- package/dist/chunk-KH6QS5OU.js +0 -2
- package/dist/chunk-KH6QS5OU.js.map +0 -1
- package/dist/chunk-KQ6TGZJS.js.map +0 -1
- package/dist/chunk-KSGPQCSG.js +0 -2
- package/dist/chunk-KSGPQCSG.js.map +0 -1
- package/dist/chunk-LCZQVL4U.js +0 -2
- package/dist/chunk-LCZQVL4U.js.map +0 -1
- package/dist/chunk-LM5GAAUB.js +0 -2
- package/dist/chunk-LM5GAAUB.js.map +0 -1
- package/dist/chunk-LMDX5IAX.js +0 -2
- package/dist/chunk-LMDX5IAX.js.map +0 -1
- package/dist/chunk-M7WCW7WD.js +0 -2
- package/dist/chunk-M7WCW7WD.js.map +0 -1
- package/dist/chunk-MESREYTZ.js +0 -2
- package/dist/chunk-MHKNAQLP.js +0 -2
- package/dist/chunk-MHKNAQLP.js.map +0 -1
- package/dist/chunk-OLJ2S6A6.js.map +0 -1
- package/dist/chunk-P2COURSU.js +0 -2
- package/dist/chunk-P2COURSU.js.map +0 -1
- package/dist/chunk-PKX5K2UY.js +0 -2
- package/dist/chunk-PKX5K2UY.js.map +0 -1
- package/dist/chunk-QOMUXX6W.js.map +0 -1
- package/dist/chunk-S4FKLPBB.js +0 -2
- package/dist/chunk-S4FKLPBB.js.map +0 -1
- package/dist/chunk-S56EWAS4.js +0 -2
- package/dist/chunk-S56EWAS4.js.map +0 -1
- package/dist/chunk-SMHHCUP4.js +0 -2
- package/dist/chunk-SMHHCUP4.js.map +0 -1
- package/dist/chunk-TPPGI73P.js +0 -2
- package/dist/chunk-TPPGI73P.js.map +0 -1
- package/dist/chunk-U25ZZ3LM.js +0 -2
- package/dist/chunk-U25ZZ3LM.js.map +0 -1
- package/dist/chunk-UIAP5KT2.js.map +0 -1
- package/dist/chunk-WQHKB5T7.js +0 -2
- package/dist/chunk-WQHKB5T7.js.map +0 -1
- package/dist/chunk-WS3C3WIJ.js +0 -2
- package/dist/chunk-WS3C3WIJ.js.map +0 -1
- package/dist/chunk-XLFHHYVS.js +0 -2
- package/dist/chunk-XLFHHYVS.js.map +0 -1
- package/dist/chunk-Y477IGTZ.js +0 -2
- package/dist/chunk-Y477IGTZ.js.map +0 -1
- package/dist/chunk-YOC3VDC7.js +0 -2
- package/dist/chunk-YOC3VDC7.js.map +0 -1
- package/dist/flows/Onboarding/BasicInformationStep.d.ts +0 -15
- package/dist/flows/Onboarding/BasicInformationStep.js +0 -2
- package/dist/flows/Onboarding/BenefitsStep.js +0 -2
- package/dist/flows/Onboarding/ContractDetailsStep.d.ts +0 -15
- package/dist/flows/Onboarding/ContractDetailsStep.js +0 -2
- package/dist/flows/Onboarding/OnboardingBack.d.ts +0 -5
- package/dist/flows/Onboarding/OnboardingBack.js +0 -2
- package/dist/flows/Onboarding/OnboardingForm.js +0 -2
- package/dist/flows/Onboarding/OnboardingInvite.d.ts +0 -11
- package/dist/flows/Onboarding/OnboardingInvite.js +0 -2
- package/dist/flows/Onboarding/OnboardingSubmit.d.ts +0 -5
- package/dist/flows/Onboarding/OnboardingSubmit.js +0 -2
- package/dist/mutations-v9H353tz.d.ts +0 -10
- package/dist/remoteFlows-CswYencu.d.ts +0 -116
- /package/dist/{chunk-WRDKLT4N.js.map → chunk-3ZWDIEEM.js.map} +0 -0
- /package/dist/{chunk-A4RX3KRZ.js.map → chunk-CFIJKJXD.js.map} +0 -0
- /package/dist/{chunk-5ETXP2QF.js.map → chunk-KPHSEIR3.js.map} +0 -0
- /package/dist/{chunk-DZYFSFZ7.js.map → chunk-MRYRNB7Y.js.map} +0 -0
- /package/dist/{chunk-AYDF3IFZ.js.map → chunk-P37U34EQ.js.map} +0 -0
- /package/dist/{chunk-6HGUGIYJ.js.map → chunk-TVZAFTPT.js.map} +0 -0
- /package/dist/{chunk-FGBEOUQK.js.map → chunk-YJXRJTOH.js.map} +0 -0
- /package/dist/flows/{Onboarding/BasicInformationStep.js.map → CostCalculator/api.js.map} +0 -0
- /package/dist/flows/{Onboarding/BenefitsStep.js.map → CostCalculator/components/SalaryField.js.map} +0 -0
- /package/dist/flows/Onboarding/{ContractDetailsStep.js.map → api.js.map} +0 -0
- /package/dist/flows/Onboarding/{OnboardingBack.js.map → components/AnnualGrossSalary.js.map} +0 -0
- /package/dist/flows/Onboarding/{OnboardingForm.js.map → components/BasicInformationStep.js.map} +0 -0
- /package/dist/flows/Onboarding/{OnboardingInvite.js.map → components/BenefitsStep.js.map} +0 -0
- /package/dist/flows/Onboarding/{OnboardingSubmit.js.map → components/ContractDetailsStep.js.map} +0 -0
|
@@ -30,6 +30,33 @@ type TerminationOffboarding = {
|
|
|
30
30
|
will_challenge_termination: boolean;
|
|
31
31
|
will_challenge_termination_description?: string;
|
|
32
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* Upsert benefit offers request. As its properties may vary depending on the employment,
|
|
35
|
+
* you must query the [Show benefit offers schema](#tag/benefits/operation/get_show_benefit_offer) endpoint
|
|
36
|
+
* passing the employment id
|
|
37
|
+
*/
|
|
38
|
+
type UnifiedEmploymentUpsertBenefitOffersRequest = {
|
|
39
|
+
[key: string]: unknown;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* The response from the currency converter
|
|
43
|
+
*/
|
|
44
|
+
type ConvertCurrency = {
|
|
45
|
+
/**
|
|
46
|
+
* The exchange rate used to convert the amount
|
|
47
|
+
*/
|
|
48
|
+
exchange_rate: number;
|
|
49
|
+
/**
|
|
50
|
+
* The amount in cents in the source currency
|
|
51
|
+
*/
|
|
52
|
+
source_amount: number;
|
|
53
|
+
source_currency: CurrencyDefinition;
|
|
54
|
+
/**
|
|
55
|
+
* The amount in cents in the target currency
|
|
56
|
+
*/
|
|
57
|
+
target_amount: number;
|
|
58
|
+
target_currency: CurrencyDefinition;
|
|
59
|
+
};
|
|
33
60
|
type MinimalCountry = {
|
|
34
61
|
alpha_2_code: string;
|
|
35
62
|
code: string;
|
|
@@ -297,6 +324,113 @@ type ShortId = string;
|
|
|
297
324
|
*
|
|
298
325
|
*/
|
|
299
326
|
type NullableApproverId = string | null;
|
|
327
|
+
/**
|
|
328
|
+
* Description of the basic required and onboarding tasks params to create an employment.
|
|
329
|
+
* You do not need to include all onboarding tasks when creating or updating an employment.
|
|
330
|
+
*
|
|
331
|
+
*/
|
|
332
|
+
type EmploymentFullParams = {
|
|
333
|
+
/**
|
|
334
|
+
* Home address information. As its properties may vary depending on the country,
|
|
335
|
+
* you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint
|
|
336
|
+
* passing the country code and `address_details` as path parameters.
|
|
337
|
+
*/
|
|
338
|
+
address_details?: {
|
|
339
|
+
[key: string]: unknown;
|
|
340
|
+
};
|
|
341
|
+
/**
|
|
342
|
+
* Administrative information. As its properties may vary depending on the country,
|
|
343
|
+
* you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint
|
|
344
|
+
* passing the country code and `administrative_details` as path parameters.
|
|
345
|
+
*/
|
|
346
|
+
administrative_details?: {
|
|
347
|
+
[key: string]: unknown;
|
|
348
|
+
};
|
|
349
|
+
/**
|
|
350
|
+
* Bank account information. As its properties may vary depending on the country,
|
|
351
|
+
* you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint
|
|
352
|
+
* passing the country code and `bank_account_details` as path parameters.
|
|
353
|
+
*/
|
|
354
|
+
bank_account_details?: {
|
|
355
|
+
[key: string]: unknown;
|
|
356
|
+
};
|
|
357
|
+
/**
|
|
358
|
+
* Employment basic information. As its properties may vary depending on the country,
|
|
359
|
+
* you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint
|
|
360
|
+
* passing the country code and `employment_basic_information` as path parameters.
|
|
361
|
+
*/
|
|
362
|
+
basic_information?: {
|
|
363
|
+
[key: string]: unknown;
|
|
364
|
+
};
|
|
365
|
+
/**
|
|
366
|
+
* Billing address information. As its properties may vary depending on the country,
|
|
367
|
+
* you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint
|
|
368
|
+
* passing the country code and `billing_address_details` as path parameters.
|
|
369
|
+
*/
|
|
370
|
+
billing_address_details?: {
|
|
371
|
+
[key: string]: unknown;
|
|
372
|
+
};
|
|
373
|
+
company_id?: string;
|
|
374
|
+
/**
|
|
375
|
+
* Contract information. As its properties may vary depending on the country,
|
|
376
|
+
* you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint
|
|
377
|
+
* passing the country code and `contract_details` as path parameters.
|
|
378
|
+
*/
|
|
379
|
+
contract_details?: {
|
|
380
|
+
[key: string]: unknown;
|
|
381
|
+
};
|
|
382
|
+
country?: Country;
|
|
383
|
+
country_code?: string;
|
|
384
|
+
/**
|
|
385
|
+
* The department of the employment. The department must belong to the same company as the employment.
|
|
386
|
+
* When set to `null`, the employment will be unassigned from a department.
|
|
387
|
+
*
|
|
388
|
+
*/
|
|
389
|
+
department_id?: string | null;
|
|
390
|
+
/**
|
|
391
|
+
* Emergency contact information. As its properties may vary depending on the country,
|
|
392
|
+
* you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint
|
|
393
|
+
* passing the country code and `emergency_contact_details` as path parameters.
|
|
394
|
+
*/
|
|
395
|
+
emergency_contact_details?: {
|
|
396
|
+
[key: string]: unknown;
|
|
397
|
+
};
|
|
398
|
+
/**
|
|
399
|
+
* A unique reference code for the employment record in a non-Remote system. This optional field links to external data sources. If not provided, it defaults to `null`. While uniqueness is recommended, it is not strictly enforced within Remote's system.
|
|
400
|
+
*/
|
|
401
|
+
external_id?: string;
|
|
402
|
+
/**
|
|
403
|
+
* The user id of the manager, who should have an `admin`, `owner` or `people_manager` role.
|
|
404
|
+
* You can find these users by querying the [Company Managers endpoint](#operation/get_index_company_manager).
|
|
405
|
+
* **Update of this field is only available for active employments.**
|
|
406
|
+
*
|
|
407
|
+
*/
|
|
408
|
+
manager_id?: string;
|
|
409
|
+
/**
|
|
410
|
+
* Personal details information. As its properties may vary depending on the country,
|
|
411
|
+
* you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint
|
|
412
|
+
* passing the country code and `personal_details` as path parameters.
|
|
413
|
+
*/
|
|
414
|
+
personal_details?: {
|
|
415
|
+
[key: string]: unknown;
|
|
416
|
+
};
|
|
417
|
+
/**
|
|
418
|
+
* Pricing plan details information. As its properties may vary depending on the country,
|
|
419
|
+
* you must query the [Show form schema](#tag/Countries/operation/get_show_form_country) endpoint
|
|
420
|
+
* passing the country code and `pricing_plan_details` as path parameters.
|
|
421
|
+
*/
|
|
422
|
+
pricing_plan_details?: {
|
|
423
|
+
[key: string]: unknown;
|
|
424
|
+
};
|
|
425
|
+
/**
|
|
426
|
+
* If not provided, it will default to `employee`.
|
|
427
|
+
*/
|
|
428
|
+
type?: 'employee' | 'contractor';
|
|
429
|
+
/**
|
|
430
|
+
* The work email of the employment.
|
|
431
|
+
*/
|
|
432
|
+
work_email?: string;
|
|
433
|
+
};
|
|
300
434
|
type OffboardingFile = {
|
|
301
435
|
/**
|
|
302
436
|
* The content in base64 encoding
|
|
@@ -419,6 +553,23 @@ type RequestDetails = {
|
|
|
419
553
|
reason_for_change_description?: string | null;
|
|
420
554
|
salary_decrease_details?: SalaryDecreaseDetails;
|
|
421
555
|
};
|
|
556
|
+
/**
|
|
557
|
+
* The parameters for the currency conversion
|
|
558
|
+
*/
|
|
559
|
+
type ConvertCurrencyParams = {
|
|
560
|
+
/**
|
|
561
|
+
* The amount to convert in cents
|
|
562
|
+
*/
|
|
563
|
+
amount: number;
|
|
564
|
+
/**
|
|
565
|
+
* The currency code to convert from
|
|
566
|
+
*/
|
|
567
|
+
source_currency: string;
|
|
568
|
+
/**
|
|
569
|
+
* The currency code to convert to
|
|
570
|
+
*/
|
|
571
|
+
target_currency: string;
|
|
572
|
+
};
|
|
422
573
|
/**
|
|
423
574
|
* Indicates the expected start date of the employee or contractor.
|
|
424
575
|
*
|
|
@@ -485,6 +636,11 @@ type ListTimeoffResponse = {
|
|
|
485
636
|
total_pages?: number;
|
|
486
637
|
};
|
|
487
638
|
};
|
|
639
|
+
type MagicLinkResponse = {
|
|
640
|
+
data: {
|
|
641
|
+
url: string;
|
|
642
|
+
};
|
|
643
|
+
};
|
|
488
644
|
/**
|
|
489
645
|
* The stage of employment lifecycle. When it's `onboarded` means the employee is ready to commence or has already commenced.
|
|
490
646
|
*/
|
|
@@ -540,17 +696,156 @@ type SuccessResponse = {
|
|
|
540
696
|
status?: string;
|
|
541
697
|
};
|
|
542
698
|
};
|
|
699
|
+
/**
|
|
700
|
+
* Magic link params
|
|
701
|
+
*/
|
|
702
|
+
type MagicLinkParams = {
|
|
703
|
+
/**
|
|
704
|
+
* The path to which the user will be redirected to after login. This field has a max length of 2000 characters.
|
|
705
|
+
*
|
|
706
|
+
* If not specified, `/dashboard` will be used by default.
|
|
707
|
+
*
|
|
708
|
+
* Must begin with a forward slash (`/`) and, at least one path segment is required (`/dashboard` e.g.).
|
|
709
|
+
* An ending forward slash (`/`) is not allowed and path segments can only include alphanumeric characters, underscore (`_`) and hyphen (`-`).
|
|
710
|
+
*
|
|
711
|
+
* An optional query string can be specified too. If present, the query string must start with a question mark (`?`)
|
|
712
|
+
* and must include at least one key value pair. Both, keys and values, can only include
|
|
713
|
+
* alphanumeric characters, underscore (`_`), hyphen (`-`) or percent encoded values such as `%20` (space character).
|
|
714
|
+
* Additional key value pairs are allowed using ampersand (`&`).
|
|
715
|
+
*
|
|
716
|
+
* Query keys require at least one alphanumeric, underscore (`_`), hyphen (`-`) or valid percent encoded.
|
|
717
|
+
* Query values are optional, the actual value may be empty and the equals sign (`=`) may be missing too.
|
|
718
|
+
*
|
|
719
|
+
* Some **Valid** examples for `path`:
|
|
720
|
+
* - o `/dashboard`
|
|
721
|
+
* - o `/dashboard/people/new/full_time/663e0b79-c893-45ff-a1b2-f6dcabc098b5`
|
|
722
|
+
* - o `/dashboard/people/hiring?filters%5B0%5D%5Bid%5D=exclude_linked_drafts&filters%5B0%5D%5Bvalue%5D=true`
|
|
723
|
+
* - o `/dashboard?key=value&foo=bar`
|
|
724
|
+
*
|
|
725
|
+
* Some **Invalid** examples for `path`:
|
|
726
|
+
* - x `missing_forward_slash`
|
|
727
|
+
* - x `/invalid//path`
|
|
728
|
+
* - x `//some`
|
|
729
|
+
* - x `/?key=value`
|
|
730
|
+
* - x `/some/i.n:valid*`
|
|
731
|
+
* - x `/invalid/end/slash/`
|
|
732
|
+
* - x `/some?malformed_percent_encoded_key%1=value`
|
|
733
|
+
*
|
|
734
|
+
*/
|
|
735
|
+
path?: string;
|
|
736
|
+
user_id: UuidSlug;
|
|
737
|
+
} | {
|
|
738
|
+
employment_id: UuidSlug;
|
|
739
|
+
/**
|
|
740
|
+
* The path to which the user will be redirected to after login. This field has a max length of 2000 characters.
|
|
741
|
+
*
|
|
742
|
+
* If not specified, `/dashboard` will be used by default.
|
|
743
|
+
*
|
|
744
|
+
* Must begin with a forward slash (`/`) and, at least one path segment is required (`/dashboard` e.g.).
|
|
745
|
+
* An ending forward slash (`/`) is not allowed and path segments can only include alphanumeric characters, underscore (`_`) and hyphen (`-`).
|
|
746
|
+
*
|
|
747
|
+
* An optional query string can be specified too. If present, the query string must start with a question mark (`?`)
|
|
748
|
+
* and must include at least one key value pair. Both, keys and values, can only include
|
|
749
|
+
* alphanumeric characters, underscore (`_`), hyphen (`-`) or percent encoded values such as `%20` (space character).
|
|
750
|
+
* Additional key value pairs are allowed using ampersand (`&`).
|
|
751
|
+
*
|
|
752
|
+
* Query keys require at least one alphanumeric, underscore (`_`), hyphen (`-`) or valid percent encoded.
|
|
753
|
+
* Query values are optional, the actual value may be empty and the equals sign (`=`) may be missing too.
|
|
754
|
+
*
|
|
755
|
+
* Some **Valid** examples for `path`:
|
|
756
|
+
* - o `/dashboard`
|
|
757
|
+
* - o `/dashboard/people/new/full_time/663e0b79-c893-45ff-a1b2-f6dcabc098b5`
|
|
758
|
+
* - o `/dashboard/people/hiring?filters%5B0%5D%5Bid%5D=exclude_linked_drafts&filters%5B0%5D%5Bvalue%5D=true`
|
|
759
|
+
* - o `/dashboard?key=value&foo=bar`
|
|
760
|
+
*
|
|
761
|
+
* Some **Invalid** examples for `path`:
|
|
762
|
+
* - x `missing_forward_slash`
|
|
763
|
+
* - x `/invalid//path`
|
|
764
|
+
* - x `//some`
|
|
765
|
+
* - x `/?key=value`
|
|
766
|
+
* - x `/some/i.n:valid*`
|
|
767
|
+
* - x `/invalid/end/slash/`
|
|
768
|
+
* - x `/some?malformed_percent_encoded_key%1=value`
|
|
769
|
+
*
|
|
770
|
+
*/
|
|
771
|
+
path?: string;
|
|
772
|
+
};
|
|
543
773
|
type LeavePolicy = {
|
|
544
774
|
leave_policy_variant_slug: string;
|
|
545
775
|
leave_type: TimeoffType;
|
|
546
776
|
name: string;
|
|
547
777
|
};
|
|
778
|
+
type Company = {
|
|
779
|
+
/**
|
|
780
|
+
* Fields can vary depending on the country. Please, check the required fields structure using the [Show form schema endpoint](#operation/get_show_form_country).
|
|
781
|
+
* Use the desired country and `address_details` as the form name for the placeholders.
|
|
782
|
+
* The response complies with the [JSON Schema](https://remote.com/resources/api/how-json-schemas-work) specification.
|
|
783
|
+
*
|
|
784
|
+
*/
|
|
785
|
+
address_details: {
|
|
786
|
+
[key: string]: unknown;
|
|
787
|
+
};
|
|
788
|
+
/**
|
|
789
|
+
* Fields can vary depending on the country. Please, check the required fields structure using the [Show form schema endpoint](#operation/get_show_form_country).
|
|
790
|
+
* Use the desired country and `bank_account_details` as the form name for the placeholders.
|
|
791
|
+
* The response complies with the [JSON Schema](https://remote.com/resources/api/how-json-schemas-work) specification.
|
|
792
|
+
*
|
|
793
|
+
*/
|
|
794
|
+
bank_account_details?: {
|
|
795
|
+
[key: string]: unknown;
|
|
796
|
+
};
|
|
797
|
+
company_owner_email: string;
|
|
798
|
+
company_owner_name?: string;
|
|
799
|
+
company_owner_user_id: string;
|
|
800
|
+
country_code: string;
|
|
801
|
+
created_at: string;
|
|
802
|
+
/**
|
|
803
|
+
* The credit risk status of the company default legal entity.
|
|
804
|
+
* - `not_started`: The credit risk assessment has not started yet.
|
|
805
|
+
* - `ready`: The credit risk assessment is ready to be started.
|
|
806
|
+
* - `in_progress`: The automated credit risk assessment is in progress.
|
|
807
|
+
* - `referred`: The credit risk assessment has been referred to a human reviewer.
|
|
808
|
+
* - `fail`: The credit risk assessment has failed and the company will be archived.
|
|
809
|
+
* - `deposit_required`: The company default legal entity requires a deposit before onboarding new employees.
|
|
810
|
+
* - `no_deposit_required`: The company default legal entity does not require a deposit before onboarding new employees.
|
|
811
|
+
*
|
|
812
|
+
*/
|
|
813
|
+
default_legal_entity_credit_risk_status: 'not_started' | 'ready' | 'in_progress' | 'referred' | 'fail' | 'deposit_required' | 'no_deposit_required';
|
|
814
|
+
desired_currency: string;
|
|
815
|
+
external_id?: string | null;
|
|
816
|
+
id: string;
|
|
817
|
+
name: string;
|
|
818
|
+
phone_number?: string;
|
|
819
|
+
registration_number?: string | null;
|
|
820
|
+
/**
|
|
821
|
+
* The company status determines what a company is allowed to do:
|
|
822
|
+
* - `pending`: The company has been created and the company owner invited. Remote is waiting for the company owner to complete onboarding.
|
|
823
|
+
* - `review`: The company is under review. In rare occasions, a company may not automatically get created in `active` status because Remote needs to
|
|
824
|
+
* manually review the company that was created. The company will become `active` once the review is completed and no further action is necessary
|
|
825
|
+
* through the Remote API.
|
|
826
|
+
* - `active`: The company owner has completed onboarding and the company is ready to employ.
|
|
827
|
+
* - `archived`: The company is no longer active on the Remote platform and no changes can be made to the company.
|
|
828
|
+
*
|
|
829
|
+
*/
|
|
830
|
+
status: 'pending' | 'review' | 'active' | 'archived';
|
|
831
|
+
tax_number?: string | null;
|
|
832
|
+
terms_of_service_accepted_at: string;
|
|
833
|
+
updated_at: string;
|
|
834
|
+
};
|
|
548
835
|
type TooManyRequestsResponse = {
|
|
549
836
|
message?: string;
|
|
550
837
|
};
|
|
551
838
|
type ConflictResponse = {
|
|
552
839
|
message?: string;
|
|
553
840
|
};
|
|
841
|
+
/**
|
|
842
|
+
* Currency object without a UUID identifier
|
|
843
|
+
*/
|
|
844
|
+
type CurrencyDefinition = {
|
|
845
|
+
code: string;
|
|
846
|
+
name: string;
|
|
847
|
+
symbol: string;
|
|
848
|
+
};
|
|
554
849
|
/**
|
|
555
850
|
* TimeoffDay schema
|
|
556
851
|
*/
|
|
@@ -689,7 +984,7 @@ type ParameterError = {
|
|
|
689
984
|
param: string;
|
|
690
985
|
};
|
|
691
986
|
type GenericFile = Blob | File;
|
|
692
|
-
type TimeoffType = '
|
|
987
|
+
type TimeoffType = 'time_off' | 'sick_leave' | 'public_holiday' | 'unpaid_leave' | 'extended_leave' | 'in_lieu_time' | 'maternity_leave' | 'paternity_leave' | 'parental_leave' | 'bereavement' | 'military_leave' | 'other' | 'paid_time_off' | 'custom_company_leave' | 'rtt' | 'casual_leave' | 'rol' | 'ex_festivita';
|
|
693
988
|
/**
|
|
694
989
|
* The details of the salary decrease request if there is one
|
|
695
990
|
*/
|
|
@@ -698,6 +993,14 @@ type SalaryDecreaseDetails = {
|
|
|
698
993
|
salary_decrease_reason_description?: string | null;
|
|
699
994
|
was_employee_informed?: string;
|
|
700
995
|
} | null;
|
|
996
|
+
/**
|
|
997
|
+
* The response from the currency converter
|
|
998
|
+
*/
|
|
999
|
+
type ConvertCurrencyResponse = {
|
|
1000
|
+
data: {
|
|
1001
|
+
conversion_data: ConvertCurrency;
|
|
1002
|
+
};
|
|
1003
|
+
};
|
|
701
1004
|
type RequestError = {
|
|
702
1005
|
errors: {
|
|
703
1006
|
/**
|
|
@@ -867,6 +1170,21 @@ type PostCreateEstimationPdfErrors = {
|
|
|
867
1170
|
422: UnprocessableEntityResponse;
|
|
868
1171
|
};
|
|
869
1172
|
type PostCreateEstimationPdfError = PostCreateEstimationPdfErrors[keyof PostCreateEstimationPdfErrors];
|
|
1173
|
+
type PostCreateRiskReserveErrors = {
|
|
1174
|
+
/**
|
|
1175
|
+
* Unauthorized
|
|
1176
|
+
*/
|
|
1177
|
+
401: UnauthorizedResponse;
|
|
1178
|
+
/**
|
|
1179
|
+
* Not Found
|
|
1180
|
+
*/
|
|
1181
|
+
404: NotFoundResponse;
|
|
1182
|
+
/**
|
|
1183
|
+
* Unprocessable Entity
|
|
1184
|
+
*/
|
|
1185
|
+
422: UnprocessableEntityResponse;
|
|
1186
|
+
};
|
|
1187
|
+
type PostCreateRiskReserveError = PostCreateRiskReserveErrors[keyof PostCreateRiskReserveErrors];
|
|
870
1188
|
type PostCreateContractAmendmentErrors = {
|
|
871
1189
|
/**
|
|
872
1190
|
* Unauthorized
|
|
@@ -943,5 +1261,20 @@ type PostInviteEmploymentInvitationErrors = {
|
|
|
943
1261
|
429: TooManyRequestsResponse;
|
|
944
1262
|
};
|
|
945
1263
|
type PostInviteEmploymentInvitationError = PostInviteEmploymentInvitationErrors[keyof PostInviteEmploymentInvitationErrors];
|
|
1264
|
+
type PostConvertCurrencyConverterErrors = {
|
|
1265
|
+
/**
|
|
1266
|
+
* Unauthorized
|
|
1267
|
+
*/
|
|
1268
|
+
401: UnauthorizedResponse;
|
|
1269
|
+
/**
|
|
1270
|
+
* Not Found
|
|
1271
|
+
*/
|
|
1272
|
+
404: NotFoundResponse;
|
|
1273
|
+
/**
|
|
1274
|
+
* Unprocessable Entity
|
|
1275
|
+
*/
|
|
1276
|
+
422: UnprocessableEntityResponse;
|
|
1277
|
+
};
|
|
1278
|
+
type PostConvertCurrencyConverterError = PostConvertCurrencyConverterErrors[keyof PostConvertCurrencyConverterErrors];
|
|
946
1279
|
|
|
947
|
-
export type { ContractAmendmentAutomatableResponse as C, EmploymentShowResponse as E, ListTimeoffResponse as L, OffboardingResponse as O, PostAutomatableContractAmendmentError as P, SuccessResponse as S, TerminationDetailsParams as T, ContractAmendmentResponse as a, PostCreateContractAmendmentError as b, CostCalculatorEstimateResponse as c,
|
|
1280
|
+
export type { TimeoffStatus as A, CostCalculatorEmployment as B, ContractAmendmentAutomatableResponse as C, Currency as D, EmploymentShowResponse as E, ListTimeoffResponse as L, MinimalRegion as M, OffboardingResponse as O, PostAutomatableContractAmendmentError as P, SuccessResponse as S, TerminationDetailsParams as T, UnifiedEmploymentUpsertBenefitOffersRequest as U, ContractAmendmentResponse as a, PostCreateContractAmendmentError as b, CostCalculatorEstimateResponse as c, CostCalculatorEstimatePdfResponse as d, PostCreateEstimationPdfError as e, CostCalculatorEstimateParams as f, PostCreateEstimationError as g, EmploymentTermType as h, Employment as i, Company as j, PostInviteEmploymentInvitationError as k, PostCreateRiskReserveError as l, EmploymentCreationResponse as m, PostCreateEmployment2Error as n, EmploymentCreateParams as o, EmploymentResponse as p, PatchUpdateEmployment2Error as q, EmploymentFullParams as r, PutUpdateBenefitOfferError as s, MagicLinkResponse as t, UnprocessableEntityResponse as u, MagicLinkParams as v, ConvertCurrencyResponse as w, PostConvertCurrencyConverterError as x, ConvertCurrencyParams as y, PostCreateOffboardingError as z };
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remoteoss/remote-flows",
|
|
3
|
-
"version": "0.4.0-alpha.
|
|
3
|
+
"version": "0.4.0-alpha.21",
|
|
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 test",
|
|
7
7
|
"check-exports": "attw --pack . --ignore-rules=cjs-resolves-to-esm --exclude-entrypoints index.css",
|
|
8
8
|
"check-format": "prettier --check .",
|
|
9
9
|
"dev": "NODE_ENV=development tsup --watch",
|
|
10
|
+
"build:reset": "postcss src/styles/reset.css -o ./example/src/css/reset.css",
|
|
10
11
|
"lint": "eslint .",
|
|
11
12
|
"format": "prettier --write .",
|
|
12
13
|
"openapi-ts": "openapi-ts",
|
|
@@ -16,7 +17,8 @@
|
|
|
16
17
|
"changeset:version": "changeset version",
|
|
17
18
|
"prepare": "npm run build",
|
|
18
19
|
"prerelease": "npm run ci",
|
|
19
|
-
"release": "changeset publish"
|
|
20
|
+
"release": "changeset publish",
|
|
21
|
+
"type-check": "tsc --noEmit"
|
|
20
22
|
},
|
|
21
23
|
"type": "module",
|
|
22
24
|
"main": "dist/index.js",
|
|
@@ -72,7 +74,13 @@
|
|
|
72
74
|
"cmdk": "^1.1.1",
|
|
73
75
|
"date-fns": "^3.6.0",
|
|
74
76
|
"dompurify": "^3.2.5",
|
|
75
|
-
"lodash": "^4.
|
|
77
|
+
"lodash.capitalize": "^4.2.1",
|
|
78
|
+
"lodash.get": "^4.4.2",
|
|
79
|
+
"lodash.groupby": "^4.6.0",
|
|
80
|
+
"lodash.isnull": "^3.0.0",
|
|
81
|
+
"lodash.mergewith": "^4.6.2",
|
|
82
|
+
"lodash.omit": "^4.5.0",
|
|
83
|
+
"lodash.omitby": "^4.6.0",
|
|
76
84
|
"lucide-react": "0.477.0",
|
|
77
85
|
"postcss": "^8.5.3",
|
|
78
86
|
"react-day-picker": "^8.10.1",
|
|
@@ -94,6 +102,13 @@
|
|
|
94
102
|
"@testing-library/react": "^16.2.0",
|
|
95
103
|
"@testing-library/user-event": "^14.6.1",
|
|
96
104
|
"@types/jsdom": "^21.1.7",
|
|
105
|
+
"@types/lodash.capitalize": "^4.2.9",
|
|
106
|
+
"@types/lodash.get": "^4.4.9",
|
|
107
|
+
"@types/lodash.groupby": "^4.6.9",
|
|
108
|
+
"@types/lodash.isnull": "^3.0.9",
|
|
109
|
+
"@types/lodash.mergewith": "^4.6.9",
|
|
110
|
+
"@types/lodash.omit": "^4.5.9",
|
|
111
|
+
"@types/lodash.omitby": "^4.6.9",
|
|
97
112
|
"@types/node": "^22.13.4",
|
|
98
113
|
"@types/react": "^19.0.10",
|
|
99
114
|
"@vitest/coverage-istanbul": "^3.0.8",
|
package/dist/chunk-2PXGLWCY.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/Onboarding/utils.ts"],"sourcesContent":["import { Step } from '@/src/flows/useStepState';\n\ntype StepKeys =\n | 'basic_information'\n | 'contract_details'\n | 'benefits'\n | 'review';\n\nexport const STEPS: Record<StepKeys, Step> = {\n basic_information: { index: 0, name: 'basic_information' },\n contract_details: { index: 1, name: 'contract_details' },\n benefits: { index: 2, name: 'benefits' },\n review: { index: 3, name: 'review' },\n} as const;\n"],"mappings":"AAQO,IAAMA,EAAgC,CAC3C,kBAAmB,CAAE,MAAO,EAAG,KAAM,mBAAoB,EACzD,iBAAkB,CAAE,MAAO,EAAG,KAAM,kBAAmB,EACvD,SAAU,CAAE,MAAO,EAAG,KAAM,UAAW,EACvC,OAAQ,CAAE,MAAO,EAAG,KAAM,QAAS,CACrC","names":["STEPS"]}
|
package/dist/chunk-2YWRQJ7P.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as m}from"./chunk-LCZQVL4U.js";import{b as a}from"./chunk-WS3C3WIJ.js";import{a as s}from"./chunk-JRQSZHUU.js";import{b as i}from"./chunk-56BNVYTD.js";import{a as o}from"./chunk-AYDF3IFZ.js";import y from"react";function w({onSubmit:u,onSuccess:c,onError:n,...e}){let{onboardingBag:r}=a(),d=m(),{mutateAsync:p}=s(d),l=o(async()=>{try{if(await u?.(),!r.employmentId)throw new Error("Employment ID is required");let t=await p({employment_id:r.employmentId});if(t.data){await c?.(t.data);return}t.error&&n?.(t.error)}catch(t){n?.(t)}},"handleSubmit");return y.createElement(i,{...e,onClick:()=>{l()}},e.children)}o(w,"OnboardingInvite");export{w as a};
|
|
2
|
-
//# sourceMappingURL=chunk-2YWRQJ7P.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/Onboarding/OnboardingInvite.tsx"],"sourcesContent":["import React, { ButtonHTMLAttributes, PropsWithChildren } from 'react';\nimport { useEmploymentInvite } from './hooks';\nimport { Button } from '@/src/components/ui/button';\nimport { mutationToPromise } from '@/src/lib/mutations';\nimport { SuccessResponse } from '@/src/client';\nimport { useOnboardingContext } from './context';\n\ntype OnboardingInviteProps = PropsWithChildren<\n ButtonHTMLAttributes<HTMLButtonElement> & {\n onSuccess?: (data: SuccessResponse) => void | Promise<void>;\n onError?: (error: unknown) => void;\n onSubmit?: () => void | Promise<void>;\n }\n>;\n\nexport function OnboardingInvite({\n onSubmit,\n onSuccess,\n onError,\n ...props\n}: OnboardingInviteProps) {\n const { onboardingBag } = useOnboardingContext();\n const employmentInviteMutation = useEmploymentInvite();\n\n const { mutateAsync: employmentInviteMutationAsync } = mutationToPromise(\n employmentInviteMutation,\n );\n\n const handleSubmit = async () => {\n try {\n await onSubmit?.();\n\n if (!onboardingBag.employmentId) {\n throw new Error('Employment ID is required');\n }\n\n const response = await employmentInviteMutationAsync({\n employment_id: onboardingBag.employmentId,\n });\n if (response.data) {\n await onSuccess?.(response.data as SuccessResponse);\n return;\n }\n if (response.error) {\n onError?.(response.error);\n }\n } catch (error) {\n onError?.(error);\n }\n };\n\n return (\n <Button\n {...props}\n onClick={() => {\n handleSubmit();\n }}\n >\n {props.children}\n </Button>\n );\n}\n"],"mappings":"wMAAA,OAAOA,MAAwD,QAexD,SAASC,EAAiB,CAC/B,SAAAC,EACA,UAAAC,EACA,QAAAC,EACA,GAAGC,CACL,EAA0B,CACxB,GAAM,CAAE,cAAAC,CAAc,EAAIC,EAAqB,EACzCC,EAA2BC,EAAoB,EAE/C,CAAE,YAAaC,CAA8B,EAAIC,EACrDH,CACF,EAEMI,EAAeC,EAAA,SAAY,CAC/B,GAAI,CAGF,GAFA,MAAMX,IAAW,EAEb,CAACI,EAAc,aACjB,MAAM,IAAI,MAAM,2BAA2B,EAG7C,IAAMQ,EAAW,MAAMJ,EAA8B,CACnD,cAAeJ,EAAc,YAC/B,CAAC,EACD,GAAIQ,EAAS,KAAM,CACjB,MAAMX,IAAYW,EAAS,IAAuB,EAClD,MACF,CACIA,EAAS,OACXV,IAAUU,EAAS,KAAK,CAE5B,OAASC,EAAO,CACdX,IAAUW,CAAK,CACjB,CACF,EArBqB,gBAuBrB,OACEC,EAAA,cAACC,EAAA,CACE,GAAGZ,EACJ,QAAS,IAAM,CACbO,EAAa,CACf,GAECP,EAAM,QACT,CAEJ,CA9CgBQ,EAAAZ,EAAA","names":["React","OnboardingInvite","onSubmit","onSuccess","onError","props","onboardingBag","useOnboardingContext","employmentInviteMutation","useEmploymentInvite","employmentInviteMutationAsync","mutationToPromise","handleSubmit","__name","response","error","React","Button"]}
|
package/dist/chunk-36UPHOJS.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as o}from"./chunk-AYDF3IFZ.js";import{object as c}from"yup";function d(n){let t=n.reduce((e,r)=>(e[r.name]=r.schema,e),{});return c(t)}o(d,"buildValidationSchema");function u(n,t){return Object.entries(n).reduce((e,[r,a])=>(e[r]=t.includes(r)?a==="yes":a,e),{})}o(u,"parseFormRadioValues");export{d as a,u as b};
|
|
2
|
-
//# sourceMappingURL=chunk-36UPHOJS.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/utils.ts"],"sourcesContent":["import { AnyObjectSchema, object } from 'yup';\nimport { Field } from './types';\n\n/**\n * Build the validation schema for the form.\n * @returns\n */\nexport function buildValidationSchema(fields: Field[]) {\n const fieldsSchema = fields.reduce<Record<string, AnyObjectSchema>>(\n (fieldsSchemaAcc, field) => {\n fieldsSchemaAcc[field.name] = field.schema as AnyObjectSchema;\n return fieldsSchemaAcc;\n },\n {},\n );\n return object(fieldsSchema) as AnyObjectSchema;\n}\n\ntype ParsedRadioValues = Record<string, unknown>;\n\n/**\n * Parses the form values to convert radio button values from 'yes'/'no' to boolean.\n *\n * @param values - The form values as a record of key-value pairs.\n * @param fieldKeys - An array of field keys that represent radio button fields.\n * @returns A new object with the parsed values, where radio button fields are converted to boolean.\n *\n * @example\n * const values = {\n * ack: 'yes',\n * confidential: 'no',\n * username: 'john_doe',\n * };\n * const fieldKeys = ['ack', 'confidential'];\n * const parsedValues = parseFormRadioValues(values, fieldKeys);\n * // Output: { ack: true, confidential: false, username: 'john_doe' }\n */\nexport function parseFormRadioValues(\n values: Record<string, unknown>,\n fieldKeys: string[],\n) {\n return Object.entries(values).reduce<ParsedRadioValues>(\n (acc, [key, value]) => {\n acc[key] = fieldKeys.includes(key) ? value === 'yes' : value;\n return acc;\n },\n {},\n );\n}\n"],"mappings":"wCAAA,OAA0B,UAAAA,MAAc,MAOjC,SAASC,EAAsBC,EAAiB,CACrD,IAAMC,EAAeD,EAAO,OAC1B,CAACE,EAAiBC,KAChBD,EAAgBC,EAAM,IAAI,EAAIA,EAAM,OAC7BD,GAET,CAAC,CACH,EACA,OAAOE,EAAOH,CAAY,CAC5B,CATgBI,EAAAN,EAAA,yBA8BT,SAASO,EACdC,EACAC,EACA,CACA,OAAO,OAAO,QAAQD,CAAM,EAAE,OAC5B,CAACE,EAAK,CAACC,EAAKC,CAAK,KACfF,EAAIC,CAAG,EAAIF,EAAU,SAASE,CAAG,EAAIC,IAAU,MAAQA,EAChDF,GAET,CAAC,CACH,CACF,CAXgBJ,EAAAC,EAAA","names":["object","buildValidationSchema","fields","fieldsSchema","fieldsSchemaAcc","field","object","__name","parseFormRadioValues","values","fieldKeys","acc","key","value"]}
|
package/dist/chunk-3FVI5JIC.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-5ETXP2QF.js";import{a as e}from"./chunk-AYDF3IFZ.js";import*as o from"react";import*as t from"@radix-ui/react-tooltip";function l({delayDuration:i=0,...r}){return o.createElement(t.Provider,{"data-slot":"tooltip-provider",delayDuration:i,...r})}e(l,"TooltipProvider");function d({...i}){return o.createElement(l,null,o.createElement(t.Root,{"data-slot":"tooltip",...i}))}e(d,"Tooltip");function s({...i}){return o.createElement(t.Trigger,{"data-slot":"tooltip-trigger",...i})}e(s,"TooltipTrigger");function f({className:i,sideOffset:r=0,children:p,...n}){return o.createElement(t.Portal,null,o.createElement(t.Content,{"data-slot":"tooltip-content",sideOffset:r,className:a("bg-primary text-primary-foreground shadow-md border animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance",i),...n},p,o.createElement(t.Arrow,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})))}e(f,"TooltipContent");export{l as a,d as b,s as c,f as d};
|
|
2
|
-
//# sourceMappingURL=chunk-3FVI5JIC.js.map
|
package/dist/chunk-56BNVYTD.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-5ETXP2QF.js";import{a as t}from"./chunk-AYDF3IFZ.js";import{Slot as d}from"@radix-ui/react-slot";import{cva as u}from"class-variance-authority";import*as o from"react";var p=u("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,box-shadow] disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none aria-invalid:ring-destructive/20 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90",outline:"border border-input bg-background shadow-xs",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-link-button-primary underline-offset-4 hover:underline button-link"},size:{default:"h-9 px-4 py-7 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9",link:"px-0"}},defaultVariants:{variant:"default",size:"default"}});function b({className:n,variant:r,size:a,asChild:s=!1,...i}){return o.createElement(s?d:"button",{"data-slot":"button",className:e(p({variant:r,size:a,className:n}),"RemoteFlows__Button"),...i})}t(b,"Button");export{p as a,b};
|
|
2
|
-
//# sourceMappingURL=chunk-56BNVYTD.js.map
|
package/dist/chunk-5CJPGBXJ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-I6NVZI7W.js";import{b as s}from"./chunk-WS3C3WIJ.js";import{d as i}from"./chunk-N25EBX6R.js";import{a as t}from"./chunk-AYDF3IFZ.js";import d from"react";function v({components:m,onSubmit:p,onError:r,onSuccess:f}){let{onboardingBag:e}=s(),u=e.fields??[],c=i(u,e.initialValues.benefits);return d.createElement(a,{defaultValues:c,components:m,onSubmit:t(async n=>{try{await p?.(n);let o=await e.onSubmit(n);if(o?.data){await f?.(o.data),e?.next();return}o?.error&&r?.(o.error)}catch(o){r?.(o)}},"handleSubmit")})}t(v,"BenefitsStep");export{v as a};
|
|
2
|
-
//# sourceMappingURL=chunk-5CJPGBXJ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/Onboarding/BenefitsStep.tsx"],"sourcesContent":["import React from 'react';\nimport { Components } from '@/src/types/remoteFlows';\nimport { OnboardingForm } from '@/src/flows/Onboarding/OnboardingForm';\nimport { useOnboardingContext } from '@/src/flows/Onboarding/context';\nimport { SuccessResponse } from '@/src/client';\nimport { getInitialValues } from '@/src/components/form/utils';\nimport { BenefitsFormPayload } from '@/src/flows/Onboarding/types';\nimport { $TSFixMe } from '@remoteoss/json-schema-form';\n\ntype BenefitsStepProps = {\n components?: Components;\n /**\n * Callback function to be called when the benefits form is submitted.\n * It can be used to perform any additional validation or processing before\n * the onboarding moves to the last step.\n * @param values\n * @returns\n */\n onSubmit?: (values: BenefitsFormPayload) => void | Promise<void>;\n /**\n * Callback function to be called when the submitting benefits form fails.\n * @param error\n * @returns\n */\n onError?: (error: Error) => void;\n /**\n * Callback function to be called when benefits form is successfully submitted.\n * This function is called after the submitting benefits form is submitted.\n * @param data\n * @returns\n */\n onSuccess?: (data: SuccessResponse) => void | Promise<void>;\n};\n\nexport function BenefitsStep({\n components,\n onSubmit,\n onError,\n onSuccess,\n}: BenefitsStepProps) {\n const { onboardingBag } = useOnboardingContext();\n const fields = onboardingBag.fields ?? [];\n const initialValues = getInitialValues(\n fields,\n onboardingBag.initialValues.benefits,\n );\n\n const handleSubmit = async (payload: $TSFixMe) => {\n try {\n await onSubmit?.(payload as BenefitsFormPayload);\n const response = await onboardingBag.onSubmit(payload);\n if (response?.data) {\n await onSuccess?.(response.data as SuccessResponse);\n onboardingBag?.next();\n return;\n }\n if (response?.error) {\n onError?.(response.error);\n }\n } catch (error: unknown) {\n onError?.(error as Error);\n }\n };\n\n return (\n <OnboardingForm\n defaultValues={initialValues}\n components={components}\n onSubmit={handleSubmit}\n />\n );\n}\n"],"mappings":"2JAAA,OAAOA,MAAW,QAkCX,SAASC,EAAa,CAC3B,WAAAC,EACA,SAAAC,EACA,QAAAC,EACA,UAAAC,CACF,EAAsB,CACpB,GAAM,CAAE,cAAAC,CAAc,EAAIC,EAAqB,EACzCC,EAASF,EAAc,QAAU,CAAC,EAClCG,EAAgBC,EACpBF,EACAF,EAAc,cAAc,QAC9B,EAmBA,OACEK,EAAA,cAACC,EAAA,CACC,cAAeH,EACf,WAAYP,EACZ,SArBiBW,EAAA,MAAOC,GAAsB,CAChD,GAAI,CACF,MAAMX,IAAWW,CAA8B,EAC/C,IAAMC,EAAW,MAAMT,EAAc,SAASQ,CAAO,EACrD,GAAIC,GAAU,KAAM,CAClB,MAAMV,IAAYU,EAAS,IAAuB,EAClDT,GAAe,KAAK,EACpB,MACF,CACIS,GAAU,OACZX,IAAUW,EAAS,KAAK,CAE5B,OAASC,EAAgB,CACvBZ,IAAUY,CAAc,CAC1B,CACF,EAfqB,gBAsBnB,CAEJ,CArCgBH,EAAAZ,EAAA","names":["React","BenefitsStep","components","onSubmit","onError","onSuccess","onboardingBag","useOnboardingContext","fields","initialValues","getInitialValues","React","OnboardingForm","__name","payload","response","error"]}
|
package/dist/chunk-5OXN2O6C.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as f}from"./chunk-DZYFSFZ7.js";import{a as l}from"./chunk-HDQGO453.js";import{b as s}from"./chunk-A4RX3KRZ.js";import{a}from"./chunk-IDSJI7KQ.js";import{a as t}from"./chunk-AYDF3IFZ.js";import e,{useEffect as y}from"react";import{useForm as T}from"react-hook-form";function w({fields:m,onSubmit:d}){let{formId:u,terminationBag:o}=f(),F=s(o.handleValidation),i=T({resolver:F,defaultValues:o?.initialValues,shouldUnregister:!1,mode:"onBlur"});y(()=>{let p=i?.watch(r=>{Object.keys(r).some(n=>r[n]!==o?.initialValues?.[n])&&o?.checkFieldUpdates(r)});return()=>p?.unsubscribe()},[]);let c=m||(o?.fields??[]);return e.createElement(a,{...i},e.createElement("form",{id:u,onSubmit:i.handleSubmit(d),className:"space-y-4 RemoteFlows__TerminationForm"},e.createElement(l,{fields:c})))}t(w,"TerminationForm");export{w as a};
|
|
2
|
-
//# sourceMappingURL=chunk-5OXN2O6C.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/Termination/TerminationForm.tsx"],"sourcesContent":["import { JSONSchemaFormFields } from '@/src/components/form/JSONSchemaForm';\nimport { Form } from '@/src/components/ui/form';\nimport React, { useEffect } from 'react';\nimport { useTerminationContext } from './context';\nimport { TerminationFormValues } from '@/src/flows/Termination/types';\nimport { useForm } from 'react-hook-form';\nimport { useJsonSchemasValidationFormResolver } from '@/src/components/form/yupValidationResolver';\nimport { Fields } from '@remoteoss/json-schema-form';\n\ntype TerminationFormProps = {\n onSubmit: (payload: TerminationFormValues) => void;\n fields?: Fields;\n};\n\nexport function TerminationForm({ fields, onSubmit }: TerminationFormProps) {\n const { formId, terminationBag } = useTerminationContext();\n\n const resolver = useJsonSchemasValidationFormResolver(\n // @ts-expect-error no matching type\n terminationBag.handleValidation,\n );\n\n const form = useForm({\n resolver,\n defaultValues: terminationBag?.initialValues,\n shouldUnregister: false,\n mode: 'onBlur',\n });\n\n useEffect(() => {\n const subscription = form?.watch((values) => {\n const isAnyFieldDirty = Object.keys(values).some(\n (key) =>\n values[key as keyof TerminationFormValues] !==\n terminationBag?.initialValues?.[key as keyof TerminationFormValues],\n );\n if (isAnyFieldDirty) {\n terminationBag?.checkFieldUpdates(values);\n }\n });\n return () => subscription?.unsubscribe();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const jsonSchemaFields = fields ? fields : (terminationBag?.fields ?? []);\n\n return (\n <Form {...form}>\n <form\n id={formId}\n onSubmit={form.handleSubmit(onSubmit)}\n className=\"space-y-4 RemoteFlows__TerminationForm\"\n >\n <JSONSchemaFormFields fields={jsonSchemaFields} />\n </form>\n </Form>\n );\n}\n"],"mappings":"mMAEA,OAAOA,GAAS,aAAAC,MAAiB,QAGjC,OAAS,WAAAC,MAAe,kBASjB,SAASC,EAAgB,CAAE,OAAAC,EAAQ,SAAAC,CAAS,EAAyB,CAC1E,GAAM,CAAE,OAAAC,EAAQ,eAAAC,CAAe,EAAIC,EAAsB,EAEnDC,EAAWC,EAEfH,EAAe,gBACjB,EAEMI,EAAOC,EAAQ,CACnB,SAAAH,EACA,cAAeF,GAAgB,cAC/B,iBAAkB,GAClB,KAAM,QACR,CAAC,EAEDM,EAAU,IAAM,CACd,IAAMC,EAAeH,GAAM,MAAOI,GAAW,CACnB,OAAO,KAAKA,CAAM,EAAE,KACzCC,GACCD,EAAOC,CAAkC,IACzCT,GAAgB,gBAAgBS,CAAkC,CACtE,GAEET,GAAgB,kBAAkBQ,CAAM,CAE5C,CAAC,EACD,MAAO,IAAMD,GAAc,YAAY,CAEzC,EAAG,CAAC,CAAC,EAEL,IAAMG,EAAmBb,IAAmBG,GAAgB,QAAU,CAAC,GAEvE,OACEW,EAAA,cAACC,EAAA,CAAM,GAAGR,GACRO,EAAA,cAAC,QACC,GAAIZ,EACJ,SAAUK,EAAK,aAAaN,CAAQ,EACpC,UAAU,0CAEVa,EAAA,cAACE,EAAA,CAAqB,OAAQH,EAAkB,CAClD,CACF,CAEJ,CA3CgBI,EAAAlB,EAAA","names":["React","useEffect","useForm","TerminationForm","fields","onSubmit","formId","terminationBag","useTerminationContext","resolver","useJsonSchemasValidationFormResolver","form","useForm","useEffect","subscription","values","key","jsonSchemaFields","React","Form","JSONSchemaFormFields","__name"]}
|
package/dist/chunk-6A3F6JG6.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-MESREYTZ.js";import{b as s}from"./chunk-5ETXP2QF.js";import{a as o}from"./chunk-AYDF3IFZ.js";import r from"react";function n({grossSalary:t,currency:e}){return r.createElement("div",null,r.createElement("div",{className:"flex justify-between items-center mb-2"},r.createElement("h3",{className:"font-medium text-primary-foreground"},"Gross Salary"),r.createElement("span",{className:"font-semibold text-lg"},s(t,e))),r.createElement(a,null))}o(n,"CostCalculatorGrossSalary");export{n as a};
|
|
2
|
-
//# sourceMappingURL=chunk-6A3F6JG6.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/CostCalculator/Results/CostCalculatorGrossSalary.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Separator } from '@/src/components/ui/separator';\nimport { formatCurrency } from '@/src/lib/utils';\n\ntype CostCalculatorGrossSalaryProps = {\n grossSalary: number;\n currency: string;\n};\n\nexport function CostCalculatorGrossSalary({\n grossSalary,\n currency,\n}: CostCalculatorGrossSalaryProps) {\n return (\n <div>\n <div className=\"flex justify-between items-center mb-2\">\n <h3 className=\"font-medium text-primary-foreground\">Gross Salary</h3>\n <span className=\"font-semibold text-lg\">\n {formatCurrency(grossSalary, currency)}\n </span>\n </div>\n <Separator />\n </div>\n );\n}\n"],"mappings":"mHAAA,OAAOA,MAAW,QAUX,SAASC,EAA0B,CACxC,YAAAC,EACA,SAAAC,CACF,EAAmC,CACjC,OACEC,EAAA,cAAC,WACCA,EAAA,cAAC,OAAI,UAAU,0CACbA,EAAA,cAAC,MAAG,UAAU,uCAAsC,cAAY,EAChEA,EAAA,cAAC,QAAK,UAAU,yBACbC,EAAeH,EAAaC,CAAQ,CACvC,CACF,EACAC,EAAA,cAACE,EAAA,IAAU,CACb,CAEJ,CAfgBC,EAAAN,EAAA","names":["React","CostCalculatorGrossSalary","grossSalary","currency","React","formatCurrency","Separator","__name"]}
|
package/dist/chunk-7CYG2RHP.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./chunk-OLJ2S6A6.js";import{b as n}from"./chunk-56BNVYTD.js";import{a as e}from"./chunk-5ETXP2QF.js";import{a as o}from"./chunk-AYDF3IFZ.js";import i from"react";function _({children:s,...t}){let{form:m,formId:l,costCalculatorBag:u}=r();return i.createElement(n,{...t,type:"reset",className:e("RemoteFlows__CostCalculatorForm__ResetButton",t.className),form:l,onClick:a=>{u?.resetForm(),m.reset(),t.onClick?.(a)}},s)}o(_,"CostCalculatorResetButton");export{_ as a};
|
|
2
|
-
//# sourceMappingURL=chunk-7CYG2RHP.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/CostCalculator/CostCalculatorResetButton.tsx"],"sourcesContent":["import { Button } from '@/src/components/ui/button';\nimport React, { ButtonHTMLAttributes, PropsWithChildren } from 'react';\nimport { useCostCalculatorContext } from './context';\nimport { cn } from '@/src/lib/utils';\n\nexport function CostCalculatorResetButton({\n children,\n ...props\n}: PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement>>) {\n const { form, formId, costCalculatorBag } = useCostCalculatorContext();\n return (\n <Button\n {...props}\n type=\"reset\"\n className={cn(\n 'RemoteFlows__CostCalculatorForm__ResetButton',\n props.className,\n )}\n form={formId}\n onClick={(evt) => {\n costCalculatorBag?.resetForm();\n form.reset();\n props.onClick?.(evt);\n }}\n >\n {children}\n </Button>\n );\n}\n"],"mappings":"gKACA,OAAOA,MAAwD,QAIxD,SAASC,EAA0B,CACxC,SAAAC,EACA,GAAGC,CACL,EAA+D,CAC7D,GAAM,CAAE,KAAAC,EAAM,OAAAC,EAAQ,kBAAAC,CAAkB,EAAIC,EAAyB,EACrE,OACEC,EAAA,cAACC,EAAA,CACE,GAAGN,EACJ,KAAK,QACL,UAAWO,EACT,+CACAP,EAAM,SACR,EACA,KAAME,EACN,QAAUM,GAAQ,CAChBL,GAAmB,UAAU,EAC7BF,EAAK,MAAM,EACXD,EAAM,UAAUQ,CAAG,CACrB,GAECT,CACH,CAEJ,CAvBgBU,EAAAX,EAAA","names":["React","CostCalculatorResetButton","children","props","form","formId","costCalculatorBag","useCostCalculatorContext","React","Button","cn","evt","__name"]}
|
package/dist/chunk-7OMSCFTM.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as i}from"./chunk-I6NVZI7W.js";import{b as n}from"./chunk-WS3C3WIJ.js";import{a as r}from"./chunk-AYDF3IFZ.js";import l from"react";function S({onSubmit:s,onError:a,onSuccess:m}){let{onboardingBag:t}=n(),p=r(async e=>{try{await s?.(t.parseFormValues(e));let o=await t.onSubmit(e);if(o?.data){await m?.(o.data),t?.next();return}o?.error&&a?.(o.error)}catch(o){a?.(o)}},"handleSubmit");return l.createElement(i,{defaultValues:t.stepState.values?.contract_details||t.initialValues.contract_details,onSubmit:p})}r(S,"ContractDetailsStep");export{S as a};
|
|
2
|
-
//# sourceMappingURL=chunk-7OMSCFTM.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/Onboarding/ContractDetailsStep.tsx"],"sourcesContent":["import React from 'react';\nimport { useOnboardingContext } from './context';\nimport { OnboardingForm } from '@/src/flows/Onboarding/OnboardingForm';\nimport { EmploymentResponse } from '@/src/client';\nimport { ContractDetailsFormPayload } from '@/src/flows/Onboarding/types';\nimport { $TSFixMe } from '@remoteoss/json-schema-form';\n\ntype ContractDetailsStepProps = {\n /*\n * The function is called when the form is submitted. It receives the form values as an argument.\n */\n onSubmit?: (payload: ContractDetailsFormPayload) => void | Promise<void>;\n /*\n * The function is called when the form submission is successful.\n */\n onSuccess?: (response: EmploymentResponse) => void | Promise<void>;\n /*\n * The function is called when an error occurs during form submission.\n */\n onError?: (error: Error) => void;\n};\n\nexport function ContractDetailsStep({\n onSubmit,\n onError,\n onSuccess,\n}: ContractDetailsStepProps) {\n const { onboardingBag } = useOnboardingContext();\n const handleSubmit = async (payload: $TSFixMe) => {\n try {\n await onSubmit?.(\n onboardingBag.parseFormValues(payload) as ContractDetailsFormPayload,\n );\n const response = await onboardingBag.onSubmit(payload);\n if (response?.data) {\n await onSuccess?.(response.data as EmploymentResponse);\n onboardingBag?.next();\n return;\n }\n if (response?.error) {\n onError?.(response.error);\n }\n } catch (error: unknown) {\n onError?.(error as Error);\n }\n };\n\n return (\n <OnboardingForm\n defaultValues={\n onboardingBag.stepState.values?.contract_details ||\n onboardingBag.initialValues.contract_details\n }\n onSubmit={handleSubmit}\n />\n );\n}\n"],"mappings":"wHAAA,OAAOA,MAAW,QAsBX,SAASC,EAAoB,CAClC,SAAAC,EACA,QAAAC,EACA,UAAAC,CACF,EAA6B,CAC3B,GAAM,CAAE,cAAAC,CAAc,EAAIC,EAAqB,EACzCC,EAAeC,EAAA,MAAOC,GAAsB,CAChD,GAAI,CACF,MAAMP,IACJG,EAAc,gBAAgBI,CAAO,CACvC,EACA,IAAMC,EAAW,MAAML,EAAc,SAASI,CAAO,EACrD,GAAIC,GAAU,KAAM,CAClB,MAAMN,IAAYM,EAAS,IAA0B,EACrDL,GAAe,KAAK,EACpB,MACF,CACIK,GAAU,OACZP,IAAUO,EAAS,KAAK,CAE5B,OAASC,EAAgB,CACvBR,IAAUQ,CAAc,CAC1B,CACF,EAjBqB,gBAmBrB,OACEC,EAAA,cAACC,EAAA,CACC,cACER,EAAc,UAAU,QAAQ,kBAChCA,EAAc,cAAc,iBAE9B,SAAUE,EACZ,CAEJ,CAlCgBC,EAAAP,EAAA","names":["React","ContractDetailsStep","onSubmit","onError","onSuccess","onboardingBag","useOnboardingContext","handleSubmit","__name","payload","response","error","React","OnboardingForm"]}
|
package/dist/chunk-AYDF3IFZ.js
DELETED
package/dist/chunk-BLPOQIGB.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as m}from"./chunk-IDSJI7KQ.js";import{c as n}from"./chunk-N25EBX6R.js";import{b as a}from"./chunk-6HGUGIYJ.js";import{a as o}from"./chunk-AYDF3IFZ.js";import i from"react";import{useForm as S}from"react-hook-form";function R({onSubmit:s,onError:d,onSuccess:c}){let{contractAmendment:{stepState:l,isSubmitting:u,onSubmit:f,fields:C},formId:p}=a(),r=S({defaultValues:l.values?.form}),A=o(async e=>{let F=n(e,C,{isPartialValidation:!1});await s?.(F);let t=await f(e);t.error?d?.(t.error):await c?.(t.data)},"handleSubmit");return u?null:i.createElement(m,{...r},i.createElement("form",{id:p,onSubmit:r.handleSubmit(A),className:"RemoteFlows__ContractAmendmentConfirmationForm"}))}o(R,"ContractAmendmentConfirmationForm");export{R as a};
|
|
2
|
-
//# sourceMappingURL=chunk-BLPOQIGB.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/ContractAmendment/ContractAmendmentConfirmationForm.tsx"],"sourcesContent":["import {\n ContractAmendmentResponse,\n PostCreateContractAmendmentError,\n} from '@/src/client';\nimport { parseJSFToValidate } from '@/src/components/form/utils';\nimport { Form } from '@/src/components/ui/form';\nimport React from 'react';\nimport { FieldValues, useForm } from 'react-hook-form';\nimport { useContractAmendmentContext } from './context';\n\ntype ContractAmendmentConfirmationFormProps = {\n /**\n * Callback function to be called when the contract amendment form is submitted.\n * This function is called before the contract amendment is submitted.\n * It can be used to perform any additional validation or processing before\n * the contract amendment is submitted.\n * @param values\n * @returns\n */\n onSubmit?: (values: FieldValues) => void | Promise<void>;\n /**\n * Callback function to be called when the contract amendment fails.\n * @param error\n * @returns\n */\n onError?: (error: PostCreateContractAmendmentError) => void;\n /**\n * Callback function to be called when the contract amendment is successfully submitted.\n * @param data\n * @returns\n */\n onSuccess?: (data: ContractAmendmentResponse) => void | Promise<void>;\n};\n\nexport function ContractAmendmentConfirmationForm({\n onSubmit,\n onError,\n onSuccess,\n}: ContractAmendmentConfirmationFormProps) {\n const {\n contractAmendment: {\n stepState,\n isSubmitting,\n onSubmit: submitContractAmendment,\n fields,\n },\n formId,\n } = useContractAmendmentContext();\n const form = useForm({\n defaultValues: stepState.values?.form,\n });\n\n const handleSubmit = async (values: FieldValues) => {\n const parsedValues = parseJSFToValidate(values, fields, {\n isPartialValidation: false,\n });\n await onSubmit?.(parsedValues);\n\n const contractAmendmentResult = await submitContractAmendment(values);\n\n if (contractAmendmentResult.error) {\n onError?.(\n contractAmendmentResult.error as PostCreateContractAmendmentError,\n );\n } else {\n await onSuccess?.(\n contractAmendmentResult.data as ContractAmendmentResponse,\n );\n }\n };\n\n // Ensure that step\n if (isSubmitting) {\n return null;\n }\n\n return (\n <Form {...form}>\n <form\n id={formId}\n onSubmit={form.handleSubmit(handleSubmit)}\n className=\"RemoteFlows__ContractAmendmentConfirmationForm\"\n ></form>\n </Form>\n );\n}\n"],"mappings":"gKAMA,OAAOA,MAAW,QAClB,OAAsB,WAAAC,MAAe,kBA2B9B,SAASC,EAAkC,CAChD,SAAAC,EACA,QAAAC,EACA,UAAAC,CACF,EAA2C,CACzC,GAAM,CACJ,kBAAmB,CACjB,UAAAC,EACA,aAAAC,EACA,SAAUC,EACV,OAAAC,CACF,EACA,OAAAC,CACF,EAAIC,EAA4B,EAC1BC,EAAOC,EAAQ,CACnB,cAAeP,EAAU,QAAQ,IACnC,CAAC,EAEKQ,EAAeC,EAAA,MAAOC,GAAwB,CAClD,IAAMC,EAAeC,EAAmBF,EAAQP,EAAQ,CACtD,oBAAqB,EACvB,CAAC,EACD,MAAMN,IAAWc,CAAY,EAE7B,IAAME,EAA0B,MAAMX,EAAwBQ,CAAM,EAEhEG,EAAwB,MAC1Bf,IACEe,EAAwB,KAC1B,EAEA,MAAMd,IACJc,EAAwB,IAC1B,CAEJ,EAjBqB,gBAoBrB,OAAIZ,EACK,KAIPa,EAAA,cAACC,EAAA,CAAM,GAAGT,GACRQ,EAAA,cAAC,QACC,GAAIV,EACJ,SAAUE,EAAK,aAAaE,CAAY,EACxC,UAAU,iDACX,CACH,CAEJ,CAnDgBC,EAAAb,EAAA","names":["React","useForm","ContractAmendmentConfirmationForm","onSubmit","onError","onSuccess","stepState","isSubmitting","submitContractAmendment","fields","formId","useContractAmendmentContext","form","useForm","handleSubmit","__name","values","parsedValues","parseJSFToValidate","contractAmendmentResult","React","Form"]}
|
package/dist/chunk-CRHTUOZT.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as p}from"./chunk-HDQGO453.js";import{b as l}from"./chunk-A4RX3KRZ.js";import{a as f}from"./chunk-IDSJI7KQ.js";import{c as u}from"./chunk-N25EBX6R.js";import{b as F}from"./chunk-6HGUGIYJ.js";import{a as r}from"./chunk-AYDF3IFZ.js";import a,{useEffect as P}from"react";import{useForm as w}from"react-hook-form";var k=["effective_date","reason_for_change","reason_for_change_description","additional_comments","additional_comments_toggle"];function U({onSubmit:_,onError:m,onSuccess:b}){let{formId:A,contractAmendment:{checkFieldUpdates:C,fields:s,onSubmit:h,stepState:S,initialValues:i,handleValidation:g}}=F(),y=l(g),e=w({resolver:y,defaultValues:S.values?.form||i,shouldUnregister:!0,mode:"onBlur"});P(()=>{let t=e?.watch(o=>{(Object.keys(e.formState.dirtyFields).length>0||e.formState.isDirty)&&C(o)});return()=>t?.unsubscribe()},[]);let V=r(async t=>{let o=!1;for(let[c,v]of Object.entries(t))if(!k.includes(c)&&i[c]!==v){o=!0;break}if(!o)return m?.({message:"no_changes_detected_contract_details"});let d=u(t,s,{isPartialValidation:!1});await _?.(d);let n=await h(t);n.error?m?.(n.error):await b?.(n.data)},"handleSubmit");return a.createElement(f,{...e},a.createElement("form",{id:A,"data-testid":"contract-amendment-form",onSubmit:e.handleSubmit(V),className:"space-y-4 RemoteFlows__ContractAmendmentForm"},a.createElement(p,{fields:s})))}r(U,"ContractAmendmentForm");export{U as a};
|
|
2
|
-
//# sourceMappingURL=chunk-CRHTUOZT.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/ContractAmendment/ContractAmendmentForm.tsx"],"sourcesContent":["import {\n ContractAmendmentAutomatableResponse,\n PostAutomatableContractAmendmentError,\n} from '@/src/client';\nimport { JSONSchemaFormFields } from '@/src/components/form/JSONSchemaForm';\nimport { parseJSFToValidate } from '@/src/components/form/utils';\nimport { useJsonSchemasValidationFormResolver } from '@/src/components/form/yupValidationResolver';\nimport { Form } from '@/src/components/ui/form';\nimport React, { useEffect } from 'react';\nimport { FieldValues, useForm } from 'react-hook-form';\nimport { useContractAmendmentContext } from './context';\n\ntype ContractAmendmentFormProps = {\n /**\n * Callback function to be called when the contract amendment form is submitted.\n * This function is called before the contract amendment is submitted.\n * It can be used to perform any additional validation or processing before\n * the contract amendment is submitted.\n * @param values\n * @returns\n */\n onSubmit?: (values: FieldValues) => void | Promise<void>;\n /**\n * Callback function to be called when the contract amendment fails.\n * @param error\n * @returns\n */\n onError?: (\n error:\n | PostAutomatableContractAmendmentError\n | { message: 'no_changes_detected_contract_details' },\n ) => void;\n /**\n * Callback function to be called when the contract amendment is successfully submitted.\n * This function is called after the contract amendment is submitted.\n * @param data\n * @returns\n */\n onSuccess?: (\n data: ContractAmendmentAutomatableResponse,\n ) => void | Promise<void>;\n};\n\nconst commonFields = [\n 'effective_date',\n 'reason_for_change',\n 'reason_for_change_description',\n 'additional_comments',\n 'additional_comments_toggle',\n] as const;\n\ntype CommonFields = (typeof commonFields)[number];\n\nexport function ContractAmendmentForm({\n onSubmit,\n onError,\n onSuccess,\n}: ContractAmendmentFormProps) {\n const {\n formId,\n contractAmendment: {\n checkFieldUpdates,\n fields,\n onSubmit: submitContractAmendment,\n stepState,\n initialValues,\n handleValidation,\n },\n } = useContractAmendmentContext();\n\n const resolver = useJsonSchemasValidationFormResolver(\n // @ts-expect-error no matching type\n handleValidation,\n );\n\n const form = useForm({\n resolver,\n defaultValues:\n // stepState.values is used as defaultValues for the form when the form is\n // rendered when clicking on the back button after the user has submitted the form\n // and the confirmation form is displayed.\n // This is because the form is unmounted when the user submits the form.\n stepState.values?.form || initialValues,\n shouldUnregister: true,\n mode: 'onBlur',\n });\n\n useEffect(() => {\n const subscription = form?.watch((values) => {\n const isFormDirty =\n Object.keys(form.formState.dirtyFields).length > 0 ||\n form.formState.isDirty;\n if (isFormDirty) {\n checkFieldUpdates(values);\n }\n });\n return () => subscription?.unsubscribe();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const handleSubmit = async (values: FieldValues) => {\n let hasContractDetailsChanges = false;\n for (const [key, value] of Object.entries(values)) {\n if (\n !commonFields.includes(key as CommonFields) &&\n // @ts-expect-error error\n initialValues[key] !== value\n ) {\n hasContractDetailsChanges = true;\n break;\n }\n }\n\n if (!hasContractDetailsChanges) {\n return onError?.({\n message: 'no_changes_detected_contract_details',\n });\n }\n\n const parsedValues = parseJSFToValidate(values, fields, {\n isPartialValidation: false,\n });\n\n await onSubmit?.(parsedValues);\n\n const contractAmendmentResult = await submitContractAmendment(values);\n\n if (contractAmendmentResult.error) {\n onError?.(contractAmendmentResult.error);\n } else {\n await onSuccess?.(\n contractAmendmentResult.data as ContractAmendmentAutomatableResponse,\n );\n }\n };\n\n return (\n <Form {...form}>\n <form\n id={formId}\n data-testid=\"contract-amendment-form\"\n onSubmit={form.handleSubmit(handleSubmit)}\n className=\"space-y-4 RemoteFlows__ContractAmendmentForm\"\n >\n <JSONSchemaFormFields fields={fields} />\n </form>\n </Form>\n );\n}\n"],"mappings":"gPAQA,OAAOA,GAAS,aAAAC,MAAiB,QACjC,OAAsB,WAAAC,MAAe,kBAkCrC,IAAMC,EAAe,CACnB,iBACA,oBACA,gCACA,sBACA,4BACF,EAIO,SAASC,EAAsB,CACpC,SAAAC,EACA,QAAAC,EACA,UAAAC,CACF,EAA+B,CAC7B,GAAM,CACJ,OAAAC,EACA,kBAAmB,CACjB,kBAAAC,EACA,OAAAC,EACA,SAAUC,EACV,UAAAC,EACA,cAAAC,EACA,iBAAAC,CACF,CACF,EAAIC,EAA4B,EAE1BC,EAAWC,EAEfH,CACF,EAEMI,EAAOC,EAAQ,CACnB,SAAAH,EACA,cAKEJ,EAAU,QAAQ,MAAQC,EAC5B,iBAAkB,GAClB,KAAM,QACR,CAAC,EAEDO,EAAU,IAAM,CACd,IAAMC,EAAeH,GAAM,MAAOI,GAAW,EAEzC,OAAO,KAAKJ,EAAK,UAAU,WAAW,EAAE,OAAS,GACjDA,EAAK,UAAU,UAEfT,EAAkBa,CAAM,CAE5B,CAAC,EACD,MAAO,IAAMD,GAAc,YAAY,CAEzC,EAAG,CAAC,CAAC,EAEL,IAAME,EAAeC,EAAA,MAAOF,GAAwB,CAClD,IAAIG,EAA4B,GAChC,OAAW,CAACC,EAAKC,CAAK,IAAK,OAAO,QAAQL,CAAM,EAC9C,GACE,CAACnB,EAAa,SAASuB,CAAmB,GAE1Cb,EAAca,CAAG,IAAMC,EACvB,CACAF,EAA4B,GAC5B,KACF,CAGF,GAAI,CAACA,EACH,OAAOnB,IAAU,CACf,QAAS,sCACX,CAAC,EAGH,IAAMsB,EAAeC,EAAmBP,EAAQZ,EAAQ,CACtD,oBAAqB,EACvB,CAAC,EAED,MAAML,IAAWuB,CAAY,EAE7B,IAAME,EAA0B,MAAMnB,EAAwBW,CAAM,EAEhEQ,EAAwB,MAC1BxB,IAAUwB,EAAwB,KAAK,EAEvC,MAAMvB,IACJuB,EAAwB,IAC1B,CAEJ,EAlCqB,gBAoCrB,OACEC,EAAA,cAACC,EAAA,CAAM,GAAGd,GACRa,EAAA,cAAC,QACC,GAAIvB,EACJ,cAAY,0BACZ,SAAUU,EAAK,aAAaK,CAAY,EACxC,UAAU,gDAEVQ,EAAA,cAACE,EAAA,CAAqB,OAAQvB,EAAQ,CACxC,CACF,CAEJ,CA/FgBc,EAAApB,EAAA","names":["React","useEffect","useForm","commonFields","ContractAmendmentForm","onSubmit","onError","onSuccess","formId","checkFieldUpdates","fields","submitContractAmendment","stepState","initialValues","handleValidation","useContractAmendmentContext","resolver","useJsonSchemasValidationFormResolver","form","useForm","useEffect","subscription","values","handleSubmit","__name","hasContractDetailsChanges","key","value","parsedValues","parseJSFToValidate","contractAmendmentResult","React","Form","JSONSchemaFormFields"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/Termination/TimeOff.tsx"],"sourcesContent":["import { EmploymentShowResponse, ListTimeoffResponse } from '@/src/client';\nimport { useEmploymentQuery, useTimeOffQuery } from '@/src/common/hooks';\nimport { useTerminationContext } from '@/src/flows/Termination/context';\nimport React from 'react';\n\nexport const TimeOff = ({\n render,\n}: {\n render: (props: {\n employment: EmploymentShowResponse | undefined;\n timeoff: ListTimeoffResponse | undefined;\n }) => React.ReactNode;\n}) => {\n const { terminationBag } = useTerminationContext();\n const { data: employment } = useEmploymentQuery({\n employmentId: terminationBag.employmentId,\n });\n\n const { data: timeoff } = useTimeOffQuery({\n employmentId: terminationBag.employmentId,\n status: 'taken',\n });\n\n return render({ employment, timeoff });\n};\n"],"mappings":"+HAKO,IAAMA,EAAUC,EAAA,CAAC,CACtB,OAAAC,CACF,IAKM,CACJ,GAAM,CAAE,eAAAC,CAAe,EAAIC,EAAsB,EAC3C,CAAE,KAAMC,CAAW,EAAIC,EAAmB,CAC9C,aAAcH,EAAe,YAC/B,CAAC,EAEK,CAAE,KAAMI,CAAQ,EAAIC,EAAgB,CACxC,aAAcL,EAAe,aAC7B,OAAQ,OACV,CAAC,EAED,OAAOD,EAAO,CAAE,WAAAG,EAAY,QAAAE,CAAQ,CAAC,CACvC,EAnBuB","names":["TimeOff","__name","render","terminationBag","useTerminationContext","employment","useEmploymentQuery","timeoff","useTimeOffQuery"]}
|