@remoteoss/remote-flows 1.8.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{CountryFieldDefault-Q6N5AQVO.js → CountryFieldDefault-VJM3C6WE.js} +2 -2
- package/dist/DatePickerFieldDefault-3MBSCS3W.js +2 -0
- package/dist/RadioGroupFieldDefault-CM33F3EP.js +2 -0
- package/dist/{chunk-KRFK2QRV.js → chunk-2SN7VPBR.js} +2 -2
- package/dist/{chunk-QS6RZEWL.js → chunk-3UAJX23Y.js} +2 -2
- package/dist/{chunk-Q4GRM3SL.js → chunk-4JOZ4VIJ.js} +2 -2
- package/dist/{chunk-XVU376WG.js → chunk-5G5UBS6W.js} +2 -2
- package/dist/chunk-5XHL6B25.js +6 -0
- package/dist/{chunk-JTLXUYOR.js.map → chunk-5XHL6B25.js.map} +1 -1
- package/dist/{chunk-QMYU2SQX.js → chunk-634DTN72.js} +2 -2
- package/dist/{chunk-YZ3POA3F.js → chunk-6ZEZZZFB.js} +2 -2
- package/dist/{chunk-FGJ46XOX.js → chunk-7QP5TRMH.js} +2 -2
- package/dist/{chunk-LGX2ABTK.js → chunk-BJJTAQPT.js} +2 -2
- package/dist/{chunk-PBJWPR2W.js → chunk-BMVPIRKX.js} +2 -2
- package/dist/{chunk-WGMEOF72.js → chunk-CEHS4AFO.js} +2 -2
- package/dist/{chunk-AQHD46DV.js → chunk-CEM3JUSV.js} +2 -2
- package/dist/{chunk-6JFRVHLF.js → chunk-CKTFJUGZ.js} +2 -2
- package/dist/{chunk-ZCZX54AU.js → chunk-COAGOVMZ.js} +2 -2
- package/dist/{chunk-7PKH5MYL.js → chunk-CWQQA3P4.js} +2 -2
- package/dist/{chunk-4DLVQKMI.js → chunk-D3XDJFE3.js} +2 -2
- package/dist/{chunk-SQWCXYE2.js → chunk-DG34PSAO.js} +2 -2
- package/dist/{chunk-CAV5SWVS.js → chunk-DWTKSHQJ.js} +2 -2
- package/dist/{chunk-ZCXTTVGV.js → chunk-EAF6XPH6.js} +2 -2
- package/dist/chunk-EFLWMMG5.js +2 -0
- package/dist/chunk-EFLWMMG5.js.map +1 -0
- package/dist/{chunk-FZ452U6M.js → chunk-EIFXWGXM.js} +2 -2
- package/dist/{chunk-UOY6KW7W.js → chunk-EUSCQL4H.js} +2 -2
- package/dist/{chunk-25III46F.js → chunk-FJLSVTBJ.js} +2 -2
- package/dist/{chunk-A24VPRL7.js → chunk-FJZPATKO.js} +2 -2
- package/dist/{chunk-OJCKJPY5.js → chunk-G5DVMK4E.js} +2 -2
- package/dist/{chunk-SXB2L4I5.js → chunk-GBETAH3G.js} +2 -2
- package/dist/{chunk-W6H74RYW.js → chunk-GLNDB4KG.js} +2 -2
- package/dist/{chunk-6FKIWCCE.js → chunk-HBPFTEHZ.js} +2 -2
- package/dist/{chunk-4TRBNEI5.js → chunk-HLSVMRWX.js} +2 -2
- package/dist/{chunk-6K3XJV4Z.js → chunk-I6Y6AWYE.js} +2 -2
- package/dist/{chunk-JZPN7DHV.js → chunk-IEXTH6YO.js} +2 -2
- package/dist/{chunk-FSHTBJ6O.js → chunk-IG5LQPUN.js} +2 -2
- package/dist/{chunk-HI2BVEWW.js → chunk-IPITD7UK.js} +2 -2
- package/dist/{chunk-OE7PRSME.js → chunk-LDJW2CBF.js} +2 -2
- package/dist/{chunk-XOK3XCYN.js → chunk-LNWBGEKE.js} +2 -2
- package/dist/{chunk-SNMKN5AK.js → chunk-MM5K3XXY.js} +2 -2
- package/dist/{chunk-AFEID3JA.js → chunk-NCELDZXG.js} +2 -2
- package/dist/{chunk-JZNJIXGW.js → chunk-NXDG32BY.js} +2 -2
- package/dist/{chunk-3WBZPCT5.js → chunk-P45OX5YT.js} +2 -2
- package/dist/{chunk-EBFCYC35.js → chunk-PO57BOOY.js} +2 -2
- package/dist/{chunk-RZS2WEOI.js → chunk-RLRSNB77.js} +2 -2
- package/dist/chunk-RQUNEKD2.js +2 -0
- package/dist/chunk-RQUNEKD2.js.map +1 -0
- package/dist/{chunk-NQURNHBL.js → chunk-SBQYUJFI.js} +2 -2
- package/dist/{chunk-IWXQUASB.js → chunk-SVYPDGZN.js} +2 -2
- package/dist/chunk-T7O3YYOG.js +2 -0
- package/dist/chunk-T7O3YYOG.js.map +1 -0
- package/dist/{chunk-7GI4ZVUE.js → chunk-UHO6CCVA.js} +2 -2
- package/dist/{chunk-LJJKRBFU.js → chunk-UXUZA7XH.js} +2 -2
- package/dist/{chunk-FFHBDVTJ.js → chunk-VKYP2MQQ.js} +2 -2
- package/dist/{chunk-MLXUOIBE.js → chunk-VLP6L77E.js} +2 -2
- package/dist/{chunk-I25DQACP.js → chunk-WHROCBHG.js} +2 -2
- package/dist/{chunk-JVGFK6NK.js → chunk-WTQ6PTMB.js} +2 -2
- package/dist/{chunk-RZYFAL5X.js → chunk-XQUHG7HJ.js} +2 -2
- package/dist/{chunk-X64YQ67A.js → chunk-YMLXE6OO.js} +2 -2
- package/dist/{chunk-KWJI2HKR.js → chunk-ZNV46UUP.js} +2 -2
- package/dist/{chunk-KAGAWJSJ.js → chunk-ZOPKBLGA.js} +2 -2
- package/dist/default-components.d.ts +2 -2
- package/dist/default-components.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +3 -3
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
- package/dist/flows/ContractAmendment/context.d.ts +3 -3
- package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
- package/dist/flows/ContractAmendment/hooks.js +1 -1
- package/dist/flows/ContractAmendment/index.d.ts +3 -3
- package/dist/flows/ContractAmendment/index.js +1 -1
- package/dist/flows/ContractAmendment/types.d.ts +2 -2
- package/dist/flows/ContractAmendment/utils.d.ts +2 -2
- package/dist/flows/ContractAmendment/utils.js +1 -1
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
- package/dist/flows/ContractorOnboarding/api.d.ts +12 -3
- package/dist/flows/ContractorOnboarding/api.js +1 -1
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractPreviewHeader.d.ts +2 -2
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.d.ts +2 -2
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
- package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
- package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
- package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/ContractorOnboarding/context.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/hooks.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/hooks.js +1 -1
- package/dist/flows/ContractorOnboarding/index.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/index.js +1 -1
- package/dist/flows/ContractorOnboarding/jsfModify.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
- package/dist/flows/ContractorOnboarding/types.d.ts +5 -5
- package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
- package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
- package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
- package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +2 -2
- package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
- package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +2 -2
- package/dist/flows/CostCalculator/api.d.ts +2 -2
- package/dist/flows/CostCalculator/api.js +1 -1
- package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
- package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
- package/dist/flows/CostCalculator/context.d.ts +3 -3
- package/dist/flows/CostCalculator/hooks.d.ts +3 -3
- package/dist/flows/CostCalculator/hooks.js +1 -1
- package/dist/flows/CostCalculator/index.d.ts +3 -3
- package/dist/flows/CostCalculator/index.js +1 -1
- package/dist/flows/CostCalculator/types.d.ts +2 -2
- package/dist/flows/CostCalculator/utils.d.ts +3 -3
- package/dist/flows/CostCalculator/utils.js +1 -1
- package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
- package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
- package/dist/flows/Onboarding/api.d.ts +4 -4
- package/dist/flows/Onboarding/api.js +1 -1
- package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
- package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
- package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/Onboarding/components/BenefitsStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
- package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingForm.d.ts +4 -4
- package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
- package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
- package/dist/flows/Onboarding/components/ReviewStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
- package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/Onboarding/context.d.ts +4 -4
- package/dist/flows/Onboarding/hooks.d.ts +4 -4
- package/dist/flows/Onboarding/hooks.js +1 -1
- package/dist/flows/Onboarding/index.d.ts +4 -4
- package/dist/flows/Onboarding/index.js +1 -1
- package/dist/flows/Onboarding/types.d.ts +4 -4
- package/dist/flows/Onboarding/utils.d.ts +4 -4
- package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -4
- package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
- package/dist/flows/Termination/EmployeeComunicationForm.d.ts +4 -4
- package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
- package/dist/flows/Termination/PaidTimeOffForm.d.ts +4 -4
- package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
- package/dist/flows/Termination/TerminationDetailsForm.d.ts +4 -4
- package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
- package/dist/flows/Termination/TerminationFlow.d.ts +4 -4
- package/dist/flows/Termination/TerminationFlow.js +1 -1
- package/dist/flows/Termination/TerminationForm.d.ts +4 -4
- package/dist/flows/Termination/TerminationForm.js +1 -1
- package/dist/flows/Termination/api.d.ts +5 -5
- 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 +6 -6
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +6 -6
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +6 -6
- package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
- package/dist/flows/Termination/context.d.ts +4 -4
- package/dist/flows/Termination/hooks.d.ts +4 -4
- package/dist/flows/Termination/hooks.js +1 -1
- package/dist/flows/Termination/index.d.ts +6 -6
- package/dist/flows/Termination/index.js +1 -1
- package/dist/flows/Termination/json-schemas/schema.d.ts +4 -4
- package/dist/flows/Termination/types.d.ts +4 -4
- package/dist/flows/Termination/utils.d.ts +4 -4
- package/dist/flows/types.d.ts +2 -2
- package/dist/index.d.ts +10 -10
- package/dist/index.js +2 -2
- package/dist/internals.d.ts +3 -3
- package/dist/{mutations-S_wSmzKg.d.ts → mutations-D1eQrIJS.d.ts} +1 -1
- package/dist/{remoteFlows-Cng6gLYk.d.ts → remoteFlows-DtWy_kl6.d.ts} +1 -1
- package/dist/{types-BMqZxk-s.d.ts → types-C73xHbIf.d.ts} +3 -3
- package/dist/{types-DDr_JprX.d.ts → types-CYEQpq5z.d.ts} +2 -2
- package/dist/{types-B4TFqbOW.d.ts → types-CoznD6fc.d.ts} +1 -1
- package/dist/{types-Cmjevabw.d.ts → types-uiKCaHsn.d.ts} +4 -4
- package/dist/{types.gen-DblP0ILg.d.ts → types.gen-Dg6qF5i1.d.ts} +32 -1
- package/dist/{utils-CCnKZ-KY.d.ts → utils-DNGgpT60.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/DatePickerFieldDefault-HUP4TK2U.js +0 -2
- package/dist/RadioGroupFieldDefault-E35Y2AK6.js +0 -2
- package/dist/chunk-FYFW7DCQ.js +0 -2
- package/dist/chunk-FYFW7DCQ.js.map +0 -1
- package/dist/chunk-HRG5MSVG.js +0 -2
- package/dist/chunk-HRG5MSVG.js.map +0 -1
- package/dist/chunk-JTLXUYOR.js +0 -6
- package/dist/chunk-L34CQIPW.js +0 -2
- package/dist/chunk-L34CQIPW.js.map +0 -1
- /package/dist/{CountryFieldDefault-Q6N5AQVO.js.map → CountryFieldDefault-VJM3C6WE.js.map} +0 -0
- /package/dist/{DatePickerFieldDefault-HUP4TK2U.js.map → DatePickerFieldDefault-3MBSCS3W.js.map} +0 -0
- /package/dist/{RadioGroupFieldDefault-E35Y2AK6.js.map → RadioGroupFieldDefault-CM33F3EP.js.map} +0 -0
- /package/dist/{chunk-KRFK2QRV.js.map → chunk-2SN7VPBR.js.map} +0 -0
- /package/dist/{chunk-QS6RZEWL.js.map → chunk-3UAJX23Y.js.map} +0 -0
- /package/dist/{chunk-Q4GRM3SL.js.map → chunk-4JOZ4VIJ.js.map} +0 -0
- /package/dist/{chunk-XVU376WG.js.map → chunk-5G5UBS6W.js.map} +0 -0
- /package/dist/{chunk-QMYU2SQX.js.map → chunk-634DTN72.js.map} +0 -0
- /package/dist/{chunk-YZ3POA3F.js.map → chunk-6ZEZZZFB.js.map} +0 -0
- /package/dist/{chunk-FGJ46XOX.js.map → chunk-7QP5TRMH.js.map} +0 -0
- /package/dist/{chunk-LGX2ABTK.js.map → chunk-BJJTAQPT.js.map} +0 -0
- /package/dist/{chunk-PBJWPR2W.js.map → chunk-BMVPIRKX.js.map} +0 -0
- /package/dist/{chunk-WGMEOF72.js.map → chunk-CEHS4AFO.js.map} +0 -0
- /package/dist/{chunk-AQHD46DV.js.map → chunk-CEM3JUSV.js.map} +0 -0
- /package/dist/{chunk-6JFRVHLF.js.map → chunk-CKTFJUGZ.js.map} +0 -0
- /package/dist/{chunk-ZCZX54AU.js.map → chunk-COAGOVMZ.js.map} +0 -0
- /package/dist/{chunk-7PKH5MYL.js.map → chunk-CWQQA3P4.js.map} +0 -0
- /package/dist/{chunk-4DLVQKMI.js.map → chunk-D3XDJFE3.js.map} +0 -0
- /package/dist/{chunk-SQWCXYE2.js.map → chunk-DG34PSAO.js.map} +0 -0
- /package/dist/{chunk-CAV5SWVS.js.map → chunk-DWTKSHQJ.js.map} +0 -0
- /package/dist/{chunk-ZCXTTVGV.js.map → chunk-EAF6XPH6.js.map} +0 -0
- /package/dist/{chunk-FZ452U6M.js.map → chunk-EIFXWGXM.js.map} +0 -0
- /package/dist/{chunk-UOY6KW7W.js.map → chunk-EUSCQL4H.js.map} +0 -0
- /package/dist/{chunk-25III46F.js.map → chunk-FJLSVTBJ.js.map} +0 -0
- /package/dist/{chunk-A24VPRL7.js.map → chunk-FJZPATKO.js.map} +0 -0
- /package/dist/{chunk-OJCKJPY5.js.map → chunk-G5DVMK4E.js.map} +0 -0
- /package/dist/{chunk-SXB2L4I5.js.map → chunk-GBETAH3G.js.map} +0 -0
- /package/dist/{chunk-W6H74RYW.js.map → chunk-GLNDB4KG.js.map} +0 -0
- /package/dist/{chunk-6FKIWCCE.js.map → chunk-HBPFTEHZ.js.map} +0 -0
- /package/dist/{chunk-4TRBNEI5.js.map → chunk-HLSVMRWX.js.map} +0 -0
- /package/dist/{chunk-6K3XJV4Z.js.map → chunk-I6Y6AWYE.js.map} +0 -0
- /package/dist/{chunk-JZPN7DHV.js.map → chunk-IEXTH6YO.js.map} +0 -0
- /package/dist/{chunk-FSHTBJ6O.js.map → chunk-IG5LQPUN.js.map} +0 -0
- /package/dist/{chunk-HI2BVEWW.js.map → chunk-IPITD7UK.js.map} +0 -0
- /package/dist/{chunk-OE7PRSME.js.map → chunk-LDJW2CBF.js.map} +0 -0
- /package/dist/{chunk-XOK3XCYN.js.map → chunk-LNWBGEKE.js.map} +0 -0
- /package/dist/{chunk-SNMKN5AK.js.map → chunk-MM5K3XXY.js.map} +0 -0
- /package/dist/{chunk-AFEID3JA.js.map → chunk-NCELDZXG.js.map} +0 -0
- /package/dist/{chunk-JZNJIXGW.js.map → chunk-NXDG32BY.js.map} +0 -0
- /package/dist/{chunk-3WBZPCT5.js.map → chunk-P45OX5YT.js.map} +0 -0
- /package/dist/{chunk-EBFCYC35.js.map → chunk-PO57BOOY.js.map} +0 -0
- /package/dist/{chunk-RZS2WEOI.js.map → chunk-RLRSNB77.js.map} +0 -0
- /package/dist/{chunk-NQURNHBL.js.map → chunk-SBQYUJFI.js.map} +0 -0
- /package/dist/{chunk-IWXQUASB.js.map → chunk-SVYPDGZN.js.map} +0 -0
- /package/dist/{chunk-7GI4ZVUE.js.map → chunk-UHO6CCVA.js.map} +0 -0
- /package/dist/{chunk-LJJKRBFU.js.map → chunk-UXUZA7XH.js.map} +0 -0
- /package/dist/{chunk-FFHBDVTJ.js.map → chunk-VKYP2MQQ.js.map} +0 -0
- /package/dist/{chunk-MLXUOIBE.js.map → chunk-VLP6L77E.js.map} +0 -0
- /package/dist/{chunk-I25DQACP.js.map → chunk-WHROCBHG.js.map} +0 -0
- /package/dist/{chunk-JVGFK6NK.js.map → chunk-WTQ6PTMB.js.map} +0 -0
- /package/dist/{chunk-RZYFAL5X.js.map → chunk-XQUHG7HJ.js.map} +0 -0
- /package/dist/{chunk-X64YQ67A.js.map → chunk-YMLXE6OO.js.map} +0 -0
- /package/dist/{chunk-KWJI2HKR.js.map → chunk-ZNV46UUP.js.map} +0 -0
- /package/dist/{chunk-KAGAWJSJ.js.map → chunk-ZOPKBLGA.js.map} +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export { TerminationFlow } from './TerminationFlow.js';
|
|
2
2
|
export { TerminationReasonsDetailContent } from './components/TerminationReasonsDetailContent/TerminationReasonsDetailContent.js';
|
|
3
3
|
export { TerminationDialogInfoContent } from './components/TerminationDialogInfoContent/TerminationDialogInfoContent.js';
|
|
4
|
-
export { A as AdditionalDetailsFormValues, E as EmployeeCommunicationFormValues, P as PaidTimeOffFormValues, c as TerminationDetailsFormValues, a as TerminationFlowProps, T as TerminationFormValues, b as TerminationRenderProps } from '../../types-
|
|
4
|
+
export { A as AdditionalDetailsFormValues, E as EmployeeCommunicationFormValues, P as PaidTimeOffFormValues, c as TerminationDetailsFormValues, a as TerminationFlowProps, T as TerminationFormValues, b as TerminationRenderProps } from '../../types-CYEQpq5z.js';
|
|
5
5
|
export { PaidTimeOffProps } from './components/PaidTimeOff/PaidTimeOff.js';
|
|
6
6
|
export { AcknowledgeInformationFeesProps } from './components/AcknowledgeInformation/AcknowledgeInformationFees.js';
|
|
7
7
|
export { AcknowledgeInformationProps } from './components/AcknowledgeInformation/AcknowledgeInformation.js';
|
|
8
8
|
import 'react/jsx-runtime';
|
|
9
|
-
import '../../types.gen-
|
|
10
|
-
import '../../mutations-
|
|
11
|
-
import '../../remoteFlows-
|
|
9
|
+
import '../../types.gen-Dg6qF5i1.js';
|
|
10
|
+
import '../../mutations-D1eQrIJS.js';
|
|
11
|
+
import '../../remoteFlows-DtWy_kl6.js';
|
|
12
12
|
import 'react';
|
|
13
13
|
import 'yup';
|
|
14
14
|
import '../../types-ZWIpiFgj.js';
|
|
@@ -20,11 +20,11 @@ import './TerminationBack.js';
|
|
|
20
20
|
import './TerminationSubmit.js';
|
|
21
21
|
import '../types.js';
|
|
22
22
|
import '@remoteoss/remote-json-schema-form-kit';
|
|
23
|
-
import '../../types-
|
|
23
|
+
import '../../types-CoznD6fc.js';
|
|
24
24
|
import '@tanstack/react-query';
|
|
25
25
|
import '@tanstack/query-core';
|
|
26
26
|
import './api.js';
|
|
27
|
-
import '../../types-
|
|
27
|
+
import '../../types-C73xHbIf.js';
|
|
28
28
|
import '../Onboarding/components/OnboardingBack.js';
|
|
29
29
|
import '../Onboarding/components/OnboardingInvite.js';
|
|
30
30
|
import '../Onboarding/components/OnboardingSubmit.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../chunk-FZ7FWFJX.js";import{a as c}from"../../chunk-
|
|
1
|
+
import"../../chunk-FZ7FWFJX.js";import{a as c}from"../../chunk-4JOZ4VIJ.js";import{a as b}from"../../chunk-XIEA775Q.js";import{a}from"../../chunk-GLNDB4KG.js";import"../../chunk-WR5DSTKP.js";import"../../chunk-DWTKSHQJ.js";import"../../chunk-MJQUJZCD.js";import"../../chunk-D3XDJFE3.js";import"../../chunk-6DHV4GT6.js";import"../../chunk-S6OVT37M.js";import"../../chunk-BJJTAQPT.js";import"../../chunk-5WFWHEXV.js";import"../../chunk-ML56EPFW.js";import"../../chunk-SVYPDGZN.js";import"../../chunk-YRC6EEM3.js";import"../../chunk-IEX4KZUY.js";import"../../chunk-WTQ6PTMB.js";import"../../chunk-XFD3ULUF.js";import"../../chunk-ZVUQDK2E.js";import"../../chunk-ZXGAFQXW.js";import"../../chunk-LMYJ6V44.js";import"../../chunk-TC7EQZJK.js";import"../../chunk-NX7MM6XR.js";import"../../chunk-DFJNVGK4.js";import"../../chunk-SGE4DLC3.js";import"../../chunk-MM5K3XXY.js";import"../../chunk-5G5UBS6W.js";import"../../chunk-COAGOVMZ.js";import"../../chunk-FJLSVTBJ.js";import"../../chunk-MRYRNB7Y.js";import"../../chunk-4WSJ2A6Q.js";import"../../chunk-JIZKHO7L.js";import"../../chunk-VDRNNOVA.js";import"../../chunk-LNV36S6D.js";import"../../chunk-CEHS4AFO.js";import"../../chunk-HBPFTEHZ.js";import"../../chunk-EYHFPHIA.js";import"../../chunk-634DTN72.js";import"../../chunk-EUSCQL4H.js";import"../../chunk-T7O3YYOG.js";import"../../chunk-ZTBFYRNL.js";import"../../chunk-AN5U7FWW.js";import"../../chunk-MZNUCWQU.js";import"../../chunk-CEM3JUSV.js";import"../../chunk-3QNS3IZB.js";import"../../chunk-5XHL6B25.js";import"../../chunk-JKEUTGPQ.js";import"../../chunk-YHD2RXJC.js";import"../../chunk-VIQQ3IHI.js";import"../../chunk-FLW5LACO.js";import"../../chunk-JTSHX4RB.js";import"../../chunk-ILX4QHHH.js";import"../../chunk-OVTH3ZHO.js";import"../../chunk-F2VYTYIQ.js";import"../../chunk-PGRQG254.js";import"../../chunk-7QRAEME3.js";import"../../chunk-FJPY27YJ.js";import"../../chunk-H2OBH7SK.js";import"../../chunk-YUQ3GDQI.js";import"../../chunk-GCWEOZBS.js";import"../../chunk-3X36ZFNP.js";import"../../chunk-5BRMLRS7.js";import"../../chunk-Z5WMKCRJ.js";import"../../chunk-KQPDXXG3.js";import"../../chunk-P37U34EQ.js";export{c as TerminationDialogInfoContent,a as TerminationFlow,b as TerminationReasonsDetailContent};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { S as StepTerminationKeys } from '../../../types-
|
|
2
|
-
import '../../../types.gen-
|
|
1
|
+
import { S as StepTerminationKeys } from '../../../types-CYEQpq5z.js';
|
|
2
|
+
import '../../../types.gen-Dg6qF5i1.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
|
-
import '../../../mutations-
|
|
5
|
-
import '../../../remoteFlows-
|
|
4
|
+
import '../../../mutations-D1eQrIJS.js';
|
|
5
|
+
import '../../../remoteFlows-DtWy_kl6.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import 'yup';
|
|
8
8
|
import '../../../types-ZWIpiFgj.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import '../../types.gen-
|
|
2
|
-
export { A as AdditionalDetailsFormValues, E as EmployeeCommunicationFormValues, P as PaidTimeOffFormValues, c as TerminationDetailsFormValues, a as TerminationFlowProps, T as TerminationFormValues, b as TerminationRenderProps } from '../../types-
|
|
1
|
+
import '../../types.gen-Dg6qF5i1.js';
|
|
2
|
+
export { A as AdditionalDetailsFormValues, E as EmployeeCommunicationFormValues, P as PaidTimeOffFormValues, c as TerminationDetailsFormValues, a as TerminationFlowProps, T as TerminationFormValues, b as TerminationRenderProps } from '../../types-CYEQpq5z.js';
|
|
3
3
|
import './TerminationBack.js';
|
|
4
4
|
import './TerminationSubmit.js';
|
|
5
5
|
import '../types.js';
|
|
6
6
|
import 'react/jsx-runtime';
|
|
7
|
-
import '../../mutations-
|
|
8
|
-
import '../../remoteFlows-
|
|
7
|
+
import '../../mutations-D1eQrIJS.js';
|
|
8
|
+
import '../../remoteFlows-DtWy_kl6.js';
|
|
9
9
|
import 'react';
|
|
10
10
|
import 'yup';
|
|
11
11
|
import '../../types-ZWIpiFgj.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import 'react';
|
|
2
|
-
import '../../types.gen-
|
|
2
|
+
import '../../types.gen-Dg6qF5i1.js';
|
|
3
3
|
import '../useStepState.js';
|
|
4
|
-
export { f as STEPS, S as StepTerminationKeys, i as buildInitialValues, g as calculateMinTerminationDate, h as calculateProposedTerminationDateStatement } from '../../types-
|
|
4
|
+
export { f as STEPS, S as StepTerminationKeys, i as buildInitialValues, g as calculateMinTerminationDate, h as calculateProposedTerminationDateStatement } from '../../types-CYEQpq5z.js';
|
|
5
5
|
import 'react-hook-form';
|
|
6
6
|
import 'react/jsx-runtime';
|
|
7
|
-
import '../../mutations-
|
|
8
|
-
import '../../remoteFlows-
|
|
7
|
+
import '../../mutations-D1eQrIJS.js';
|
|
8
|
+
import '../../remoteFlows-DtWy_kl6.js';
|
|
9
9
|
import 'yup';
|
|
10
10
|
import '../../types-ZWIpiFgj.js';
|
|
11
11
|
import '@remoteoss/json-schema-form';
|
package/dist/flows/types.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as JSFFieldset } from '../remoteFlows-
|
|
1
|
+
import { a as JSFFieldset } from '../remoteFlows-DtWy_kl6.js';
|
|
2
2
|
import { ModifyConfig, FormResult } from '@remoteoss/remote-json-schema-form-kit';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'yup';
|
|
5
|
-
import '../types.gen-
|
|
5
|
+
import '../types.gen-Dg6qF5i1.js';
|
|
6
6
|
import '../types-ZWIpiFgj.js';
|
|
7
7
|
import 'react-hook-form';
|
|
8
8
|
|
package/dist/index.d.ts
CHANGED
|
@@ -16,27 +16,27 @@ export { useContractAmendment } from './flows/ContractAmendment/hooks.js';
|
|
|
16
16
|
export { TerminationFlow } from './flows/Termination/TerminationFlow.js';
|
|
17
17
|
export { TerminationReasonsDetailContent } from './flows/Termination/components/TerminationReasonsDetailContent/TerminationReasonsDetailContent.js';
|
|
18
18
|
export { TerminationDialogInfoContent } from './flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js';
|
|
19
|
-
export { A as AdditionalDetailsFormValues, E as EmployeeCommunicationFormValues, P as PaidTimeOffFormValues, c as TerminationDetailsFormValues, a as TerminationFlowProps, T as TerminationFormValues, b as TerminationRenderProps } from './types-
|
|
19
|
+
export { A as AdditionalDetailsFormValues, E as EmployeeCommunicationFormValues, P as PaidTimeOffFormValues, c as TerminationDetailsFormValues, a as TerminationFlowProps, T as TerminationFormValues, b as TerminationRenderProps } from './types-CYEQpq5z.js';
|
|
20
20
|
export { PaidTimeOffProps } from './flows/Termination/components/PaidTimeOff/PaidTimeOff.js';
|
|
21
21
|
export { AcknowledgeInformationFeesProps } from './flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js';
|
|
22
22
|
export { AcknowledgeInformationProps } from './flows/Termination/components/AcknowledgeInformation/AcknowledgeInformation.js';
|
|
23
23
|
export { OnboardingFlow } from './flows/Onboarding/OnboardingFlow.js';
|
|
24
24
|
export { OnboardingInviteProps } from './flows/Onboarding/components/OnboardingInvite.js';
|
|
25
|
-
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-
|
|
25
|
+
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-C73xHbIf.js';
|
|
26
26
|
export { ContractorOnboardingFlow } from './flows/ContractorOnboarding/ContractorOnboarding.js';
|
|
27
|
-
export { e as ContractPreviewFormPayload, f as ContractPreviewResponse, a as ContractorOnboardingContractDetailsFormPayload, d as ContractorOnboardingContractDetailsResponse, C as ContractorOnboardingFlowProps, b as ContractorOnboardingRenderProps, P as PricingPlanFormPayload, c as PricingPlanResponse } from './types-
|
|
27
|
+
export { e as ContractPreviewFormPayload, f as ContractPreviewResponse, a as ContractorOnboardingContractDetailsFormPayload, d as ContractorOnboardingContractDetailsResponse, C as ContractorOnboardingFlowProps, b as ContractorOnboardingRenderProps, P as PricingPlanFormPayload, c as PricingPlanResponse } from './types-uiKCaHsn.js';
|
|
28
28
|
export { ContractPreviewStatementProps } from './flows/ContractorOnboarding/components/ContractPreviewStatement.js';
|
|
29
29
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
30
|
-
import { E as Employment,
|
|
31
|
-
export { p as Company, C as ContractAmendmentAutomatableResponse, n as CostCalculatorEmployment, h as CostCalculatorEstimateResponse,
|
|
30
|
+
import { E as Employment, Z as MagicLinkResponse, U as UnprocessableEntityResponse, _ as MagicLinkParams } from './types.gen-Dg6qF5i1.js';
|
|
31
|
+
export { p as Company, C as ContractAmendmentAutomatableResponse, n as CostCalculatorEmployment, h as CostCalculatorEstimateResponse, $ as Currency, d as EmploymentCreationResponse, e as EmploymentResponse, O as OffboardingResponse, S as SuccessResponse } from './types.gen-Dg6qF5i1.js';
|
|
32
32
|
import { ContractAmendmentParams } from './flows/ContractAmendment/types.js';
|
|
33
|
-
export { b as usePaidTimeoffBreakdownQuery, c as useTimeOffLeavePoliciesSummaryQuery, u as useTimeOffQuery } from './types-
|
|
34
|
-
export { t as transformYupErrorsIntoObject } from './utils-
|
|
33
|
+
export { b as usePaidTimeoffBreakdownQuery, c as useTimeOffLeavePoliciesSummaryQuery, u as useTimeOffQuery } from './types-CoznD6fc.js';
|
|
34
|
+
export { t as transformYupErrorsIntoObject } from './utils-DNGgpT60.js';
|
|
35
35
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
36
36
|
import { PropsWithChildren } from 'react';
|
|
37
|
-
import { R as RemoteFlowsSDKProps } from './remoteFlows-
|
|
38
|
-
export { $ as $TSFixMe, B as ButtonComponentProps, C as Components, f as CountryComponentProps, g as DatePickerComponentProps, D as DrawerComponentProps, d as FieldComponentProps, F as FieldSetToggleComponentProps, e as FileComponentProps, b as JSFCustomComponentProps, M as Meta, P as PDFPreviewComponentProps, S as StatementComponentProps, T as TextFieldComponentProps, W as WorkScheduleComponentProps, Z as ZendeskDrawerComponentProps } from './remoteFlows-
|
|
39
|
-
export { F as FieldError, N as NormalizedFieldError } from './mutations-
|
|
37
|
+
import { R as RemoteFlowsSDKProps } from './remoteFlows-DtWy_kl6.js';
|
|
38
|
+
export { $ as $TSFixMe, B as ButtonComponentProps, C as Components, f as CountryComponentProps, g as DatePickerComponentProps, D as DrawerComponentProps, d as FieldComponentProps, F as FieldSetToggleComponentProps, e as FileComponentProps, b as JSFCustomComponentProps, M as Meta, P as PDFPreviewComponentProps, S as StatementComponentProps, T as TextFieldComponentProps, W as WorkScheduleComponentProps, Z as ZendeskDrawerComponentProps } from './remoteFlows-DtWy_kl6.js';
|
|
39
|
+
export { F as FieldError, N as NormalizedFieldError } from './mutations-D1eQrIJS.js';
|
|
40
40
|
import 'yup';
|
|
41
41
|
import './types-ZWIpiFgj.js';
|
|
42
42
|
import 'react-hook-form';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./chunk-FZ7FWFJX.js";import{a as fe}from"./chunk-
|
|
1
|
+
import"./chunk-FZ7FWFJX.js";import{a as fe}from"./chunk-4JOZ4VIJ.js";import{a as ue}from"./chunk-XIEA775Q.js";import{a as de}from"./chunk-GLNDB4KG.js";import"./chunk-WR5DSTKP.js";import"./chunk-DWTKSHQJ.js";import"./chunk-MJQUJZCD.js";import"./chunk-D3XDJFE3.js";import"./chunk-6DHV4GT6.js";import"./chunk-S6OVT37M.js";import"./chunk-BJJTAQPT.js";import"./chunk-5WFWHEXV.js";import"./chunk-ML56EPFW.js";import"./chunk-SVYPDGZN.js";import"./chunk-YRC6EEM3.js";import"./chunk-IEX4KZUY.js";import{b as me,c as ce,d as pe}from"./chunk-WTQ6PTMB.js";import"./chunk-XFD3ULUF.js";import"./chunk-ZVUQDK2E.js";import"./chunk-ZXGAFQXW.js";import"./chunk-LMYJ6V44.js";import"./chunk-TC7EQZJK.js";import"./chunk-NX7MM6XR.js";import"./chunk-DFJNVGK4.js";import"./chunk-SGE4DLC3.js";import"./chunk-GULCZWSK.js";import"./chunk-MM5K3XXY.js";import"./chunk-5G5UBS6W.js";import"./chunk-COAGOVMZ.js";import"./chunk-FJLSVTBJ.js";import"./chunk-MRYRNB7Y.js";import"./chunk-FGBEOUQK.js";import{a as ee}from"./chunk-LNWBGEKE.js";import{a as re}from"./chunk-UBRRCAAI.js";import"./chunk-5IHRUTHD.js";import{a as ge}from"./chunk-7QP5TRMH.js";import"./chunk-UXUZA7XH.js";import"./chunk-3UAJX23Y.js";import"./chunk-KRJETP7I.js";import"./chunk-NCELDZXG.js";import"./chunk-W7YC2IO2.js";import"./chunk-Z7WBY27D.js";import"./chunk-YIMWF5GR.js";import"./chunk-UHO6CCVA.js";import"./chunk-GBETAH3G.js";import"./chunk-XQUHG7HJ.js";import"./chunk-PGWKJ6FK.js";import{a as x,b as v}from"./chunk-RLRSNB77.js";import"./chunk-VAIBLWOY.js";import"./chunk-G5DVMK4E.js";import{a as X}from"./chunk-YMLXE6OO.js";import{b as G,d as J}from"./chunk-VLP6L77E.js";import"./chunk-CKTFJUGZ.js";import"./chunk-VFRHMNLJ.js";import"./chunk-CWQQA3P4.js";import{a as Y}from"./chunk-6ZEZZZFB.js";import{a as j}from"./chunk-EW36MHXP.js";import{a as q}from"./chunk-XDZFLJ5F.js";import"./chunk-KSHK3ZPX.js";import{d as Z,e as H}from"./chunk-ZNV46UUP.js";import"./chunk-HN5HLFTB.js";import"./chunk-DKFUZO5P.js";import{a as ye}from"./chunk-BMVPIRKX.js";import"./chunk-P3QDMRCC.js";import"./chunk-VAWEOFUO.js";import"./chunk-HLSVMRWX.js";import"./chunk-WD5DNUSS.js";import"./chunk-DG34PSAO.js";import"./chunk-IPITD7UK.js";import"./chunk-IEXTH6YO.js";import"./chunk-I6Y6AWYE.js";import"./chunk-OZWDFGLQ.js";import"./chunk-LDJW2CBF.js";import"./chunk-2SN7VPBR.js";import"./chunk-4WSJ2A6Q.js";import"./chunk-Q3ALCPJN.js";import"./chunk-EFLWMMG5.js";import"./chunk-UMOL4GLZ.js";import"./chunk-FJZPATKO.js";import"./chunk-WVJDCDGZ.js";import"./chunk-H6YNMT4M.js";import"./chunk-RQUNEKD2.js";import"./chunk-AP56UUME.js";import"./chunk-IJCTN52C.js";import"./chunk-SBQYUJFI.js";import"./chunk-3UDRMQNE.js";import"./chunk-WT6E5LO4.js";import"./chunk-JIZKHO7L.js";import"./chunk-VDRNNOVA.js";import"./chunk-N4W7JU2D.js";import"./chunk-A7ZJQCNU.js";import{a as le}from"./chunk-ZOPKBLGA.js";import{a as oe}from"./chunk-WHROCBHG.js";import{a as te}from"./chunk-IG5LQPUN.js";import"./chunk-LNV36S6D.js";import"./chunk-CEHS4AFO.js";import"./chunk-HBPFTEHZ.js";import"./chunk-EYHFPHIA.js";import{a as ne}from"./chunk-U6LRMWRI.js";import{a as ie}from"./chunk-PO57BOOY.js";import{a as se,b as ae}from"./chunk-634DTN72.js";import"./chunk-EAF6XPH6.js";import"./chunk-EUSCQL4H.js";import{d as $}from"./chunk-T7O3YYOG.js";import"./chunk-ZTBFYRNL.js";import"./chunk-AN5U7FWW.js";import"./chunk-MZNUCWQU.js";import{a as K,b as Q}from"./chunk-CEM3JUSV.js";import"./chunk-3QNS3IZB.js";import{a as h,b as E,i as R}from"./chunk-5XHL6B25.js";import"./chunk-JKEUTGPQ.js";import"./chunk-YHD2RXJC.js";import"./chunk-VIQQ3IHI.js";import"./chunk-FLW5LACO.js";import"./chunk-JTSHX4RB.js";import"./chunk-ILX4QHHH.js";import"./chunk-OVTH3ZHO.js";import"./chunk-F2VYTYIQ.js";import"./chunk-PGRQG254.js";import"./chunk-7QRAEME3.js";import"./chunk-FJPY27YJ.js";import"./chunk-H2OBH7SK.js";import"./chunk-YUQ3GDQI.js";import{c as z,d as P}from"./chunk-GCWEOZBS.js";import"./chunk-3X36ZFNP.js";import"./chunk-LWGSXQKI.js";import"./chunk-5BRMLRS7.js";import"./chunk-Z5WMKCRJ.js";import"./chunk-D5AR26AI.js";import"./chunk-TVZAFTPT.js";import{a as F,c as w}from"./chunk-KQPDXXG3.js";import{a as t}from"./chunk-P37U34EQ.js";import{QueryClientProvider as Ke}from"@tanstack/react-query";import{useMemo as Qe,Suspense as $e,useRef as Ge}from"react";function f(e){let r=document.documentElement;Object.keys(e).forEach(o=>{let n=e[o];n&&r.style.setProperty(o,n)})}t(f,"setCssProperties");function Ce(e){let r={};return Object.keys(e).forEach(o=>{r[`--${o}`]=e[o]}),r}t(Ce,"mapThemeColors");function Pe(e){return{"--spacing":e}}t(Pe,"mapThemeSpacing");function he(e){return{"--radius":e}}t(he,"mapThemeBorderRadius");function Ee(e){return{"--fontSizeBase":e.fontSizeBase}}t(Ee,"mapThemeFont");function b(e){e?.colors&&f(Ce(e.colors)),e?.spacing&&f(Pe(e.spacing)),e?.borderRadius&&f(he(e.borderRadius)),e?.font&&f(Ee(e.font))}t(b,"applyTheme");import{createContext as Re,useEffect as Fe,useMemo as we}from"react";import{jsx as ve}from"react/jsx-runtime";var xe=Re({theme:{}});function T(e){Fe(()=>{e.theme&&Object.keys(e.theme).length>0&&b(e.theme)},[e.theme]);let r=we(()=>({theme:e.theme}),[e.theme]);return ve(xe.Provider,{value:r,children:e.children})}t(T,"ThemeProvider");var S={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"},C="production";var p="1.9.0";function be(e){try{return new URL(e),!0}catch{return!1}}t(be,"isValidUrl");function k(e,r){let o={current:null},n=r?.environment?S[r?.environment]:"https://gateway.remote.com",s=E.getConfig();r?.environment&&r?.environment!=="production"&&P(p);let l=!!r?.proxy&&be(r.proxy.url);return r?.proxy&&!l&&console.error("Invalid proxy URL provided. Using default base URL."),h({...s,headers:{...s.headers,...l?r?.proxy?.headers:{},"X-Client-Name":"remote-flows-sdk","X-Client-Version":p},baseUrl:l?r.proxy?.url:n,auth:t(async()=>{function m(a){return!a||Date.now()+6e4>a}if(t(m,"hasTokenExpired"),!o.current||m(o.current.expiresAt))try{let a=await e();o.current={accessToken:a.accessToken,expiresAt:Date.now()+a.expiresIn*1e3}}catch(a){console.error("Failed to fetch auth token:",a);return}return o.current?.accessToken},"auth")})}t(k,"createClient");import{Component as Me}from"react";var D=[{category:"RENDER_ERROR",severity:"critical",messagePatterns:["element type is invalid","hydration","rendered more hooks","rendered fewer hooks"],namePatterns:["invariantviolation"]},{category:"HOOK_ERROR",severity:"critical",messagePatterns:["hook","useeffect","usestate","usecontext"],namePatterns:[]},{category:"STATE_ERROR",severity:"error",messagePatterns:["state","context","provider"],namePatterns:[]},{category:"RENDER_ERROR",severity:"critical",messagePatterns:["render","component"],namePatterns:[]},{category:"RUNTIME_ERROR",severity:"critical",messagePatterns:[],namePatterns:["typeerror","referenceerror"]},{category:"RUNTIME_ERROR",severity:"error",messagePatterns:[],namePatterns:["rangeerror"]}],Te=["cannot read property","is not a function","is not defined"],N=["warning","deprecated"],O=t(e=>{let r=e.message.toLowerCase(),o=e.name.toLowerCase();if(N.some(n=>r.includes(n)))return"UNKNOWN_ERROR";for(let n of D){let s=n.messagePatterns.some(m=>r.includes(m)),l=n.namePatterns.some(m=>o.includes(m));if(s||l)return n.category}return"UNKNOWN_ERROR"},"categorizeError"),B=t((e,r)=>{let o=e.message.toLowerCase(),n=e.name.toLowerCase();if(N.some(s=>o.includes(s)))return"warning";if(Te.some(s=>o.includes(s)))return"critical";for(let s of D){if(s.category!==r)continue;let l=s.messagePatterns.some(a=>o.includes(a)),m=s.namePatterns.some(a=>n.includes(a));if(l||m)return s.severity}return"error"},"determineErrorSeverity");var d=new Map,A=100;function Se(e){return`${e.name}:${e.message}:${e.stack?.substring(0,100)||""}`}t(Se,"getErrorSignature");function ke(e){let r=Se(e),o=d.get(r),n=Date.now();if(o&&n-o<A)return!0;if(d.set(r,n),d.size>100)for(let[s,l]of d.entries())n-l>A&&d.delete(s);return!1}t(ke,"wasRecentlyReported");var De=t((e,r)=>{if(!r)return;let o={critical:"\u{1F534}",error:"\u{1F7E0}",warning:"\u{1F7E1}",info:"\u{1F535}"};console.group("\u{1F4EE} [RemoteFlows] Error Report (Debug Mode)"),console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),console.log("\u274C Error:",e.error.message),console.log("\u{1F4DB} Name:",e.error.name),console.log(`${o[e.error.severity]} Severity:`,e.error.severity.toUpperCase()),console.log("\u{1F3F7}\uFE0F Category:",e.error.category),e.context?.flow&&console.log("\u{1F504} Flow:",e.context.flow),e.context?.step!==void 0&&console.log("\u{1F4CD} Step:",e.context.step),e.context?.metadata&&console.log("\u{1F4DD} Context Metadata:",e.context.metadata),console.log("\u23F0 Timestamp:",e.metadata.timestamp),console.log("\u{1F310} URL:",e.metadata.url),console.log("\u{1F4E6} SDK Version:",e.metadata.sdk_version),e.error.stack&&(console.log(`
|
|
2
2
|
\u{1F4DA} Stack Trace:`),console.log(e.error.stack)),console.log(`
|
|
3
|
-
\u{1F4CB} Full Payload (would be sent to telemetry):`),console.log(JSON.stringify(e,null,2)),console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),console.groupEnd()},"logDebugPayload"),Ne=t(()=>typeof window<"u"?window.location.href:"unknown","getUrl"),Oe=t(e=>e?btoa(e):"","encodeStack");function Be(e,r,o,n){let s=O(e),l=B(e,s),m=Ne(),a=Oe(e.stack);return{error:{message:e.message,stack:a,name:e.name,category:s,severity:l},context:n,metadata:{sdk_version:r,timestamp:new Date().toISOString(),url:m,user_agent:typeof navigator<"u"?navigator.userAgent:"unknown",environment:o}}}t(Be,"buildErrorPayload");function Ae(e,r){let o=e==="local",n=r.includes("localhost")||r.includes("127.0.0.1");return o===n}t(Ae,"shouldSendTelemetry");function M(e,r,o={debugMode:!1}){let{error:n,sdkVersion:s,client:l,environment:m}=e;if(ke(n)){o.debugMode&&console.log("[RemoteFlows] Skipping duplicate error report");return}let a=Be(n,s,m??C,r);if(o.debugMode&&De(a,!!o.debugMode),!Ae(m??C,a.metadata.url)){o.debugMode&&console.log("[RemoteFlows] Skipping telemetry API call (local environment)");return}R({client:l,body:a}).catch(W=>{o.debugMode&&console.warn("[RemoteFlows] Failed to report error telemetry:",W)})}t(M,"reportTelemetryError");import{jsx as I}from"react/jsx-runtime";var Ie=t(()=>I("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"),g=class extends Me{static{t(this,"RemoteFlowsErrorBoundary")}constructor(r){super(r),this.state={hasError:!1,error:null}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}static contextType=x;componentDidCatch(r,o){console.error("[RemoteFlows] Error caught:",r,o);let n=this.context?.errorContextRef.current,s={error:r,sdkVersion:p,client:this.props.client,environment:this.props.environment};if(M(s,n,{debugMode:this.props.debug}),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:I(Ie,{}):this.props.children}};import{lazy as i}from"react";var V={button:i(()=>import("./ButtonDefault-NLDQHAWN.js").then(e=>({default:e.ButtonDefault}))),checkbox:i(()=>import("./CheckboxFieldDefault-QXABRJXG.js").then(e=>({default:e.CheckboxFieldDefault}))),countries:i(()=>import("./CountryFieldDefault-
|
|
3
|
+
\u{1F4CB} Full Payload (would be sent to telemetry):`),console.log(JSON.stringify(e,null,2)),console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),console.groupEnd()},"logDebugPayload"),Ne=t(()=>typeof window<"u"?window.location.href:"unknown","getUrl"),Oe=t(e=>e?btoa(e):"","encodeStack");function Be(e,r,o,n){let s=O(e),l=B(e,s),m=Ne(),a=Oe(e.stack);return{error:{message:e.message,stack:a,name:e.name,category:s,severity:l},context:n,metadata:{sdk_version:r,timestamp:new Date().toISOString(),url:m,user_agent:typeof navigator<"u"?navigator.userAgent:"unknown",environment:o}}}t(Be,"buildErrorPayload");function Ae(e,r){let o=e==="local",n=r.includes("localhost")||r.includes("127.0.0.1");return o===n}t(Ae,"shouldSendTelemetry");function M(e,r,o={debugMode:!1}){let{error:n,sdkVersion:s,client:l,environment:m}=e;if(ke(n)){o.debugMode&&console.log("[RemoteFlows] Skipping duplicate error report");return}let a=Be(n,s,m??C,r);if(o.debugMode&&De(a,!!o.debugMode),!Ae(m??C,a.metadata.url)){o.debugMode&&console.log("[RemoteFlows] Skipping telemetry API call (local environment)");return}R({client:l,body:a}).catch(W=>{o.debugMode&&console.warn("[RemoteFlows] Failed to report error telemetry:",W)})}t(M,"reportTelemetryError");import{jsx as I}from"react/jsx-runtime";var Ie=t(()=>I("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"),g=class extends Me{static{t(this,"RemoteFlowsErrorBoundary")}constructor(r){super(r),this.state={hasError:!1,error:null}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}static contextType=x;componentDidCatch(r,o){console.error("[RemoteFlows] Error caught:",r,o);let n=this.context?.errorContextRef.current,s={error:r,sdkVersion:p,client:this.props.client,environment:this.props.environment};if(M(s,n,{debugMode:this.props.debug}),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:I(Ie,{}):this.props.children}};import{lazy as i}from"react";var V={button:i(()=>import("./ButtonDefault-NLDQHAWN.js").then(e=>({default:e.ButtonDefault}))),checkbox:i(()=>import("./CheckboxFieldDefault-QXABRJXG.js").then(e=>({default:e.CheckboxFieldDefault}))),countries:i(()=>import("./CountryFieldDefault-VJM3C6WE.js").then(e=>({default:e.CountryFieldDefault}))),date:i(()=>import("./DatePickerFieldDefault-3MBSCS3W.js").then(e=>({default:e.DatePickerFieldDefault}))),drawer:i(()=>import("./DrawerDefault-5EYKRPS7.js").then(e=>({default:e.DrawerDefault}))),email:i(()=>import("./EmailFieldDefault-3ES7SMDC.js").then(e=>({default:e.EmailFieldDefault}))),fieldsetToggle:i(()=>import("./FieldsetToggleButtonDefault-TPLNRX3E.js").then(e=>({default:e.FieldsetToggleButtonDefault}))),file:i(()=>import("./FileUploadFieldDefault-PNM6H64X.js").then(e=>({default:e.FileUploadFieldDefault}))),"multi-select":i(()=>import("./MultiSelectFieldDefault-THD7TDWF.js").then(e=>({default:e.MultiSelectFieldDefault}))),number:i(()=>import("./NumberFieldDefault-PCH6RRDK.js").then(e=>({default:e.NumberFieldDefault}))),radio:i(()=>import("./RadioGroupFieldDefault-CM33F3EP.js").then(e=>({default:e.RadioGroupFieldDefault}))),select:i(()=>import("./SelectFieldDefault-NHDJRM5H.js").then(e=>({default:e.SelectFieldDefault}))),statement:i(()=>import("./StatementDefault-CSHXL3G2.js").then(e=>({default:e.StatementDefault}))),textarea:i(()=>import("./TextAreaFieldDefault-OG4UM4DG.js").then(e=>({default:e.TextAreaFieldDefault}))),text:i(()=>import("./TextFieldDefault-FECR4GRK.js").then(e=>({default:e.TextFieldDefault}))),zendeskDrawer:i(()=>import("./ZendeskDrawerDefault-W3RCTVCH.js").then(e=>({default:e.ZendeskDrawerDefault}))),table:i(()=>import("./TableFieldDefault-N7MO2QJI.js").then(e=>({default:e.TableFieldDefault}))),"work-schedule":i(()=>import("./WorkScheduleFieldDefault-G2MR2DBY.js").then(e=>({default:e.WorkScheduleFieldDefault}))),pdfViewer:i(()=>import("./PDFPreviewDefault-474JH3KB.js").then(e=>({default:e.PDFPreviewDefault})))};import{jsx as y,jsxs as Ve}from"react/jsx-runtime";function _(){return Ve("div",{className:"animate-pulse space-y-4 p-4",children:[y("div",{className:"h-4 bg-gray-200 rounded w-1/4"}),y("div",{className:"h-10 bg-gray-200 rounded"}),y("div",{className:"h-4 bg-gray-200 rounded w-1/4"}),y("div",{className:"h-10 bg-gray-200 rounded"})]})}t(_,"FormLoadingFallback");import{useState as _e,useEffect as Ue}from"react";import{Fragment as Le,jsx as We}from"react/jsx-runtime";function U({fallback:e,delay:r=200}){let[o,n]=_e(!1);return Ue(()=>{let s=setTimeout(()=>{n(!0)},r);return()=>clearTimeout(s)},[r]),o?We(Le,{children:e}):null}t(U,"DelayedFallback");import{QueryClient as ze}from"@tanstack/react-query";var L=t(()=>new ze,"getQueryClient");import{jsx as c}from"react/jsx-runtime";function Ze({children:e,client:r}){return c(w.Provider,{value:{client:r},children:e})}t(Ze,"RemoteFlowContextWrapper");function He({children:e,components:r={}}){let o=Qe(()=>({...V,...r}),[r]);return c(F.Provider,{value:{components:o},children:c($e,{fallback:c(U,{fallback:c(_,{}),delay:200}),children:e})})}t(He,"FormFieldsProvider");var Je=L();function Xe({auth:e,children:r,components:o,theme:n,proxy:s,environment:l,errorBoundary:m={useParentErrorBoundary:!0},debug:a=!1}){let u=Ge(k(e,{proxy:s,environment:l})).current;return c(v,{children:c(g,{errorBoundary:m,debug:a,environment:l,client:u,children:c(Ke,{client:Je,children:c(He,{components:o,children:c(Ze,{environment:l,debug:a,client:u,children:c(T,{theme:n,children:r})})})})})})}t(Xe,"RemoteFlows");export{oe as ContractAmendmentConfirmationForm,le as ContractAmendmentFlow,te as ContractAmendmentForm,ne as ContractAmendmentSubmit,ye as ContractorOnboardingFlow,X as CostCalculatorFlow,Y as CostCalculatorForm,j as CostCalculatorResetButton,q as CostCalculatorSubmitButton,ee as EstimationResults,ge as OnboardingFlow,Xe as RemoteFlows,re as SummaryResults,fe as TerminationDialogInfoContent,de as TerminationFlow,ue as TerminationReasonsDetailContent,Q as ZendeskTriggerButton,G as buildCostCalculatorEstimationPayload,$ as convertFromCents,z as transformYupErrorsIntoObject,ie as useContractAmendment,J as useCostCalculator,H as useCostCalculatorEstimationCsv,Z as useCostCalculatorEstimationPdf,se as useEmploymentQuery,ae as useMagicLink,ce as usePaidTimeoffBreakdownQuery,pe as useTimeOffLeavePoliciesSummaryQuery,me as useTimeOffQuery,K as zendeskArticles};
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/internals.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as cn } from './utils-
|
|
1
|
+
export { c as cn } from './utils-DNGgpT60.js';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -14,8 +14,8 @@ import * as SelectPrimitive from '@radix-ui/react-select';
|
|
|
14
14
|
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
15
15
|
import 'clsx';
|
|
16
16
|
import 'yup';
|
|
17
|
-
import './remoteFlows-
|
|
18
|
-
import './types.gen-
|
|
17
|
+
import './remoteFlows-DtWy_kl6.js';
|
|
18
|
+
import './types.gen-Dg6qF5i1.js';
|
|
19
19
|
import './types-ZWIpiFgj.js';
|
|
20
20
|
import 'react-hook-form';
|
|
21
21
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren, ReactNode } from 'react';
|
|
2
2
|
import { AnySchema } from 'yup';
|
|
3
|
-
import {
|
|
3
|
+
import { a0 as HelpCenterArticle } from './types.gen-Dg6qF5i1.js';
|
|
4
4
|
import { B as BaseTypes } from './types-ZWIpiFgj.js';
|
|
5
5
|
import { ControllerRenderProps, FieldValues, ControllerFieldState } from 'react-hook-form';
|
|
6
6
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { d as EmploymentCreationResponse, e as EmploymentResponse, S as SuccessResponse, U as UnprocessableEntityResponse, T as TooManyRequestsResponse, q as ConflictResponse, B as BadRequestResponse, F as ForbiddenResponse, N as NotFoundResponse, a as UnauthorizedResponse, E as Employment$1, r as EmploymentCreateParams } from './types.gen-
|
|
1
|
+
import { d as EmploymentCreationResponse, e as EmploymentResponse, S as SuccessResponse, U as UnprocessableEntityResponse, T as TooManyRequestsResponse, q as ConflictResponse, B as BadRequestResponse, F as ForbiddenResponse, N as NotFoundResponse, a as UnauthorizedResponse, E as Employment$1, r as EmploymentCreateParams } from './types.gen-Dg6qF5i1.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-D1eQrIJS.js';
|
|
6
6
|
import { OnboardingSubmit } from './flows/Onboarding/components/OnboardingSubmit.js';
|
|
7
|
-
import { C as Components, J as JSFFields, M as Meta, a as JSFFieldset } from './remoteFlows-
|
|
7
|
+
import { C as Components, J as JSFFields, M as Meta, a as JSFFieldset } from './remoteFlows-DtWy_kl6.js';
|
|
8
8
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
9
9
|
import * as React$1 from 'react';
|
|
10
10
|
import { ValidationResult } from '@remoteoss/remote-json-schema-form-kit';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { O as OffboardingResponse,
|
|
1
|
+
import { O as OffboardingResponse, a1 as PayrollCalendarEor, E as Employment, x as TerminationDetailsParams, N as NotFoundResponse, U as UnprocessableEntityResponse, T as TooManyRequestsResponse, B as BadRequestResponse, a as UnauthorizedResponse, R as RequestError } from './types.gen-Dg6qF5i1.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-D1eQrIJS.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 * as _remoteoss_json_schema_form_v0_deprecated from '@remoteoss/json-schema-form-v0-deprecated';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { L as ListTimeoffResponse,
|
|
1
|
+
import { L as ListTimeoffResponse, Q as TimeoffStatus, W as TimeoffType, X as ListLeavePoliciesSummaryResponse, E as Employment } from './types.gen-Dg6qF5i1.js';
|
|
2
2
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
3
3
|
import { UseQueryResult } from '@tanstack/react-query';
|
|
4
4
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { d as EmploymentCreationResponse, S as SuccessResponse, e as EmploymentResponse, f as CreateContractDocumentResponse, E as Employment, g as Signatory, A as SignContractDocument } from './types.gen-
|
|
1
|
+
import { d as EmploymentCreationResponse, S as SuccessResponse, e as EmploymentResponse, f as CreateContractDocumentResponse, E as Employment, g as Signatory, A as SignContractDocument } from './types.gen-Dg6qF5i1.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 { C as Components, J as JSFFields, M as Meta, a as JSFFieldset, $ as $TSFixMe } from './remoteFlows-
|
|
6
|
-
import { N as NormalizedFieldError } from './mutations-
|
|
5
|
+
import { C as Components, J as JSFFields, M as Meta, a as JSFFieldset, $ as $TSFixMe } from './remoteFlows-DtWy_kl6.js';
|
|
6
|
+
import { N as NormalizedFieldError } from './mutations-D1eQrIJS.js';
|
|
7
7
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
8
8
|
import * as React$1 from 'react';
|
|
9
9
|
import { FieldValues } from 'react-hook-form';
|
|
@@ -11,7 +11,7 @@ import { ValidationResult } from '@remoteoss/remote-json-schema-form-kit';
|
|
|
11
11
|
import { STEPS } from './flows/ContractorOnboarding/utils.js';
|
|
12
12
|
import { Step } from './flows/useStepState.js';
|
|
13
13
|
import { BasicInformationStep } from './flows/ContractorOnboarding/components/BasicInformationStep.js';
|
|
14
|
-
import { g as SelectCountryStep } from './types-
|
|
14
|
+
import { g as SelectCountryStep } from './types-C73xHbIf.js';
|
|
15
15
|
import { FlowOptions, JSFModify } from './flows/types.js';
|
|
16
16
|
import { OnboardingInvite } from './flows/Onboarding/components/OnboardingInvite.js';
|
|
17
17
|
import { ContractReviewButton } from './flows/ContractorOnboarding/components/ContractReviewButton.js';
|
|
@@ -848,6 +848,37 @@ type ContractAmendment = {
|
|
|
848
848
|
submitted_at: string;
|
|
849
849
|
zendesk_ticket_url: string | null;
|
|
850
850
|
};
|
|
851
|
+
/**
|
|
852
|
+
* ContractDocumentItem
|
|
853
|
+
*
|
|
854
|
+
* Contract document item in list response
|
|
855
|
+
*/
|
|
856
|
+
type ContractDocumentItem = {
|
|
857
|
+
/**
|
|
858
|
+
* Contract document slug/ID
|
|
859
|
+
*/
|
|
860
|
+
id: string;
|
|
861
|
+
/**
|
|
862
|
+
* Created timestamp
|
|
863
|
+
*/
|
|
864
|
+
inserted_at: string;
|
|
865
|
+
/**
|
|
866
|
+
* Contract document name
|
|
867
|
+
*/
|
|
868
|
+
name: string | null;
|
|
869
|
+
/**
|
|
870
|
+
* Contract document status
|
|
871
|
+
*/
|
|
872
|
+
status: 'draft' | 'awaiting_signatures' | 'finished' | 'archived' | 'revised' | 'awaiting_customer_approval' | 'approved_by_customer' | 'rejected_by_customer';
|
|
873
|
+
/**
|
|
874
|
+
* Contract document type
|
|
875
|
+
*/
|
|
876
|
+
type: string;
|
|
877
|
+
/**
|
|
878
|
+
* Last updated timestamp
|
|
879
|
+
*/
|
|
880
|
+
updated_at: string | null;
|
|
881
|
+
};
|
|
851
882
|
/**
|
|
852
883
|
* TaskDescription
|
|
853
884
|
*
|
|
@@ -1775,4 +1806,4 @@ type PostAutomatableContractAmendmentErrors = {
|
|
|
1775
1806
|
};
|
|
1776
1807
|
type PostAutomatableContractAmendmentError = PostAutomatableContractAmendmentErrors[keyof PostAutomatableContractAmendmentErrors];
|
|
1777
1808
|
|
|
1778
|
-
export type {
|
|
1809
|
+
export type { Currency as $, SignContractDocument as A, BadRequestResponse as B, ContractAmendmentAutomatableResponse as C, ContractorSubscriptionsSummary as D, Employment as E, ForbiddenResponse as F, ManageContractorPlusSubscriptionOperationsParams as G, CreateContractDocument as H, File as I, DateTimeIso8601 as J, ContractDocumentItem as K, ListTimeoffResponse as L, MinimalRegion as M, NotFoundResponse as N, OffboardingResponse as O, PostCreateContractAmendmentError as P, TimeoffStatus as Q, RequestError as R, SuccessResponse as S, TooManyRequestsResponse as T, UnprocessableEntityResponse as U, ValidationError as V, TimeoffType as W, ListLeavePoliciesSummaryResponse as X, CreateOffboardingParams as Y, MagicLinkResponse as Z, MagicLinkParams as _, UnauthorizedResponse as a, HelpCenterArticle as a0, PayrollCalendarEor as a1, ContractAmendmentResponse as b, PostAutomatableContractAmendmentError as c, EmploymentCreationResponse as d, EmploymentResponse as e, CreateContractDocumentResponse as f, Signatory as g, CostCalculatorEstimateResponse as h, CostCalculatorEstimatePdfResponse as i, CostCalculatorEstimateParams as j, CostCalculatorEstimateCsvResponse as k, MinimalCountry as l, EmploymentTermType as m, CostCalculatorEmployment as n, PostCreateEstimationError as o, Company as p, ConflictResponse as q, EmploymentCreateParams as r, EmploymentFullParams as s, UnifiedEmploymentUpsertBenefitOffersRequest as t, ConvertCurrencyResponse as u, ConvertCurrencyParams as v, CreateContractEligibilityParams as w, TerminationDetailsParams as x, UploadFileResponse as y, FileParams as z };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ClassValue } from 'clsx';
|
|
2
2
|
import { ValidationError } from 'yup';
|
|
3
|
-
import './remoteFlows-
|
|
3
|
+
import './remoteFlows-DtWy_kl6.js';
|
|
4
4
|
|
|
5
5
|
declare function cn(...inputs: ClassValue[]): string;
|
|
6
6
|
type YupError = Pick<ValidationError, 'type' | 'errors'> & {
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-JZNJIXGW.js";import"./chunk-3WBZPCT5.js";import"./chunk-A54D24NT.js";import"./chunk-AQHD46DV.js";import"./chunk-3QNS3IZB.js";import"./chunk-JTLXUYOR.js";import"./chunk-H2OBH7SK.js";import"./chunk-YUQ3GDQI.js";import"./chunk-GCWEOZBS.js";import"./chunk-3X36ZFNP.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as DatePickerFieldDefault};
|
|
2
|
-
//# sourceMappingURL=DatePickerFieldDefault-HUP4TK2U.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a}from"./chunk-FZ452U6M.js";import"./chunk-3WBZPCT5.js";import"./chunk-AQHD46DV.js";import"./chunk-3QNS3IZB.js";import"./chunk-JTLXUYOR.js";import"./chunk-FLW5LACO.js";import"./chunk-YUQ3GDQI.js";import"./chunk-GCWEOZBS.js";import"./chunk-3X36ZFNP.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as RadioGroupFieldDefault};
|
|
2
|
-
//# sourceMappingURL=RadioGroupFieldDefault-E35Y2AK6.js.map
|
package/dist/chunk-FYFW7DCQ.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as Vt,b as vt,c as Et}from"./chunk-UMOL4GLZ.js";import{a as ct,f as lt,h as dt,i as ut,k as mt}from"./chunk-A24VPRL7.js";import{c as rt,d as st}from"./chunk-H6YNMT4M.js";import{a as yt,b as _t,c as St,d as gt,f as bt,g as wt,h as Ct,i as Pt,j as Ft,k as ht}from"./chunk-L34CQIPW.js";import{a as Ot,b as It,c as Mt}from"./chunk-NQURNHBL.js";import{a as L,b as x,c as ft}from"./chunk-N4W7JU2D.js";import{d,e as F}from"./chunk-HRG5MSVG.js";import{h as P,i as I}from"./chunk-GCWEOZBS.js";import{a as C}from"./chunk-3X36ZFNP.js";import{a as pt}from"./chunk-5BRMLRS7.js";import{a as S}from"./chunk-P37U34EQ.js";import{useEffect as ye,useMemo as s,useRef as _e,useState as G}from"react";import Dt from"lodash.omit";var Se={select_country:null,basic_information:"employment_basic_information",contract_details:null,pricing_plan:null,contract_preview:null,review:null},ge={employment_basic_information:"basic_information"},be=new Date().toISOString().split("T")[0],Je=S(({countryCode:Tt,externalId:Rt,employmentId:u,skipSteps:Lt,options:g,initialValues:c})=>{let[i,H]=G(Tt||null),[r,Jt]=G(u),[J,kt]=G(void 0),M=_e({select_country:{},basic_information:{},contract_details:{},contract_preview:{},pricing_plan:{}}),jt=Lt?.includes("select_country")?vt:Vt,{fieldValues:l,stepState:e,setFieldValues:At,previousStep:Bt,nextStep:Ut,goToStep:k,setStepValues:K}=pt(jt),{data:a,isLoading:j,refetch:qt}=ct(r),{status:b}=a||{},A=b&&rt.includes(b),Nt=b&&!st.includes(b),xt=s(()=>b==="invited"?"invited":"not_invited",[b]),W=dt(),Y=ut(i,g),B=wt(),z=yt(),{mutateAsync:Q}=Ft(B,z,l),{mutateAsyncOrThrow:Gt}=C(Y),X=St(),Z=bt(),{mutateAsyncOrThrow:Ht}=C(W),{mutateAsyncOrThrow:Kt}=C(B),{mutateAsyncOrThrow:Wt}=C(X),{mutateAsyncOrThrow:$}=C(Z);u&&a?.country?.code&&!i&&H(a.country.code);let{selectCountryForm:D,isLoading:Yt}=mt({jsfModify:g?.jsfModify?.select_country,queryOptions:{enabled:e.currentStep.name==="select_country"}}),{form:f,isLoading:zt}=Pt(r,{jsonSchemaVersion:g?.jsonSchemaVersion,queryOptions:{enabled:e.currentStep.name==="pricing_plan"}}),Qt=Se[e.currentStep.name]||"contractor_basic_information",Xt=ge[Qt],Zt=a?.[Xt]||{},$t=S(({form:t,options:o={},query:_={}})=>{let w=Object.keys(l).length>0?{...c,...e.values?.[e.currentStep.name],...l}:{...c,...Zt};return lt({countryCode:i,form:t,fieldValues:w,query:_,options:{...o,queryOptions:{enabled:o.queryOptions?.enabled??!0}}})},"useJSONSchema"),te=!!(i&&(e.currentStep.name==="basic_information"||u)),ee=!!(i&&(e.currentStep.name==="contract_details"||u)),ne=!!(i==="GBR"&&u&&e.currentStep.name==="basic_information"),{data:T,isLoading:oe}=ht(u,{enabled:ne}),{data:m,isLoading:ae}=$t({form:"contractor_basic_information",options:{jsfModify:It(i,g),queryOptions:{enabled:te}}}),ie=s(()=>Et(a?.basic_information?.provisional_start_date,l?.service_duration?.provisional_start_date),[a?.basic_information?.provisional_start_date,l?.service_duration?.provisional_start_date]),U=s(()=>a?.contractor_type?{standard:L,plus:x,cor:ft}[a?.contractor_type]||L:void 0,[a]),{data:p,isLoading:re}=Ct({countryCode:i,fieldValues:l,options:{queryOptions:{enabled:ee},jsfModify:Ot(g?.jsfModify?.contract_details,ie,U,l)}}),{data:y}=_t({fieldValues:l,options:{queryOptions:{enabled:e.currentStep.name==="contract_preview"},jsfModify:Mt(g,l)}}),{data:se,isLoading:ce}=gt({employmentId:r,contractDocumentId:J,options:{queryOptions:{enabled:!!J}}}),n=s(()=>({select_country:D?.fields||[],basic_information:m?.fields||[],pricing_plan:f?.fields||[],contract_details:p?.fields||[],contract_preview:y?.fields||[],review:[]}),[D?.fields,m?.fields,f?.fields,p?.fields,y?.fields]),le={select_country:null,basic_information:m?.meta["x-jsf-fieldsets"],pricing_plan:null,contract_details:p?.meta["x-jsf-fieldsets"],contract_preview:null,review:null},{country:de,basic_information:R={},contract_details:tt={}}=a||{},et=de?.code,h=s(()=>F(n.select_country,{country:i||et||""}),[n.select_country,i,et]),V=s(()=>{let t={provisional_start_date:be,...c,...R,ir35:a?.contract_details?.ir_35,saudi_nationality_status:a?.contract_details?.nationality,...T?.content&&{ir35_sds_file:[new File([T.content],T.name,{type:"application/pdf"})]}};return F(n.basic_information,t)},[c,R,a?.contract_details?.ir_35,a?.contract_details?.nationality,T,n.basic_information]),v=s(()=>{let o={...{service_duration:{provisional_start_date:R.provisional_start_date}},...c,...tt};return F(n.contract_details,o)},[n.contract_details,tt,c,R]),nt=s(()=>{let t={...c};return F(n.contract_preview,t)},[n.contract_preview,c]),E=s(()=>{let o={...{subscription:U},...c};return F(n.pricing_plan,o)},[n.pricing_plan,c,U]),ue=s(()=>({select_country:h,basic_information:V,contract_details:v,contract_preview:nt,pricing_plan:E}),[h,V,v,nt,E]),ot=s(()=>!!(!!(u&&A&&e.currentStep.name!=="review")&&!j&&n.basic_information.length>0&&n.contract_details.length>0),[u,A,j,n.basic_information.length,n.contract_details.length,e.currentStep.name]);ye(()=>{ot&&(M.current={select_country:P(h,n.select_country),basic_information:P(V,n.basic_information),contract_details:P(v,n.contract_details),contract_preview:{},pricing_plan:P(E,n.pricing_plan)},K({select_country:h,basic_information:V,contract_details:v,contract_preview:{},pricing_plan:E,review:{}}),k("review"))},[ot,k,h,V,v,K,n.select_country,n.basic_information,n.contract_details,n.pricing_plan,E]);let me=S(t=>{k(t)},"goTo"),at=S(async t=>D&&e.currentStep.name==="select_country"?t:m&&e.currentStep.name==="basic_information"?await d(t,m?.fields,{isPartialValidation:!1}):p&&e.currentStep.name==="contract_details"?await d(t,p?.fields,{isPartialValidation:!1}):y&&e.currentStep.name==="contract_preview"?await d(t,y?.fields,{isPartialValidation:!1}):f&&e.currentStep.name==="pricing_plan"?await d(t,f?.fields,{isPartialValidation:!1}):{},"parseFormValues");async function pe(t){let o=e.currentStep.name;o in M.current&&(M.current[o]=P(t,n[o]));let _=await at(t);switch(e.currentStep.name){case"select_country":return H(_.country),Promise.resolve({data:{countryCode:_.country}});case"basic_information":{let q=!r&&i,w=r&&i&&a?.country&&a?.country.code!==i;if(q||w){let fe={basic_information:Dt(_,"saudi_nationality_status","ir35","ir35_sds_file"),type:"contractor",country_code:i,external_id:Rt},it=await Ht(fe),N=it?.data?.employment?.id;if(!N)throw I("Employment ID not found");return Jt(N),await Q({employmentId:N}),it}else if(r){let O=Dt(_,"saudi_nationality_status","ir35","ir35_sds_file");return await Q({employmentId:r}),Gt({employmentId:r,basic_information:O})}return}case"contract_details":{let w=await Kt({employmentId:r,payload:{contract_document:_}}),O=w?.data?.contract_document?.id;if(!O)throw I("Contract document ID not found");return kt(O),w}case"contract_preview":return Wt({employmentId:r,contractDocumentId:J,payload:{signature:t.signature}});case"pricing_plan":{if(t.subscription==L)return $({employmentId:r,payload:{operation:"downgrade"}});if(t.subscription==x)return $({employmentId:r,payload:{operation:"upgrade"}});throw I("invalid selection")}default:throw I("Invalid step state")}}return S(pe,"onSubmit"),{isLoading:Yt||ae||j||re||zt||ce||oe,fieldValues:l,stepState:e,checkFieldUpdates:At,back:Bt,next:Ut,goTo:me,onSubmit:pe,fields:n[e.currentStep.name],meta:{fields:M.current,fieldsets:le[e.currentStep.name]},parseFormValues:at,handleValidation:S(async t=>{if(e.currentStep.name==="select_country")return D.handleValidation(t);if(m&&e.currentStep.name==="basic_information"){let o=await d(t,m?.fields,{isPartialValidation:!1});return m?.handleValidation(o)}if(p&&e.currentStep.name==="contract_details"){let o=await d(t,p?.fields,{isPartialValidation:!1});return p?.handleValidation(o)}if(y&&e.currentStep.name==="contract_preview"){let o=await d(t,y?.fields,{isPartialValidation:!0});return y?.handleValidation(o)}if(f&&e.currentStep.name==="pricing_plan"){let o=await d(t,f?.fields,{isPartialValidation:!1});return f?.handleValidation(o)}return null},"handleValidation"),initialValues:ue,employmentId:r,refetchEmployment:qt,isSubmitting:W.isPending||Y.isPending||B.isPending||X.isPending||Z.isPending||z.isPending,documentPreviewPdf:se,canInvite:Nt,isEmploymentReadOnly:A,invitedStatus:xt,employment:a}},"useContractorOnboarding");export{Je as a};
|
|
2
|
-
//# sourceMappingURL=chunk-FYFW7DCQ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/ContractorOnboarding/hooks.tsx"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from 'react';\nimport { FieldValues } from 'react-hook-form';\nimport omit from 'lodash.omit';\nimport { JSFFields } from '@/src/types/remoteFlows';\nimport {\n CreateContractDocument,\n Employment,\n EmploymentCreateParams,\n} from '@/src/client/types.gen';\nimport {\n getInitialValues,\n parseJSFToValidate,\n} from '@/src/components/form/utils';\nimport { ValidationResult } from '@remoteoss/remote-json-schema-form-kit';\nimport {\n useContractorOnboardingDetailsSchema,\n useCreateContractorContractDocument,\n useGetContractDocumentSignatureSchema,\n usePostManageContractorSubscriptions,\n useContractorSubscriptionSchemaField,\n useGetShowContractDocument,\n useSignContractDocument,\n useUpdateUKandSaudiFields,\n useGetIR35File,\n} from '@/src/flows/ContractorOnboarding/api';\nimport { ContractorOnboardingFlowProps } from '@/src/flows/ContractorOnboarding/types';\nimport {\n STEPS,\n STEPS_WITHOUT_SELECT_COUNTRY,\n calculateProvisionalStartDateDescription,\n} from '@/src/flows/ContractorOnboarding/utils';\nimport {\n useCountriesSchemaField,\n useCreateEmployment,\n useEmployment,\n useJSONSchemaForm,\n useUpdateEmployment,\n} from '@/src/flows/Onboarding/api';\nimport {\n disabledInviteButtonEmploymentStatus,\n reviewStepAllowedEmploymentStatus,\n} from '@/src/flows/Onboarding/utils';\nimport { FlowOptions, JSFModify, JSONSchemaFormType } from '@/src/flows/types';\nimport { Step, useStepState } from '@/src/flows/useStepState';\nimport { mutationToPromise } from '@/src/lib/mutations';\nimport { createStructuredError, prettifyFormValues } from '@/src/lib/utils';\nimport { JSFFieldset, Meta } from '@/src/types/remoteFlows';\nimport {\n contractorStandardProductIdentifier,\n contractorPlusProductIdentifier,\n corProductIdentifier,\n} from '@/src/flows/ContractorOnboarding/constants';\nimport {\n buildBasicInformationJsfModify,\n buildContractDetailsJsfModify,\n buildContractPreviewJsfModify,\n} from '@/src/flows/ContractorOnboarding/jsfModify';\nimport { useUploadFile } from '@/src/common/api/files';\n\ntype useContractorOnboardingProps = Omit<\n ContractorOnboardingFlowProps,\n 'render'\n>;\n\nconst stepToFormSchemaMap: Record<\n keyof typeof STEPS,\n JSONSchemaFormType | null\n> = {\n select_country: null,\n basic_information: 'employment_basic_information',\n contract_details: null,\n pricing_plan: null,\n contract_preview: null,\n review: null,\n};\n\nconst jsonSchemaToEmployment: Partial<\n Record<JSONSchemaFormType, keyof Employment>\n> = {\n employment_basic_information: 'basic_information',\n};\n\nconst provisionalStartDate = new Date().toISOString().split('T')[0];\n\nexport const useContractorOnboarding = ({\n countryCode,\n externalId,\n employmentId,\n skipSteps,\n options,\n initialValues: onboardingInitialValues,\n}: useContractorOnboardingProps) => {\n const [internalCountryCode, setInternalCountryCode] = useState<string | null>(\n countryCode || null,\n );\n const [internalEmploymentId, setInternalEmploymentId] = useState<\n string | undefined\n >(employmentId);\n const [internalContractDocumentId, setInternalContractDocumentId] = useState<\n string | undefined\n >(undefined);\n const fieldsMetaRef = useRef<{\n select_country: Meta;\n basic_information: Meta;\n contract_details: Meta;\n contract_preview: Meta;\n pricing_plan: Meta;\n }>({\n select_country: {},\n basic_information: {},\n contract_details: {},\n contract_preview: {},\n pricing_plan: {},\n });\n\n const stepsToUse = skipSteps?.includes('select_country')\n ? STEPS_WITHOUT_SELECT_COUNTRY\n : STEPS;\n\n const {\n fieldValues,\n stepState,\n setFieldValues,\n previousStep,\n nextStep,\n goToStep,\n setStepValues,\n } = useStepState(\n stepsToUse as Record<keyof typeof STEPS, Step<keyof typeof STEPS>>,\n );\n\n const {\n data: employment,\n isLoading: isLoadingEmployment,\n refetch: refetchEmployment,\n } = useEmployment(internalEmploymentId);\n\n const { status: employmentStatus } = employment || {};\n\n const isEmploymentReadOnly =\n employmentStatus &&\n reviewStepAllowedEmploymentStatus.includes(employmentStatus);\n\n const canInvite =\n employmentStatus &&\n !disabledInviteButtonEmploymentStatus.includes(employmentStatus);\n\n const invitedStatus: 'invited' | 'not_invited' = useMemo(() => {\n const isInvited = employmentStatus === 'invited';\n\n return isInvited ? 'invited' : 'not_invited';\n }, [employmentStatus]);\n\n const createEmploymentMutation = useCreateEmployment();\n const updateEmploymentMutation = useUpdateEmployment(\n internalCountryCode as string,\n options,\n );\n const createContractorContractDocumentMutation =\n useCreateContractorContractDocument();\n const uploadFileMutation = useUploadFile();\n const { mutateAsync: updateUKandSaudiFieldsMutation } =\n useUpdateUKandSaudiFields(\n createContractorContractDocumentMutation,\n uploadFileMutation,\n fieldValues,\n );\n\n const { mutateAsyncOrThrow: updateEmploymentMutationAsync } =\n mutationToPromise(updateEmploymentMutation);\n const signContractDocumentMutation = useSignContractDocument();\n const manageContractorSubscriptionMutation =\n usePostManageContractorSubscriptions();\n\n const { mutateAsyncOrThrow: createEmploymentMutationAsync } =\n mutationToPromise(createEmploymentMutation);\n\n const { mutateAsyncOrThrow: createContractorContractDocumentMutationAsync } =\n mutationToPromise(createContractorContractDocumentMutation);\n\n const { mutateAsyncOrThrow: signContractDocumentMutationAsync } =\n mutationToPromise(signContractDocumentMutation);\n\n const { mutateAsyncOrThrow: manageContractorSubscriptionMutationAsync } =\n mutationToPromise(manageContractorSubscriptionMutation);\n\n // if the employment is loaded, country code has not been set yet\n // we set the internal country code with the employment country code\n if (employmentId && employment?.country?.code && !internalCountryCode) {\n setInternalCountryCode(employment.country.code);\n }\n\n const { selectCountryForm, isLoading: isLoadingCountries } =\n useCountriesSchemaField({\n jsfModify: options?.jsfModify?.select_country,\n queryOptions: {\n enabled: stepState.currentStep.name === 'select_country',\n },\n });\n\n const {\n form: selectContractorSubscriptionForm,\n isLoading: isLoadingContractorSubscriptions,\n } = useContractorSubscriptionSchemaField(internalEmploymentId as string, {\n jsonSchemaVersion: options?.jsonSchemaVersion,\n queryOptions: {\n enabled: stepState.currentStep.name === 'pricing_plan',\n },\n });\n\n const formType =\n stepToFormSchemaMap[stepState.currentStep.name] ||\n 'contractor_basic_information';\n const employmentKey = jsonSchemaToEmployment[formType] as keyof Employment;\n const serverEmploymentData = (employment?.[employmentKey] || {}) as Record<\n string,\n unknown\n >;\n\n const useJSONSchema = ({\n form,\n options: jsonSchemaOptions = {},\n query = {},\n }: {\n form: JSONSchemaFormType;\n options?: {\n jsfModify?: JSFModify;\n queryOptions?: { enabled?: boolean };\n jsonSchemaVersion?: FlowOptions['jsonSchemaVersion'];\n };\n query?: Record<string, string>;\n }) => {\n const hasUserEnteredAnyValues = Object.keys(fieldValues).length > 0;\n // when you write on the fields, the values are stored in the fieldValues state\n // when values are stored in the stepState is when the user has navigated to the step\n // and then we have the values from the server and the onboardingInitialValues that the user can inject,\n const mergedFormValues = hasUserEnteredAnyValues\n ? {\n ...onboardingInitialValues,\n ...stepState.values?.[stepState.currentStep.name], // Restore values for the current step\n ...fieldValues,\n }\n : {\n ...onboardingInitialValues,\n ...serverEmploymentData,\n };\n\n return useJSONSchemaForm({\n countryCode: internalCountryCode as string,\n form: form,\n fieldValues: mergedFormValues,\n query,\n options: {\n ...jsonSchemaOptions,\n queryOptions: {\n enabled: jsonSchemaOptions.queryOptions?.enabled ?? true,\n },\n },\n });\n };\n\n const isBasicInformationDetailsEnabled = Boolean(\n internalCountryCode &&\n (stepState.currentStep.name === 'basic_information' ||\n Boolean(employmentId)),\n );\n\n const isContractorOnboardingDetailsEnabled = Boolean(\n internalCountryCode &&\n (stepState.currentStep.name === 'contract_details' ||\n Boolean(employmentId)),\n );\n\n const isIR35FileEnabled = Boolean(\n internalCountryCode === 'GBR' &&\n employmentId &&\n stepState.currentStep.name === 'basic_information',\n );\n\n const { data: ir35File, isLoading: isLoadingIR35File } = useGetIR35File(\n employmentId as string,\n {\n enabled: isIR35FileEnabled,\n },\n );\n\n const {\n data: basicInformationForm,\n isLoading: isLoadingBasicInformationForm,\n } = useJSONSchema({\n form: 'contractor_basic_information',\n options: {\n jsfModify: buildBasicInformationJsfModify(\n internalCountryCode as string,\n options,\n ),\n queryOptions: {\n enabled: isBasicInformationDetailsEnabled,\n },\n },\n });\n\n const descriptionProvisionalStartDate = useMemo(() => {\n return calculateProvisionalStartDateDescription(\n employment?.basic_information?.provisional_start_date as string,\n fieldValues?.service_duration?.provisional_start_date as string,\n );\n }, [\n employment?.basic_information?.provisional_start_date,\n fieldValues?.service_duration?.provisional_start_date,\n ]);\n\n const selectedPricingPlan = useMemo(() => {\n if (!employment?.contractor_type) {\n return undefined;\n }\n const subscriptions = {\n standard: contractorStandardProductIdentifier,\n plus: contractorPlusProductIdentifier,\n cor: corProductIdentifier,\n };\n return (\n subscriptions[\n employment?.contractor_type as keyof typeof subscriptions\n ] || contractorStandardProductIdentifier\n );\n }, [employment]);\n\n const {\n data: contractorOnboardingDetailsForm,\n isLoading: isLoadingContractorOnboardingDetailsForm,\n } = useContractorOnboardingDetailsSchema({\n countryCode: internalCountryCode as string,\n fieldValues: fieldValues,\n options: {\n queryOptions: {\n enabled: isContractorOnboardingDetailsEnabled,\n },\n jsfModify: buildContractDetailsJsfModify(\n options?.jsfModify?.contract_details,\n descriptionProvisionalStartDate,\n selectedPricingPlan,\n fieldValues,\n ),\n },\n });\n\n const { data: signatureSchemaForm } = useGetContractDocumentSignatureSchema({\n fieldValues: fieldValues,\n options: {\n queryOptions: {\n enabled: stepState.currentStep.name === 'contract_preview',\n },\n jsfModify: buildContractPreviewJsfModify(options, fieldValues),\n },\n });\n\n const { data: documentPreviewPdf, isLoading: isLoadingDocumentPreviewForm } =\n useGetShowContractDocument({\n employmentId: internalEmploymentId as string,\n contractDocumentId: internalContractDocumentId as string,\n options: {\n queryOptions: {\n enabled: Boolean(internalContractDocumentId),\n },\n },\n });\n\n const stepFields: Record<keyof typeof STEPS, JSFFields> = useMemo(\n () => ({\n select_country: selectCountryForm?.fields || [],\n basic_information: basicInformationForm?.fields || [],\n pricing_plan: selectContractorSubscriptionForm?.fields || [],\n contract_details: contractorOnboardingDetailsForm?.fields || [],\n contract_preview: signatureSchemaForm?.fields || [],\n review: [],\n }),\n [\n selectCountryForm?.fields,\n basicInformationForm?.fields,\n selectContractorSubscriptionForm?.fields,\n contractorOnboardingDetailsForm?.fields,\n signatureSchemaForm?.fields,\n ],\n );\n\n const stepFieldsWithFlatFieldsets: Record<\n keyof typeof STEPS,\n JSFFieldset | null | undefined\n > = {\n select_country: null,\n basic_information: basicInformationForm?.meta['x-jsf-fieldsets'],\n pricing_plan: null,\n contract_details: contractorOnboardingDetailsForm?.meta['x-jsf-fieldsets'],\n contract_preview: null,\n review: null,\n };\n\n const {\n country,\n basic_information: employmentBasicInformation = {},\n contract_details: employmentContractDetails = {},\n } = employment || {};\n\n const employmentCountryCode = country?.code;\n\n const selectCountryInitialValues = useMemo(\n () =>\n getInitialValues(stepFields.select_country, {\n country: internalCountryCode || employmentCountryCode || '',\n }),\n [stepFields.select_country, internalCountryCode, employmentCountryCode],\n );\n\n const basicInformationInitialValues = useMemo(() => {\n const initialValues = {\n provisional_start_date: provisionalStartDate,\n ...onboardingInitialValues,\n ...employmentBasicInformation,\n ir35: employment?.contract_details?.ir_35,\n saudi_nationality_status: employment?.contract_details?.nationality,\n ...(ir35File?.content && {\n ir35_sds_file: [\n new File([ir35File.content as unknown as string], ir35File.name, {\n type: 'application/pdf',\n }),\n ],\n }),\n };\n\n return getInitialValues(stepFields.basic_information, initialValues);\n }, [\n onboardingInitialValues,\n employmentBasicInformation,\n employment?.contract_details?.ir_35,\n employment?.contract_details?.nationality,\n ir35File,\n stepFields.basic_information,\n ]);\n\n const contractDetailsInitialValues = useMemo(() => {\n const hardcodedValues = {\n service_duration: {\n provisional_start_date:\n employmentBasicInformation.provisional_start_date,\n },\n };\n const initialValues = {\n ...hardcodedValues,\n ...onboardingInitialValues,\n ...employmentContractDetails,\n };\n\n return getInitialValues(stepFields.contract_details, initialValues);\n }, [\n stepFields.contract_details,\n employmentContractDetails,\n onboardingInitialValues,\n employmentBasicInformation,\n ]);\n\n const contractPreviewInitialValues = useMemo(() => {\n // TODO: TBD not sure if contract preview needs to be populated with anything\n const initialValues = {\n ...onboardingInitialValues,\n };\n\n return getInitialValues(stepFields.contract_preview, initialValues);\n }, [stepFields.contract_preview, onboardingInitialValues]);\n\n const pricingPlanInitialValues = useMemo(() => {\n const preselectedPricingPlan = {\n subscription: selectedPricingPlan,\n };\n const initialValues = {\n ...preselectedPricingPlan,\n ...onboardingInitialValues,\n };\n\n return getInitialValues(stepFields.pricing_plan, initialValues);\n }, [stepFields.pricing_plan, onboardingInitialValues, selectedPricingPlan]);\n\n const initialValues = useMemo(() => {\n return {\n select_country: selectCountryInitialValues,\n basic_information: basicInformationInitialValues,\n contract_details: contractDetailsInitialValues,\n contract_preview: contractPreviewInitialValues,\n pricing_plan: pricingPlanInitialValues,\n };\n }, [\n selectCountryInitialValues,\n basicInformationInitialValues,\n contractDetailsInitialValues,\n contractPreviewInitialValues,\n pricingPlanInitialValues,\n ]);\n\n const isNavigatingToReview = useMemo(() => {\n const shouldHandleReadOnlyEmployment = Boolean(\n employmentId &&\n isEmploymentReadOnly &&\n stepState.currentStep.name !== 'review',\n );\n\n return Boolean(\n shouldHandleReadOnlyEmployment &&\n !isLoadingEmployment &&\n stepFields.basic_information.length > 0 &&\n stepFields.contract_details.length > 0,\n );\n }, [\n employmentId,\n isEmploymentReadOnly,\n isLoadingEmployment,\n stepFields.basic_information.length,\n stepFields.contract_details.length,\n stepState.currentStep.name,\n ]);\n\n useEffect(() => {\n if (isNavigatingToReview) {\n fieldsMetaRef.current = {\n select_country: prettifyFormValues(\n selectCountryInitialValues,\n stepFields.select_country,\n ),\n basic_information: prettifyFormValues(\n basicInformationInitialValues,\n stepFields.basic_information,\n ),\n contract_details: prettifyFormValues(\n contractDetailsInitialValues,\n stepFields.contract_details,\n ),\n // TODO: TBD\n contract_preview: {},\n // TODO: The BE needs to return the pricing plan through an endpoint\n // TODO: First correct pricingPlanInitialValues to make this work\n pricing_plan: prettifyFormValues(\n pricingPlanInitialValues,\n stepFields.pricing_plan,\n ),\n };\n\n setStepValues({\n select_country: selectCountryInitialValues,\n basic_information: basicInformationInitialValues,\n contract_details: contractDetailsInitialValues,\n contract_preview: {},\n pricing_plan: pricingPlanInitialValues,\n review: {},\n });\n goToStep('review');\n }\n }, [\n isNavigatingToReview,\n goToStep,\n selectCountryInitialValues,\n basicInformationInitialValues,\n contractDetailsInitialValues,\n setStepValues,\n stepFields.select_country,\n stepFields.basic_information,\n stepFields.contract_details,\n stepFields.pricing_plan,\n pricingPlanInitialValues,\n ]);\n\n const goTo = (step: keyof typeof STEPS) => {\n goToStep(step);\n };\n\n const parseFormValues = async (values: FieldValues) => {\n if (selectCountryForm && stepState.currentStep.name === 'select_country') {\n return values;\n }\n\n if (\n basicInformationForm &&\n stepState.currentStep.name === 'basic_information'\n ) {\n return await parseJSFToValidate(values, basicInformationForm?.fields, {\n isPartialValidation: false,\n });\n }\n\n if (\n contractorOnboardingDetailsForm &&\n stepState.currentStep.name === 'contract_details'\n ) {\n return await parseJSFToValidate(\n values,\n contractorOnboardingDetailsForm?.fields,\n {\n isPartialValidation: false,\n },\n );\n }\n\n if (\n signatureSchemaForm &&\n stepState.currentStep.name === 'contract_preview'\n ) {\n return await parseJSFToValidate(values, signatureSchemaForm?.fields, {\n isPartialValidation: false,\n });\n }\n\n if (\n selectContractorSubscriptionForm &&\n stepState.currentStep.name === 'pricing_plan'\n ) {\n return await parseJSFToValidate(\n values,\n selectContractorSubscriptionForm?.fields,\n {\n isPartialValidation: false,\n },\n );\n }\n\n return {};\n };\n\n async function onSubmit(values: FieldValues) {\n const currentStepName = stepState.currentStep.name;\n if (currentStepName in fieldsMetaRef.current) {\n fieldsMetaRef.current[\n currentStepName as keyof typeof fieldsMetaRef.current\n ] = prettifyFormValues(values, stepFields[currentStepName]);\n }\n const parsedValues = await parseFormValues(values);\n switch (stepState.currentStep.name) {\n case 'select_country': {\n setInternalCountryCode(parsedValues.country);\n return Promise.resolve({ data: { countryCode: parsedValues.country } });\n }\n case 'basic_information': {\n const isEmploymentNotLoaded =\n !internalEmploymentId && internalCountryCode;\n const hasChangedCountry =\n internalEmploymentId &&\n internalCountryCode &&\n employment?.country &&\n employment?.country.code !== internalCountryCode;\n\n if (isEmploymentNotLoaded || hasChangedCountry) {\n const basicInformationParsedValues = omit(\n parsedValues,\n 'saudi_nationality_status',\n 'ir35',\n 'ir35_sds_file',\n );\n const basicInformationPayload: EmploymentCreateParams = {\n basic_information: basicInformationParsedValues,\n type: 'contractor',\n country_code: internalCountryCode,\n external_id: externalId,\n };\n const response = await createEmploymentMutationAsync(\n basicInformationPayload,\n );\n const employmentId = response?.data?.employment?.id;\n if (!employmentId) {\n throw createStructuredError('Employment ID not found');\n }\n\n setInternalEmploymentId(employmentId);\n await updateUKandSaudiFieldsMutation({\n employmentId: employmentId as string,\n });\n\n return response;\n } else if (internalEmploymentId) {\n const basicInformationParsedValues = omit(\n parsedValues,\n 'saudi_nationality_status',\n 'ir35',\n 'ir35_sds_file',\n );\n\n await updateUKandSaudiFieldsMutation({\n employmentId: internalEmploymentId,\n });\n return updateEmploymentMutationAsync({\n employmentId: internalEmploymentId,\n basic_information: basicInformationParsedValues,\n });\n }\n\n return;\n }\n case 'contract_details': {\n const payload: CreateContractDocument = {\n contract_document: parsedValues,\n };\n const response = await createContractorContractDocumentMutationAsync({\n employmentId: internalEmploymentId as string,\n payload,\n });\n const contractDocumentId = response?.data?.contract_document?.id;\n if (!contractDocumentId) {\n throw createStructuredError('Contract document ID not found');\n }\n setInternalContractDocumentId(contractDocumentId);\n return response;\n }\n\n case 'contract_preview': {\n return signContractDocumentMutationAsync({\n employmentId: internalEmploymentId as string,\n contractDocumentId: internalContractDocumentId as string,\n payload: {\n signature: values.signature,\n },\n });\n }\n case 'pricing_plan': {\n if (values.subscription == contractorStandardProductIdentifier) {\n return manageContractorSubscriptionMutationAsync({\n employmentId: internalEmploymentId as string,\n payload: {\n operation: 'downgrade',\n },\n });\n } else if (values.subscription == contractorPlusProductIdentifier) {\n return manageContractorSubscriptionMutationAsync({\n employmentId: internalEmploymentId as string,\n payload: {\n operation: 'upgrade',\n },\n });\n }\n\n throw createStructuredError('invalid selection');\n }\n\n default: {\n throw createStructuredError('Invalid step state');\n }\n }\n }\n\n const isLoading =\n isLoadingCountries ||\n isLoadingBasicInformationForm ||\n isLoadingEmployment ||\n isLoadingContractorOnboardingDetailsForm ||\n isLoadingContractorSubscriptions ||\n isLoadingDocumentPreviewForm ||\n isLoadingIR35File;\n\n return {\n /**\n * Loading state indicating if the flow is loading data\n */\n isLoading,\n\n /**\n * Current state of the form fields for the current step.\n */\n fieldValues,\n\n /**\n * Current step state containing the current step and total number of steps\n */\n stepState,\n\n /**\n * Function to update the current form field values\n * @param values - New form values to set\n */\n checkFieldUpdates: setFieldValues,\n\n /**\n * Function to handle going back to the previous step\n * @returns {void}\n */\n back: previousStep,\n\n /**\n * Function to handle going to the next step\n * @returns {void}\n */\n next: nextStep,\n\n /**\n * Function to handle going to a specific step\n * @param step The step to go to.\n * @returns {void}\n */\n goTo: goTo,\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 * Array of form fields from the onboarding schema\n */\n fields: stepFields[stepState.currentStep.name],\n\n /**\n * Fields metadata for each step\n */\n meta: {\n fields: fieldsMetaRef.current,\n fieldsets: stepFieldsWithFlatFieldsets[stepState.currentStep.name],\n },\n\n /**\n * Function to parse form values before submission\n * @param values - Form values to parse\n * @returns Parsed form values\n */\n parseFormValues,\n\n /**\n * Function to validate form values against the onboarding schema\n * @param values - Form values to validate\n * @returns Validation result or null if no schema is available\n */\n handleValidation: async (\n values: FieldValues,\n ): Promise<ValidationResult | null> => {\n if (stepState.currentStep.name === 'select_country') {\n return selectCountryForm.handleValidation(values);\n }\n\n if (\n basicInformationForm &&\n stepState.currentStep.name === 'basic_information'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n basicInformationForm?.fields,\n { isPartialValidation: false },\n );\n return basicInformationForm?.handleValidation(parsedValues);\n }\n\n if (\n contractorOnboardingDetailsForm &&\n stepState.currentStep.name === 'contract_details'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n contractorOnboardingDetailsForm?.fields,\n { isPartialValidation: false },\n );\n return contractorOnboardingDetailsForm?.handleValidation(parsedValues);\n }\n\n if (\n signatureSchemaForm &&\n stepState.currentStep.name === 'contract_preview'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n signatureSchemaForm?.fields,\n { isPartialValidation: true },\n );\n return signatureSchemaForm?.handleValidation(parsedValues);\n }\n\n if (\n selectContractorSubscriptionForm &&\n stepState.currentStep.name === 'pricing_plan'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n selectContractorSubscriptionForm?.fields,\n { isPartialValidation: false },\n );\n return selectContractorSubscriptionForm?.handleValidation(parsedValues);\n }\n\n return null;\n },\n\n /**\n * Initial form values\n */\n initialValues,\n\n /**\n * Employment id\n */\n employmentId: internalEmploymentId,\n\n /**\n * Function to refetch the employment data\n * @returns {void}\n */\n refetchEmployment: refetchEmployment,\n\n /**\n * Loading state indicating if the onboarding mutation is in progress\n */\n isSubmitting:\n createEmploymentMutation.isPending ||\n updateEmploymentMutation.isPending ||\n createContractorContractDocumentMutation.isPending ||\n signContractDocumentMutation.isPending ||\n manageContractorSubscriptionMutation.isPending ||\n uploadFileMutation.isPending,\n\n /**\n * Document preview PDF data\n */\n documentPreviewPdf,\n\n /**\n * let's the user know if the company can invite employees\n * @returns {boolean}\n */\n canInvite,\n\n /**\n * let's the user know that the employment cannot be edited, happens when employment.status is invited\n * @returns {boolean}\n */\n isEmploymentReadOnly,\n /**\n * let's the user know if the employment is invited or not\n * @returns {'invited' | 'not_invited'}\n */\n invitedStatus,\n\n /**\n * Employment data\n * @returns {Employment}\n */\n employment,\n };\n};\n"],"mappings":"smBAAA,OAAS,aAAAA,GAAW,WAAAC,EAAS,UAAAC,GAAQ,YAAAC,MAAgB,QAErD,OAAOC,OAAU,cA8DjB,IAAMC,GAGF,CACF,eAAgB,KAChB,kBAAmB,+BACnB,iBAAkB,KAClB,aAAc,KACd,iBAAkB,KAClB,OAAQ,IACV,EAEMC,GAEF,CACF,6BAA8B,mBAChC,EAEMC,GAAuB,IAAI,KAAK,EAAE,YAAY,EAAE,MAAM,GAAG,EAAE,CAAC,EAErDC,GAA0BC,EAAA,CAAC,CACtC,YAAAC,GACA,WAAAC,GACA,aAAAC,EACA,UAAAC,GACA,QAAAC,EACA,cAAeC,CACjB,IAAoC,CAClC,GAAM,CAACC,EAAqBC,CAAsB,EAAIC,EACpDR,IAAe,IACjB,EACM,CAACS,EAAsBC,EAAuB,EAAIF,EAEtDN,CAAY,EACR,CAACS,EAA4BC,EAA6B,EAAIJ,EAElE,MAAS,EACLK,EAAgBC,GAMnB,CACD,eAAgB,CAAC,EACjB,kBAAmB,CAAC,EACpB,iBAAkB,CAAC,EACnB,iBAAkB,CAAC,EACnB,aAAc,CAAC,CACjB,CAAC,EAEKC,GAAaZ,IAAW,SAAS,gBAAgB,EACnDa,GACAC,GAEE,CACJ,YAAAC,EACA,UAAAC,EACA,eAAAC,GACA,aAAAC,GACA,SAAAC,GACA,SAAAC,EACA,cAAAC,CACF,EAAIC,GACFV,EACF,EAEM,CACJ,KAAMW,EACN,UAAWC,EACX,QAASC,EACX,EA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GACAxE,EAAU,YAAY,OAAS,mBAC/B,CACA,IAAMqG,EAAe,MAAMH,EACzBD,EACAzB,GAAqB,OACrB,CAAE,oBAAqB,EAAK,CAC9B,EACA,OAAOA,GAAqB,iBAAiB6B,CAAY,CAC3D,CAEA,GACE5D,GACAzC,EAAU,YAAY,OAAS,eAC/B,CACA,IAAMqG,EAAe,MAAMH,EACzBD,EACAxD,GAAkC,OAClC,CAAE,oBAAqB,EAAM,CAC/B,EACA,OAAOA,GAAkC,iBAAiB4D,CAAY,CACxE,CAEA,OAAO,IACT,EAxDkB,oBA6DlB,cAAAd,GAKA,aAAcjG,EAMd,kBAAmBmB,GAKnB,aACES,EAAyB,WACzBE,EAAyB,WACzBE,EAAyC,WACzCQ,EAA6B,WAC7BE,EAAqC,WACrCR,EAAmB,UAKrB,mBAAAmD,GAMA,UAAA7D,GAMA,qBAAAF,EAKA,cAAAI,GAMA,WAAAT,CACF,CACF,EAv1BuC","names":["useEffect","useMemo","useRef","useState","omit","stepToFormSchemaMap","jsonSchemaToEmployment","provisionalStartDate","useContractorOnboarding","__name","countryCode","externalId","employmentId","skipSteps","options","onboardingInitialValues","internalCountryCode","setInternalCountryCode","useState","internalEmploymentId","setInternalEmploymentId","internalContractDocumentId","setInternalContractDocumentId","fieldsMetaRef","useRef","stepsToUse","STEPS_WITHOUT_SELECT_COUNTRY","STEPS","fieldValues","stepState","setFieldValues","previousStep","nextStep","goToStep","setStepValues","useStepState","employment","isLoadingEmployment","refetchEmployment","useEmployment","employmentStatus","isEmploymentReadOnly","reviewStepAllowedEmploymentStatus","canInvite","disabledInviteButtonEmploymentStatus","invitedStatus","useMemo","createEmploymentMutation","useCreateEmployment","updateEmploymentMutation","useUpdateEmployment","createContractorContractDocumentMutation","useCreateContractorContractDocument","uploadFileMutation","useUploadFile","updateUKandSaudiFieldsMutation","useUpdateUKandSaudiFields","updateEmploymentMutationAsync","mutationToPromise","signContractDocumentMutation","useSignContractDocument","manageContractorSubscriptionMutation","usePostManageContractorSubscriptions","createEmploymentMutationAsync","createContractorContractDocumentMutationAsync","signContractDocumentMutationAsync","manageContractorSubscriptionMutationAsync","selectCountryForm","isLoadingCountries","useCountriesSchemaField","selectContractorSubscriptionForm","isLoadingContractorSubscriptions","useContractorSubscriptionSchemaField","formType","employmentKey","serverEmploymentData","useJSONSchema","form","jsonSchemaOptions","query","mergedFormValues","useJSONSchemaForm","isBasicInformationDetailsEnabled","isContractorOnboardingDetailsEnabled","isIR35FileEnabled","ir35File","isLoadingIR35File","useGetIR35File","basicInformationForm","isLoadingBasicInformationForm","buildBasicInformationJsfModify","descriptionProvisionalStartDate","calculateProvisionalStartDateDescription","selectedPricingPlan","contractorStandardProductIdentifier","contractorPlusProductIdentifier","corProductIdentifier","contractorOnboardingDetailsForm","isLoadingContractorOnboardingDetailsForm","useContractorOnboardingDetailsSchema","buildContractDetailsJsfModify","signatureSchemaForm","useGetContractDocumentSignatureSchema","buildContractPreviewJsfModify","documentPreviewPdf","isLoadingDocumentPreviewForm","useGetShowContractDocument","stepFields","stepFieldsWithFlatFieldsets","country","employmentBasicInformation","employmentContractDetails","employmentCountryCode","selectCountryInitialValues","getInitialValues","basicInformationInitialValues","initialValues","contractDetailsInitialValues","contractPreviewInitialValues","pricingPlanInitialValues","isNavigatingToReview","useEffect","prettifyFormValues","goTo","step","parseFormValues","values","parseJSFToValidate","onSubmit","currentStepName","parsedValues","isEmploymentNotLoaded","hasChangedCountry","basicInformationPayload","omit","response","createStructuredError","basicInformationParsedValues","contractDocumentId"]}
|
package/dist/chunk-HRG5MSVG.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as i}from"./chunk-P37U34EQ.js";var x=i(e=>new Promise((n,r)=>{let a=new FileReader;a.readAsDataURL(e),a.onload=()=>n(a.result),a.onerror=t=>r(t)}),"toBase64"),V=i(async e=>await Promise.all(e.map(async r=>{let a=await x(r);return{...r,name:r.name,size:r.size,type:r.type,content:a.split(",")[1]}})),"convertFilesToBase64");import{addBusinessDays as h,isWeekend as N,nextMonday as L}from"date-fns";import A from"lodash.get";var C={TEXT:"text",TEXTAREA:"textarea",NUMBER:"number",SELECT:"select",COUNTRIES:"countries",TEL:"tel",EMAIL:"email",MONEY:"money",DATE:"date",DATE_RANGE:"date-range",CURRENCIES:"currencies",TIME:"time"},j={CHECKBOX:"checkbox",ACK_CHECK:"ack-check"},l={FILE:"file",RADIO:"radio",RADIO_CARD:"radio-card",GROUP_ARRAY:"group-array",EXTRA:"extra",STATEMENT:"statement",HIDDEN:"hidden",FIELDSET:"fieldset",FIELDSET_FLAT:"fieldset-flat",WORK_SCHEDULE:"work-schedule",WORK_WEEK_SCHEDULE:"work-week-schedule",BENEFITS:"benefits",SIGNATURE:"signature",SELECT_MULTIPLE:"select-multiple",...C,...j};function R(e){return Math.round((e+Number.EPSILON)*100)/100}i(R,"round");function I(e){return parseFloat(e.replace(/,/g,""))}i(I,"convertToValidCost");function B(e){if(e==null||e===""||Number.isNaN(e)||Array.isArray(e)||typeof e=="boolean")return null;let n;return typeof e=="string"?n=I(e):n=e,R(n*100)}i(B,"convertToCents");function M(e){if(e==null||Number.isNaN(e))return null;let n;return typeof e=="string"?n=I(e||"0"):n=e,R(n/100)}i(M,"convertFromCents");var g=i(e=>Object.entries(e||{}).reduce((n,[r,a])=>(Array.isArray(a)?n[r]=a.map(t=>typeof t=="object"&&t!==null?g(t):typeof t=="string"?t.trim():t):typeof a=="object"&&a!==null?n[r]=g(a):n[r]=typeof a=="string"?a.trim():a,n),{}),"trimStringValues");function D(e,n){let r={};return n.forEach(a=>{let t=a.name;if(!(!Object.prototype.hasOwnProperty.call(e,t)&&!(a.inputType===l.FIELDSET&&a.valueGroupingDisabled))){if(a.inputType===l.FIELDSET&&a.valueGroupingDisabled){Object.assign(r,D(e,a.fields));return}a.readOnly&&a.defaultValue?r[t]=a.defaultValue:r[t]=e[t]}}),r}i(D,"prefillReadOnlyFields");function O(e,n){return e.reduce((r,a)=>(a.inputType===l.FIELDSET&&a.valueGroupingDisabled?Object.assign(r,O(a.fields,n)):Object.prototype.hasOwnProperty.call(n,a.name)&&(r[a.name]=n[a.name]),r),{})}i(O,"extractFieldsetFieldsValues");var T={[l.COUNTRIES]:{transformValueToAPI:i(e=>n=>!e.multiple||typeof n=="string"?n:n.map(r=>typeof r=="string"?r:r.name),"transformValueToAPI"),transformValue:i(e=>{let n=i(r=>r?.name||r?.value||r?.label,"getCountryValue");return Array.isArray(e)?e.map(n):n(e)||""},"transformValue")},[l.NUMBER]:{transformValueToAPI:i(()=>e=>{let n=Number(e);return Number.isNaN(n)?e:n},"transformValueToAPI")},[l.MONEY]:{transformValueFromAPI:i(()=>e=>M(e)??"","transformValueFromAPI"),transformValueToAPI:i(()=>B,"transformValueToAPI")},[l.RADIO]:{transformValueToAPI:i(e=>n=>e.transformToBool?n==="yes":n,"transformValueToAPI")},[l.CHECKBOX]:{transformValueToAPI:i(e=>n=>n===void 0?!1:e.const&&n===!0?e.const:n,"transformValueToAPI")},[l.SELECT]:{transformValue:i(e=>Array.isArray(e)?e.map(n=>n.value):e?.value??"","transformValue")},[l.FILE]:{transformValueToAPI:i(()=>async e=>e?await V(e):null,"transformValueToAPI")}};async function d(e={},n){let r=n.filter(t=>e[t.name]||t.inputType===l.FIELDSET&&t.valueGroupingDisabled);return(await Promise.all(r.map(async t=>{let s={};switch(t.inputType){case l.FIELDSET:{let o=t;if(o.valueGroupingDisabled){let u=O(o.fields,e);Object.assign(s,await d(u,o.fields))}else{let u=e[t.name];if(u&&typeof u=="object"&&!Array.isArray(u)){let c=Object.fromEntries(Object.entries(u).filter(([,m])=>m!==""&&m!==null&&m!==void 0));s[t.name]=Object.keys(c).length>0?await d(c,o.fields):void 0}else s[t.name]=await d(u,o.fields)}break}case l.TEXTAREA:case l.TEXT:s[t.name]=e[t.name].replace(/\0/g,"");break;case l.GROUP_ARRAY:{let o=t?.fields?.().map(c=>({...c,name:c.nameKey||""})),u=await Promise.all(e[t.name]?.map(c=>d(c,o))||[]);s[t.name]=u;break}case l.EXTRA:{let o=t;if(o.includeValueToApi!==!1){let u=e[o.name],c=o?.transformValueToAPI||T[o.inputType]?.transformValueToAPI;if(c){let m=c(t)(u);s[o.name]=m instanceof Promise?await m:m;break}s[o.name]=u;break}s[o.name]=void 0;break}default:{let o=e[t.name],u=t?.transformValueToAPI||T[t.inputType]?.transformValueToAPI;if(u){let c=u(t)(o);s[t.name]=c instanceof Promise?await c:c;break}s[t.name]=o;break}}return t.forcedValue!==void 0&&(s[t.name]=t.forcedValue),s}))).reduce((t,s)=>({...t,...s}),{...e})}i(d,"parseFormValuesToAPI");function w(e,n){return e.visibilityCondition?e.visibilityCondition(n):typeof e.isVisible<"u"?!!e.isVisible:!0}i(w,"isFieldVisible");function E(e,n){return e.calculateDynamicProperties?{...e,...e.calculateDynamicProperties(n)||{}}:e}i(E,"applyFieldDynamicProperties");function b(e,n,r,a){let t={};return n.map(s=>E(s,e)).forEach(s=>{let o=s.name;a&&(o=o?`${a}.${s.name}`:a);let u=A(e,o);if(!(!w(s,e)&&!(r&&u))&&!s.meta?.ignoreValue)if(s.inputType==="fieldset"&&s.valueGroupingDisabled)Object.assign(t,b(e,s.fields,r,o));else if(Array.isArray(s.fields))t[s.name]=b(e,s.fields,r,o);else{if(u===void 0)return;t[s.name]=u}}),t}i(b,"excludeValuesInvisible");function U(e){return Object.fromEntries(Object.entries(e).filter(([,n])=>n!=null&&n!==""))}i(U,"removeEmptyValues");function F(e){return Array.isArray(e)?e.map(F):e&&typeof e=="object"?Object.entries(e).reduce((n,[r,a])=>(r.startsWith("_")||(n[r]=F(a)),n),{}):e}i(F,"cleanUnderscoreFields");async function G(e,n,r){let a=r?.keepInvisibleValues?e:b(e,n),t=await d(a,n),s=g(t),o=U(s),u=D(o,n);return F(u)}i(G,"parseSubmitValues");async function K(e,n,r={isPartialValidation:!1}){return await G(e,n,{keepInvisibleValues:r?.isPartialValidation})}i(K,"parseJSFToValidate");function W(e){switch(e){case l.FILE:return;default:return""}}i(W,"getDefaultValueForType");function P(e,n){let r=A(e,n.name),a=n?.transformValueFromAPI||T[n.inputType]?.transformValueFromAPI;if(a)return a(n)(r);let t=typeof n.value=="function"?n.value(r,e):null,s=typeof n.value!="function"?n.value:null,o=n.checkboxValue===!0?r||!1:null,u=i(c=>c===""?void 0:c,"excludeString");return u(t)??u(r)??u(s)??u(n.default)??o??W(n.inputType)}i(P,"getInitialDefaultValue");function S(e,n,r){let a={},t=e.name;r&&(t=t?`${r}.${t}`:r);let s=e.fields;if(Array.isArray(s)){let o={};s.forEach(u=>{Object.assign(o,S(u,n,t))}),e.inputType===l.FIELDSET&&e.valueGroupingDisabled?Object.assign(a,o):a[e.name]=o}else a[e.name]=P(n,{...e,name:t});return a}i(S,"getInitialSubFieldValues");function _(e,n){let r={},a=n;return e.map(t=>E(t,a)).forEach(t=>{switch(t.inputType){case l.FIELDSET:{if(t.valueGroupingDisabled)Object.assign(r,_(t.fields,a));else{let s=S(t,a);Object.assign(r,s)}break}default:{r[t.name]||(r[t.name]=P(a,t));break}}}),r}i(_,"getInitialValues");function Y({fields:e=[],fieldsets:n={},values:r}){let a=Object.keys(n);if(!a?.length)return e;let t=new Set(a.flatMap(c=>n[c]?.propertiesByName??[]));return a.map(c=>{let{propertiesByName:m=[],...y}=n[c],f=m.map(p=>e.find(k=>k.name===p)).filter(p=>!!p);return{...y,name:c,type:"fieldset-flat",inputType:"fieldset-flat",fields:f,label:n[c].title,isVisible:f.map(p=>E(p,r)).some(p=>w(p,r))}}).reduce((c,m)=>{let y=[...c],f=m.fields[0]?c.findIndex(p=>p.name===m.fields[0].name):c.length;return y.splice(f,0,m),y},e).filter(c=>!t.has(c.name))}i(Y,"getFieldsWithFlatFieldsets");function z(e,n){let r=n;return e.forEach(a=>{"const"in a&&(r=Object.fromEntries(Object.entries(n).map(([t,s])=>t===a.name?[t,a.const]:[t,s])))}),r}i(z,"enableAckFields");function q(e){let n=new Date;n.setDate(n.getUTCDate()),n.setHours(0,0,0,0);let r=h(n,e+1);return N(r)?L(r):r}i(q,"getMinStartDate");export{R as a,B as b,M as c,K as d,_ as e,Y as f,z as g,q as h};
|
|
2
|
-
//# sourceMappingURL=chunk-HRG5MSVG.js.map
|