@remoteoss/remote-flows 1.18.0 → 1.20.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/ButtonDefault-2YV2Z474.js +2 -0
- package/dist/CheckboxFieldDefault-SZZQUVAM.js +2 -0
- package/dist/CountryFieldDefault-IBVQJVMW.js +2 -0
- package/dist/DatePickerFieldDefault-5LEOVIM2.js +2 -0
- package/dist/DrawerDefault-AAUS7T5W.js +2 -0
- package/dist/EmailFieldDefault-2PMSDIXF.js +2 -0
- package/dist/FieldsetToggleButtonDefault-MFLN2WWT.js +2 -0
- package/dist/FileUploadFieldDefault-Y2ZYBSTV.js +2 -0
- package/dist/MultiSelectFieldDefault-UK7652MS.js +2 -0
- package/dist/NumberFieldDefault-C5V6POQ7.js +2 -0
- package/dist/RadioGroupFieldDefault-DNESPKMT.js +2 -0
- package/dist/SelectFieldDefault-4KQUV57C.js +2 -0
- package/dist/TextAreaFieldDefault-5P2MEQUR.js +2 -0
- package/dist/TextFieldDefault-PMCQSPPT.js +2 -0
- package/dist/WorkScheduleFieldDefault-SR3G37MN.js +2 -0
- package/dist/ZendeskDrawerDefault-A5PVWI4R.js +2 -0
- package/dist/{chunk-5D4AKL3N.js → chunk-24FMEFH5.js} +2 -2
- package/dist/{chunk-ZWIH53GL.js → chunk-3C6N7DK6.js} +2 -2
- package/dist/{chunk-FUGPVPYX.js → chunk-3NESYBEJ.js} +2 -2
- package/dist/{chunk-ZTKZWB7I.js → chunk-3OJVYYPZ.js} +2 -2
- package/dist/{chunk-5BBQUGAN.js → chunk-3UEQXLRC.js} +2 -2
- package/dist/{chunk-DNDYXEZ6.js → chunk-4J36XOH2.js} +2 -2
- package/dist/{chunk-5L2ELV4L.js → chunk-4S7BRDNF.js} +2 -2
- package/dist/{chunk-PKK2EEXH.js → chunk-547UHEDI.js} +1 -1
- package/dist/chunk-547UHEDI.js.map +1 -0
- package/dist/{chunk-VLSOHNT2.js → chunk-56UXOD27.js} +2 -2
- package/dist/chunk-56UXOD27.js.map +1 -0
- package/dist/{chunk-GDJP7TMP.js → chunk-5JGEEJ3A.js} +2 -2
- package/dist/chunk-6EAABHVV.js +2 -0
- package/dist/chunk-6EAABHVV.js.map +1 -0
- package/dist/chunk-6JTHV4QS.js +2 -0
- package/dist/chunk-6JTHV4QS.js.map +1 -0
- package/dist/{chunk-C6KWUSCU.js → chunk-6PYJAPM2.js} +2 -2
- package/dist/{chunk-L4P7572F.js → chunk-74ZEXZAY.js} +2 -2
- package/dist/chunk-7EONM7HL.js +2 -0
- package/dist/{chunk-H2JFQGQJ.js.map → chunk-7EONM7HL.js.map} +1 -1
- package/dist/{chunk-DM5RRWPM.js → chunk-7EUMRKH4.js} +2 -2
- package/dist/{chunk-SJ5IZCJP.js → chunk-7M7VN4WI.js} +2 -2
- package/dist/{chunk-XFGSO4WQ.js → chunk-AFHSKSGA.js} +2 -2
- package/dist/chunk-AHRG5QCS.js +2 -0
- package/dist/chunk-AHRG5QCS.js.map +1 -0
- package/dist/{chunk-EHD2YB5F.js → chunk-AOSXULKY.js} +2 -2
- package/dist/{chunk-QI6E2NJU.js → chunk-B7TQYSAY.js} +2 -2
- package/dist/{chunk-KQKH3H6S.js → chunk-BAMGHBLT.js} +2 -2
- package/dist/{chunk-545OW3ET.js → chunk-BLGKOMH3.js} +2 -2
- package/dist/{chunk-N3Q636ZK.js → chunk-BTS5Q6UZ.js} +2 -2
- package/dist/{chunk-SNRZPCZ7.js → chunk-BUOCIXUH.js} +2 -2
- package/dist/{chunk-SS2FAFUZ.js → chunk-BYDQHL6O.js} +2 -2
- package/dist/{chunk-XFDNQDDA.js → chunk-CJG77FUT.js} +2 -2
- package/dist/{chunk-WH6BDFVD.js → chunk-CR3X2TWM.js} +2 -2
- package/dist/{chunk-QNWTCGRD.js → chunk-D36G74ID.js} +2 -2
- package/dist/{chunk-JPA3IMPE.js → chunk-DFYEI445.js} +2 -2
- package/dist/{chunk-OZKZKV5C.js → chunk-DHRMW63S.js} +2 -2
- package/dist/{chunk-CUANSH3E.js → chunk-DPRCPBRB.js} +2 -2
- package/dist/{chunk-HKNK5Z6N.js → chunk-EIVCBH53.js} +2 -2
- package/dist/{chunk-OXAEJWEQ.js → chunk-EMP4ZIVB.js} +2 -2
- package/dist/chunk-EOMVTXER.js +2 -0
- package/dist/chunk-EOMVTXER.js.map +1 -0
- package/dist/{chunk-T3GSGHZJ.js → chunk-GSPD4EIV.js} +2 -2
- package/dist/{chunk-44RIEWXA.js → chunk-HFQAVCD2.js} +2 -2
- package/dist/{chunk-TOQPDTGG.js → chunk-HJ7WOTV7.js} +2 -2
- package/dist/{chunk-NAGIFFJS.js → chunk-I5FVESDZ.js} +2 -2
- package/dist/{chunk-DAXHNASW.js → chunk-IVXIAOMR.js} +2 -2
- package/dist/{chunk-URJI6IZB.js → chunk-JDVILEVL.js} +2 -2
- package/dist/{chunk-36MJ5ORQ.js → chunk-JEFPOHCP.js} +2 -2
- package/dist/{chunk-SAKDBD4P.js → chunk-JTPKAIYL.js} +2 -2
- package/dist/{chunk-SD3LBJUH.js → chunk-KJ4JS75E.js} +2 -2
- package/dist/{chunk-V74BLD3D.js → chunk-KNHDPKRL.js} +2 -2
- package/dist/{chunk-3GYINB3B.js → chunk-KYBKW4FE.js} +2 -2
- package/dist/{chunk-M53HKCJ5.js → chunk-LM766FLB.js} +2 -2
- package/dist/{chunk-FQHFTFUZ.js → chunk-LSW66EIR.js} +2 -2
- package/dist/{chunk-I2NE5CCG.js → chunk-M7KQPXCS.js} +2 -2
- package/dist/{chunk-ULP5B6DG.js → chunk-MGY23P25.js} +2 -2
- package/dist/chunk-MP3VDCI7.js +2 -0
- package/dist/chunk-MP3VDCI7.js.map +1 -0
- package/dist/chunk-MTYN4AM3.js +2 -0
- package/dist/{chunk-BCO3C476.js → chunk-MVQOMW7S.js} +2 -2
- package/dist/{chunk-OHCA7HXR.js → chunk-MXSKCQOT.js} +2 -2
- package/dist/{chunk-IGLKMXWJ.js → chunk-NAMR4DA5.js} +2 -2
- package/dist/{chunk-YRC6EEM3.js → chunk-NEKE5PRJ.js} +2 -2
- package/dist/{chunk-FJ6WBG3H.js → chunk-O6H66UM2.js} +2 -2
- package/dist/{chunk-Q73675NI.js → chunk-OIBZ7VUR.js} +2 -2
- package/dist/{chunk-TMWN4PEK.js → chunk-OUSCSVMQ.js} +2 -2
- package/dist/{chunk-X6ZOK7H5.js → chunk-POKLRB3M.js} +2 -2
- package/dist/{chunk-J6HS3UVY.js → chunk-PVZTOW7Z.js} +2 -2
- package/dist/chunk-PX5PE6GX.js +2 -0
- package/dist/chunk-PX5PE6GX.js.map +1 -0
- package/dist/{chunk-WUFJP4GG.js → chunk-Q3VMPVT3.js} +2 -2
- package/dist/{chunk-XU3B7N3C.js → chunk-QJ2XK63I.js} +2 -2
- package/dist/{chunk-I3TP6JKM.js → chunk-R4X2WQXX.js} +2 -2
- package/dist/chunk-R4X2WQXX.js.map +1 -0
- package/dist/{chunk-MCWXQT7A.js → chunk-RGLQY27T.js} +2 -2
- package/dist/{chunk-CPXEQRNG.js → chunk-RMIAJZOG.js} +2 -2
- package/dist/chunk-ROQYHTFQ.js +2 -0
- package/dist/chunk-ROQYHTFQ.js.map +1 -0
- package/dist/{chunk-UPJDLAKU.js → chunk-RSZZMCB2.js} +2 -2
- package/dist/{chunk-FBWPGUBC.js → chunk-RZJ7WE6G.js} +2 -2
- package/dist/{chunk-EKJK34DS.js → chunk-T5JT2ZU2.js} +2 -2
- package/dist/{chunk-B66V5QEC.js → chunk-TV2NNJVO.js} +2 -2
- package/dist/{chunk-GCVM3FO4.js → chunk-VCDA76UN.js} +2 -2
- package/dist/{chunk-HUZBKPGP.js → chunk-VKQQKGGY.js} +2 -2
- package/dist/{chunk-7RP5F62S.js → chunk-VPSESR6G.js} +2 -2
- package/dist/{chunk-ZAFGVOU5.js → chunk-VXMLYWZ2.js} +2 -2
- package/dist/{chunk-EQVUP5ZR.js → chunk-W4RON3XZ.js} +2 -2
- package/dist/{chunk-WOH5UQMK.js → chunk-WKLTHGWU.js} +2 -2
- package/dist/{chunk-2IA5ZHU4.js → chunk-WQ4H5V7U.js} +3 -3
- package/dist/chunk-WQ4H5V7U.js.map +1 -0
- package/dist/{chunk-NNW7S5AY.js → chunk-WURYTVWC.js} +2 -2
- package/dist/{chunk-C6ND527K.js → chunk-X6CON4YE.js} +2 -2
- package/dist/chunk-X6IMS3NL.js +2 -0
- package/dist/chunk-X6IMS3NL.js.map +1 -0
- package/dist/{chunk-6P53J6DA.js → chunk-XQZI2FRQ.js} +2 -2
- package/dist/{chunk-QGGPXNVY.js → chunk-Y2LBI32D.js} +2 -2
- package/dist/{chunk-AK4FXJFO.js → chunk-YHCH57B7.js} +2 -2
- package/dist/{chunk-J2BTEUAM.js → chunk-YHQQSL4Q.js} +2 -2
- package/dist/{chunk-PGVAOMQU.js → chunk-YIOLMWB5.js} +2 -2
- package/dist/{chunk-AJCKNHZB.js → chunk-YWOJ4NKF.js} +2 -2
- package/dist/{chunk-V6LOIP27.js → chunk-Z6B3PA4M.js} +2 -2
- package/dist/{chunk-GCBEPX4V.js → chunk-ZOTT6IZN.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/ContractorOnboarding/ContractorOnboarding.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
- package/dist/flows/ContractorOnboarding/api.d.ts +2 -2
- package/dist/flows/ContractorOnboarding/api.js +1 -1
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/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/EligibilityQuestionnaireStep.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.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/components/StatementOfWorkDisclaimer.js +1 -1
- package/dist/flows/ContractorOnboarding/constants.d.ts +4 -1
- package/dist/flows/ContractorOnboarding/constants.js +1 -1
- package/dist/flows/ContractorOnboarding/context.d.ts +7 -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 +7 -7
- package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
- package/dist/flows/ContractorOnboarding/types.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/utils.d.ts +12 -5
- package/dist/flows/ContractorOnboarding/utils.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
- package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
- package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
- package/dist/flows/CostCalculator/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/CreateCompany/CreateCompany.d.ts +4 -4
- package/dist/flows/CreateCompany/CreateCompany.js +1 -1
- package/dist/flows/CreateCompany/api.d.ts +2 -2
- package/dist/flows/CreateCompany/api.js +1 -1
- package/dist/flows/CreateCompany/components/AddressDetailsStep.d.ts +4 -4
- package/dist/flows/CreateCompany/components/AddressDetailsStep.js +1 -1
- package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.d.ts +4 -4
- package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.js +1 -1
- package/dist/flows/CreateCompany/components/CreateCompanyForm.d.ts +2 -2
- package/dist/flows/CreateCompany/components/CreateCompanyForm.js +1 -1
- package/dist/flows/CreateCompany/context.d.ts +4 -4
- package/dist/flows/CreateCompany/hooks.d.ts +4 -4
- package/dist/flows/CreateCompany/hooks.js +1 -1
- package/dist/flows/CreateCompany/index.d.ts +4 -4
- package/dist/flows/CreateCompany/index.js +1 -1
- package/dist/flows/CreateCompany/types.d.ts +4 -4
- 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/PaidTimeOff.js +1 -1
- 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/jsonSchema.js +1 -1
- package/dist/flows/Termination/json-schemas/schema.d.ts +4 -4
- package/dist/flows/Termination/json-schemas/schema.js +1 -1
- 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.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +11 -11
- package/dist/index.js +2 -2
- package/dist/internals.d.ts +6 -11
- package/dist/internals.js +1 -1
- package/dist/{mutations-C70g1hf2.d.ts → mutations-BsydWn3-.d.ts} +1 -1
- package/dist/{remoteFlows-S2ZmIMR3.d.ts → remoteFlows-BVt9wH8Z.d.ts} +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/dist/{types-Dq-2OENN.d.ts → types-BfQMv-8p.d.ts} +2 -2
- package/dist/{types-Bt3Nvzma.d.ts → types-C0ri3b3L.d.ts} +1 -1
- package/dist/{types-DAJZFuKz.d.ts → types-D_exxPuY.d.ts} +22 -5
- package/dist/{types-DXC7D8qf.d.ts → types-DqoTDHM1.d.ts} +3 -3
- package/dist/{types-DP9U0M1b.d.ts → types-uW0BsP56.d.ts} +3 -3
- package/dist/{types.gen-BSxAhJ_V.d.ts → types.gen-Oz2Tvvr6.d.ts} +3 -3
- package/dist/{utils-BaHnOWNw.d.ts → utils-Db2G1Kxo.d.ts} +1 -1
- package/package.json +1 -3
- package/dist/ButtonDefault-6LBHWUQH.js +0 -2
- package/dist/CheckboxFieldDefault-X4DYVQCE.js +0 -2
- package/dist/CountryFieldDefault-KSVYDH5T.js +0 -2
- package/dist/DatePickerFieldDefault-TZEI446Y.js +0 -2
- package/dist/DrawerDefault-FLNSDSMB.js +0 -2
- package/dist/EmailFieldDefault-T6HHE5RL.js +0 -2
- package/dist/FieldsetToggleButtonDefault-MXBQJ55Q.js +0 -2
- package/dist/FileUploadFieldDefault-5NW3ZFXD.js +0 -2
- package/dist/MultiSelectFieldDefault-OQ6SNNBI.js +0 -2
- package/dist/NumberFieldDefault-IVUTWJS5.js +0 -2
- package/dist/RadioGroupFieldDefault-U44JTO4O.js +0 -2
- package/dist/SelectFieldDefault-66GGFDX3.js +0 -2
- package/dist/TextAreaFieldDefault-5H34RRBA.js +0 -2
- package/dist/TextFieldDefault-VHIF2KLF.js +0 -2
- package/dist/WorkScheduleFieldDefault-T7IP52VU.js +0 -2
- package/dist/ZendeskDrawerDefault-YSBMA2ZH.js +0 -2
- package/dist/chunk-2IA5ZHU4.js.map +0 -1
- package/dist/chunk-H2JFQGQJ.js +0 -2
- package/dist/chunk-I3TP6JKM.js.map +0 -1
- package/dist/chunk-IZGJP7OI.js +0 -2
- package/dist/chunk-IZGJP7OI.js.map +0 -1
- package/dist/chunk-K5S6JRYY.js +0 -2
- package/dist/chunk-K5S6JRYY.js.map +0 -1
- package/dist/chunk-LHEF2FN7.js +0 -2
- package/dist/chunk-LHEF2FN7.js.map +0 -1
- package/dist/chunk-NEWXVHFX.js +0 -2
- package/dist/chunk-NEWXVHFX.js.map +0 -1
- package/dist/chunk-PKK2EEXH.js.map +0 -1
- package/dist/chunk-RJY6AEJB.js +0 -2
- package/dist/chunk-RJY6AEJB.js.map +0 -1
- package/dist/chunk-TXQWBDNF.js +0 -2
- package/dist/chunk-TXQWBDNF.js.map +0 -1
- package/dist/chunk-VKE3F6V7.js +0 -2
- package/dist/chunk-VKE3F6V7.js.map +0 -1
- package/dist/chunk-VLSOHNT2.js.map +0 -1
- package/dist/chunk-XOK42FJS.js +0 -2
- package/dist/chunk-XOK42FJS.js.map +0 -1
- package/dist/chunk-ZVUQDK2E.js +0 -2
- /package/dist/{ButtonDefault-6LBHWUQH.js.map → ButtonDefault-2YV2Z474.js.map} +0 -0
- /package/dist/{CheckboxFieldDefault-X4DYVQCE.js.map → CheckboxFieldDefault-SZZQUVAM.js.map} +0 -0
- /package/dist/{CountryFieldDefault-KSVYDH5T.js.map → CountryFieldDefault-IBVQJVMW.js.map} +0 -0
- /package/dist/{DatePickerFieldDefault-TZEI446Y.js.map → DatePickerFieldDefault-5LEOVIM2.js.map} +0 -0
- /package/dist/{DrawerDefault-FLNSDSMB.js.map → DrawerDefault-AAUS7T5W.js.map} +0 -0
- /package/dist/{EmailFieldDefault-T6HHE5RL.js.map → EmailFieldDefault-2PMSDIXF.js.map} +0 -0
- /package/dist/{FieldsetToggleButtonDefault-MXBQJ55Q.js.map → FieldsetToggleButtonDefault-MFLN2WWT.js.map} +0 -0
- /package/dist/{FileUploadFieldDefault-5NW3ZFXD.js.map → FileUploadFieldDefault-Y2ZYBSTV.js.map} +0 -0
- /package/dist/{MultiSelectFieldDefault-OQ6SNNBI.js.map → MultiSelectFieldDefault-UK7652MS.js.map} +0 -0
- /package/dist/{NumberFieldDefault-IVUTWJS5.js.map → NumberFieldDefault-C5V6POQ7.js.map} +0 -0
- /package/dist/{RadioGroupFieldDefault-U44JTO4O.js.map → RadioGroupFieldDefault-DNESPKMT.js.map} +0 -0
- /package/dist/{SelectFieldDefault-66GGFDX3.js.map → SelectFieldDefault-4KQUV57C.js.map} +0 -0
- /package/dist/{TextAreaFieldDefault-5H34RRBA.js.map → TextAreaFieldDefault-5P2MEQUR.js.map} +0 -0
- /package/dist/{TextFieldDefault-VHIF2KLF.js.map → TextFieldDefault-PMCQSPPT.js.map} +0 -0
- /package/dist/{WorkScheduleFieldDefault-T7IP52VU.js.map → WorkScheduleFieldDefault-SR3G37MN.js.map} +0 -0
- /package/dist/{ZendeskDrawerDefault-YSBMA2ZH.js.map → ZendeskDrawerDefault-A5PVWI4R.js.map} +0 -0
- /package/dist/{chunk-5D4AKL3N.js.map → chunk-24FMEFH5.js.map} +0 -0
- /package/dist/{chunk-ZWIH53GL.js.map → chunk-3C6N7DK6.js.map} +0 -0
- /package/dist/{chunk-FUGPVPYX.js.map → chunk-3NESYBEJ.js.map} +0 -0
- /package/dist/{chunk-ZTKZWB7I.js.map → chunk-3OJVYYPZ.js.map} +0 -0
- /package/dist/{chunk-5BBQUGAN.js.map → chunk-3UEQXLRC.js.map} +0 -0
- /package/dist/{chunk-DNDYXEZ6.js.map → chunk-4J36XOH2.js.map} +0 -0
- /package/dist/{chunk-5L2ELV4L.js.map → chunk-4S7BRDNF.js.map} +0 -0
- /package/dist/{chunk-GDJP7TMP.js.map → chunk-5JGEEJ3A.js.map} +0 -0
- /package/dist/{chunk-C6KWUSCU.js.map → chunk-6PYJAPM2.js.map} +0 -0
- /package/dist/{chunk-L4P7572F.js.map → chunk-74ZEXZAY.js.map} +0 -0
- /package/dist/{chunk-DM5RRWPM.js.map → chunk-7EUMRKH4.js.map} +0 -0
- /package/dist/{chunk-SJ5IZCJP.js.map → chunk-7M7VN4WI.js.map} +0 -0
- /package/dist/{chunk-XFGSO4WQ.js.map → chunk-AFHSKSGA.js.map} +0 -0
- /package/dist/{chunk-EHD2YB5F.js.map → chunk-AOSXULKY.js.map} +0 -0
- /package/dist/{chunk-QI6E2NJU.js.map → chunk-B7TQYSAY.js.map} +0 -0
- /package/dist/{chunk-KQKH3H6S.js.map → chunk-BAMGHBLT.js.map} +0 -0
- /package/dist/{chunk-545OW3ET.js.map → chunk-BLGKOMH3.js.map} +0 -0
- /package/dist/{chunk-N3Q636ZK.js.map → chunk-BTS5Q6UZ.js.map} +0 -0
- /package/dist/{chunk-SNRZPCZ7.js.map → chunk-BUOCIXUH.js.map} +0 -0
- /package/dist/{chunk-SS2FAFUZ.js.map → chunk-BYDQHL6O.js.map} +0 -0
- /package/dist/{chunk-XFDNQDDA.js.map → chunk-CJG77FUT.js.map} +0 -0
- /package/dist/{chunk-WH6BDFVD.js.map → chunk-CR3X2TWM.js.map} +0 -0
- /package/dist/{chunk-QNWTCGRD.js.map → chunk-D36G74ID.js.map} +0 -0
- /package/dist/{chunk-JPA3IMPE.js.map → chunk-DFYEI445.js.map} +0 -0
- /package/dist/{chunk-OZKZKV5C.js.map → chunk-DHRMW63S.js.map} +0 -0
- /package/dist/{chunk-CUANSH3E.js.map → chunk-DPRCPBRB.js.map} +0 -0
- /package/dist/{chunk-HKNK5Z6N.js.map → chunk-EIVCBH53.js.map} +0 -0
- /package/dist/{chunk-OXAEJWEQ.js.map → chunk-EMP4ZIVB.js.map} +0 -0
- /package/dist/{chunk-T3GSGHZJ.js.map → chunk-GSPD4EIV.js.map} +0 -0
- /package/dist/{chunk-44RIEWXA.js.map → chunk-HFQAVCD2.js.map} +0 -0
- /package/dist/{chunk-TOQPDTGG.js.map → chunk-HJ7WOTV7.js.map} +0 -0
- /package/dist/{chunk-NAGIFFJS.js.map → chunk-I5FVESDZ.js.map} +0 -0
- /package/dist/{chunk-DAXHNASW.js.map → chunk-IVXIAOMR.js.map} +0 -0
- /package/dist/{chunk-URJI6IZB.js.map → chunk-JDVILEVL.js.map} +0 -0
- /package/dist/{chunk-36MJ5ORQ.js.map → chunk-JEFPOHCP.js.map} +0 -0
- /package/dist/{chunk-SAKDBD4P.js.map → chunk-JTPKAIYL.js.map} +0 -0
- /package/dist/{chunk-SD3LBJUH.js.map → chunk-KJ4JS75E.js.map} +0 -0
- /package/dist/{chunk-V74BLD3D.js.map → chunk-KNHDPKRL.js.map} +0 -0
- /package/dist/{chunk-3GYINB3B.js.map → chunk-KYBKW4FE.js.map} +0 -0
- /package/dist/{chunk-M53HKCJ5.js.map → chunk-LM766FLB.js.map} +0 -0
- /package/dist/{chunk-FQHFTFUZ.js.map → chunk-LSW66EIR.js.map} +0 -0
- /package/dist/{chunk-I2NE5CCG.js.map → chunk-M7KQPXCS.js.map} +0 -0
- /package/dist/{chunk-ULP5B6DG.js.map → chunk-MGY23P25.js.map} +0 -0
- /package/dist/{chunk-ZVUQDK2E.js.map → chunk-MTYN4AM3.js.map} +0 -0
- /package/dist/{chunk-BCO3C476.js.map → chunk-MVQOMW7S.js.map} +0 -0
- /package/dist/{chunk-OHCA7HXR.js.map → chunk-MXSKCQOT.js.map} +0 -0
- /package/dist/{chunk-IGLKMXWJ.js.map → chunk-NAMR4DA5.js.map} +0 -0
- /package/dist/{chunk-YRC6EEM3.js.map → chunk-NEKE5PRJ.js.map} +0 -0
- /package/dist/{chunk-FJ6WBG3H.js.map → chunk-O6H66UM2.js.map} +0 -0
- /package/dist/{chunk-Q73675NI.js.map → chunk-OIBZ7VUR.js.map} +0 -0
- /package/dist/{chunk-TMWN4PEK.js.map → chunk-OUSCSVMQ.js.map} +0 -0
- /package/dist/{chunk-X6ZOK7H5.js.map → chunk-POKLRB3M.js.map} +0 -0
- /package/dist/{chunk-J6HS3UVY.js.map → chunk-PVZTOW7Z.js.map} +0 -0
- /package/dist/{chunk-WUFJP4GG.js.map → chunk-Q3VMPVT3.js.map} +0 -0
- /package/dist/{chunk-XU3B7N3C.js.map → chunk-QJ2XK63I.js.map} +0 -0
- /package/dist/{chunk-MCWXQT7A.js.map → chunk-RGLQY27T.js.map} +0 -0
- /package/dist/{chunk-CPXEQRNG.js.map → chunk-RMIAJZOG.js.map} +0 -0
- /package/dist/{chunk-UPJDLAKU.js.map → chunk-RSZZMCB2.js.map} +0 -0
- /package/dist/{chunk-FBWPGUBC.js.map → chunk-RZJ7WE6G.js.map} +0 -0
- /package/dist/{chunk-EKJK34DS.js.map → chunk-T5JT2ZU2.js.map} +0 -0
- /package/dist/{chunk-B66V5QEC.js.map → chunk-TV2NNJVO.js.map} +0 -0
- /package/dist/{chunk-GCVM3FO4.js.map → chunk-VCDA76UN.js.map} +0 -0
- /package/dist/{chunk-HUZBKPGP.js.map → chunk-VKQQKGGY.js.map} +0 -0
- /package/dist/{chunk-7RP5F62S.js.map → chunk-VPSESR6G.js.map} +0 -0
- /package/dist/{chunk-ZAFGVOU5.js.map → chunk-VXMLYWZ2.js.map} +0 -0
- /package/dist/{chunk-EQVUP5ZR.js.map → chunk-W4RON3XZ.js.map} +0 -0
- /package/dist/{chunk-WOH5UQMK.js.map → chunk-WKLTHGWU.js.map} +0 -0
- /package/dist/{chunk-NNW7S5AY.js.map → chunk-WURYTVWC.js.map} +0 -0
- /package/dist/{chunk-C6ND527K.js.map → chunk-X6CON4YE.js.map} +0 -0
- /package/dist/{chunk-6P53J6DA.js.map → chunk-XQZI2FRQ.js.map} +0 -0
- /package/dist/{chunk-QGGPXNVY.js.map → chunk-Y2LBI32D.js.map} +0 -0
- /package/dist/{chunk-AK4FXJFO.js.map → chunk-YHCH57B7.js.map} +0 -0
- /package/dist/{chunk-J2BTEUAM.js.map → chunk-YHQQSL4Q.js.map} +0 -0
- /package/dist/{chunk-PGVAOMQU.js.map → chunk-YIOLMWB5.js.map} +0 -0
- /package/dist/{chunk-AJCKNHZB.js.map → chunk-YWOJ4NKF.js.map} +0 -0
- /package/dist/{chunk-V6LOIP27.js.map → chunk-Z6B3PA4M.js.map} +0 -0
- /package/dist/{chunk-GCBEPX4V.js.map → chunk-ZOTT6IZN.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as i,c as m,d as s,e as f}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as i,c as m,d as s,e as f}from"./chunk-W4RON3XZ.js";import{a as n}from"./chunk-TXSUZLOI.js";import{a}from"./chunk-P37U34EQ.js";import{useState as O}from"react";var B=a(({proposedTerminationDate:e,employeeName:y,employmentId:o,employment:r,render:d})=>{let[t,u]=O(!1),l=m({employmentId:o}),p=n(e).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),c=i({employmentId:o,options:{enabled:t}}),D=s({employmentId:o,date:e}),P=f({employmentId:o,proposedTerminationDate:e,employment:r});return d({leavePoliciesSummaryQuery:l,timeoffQuery:c||{data:{bookedDays:0,timeoffs:[]}},bookedTimeBeforeAndAfterTerminationQuery:D,formattedProposedTerminationDate:p,employeeName:y,proposedTerminationDate:e,summaryData:P??{data:{entitledDays:"0 days",bookedDays:"0 days",usedDays:"0 days",approvedDaysBeforeTermination:"0 days",approvedDaysAfterTermination:"0 days",remainingDays:"0 days",isUnlimitedPto:!1},isLoading:!1,isError:!1,error:null},employment:r,open:t,onOpenChange:a(()=>{u(T=>!T)},"onOpenChange")})},"PaidTimeOffContainer");export{B as a};
|
|
2
|
+
//# sourceMappingURL=chunk-WURYTVWC.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n,b as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n,b as i}from"./chunk-YHCH57B7.js";import{a as e}from"./chunk-VIGKOVHP.js";import{a as o}from"./chunk-P37U34EQ.js";import{Fragment as s,jsx as t,jsxs as r}from"react/jsx-runtime";var l=["You submit your termination request.","Remote reviews your request along with the employment agreement, local labor laws, and any collective bargaining agreements in place.","A lifecycle specialist contacts you if they need additional details. Sometimes they will request a call.","Depending on the country-specific laws and the terms of the employment agreement, Remote may need to seek additional legal advice. We\u2019ll let you know if there are additional charges before proceeding.","Terms and conditions for the termination are finalized.","You verbally communicate the termination to the employee.","Remote shares termination documents with the employee.","The employee signs the termination documents if required.","Remote processes the final salary and offboards the employee."],f=o(()=>r(s,{children:[t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__Title"),children:"Please read carefully before you continue"}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description"),children:"Please do not inform the employee of the termination. Remote will lead communication with them after you submit this form and they finalize the termination terms."}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription"),children:"If you already informed them, that's okay. Remote will ask for the details regarding that communication and they'll take it from there."}),t(i,{className:e("RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm"),zendeskId:n.terminationEmployeeCommunication,children:"Learn more about employee communication"}),t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessTitle"),children:"The termination process"}),t("ul",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessList list-disc list-inside"),children:l.map((a,m)=>t("li",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessListItem"),children:a},m))})]}),"TerminationDialogInfoContent");export{f as a};
|
|
2
|
+
//# sourceMappingURL=chunk-X6CON4YE.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{f as Qt,h as Jt,i as Nt}from"./chunk-Q3VMPVT3.js";import{a as Wt,b as te,c as ee,d as ie,e as ne,f as re,h as oe,i as ae,j as se,k as ce,l as le,m as ue,n as de,o as pe,p as me,q as fe,r as ye,s as _e,t as ge}from"./chunk-IVXIAOMR.js";import{a as be,b as Se,c as Ce}from"./chunk-ROQYHTFQ.js";import{a as zt,b as Ht,f as Xt,g as Yt,h as Zt}from"./chunk-AHRG5QCS.js";import{a as $,b as nt,c as y,d as Gt,g as $t}from"./chunk-PX5PE6GX.js";import{a as Ut}from"./chunk-YIOLMWB5.js";import{a as jt,e as f,f as D}from"./chunk-T7O3YYOG.js";import{L as Bt}from"./chunk-WQ4H5V7U.js";import{h as P,i as I}from"./chunk-VIGKOVHP.js";import{a as b}from"./chunk-X6ZAR7ZL.js";import{a as Kt}from"./chunk-TSPDJUGG.js";import{d as xt}from"./chunk-KQPDXXG3.js";import{a as u}from"./chunk-P37U34EQ.js";import{useEffect as L,useMemo as o,useRef as _i,useState as T}from"react";import he from"lodash.omit";import{useQuery as fi}from"@tanstack/react-query";var yi=u(()=>{let{client:k}=xt(),{data:R}=te(),s=ee(R)?R?.company?.id??"":"";return fi({queryKey:["legal-entities",s],queryFn:u(()=>Bt({client:k,path:{company_id:s},query:{page_size:100}}),"queryFn"),select:u(W=>W.data?.data?.legal_entities,"select"),enabled:!!s})},"useLegalEntities"),we=u(()=>{let{data:k}=yi();return k?.find(R=>R.is_default)},"useDefaultLegalEntity");var gi={select_country:null,basic_information:"employment_basic_information",contract_details:null,eligibility_questionnaire:null,pricing_plan:null,contract_preview:null,review:null},bi={employment_basic_information:"basic_information"},Gi=u(({countryCode:k,externalId:R,employmentId:s,skipSteps:W,options:_,initialValues:d})=>{let Pe=_?.excludeProducts||[],[l,yt]=T(k||null),[a,Ee]=T(s),[E,_t]=T(void 0),z=_i({select_country:{},basic_information:{},contract_details:{},contract_preview:{},pricing_plan:{},eligibility_questionnaire:{}}),[H,ve]=T(void 0),[gt,X]=T(!1),[bt,Fe]=T(!0),[rt,St]=T(null),{steps:Ve,stepsArray:Me}=o(()=>zt({includeSelectCountry:!W?.includes("select_country"),includeEligibilityQuestionnaire:gt,includeContractPreview:bt}),[gt,bt,W]),{fieldValues:c,stepState:e,setFieldValues:ot,previousStep:Oe,nextStep:Ie,goToStep:B,setStepValues:Ct}=Kt(Ve);L(()=>{rt&&(B(rt),St(null))},[rt,B]);let{data:r,isLoading:De,refetch:wt}=Ut({employmentId:a,queryParams:{exclude_files:!0}}),Te=we(),{status:q}=r||{},S=q&&Xt.includes(q),Re=q&&!Yt.includes(q),qe=o(()=>q==="invited"?"invited":"not_invited",[q]),ht=Jt(),Pt=Nt(l,_),at=ae(),Et=Wt(),{mutateAsync:vt}=le(at,Et,c),Ft=me(),Vt=fe(),{mutateAsyncOrThrow:Ae}=b(Pt),Mt=ne(),Ot=oe(),It=ye(),{mutateAsyncOrThrow:Le}=b(ht),{mutateAsyncOrThrow:ke}=b(at),{mutateAsyncOrThrow:Be}=b(Mt),{mutateAsyncOrThrow:Dt}=b(Ot),{mutateAsyncOrThrow:xe}=b(Ft),{mutateAsyncOrThrow:Tt}=b(Vt),{mutateAsyncOrThrow:je}=b(It);s&&r?.country?.code&&!l&&yt(r.country.code);let{selectCountryForm:Y,isLoading:Qe,countries:Rt}=_e({jsfModify:_?.jsfModify?.select_country}),st=o(()=>Rt?.find(t=>t.value===l),[Rt,l]),Je=o(()=>st?.label,[st]),Ne=e.currentStep.name==="pricing_plan"||!!s&&S,{form:v,isLoading:Ue,contractorSubscriptions:Z,refetch:ct,isEligibilityQuestionnaireBlocked:x}=ce(a,st,{jsonSchemaVersion:_?.jsonSchemaVersion,queryOptions:{enabled:Ne},excludeProducts:Pe,jsfModify:_?.jsfModify?.pricing_plan}),F=o(()=>!!Z?.find(t=>t.product.short_name==="COR")?.eligibility_questionnaire?.submitted_at,[Z]);L(()=>{if(F){X(!1);return}else X(H===y)},[F,H]),L(()=>{let t=r?.contractor_type==="cor";Fe(!t)},[r?.contractor_type]);let tt=o(()=>Z?.find(t=>t.product.short_name==="COR")?.eligibility_questionnaire?.responses,[Z]),Ke=gi[e.currentStep.name]||"contractor_basic_information",Ge=bi[Ke],$e=r?.[Ge]||{},We=u(({form:t,options:n={},query:m={}})=>{let g=Object.keys(c).length>0?{...d,...e.values?.[e.currentStep.name],...c}:{...d,...$e};return Qt({countryCode:l,form:t,fieldValues:g,query:m,options:{...n,queryOptions:{enabled:n.queryOptions?.enabled??!0}}})},"useJSONSchema"),ze=!!(l&&(e.currentStep.name==="basic_information"||s)),He=!!(l==="GBR"&&s&&e.currentStep.name==="basic_information"),{data:j,isLoading:Xe}=ue(s,{enabled:He}),{data:et,isLoading:Ye}=de(s,{enabled:!!s});L(()=>{et&&et.length>0&&!E&&_t(et[0].id)},[et,E]);let{data:C,isLoading:Ze}=We({form:"contractor_basic_information",options:{jsfModify:Se(l,Je,_),queryOptions:{enabled:ze}}}),ti=o(()=>Ht(r?.basic_information?.provisional_start_date,c?.service_duration?.provisional_start_date),[r?.basic_information?.provisional_start_date,c?.service_duration?.provisional_start_date]),p=o(()=>{let t={standard:$,plus:nt,cor:y};if(c.subscription)return c.subscription;let n=e.values?.pricing_plan?.subscription;return n&&!x?n:F&&!x?y:x&&F?$:t[r?.contractor_type]||$},[c,e.values,F,r?.contractor_type,x]);L(()=>{p&&p!==H&&ve(p)},[p,H]);let ei=o(()=>({...tt,...d,...e.values?.eligibility_questionnaire,...c}),[tt,d,e.values?.eligibility_questionnaire,c]),ii=o(()=>p===y&&e.currentStep.name==="eligibility_questionnaire"||!!s&&S&&p===y,[p,e.currentStep.name,s,S]),{data:V,isLoading:ni}=pe({options:{queryOptions:{enabled:ii},jsfModify:_?.jsfModify?.eligibility_questionnaire},fieldValues:ei}),ri=!!(l&&e.currentStep.name==="contract_details"||S),{data:w,isLoading:oi}=ge({countryCode:l,fieldValues:c,employmentId:a,options:{queryOptions:{enabled:ri},jsfModify:be(_?.jsfModify?.contract_details,ti,p,c,p===y)}}),ai=o(()=>e.currentStep.name==="contract_preview"||!!s&&S,[e.currentStep.name,s,S]),{data:M}=ie({fieldValues:c,options:{queryOptions:{enabled:ai},jsfModify:Ce(_,c)}}),{data:lt,isLoading:si}=re({employmentId:a,contractDocumentId:E,options:{queryOptions:{enabled:!!E}}}),i=o(()=>({select_country:Y?.fields||[],basic_information:C?.fields||[],pricing_plan:v?.fields||[],eligibility_questionnaire:V?.fields||[],contract_details:w?.fields||[],contract_preview:M?.fields||[],review:[]}),[Y?.fields,C?.fields,v?.fields,w?.fields,M?.fields,V?.fields]),ci={select_country:null,basic_information:C?.meta["x-jsf-fieldsets"],pricing_plan:null,contract_details:w?.meta["x-jsf-fieldsets"],eligibility_questionnaire:null,contract_preview:null,review:null},{country:li,basic_information:it={},contract_details:qt={}}=r||{},At=li?.code,Q=o(()=>D(i.select_country,{country:l||At||""}),[i.select_country,l,At]),ut=o(()=>j?.content?jt(j.content,j.name):null,[j?.content,j?.name]),J=o(()=>{let t={...d,...it,ir35:r?.contract_details?.ir_35,nationality_status:r?.contract_details?.nationality,...ut&&{ir35_sds_file:[ut]}};return D(i.basic_information,t)},[d,it,r?.contract_details?.ir_35,r?.contract_details?.nationality,ut,i.basic_information]),N=o(()=>{let n={...{service_duration:{provisional_start_date:it.provisional_start_date}},...d,...qt};return D(i.contract_details,n)},[i.contract_details,qt,d,it]),U=o(()=>{let t=lt?.contract_document?.signatories?.find(m=>m.type==="company"),n={...d,signature:t?.signature};return D(i.contract_preview,n)},[i.contract_preview,d,lt]),K=o(()=>{let n={...{subscription:p},...d};return D(i.pricing_plan,n)},[i.pricing_plan,d,p]),G=o(()=>{let t={...d,...tt};return D(i.eligibility_questionnaire,t)},[i.eligibility_questionnaire,d,tt]),ui=o(()=>({select_country:Q,basic_information:J,contract_details:N,contract_preview:U,pricing_plan:K,eligibility_questionnaire:G}),[Q,J,N,U,K,G]),dt=!!(s&&S&&e.currentStep.name!=="review"),pt=Qe||Ze||De||oi||Ue||si||Xe||Ye||ni,Lt=o(()=>{let n=r?.contractor_type==="cor"||i.contract_preview.length>0;return!!(dt&&!pt&&E&&i.basic_information.length>0&&i.contract_details.length>0&&n)},[dt,pt,E,i.basic_information.length,i.contract_details.length,i.contract_preview.length,r?.contractor_type]);L(()=>{Lt&&(z.current={select_country:P(Q,i.select_country),basic_information:P(J,i.basic_information),contract_details:P(N,i.contract_details),contract_preview:P(U,i.contract_preview),pricing_plan:P(K,i.pricing_plan),eligibility_questionnaire:P(G,i.eligibility_questionnaire)},Ct({select_country:Q,basic_information:J,contract_details:N,contract_preview:U,pricing_plan:K,eligibility_questionnaire:G,review:{}}),B("review"))},[Lt,B,Q,J,N,Ct,i.select_country,i.basic_information,i.contract_details,i.pricing_plan,K,i.contract_preview,U,i.eligibility_questionnaire,G]);let di=u(t=>{B(t)},"goTo"),kt=u(async t=>Y&&e.currentStep.name==="select_country"?t:C&&e.currentStep.name==="basic_information"?await f(t,C?.fields,{isPartialValidation:!1}):w&&e.currentStep.name==="contract_details"?await f(t,w?.fields,{isPartialValidation:!1}):M&&e.currentStep.name==="contract_preview"?await f(t,M?.fields,{isPartialValidation:!1}):v&&e.currentStep.name==="pricing_plan"?await f(t,v?.fields,{isPartialValidation:!1}):V&&e.currentStep.name==="eligibility_questionnaire"?await f(t,V?.fields,{isPartialValidation:!1}):{},"parseFormValues"),pi=u(t=>{let n=t?.rawError?.error?.errors?.services_and_deliverables;return n?.source===$t?{error:n.error,source:n.source,skippable:n.skippable}:null},"extractAiValidationError");async function mi(t){let n=e.currentStep.name;n in z.current&&(z.current[n]=P(t,i[n]));let m=await kt(t);switch(e.currentStep.name){case"select_country":return yt(m.country),Promise.resolve({data:{countryCode:m.country}});case"basic_information":{let A=!a&&l,g=a&&l&&r?.country&&r?.country.code!==l;if(A||g){let O={basic_information:he(m,"nationality_status","ir35","ir35_sds_file"),type:"contractor",country_code:l,external_id:R},mt=await Le(O),ft=mt?.data?.employment?.id;if(!ft)throw I("Employment ID not found");return await vt({employmentId:ft}),Ee(ft),mt}else if(a){let h=he(m,"nationality_status","ir35","ir35_sds_file");return await vt({employmentId:a}),Ae({employmentId:a,basic_information:h})}return}case"contract_details":{console.log("parsedValues",m);let A=c.services_and_deliverables_error_skippable===!0,g={contract_document:m,skip_ai_checks:A};try{let h=await ke({employmentId:a,payload:g}),O=h?.data?.contract_document?.id;if(!O)throw I("Contract document ID not found");return _t(O),h}catch(h){let O=pi(h);throw O&&ot({...t,services_and_deliverables_ai_warning:Zt(p===y),services_and_deliverables_error_skippable:O.skippable}),h}}case"contract_preview":return Be({employmentId:a,contractDocumentId:E,payload:{signature:m.signature}});case"pricing_plan":{if(x&&[y,nt].includes(t.subscription))throw I(`This individual is not eligible for ${se[t.subscription]}.`);if(t.subscription===Gt)return Promise.resolve({data:{subscription:t.subscription}});if(F&&t.subscription!==y)try{await je({employmentId:a}),await ct()}catch(g){if(g?.response?.status!==404)throw g;await ct()}if(t.subscription==$)return Dt({employmentId:a,payload:{operation:"downgrade"}});if(t.subscription==nt)return Dt({employmentId:a,payload:{operation:"upgrade"}});if(t.subscription==y)return F&&r?.contractor_type!=="cor"?Tt({employmentId:a}):Promise.resolve({data:{subscription:t.subscription}});throw I("invalid selection")}case"eligibility_questionnaire":try{if((await xe({employmentId:a,payload:m}))?.data?.is_blocking)throw X(!1),St("pricing_plan"),I("This individual is not eligible for Contractor of Record.");return await Tt({employmentId:a})}finally{await ct()}default:throw I("Invalid step state")}}return u(mi,"onSubmit"),{isLoading:pt||dt,fieldValues:c,stepState:e,checkFieldUpdates:ot,markContractAsReviewed:u(()=>{ot({review_completed:!0})},"markContractAsReviewed"),back:Oe,next:u(()=>{a&&wt(),Ie()},"handleNextStep"),goTo:di,onSubmit:mi,fields:i[e.currentStep.name],meta:{fields:z.current,fieldsets:ci[e.currentStep.name]},parseFormValues:kt,canSkipAiValidation:c.services_and_deliverables_error_skippable===!0,handleValidation:u(async t=>{if(e.currentStep.name==="select_country")return Y.handleValidation(t);if(C&&e.currentStep.name==="basic_information"){let n=await f(t,C?.fields,{isPartialValidation:!1});return C?.handleValidation(n)}if(w&&e.currentStep.name==="contract_details"){let n=await f(t,w?.fields,{isPartialValidation:!1});return w?.handleValidation(n)}if(M&&e.currentStep.name==="contract_preview"){let n=await f(t,M?.fields,{isPartialValidation:!0});return M?.handleValidation(n)}if(v&&e.currentStep.name==="pricing_plan"){let n=await f(t,v?.fields,{isPartialValidation:!1});return v?.handleValidation(n)}if(V&&e.currentStep.name==="eligibility_questionnaire"){let n=await f(t,V?.fields,{isPartialValidation:!1});return V?.handleValidation(n)}return null},"handleValidation"),initialValues:ui,employmentId:a,refetchEmployment:wt,isSubmitting:ht.isPending||Pt.isPending||at.isPending||Mt.isPending||Ot.isPending||Et.isPending||Ft.isPending||Vt.isPending||It.isPending,documentPreviewPdf:lt,canInvite:Re,isEmploymentReadOnly:S,invitedStatus:qe,employment:r,defaultLegalEntity:Te,steps:Me}},"useContractorOnboarding");export{Gi as a};
|
|
2
|
+
//# sourceMappingURL=chunk-X6IMS3NL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/flows/ContractorOnboarding/hooks.tsx","../src/common/api/legal-entities.ts"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from 'react';\nimport { FieldValues } from 'react-hook-form';\nimport omit from 'lodash.omit';\nimport { $TSFixMe, 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 useCreateContractorContractDocument,\n useGetContractDocumentSignatureSchema,\n usePostManageContractorSubscriptions,\n useContractorSubscriptionSchemaField,\n useGetShowContractDocument,\n useSignContractDocument,\n useUpdateUKandSaudiFields,\n useGetIR35File,\n useGetContractDocuments,\n useGetEligibilityQuestionnaire,\n usePostCreateEligibilityQuestionnaire,\n usePostManageContractorCorSubscription,\n useDeleteContractorCorSubscription,\n useCountriesSchemaField,\n useContractorOnboardingDetailsSchemaWithCurrencies,\n CONTRACT_PRODUCT_TITLES,\n} from '@/src/flows/ContractorOnboarding/api';\nimport { ContractorOnboardingFlowProps } from '@/src/flows/ContractorOnboarding/types';\nimport {\n buildSteps,\n calculateProvisionalStartDateDescription,\n reviewStepAllowedEmploymentStatus,\n disabledInviteButtonEmploymentStatus,\n StepKeys,\n} from '@/src/flows/ContractorOnboarding/utils';\nimport {\n useCreateEmployment,\n useJSONSchemaForm,\n useUpdateEmployment,\n} from '@/src/flows/Onboarding/api';\nimport { FlowOptions, JSFModify, JSONSchemaFormType } from '@/src/flows/types';\nimport { 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 eorProductIdentifier,\n REMOTE_AI_ERROR_SOURCE,\n} from '@/src/flows/ContractorOnboarding/constants';\nimport {\n buildBasicInformationJsfModify,\n buildContractDetailsJsfModify,\n buildContractPreviewJsfModify,\n} from '@/src/flows/ContractorOnboarding/jsfModify';\nimport { transformAiErrorResponse } from '@/src/flows/ContractorOnboarding/utils';\nimport { AiValidationError } from '@/src/flows/ContractorOnboarding/types';\nimport { useUploadFile } from '@/src/common/api/files';\nimport { dataURLtoFile } from '@/src/lib/files';\nimport { useEmploymentQuery } from '@/src/common/api/employment';\nimport { useDefaultLegalEntity } from '@/src/common/api/legal-entities';\n\ntype useContractorOnboardingProps = Omit<\n ContractorOnboardingFlowProps,\n 'render'\n>;\n\nconst stepToFormSchemaMap: Record<StepKeys, JSONSchemaFormType | null> = {\n select_country: null,\n basic_information: 'employment_basic_information',\n contract_details: null,\n eligibility_questionnaire: 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\nexport const useContractorOnboarding = ({\n countryCode,\n externalId,\n employmentId,\n skipSteps,\n options,\n initialValues: onboardingInitialValues,\n}: useContractorOnboardingProps) => {\n const excludeProducts = options?.excludeProducts || [];\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 eligibility_questionnaire: Meta;\n }>({\n select_country: {},\n basic_information: {},\n contract_details: {},\n contract_preview: {},\n pricing_plan: {},\n eligibility_questionnaire: {},\n });\n\n const [selectedProduct, setSelectedProduct] = useState<string | undefined>(\n undefined,\n );\n\n const [includeEligibilityQuestionnaire, setIncludeEligibilityQuestionnaire] =\n useState<boolean>(false);\n\n const [includeContractPreview, setIncludeContractPreview] =\n useState<boolean>(true);\n\n const [pendingNavigationStep, setPendingNavigationStep] =\n useState<StepKeys | null>(null);\n\n const { steps, stepsArray } = useMemo(\n () =>\n buildSteps({\n includeSelectCountry: !skipSteps?.includes('select_country'),\n includeEligibilityQuestionnaire: includeEligibilityQuestionnaire,\n includeContractPreview: includeContractPreview,\n }),\n [includeEligibilityQuestionnaire, includeContractPreview, skipSteps],\n );\n\n const {\n fieldValues,\n stepState,\n setFieldValues,\n previousStep,\n nextStep,\n goToStep,\n setStepValues,\n } = useStepState(steps);\n\n useEffect(() => {\n if (pendingNavigationStep) {\n // Now steps have been updated\n goToStep(pendingNavigationStep);\n setPendingNavigationStep(null);\n }\n }, [pendingNavigationStep, goToStep]);\n\n const {\n data: employment,\n isLoading: isLoadingEmployment,\n refetch: refetchEmployment,\n } = useEmploymentQuery({\n employmentId: internalEmploymentId as string,\n queryParams: { exclude_files: true },\n });\n\n const defaultLegalEntity = useDefaultLegalEntity();\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 const createEligibilityQuestionnaireMutation =\n usePostCreateEligibilityQuestionnaire();\n const manageContractorCorSubscriptionMutation =\n usePostManageContractorCorSubscription();\n\n const { mutateAsyncOrThrow: updateEmploymentMutationAsync } =\n mutationToPromise(updateEmploymentMutation);\n const signContractDocumentMutation = useSignContractDocument();\n const manageContractorSubscriptionMutation =\n usePostManageContractorSubscriptions();\n const deleteContractorCorSubscriptionMutation =\n useDeleteContractorCorSubscription();\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 const { mutateAsyncOrThrow: createEligibilityQuestionnaireMutationAsync } =\n mutationToPromise(createEligibilityQuestionnaireMutation);\n\n const { mutateAsyncOrThrow: manageContractorCorSubscriptionMutationAsync } =\n mutationToPromise(manageContractorCorSubscriptionMutation);\n\n const { mutateAsyncOrThrow: deleteContractorCorSubscriptionMutationAsync } =\n mutationToPromise(deleteContractorCorSubscriptionMutation);\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 {\n selectCountryForm,\n isLoading: isLoadingCountries,\n countries,\n } = useCountriesSchemaField({\n jsfModify: options?.jsfModify?.select_country,\n });\n\n const selectedCountry = useMemo(() => {\n return countries?.find((country) => country.value === internalCountryCode);\n }, [countries, internalCountryCode]);\n\n const countryName = useMemo(() => {\n return selectedCountry?.label;\n }, [selectedCountry]);\n\n const isPricingPlanEnabled =\n stepState.currentStep.name === 'pricing_plan' ||\n (Boolean(employmentId) && isEmploymentReadOnly);\n\n const {\n form: selectContractorSubscriptionForm,\n isLoading: isLoadingContractorSubscriptions,\n contractorSubscriptions,\n refetch: refetchContractorSubscriptions,\n isEligibilityQuestionnaireBlocked,\n } = useContractorSubscriptionSchemaField(\n internalEmploymentId as string,\n selectedCountry,\n {\n jsonSchemaVersion: options?.jsonSchemaVersion,\n queryOptions: {\n enabled: isPricingPlanEnabled,\n },\n excludeProducts: excludeProducts,\n jsfModify: options?.jsfModify?.pricing_plan,\n },\n );\n\n const hasEligibilityQuestionnaireSubmitted = useMemo(() => {\n return Boolean(\n contractorSubscriptions?.find(\n (subscription) => subscription.product.short_name === 'COR',\n )?.eligibility_questionnaire?.submitted_at,\n );\n }, [contractorSubscriptions]);\n\n useEffect(() => {\n if (hasEligibilityQuestionnaireSubmitted) {\n setIncludeEligibilityQuestionnaire(false);\n return;\n } else if (selectedProduct === corProductIdentifier) {\n setIncludeEligibilityQuestionnaire(true);\n } else {\n setIncludeEligibilityQuestionnaire(false);\n }\n }, [hasEligibilityQuestionnaireSubmitted, selectedProduct]);\n\n useEffect(() => {\n const isCor = employment?.contractor_type === 'cor';\n setIncludeContractPreview(!isCor);\n }, [employment?.contractor_type]);\n\n const eligibilityAnswers = useMemo(() => {\n return contractorSubscriptions?.find(\n (subscription) => subscription.product.short_name === 'COR',\n )?.eligibility_questionnaire?.responses;\n }, [contractorSubscriptions]);\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 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 { data: contractDocuments, isLoading: isLoadingContractDocuments } =\n useGetContractDocuments(employmentId as string, {\n enabled: Boolean(employmentId),\n });\n\n useEffect(() => {\n if (\n contractDocuments &&\n contractDocuments.length > 0 &&\n !internalContractDocumentId\n ) {\n setInternalContractDocumentId(contractDocuments[0].id);\n }\n }, [contractDocuments, internalContractDocumentId]);\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 countryName,\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 /**\n * When the user selects COR, the data isn't saved yet in the BE\n * We need to use the internalState to know what has happened\n */\n const selectedPricingPlan = useMemo(() => {\n const subscriptions = {\n standard: contractorStandardProductIdentifier,\n plus: contractorPlusProductIdentifier,\n cor: corProductIdentifier,\n };\n\n // HIGHEST PRIORITY: Current form value (user is actively selecting)\n if (fieldValues.subscription) {\n return fieldValues.subscription;\n }\n\n // SECOND: Previously submitted value in this session\n const subscription = stepState.values?.pricing_plan?.subscription;\n if (subscription && !isEligibilityQuestionnaireBlocked) {\n return subscription;\n }\n\n // THIRD: Backend state (eligibility submitted or employment contractor_type)\n if (\n hasEligibilityQuestionnaireSubmitted &&\n !isEligibilityQuestionnaireBlocked\n ) {\n return corProductIdentifier;\n }\n\n // Fourth: If the eligibility questionnaire is blocked and has been submitted, return the standard product\n if (\n isEligibilityQuestionnaireBlocked &&\n hasEligibilityQuestionnaireSubmitted\n ) {\n return contractorStandardProductIdentifier;\n }\n\n // FALLBACK: Employment contractor_type or default\n return (\n subscriptions[\n employment?.contractor_type as keyof typeof subscriptions\n ] || contractorStandardProductIdentifier\n );\n }, [\n fieldValues,\n stepState.values,\n hasEligibilityQuestionnaireSubmitted,\n employment?.contractor_type,\n isEligibilityQuestionnaireBlocked,\n ]);\n\n useEffect(() => {\n if (selectedPricingPlan && selectedPricingPlan !== selectedProduct) {\n setSelectedProduct(selectedPricingPlan);\n }\n }, [selectedPricingPlan, selectedProduct]);\n\n const eligibilityFields = useMemo(() => {\n return {\n ...eligibilityAnswers,\n ...onboardingInitialValues,\n ...stepState.values?.eligibility_questionnaire,\n ...fieldValues,\n };\n }, [\n eligibilityAnswers,\n onboardingInitialValues,\n stepState.values?.eligibility_questionnaire,\n fieldValues,\n ]);\n\n const isEligibilityQuestionnaireEnabled = useMemo(() => {\n return (\n (selectedPricingPlan === corProductIdentifier &&\n stepState.currentStep.name === 'eligibility_questionnaire') ||\n (Boolean(employmentId) &&\n isEmploymentReadOnly &&\n selectedPricingPlan === corProductIdentifier)\n );\n }, [\n selectedPricingPlan,\n stepState.currentStep.name,\n employmentId,\n isEmploymentReadOnly,\n ]);\n\n const {\n data: eligibilityQuestionnaireForm,\n isLoading: isLoadingEligibilityQuestionnaire,\n } = useGetEligibilityQuestionnaire({\n options: {\n queryOptions: {\n enabled: isEligibilityQuestionnaireEnabled,\n },\n jsfModify: options?.jsfModify?.eligibility_questionnaire,\n },\n fieldValues: eligibilityFields,\n });\n\n const isContractorOnboardingDetailsEnabled = Boolean(\n (internalCountryCode &&\n stepState.currentStep.name === 'contract_details') ||\n isEmploymentReadOnly,\n );\n\n const {\n data: contractorOnboardingDetailsForm,\n isLoading: isLoadingContractorOnboardingDetailsForm,\n } = useContractorOnboardingDetailsSchemaWithCurrencies({\n countryCode: internalCountryCode as string,\n fieldValues: fieldValues,\n employmentId: internalEmploymentId as string,\n options: {\n queryOptions: {\n enabled: isContractorOnboardingDetailsEnabled,\n },\n jsfModify: buildContractDetailsJsfModify(\n options?.jsfModify?.contract_details,\n descriptionProvisionalStartDate,\n selectedPricingPlan,\n fieldValues,\n selectedPricingPlan === corProductIdentifier,\n ),\n },\n });\n\n const isSignatureSchemaEnabled = useMemo(() => {\n return (\n stepState.currentStep.name === 'contract_preview' ||\n (Boolean(employmentId) && isEmploymentReadOnly)\n );\n }, [stepState.currentStep.name, employmentId, isEmploymentReadOnly]);\n\n const { data: signatureSchemaForm } = useGetContractDocumentSignatureSchema({\n fieldValues: fieldValues,\n options: {\n queryOptions: {\n enabled: isSignatureSchemaEnabled,\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<StepKeys, JSFFields> = useMemo(\n () => ({\n select_country: selectCountryForm?.fields || [],\n basic_information: basicInformationForm?.fields || [],\n pricing_plan: selectContractorSubscriptionForm?.fields || [],\n eligibility_questionnaire: eligibilityQuestionnaireForm?.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 eligibilityQuestionnaireForm?.fields,\n ],\n );\n\n const stepFieldsWithFlatFieldsets: Record<\n StepKeys,\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 eligibility_questionnaire: null,\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 // memoize file conversion to avoid re-converting the file on every render\n // noticed performance issues when not doing memoizing individually\n const convertedIr35File = useMemo(() => {\n if (!ir35File?.content) return null;\n return dataURLtoFile(ir35File.content as unknown as string, ir35File.name);\n }, [ir35File?.content, ir35File?.name]);\n\n const basicInformationInitialValues = useMemo(() => {\n const initialValues = {\n ...onboardingInitialValues,\n ...employmentBasicInformation,\n ir35: employment?.contract_details?.ir_35,\n nationality_status: employment?.contract_details?.nationality,\n ...(convertedIr35File && {\n ir35_sds_file: [convertedIr35File],\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 convertedIr35File,\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 const signature = documentPreviewPdf?.contract_document?.signatories?.find(\n (signatory) => signatory.type === 'company',\n );\n const initialValues = {\n ...onboardingInitialValues,\n signature: signature?.signature,\n };\n\n return getInitialValues(stepFields.contract_preview, initialValues);\n }, [\n stepFields.contract_preview,\n onboardingInitialValues,\n documentPreviewPdf,\n ]);\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 eligibilityQuestionnaireInitialValues = useMemo(() => {\n const initialValues = {\n ...onboardingInitialValues,\n ...eligibilityAnswers,\n };\n return getInitialValues(\n stepFields.eligibility_questionnaire,\n initialValues,\n );\n }, [\n stepFields.eligibility_questionnaire,\n onboardingInitialValues,\n eligibilityAnswers,\n ]);\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 eligibility_questionnaire: eligibilityQuestionnaireInitialValues,\n };\n }, [\n selectCountryInitialValues,\n basicInformationInitialValues,\n contractDetailsInitialValues,\n contractPreviewInitialValues,\n pricingPlanInitialValues,\n eligibilityQuestionnaireInitialValues,\n ]);\n\n const shouldHandleReadOnlyEmployment = Boolean(\n employmentId &&\n isEmploymentReadOnly &&\n stepState.currentStep.name !== 'review',\n );\n\n const initialLoading =\n isLoadingCountries ||\n isLoadingBasicInformationForm ||\n isLoadingEmployment ||\n isLoadingContractorOnboardingDetailsForm ||\n isLoadingContractorSubscriptions ||\n isLoadingDocumentPreviewForm ||\n isLoadingIR35File ||\n isLoadingContractDocuments ||\n isLoadingEligibilityQuestionnaire;\n\n const isNavigatingToReview = useMemo(() => {\n const isCor = employment?.contractor_type === 'cor';\n const hasContractPreviewFields =\n isCor || stepFields.contract_preview.length > 0;\n\n return Boolean(\n shouldHandleReadOnlyEmployment &&\n !initialLoading &&\n Boolean(internalContractDocumentId) &&\n stepFields.basic_information.length > 0 &&\n stepFields.contract_details.length > 0 &&\n hasContractPreviewFields,\n );\n }, [\n shouldHandleReadOnlyEmployment,\n initialLoading,\n internalContractDocumentId,\n stepFields.basic_information.length,\n stepFields.contract_details.length,\n stepFields.contract_preview.length,\n employment?.contractor_type,\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 contract_preview: prettifyFormValues(\n contractPreviewInitialValues,\n stepFields.contract_preview,\n ),\n pricing_plan: prettifyFormValues(\n pricingPlanInitialValues,\n stepFields.pricing_plan,\n ),\n eligibility_questionnaire: prettifyFormValues(\n eligibilityQuestionnaireInitialValues,\n stepFields.eligibility_questionnaire,\n ),\n };\n\n setStepValues({\n select_country: selectCountryInitialValues,\n basic_information: basicInformationInitialValues,\n contract_details: contractDetailsInitialValues,\n contract_preview: contractPreviewInitialValues,\n pricing_plan: pricingPlanInitialValues,\n eligibility_questionnaire: eligibilityQuestionnaireInitialValues,\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 stepFields.contract_preview,\n contractPreviewInitialValues,\n stepFields.eligibility_questionnaire,\n eligibilityQuestionnaireInitialValues,\n ]);\n\n const goTo = (step: StepKeys) => {\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 if (\n eligibilityQuestionnaireForm &&\n stepState.currentStep.name === 'eligibility_questionnaire'\n ) {\n return await parseJSFToValidate(\n values,\n eligibilityQuestionnaireForm?.fields,\n {\n isPartialValidation: false,\n },\n );\n }\n\n return {};\n };\n\n /**\n * Extracts AI validation error from the error response\n * @param error - The error object from the API call\n * @returns The AI validation error if found, null otherwise\n */\n const extractAiValidationError = (\n error: $TSFixMe,\n ): AiValidationError | null => {\n const errorData = error?.rawError?.error?.errors?.services_and_deliverables;\n if (errorData?.source === REMOTE_AI_ERROR_SOURCE) {\n return {\n error: errorData.error,\n source: errorData.source,\n skippable: errorData.skippable,\n };\n }\n return null;\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 '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 await updateUKandSaudiFieldsMutation({\n employmentId: employmentId as string,\n });\n\n // Only update state (triggers queries with fully consistent backend state) if not caused a bug\n // if one of the updateUKandSaudiFieldsMutation fails with a 422 for example\n setInternalEmploymentId(employmentId);\n\n return response;\n } else if (internalEmploymentId) {\n const basicInformationParsedValues = omit(\n parsedValues,\n '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 console.log('parsedValues', parsedValues);\n const shouldSkipAiChecks =\n fieldValues.services_and_deliverables_error_skippable === true;\n const payload: CreateContractDocument = {\n contract_document: parsedValues,\n skip_ai_checks: shouldSkipAiChecks,\n };\n\n try {\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\n return response;\n } catch (error) {\n const aiError = extractAiValidationError(error);\n if (aiError) {\n const isContractorOfRecord =\n selectedPricingPlan === corProductIdentifier;\n setFieldValues({\n ...values,\n services_and_deliverables_ai_warning:\n transformAiErrorResponse(isContractorOfRecord),\n services_and_deliverables_error_skippable: aiError.skippable,\n });\n }\n\n throw error;\n }\n }\n\n case 'contract_preview': {\n return signContractDocumentMutationAsync({\n employmentId: internalEmploymentId as string,\n contractDocumentId: internalContractDocumentId as string,\n payload: {\n signature: parsedValues.signature,\n },\n });\n }\n case 'pricing_plan': {\n const blockedProductsEligibility = [\n corProductIdentifier,\n contractorPlusProductIdentifier,\n ];\n\n if (\n isEligibilityQuestionnaireBlocked &&\n blockedProductsEligibility.includes(values.subscription)\n ) {\n throw createStructuredError(\n `This individual is not eligible for ${\n CONTRACT_PRODUCT_TITLES[\n values.subscription as keyof typeof CONTRACT_PRODUCT_TITLES\n ]\n }.`,\n );\n }\n // Handle EOR selection (from merged options)\n if (values.subscription === eorProductIdentifier) {\n // EOR selection - no API call needed at this step\n return Promise.resolve({\n data: {\n subscription: values.subscription,\n },\n });\n }\n\n if (\n hasEligibilityQuestionnaireSubmitted &&\n values.subscription !== corProductIdentifier\n ) {\n try {\n await deleteContractorCorSubscriptionMutationAsync({\n employmentId: internalEmploymentId as string,\n });\n await refetchContractorSubscriptions();\n } catch (error) {\n if ((error as $TSFixMe)?.response?.status !== 404) {\n throw error;\n }\n // Still refetch to update the UI state\n await refetchContractorSubscriptions();\n }\n }\n\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 } else if (values.subscription == corProductIdentifier) {\n if (\n hasEligibilityQuestionnaireSubmitted &&\n employment?.contractor_type !== 'cor'\n ) {\n return manageContractorCorSubscriptionMutationAsync({\n employmentId: internalEmploymentId as string,\n });\n } else {\n return Promise.resolve({\n data: { subscription: values.subscription },\n });\n }\n }\n\n throw createStructuredError('invalid selection');\n }\n\n case 'eligibility_questionnaire': {\n try {\n const response = await createEligibilityQuestionnaireMutationAsync({\n employmentId: internalEmploymentId as string,\n payload: parsedValues,\n });\n\n const isEligibilityQuestionnaireBlocked = response?.data?.is_blocking;\n\n if (isEligibilityQuestionnaireBlocked) {\n setIncludeEligibilityQuestionnaire(false);\n setPendingNavigationStep('pricing_plan');\n throw createStructuredError(\n 'This individual is not eligible for Contractor of Record.',\n );\n }\n\n return await manageContractorCorSubscriptionMutationAsync({\n employmentId: internalEmploymentId as string,\n });\n } finally {\n // Always refetch to keep state in sync, even on error\n await refetchContractorSubscriptions();\n }\n }\n\n default: {\n throw createStructuredError('Invalid step state');\n }\n }\n }\n\n const markContractAsReviewed = () => {\n setFieldValues({\n review_completed: true,\n });\n };\n\n const handleNextStep = () => {\n if (internalEmploymentId) {\n refetchEmployment();\n }\n nextStep();\n };\n\n const isLoading = initialLoading || shouldHandleReadOnlyEmployment;\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 mark the contract as reviewed\n * @param values - New form values to check\n * @returns {boolean}\n */\n markContractAsReviewed,\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: handleNextStep,\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 * Indicates whether AI validation errors can be skipped (user can continue at their own risk).\n * True when there's a skippable AI validation error on services_and_deliverables field.\n * @returns {boolean}\n */\n canSkipAiValidation:\n fieldValues.services_and_deliverables_error_skippable === true,\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 if (\n eligibilityQuestionnaireForm &&\n stepState.currentStep.name === 'eligibility_questionnaire'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n eligibilityQuestionnaireForm?.fields,\n { isPartialValidation: false },\n );\n return eligibilityQuestionnaireForm?.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 createEligibilityQuestionnaireMutation.isPending ||\n manageContractorCorSubscriptionMutation.isPending ||\n deleteContractorCorSubscriptionMutation.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 * Default legal entity\n * @returns {CompanyLegalEntity}\n */\n defaultLegalEntity,\n /**\n * Steps array\n * @returns {Array<{name: string, index: number, label: string}>}\n */\n steps: stepsArray,\n };\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { getIndexCompanyLegalEntities } from '@/src/client';\nimport { Client } from '@/src/client/client';\nimport { useClient } from '@/src/context';\nimport { useIdentity } from '@/src/common/api/identity';\nimport { hasCompany } from '@/src/common/api/companies';\n\n/**\n * Hook to get the legal entities for a company\n * @param companyId - The company ID\n * @returns The legal entities\n */\nexport const useLegalEntities = () => {\n const { client } = useClient();\n const { data: identity } = useIdentity();\n const companyId = hasCompany(identity) ? (identity?.company?.id ?? '') : '';\n\n return useQuery({\n queryKey: ['legal-entities', companyId],\n queryFn: () =>\n getIndexCompanyLegalEntities({\n client: client as Client,\n path: {\n company_id: companyId,\n },\n query: {\n page_size: 100,\n },\n }),\n select: (data) => data.data?.data?.legal_entities,\n enabled: !!companyId,\n });\n};\n\nexport const useDefaultLegalEntity = () => {\n const { data: legalEntities } = useLegalEntities();\n return legalEntities?.find((legalEntity) => legalEntity.is_default);\n};\n"],"mappings":"qxBAAA,OAAS,aAAAA,EAAW,WAAAC,EAAS,UAAAC,GAAQ,YAAAC,MAAgB,QAErD,OAAOC,OAAU,cCFjB,OAAS,YAAAC,OAAgB,wBAYlB,IAAMC,GAAmBC,EAAA,IAAM,CACpC,GAAM,CAAE,OAAAC,CAAO,EAAIC,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Ae,MAAMP,EACzBD,EACAnD,GAAsB,OACtB,CAAE,oBAAqB,EAAM,CAC/B,EACA,OAAOA,GAAsB,iBAAiB2D,CAAY,CAC5D,CAEA,GACE5C,GACApG,EAAU,YAAY,OAAS,mBAC/B,CACA,IAAMgJ,EAAe,MAAMP,EACzBD,EACApC,GAAiC,OACjC,CAAE,oBAAqB,EAAM,CAC/B,EACA,OAAOA,GAAiC,iBAAiB4C,CAAY,CACvE,CAEA,GACEvC,GACAzG,EAAU,YAAY,OAAS,mBAC/B,CACA,IAAMgJ,EAAe,MAAMP,EACzBD,EACA/B,GAAqB,OACrB,CAAE,oBAAqB,EAAK,CAC9B,EACA,OAAOA,GAAqB,iBAAiBuC,CAAY,CAC3D,CAEA,GACEvF,GACAzD,EAAU,YAAY,OAAS,eAC/B,CACA,IAAMgJ,EAAe,MAAMP,EACzBD,EACA/E,GAAkC,OAClC,CAAE,oBAAqB,EAAM,CAC/B,EACA,OAAOA,GAAkC,iBAAiBuF,CAAY,CACxE,CAEA,GACEhD,GACAhG,EAAU,YAAY,OAAS,4BAC/B,CACA,IAAMgJ,EAAe,MAAMP,EACzBD,EACAxC,GAA8B,OAC9B,CAAE,oBAAqB,EAAM,CAC/B,EACA,OAAOA,GAA8B,iBAAiBgD,CAAY,CACpE,CAEA,OAAO,IACT,EApEkB,oBAyElB,cAAAvB,GAKA,aAAc5I,EAMd,kBAAmB6B,GAKnB,aACEU,GAAyB,WACzBE,GAAyB,WACzBE,GAAyC,WACzCY,GAA6B,WAC7BE,GAAqC,WACrCZ,GAAmB,WACnBI,GAAuC,WACvCE,GAAwC,WACxCQ,GAAwC,UAK1C,mBAAAoE,GAMA,UAAA3F,GAMA,qBAAAF,EAKA,cAAAI,GAMA,WAAAX,EAMA,mBAAAI,GAKA,MAAOhB,EACT,CACF,EA3xCuC","names":["useEffect","useMemo","useRef","useState","omit","useQuery","useLegalEntities","__name","client","useClient","identity","useIdentity","companyId","hasCompany","useQuery","getIndexCompanyLegalEntities","data","useDefaultLegalEntity","legalEntities","legalEntity","stepToFormSchemaMap","jsonSchemaToEmployment","useContractorOnboarding","__name","countryCode","externalId","employmentId","skipSteps","options","onboardingInitialValues","excludeProducts","internalCountryCode","setInternalCountryCode","useState","internalEmploymentId","setInternalEmploymentId","internalContractDocumentId","setInternalContractDocumentId","fieldsMetaRef","useRef","selectedProduct","setSelectedProduct","includeEligibilityQuestionnaire","setIncludeEligibilityQuestionnaire","includeContractPreview","setIncludeContractPreview","pendingNavigationStep","setPendingNavigationStep","steps","stepsArray","useMemo","buildSteps","fieldValues","stepState","setFieldValues","previousStep","nextStep","goToStep","setStepValues","useStepState","useEffect","employment","isLoadingEmployment","refetchEmployment","useEmploymentQuery","defaultLegalEntity","useDefaultLegalEntity","employmentStatus","isEmploymentReadOnly","reviewStepAllowedEmploymentStatus","canInvite","disabledInviteButtonEmploymentStatus","invitedStatus","createEmploymentMutation","useCreateEmployment","updateEmploymentMutation","useUpdateEmployment","createContractorContractDocumentMutation","useCreateContractorContractDocument","uploadFileMutation","useUploadFile","updateUKandSaudiFieldsMutation","useUpdateUKandSaudiFields","createEligibilityQuestionnaireMutation","usePostCreateEligibilityQuestionnaire","manageContractorCorSubscriptionMutation","usePostManageContractorCorSubscription","updateEmploymentMutationAsync","mutationToPromise","signContractDocumentMutation","useSignContractDocument","manageContractorSubscriptionMutation","usePostManageContractorSubscriptions","deleteContractorCorSubscriptionMutation","useDeleteContractorCorSubscription","createEmploymentMutationAsync","createContractorContractDocumentMutationAsync","signContractDocumentMutationAsync","manageContractorSubscriptionMutationAsync","createEligibilityQuestionnaireMutationAsync","manageContractorCorSubscriptionMutationAsync","deleteContractorCorSubscriptionMutationAsync","selectCountryForm","isLoadingCountries","countries","useCountriesSchemaField","selectedCountry","country","countryName","isPricingPlanEnabled","selectContractorSubscriptionForm","isLoadingContractorSubscriptions","contractorSubscriptions","refetchContractorSubscriptions","isEligibilityQuestionnaireBlocked","useContractorSubscriptionSchemaField","hasEligibilityQuestionnaireSubmitted","subscription","corProductIdentifier","isCor","eligibilityAnswers","formType","employmentKey","serverEmploymentData","useJSONSchema","form","jsonSchemaOptions","query","mergedFormValues","useJSONSchemaForm","isBasicInformationDetailsEnabled","isIR35FileEnabled","ir35File","isLoadingIR35File","useGetIR35File","contractDocuments","isLoadingContractDocuments","useGetContractDocuments","basicInformationForm","isLoadingBasicInformationForm","buildBasicInformationJsfModify","descriptionProvisionalStartDate","calculateProvisionalStartDateDescription","selectedPricingPlan","subscriptions","contractorStandardProductIdentifier","contractorPlusProductIdentifier","eligibilityFields","isEligibilityQuestionnaireEnabled","eligibilityQuestionnaireForm","isLoadingEligibilityQuestionnaire","useGetEligibilityQuestionnaire","isContractorOnboardingDetailsEnabled","contractorOnboardingDetailsForm","isLoadingContractorOnboardingDetailsForm","useContractorOnboardingDetailsSchemaWithCurrencies","buildContractDetailsJsfModify","isSignatureSchemaEnabled","signatureSchemaForm","useGetContractDocumentSignatureSchema","buildContractPreviewJsfModify","documentPreviewPdf","isLoadingDocumentPreviewForm","useGetShowContractDocument","stepFields","stepFieldsWithFlatFieldsets","employmentBasicInformation","employmentContractDetails","employmentCountryCode","selectCountryInitialValues","getInitialValues","convertedIr35File","dataURLtoFile","basicInformationInitialValues","initialValues","contractDetailsInitialValues","contractPreviewInitialValues","signature","signatory","pricingPlanInitialValues","eligibilityQuestionnaireInitialValues","shouldHandleReadOnlyEmployment","initialLoading","isNavigatingToReview","hasContractPreviewFields","prettifyFormValues","goTo","step","parseFormValues","values","parseJSFToValidate","extractAiValidationError","error","errorData","REMOTE_AI_ERROR_SOURCE","onSubmit","currentStepName","parsedValues","isEmploymentNotLoaded","hasChangedCountry","basicInformationPayload","omit","response","createStructuredError","basicInformationParsedValues","shouldSkipAiChecks","payload","contractDocumentId","aiError","transformAiErrorResponse","CONTRACT_PRODUCT_TITLES","eorProductIdentifier"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{l as J}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{l as J}from"./chunk-Q3VMPVT3.js";import{b as G,c as M,d as L}from"./chunk-T7O3YYOG.js";import{a as k}from"./chunk-HJ7WOTV7.js";import{c as B,l as A}from"./chunk-7EONM7HL.js";import{b as H}from"./chunk-KQPDXXG3.js";import{a as n,b as d,c as qe}from"./chunk-P37U34EQ.js";var D=d((En,U)=>{"use strict";function we(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}n(we,"isObject");U.exports=we});var X=d((In,V)=>{"use strict";var Fe=typeof global=="object"&&global&&global.Object===Object&&global;V.exports=Fe});var _=d((qn,z)=>{"use strict";var Pe=X(),ke=typeof self=="object"&&self&&self.Object===Object&&self,Me=Pe||ke||Function("return this")();z.exports=Me});var Q=d((wn,K)=>{"use strict";var Le=_(),De=n(function(){return Le.Date.now()},"now");K.exports=De});var Z=d((Pn,Y)=>{"use strict";var _e=/\s/;function $e(e){for(var t=e.length;t--&&_e.test(e.charAt(t)););return t}n($e,"trimmedEndIndex");Y.exports=$e});var ne=d((Mn,ee)=>{"use strict";var Ne=Z(),We=/^\s+/;function Be(e){return e&&e.slice(0,Ne(e)+1).replace(We,"")}n(Be,"baseTrim");ee.exports=Be});var $=d((Dn,te)=>{"use strict";var Ae=_(),He=Ae.Symbol;te.exports=He});var se=d((_n,ie)=>{"use strict";var re=$(),oe=Object.prototype,Ge=oe.hasOwnProperty,Je=oe.toString,O=re?re.toStringTag:void 0;function Ue(e){var t=Ge.call(e,O),r=e[O];try{e[O]=void 0;var i=!0}catch{}var u=Je.call(e);return i&&(t?e[O]=r:delete e[O]),u}n(Ue,"getRawTag");ie.exports=Ue});var ce=d((Nn,ae)=>{"use strict";var Ve=Object.prototype,Xe=Ve.toString;function ze(e){return Xe.call(e)}n(ze,"objectToString");ae.exports=ze});var le=d((Bn,de)=>{"use strict";var ue=$(),Ke=se(),Qe=ce(),Ye="[object Null]",Ze="[object Undefined]",fe=ue?ue.toStringTag:void 0;function en(e){return e==null?e===void 0?Ze:Ye:fe&&fe in Object(e)?Ke(e):Qe(e)}n(en,"baseGetTag");de.exports=en});var pe=d((Hn,me)=>{"use strict";function nn(e){return e!=null&&typeof e=="object"}n(nn,"isObjectLike");me.exports=nn});var be=d((Jn,ge)=>{"use strict";var tn=le(),rn=pe(),on="[object Symbol]";function sn(e){return typeof e=="symbol"||rn(e)&&tn(e)==on}n(sn,"isSymbol");ge.exports=sn});var Ce=d((Vn,xe)=>{"use strict";var an=ne(),ve=D(),cn=be(),ye=NaN,un=/^[-+]0x[0-9a-f]+$/i,fn=/^0b[01]+$/i,dn=/^0o[0-7]+$/i,ln=parseInt;function mn(e){if(typeof e=="number")return e;if(cn(e))return ye;if(ve(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ve(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=an(e);var r=fn.test(e);return r||dn.test(e)?ln(e.slice(2),r?2:8):un.test(e)?ye:+e}n(mn,"toNumber");xe.exports=mn});var Se=d((zn,Te)=>{"use strict";var pn=D(),N=Q(),he=Ce(),gn="Expected a function",bn=Math.max,vn=Math.min;function yn(e,t,r){var i,u,b,l,s,a,p=0,E=!1,f=!1,x=!0;if(typeof e!="function")throw new TypeError(gn);t=he(t)||0,pn(r)&&(E=!!r.leading,f="maxWait"in r,b=f?bn(he(r.maxWait)||0,t):b,x="trailing"in r?!!r.trailing:x);function C(o){var g=i,y=u;return i=u=void 0,p=o,l=e.apply(y,g),l}n(C,"invokeFunc");function R(o){return p=o,s=setTimeout(m,t),E?C(o):l}n(R,"leadingEdge");function q(o){var g=o-a,y=o-p,c=t-g;return f?vn(c,b-y):c}n(q,"remainingWait");function T(o){var g=o-a,y=o-p;return a===void 0||g>=t||g<0||f&&y>=b}n(T,"shouldInvoke");function m(){var o=N();if(T(o))return S(o);s=setTimeout(m,q(o))}n(m,"timerExpired");function S(o){return s=void 0,x&&i?C(o):(i=u=void 0,l)}n(S,"trailingEdge");function I(){s!==void 0&&clearTimeout(s),p=0,i=a=u=s=void 0}n(I,"cancel");function w(){return s===void 0?l:S(N())}n(w,"flush");function j(){var o=N(),g=T(o);if(i=arguments,u=this,a=o,g){if(s===void 0)return R(a);if(f)return clearTimeout(s),s=setTimeout(m,t),C(a)}return s===void 0&&(s=setTimeout(m,t)),l}return n(j,"debounced"),j.cancel=I,j.flush=w,j}n(yn,"debounce");Te.exports=yn});import{useState as hn,useCallback as Tn,useEffect as Ee,useRef as Sn}from"react";var Oe=qe(Se(),1);import{useCallback as xn,useEffect as Cn,useRef as je}from"react";function W(e,t){let r=je(e);Cn(()=>{r.current=e},[e]);let i=je((0,Oe.default)(u=>{r.current(u)},t)).current;return xn(u=>{i(u)},[i])}n(W,"useDebounce");import{Fragment as On,jsx as h,jsxs as Re}from"react/jsx-runtime";var jn=n(({description:e,showConversion:t,targetCurrency:r,className:i,onClick:u})=>{let{components:b}=H(),l=t?`Hide ${r} conversion`:`Show ${r} conversion`,s=b?.button;if(!s)throw new Error("Button component not found");return Re("span",{className:i,children:[h(A,{as:"span",children:e})," ",h(s,{className:`${i.replace("-description","-button")}`,"data-type":"inline",onClick:u,children:l})]})},"DescriptionWithConversion"),ut=n(({sourceCurrency:e,targetCurrency:t,mainFieldName:r,conversionFieldName:i,conversionProperties:u,classNamePrefix:b,description:l,conversionType:s="spread",...a})=>{let[p,E]=hn(!1),{setValue:f,watch:x}=B(),C=x(r||a.name),R=Sn(!0),q=e&&t&&e!==t,{mutateAsync:T}=J({type:s}),m=`${a.name}_converted`;Ee(()=>{f(m,r||a.name)},[f,r,a.name,m]),Ee(()=>{if(R.current){R.current=!1;return}f(i,"")},[e,i,f]);let S=Tn(async(c,v,F)=>{if(!(!c||isNaN(c)||c<=0))return T({source_currency:v,target_currency:F,amount:c})},[T]),I=W(async c=>{let v=M(c),P=1/((await S(v,t,e))?.data?.data.conversion_data?.exchange_rate??1),Ie=G(Number(v)*P);f(i,L(Ie))},500),w=W(async c=>{let v=M(c),P=(await S(v,t,e))?.data?.data.conversion_data.target_amount;f(r||a.name,L(P))},500),j=n(c=>{f(m,r||a.name),p&&I(c.target.value)},"handleMainFieldChange"),o=n(c=>{f(m,i),w(c.target.value)},"handleConversionFieldChange"),g=n(c=>{c.preventDefault(),E(v=>!v),!p&&C&&I(C)},"toggleConversion"),y=q?h(jn,{targetCurrency:t,description:l,showConversion:p,className:`${b}-description`,onClick:g}):l;return Re(On,{children:[h(k,{...a,name:r||a.name,additionalProps:{currency:e},description:y,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:j}),p&&h(k,{additionalProps:{currency:t},name:i,label:u?.label||"Conversion",description:u?.description,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$",maxLength:15,onChange:o}),h("input",{type:"hidden",name:m,value:x(m)||r||a.name})]})},"CurrencyConversionField");export{ut as a};
|
|
2
|
+
//# sourceMappingURL=chunk-XQZI2FRQ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-JEFPOHCP.js";import{b as a}from"./chunk-PGWKJ6FK.js";import{f as t}from"./chunk-T7O3YYOG.js";import{b as s}from"./chunk-X6ZAR7ZL.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function P({components:d,onSubmit:l,onError:i,onSuccess:f}){let{onboardingBag:o}=a(),p=o.fields??[],c=t(p,o.initialValues.benefits);return E(m,{defaultValues:c,components:d,onSubmit:e(async n=>{try{await l?.(n);let r=await o.onSubmit(n);if(r?.data){await f?.(r.data),o?.next();return}if(r?.error){let u=s(r?.fieldErrors||[],o.meta?.fields?.benefits);i?.({error:r.error,rawError:r.rawError,fieldErrors:u})}}catch(r){i?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit")})}e(P,"BenefitsStep");export{P as a};
|
|
2
|
+
//# sourceMappingURL=chunk-Y2LBI32D.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{k as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{k as g}from"./chunk-WQ4H5V7U.js";import{a as m,f as u}from"./chunk-VIGKOVHP.js";import{b as f,d as b}from"./chunk-KQPDXXG3.js";import{a as e}from"./chunk-P37U34EQ.js";var P={disclaimerCostCalculator:4668194326797,engagingContractors:43161434169613,employeeOnboardingTimeline:4411262104589,extraPayments:4466822781709,internationalPricing:4410698586893,pricingPlanOptions:43161720465421,ir35Status:42810224523917,remoteFxRate:33271144977421,terminationEmployeeCommunication:4411585179661,terminationNoticePeriods:5831900985613,involuntaryOffboardingServiceCharge:4406932229133,reconciliationInvoice:17604014808589},l=e(r=>`https://support.remote.com/hc/en-us/articles/${r}`,"buildZendeskURL");import{useQuery as y}from"@tanstack/react-query";var k=e((r,t)=>{let{client:i}=b();return y({queryKey:["zendesk-article",r],queryFn:e(async()=>{let n=await g({client:i,path:{id:Number(r)}});if(n.error)throw new Error(n.error.message||"Failed to fetch article");return n},"queryFn"),select:e(n=>{let o=n.data?.data.help_center_article;return o&&{...o,body:u(o.body||"")}},"select"),retry:!1,...t})},"useZendeskArticle");import{jsx as R}from"react/jsx-runtime";var C=e(({Trigger:r,zendeskId:t,open:i,onClose:n})=>{let{components:o}=f(),c=l(t),s=e(()=>{n?.()},"handleClose"),{data:a,isLoading:h,error:w}=k(t,{enabled:i}),p=o?.zendeskDrawer;if(!p)throw new Error("Zendesk drawer component not found");return R(p,{open:i,onClose:s,data:a,isLoading:h,error:w,zendeskURL:c,Trigger:r})},"ZendeskDrawer");import{useState as x}from"react";import{jsx as d}from"react/jsx-runtime";var Z="RemoteFlows__ZendeskTriggerButton text-blue-500 hover:underline inline-block text-xs bg-transparent border-none cursor-pointer p-0";function Q({zendeskId:r,className:t,onClick:i,children:n,external:o=!1}){let[c,s]=x(!1),a=e(()=>{o||s(!0),i?.(r)},"handleClick");return o?d("a",{href:l(r),target:"_blank",rel:"noopener noreferrer",onClick:a,className:m(Z,t),children:n}):d(C,{zendeskId:r,open:c,onClose:()=>s(!1),Trigger:d("button",{onClick:a,className:m(Z,t),children:n})})}e(Q,"ZendeskTriggerButton");export{P as a,Q as b};
|
|
2
|
+
//# sourceMappingURL=chunk-YHCH57B7.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as u}from"./chunk-VPSESR6G.js";import{i,j as a,k as c,l as p,m as F}from"./chunk-7EONM7HL.js";import{a as n}from"./chunk-P37U34EQ.js";import{useEffect as O,useState as g}from"react";import{jsx as o,jsxs as D}from"react/jsx-runtime";var N=n(({field:t,fieldState:d,fieldData:_})=>{let[f,r]=g([]),{name:s,label:v,description:m,options:l}=_,C=f||l?.filter(e=>t.value?.includes(e.value));return O(()=>{r(l?.filter(e=>t.value?.includes(e.value))||[])},[t.value,l]),D(i,{"data-field":s,className:`RemoteFlows__SelectField__Item__${s}`,children:[o(a,{className:"RemoteFlows__SelectField__Label",children:v}),o(c,{children:o(u,{options:l||[],selected:C,onChange:e=>{let S=e.map(({value:b})=>b);t.onChange(S),r(e)}})}),m&&o(p,{children:m}),d.error&&o(F,{})]})},"MultiSelectFieldDefault");export{N as a};
|
|
2
|
+
//# sourceMappingURL=chunk-YHQQSL4Q.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{G as m,d as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{G as m,d as r}from"./chunk-WQ4H5V7U.js";import{d as o}from"./chunk-KQPDXXG3.js";import{a as e}from"./chunk-P37U34EQ.js";import{useMutation as u,useQuery as l}from"@tanstack/react-query";var h=e(({employmentId:t,queryParams:n})=>{let{client:i}=o();return l({queryKey:["employment",t],retry:!1,queryFn:e(()=>m({client:i,headers:{Authorization:""},path:{employment_id:t},query:n}),"queryFn"),enabled:!!t,select:e(({data:s})=>s?.data?.employment,"select")})},"useEmploymentQuery"),f=e(()=>{let{client:t}=o();return u({mutationFn:e(({employmentId:n})=>r({client:t,headers:{Authorization:""},path:{employment_id:n}}),"mutationFn")})},"useDiscardEmploymentMutation");export{h as a,f as b};
|
|
2
|
+
//# sourceMappingURL=chunk-YIOLMWB5.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as y}from"./chunk-SGE4DLC3.js";import{a as g}from"./chunk-4WSJ2A6Q.js";import{b as D}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as y}from"./chunk-SGE4DLC3.js";import{a as g}from"./chunk-4WSJ2A6Q.js";import{b as D}from"./chunk-MP3VDCI7.js";import{a as w}from"./chunk-VIGKOVHP.js";import{b as N}from"./chunk-KQPDXXG3.js";import{a as d}from"./chunk-P37U34EQ.js";import{forwardRef as S}from"react";import{jsx as B}from"react/jsx-runtime";var b=S(({data:a=[],columns:s,className:o=""},n)=>{let{components:m}=N(),i=m?.table;if(!i)throw new Error("Table component not found");return B(i,{ref:n,data:a,columns:s,className:o})});b.displayName="Table";import{Fragment as c,jsx as e,jsxs as t}from"react/jsx-runtime";var _="RemoteFlows__SummaryRow flex justify-between items-center py-2 text-xs",F="RemoteFlows__SummaryRowBorder border-b border-b-1 border-b-[#E4E4E7]",l=d(({children:a,withBorder:s=!1,className:o=""})=>e("div",{className:w(_,s&&F,o),children:a}),"SummaryRow"),k=d(({usedDays:a,bookedDays:s,approvedDaysBeforeTermination:o,approvedDaysAfterTermination:n,remainingDays:m,proposedTerminationDate:i,isUnlimitedPto:f,currentEntitlementDays:p})=>{let r=new Date(i).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"});return t("div",{children:[t(l,{withBorder:!0,children:[e("label",{children:"Number of days entitled to per year"}),e("p",{"data-testid":"entitled-days",className:"font-bold",children:f?"Unlimited":p})]}),t(l,{children:[e("label",{children:"Total days booked"}),e("p",{"data-testid":"booked-days",className:"font-bold",children:s})]}),t(l,{children:[e("label",{children:"Number of days already used"}),e("p",{"data-testid":"used-days",className:"font-bold",children:a})]}),t(l,{children:[t("label",{children:["Approved for use before ",r]}),e("p",{"data-testid":"approved-days-before-termination",className:"font-bold",children:o})]}),t(l,{withBorder:!0,children:[t("label",{children:["Approved for use after ",r]}),e("p",{"data-testid":"approved-days-after-termination",className:"font-bold",children:n})]}),t(l,{children:[e("label",{children:"Total days remaining unused"}),e("p",{"data-testid":"remaining-days",className:"font-bold",children:m})]}),e(l,{className:"mb-2 py-0",children:t("p",{className:"text-xs text-[#222E39]",children:["Unused days expire on ",r]})})]})},"SummaryTimeOff"),O=[{id:"formattedDate",label:"Dates",className:"w-[250px]",cellClassName:"font-medium"},{id:"duration",label:"Duration",render:d(a=>y({number:a,singular:"day",plural:"days",followCopyGuidelines:!1,showNumber:!0}),"render")},{id:"status",label:"Status"}],C=d(({employeeName:a,timeoffQuery:s,entitledDays:o,countryName:n,currentEntitlementDays:m,formattedProposedTerminationDate:i,onOpenChange:f,open:p})=>{let{data:r,isLoading:u}=s;return e(g,{open:p,onOpenChange:f,title:`${a} paid time off breakdown`,trigger:e(D,{variant:"link",className:"text-xs text-[#3B82F6] font-bold p-0",children:"See detailed time off breakdown \u2197"}),className:"h-full w-[540px] mt-0 ml-auto px-4 RemoteFlows_DrawerTimeOff",children:!u&&e(c,{children:Array.isArray(r?.timeoffs)&&r?.timeoffs?.length>0?t(c,{children:[e("p",{className:"text-[#09090B] font-medium mb-4",children:"This list is for your information only."}),t("p",{className:"text-xs text-[#09090B] mb-1 flex items-center justify-between gap-2",children:[t("span",{children:["Annual entitlement for ",n]}),e("span",{className:"font-bold",children:o})]}),t("p",{className:"text-xs text-[#09090B] mb-6 flex items-center justify-between gap-2",children:[t("span",{children:["Entitlement up to ",i]}),e("span",{className:"font-bold",children:m})]}),e("div",{className:"mb-2",children:e(b,{data:r?.timeoffs,columns:O})}),t("p",{className:"text-xs",children:["Total of"," ",y({number:r?.bookedDays,singular:"day",plural:"days",followCopyGuidelines:!1,showNumber:!0})," ","booked"]})]}):t(c,{children:[e("p",{className:"font-medium mb-1 text-[#09090B]",children:"No recorded time off"}),t("p",{className:"text-sm text-[#09090B]",children:["According to our records, ",a," has not taken any time off this year."]})]})})})},"DrawerTimeOff"),H=d(({employeeName:a,proposedTerminationDate:s,summaryData:o,formattedProposedTerminationDate:n,timeoffQuery:m,employment:i,onOpenChange:f,open:p})=>{let{entitledDays:r,bookedDays:u,usedDays:x,approvedDaysBeforeTermination:R,approvedDaysAfterTermination:P,remainingDays:v,currentEntitlementDays:T,isUnlimitedPto:h}=o.data;return t("div",{className:"RemoteFlows__PaidTimeOff__Container py-3",children:[e("h3",{className:"RemoteFlows__PaidTimeOff__Title mb-2",children:"Paid time off"}),t("p",{className:"RemoteFlows__PaidTimeOff__Description text-sm mb-2",children:["The proposed termination date for ",a," is"," ",n,". You will need to pay them for any unused accrued days. Below is a breakdown of their time off entitlement and usage for the current annual leave period:"]}),t("div",{className:"mb-2",children:[!o?.isLoading&&!o?.isError&&o?.data&&e(k,{usedDays:x,bookedDays:u,currentEntitlementDays:T,approvedDaysBeforeTermination:R,approvedDaysAfterTermination:P,remainingDays:v,proposedTerminationDate:s,isUnlimitedPto:h}),e(C,{employeeName:a,timeoffQuery:m,entitledDays:r,currentEntitlementDays:T,countryName:i?.country?.name??"Unknown",onOpenChange:f,formattedProposedTerminationDate:n,open:p})]})]})},"PaidTimeOff");export{H as a};
|
|
2
|
+
//# sourceMappingURL=chunk-YWOJ4NKF.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as f}from"./chunk-MRYRNB7Y.js";import{b as l}from"./chunk-LNV36S6D.js";import{a as F}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as f}from"./chunk-MRYRNB7Y.js";import{b as l}from"./chunk-LNV36S6D.js";import{a as F}from"./chunk-BUOCIXUH.js";import{f as s,g as a}from"./chunk-7EONM7HL.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as y}from"react";import{jsx as r}from"react/jsx-runtime";function A({defaultValues:u,fields:m,onSubmit:d}){let{formId:c,terminationBag:o}=f(),p=l(o.handleValidation),e=s({resolver:p,defaultValues:u,shouldUnregister:!1,mode:"onBlur"});y(()=>{let V=e?.watch(i=>{Object.keys(i).some(n=>i[n]!==o?.initialValues?.[n])&&o?.checkFieldUpdates(i)});return()=>V?.unsubscribe()},[]);let T=m||(o?.fields??[]);return r(a,{...e,children:r("form",{id:c,onSubmit:e.handleSubmit(d),className:"space-y-4 RemoteFlows__TerminationForm",children:r(F,{fields:T})})})}t(A,"TerminationForm");export{A as a};
|
|
2
|
+
//# sourceMappingURL=chunk-Z6B3PA4M.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as w}from"./chunk-PGWKJ6FK.js";import{d as v,e as y}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as w}from"./chunk-PGWKJ6FK.js";import{d as v,e as y}from"./chunk-Q3VMPVT3.js";import{a as i}from"./chunk-X6ZAR7ZL.js";import{b as l}from"./chunk-KQPDXXG3.js";import{a as s}from"./chunk-P37U34EQ.js";import{jsx as _}from"react/jsx-runtime";function P({onSubmit:f,onSuccess:a,onError:t,render:E,...o}){let{components:R}=l(),{onboardingBag:r,setCreditScore:m}=w(),d=v(),u=y(),{mutateAsync:g}=i(d),{mutateAsync:S}=i(u),c=r.creditRiskStatus==="deposit_required"||r.onboardingReservesStatus==="deposit_required",I=s(async()=>{try{if(await f?.(),c&&r.employmentId&&r.employment?.status&&!r.isEmploymentReadOnly){let e=await S({employment_slug:r.employmentId});if(e.data){await a?.({data:e.data,employmentStatus:"created_awaiting_reserve"}),m?.(n=>({...n,showReserveInvoice:!0})),r.refetchEmployment();return}e.error&&t?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}else if(r.employmentId){let e=await g({employment_id:r.employmentId});if(e.data){await a?.({data:e.data,employmentStatus:"invited"}),m?.(n=>({...n,showInviteSuccessful:!0})),r.refetchEmployment();return}e.error&&t?.({error:e.error,rawError:e.rawError,fieldErrors:[]})}}catch(e){t?.({error:e,rawError:e,fieldErrors:[]})}},"handleSubmit"),b=c&&r.employment?.status&&!r.isEmploymentReadOnly,p=R?.button;if(!p)throw new Error("Button component not found");return _(p,{...o,disabled:d.isPending||u.isPending||o.disabled,onClick:e=>{I(),o.onClick?.(e)},children:E({employmentStatus:b?"created_awaiting_reserve":"invited"})})}s(P,"OnboardingInvite");export{P as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ZOTT6IZN.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as Components } from './remoteFlows-
|
|
1
|
+
import { C as Components } from './remoteFlows-BVt9wH8Z.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'yup';
|
|
4
|
-
import './types.gen-
|
|
4
|
+
import './types.gen-Oz2Tvvr6.js';
|
|
5
5
|
import './types-ZWIpiFgj.js';
|
|
6
6
|
import 'react-hook-form';
|
|
7
7
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-
|
|
1
|
+
import{a as c}from"./chunk-MGY23P25.js";import{a as b}from"./chunk-NAMR4DA5.js";import{a as k}from"./chunk-IHGCXP2X.js";import{a}from"./chunk-PVZTOW7Z.js";import{a as u}from"./chunk-YHQQSL4Q.js";import{a as p}from"./chunk-OIBZ7VUR.js";import{a as D}from"./chunk-EIVCBH53.js";import{a as n}from"./chunk-BAMGHBLT.js";import{a as F}from"./chunk-TQXCLXWH.js";import{a as s}from"./chunk-VKQQKGGY.js";import{a as e}from"./chunk-VXMLYWZ2.js";import{a as t}from"./chunk-HFQAVCD2.js";import{a as o}from"./chunk-6PYJAPM2.js";import{a as r}from"./chunk-M7KQPXCS.js";import"./chunk-VPSESR6G.js";import{a as l}from"./chunk-L3LOATSG.js";import{a as m}from"./chunk-DPRCPBRB.js";import"./chunk-RGLQY27T.js";import"./chunk-MSBCYMSH.js";import{a as i}from"./chunk-TV2NNJVO.js";import{a as f}from"./chunk-4J36XOH2.js";import"./chunk-AOSXULKY.js";import{a as d}from"./chunk-BYDQHL6O.js";import"./chunk-HJ7WOTV7.js";import"./chunk-YHCH57B7.js";import"./chunk-7EONM7HL.js";import"./chunk-WQ4H5V7U.js";import"./chunk-SNBAM7SA.js";import"./chunk-7G5JSUZU.js";import"./chunk-56UXOD27.js";import"./chunk-R4X2WQXX.js";import"./chunk-3NESYBEJ.js";import"./chunk-DXIJUMLU.js";import"./chunk-6JTHV4QS.js";import"./chunk-547UHEDI.js";import"./chunk-TNN3W5TU.js";import"./chunk-MP3VDCI7.js";import"./chunk-EOMVTXER.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";var V={button:b,checkbox:s,countries:r,date:m,drawer:D,email:f,fieldsetToggle:d,file:e,"multi-select":u,number:i,radio:a,select:o,statement:l,textarea:t,text:p,zendeskDrawer:n,table:F,"work-schedule":c,pdfViewer:k};export{V as defaultComponents};
|
|
2
2
|
//# sourceMappingURL=default-components.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { P as PostCreateContractAmendmentError, b as ContractAmendmentResponse } from '../../types.gen-
|
|
2
|
+
import { P as PostCreateContractAmendmentError, b as ContractAmendmentResponse } from '../../types.gen-Oz2Tvvr6.js';
|
|
3
3
|
import { FieldValues } from 'react-hook-form';
|
|
4
4
|
|
|
5
5
|
type ContractAmendmentConfirmationFormProps = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-QJ2XK63I.js";import"../../chunk-T7O3YYOG.js";import"../../chunk-7EONM7HL.js";import"../../chunk-EOMVTXER.js";import"../../chunk-VIGKOVHP.js";import"../../chunk-X6ZAR7ZL.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentConfirmationForm};
|
|
2
2
|
//# sourceMappingURL=ContractAmendmentConfirmationForm.js.map
|
|
@@ -5,11 +5,11 @@ import { ContractAmendmentForm } from './ContractAmendmentForm.js';
|
|
|
5
5
|
import { ContractAmendmentSubmit } from './ContractAmendmentSubmit.js';
|
|
6
6
|
import { useContractAmendment } from './hooks.js';
|
|
7
7
|
import { ContractAmendmentParams } from './types.js';
|
|
8
|
-
import '../../types.gen-
|
|
8
|
+
import '../../types.gen-Oz2Tvvr6.js';
|
|
9
9
|
import 'react-hook-form';
|
|
10
10
|
import 'react';
|
|
11
|
-
import '../../mutations-
|
|
12
|
-
import '../../remoteFlows-
|
|
11
|
+
import '../../mutations-BsydWn3-.js';
|
|
12
|
+
import '../../remoteFlows-BVt9wH8Z.js';
|
|
13
13
|
import 'yup';
|
|
14
14
|
import '../../types-ZWIpiFgj.js';
|
|
15
15
|
import '@remoteoss/json-schema-form';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-BLGKOMH3.js";import"../../chunk-QJ2XK63I.js";import"../../chunk-LSW66EIR.js";import"../../chunk-LNV36S6D.js";import"../../chunk-BUOCIXUH.js";import"../../chunk-JTPKAIYL.js";import"../../chunk-SNECOPBD.js";import"../../chunk-U6LRMWRI.js";import"../../chunk-POKLRB3M.js";import"../../chunk-EAF6XPH6.js";import"../../chunk-YIOLMWB5.js";import"../../chunk-EUSCQL4H.js";import"../../chunk-T7O3YYOG.js";import"../../chunk-AOSXULKY.js";import"../../chunk-BYDQHL6O.js";import"../../chunk-HJ7WOTV7.js";import"../../chunk-YHCH57B7.js";import"../../chunk-7EONM7HL.js";import"../../chunk-WQ4H5V7U.js";import"../../chunk-MP3VDCI7.js";import"../../chunk-EOMVTXER.js";import"../../chunk-VIGKOVHP.js";import"../../chunk-X6ZAR7ZL.js";import"../../chunk-TSPDJUGG.js";import"../../chunk-Z5WMKCRJ.js";import"../../chunk-D5AR26AI.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-KQPDXXG3.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentFlow};
|
|
2
2
|
//# sourceMappingURL=ContractAmendmentFlow.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { c as PostAutomatableContractAmendmentError, C as ContractAmendmentAutomatableResponse } from '../../types.gen-
|
|
2
|
+
import { c as PostAutomatableContractAmendmentError, C as ContractAmendmentAutomatableResponse } from '../../types.gen-Oz2Tvvr6.js';
|
|
3
3
|
import { FieldValues } from 'react-hook-form';
|
|
4
4
|
|
|
5
5
|
type ContractAmendmentFormProps = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-LSW66EIR.js";import"../../chunk-LNV36S6D.js";import"../../chunk-BUOCIXUH.js";import"../../chunk-JTPKAIYL.js";import"../../chunk-SNECOPBD.js";import"../../chunk-T7O3YYOG.js";import"../../chunk-AOSXULKY.js";import"../../chunk-BYDQHL6O.js";import"../../chunk-HJ7WOTV7.js";import"../../chunk-YHCH57B7.js";import"../../chunk-7EONM7HL.js";import"../../chunk-WQ4H5V7U.js";import"../../chunk-MP3VDCI7.js";import"../../chunk-EOMVTXER.js";import"../../chunk-VIGKOVHP.js";import"../../chunk-X6ZAR7ZL.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-KQPDXXG3.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentForm};
|
|
2
2
|
//# sourceMappingURL=ContractAmendmentForm.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as ContractAmendmentAutomatableResponse, N as NotFoundResponse, U as UnprocessableEntityResponse, a as UnauthorizedResponse, b as ContractAmendmentResponse } from '../../types.gen-
|
|
1
|
+
import { C as ContractAmendmentAutomatableResponse, N as NotFoundResponse, U as UnprocessableEntityResponse, a as UnauthorizedResponse, b as ContractAmendmentResponse } from '../../types.gen-Oz2Tvvr6.js';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { E as ErrorResponse, S as SuccessResponse } from '../../mutations-
|
|
4
|
-
import '../../remoteFlows-
|
|
3
|
+
import { E as ErrorResponse, S as SuccessResponse } from '../../mutations-BsydWn3-.js';
|
|
4
|
+
import '../../remoteFlows-BVt9wH8Z.js';
|
|
5
5
|
import * as react_hook_form from 'react-hook-form';
|
|
6
6
|
import { useContractAmendment } from './hooks.js';
|
|
7
7
|
import * as _remoteoss_json_schema_form from '@remoteoss/json-schema-form';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { C as ContractAmendmentAutomatableResponse, N as NotFoundResponse, U as UnprocessableEntityResponse, a as UnauthorizedResponse, b as ContractAmendmentResponse } from '../../types.gen-
|
|
2
|
-
import { E as ErrorResponse, S as SuccessResponse } from '../../mutations-
|
|
1
|
+
import { C as ContractAmendmentAutomatableResponse, N as NotFoundResponse, U as UnprocessableEntityResponse, a as UnauthorizedResponse, b as ContractAmendmentResponse } from '../../types.gen-Oz2Tvvr6.js';
|
|
2
|
+
import { E as ErrorResponse, S as SuccessResponse } from '../../mutations-BsydWn3-.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as _remoteoss_json_schema_form from '@remoteoss/json-schema-form';
|
|
5
5
|
import * as _remoteoss_json_schema_form_v0_deprecated from '@remoteoss/json-schema-form-v0-deprecated';
|
|
6
6
|
import { Step } from '../useStepState.js';
|
|
7
7
|
import { FieldValues } from 'react-hook-form';
|
|
8
8
|
import { ContractAmendmentParams } from './types.js';
|
|
9
|
-
import '../../remoteFlows-
|
|
9
|
+
import '../../remoteFlows-BVt9wH8Z.js';
|
|
10
10
|
import 'yup';
|
|
11
11
|
import '../../types-ZWIpiFgj.js';
|
|
12
12
|
import '../types.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-POKLRB3M.js";import"../../chunk-EAF6XPH6.js";import"../../chunk-YIOLMWB5.js";import"../../chunk-EUSCQL4H.js";import"../../chunk-T7O3YYOG.js";import"../../chunk-WQ4H5V7U.js";import"../../chunk-X6ZAR7ZL.js";import"../../chunk-TSPDJUGG.js";import"../../chunk-Z5WMKCRJ.js";import"../../chunk-KQPDXXG3.js";import"../../chunk-P37U34EQ.js";export{a as useContractAmendment};
|
|
2
2
|
//# sourceMappingURL=hooks.js.map
|
|
@@ -4,17 +4,17 @@ export { ContractAmendmentForm } from './ContractAmendmentForm.js';
|
|
|
4
4
|
export { ContractAmendmentSubmit } from './ContractAmendmentSubmit.js';
|
|
5
5
|
export { useContractAmendment } from './hooks.js';
|
|
6
6
|
import 'react/jsx-runtime';
|
|
7
|
-
import '../../types.gen-
|
|
7
|
+
import '../../types.gen-Oz2Tvvr6.js';
|
|
8
8
|
import 'react-hook-form';
|
|
9
9
|
import './ContractAmendmentBack.js';
|
|
10
10
|
import 'react';
|
|
11
11
|
import './types.js';
|
|
12
12
|
import '../types.js';
|
|
13
|
-
import '../../remoteFlows-
|
|
13
|
+
import '../../remoteFlows-BVt9wH8Z.js';
|
|
14
14
|
import 'yup';
|
|
15
15
|
import '../../types-ZWIpiFgj.js';
|
|
16
16
|
import '@remoteoss/remote-json-schema-form-kit';
|
|
17
|
-
import '../../mutations-
|
|
17
|
+
import '../../mutations-BsydWn3-.js';
|
|
18
18
|
import '@remoteoss/json-schema-form';
|
|
19
19
|
import '@remoteoss/json-schema-form-v0-deprecated';
|
|
20
20
|
import '../useStepState.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../chunk-A7ZJQCNU.js";import{a as e}from"../../chunk-
|
|
1
|
+
import"../../chunk-A7ZJQCNU.js";import{a as e}from"../../chunk-BLGKOMH3.js";import{a}from"../../chunk-QJ2XK63I.js";import{a as b}from"../../chunk-LSW66EIR.js";import"../../chunk-LNV36S6D.js";import"../../chunk-BUOCIXUH.js";import"../../chunk-JTPKAIYL.js";import"../../chunk-SNECOPBD.js";import{a as c}from"../../chunk-U6LRMWRI.js";import{a as d}from"../../chunk-POKLRB3M.js";import"../../chunk-EAF6XPH6.js";import"../../chunk-YIOLMWB5.js";import"../../chunk-EUSCQL4H.js";import"../../chunk-T7O3YYOG.js";import"../../chunk-AOSXULKY.js";import"../../chunk-BYDQHL6O.js";import"../../chunk-HJ7WOTV7.js";import"../../chunk-YHCH57B7.js";import"../../chunk-7EONM7HL.js";import"../../chunk-WQ4H5V7U.js";import"../../chunk-MP3VDCI7.js";import"../../chunk-EOMVTXER.js";import"../../chunk-VIGKOVHP.js";import"../../chunk-X6ZAR7ZL.js";import"../../chunk-TSPDJUGG.js";import"../../chunk-Z5WMKCRJ.js";import"../../chunk-D5AR26AI.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-KQPDXXG3.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentConfirmationForm,e as ContractAmendmentFlow,b as ContractAmendmentForm,c as ContractAmendmentSubmit,d as useContractAmendment};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FlowOptions } from '../types.js';
|
|
2
|
-
import '../../remoteFlows-
|
|
2
|
+
import '../../remoteFlows-BVt9wH8Z.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'yup';
|
|
5
|
-
import '../../types.gen-
|
|
5
|
+
import '../../types.gen-Oz2Tvvr6.js';
|
|
6
6
|
import '../../types-ZWIpiFgj.js';
|
|
7
7
|
import 'react-hook-form';
|
|
8
8
|
import '@remoteoss/remote-json-schema-form-kit';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as Employment } from '../../types.gen-
|
|
2
|
-
import { J as JSFFields } from '../../remoteFlows-
|
|
1
|
+
import { E as Employment } from '../../types.gen-Oz2Tvvr6.js';
|
|
2
|
+
import { J as JSFFields } from '../../remoteFlows-BVt9wH8Z.js';
|
|
3
3
|
import { Step } from '../useStepState.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'yup';
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as ContractorOnboardingFlowProps } from '../../types-
|
|
2
|
+
import { C as ContractorOnboardingFlowProps } from '../../types-D_exxPuY.js';
|
|
3
3
|
import './constants.js';
|
|
4
|
-
import '../../types.gen-
|
|
4
|
+
import '../../types.gen-Oz2Tvvr6.js';
|
|
5
5
|
import './components/OnboardingBack.js';
|
|
6
6
|
import 'react';
|
|
7
7
|
import './components/OnboardingSubmit.js';
|
|
8
|
-
import '../../remoteFlows-
|
|
8
|
+
import '../../remoteFlows-BVt9wH8Z.js';
|
|
9
9
|
import 'yup';
|
|
10
10
|
import '../../types-ZWIpiFgj.js';
|
|
11
11
|
import 'react-hook-form';
|
|
12
|
-
import '../../mutations-
|
|
12
|
+
import '../../mutations-BsydWn3-.js';
|
|
13
13
|
import '@tanstack/query-core';
|
|
14
14
|
import '../useStepState.js';
|
|
15
15
|
import '@remoteoss/remote-json-schema-form-kit';
|
|
16
16
|
import './utils.js';
|
|
17
|
-
import '../../types-
|
|
17
|
+
import '../../types-DqoTDHM1.js';
|
|
18
18
|
import '../Onboarding/components/OnboardingBack.js';
|
|
19
19
|
import '../Onboarding/components/OnboardingInvite.js';
|
|
20
20
|
import '../Onboarding/components/OnboardingSubmit.js';
|