@remoteoss/remote-flows 1.54.0 → 1.55.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/CheckboxFieldDefault-X5SIWA6P.js +2 -0
- package/dist/CountryFieldDefault-AZOQXIVV.js +2 -0
- package/dist/DatePickerFieldDefault-NZL3TD4C.js +2 -0
- package/dist/FileUploadFieldDefault-A74OEKR7.js +2 -0
- package/dist/ForcedValueFieldDefault-WD6FPQPF.js +2 -0
- package/dist/MultiSelectFieldDefault-4RDSLVXE.js +2 -0
- package/dist/RadioGroupFieldDefault-RMLMHLRP.js +2 -0
- package/dist/SelectFieldDefault-LMCEGGY5.js +2 -0
- package/dist/TelFieldDefault-6327HAAP.js +2 -0
- package/dist/TextAreaFieldDefault-ULWPOPSP.js +2 -0
- package/dist/TextFieldDefault-LEKXVZP4.js +2 -0
- package/dist/TimeFieldDefault-EDFT5XUB.js +2 -0
- package/dist/{chunk-NGBNHXAA.js → chunk-2HLKH3BT.js} +2 -2
- package/dist/chunk-2I3BUFQJ.js +2 -0
- package/dist/{chunk-XCVZRNIN.js.map → chunk-2I3BUFQJ.js.map} +1 -1
- package/dist/{chunk-SSPK7NGT.js → chunk-2QSJKNZO.js} +2 -2
- package/dist/{chunk-RWPZYB5B.js → chunk-2UD2ZFSN.js} +2 -2
- package/dist/{chunk-QIAMSVGB.js → chunk-2UEZACSE.js} +2 -2
- package/dist/{chunk-IRQJR7KU.js → chunk-4LQUD36G.js} +2 -2
- package/dist/{chunk-NWY6UVCV.js → chunk-4QEPM5MQ.js} +2 -2
- package/dist/{chunk-W5S3F2WP.js → chunk-54EKTCFE.js} +2 -2
- package/dist/{chunk-625V5NV7.js → chunk-55CB7X5W.js} +2 -2
- package/dist/{chunk-NHWKX4ED.js → chunk-5DCPSSPR.js} +2 -2
- package/dist/{chunk-A4WXUJPL.js → chunk-5HFK7EMV.js} +2 -2
- package/dist/{chunk-PDOPI7HR.js → chunk-5HXGF3IA.js} +2 -2
- package/dist/{chunk-R5THYINT.js → chunk-5JKUOW3P.js} +2 -2
- package/dist/{chunk-E7Y3YBZH.js → chunk-62EFEBHN.js} +2 -2
- package/dist/{chunk-UGQJQM72.js → chunk-64PDV5NF.js} +2 -2
- package/dist/{chunk-AVFWX6M6.js → chunk-6AMPXS3F.js} +2 -2
- package/dist/{chunk-4X5DGXVM.js → chunk-6HBIQAF2.js} +2 -2
- package/dist/{chunk-FZMUZRZN.js → chunk-744REBZC.js} +2 -2
- package/dist/{chunk-WNGIJIV2.js → chunk-7BB24CX5.js} +2 -2
- package/dist/{chunk-YWLAZIIO.js → chunk-7LQEU3B4.js} +2 -2
- package/dist/{chunk-QFBZ7JTG.js → chunk-7TCY4ON2.js} +2 -2
- package/dist/{chunk-BQKSMAW3.js → chunk-7TRSA2OH.js} +2 -2
- package/dist/chunk-AC5CQ6HL.js +2 -0
- package/dist/chunk-AC5CQ6HL.js.map +1 -0
- package/dist/{chunk-LOFKF243.js → chunk-ADXTCKMJ.js} +2 -2
- package/dist/{chunk-PSK3Z52M.js → chunk-AJ5AKHYP.js} +2 -2
- package/dist/{chunk-KXTESNWQ.js → chunk-AP6FKWKX.js} +2 -2
- package/dist/{chunk-GRLZH65T.js → chunk-AVBV7L5E.js} +2 -2
- package/dist/{chunk-GFGO7E5V.js → chunk-BOVUSO4A.js} +2 -2
- package/dist/{chunk-IYH7D5ET.js → chunk-BTAKGADS.js} +2 -2
- package/dist/{chunk-THUEI7J4.js → chunk-CEFPQAKH.js} +2 -2
- package/dist/{chunk-QRSMCORC.js → chunk-CGILHL4U.js} +2 -2
- package/dist/{chunk-G4TPPC5G.js → chunk-CX57A6WK.js} +2 -2
- package/dist/{chunk-R6U3F3O3.js → chunk-DFTTDXJ5.js} +2 -2
- package/dist/{chunk-F3YBR2IP.js → chunk-ECD2RHON.js} +2 -2
- package/dist/{chunk-U7X7AHH4.js → chunk-EW6UABH3.js} +2 -2
- package/dist/{chunk-UTWBY65S.js → chunk-F62JZXCH.js} +2 -2
- package/dist/{chunk-7DQOA753.js → chunk-FIOX5JX5.js} +2 -2
- package/dist/chunk-FPCF4TH2.js +8 -0
- package/dist/chunk-FPCF4TH2.js.map +1 -0
- package/dist/{chunk-4FKQXGBR.js → chunk-FPP5ZANJ.js} +2 -2
- package/dist/{chunk-B6WW4RCM.js → chunk-GIQIO4GI.js} +2 -2
- package/dist/{chunk-GZGBZT7Y.js → chunk-GMXL2Z5N.js} +2 -2
- package/dist/{chunk-FB23WOLZ.js → chunk-GNW6DGUS.js} +2 -2
- package/dist/{chunk-YCJGDPBN.js → chunk-H3GKCPVS.js} +2 -2
- package/dist/{chunk-CKDQYT7E.js → chunk-H3Y7IISD.js} +2 -2
- package/dist/{chunk-GL6CJ56P.js → chunk-H5M3D6CI.js} +2 -2
- package/dist/{chunk-WLJX4B55.js → chunk-I757RN7F.js} +2 -2
- package/dist/chunk-IBOSDGWK.js +2 -0
- package/dist/chunk-IBOSDGWK.js.map +1 -0
- package/dist/{chunk-QOGWAKHP.js → chunk-IFDFCKT4.js} +2 -2
- package/dist/{chunk-ISPN7HQ5.js → chunk-IJAV22PE.js} +2 -2
- package/dist/{chunk-4ULD4YI7.js → chunk-IROMMYZS.js} +2 -2
- package/dist/{chunk-5POY6QBR.js → chunk-IZRM26GZ.js} +2 -2
- package/dist/chunk-J23IEAZ2.js +2 -0
- package/dist/chunk-J23IEAZ2.js.map +1 -0
- package/dist/{chunk-LRXKF2LC.js → chunk-JCES7EE2.js} +2 -2
- package/dist/{chunk-QB6GQW3J.js → chunk-JCKH3UYE.js} +2 -2
- package/dist/{chunk-DAZQJZOF.js → chunk-JMBQAG6H.js} +2 -2
- package/dist/{chunk-IPQZBMOO.js → chunk-JNPESWI7.js} +2 -2
- package/dist/{chunk-KSCJNGWW.js → chunk-JRMI5S74.js} +2 -2
- package/dist/{chunk-UA22Q6DY.js → chunk-K3QDNFF5.js} +2 -2
- package/dist/chunk-KQ2ZXMJF.js +2 -0
- package/dist/chunk-KQ2ZXMJF.js.map +1 -0
- package/dist/{chunk-IYWSUSS2.js → chunk-LVYZIOOZ.js} +2 -2
- package/dist/{chunk-ZLTZKUXL.js → chunk-MBGHSHR6.js} +2 -2
- package/dist/{chunk-N2WIEKM6.js → chunk-MWBEA2NI.js} +2 -2
- package/dist/{chunk-URNFXEOZ.js → chunk-MZM26I3S.js} +2 -2
- package/dist/{chunk-QFLUUNBA.js → chunk-NILEOD3X.js} +2 -2
- package/dist/{chunk-3HMBTPH7.js → chunk-NP3RMRKZ.js} +2 -2
- package/dist/{chunk-YUS4SJPV.js → chunk-OCZ5EG5J.js} +2 -2
- package/dist/{chunk-YJTKDCA6.js → chunk-ODRR3US4.js} +2 -2
- package/dist/chunk-OGDYY2TK.js +2 -0
- package/dist/chunk-OGDYY2TK.js.map +1 -0
- package/dist/{chunk-3DPDFOYO.js → chunk-ONELHWYF.js} +2 -2
- package/dist/{chunk-2IUT7KWS.js → chunk-OUVSBTOE.js} +2 -2
- package/dist/{chunk-DTNFGOBK.js → chunk-P4LSZLTJ.js} +2 -2
- package/dist/{chunk-YVQ4Q626.js → chunk-PE2UM2SW.js} +2 -2
- package/dist/{chunk-CR5J5KK6.js → chunk-PGS35CGC.js} +2 -2
- package/dist/{chunk-IK2LTVOV.js → chunk-POA6NSFQ.js} +2 -2
- package/dist/{chunk-QNEGC7RZ.js → chunk-PUX6FYHV.js} +2 -2
- package/dist/{chunk-46IKKWMK.js → chunk-QETOBZUA.js} +2 -2
- package/dist/{chunk-ZQGG2KNM.js → chunk-QTEQCA5N.js} +2 -2
- package/dist/{chunk-VJTAVPZX.js → chunk-QYA7D7ZQ.js} +2 -2
- package/dist/{chunk-QUJBIRNY.js → chunk-R5Y7AZWB.js} +2 -2
- package/dist/{chunk-UX5LWYEO.js → chunk-RADQBXMO.js} +2 -2
- package/dist/{chunk-3BB4KEIH.js → chunk-RQZ5QNCM.js} +2 -2
- package/dist/{chunk-R23HFBV4.js → chunk-SDF4QRJ2.js} +2 -2
- package/dist/{chunk-H4ZSTP7B.js → chunk-SIVFXETC.js} +2 -2
- package/dist/{chunk-3OHORFIX.js → chunk-SSUL5J5I.js} +2 -2
- package/dist/{chunk-UETBVQT5.js → chunk-TDUPMUA2.js} +2 -2
- package/dist/{chunk-VCJHB56K.js → chunk-TKJQB2O2.js} +2 -2
- package/dist/{chunk-FF5OB2GF.js → chunk-UDF7IJTE.js} +2 -2
- package/dist/{chunk-3CZLKNIW.js → chunk-UGU2ENUA.js} +2 -2
- package/dist/{chunk-SQ5OMBOV.js → chunk-UKEIM24T.js} +2 -2
- package/dist/{chunk-YFQNP2SL.js → chunk-VPFTBK24.js} +2 -2
- package/dist/{chunk-2BH4CIY3.js → chunk-VVMBSA4F.js} +2 -2
- package/dist/{chunk-7JZWL4DI.js → chunk-WMKJCDHA.js} +2 -2
- package/dist/chunk-WQFBJPV2.js +2 -0
- package/dist/chunk-WQFBJPV2.js.map +1 -0
- package/dist/{chunk-TSX5CPGE.js → chunk-X4IBNXCR.js} +2 -2
- package/dist/{chunk-R2NQ3F6J.js → chunk-XLAXG4H6.js} +2 -2
- package/dist/chunk-XLBZIIHS.js +2 -0
- package/dist/chunk-XLBZIIHS.js.map +1 -0
- package/dist/{chunk-3JH25AAF.js → chunk-XPCQ5QJV.js} +2 -2
- package/dist/{chunk-C3LOTWEB.js → chunk-Y25ROTI4.js} +2 -2
- package/dist/{chunk-CKOXMDGX.js → chunk-YBHHWAOI.js} +2 -2
- package/dist/{chunk-M2UGSIVQ.js → chunk-YP6UTKJJ.js} +2 -2
- package/dist/{chunk-YUR2E2H3.js → chunk-YTK3CQEH.js} +2 -2
- package/dist/{chunk-SQKFUT6T.js → chunk-ZDHGJ3FH.js} +2 -2
- package/dist/{chunk-4VEKBKZP.js → chunk-ZZXFTUY7.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/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 +3 -3
- package/dist/flows/ContractAmendment/utils.d.ts +2 -2
- package/dist/flows/ContractDocument/ContractDocumentFlow.d.ts +3 -2
- package/dist/flows/ContractDocument/ContractDocumentFlow.js +1 -1
- package/dist/flows/ContractDocument/context.d.ts +8 -1
- package/dist/flows/ContractDocument/hooks.d.ts +2 -1
- package/dist/flows/ContractDocument/hooks.js +1 -1
- package/dist/flows/ContractDocument/index.d.ts +2 -1
- package/dist/flows/ContractDocument/index.js +1 -1
- package/dist/flows/ContractDocument/types.d.ts +2 -1
- package/dist/flows/ContractDocument/utils.d.ts +2 -1
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
- package/dist/flows/ContractorOnboarding/api.d.ts +4 -13
- package/dist/flows/ContractorOnboarding/api.js +1 -1
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +5 -5
- 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/ContractOriginStep.d.ts +3 -3
- package/dist/flows/ContractorOnboarding/components/ContractOriginStep.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/CreateInvoiceScheduleStep.d.ts +3 -3
- package/dist/flows/ContractorOnboarding/components/CreateInvoiceScheduleStep.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/InvoiceScheduleStep.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/InvoiceScheduleStep.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/PreviewInvoiceButton.d.ts +3 -3
- package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
- package/dist/flows/ContractorOnboarding/components/SaveDraftButton.d.ts +3 -3
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/SkipInvoiceScheduleButton.d.ts +3 -3
- package/dist/flows/ContractorOnboarding/context.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/hooks.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/hooks.js +1 -1
- package/dist/flows/ContractorOnboarding/index.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/index.js +1 -1
- package/dist/flows/ContractorOnboarding/jsfModify.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
- package/dist/flows/ContractorOnboarding/types.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/utils.d.ts +4 -4
- 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 +3 -3
- package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
- package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +3 -3
- package/dist/flows/CostCalculator/api.d.ts +3 -3
- 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 +3 -3
- 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 +3 -3
- 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/InvoiceSchedule/InvoiceScheduleFlow.d.ts +3 -3
- package/dist/flows/InvoiceSchedule/InvoiceScheduleFlow.js +1 -1
- package/dist/flows/InvoiceSchedule/InvoiceScheduleForm.d.ts +3 -3
- package/dist/flows/InvoiceSchedule/InvoiceScheduleForm.js +1 -1
- package/dist/flows/InvoiceSchedule/InvoiceSchedulePreviewButton.d.ts +3 -3
- package/dist/flows/InvoiceSchedule/context.d.ts +3 -3
- package/dist/flows/InvoiceSchedule/hooks.d.ts +3 -3
- package/dist/flows/InvoiceSchedule/hooks.js +1 -1
- package/dist/flows/InvoiceSchedule/index.d.ts +3 -3
- package/dist/flows/InvoiceSchedule/index.js +1 -1
- package/dist/flows/InvoiceSchedule/types.d.ts +3 -3
- package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundFlow.d.ts +3 -3
- package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundFlow.js +1 -1
- package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundForm.d.ts +2 -2
- package/dist/flows/JsonSchemaPlayground/JsonSchemaPlaygroundForm.js +1 -1
- package/dist/flows/JsonSchemaPlayground/context.d.ts +3 -3
- package/dist/flows/JsonSchemaPlayground/hooks.d.ts +3 -3
- package/dist/flows/JsonSchemaPlayground/index.d.ts +3 -3
- package/dist/flows/JsonSchemaPlayground/index.js +1 -1
- package/dist/flows/JsonSchemaPlayground/types.d.ts +3 -3
- 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/DailySchedule/DailySchedule.d.ts +2 -2
- package/dist/flows/Onboarding/components/DailySchedule/DailyScheduleContainer.d.ts +2 -2
- package/dist/flows/Onboarding/components/DailySchedule/DailyScheduleEditForm.d.ts +2 -2
- package/dist/flows/Onboarding/components/DailySchedule/DailyScheduleHoursErrorBanner.d.ts +2 -2
- package/dist/flows/Onboarding/components/DailySchedule/DailyScheduleSummaryBody.d.ts +2 -2
- package/dist/flows/Onboarding/components/DailySchedule/constants.d.ts +2 -2
- package/dist/flows/Onboarding/components/DailySchedule/types.d.ts +2 -2
- package/dist/flows/Onboarding/components/DailySchedule/useDailyScheduleEditForm.d.ts +2 -2
- package/dist/flows/Onboarding/components/DailySchedule/utils.d.ts +3 -3
- package/dist/flows/Onboarding/components/EmploymentAgreementInfoContent.js +1 -1
- package/dist/flows/Onboarding/components/EngagementAgreementDetailsStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/EngagementAgreementDetailsStep.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/PreOnboardingRequirements.d.ts +4 -4
- package/dist/flows/Onboarding/components/PreOnboardingRequirements.js +1 -1
- package/dist/flows/Onboarding/components/PreviewEmploymentAgreementStep.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/PayrollAdminOnboarding/PayrollAdminOnboardingFlow.d.ts +4 -4
- package/dist/flows/PayrollAdminOnboarding/PayrollAdminOnboardingFlow.js +1 -1
- package/dist/flows/PayrollAdminOnboarding/api.d.ts +2 -2
- package/dist/flows/PayrollAdminOnboarding/api.js +1 -1
- package/dist/flows/PayrollAdminOnboarding/components/AdministrativeDetailsStep.d.ts +3 -3
- package/dist/flows/PayrollAdminOnboarding/components/AdministrativeDetailsStep.js +1 -1
- package/dist/flows/PayrollAdminOnboarding/components/ContractDetailsStep.d.ts +3 -3
- package/dist/flows/PayrollAdminOnboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/PayrollAdminOnboarding/components/InvitationStep.d.ts +3 -3
- package/dist/flows/PayrollAdminOnboarding/components/InvitationStep.js +1 -1
- package/dist/flows/PayrollAdminOnboarding/components/PayrollAdminForm.d.ts +2 -2
- package/dist/flows/PayrollAdminOnboarding/components/PayrollAdminForm.js +1 -1
- package/dist/flows/PayrollAdminOnboarding/components/SelectCountryStep.d.ts +3 -3
- package/dist/flows/PayrollAdminOnboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/PayrollAdminOnboarding/components/useStepSubmitHandler.d.ts +3 -3
- package/dist/flows/PayrollAdminOnboarding/context.d.ts +4 -4
- package/dist/flows/PayrollAdminOnboarding/hooks.d.ts +4 -4
- package/dist/flows/PayrollAdminOnboarding/hooks.js +1 -1
- package/dist/flows/PayrollAdminOnboarding/index.d.ts +4 -4
- package/dist/flows/PayrollAdminOnboarding/index.js +1 -1
- package/dist/flows/PayrollAdminOnboarding/types.d.ts +4 -4
- package/dist/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.d.ts +4 -4
- package/dist/flows/PayrollEmployeeOnboarding/PayrollEmployeeOnboardingFlow.js +1 -1
- package/dist/flows/PayrollEmployeeOnboarding/api.d.ts +3 -3
- package/dist/flows/PayrollEmployeeOnboarding/api.js +1 -1
- package/dist/flows/PayrollEmployeeOnboarding/components/BankAccountStep.d.ts +3 -3
- package/dist/flows/PayrollEmployeeOnboarding/components/BankAccountStep.js +1 -1
- package/dist/flows/PayrollEmployeeOnboarding/components/FederalTaxesStep.d.ts +3 -3
- package/dist/flows/PayrollEmployeeOnboarding/components/FederalTaxesStep.js +1 -1
- package/dist/flows/PayrollEmployeeOnboarding/components/HomeAddressStep.d.ts +3 -3
- package/dist/flows/PayrollEmployeeOnboarding/components/HomeAddressStep.js +1 -1
- package/dist/flows/PayrollEmployeeOnboarding/components/PayrollEmployeeForm.d.ts +2 -2
- package/dist/flows/PayrollEmployeeOnboarding/components/PayrollEmployeeForm.js +1 -1
- package/dist/flows/PayrollEmployeeOnboarding/components/PersonalDetailsStep.d.ts +3 -3
- package/dist/flows/PayrollEmployeeOnboarding/components/PersonalDetailsStep.js +1 -1
- package/dist/flows/PayrollEmployeeOnboarding/components/StateTaxesStep.d.ts +3 -3
- package/dist/flows/PayrollEmployeeOnboarding/components/StateTaxesStep.js +1 -1
- package/dist/flows/PayrollEmployeeOnboarding/components/useEmployeeStepSubmitHandler.d.ts +3 -3
- package/dist/flows/PayrollEmployeeOnboarding/context.d.ts +4 -4
- package/dist/flows/PayrollEmployeeOnboarding/hooks.d.ts +4 -4
- package/dist/flows/PayrollEmployeeOnboarding/hooks.js +1 -1
- package/dist/flows/PayrollEmployeeOnboarding/index.d.ts +4 -4
- package/dist/flows/PayrollEmployeeOnboarding/index.js +1 -1
- package/dist/flows/PayrollEmployeeOnboarding/types.d.ts +4 -4
- package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -4
- package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
- package/dist/flows/Termination/EmployeeComunicationForm.d.ts +4 -4
- package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
- package/dist/flows/Termination/PaidTimeOffForm.d.ts +4 -4
- package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
- package/dist/flows/Termination/TerminationDetailsForm.d.ts +4 -4
- package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
- package/dist/flows/Termination/TerminationFlow.d.ts +4 -4
- package/dist/flows/Termination/TerminationFlow.js +1 -1
- package/dist/flows/Termination/TerminationForm.d.ts +4 -4
- package/dist/flows/Termination/TerminationForm.js +1 -1
- package/dist/flows/Termination/api.d.ts +5 -5
- package/dist/flows/Termination/api.js +1 -1
- package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +6 -6
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +6 -6
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +6 -6
- package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
- package/dist/flows/Termination/context.d.ts +4 -4
- package/dist/flows/Termination/hooks.d.ts +4 -4
- package/dist/flows/Termination/hooks.js +1 -1
- package/dist/flows/Termination/index.d.ts +6 -6
- package/dist/flows/Termination/index.js +1 -1
- package/dist/flows/Termination/json-schemas/schema.d.ts +4 -4
- package/dist/flows/Termination/types.d.ts +4 -4
- package/dist/flows/Termination/utils.d.ts +4 -4
- package/dist/flows/types.d.ts +3 -3
- package/dist/flows/utils.d.ts +2 -2
- package/dist/index.d.ts +14 -14
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/internals.d.ts +4 -4
- package/dist/internals.js +1 -1
- package/dist/{mutations-DU9Ens-k.d.ts → mutations-CP-6Q1qD.d.ts} +1 -1
- package/dist/{remoteFlows-BlMarq2K.d.ts → remoteFlows-XC0Ss0fy.d.ts} +2 -2
- package/dist/{types-BGoAzP0c.d.ts → types-6A_DAOTw.d.ts} +1 -1
- package/dist/{types-CUM3UF3m.d.ts → types-BiZEYxvl.d.ts} +3 -3
- package/dist/{types-DFnvapWX.d.ts → types-BnNeE0Fd.d.ts} +5 -5
- package/dist/{types-BFSFdXKe.d.ts → types-CASxD27i.d.ts} +2 -2
- package/dist/{types-DhMtx0eA.d.ts → types-Cgl9btOl.d.ts} +4 -4
- package/dist/{types-KKMzDO4l.d.ts → types-DUb6Xtze.d.ts} +2 -2
- package/dist/{types-DitVjS70.d.ts → types-DoJBHy3H.d.ts} +5 -5
- package/dist/{types-Q5jEmNSC.d.ts → types-UQad9Aui.d.ts} +37 -4
- package/dist/{types-B3gx0d05.d.ts → types-iOFkkiK3.d.ts} +2 -2
- package/dist/{types.gen-CMDAS1NL.d.ts → types.gen-ClcXnZQX.d.ts} +3 -3
- package/dist/{utils-DpJmWzrf.d.ts → utils-B8OKS73W.d.ts} +1 -1
- package/package.json +5 -4
- package/dist/CheckboxFieldDefault-IAB3SNK3.js +0 -2
- package/dist/CountryFieldDefault-BVEQY5Q6.js +0 -2
- package/dist/DatePickerFieldDefault-AZFURBQX.js +0 -2
- package/dist/FileUploadFieldDefault-WSBZKLNC.js +0 -2
- package/dist/ForcedValueFieldDefault-N3IS2F36.js +0 -2
- package/dist/MultiSelectFieldDefault-XW2WTPDC.js +0 -2
- package/dist/RadioGroupFieldDefault-SXO7A5NI.js +0 -2
- package/dist/SelectFieldDefault-7NL7VFYH.js +0 -2
- package/dist/TelFieldDefault-VDUP2THF.js +0 -2
- package/dist/TextAreaFieldDefault-JEVFVXO7.js +0 -2
- package/dist/TextFieldDefault-EMXPSK7U.js +0 -2
- package/dist/TimeFieldDefault-4WDEHMIJ.js +0 -2
- package/dist/chunk-A74I763T.js +0 -2
- package/dist/chunk-A74I763T.js.map +0 -1
- package/dist/chunk-DAUDKN32.js +0 -8
- package/dist/chunk-DAUDKN32.js.map +0 -1
- package/dist/chunk-DZUHC5TS.js +0 -2
- package/dist/chunk-DZUHC5TS.js.map +0 -1
- package/dist/chunk-HDFAFTHC.js +0 -2
- package/dist/chunk-HDFAFTHC.js.map +0 -1
- package/dist/chunk-HO5OVZ7J.js +0 -2
- package/dist/chunk-HO5OVZ7J.js.map +0 -1
- package/dist/chunk-IBHCQXIL.js +0 -2
- package/dist/chunk-IBHCQXIL.js.map +0 -1
- package/dist/chunk-PEBKJFMW.js +0 -2
- package/dist/chunk-PEBKJFMW.js.map +0 -1
- package/dist/chunk-XCVZRNIN.js +0 -2
- /package/dist/{CheckboxFieldDefault-IAB3SNK3.js.map → CheckboxFieldDefault-X5SIWA6P.js.map} +0 -0
- /package/dist/{CountryFieldDefault-BVEQY5Q6.js.map → CountryFieldDefault-AZOQXIVV.js.map} +0 -0
- /package/dist/{DatePickerFieldDefault-AZFURBQX.js.map → DatePickerFieldDefault-NZL3TD4C.js.map} +0 -0
- /package/dist/{FileUploadFieldDefault-WSBZKLNC.js.map → FileUploadFieldDefault-A74OEKR7.js.map} +0 -0
- /package/dist/{ForcedValueFieldDefault-N3IS2F36.js.map → ForcedValueFieldDefault-WD6FPQPF.js.map} +0 -0
- /package/dist/{MultiSelectFieldDefault-XW2WTPDC.js.map → MultiSelectFieldDefault-4RDSLVXE.js.map} +0 -0
- /package/dist/{RadioGroupFieldDefault-SXO7A5NI.js.map → RadioGroupFieldDefault-RMLMHLRP.js.map} +0 -0
- /package/dist/{SelectFieldDefault-7NL7VFYH.js.map → SelectFieldDefault-LMCEGGY5.js.map} +0 -0
- /package/dist/{TelFieldDefault-VDUP2THF.js.map → TelFieldDefault-6327HAAP.js.map} +0 -0
- /package/dist/{TextAreaFieldDefault-JEVFVXO7.js.map → TextAreaFieldDefault-ULWPOPSP.js.map} +0 -0
- /package/dist/{TextFieldDefault-EMXPSK7U.js.map → TextFieldDefault-LEKXVZP4.js.map} +0 -0
- /package/dist/{TimeFieldDefault-4WDEHMIJ.js.map → TimeFieldDefault-EDFT5XUB.js.map} +0 -0
- /package/dist/{chunk-NGBNHXAA.js.map → chunk-2HLKH3BT.js.map} +0 -0
- /package/dist/{chunk-SSPK7NGT.js.map → chunk-2QSJKNZO.js.map} +0 -0
- /package/dist/{chunk-RWPZYB5B.js.map → chunk-2UD2ZFSN.js.map} +0 -0
- /package/dist/{chunk-QIAMSVGB.js.map → chunk-2UEZACSE.js.map} +0 -0
- /package/dist/{chunk-IRQJR7KU.js.map → chunk-4LQUD36G.js.map} +0 -0
- /package/dist/{chunk-NWY6UVCV.js.map → chunk-4QEPM5MQ.js.map} +0 -0
- /package/dist/{chunk-W5S3F2WP.js.map → chunk-54EKTCFE.js.map} +0 -0
- /package/dist/{chunk-625V5NV7.js.map → chunk-55CB7X5W.js.map} +0 -0
- /package/dist/{chunk-NHWKX4ED.js.map → chunk-5DCPSSPR.js.map} +0 -0
- /package/dist/{chunk-A4WXUJPL.js.map → chunk-5HFK7EMV.js.map} +0 -0
- /package/dist/{chunk-PDOPI7HR.js.map → chunk-5HXGF3IA.js.map} +0 -0
- /package/dist/{chunk-R5THYINT.js.map → chunk-5JKUOW3P.js.map} +0 -0
- /package/dist/{chunk-E7Y3YBZH.js.map → chunk-62EFEBHN.js.map} +0 -0
- /package/dist/{chunk-UGQJQM72.js.map → chunk-64PDV5NF.js.map} +0 -0
- /package/dist/{chunk-AVFWX6M6.js.map → chunk-6AMPXS3F.js.map} +0 -0
- /package/dist/{chunk-4X5DGXVM.js.map → chunk-6HBIQAF2.js.map} +0 -0
- /package/dist/{chunk-FZMUZRZN.js.map → chunk-744REBZC.js.map} +0 -0
- /package/dist/{chunk-WNGIJIV2.js.map → chunk-7BB24CX5.js.map} +0 -0
- /package/dist/{chunk-YWLAZIIO.js.map → chunk-7LQEU3B4.js.map} +0 -0
- /package/dist/{chunk-QFBZ7JTG.js.map → chunk-7TCY4ON2.js.map} +0 -0
- /package/dist/{chunk-BQKSMAW3.js.map → chunk-7TRSA2OH.js.map} +0 -0
- /package/dist/{chunk-LOFKF243.js.map → chunk-ADXTCKMJ.js.map} +0 -0
- /package/dist/{chunk-PSK3Z52M.js.map → chunk-AJ5AKHYP.js.map} +0 -0
- /package/dist/{chunk-KXTESNWQ.js.map → chunk-AP6FKWKX.js.map} +0 -0
- /package/dist/{chunk-GRLZH65T.js.map → chunk-AVBV7L5E.js.map} +0 -0
- /package/dist/{chunk-GFGO7E5V.js.map → chunk-BOVUSO4A.js.map} +0 -0
- /package/dist/{chunk-IYH7D5ET.js.map → chunk-BTAKGADS.js.map} +0 -0
- /package/dist/{chunk-THUEI7J4.js.map → chunk-CEFPQAKH.js.map} +0 -0
- /package/dist/{chunk-QRSMCORC.js.map → chunk-CGILHL4U.js.map} +0 -0
- /package/dist/{chunk-G4TPPC5G.js.map → chunk-CX57A6WK.js.map} +0 -0
- /package/dist/{chunk-R6U3F3O3.js.map → chunk-DFTTDXJ5.js.map} +0 -0
- /package/dist/{chunk-F3YBR2IP.js.map → chunk-ECD2RHON.js.map} +0 -0
- /package/dist/{chunk-U7X7AHH4.js.map → chunk-EW6UABH3.js.map} +0 -0
- /package/dist/{chunk-UTWBY65S.js.map → chunk-F62JZXCH.js.map} +0 -0
- /package/dist/{chunk-7DQOA753.js.map → chunk-FIOX5JX5.js.map} +0 -0
- /package/dist/{chunk-4FKQXGBR.js.map → chunk-FPP5ZANJ.js.map} +0 -0
- /package/dist/{chunk-B6WW4RCM.js.map → chunk-GIQIO4GI.js.map} +0 -0
- /package/dist/{chunk-GZGBZT7Y.js.map → chunk-GMXL2Z5N.js.map} +0 -0
- /package/dist/{chunk-FB23WOLZ.js.map → chunk-GNW6DGUS.js.map} +0 -0
- /package/dist/{chunk-YCJGDPBN.js.map → chunk-H3GKCPVS.js.map} +0 -0
- /package/dist/{chunk-CKDQYT7E.js.map → chunk-H3Y7IISD.js.map} +0 -0
- /package/dist/{chunk-GL6CJ56P.js.map → chunk-H5M3D6CI.js.map} +0 -0
- /package/dist/{chunk-WLJX4B55.js.map → chunk-I757RN7F.js.map} +0 -0
- /package/dist/{chunk-QOGWAKHP.js.map → chunk-IFDFCKT4.js.map} +0 -0
- /package/dist/{chunk-ISPN7HQ5.js.map → chunk-IJAV22PE.js.map} +0 -0
- /package/dist/{chunk-4ULD4YI7.js.map → chunk-IROMMYZS.js.map} +0 -0
- /package/dist/{chunk-5POY6QBR.js.map → chunk-IZRM26GZ.js.map} +0 -0
- /package/dist/{chunk-LRXKF2LC.js.map → chunk-JCES7EE2.js.map} +0 -0
- /package/dist/{chunk-QB6GQW3J.js.map → chunk-JCKH3UYE.js.map} +0 -0
- /package/dist/{chunk-DAZQJZOF.js.map → chunk-JMBQAG6H.js.map} +0 -0
- /package/dist/{chunk-IPQZBMOO.js.map → chunk-JNPESWI7.js.map} +0 -0
- /package/dist/{chunk-KSCJNGWW.js.map → chunk-JRMI5S74.js.map} +0 -0
- /package/dist/{chunk-UA22Q6DY.js.map → chunk-K3QDNFF5.js.map} +0 -0
- /package/dist/{chunk-IYWSUSS2.js.map → chunk-LVYZIOOZ.js.map} +0 -0
- /package/dist/{chunk-ZLTZKUXL.js.map → chunk-MBGHSHR6.js.map} +0 -0
- /package/dist/{chunk-N2WIEKM6.js.map → chunk-MWBEA2NI.js.map} +0 -0
- /package/dist/{chunk-URNFXEOZ.js.map → chunk-MZM26I3S.js.map} +0 -0
- /package/dist/{chunk-QFLUUNBA.js.map → chunk-NILEOD3X.js.map} +0 -0
- /package/dist/{chunk-3HMBTPH7.js.map → chunk-NP3RMRKZ.js.map} +0 -0
- /package/dist/{chunk-YUS4SJPV.js.map → chunk-OCZ5EG5J.js.map} +0 -0
- /package/dist/{chunk-YJTKDCA6.js.map → chunk-ODRR3US4.js.map} +0 -0
- /package/dist/{chunk-3DPDFOYO.js.map → chunk-ONELHWYF.js.map} +0 -0
- /package/dist/{chunk-2IUT7KWS.js.map → chunk-OUVSBTOE.js.map} +0 -0
- /package/dist/{chunk-DTNFGOBK.js.map → chunk-P4LSZLTJ.js.map} +0 -0
- /package/dist/{chunk-YVQ4Q626.js.map → chunk-PE2UM2SW.js.map} +0 -0
- /package/dist/{chunk-CR5J5KK6.js.map → chunk-PGS35CGC.js.map} +0 -0
- /package/dist/{chunk-IK2LTVOV.js.map → chunk-POA6NSFQ.js.map} +0 -0
- /package/dist/{chunk-QNEGC7RZ.js.map → chunk-PUX6FYHV.js.map} +0 -0
- /package/dist/{chunk-46IKKWMK.js.map → chunk-QETOBZUA.js.map} +0 -0
- /package/dist/{chunk-ZQGG2KNM.js.map → chunk-QTEQCA5N.js.map} +0 -0
- /package/dist/{chunk-VJTAVPZX.js.map → chunk-QYA7D7ZQ.js.map} +0 -0
- /package/dist/{chunk-QUJBIRNY.js.map → chunk-R5Y7AZWB.js.map} +0 -0
- /package/dist/{chunk-UX5LWYEO.js.map → chunk-RADQBXMO.js.map} +0 -0
- /package/dist/{chunk-3BB4KEIH.js.map → chunk-RQZ5QNCM.js.map} +0 -0
- /package/dist/{chunk-R23HFBV4.js.map → chunk-SDF4QRJ2.js.map} +0 -0
- /package/dist/{chunk-H4ZSTP7B.js.map → chunk-SIVFXETC.js.map} +0 -0
- /package/dist/{chunk-3OHORFIX.js.map → chunk-SSUL5J5I.js.map} +0 -0
- /package/dist/{chunk-UETBVQT5.js.map → chunk-TDUPMUA2.js.map} +0 -0
- /package/dist/{chunk-VCJHB56K.js.map → chunk-TKJQB2O2.js.map} +0 -0
- /package/dist/{chunk-FF5OB2GF.js.map → chunk-UDF7IJTE.js.map} +0 -0
- /package/dist/{chunk-3CZLKNIW.js.map → chunk-UGU2ENUA.js.map} +0 -0
- /package/dist/{chunk-SQ5OMBOV.js.map → chunk-UKEIM24T.js.map} +0 -0
- /package/dist/{chunk-YFQNP2SL.js.map → chunk-VPFTBK24.js.map} +0 -0
- /package/dist/{chunk-2BH4CIY3.js.map → chunk-VVMBSA4F.js.map} +0 -0
- /package/dist/{chunk-7JZWL4DI.js.map → chunk-WMKJCDHA.js.map} +0 -0
- /package/dist/{chunk-TSX5CPGE.js.map → chunk-X4IBNXCR.js.map} +0 -0
- /package/dist/{chunk-R2NQ3F6J.js.map → chunk-XLAXG4H6.js.map} +0 -0
- /package/dist/{chunk-3JH25AAF.js.map → chunk-XPCQ5QJV.js.map} +0 -0
- /package/dist/{chunk-C3LOTWEB.js.map → chunk-Y25ROTI4.js.map} +0 -0
- /package/dist/{chunk-CKOXMDGX.js.map → chunk-YBHHWAOI.js.map} +0 -0
- /package/dist/{chunk-M2UGSIVQ.js.map → chunk-YP6UTKJJ.js.map} +0 -0
- /package/dist/{chunk-YUR2E2H3.js.map → chunk-YTK3CQEH.js.map} +0 -0
- /package/dist/{chunk-SQKFUT6T.js.map → chunk-ZDHGJ3FH.js.map} +0 -0
- /package/dist/{chunk-4VEKBKZP.js.map → chunk-ZZXFTUY7.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as B}from"./chunk-PVORGGT3.js";import{a as te}from"./chunk-BUR3X6FL.js";import{b as ne,c as re,f as ie}from"./chunk-TNWH6PVQ.js";import{a as oe}from"./chunk-GYMFEHNM.js";import{a as G}from"./chunk-3OHORFIX.js";import{b as x,g as ee}from"./chunk-NEVSZEMH.js";import{e as h}from"./chunk-SRLBVFNQ.js";import{l as Y,m as j,n as V,r as O}from"./chunk-C4HFMTSB.js";import{b as S,c as T}from"./chunk-H2O4CVKF.js";import{a as r}from"./chunk-P37U34EQ.js";import{Fragment as ro,useEffect as io,useRef as _e}from"react";import H from"lodash.omit";import{jsx as le}from"react/jsx-runtime";function se({description:e,label:o,name:t,minDate:n,maxDate:i,onChange:l,component:m,...s}){let{components:F}=S(),{control:c}=h(),f=T(),d;s.meta?.mot&&typeof s.meta.mot=="number"?d=Y(s.meta.mot):typeof n=="string"&&(d=new Date(`${n}T00:00:00`));let C;return i&&(C=new Date(`${i}T23:59:59`)),le(x,{control:c,name:t,render:({field:p,fieldState:g})=>{let u=m||F?.date;if(!u)throw new Error(`Date picker component not found for field ${t}`);let P={description:e,label:o,name:t,onChange:l,transformHtml:f,...d&&{minDate:d.toISOString()},...C&&{maxDate:C.toISOString()},...s};return le(u,{field:{...p,onChange:r(y=>{p.onChange(y),l?.(y)},"onChange")},fieldState:g,fieldData:P})}})}r(se,"DatePickerField");import{jsx as me}from"react/jsx-runtime";var Oe=r((e,o)=>{if(!o)return null;for(let t of e)if(t instanceof File&&t.size>o){let n=Math.round(o/1048576),i=Math.round(t.size/(1024*1024));return`File "${t.name}" exceeds maximum size of ${n}MB (file is ${i}MB)`}return null},"validateFileSize");function ae({name:e,description:o,label:t,multiple:n=!1,onChange:i,component:l,accept:m,maxSize:s,...F}){let{components:c}=S(),{control:f,setError:d,clearErrors:C}=h(),p=T(),g=r(async(u,P)=>{let y=Oe(u,s);if(y){d(e,{message:y});return}C(e),P.onChange(u),i?.(u)},"handleOnChange");return me(x,{control:f,name:e,render:({field:u,fieldState:P})=>{let y=l||c.file;if(!y)throw new Error(`File upload component not found for field ${e}`);let R={name:e,description:o,label:t,multiple:n,accept:m,maxFileSize:s,transformHtml:p,...F};return me(y,{field:{...u,value:u.value,onChange:r(async w=>g(w,u),"onChange")},fieldState:P,fieldData:R})}})}r(ae,"FileUploadField");import{jsx as de}from"react/jsx-runtime";function J({component:e,onChange:o,...t}){let{components:n}=S(),{control:i}=h(),l=T();return de(x,{control:i,name:t.name,render:({field:m,fieldState:s})=>{let F=e||n.number;if(!F)throw new Error(`Number component not found for field ${t.name}`);let c={onChange:o,transformHtml:l,...t};return de(F,{field:{...m,onChange:r(f=>{m.onChange(f),o?.(f)},"onChange")},fieldState:s,fieldData:c})}})}r(J,"NumberField");import{jsx as pe}from"react/jsx-runtime";function ce({name:e,defaultValue:o,description:t,label:n,options:i,onChange:l,component:m,...s}){let{components:F}=S(),{control:c}=h(),f=T();return pe(x,{control:c,name:e,defaultValue:o,render:({field:d,fieldState:C})=>{let p=m||F?.radio;if(!p)throw new Error(`Radio group component not found for field ${e}`);let g={name:e,defaultValue:o,description:t,label:n,options:i,transformHtml:f,...s};return pe(p,{field:{...d,onChange:r(u=>{d.onChange(u),l?.(u)},"onChange")},fieldState:C,fieldData:g})}})}r(ce,"RadioGroupField");import{jsx as ue}from"react/jsx-runtime";function Fe({label:e,name:o,options:t,defaultValue:n,description:i,onChange:l,component:m,...s}){let{control:F}=h(),{components:c}=S(),f=T();return ue(x,{defaultValue:n,control:F,name:o,render:({field:d,fieldState:C})=>{let p=m||c?.select;if(!p)throw new Error(`Select component not found for field ${o}`);let g={label:e,name:o,options:t,defaultValue:n,description:i,onChange:l,transformHtml:f,...s};return ue(p,{field:{...d,onChange:r(u=>{let y=(Array.isArray(s.jsonType)?s.jsonType.includes("number"):s.jsonType==="number")?Number(u):u;d.onChange(y),l?.(y)},"onChange")},fieldState:C,fieldData:g})}})}r(Fe,"SelectField");import{jsx as fe}from"react/jsx-runtime";function Ce({label:e,name:o,options:t,defaultValue:n,description:i,onChange:l,$meta:m,component:s,...F}){let{control:c}=h(),{components:f}=S(),d=T();return fe(x,{defaultValue:n,control:c,name:o,render:({field:C,fieldState:p})=>{let g=s||f.countries;if(!g)throw new Error(`Country component not found for field ${o}`);let u={label:e,name:o,options:t,defaultValue:n,description:i,onChange:l,$meta:m,transformHtml:d,...F};return fe(g,{field:{...C,onChange:r(P=>{C.onChange(P),l?.(P)},"onChange")},fieldState:p,fieldData:u})}})}r(Ce,"CountryField");import{jsx as ge}from"react/jsx-runtime";function he({name:e,description:o,label:t,onChange:n,maxLength:i,component:l,...m}){let{components:s}=S(),{control:F}=h(),c=T();return ge(x,{control:F,name:e,render:({field:f,fieldState:d})=>{let C=l||s.textarea;if(!C)throw new Error(`Text area component not found for field ${e}`);let p={name:e,description:o,label:t,maxLength:i,transformHtml:c,...m};return ge(C,{field:{...f,onChange:r(g=>{f.onChange(g),n?.(g)},"onChange")},fieldState:d,fieldData:p})}})}r(he,"TextAreaField");import{jsx as Se}from"react/jsx-runtime";function Te({component:e,onChange:o,...t}){let{components:n}=S(),{control:i}=h(),l=T();return Se(x,{control:i,name:t.name,render:({field:m,fieldState:s})=>{let F=e||n.email;if(!F)throw new Error(`Email component not found for field ${t.name}`);let c={onChange:o,transformHtml:l,...t};return Se(F,{field:{...m,onChange:r(f=>{m.onChange(f),o?.(f)},"onChange")},fieldState:s,fieldData:c})}})}r(Te,"EmailField");import{useEffect as Ge}from"react";import{jsx as xe}from"react/jsx-runtime";function ye(e){let{control:o,setValue:t}=h();return Ge(()=>{e.const!==void 0&&e.const===e.default&&e.name&&t(e.name,e.const)},[e.const,e.default,e.name,t]),xe(x,{control:o,name:e.name,render:({field:n})=>xe("input",{...n,type:"hidden"})})}r(ye,"HiddenField");import{useEffect as Ue,useState as Ze}from"react";import{jsx as Pe}from"react/jsx-runtime";function be(e){let{components:o}=S(),{setValue:t,control:n,watch:i}=h(),l=T(),m=i(e.name),[s,F]=Ze(m),{workHoursSummary:c,breakSummary:f}=re(s),d=ne(s);Ue(()=>{t(e.name,s)},[s,e.name,t]);function C(u){F(u)}r(C,"onSubmit");let p=e.component||o["work-schedule"];if(!p)throw new Error(`Work schedule component not found for field ${e.name}`);let g={...e,onSubmit:C,currentSchedule:s,transformHtml:l,defaultFormattedValue:{workHoursSummary:c,breakSummary:f,totalWorkHours:d}};return Pe(x,{control:n,name:e.name,render:({field:u,fieldState:P})=>Pe(p,{field:{...u,onChange:r(y=>{u.onChange(y),e.onChange?.(y)},"onChange")},fieldState:P,fieldData:g})})}r(be,"WorkScheduleField");import{jsx as $e}from"react/jsx-runtime";function De({label:e,name:o,options:t,defaultValue:n,description:i,onChange:l,component:m,...s}){let{control:F}=h(),{components:c}=S(),f=T();return $e(x,{defaultValue:n,control:F,name:o,render:({field:d,fieldState:C})=>{let p=m||c?.["multi-select"];if(!p)throw new Error(`Multi select component not found for field ${o}`);let g={label:e,name:o,options:t,defaultValue:n,description:i,onChange:l,transformHtml:f,...s};return $e(p,{field:{...d,onChange:r(u=>{d.onChange(u),l?.(u)},"onChange")},fieldState:C,fieldData:g})}})}r(De,"MultiSelectField");import{jsx as Ke}from"react/jsx-runtime";var Ee=r(e=>Ke(J,{maxLength:15,...e}),"MoneyField");import{useMemo as I,useCallback as Re,useState as qe,useEffect as Qe,useRef as Xe}from"react";import{jsx as U}from"react/jsx-runtime";function Ye(e){return e.replace(/\s/g,"")}r(Ye,"removeSpaces");function ve(e="",o){let t=new RegExp(`^(\\+|00)(\\d{${o?.dialCode?.length??0}})(.*)$`),n=e?.match(t);if(!n)return{prefix:"",dialCode:"",phoneNumber:e};let[,i,l,m]=n;return{prefix:i,dialCode:l,phoneNumber:m}}r(ve,"getStructuredNumberFromInternationalNumber");function we({dialCodes:e,dialCodeMaxLength:o},t){let{prefix:n}=ve(t);if(n)for(let i=o+n.length;i>n.length;i--){let l=t.slice(n.length,i);if(e[l])return e[l]}}r(we,"getCountryFromPhoneNumber");function Me(e){let o={},t=0;return e.forEach(n=>{n.areaCodes?n.areaCodes.forEach(i=>{let l=n.dialCode+i;o[l]=n,l.length>t&&(t=l.length)}):(o[n.dialCode]=n,n.dialCode.length>t&&(t=n.dialCode.length))}),{dialCodes:o,dialCodeMaxLength:t}}r(Me,"getCountryDataByCountryCode");function je(e=""){let o=/\(([^)]+)\)/g,t=e.match(o);if(t?.length===2)return t[1].replace(/\(|\)/g,"").split("|")}r(je,"getAreaCodesFromPattern");function eo(e){return e.map(o=>({name:o.label,dialCode:o.meta.countryCode,pattern:o.pattern,areaCodes:je(o.pattern)}))}r(eo,"transformSchemaToCountries");function oo({field:e,fieldState:o,fieldData:t,component:n,onChangeCountryCode:i,onChangePhoneNumber:l}){let{value:m}=e,{options:s}=t,F=I(()=>eo(s),[s]),c=I(()=>Me(F),[F]),f=Xe(!1),[d,C]=qe(()=>we(Me(F),m||""));Qe(()=>{if((!m||m==="+")&&(f.current=!1),f.current)return;let R=we(c,m||"");C(R)},[m,c]);let{prefix:p,phoneNumber:g}=I(()=>ve(m,d),[m,d]),u=Re(R=>{if(!R)return;let w=`+${R.dialCode}${g}`;f.current=!0,C(R),e.onChange(w),i&&i(R)},[g,e,i]),P=Re(R=>{let w=Ye(R.target.value),D;if(d?D=`${p}${d.dialCode}${w}`:D=`${p}${w}`,e.onChange(D),l){let L={target:{value:D,name:e.name}};l(L)}},[d,p,e,l]),y=I(()=>({...t,onChangeCountryCode:u,onChangePhoneNumber:P,currentCountry:d,nationalPhoneNumber:g}),[t,u,P,d,g]);return U(n,{field:e,fieldState:o,fieldData:y})}r(oo,"TelFieldRenderer");function Ne({name:e,description:o,label:t,onChangeCountryCode:n,onChangePhoneNumber:i,component:l,...m}){let{components:s}=S(),{control:F}=h(),c=T();return U(x,{control:F,name:e,render:({field:f,fieldState:d})=>{let C=l||s.tel;if(!C)throw new Error(`Tel component not found for field ${e}`);let p={name:e,description:o,label:t,transformHtml:c,...m};return U(oo,{field:f,fieldState:d,fieldData:p,component:C,onChangeCountryCode:n,onChangePhoneNumber:i})}})}r(Ne,"TelField");import{jsx as ke}from"react/jsx-runtime";function Ve({name:e,description:o,label:t,type:n,onChange:i,component:l,maxLength:m,...s}){let{components:F}=S(),{control:c}=h(),f=T();return ke(x,{control:c,name:e,render:({field:d,fieldState:C})=>{let p=l||F?.time;if(!p)throw new Error(`Time component not found for field ${e}`);let g={name:e,description:o,label:t,type:n,onChange:i,maxLength:m,transformHtml:f,...s};return ke(p,{field:{...d,onChange:r(u=>{d.onChange(u),i?.(u)},"onChange")},fieldState:C,fieldData:g})}})}r(Ve,"TimeField");var Z={checkbox:ie,text:oe,email:Te,money:Ee,select:Fe,"multi-select":De,radio:ce,number:J,file:ae,date:se,textarea:he,countries:Ce,hidden:ye,tel:Ne,time:Ve,"work-schedule":be};import{useEffect as to}from"react";import{jsx as no}from"react/jsx-runtime";function He({name:e,value:o,description:t,statement:n,label:i,helpCenter:l}){let{setValue:m}=h(),{components:s}=S(),F=T();to(()=>{m(e,o)},[e,o,m]);let c=n?.description||t,f=n?.title?O(n.title):O(i);if(!c&&!n?.title)return null;let C=s?.forcedValue;if(!C)throw new Error(`Forced value component not found for field ${e}`);return no(C,{fieldData:{name:e,value:o,title:f,description:c,meta:{helpCenter:l},transformHtml:F}})}r(He,"ForcedValueField");import{Fragment as K,jsx as b,jsxs as N}from"react/jsx-runtime";function We({label:e,name:o,fields:t,description:n,components:i,statement:l,isFlatFieldset:m,extra:s,variant:F="outset",features:c,meta:f,Component:d,...C}){let{helpCenter:p}=f||{},{watch:g,setValue:u,trigger:P,formState:y}=h(),{components:R}=S(),w=c?.toggle?.stateField,D=w?g(w):c?.toggle?.defaultExpanded??!0,L=t.map(({name:a})=>`${o}.${a}`),Ae=t.some(a=>a.calculateDynamicProperties),_=g(L),Be=Ae?g():_,q=_e(_),k=_e(null),Je=r(()=>{w&&u(w,!D)},"toggleExpanded");io(()=>{let a=_,v=q.current,E=y.isSubmitted||y.submitCount>0,W=!1;for(let M=0;M<a.length;M++)if(a[M]!==void 0&&v[M]!==a[M]){W=!0;break}return W&&E&&(k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{P()},50)),q.current=[...a],()=>{k.current&&clearTimeout(k.current)}},[_,P,y.isSubmitted,y.submitCount]);let Ie=R?.fieldsetToggle||te,Q=`${o}-content`,X=`${o}-header`;return d?b(d,{...C,name:o,value:g(o),setValue:a=>{u(o,a)}}):N("fieldset",{className:V("border-1 border-input p-4 rounded-xl","RemoteFlows__FieldSetField",`RemoteFlows__FieldSetField__${o}`),children:[b("legend",{className:V("text-sm font-semibold px-2",F==="inset"&&"hidden"),children:e}),p?.callToAction&&p?.id&&F==="outset"&&b(G,{className:"RemoteFlows__FieldSetField__HelpCenterLink mb-3",zendeskId:p.id,children:p.callToAction}),F==="inset"&&N(K,{children:[N("div",{className:"RemoteFlows__FieldSetField__Header",id:X,"data-state":D?"expanded":"collapsed","aria-expanded":D,children:[b("h3",{className:V("RemoteFlows__FieldSetField__Title"),children:e}),c?.toggle?.enabled&&b(Ie,{isExpanded:D,onToggle:Je,"aria-expanded":D,"aria-controls":Q,"aria-label":`${D?"Hide":"Show"} ${e}`,className:V("RemoteFlows__FieldSetField__Toggle",c.toggle?.className),children:D?c.toggle.labels?.collapse??"Remove":c.toggle.labels?.expand??"Define"})]}),p?.callToAction&&p?.id&&b(G,{className:"RemoteFlows__FieldSetField__HelpCenterLink mb-3",zendeskId:p.id,children:p.callToAction})]}),D&&N("div",{id:Q,"aria-labelledby":X,role:"region",children:[n?b(ee,{as:"div",className:"mb-5 RemoteFlows__FieldSetField__Description",children:n}):null,N("div",{className:"grid gap-4",children:[t.map(a=>{if(a.calculateDynamicProperties&&(a={...a,...a.calculateDynamicProperties(Be,a)||{}}),a.isVisible===!1||a.deprecated)return null;let v=a.type,E=`${m?a.name:`${o}.${a.name}`}`,W=j(a),M=r(($,A)=>a.WrapperComponent?b(a.WrapperComponent,{children:$},A):b(ro,{children:$},A),"wrapWithCustomWrapper");if(W){let $=H(a,"WrapperComponent");return M(b(He,{name:E,description:$.description,value:$.const,statement:$.statement,label:$.label,helpCenter:$.meta?.helpCenter}),E)}if(v==="fieldset"){let $=H(a,"WrapperComponent");return M(b(We,{...$,name:E,components:i}),E)}if(v==="fieldset-flat"){let $=H(a,"WrapperComponent");return M(b(We,{...$,name:E,components:i,isFlatFieldset:!0}),E)}let z=Z[v];if(a.Component){let{Component:$}=a,A=H(a,"WrapperComponent");return M(N(K,{children:[b($,{...A,value:g(E),setValue:ze=>{u(E,ze)}}),a.statement?b(B,{...a.statement}):null,a.extra?a.extra:null]}),E)}if(!z)return N("p",{className:"error",children:["Field type ",v," not supported"]});v==="select"&&a.multiple&&(z=Z["multi-select"]);let Le=H(a,"WrapperComponent");return M(N(K,{children:[b(z,{...Le,name:E,component:i?.[v]}),a.statement?b(B,{...a.statement}):null,a.extra?a.extra:null]}),E)}),s||null,l?b(B,{...l}):null]})]})]})}r(We,"FieldSetField");export{Z as a,He as b,We as c};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as B}from"./chunk-PVORGGT3.js";import{a as te}from"./chunk-BUR3X6FL.js";import{b as ne,c as re,f as ie}from"./chunk-TNWH6PVQ.js";import{a as oe}from"./chunk-GYMFEHNM.js";import{a as G}from"./chunk-SSUL5J5I.js";import{b as x,g as ee}from"./chunk-NEVSZEMH.js";import{e as h}from"./chunk-SRLBVFNQ.js";import{l as Y,m as j,n as V,r as O}from"./chunk-C4HFMTSB.js";import{b as S,c as T}from"./chunk-H2O4CVKF.js";import{a as r}from"./chunk-P37U34EQ.js";import{Fragment as ro,useEffect as io,useRef as _e}from"react";import H from"lodash.omit";import{jsx as le}from"react/jsx-runtime";function se({description:e,label:o,name:t,minDate:n,maxDate:i,onChange:l,component:m,...s}){let{components:F}=S(),{control:c}=h(),f=T(),d;s.meta?.mot&&typeof s.meta.mot=="number"?d=Y(s.meta.mot):typeof n=="string"&&(d=new Date(`${n}T00:00:00`));let C;return i&&(C=new Date(`${i}T23:59:59`)),le(x,{control:c,name:t,render:({field:p,fieldState:g})=>{let u=m||F?.date;if(!u)throw new Error(`Date picker component not found for field ${t}`);let P={description:e,label:o,name:t,onChange:l,transformHtml:f,...d&&{minDate:d.toISOString()},...C&&{maxDate:C.toISOString()},...s};return le(u,{field:{...p,onChange:r(y=>{p.onChange(y),l?.(y)},"onChange")},fieldState:g,fieldData:P})}})}r(se,"DatePickerField");import{jsx as me}from"react/jsx-runtime";var Oe=r((e,o)=>{if(!o)return null;for(let t of e)if(t instanceof File&&t.size>o){let n=Math.round(o/1048576),i=Math.round(t.size/(1024*1024));return`File "${t.name}" exceeds maximum size of ${n}MB (file is ${i}MB)`}return null},"validateFileSize");function ae({name:e,description:o,label:t,multiple:n=!1,onChange:i,component:l,accept:m,maxSize:s,...F}){let{components:c}=S(),{control:f,setError:d,clearErrors:C}=h(),p=T(),g=r(async(u,P)=>{let y=Oe(u,s);if(y){d(e,{message:y});return}C(e),P.onChange(u),i?.(u)},"handleOnChange");return me(x,{control:f,name:e,render:({field:u,fieldState:P})=>{let y=l||c.file;if(!y)throw new Error(`File upload component not found for field ${e}`);let R={name:e,description:o,label:t,multiple:n,accept:m,maxFileSize:s,transformHtml:p,...F};return me(y,{field:{...u,value:u.value,onChange:r(async w=>g(w,u),"onChange")},fieldState:P,fieldData:R})}})}r(ae,"FileUploadField");import{jsx as de}from"react/jsx-runtime";function J({component:e,onChange:o,...t}){let{components:n}=S(),{control:i}=h(),l=T();return de(x,{control:i,name:t.name,render:({field:m,fieldState:s})=>{let F=e||n.number;if(!F)throw new Error(`Number component not found for field ${t.name}`);let c={onChange:o,transformHtml:l,...t};return de(F,{field:{...m,onChange:r(f=>{m.onChange(f),o?.(f)},"onChange")},fieldState:s,fieldData:c})}})}r(J,"NumberField");import{jsx as pe}from"react/jsx-runtime";function ce({name:e,defaultValue:o,description:t,label:n,options:i,onChange:l,component:m,...s}){let{components:F}=S(),{control:c}=h(),f=T();return pe(x,{control:c,name:e,defaultValue:o,render:({field:d,fieldState:C})=>{let p=m||F?.radio;if(!p)throw new Error(`Radio group component not found for field ${e}`);let g={name:e,defaultValue:o,description:t,label:n,options:i,transformHtml:f,...s};return pe(p,{field:{...d,onChange:r(u=>{d.onChange(u),l?.(u)},"onChange")},fieldState:C,fieldData:g})}})}r(ce,"RadioGroupField");import{jsx as ue}from"react/jsx-runtime";function Fe({label:e,name:o,options:t,defaultValue:n,description:i,onChange:l,component:m,...s}){let{control:F}=h(),{components:c}=S(),f=T();return ue(x,{defaultValue:n,control:F,name:o,render:({field:d,fieldState:C})=>{let p=m||c?.select;if(!p)throw new Error(`Select component not found for field ${o}`);let g={label:e,name:o,options:t,defaultValue:n,description:i,onChange:l,transformHtml:f,...s};return ue(p,{field:{...d,onChange:r(u=>{let y=(Array.isArray(s.jsonType)?s.jsonType.includes("number"):s.jsonType==="number")?Number(u):u;d.onChange(y),l?.(y)},"onChange")},fieldState:C,fieldData:g})}})}r(Fe,"SelectField");import{jsx as fe}from"react/jsx-runtime";function Ce({label:e,name:o,options:t,defaultValue:n,description:i,onChange:l,$meta:m,component:s,...F}){let{control:c}=h(),{components:f}=S(),d=T();return fe(x,{defaultValue:n,control:c,name:o,render:({field:C,fieldState:p})=>{let g=s||f.countries;if(!g)throw new Error(`Country component not found for field ${o}`);let u={label:e,name:o,options:t,defaultValue:n,description:i,onChange:l,$meta:m,transformHtml:d,...F};return fe(g,{field:{...C,onChange:r(P=>{C.onChange(P),l?.(P)},"onChange")},fieldState:p,fieldData:u})}})}r(Ce,"CountryField");import{jsx as ge}from"react/jsx-runtime";function he({name:e,description:o,label:t,onChange:n,maxLength:i,component:l,...m}){let{components:s}=S(),{control:F}=h(),c=T();return ge(x,{control:F,name:e,render:({field:f,fieldState:d})=>{let C=l||s.textarea;if(!C)throw new Error(`Text area component not found for field ${e}`);let p={name:e,description:o,label:t,maxLength:i,transformHtml:c,...m};return ge(C,{field:{...f,onChange:r(g=>{f.onChange(g),n?.(g)},"onChange")},fieldState:d,fieldData:p})}})}r(he,"TextAreaField");import{jsx as Se}from"react/jsx-runtime";function Te({component:e,onChange:o,...t}){let{components:n}=S(),{control:i}=h(),l=T();return Se(x,{control:i,name:t.name,render:({field:m,fieldState:s})=>{let F=e||n.email;if(!F)throw new Error(`Email component not found for field ${t.name}`);let c={onChange:o,transformHtml:l,...t};return Se(F,{field:{...m,onChange:r(f=>{m.onChange(f),o?.(f)},"onChange")},fieldState:s,fieldData:c})}})}r(Te,"EmailField");import{useEffect as Ge}from"react";import{jsx as xe}from"react/jsx-runtime";function ye(e){let{control:o,setValue:t}=h();return Ge(()=>{e.const!==void 0&&e.const===e.default&&e.name&&t(e.name,e.const)},[e.const,e.default,e.name,t]),xe(x,{control:o,name:e.name,render:({field:n})=>xe("input",{...n,type:"hidden"})})}r(ye,"HiddenField");import{useEffect as Ue,useState as Ze}from"react";import{jsx as Pe}from"react/jsx-runtime";function be(e){let{components:o}=S(),{setValue:t,control:n,watch:i}=h(),l=T(),m=i(e.name),[s,F]=Ze(m),{workHoursSummary:c,breakSummary:f}=re(s),d=ne(s);Ue(()=>{t(e.name,s)},[s,e.name,t]);function C(u){F(u)}r(C,"onSubmit");let p=e.component||o["work-schedule"];if(!p)throw new Error(`Work schedule component not found for field ${e.name}`);let g={...e,onSubmit:C,currentSchedule:s,transformHtml:l,defaultFormattedValue:{workHoursSummary:c,breakSummary:f,totalWorkHours:d}};return Pe(x,{control:n,name:e.name,render:({field:u,fieldState:P})=>Pe(p,{field:{...u,onChange:r(y=>{u.onChange(y),e.onChange?.(y)},"onChange")},fieldState:P,fieldData:g})})}r(be,"WorkScheduleField");import{jsx as $e}from"react/jsx-runtime";function De({label:e,name:o,options:t,defaultValue:n,description:i,onChange:l,component:m,...s}){let{control:F}=h(),{components:c}=S(),f=T();return $e(x,{defaultValue:n,control:F,name:o,render:({field:d,fieldState:C})=>{let p=m||c?.["multi-select"];if(!p)throw new Error(`Multi select component not found for field ${o}`);let g={label:e,name:o,options:t,defaultValue:n,description:i,onChange:l,transformHtml:f,...s};return $e(p,{field:{...d,onChange:r(u=>{d.onChange(u),l?.(u)},"onChange")},fieldState:C,fieldData:g})}})}r(De,"MultiSelectField");import{jsx as Ke}from"react/jsx-runtime";var Ee=r(e=>Ke(J,{maxLength:15,...e}),"MoneyField");import{useMemo as I,useCallback as Re,useState as qe,useEffect as Qe,useRef as Xe}from"react";import{jsx as U}from"react/jsx-runtime";function Ye(e){return e.replace(/\s/g,"")}r(Ye,"removeSpaces");function ve(e="",o){let t=new RegExp(`^(\\+|00)(\\d{${o?.dialCode?.length??0}})(.*)$`),n=e?.match(t);if(!n)return{prefix:"",dialCode:"",phoneNumber:e};let[,i,l,m]=n;return{prefix:i,dialCode:l,phoneNumber:m}}r(ve,"getStructuredNumberFromInternationalNumber");function we({dialCodes:e,dialCodeMaxLength:o},t){let{prefix:n}=ve(t);if(n)for(let i=o+n.length;i>n.length;i--){let l=t.slice(n.length,i);if(e[l])return e[l]}}r(we,"getCountryFromPhoneNumber");function Me(e){let o={},t=0;return e.forEach(n=>{n.areaCodes?n.areaCodes.forEach(i=>{let l=n.dialCode+i;o[l]=n,l.length>t&&(t=l.length)}):(o[n.dialCode]=n,n.dialCode.length>t&&(t=n.dialCode.length))}),{dialCodes:o,dialCodeMaxLength:t}}r(Me,"getCountryDataByCountryCode");function je(e=""){let o=/\(([^)]+)\)/g,t=e.match(o);if(t?.length===2)return t[1].replace(/\(|\)/g,"").split("|")}r(je,"getAreaCodesFromPattern");function eo(e){return e.map(o=>({name:o.label,dialCode:o.meta.countryCode,pattern:o.pattern,areaCodes:je(o.pattern)}))}r(eo,"transformSchemaToCountries");function oo({field:e,fieldState:o,fieldData:t,component:n,onChangeCountryCode:i,onChangePhoneNumber:l}){let{value:m}=e,{options:s}=t,F=I(()=>eo(s),[s]),c=I(()=>Me(F),[F]),f=Xe(!1),[d,C]=qe(()=>we(Me(F),m||""));Qe(()=>{if((!m||m==="+")&&(f.current=!1),f.current)return;let R=we(c,m||"");C(R)},[m,c]);let{prefix:p,phoneNumber:g}=I(()=>ve(m,d),[m,d]),u=Re(R=>{if(!R)return;let w=`+${R.dialCode}${g}`;f.current=!0,C(R),e.onChange(w),i&&i(R)},[g,e,i]),P=Re(R=>{let w=Ye(R.target.value),D;if(d?D=`${p}${d.dialCode}${w}`:D=`${p}${w}`,e.onChange(D),l){let L={target:{value:D,name:e.name}};l(L)}},[d,p,e,l]),y=I(()=>({...t,onChangeCountryCode:u,onChangePhoneNumber:P,currentCountry:d,nationalPhoneNumber:g}),[t,u,P,d,g]);return U(n,{field:e,fieldState:o,fieldData:y})}r(oo,"TelFieldRenderer");function Ne({name:e,description:o,label:t,onChangeCountryCode:n,onChangePhoneNumber:i,component:l,...m}){let{components:s}=S(),{control:F}=h(),c=T();return U(x,{control:F,name:e,render:({field:f,fieldState:d})=>{let C=l||s.tel;if(!C)throw new Error(`Tel component not found for field ${e}`);let p={name:e,description:o,label:t,transformHtml:c,...m};return U(oo,{field:f,fieldState:d,fieldData:p,component:C,onChangeCountryCode:n,onChangePhoneNumber:i})}})}r(Ne,"TelField");import{jsx as ke}from"react/jsx-runtime";function Ve({name:e,description:o,label:t,type:n,onChange:i,component:l,maxLength:m,...s}){let{components:F}=S(),{control:c}=h(),f=T();return ke(x,{control:c,name:e,render:({field:d,fieldState:C})=>{let p=l||F?.time;if(!p)throw new Error(`Time component not found for field ${e}`);let g={name:e,description:o,label:t,type:n,onChange:i,maxLength:m,transformHtml:f,...s};return ke(p,{field:{...d,onChange:r(u=>{d.onChange(u),i?.(u)},"onChange")},fieldState:C,fieldData:g})}})}r(Ve,"TimeField");var Z={checkbox:ie,text:oe,email:Te,money:Ee,select:Fe,"multi-select":De,radio:ce,number:J,file:ae,date:se,textarea:he,countries:Ce,hidden:ye,tel:Ne,time:Ve,"work-schedule":be};import{useEffect as to}from"react";import{jsx as no}from"react/jsx-runtime";function He({name:e,value:o,description:t,statement:n,label:i,helpCenter:l}){let{setValue:m}=h(),{components:s}=S(),F=T();to(()=>{m(e,o)},[e,o,m]);let c=n?.description||t,f=n?.title?O(n.title):O(i);if(!c&&!n?.title)return null;let C=s?.forcedValue;if(!C)throw new Error(`Forced value component not found for field ${e}`);return no(C,{fieldData:{name:e,value:o,title:f,description:c,meta:{helpCenter:l},transformHtml:F}})}r(He,"ForcedValueField");import{Fragment as K,jsx as b,jsxs as N}from"react/jsx-runtime";function We({label:e,name:o,fields:t,description:n,components:i,statement:l,isFlatFieldset:m,extra:s,variant:F="outset",features:c,meta:f,Component:d,...C}){let{helpCenter:p}=f||{},{watch:g,setValue:u,trigger:P,formState:y}=h(),{components:R}=S(),w=c?.toggle?.stateField,D=w?g(w):c?.toggle?.defaultExpanded??!0,L=t.map(({name:a})=>`${o}.${a}`),Ae=t.some(a=>a.calculateDynamicProperties),_=g(L),Be=Ae?g():_,q=_e(_),k=_e(null),Je=r(()=>{w&&u(w,!D)},"toggleExpanded");io(()=>{let a=_,v=q.current,E=y.isSubmitted||y.submitCount>0,W=!1;for(let M=0;M<a.length;M++)if(a[M]!==void 0&&v[M]!==a[M]){W=!0;break}return W&&E&&(k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{P()},50)),q.current=[...a],()=>{k.current&&clearTimeout(k.current)}},[_,P,y.isSubmitted,y.submitCount]);let Ie=R?.fieldsetToggle||te,Q=`${o}-content`,X=`${o}-header`;return d?b(d,{...C,name:o,value:g(o),setValue:a=>{u(o,a)}}):N("fieldset",{className:V("border-1 border-input p-4 rounded-xl","RemoteFlows__FieldSetField",`RemoteFlows__FieldSetField__${o}`),children:[b("legend",{className:V("text-sm font-semibold px-2",F==="inset"&&"hidden"),children:e}),p?.callToAction&&p?.id&&F==="outset"&&b(G,{className:"RemoteFlows__FieldSetField__HelpCenterLink mb-3",zendeskId:p.id,children:p.callToAction}),F==="inset"&&N(K,{children:[N("div",{className:"RemoteFlows__FieldSetField__Header",id:X,"data-state":D?"expanded":"collapsed","aria-expanded":D,children:[b("h3",{className:V("RemoteFlows__FieldSetField__Title"),children:e}),c?.toggle?.enabled&&b(Ie,{isExpanded:D,onToggle:Je,"aria-expanded":D,"aria-controls":Q,"aria-label":`${D?"Hide":"Show"} ${e}`,className:V("RemoteFlows__FieldSetField__Toggle",c.toggle?.className),children:D?c.toggle.labels?.collapse??"Remove":c.toggle.labels?.expand??"Define"})]}),p?.callToAction&&p?.id&&b(G,{className:"RemoteFlows__FieldSetField__HelpCenterLink mb-3",zendeskId:p.id,children:p.callToAction})]}),D&&N("div",{id:Q,"aria-labelledby":X,role:"region",children:[n?b(ee,{as:"div",className:"mb-5 RemoteFlows__FieldSetField__Description",children:n}):null,N("div",{className:"grid gap-4",children:[t.map(a=>{if(a.calculateDynamicProperties&&(a={...a,...a.calculateDynamicProperties(Be,a)||{}}),a.isVisible===!1||a.deprecated)return null;let v=a.type,E=`${m?a.name:`${o}.${a.name}`}`,W=j(a),M=r(($,A)=>a.WrapperComponent?b(a.WrapperComponent,{children:$},A):b(ro,{children:$},A),"wrapWithCustomWrapper");if(W){let $=H(a,"WrapperComponent");return M(b(He,{name:E,description:$.description,value:$.const,statement:$.statement,label:$.label,helpCenter:$.meta?.helpCenter}),E)}if(v==="fieldset"){let $=H(a,"WrapperComponent");return M(b(We,{...$,name:E,components:i}),E)}if(v==="fieldset-flat"){let $=H(a,"WrapperComponent");return M(b(We,{...$,name:E,components:i,isFlatFieldset:!0}),E)}let z=Z[v];if(a.Component){let{Component:$}=a,A=H(a,"WrapperComponent");return M(N(K,{children:[b($,{...A,value:g(E),setValue:ze=>{u(E,ze)}}),a.statement?b(B,{...a.statement}):null,a.extra?a.extra:null]}),E)}if(!z)return N("p",{className:"error",children:["Field type ",v," not supported"]});v==="select"&&a.multiple&&(z=Z["multi-select"]);let Le=H(a,"WrapperComponent");return M(N(K,{children:[b(z,{...Le,name:E,component:i?.[v]}),a.statement?b(B,{...a.statement}):null,a.extra?a.extra:null]}),E)}),s||null,l?b(B,{...l}):null]})]})]})}r(We,"FieldSetField");export{Z as a,He as b,We as c};
|
|
2
|
+
//# sourceMappingURL=chunk-JNPESWI7.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-Y25ROTI4.js";import{b as n}from"./chunk-Q3ALCPJN.js";import{x as i}from"./chunk-C4HFMTSB.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as c}from"react/jsx-runtime";function F({onSubmit:m,onSuccess:d,onError:p}){let{contractorOnboardingBag:r}=n(),l=t(async(a,v)=>{try{let e=await r.parseFormValues(a);await m?.(e);let o=await r.onSubmit(a);if(o?.data){await d?.(o?.data),r?.next();return}}catch(e){let o=i(e,r.meta?.fields?.contract_preview,v);p?.(o)}},"handleSubmit"),u=r.stepState.values?.contract_preview||r.initialValues.contract_preview;return c("div",{className:"space-y-4",children:c(s,{defaultValues:u,onSubmit:l})})}t(F,"ContractPreviewStep");export{F as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JRMI5S74.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-YPBPOUGX.js";import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-YPBPOUGX.js";import{a as l}from"./chunk-ADXTCKMJ.js";import{b as a}from"./chunk-SS2SYDCB.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as n}from"react/jsx-runtime";function u(r){let{employeeBag:e}=a(),s=o(r);return e.taxStepsAvailability.federal_taxes.isAvailable?n(l,{onSubmit:s,defaultValues:{...e.initialValues?.federal_taxes,...e.stepState.values?.federal_taxes}}):null}t(u,"FederalTaxesStep");export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-K3QDNFF5.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as te}from"./chunk-UYOKK4QW.js";import{a as ne}from"./chunk-753FEV2S.js";import{a as oe}from"./chunk-Y2NCUO3F.js";import{a as ee}from"./chunk-VDJJEIOD.js";import{e as q}from"./chunk-TDKKCSKV.js";import{a as O,b as re,c as P,d as S,f as F,m as ie}from"./chunk-PB6UQ4A4.js";import{a as W,b as X}from"./chunk-FIPWWOZY.js";import{a as Z}from"./chunk-NP3RMRKZ.js";import{a as m}from"./chunk-JO5D2522.js";import{M as Q,S as U,_ as L,ba as J,ea as G,f as v,ga as K,ja as N,ka as k,la as B,ma as $,oa as H,ra as Y,s as A,sa as z,v as j}from"./chunk-FPCF4TH2.js";import{b as I,g as _,t as w}from"./chunk-C4HFMTSB.js";import{e as s}from"./chunk-H2O4CVKF.js";import{a as n}from"./chunk-P37U34EQ.js";import{useMemo as x}from"react";import{useMutation as p,useQuery as y}from"@tanstack/react-query";import{useMutation as ge,useQuery as se}from"@tanstack/react-query";var De=n(()=>{let{client:e}=s();return ge({mutationFn:n(t=>K({client:e,body:t,headers:{Authorization:""}}),"mutationFn")})},"useUploadFile"),ae=n(e=>{let{client:t}=s();return se({queryKey:["download-file",e],queryFn:n(async()=>{let o=await Q({client:t,path:{id:e}});if(o.error)throw o.error;return o.data},"queryFn"),select:n(({data:o})=>o?.file,"select"),enabled:!!e})},"useDownloadFile"),ce=n((e,t,o)=>{let{client:r}=s();return se({queryKey:["employment-files",e],queryFn:n(async()=>{let i=await G({client:r,path:{employment_id:e},query:t});if(i.error)throw i.error;return i.data},"queryFn"),...o})},"useEmploymentFiles");import{useQuery as Fe}from"@tanstack/react-query";import{useQuery as Se}from"@tanstack/react-query";var h=n(()=>{let{client:e}=s();return Se({queryKey:["identity"],queryFn:n(()=>k({client:e,headers:{Authorization:""}}),"queryFn"),select:n(t=>t.data?.data,"select")})},"useIdentity");function M(e){return e!=null&&"company"in e}n(M,"hasCompany");var le=n((e={enabled:!0})=>{let{data:t}=h(),o=M(t)?t?.company?.id??"":"",{client:r}=s();return Fe({queryKey:["pricing-plans",o],queryFn:n(()=>v({client:r,path:{company_id:o}}),"queryFn"),select:n(i=>i.data?.data?.pricing_plans,"select"),enabled:!!e?.enabled&&!!o})},"useCompanyPricingPlans");var xt=n(({fieldValues:e,options:t})=>y({queryKey:["contract-document-signature",e.review_completed,t?.jsfModify],queryFn:n(async()=>m(ee,e,{jsfModify:t?.jsfModify}),"queryFn"),enabled:t?.queryOptions?.enabled}),"useGetContractDocumentSignatureSchema"),Tt=n(()=>{let{client:e}=s();return p({mutationFn:n(async({employmentId:t,contractDocumentId:o,payload:r})=>N({client:e,body:r,path:{employment_id:t,contract_document_id:o}}),"mutationFn")})},"useSignContractDocument"),he=n(({employmentId:e,contractDocumentId:t,options:o})=>{let{client:r}=s();return y({queryKey:["contract-document",e,t],queryFn:n(async()=>j({client:r,path:{employment_id:e,id:t}}),"queryFn"),enabled:o?.queryOptions?.enabled,select:n(({data:i})=>({...i?.data,contract_document:{...i?.data?.contract_document,content:w(i?.data?.contract_document?.content)}}),"select")})},"useGetShowContractDocument"),Rt=n(({employmentId:e,contractDocumentId:t,options:o})=>{let{data:r}=he({employmentId:e,contractDocumentId:t,options:{queryOptions:{enabled:o?.queryOptions?.enabled}}});return{hasCompanySignedContract:r?.contract_document?.signatories?.some(a=>a.type==="company"&&a.status==="signed")}},"useHasCompanySignedContract"),Ee=n(({employmentId:e,options:t})=>{let{client:o}=s();return y({queryKey:["contractor-subscriptions",e],queryFn:n(async()=>A({client:o,path:{employment_id:e}}),"queryFn"),enabled:t?.queryOptions?.enabled,select:n(({data:r})=>r?.data,"select")})},"useGetContractorSubscriptions"),Dt=n(()=>{let{client:e}=s();return p({mutationFn:n(async({employmentId:t,payload:o})=>$({client:e,body:o,path:{employment_id:t}}),"mutationFn")})},"usePostManageContractorSubscriptions"),Vt=n(()=>{let{client:e}=s();return p({mutationFn:n(async({employmentId:t,payload:o})=>J({client:e,body:o,path:{employment_id:t}}),"mutationFn")})},"useCreateContractorContractDocument"),Ie={[O]:"Contractor Management",[re]:"Contractor Management Plus",[P]:"Contractor of Record"},_e=n(e=>{let{data:t,isLoading:o}=le({enabled:e?.enabled}),r=t?.find(a=>a.product.name==="EOR Monthly");return{eorSubscription:r?{product:{identifier:S,short_name:"EOR"},currency:r.price.currency,price:{amount:_(r.price.amount)},features:["Contract between Remote and employee","Remote manages onboarding, payroll, and compliance","Manages taxes, benefits, and time-off tracking","Handles contracts, transfers, and terminations"],description:"Enables hiring in countries without a local entity",label:"Employer of Record",value:S}:null,isLoading:o}},"useEorSubscription"),Oe=n((e,t,o)=>(t&&q(S,o)&&e.push({label:t.label,value:t.value,description:t.description,meta:{features:t.features,price:{amount:t.price.amount,currencyCode:t.currency?.code??""}},disabled:!1}),e),"addEorToFieldOptions"),wt=n((e,t,o)=>{let{data:r,isLoading:i,refetch:a}=Ee({employmentId:e,options:{queryOptions:o?.queryOptions}}),c=x(()=>r?.filter(u=>q(u.product.identifier??"",o?.excludeProducts))??[],[r,o?.excludeProducts]),g=r?r?.length<3:!1,C=r?.find(u=>u.product.identifier===P)?.eligibility_questionnaire?.is_blocking,E=(g||C)&&t?.eor_onboarding&&!o?.excludeProducts?.includes("eor"),{eorSubscription:R,isLoading:ue}=_e({enabled:E}),de=c.length>0||E&&R!==null,D=m(oe.data.schema,{},{...o,jsfModify:{...o?.jsfModify,required:de?o?.jsfModify?.required:u=>u.filter(d=>d!=="subscription")}}),V=D.fields.find(u=>u.name==="subscription");if(V){let u=c.map(b=>{let l=b.product,me=b.price.amount,pe=b.currency.code,ye=Ie[l.identifier]??"",fe=l.identifier??"",Ce=l.description??"";l.description||console.error(`[Data Integrity] Missing description for product: ${l.identifier}`,{product:l});let be={features:l.features??ie[l.identifier]??[],price:{amount:_(me),currencyCode:pe}};return{label:ye,value:fe,description:Ce,meta:be,disabled:C&&l.identifier!==O}});u.sort((b,l)=>b.label.localeCompare(l.label));let d=[];E&&(Oe(d,R,o?.excludeProducts),d.length>0&&(d[0].meta={...d[0].meta,groupSeparator:{show:!0}})),V.options=[...u,...d]}return{isLoading:i||ue,form:D,contractorSubscriptions:r,filteredContractorSubscriptions:c,refetch:a,isEligibilityQuestionnaireBlocked:C}},"useContractorSubscriptionSchemaField"),vt=n((e,t,o)=>{let{mutateAsyncOrThrow:r}=I(t),{mutateAsyncOrThrow:i}=I(e);return{mutateAsync:n(async({employmentId:a})=>{let{nationality_status:c,ir35:f,ir35_sds_file:g}=o,T={contract_document:{ir_35:f}},C={contract_document:{nationality:c}};return f?(await i({employmentId:a,payload:T}),g?r({employment_id:a,file:g,sub_type:F}):Promise.resolve()):c?i({employmentId:a,payload:C}):Promise.resolve()},"mutateAsync")}},"useUpdateUKandSaudiFields"),At=n((e,t)=>{let{data:o,isLoading:r}=ce(e,{sub_type:F},{...t,select:n(({data:c})=>c?.files?.filter(f=>f.sub_type===F),"select")}),i=o?.[0]?.id,a=ae(i);return{...a,isLoading:r||a.isLoading}},"useGetIR35File"),jt=n(({options:e,fieldValues:t})=>{let{client:o}=s();return y({queryKey:["eligibility-questionnaire"],queryFn:n(async()=>{let r=await B({client:o,query:{type:"contractor_of_record",json_schema_version:1}});if(r.error)throw new Error("Failed to fetch eligibility questionnaire");return r.data.data},"queryFn"),select:n(r=>{let i=r?.schema||{};return m(i,t,{jsfModify:e?.jsfModify})},"select"),enabled:e?.queryOptions?.enabled})},"useGetEligibilityQuestionnaire"),Qt=n(()=>{let{client:e}=s();return p({mutationFn:n(async({employmentId:t,payload:o})=>U({client:e,body:{employment_slug:t,responses:o,type:"contractor_of_record"},query:{json_schema_version:1}}),"mutationFn")})},"usePostCreateEligibilityQuestionnaire"),Ut=n(()=>{let{client:e}=s();return p({mutationFn:n(async({employmentId:t})=>z({client:e,path:{employment_id:t}}),"mutationFn")})},"usePostManageContractorCorSubscription"),Lt=n(()=>{let{client:e}=s();return p({mutationFn:n(async({employmentId:t})=>Y({client:e,path:{employment_id:t}}),"mutationFn")})},"useDeleteContractorCorSubscription"),Jt=n(()=>{let{client:e}=s();return p({mutationFn:n(async({employmentId:t,contractOrigin:o,templateType:r})=>L({client:e,path:{employment_id:t},body:{contract_origin:o,template_type:r}}),"mutationFn")})},"useSetContractOrigin"),Gt=n(({fieldValues:e,options:t})=>y({queryKey:["contract-origin-schema",t?.jsfModify],queryFn:n(async()=>m(te,e,{jsfModify:t?.jsfModify}),"queryFn"),enabled:t?.queryOptions?.enabled}),"useGetContractOriginSchema"),Kt=n(({enabled:e,jsfModify:t})=>x(()=>e?m(ne,{},{jsfModify:t}):null,[e,t]),"useGetInvoiceScheduleSchema"),Nt=n(e=>{let{client:t}=s(),{data:o,isLoading:r}=y({...Z(t,"contractor-onboarding-countries"),select:n(a=>a.data?.data?.map(c=>({label:c.name,value:c.code,eor_onboarding:c.eor_onboarding,contractor_products_available:c.contractor_products_available}))||[],"select"),enabled:e?.queryOptions?.enabled}),i=x(()=>m(W.data.schema,{},{jsfModify:X(o,e?.jsfModify)}),[o,e?.jsfModify]);return{isLoading:r,selectCountryForm:i,countries:o}},"useCountriesSchemaField"),kt=n(({options:e}={})=>{let{data:t}=h(),o=M(t)?t?.company?.id??"":"",{client:r}=s();return y({queryKey:["company-open-tasks",o],queryFn:n(()=>H({client:r,path:{company_id:o}}),"queryFn"),select:n(({data:i})=>i?.data?.actions??[],"select"),enabled:(e?.queryOptions?.enabled??!0)&&!!o})},"useCompanyOpenTasks");export{De as a,h as b,M as c,xt as d,Tt as e,he as f,Rt as g,Ee as h,Dt as i,Vt as j,Ie as k,wt as l,vt as m,At as n,jt as o,Qt as p,Ut as q,Lt as r,Jt as s,Gt as t,Kt as u,Nt as v,kt as w};
|
|
2
|
+
//# sourceMappingURL=chunk-KQ2ZXMJF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/flows/ContractorOnboarding/api.ts","../src/common/api/files.ts","../src/common/api/companies.ts","../src/common/api/identity.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport {\n CompanyAction,\n CreateContractDocument,\n getV1CompaniesCompanyIdActions,\n getV1ContractorsEmploymentsEmploymentIdContractDocumentsId,\n getV1ContractorsEmploymentsEmploymentIdContractorSubscriptions,\n ManageContractorPlusSubscriptionOperationsParams,\n postV1ContractorsEmploymentsEmploymentIdContractDocuments,\n postV1ContractorsEmploymentsEmploymentIdContractorPlusSubscription,\n postV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSign,\n SignContractDocument,\n EligibilityQuestionnaireJsonSchemaResponse,\n getV1ContractorsSchemasEligibilityQuestionnaire,\n SubmitEligibilityQuestionnaireRequest,\n postV1ContractorsEligibilityQuestionnaire,\n postV1ContractorsEmploymentsEmploymentIdContractorCorSubscription,\n postV1EmploymentsEmploymentIdContractOrigin,\n deleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscription,\n Country,\n PostV1EmploymentsEmploymentIdContractOriginData,\n} from '@/src/client';\nimport { useClient } from '@/src/context';\nimport { signatureSchema } from '@/src/flows/ContractorOnboarding/json-schemas/signature';\nimport { contractOriginSchema } from '@/src/flows/ContractorOnboarding/json-schemas/contractOrigin';\nimport { invoiceScheduleSchema } from '@/src/flows/ContractorOnboarding/json-schemas/invoiceSchedule';\nimport { selectContractorSubscriptionStepSchema } from '@/src/flows/ContractorOnboarding/json-schemas/selectContractorSubscriptionStep';\nimport {\n JSONSchemaFormResultWithFieldsets,\n FlowOptions,\n JSFModify,\n} from '@/src/flows/types';\nimport { clearBase64Data } from '@/src/lib/utils';\nimport { Client } from '@/src/client/client';\nimport { createHeadlessForm } from '@/src/common/createHeadlessForm';\nimport { useMutation, useQuery } from '@tanstack/react-query';\nimport { FieldValues } from 'react-hook-form';\nimport {\n contractorPlusProductIdentifier,\n contractorStandardProductIdentifier,\n corProductIdentifier,\n eorProductIdentifier,\n FEATURES_BY_IDENTIFIER,\n IR35_FILE_SUBTYPE,\n ProductType,\n} from '@/src/flows/ContractorOnboarding/constants';\nimport { $TSFixMe, JSFField } from '@/src/types/remoteFlows';\nimport { mutationToPromise } from '@/src/lib/mutations';\nimport {\n useDownloadFile,\n useEmploymentFiles,\n useUploadFile,\n} from '@/src/common/api/files';\nimport { convertFromCents } from '@/src/components/form/utils';\nimport { countriesOptions } from '@/src/common/api/countries';\nimport {\n buildSelectCountryJsfModify,\n selectCountryStepSchema,\n} from '@/src/common/selectCountryStep';\nimport { shouldIncludeProduct } from '@/src/flows/ContractorOnboarding/utils';\nimport { useCompanyPricingPlans, hasCompany } from '@/src/common/api/companies';\nimport { useIdentity } from '@/src/common/api/identity';\n\n/**\n * Get the contract document signature schema\n * @param fieldValues - The field values\n * @param options - The options\n * @returns The contract document signature schema\n */\nexport const useGetContractDocumentSignatureSchema = ({\n fieldValues,\n options,\n}: {\n fieldValues: FieldValues;\n options?: { queryOptions?: { enabled?: boolean }; jsfModify?: JSFModify };\n}) => {\n return useQuery({\n queryKey: [\n 'contract-document-signature',\n fieldValues.review_completed,\n options?.jsfModify,\n ],\n queryFn: async () => {\n return createHeadlessForm(signatureSchema, fieldValues, {\n jsfModify: options?.jsfModify,\n });\n },\n enabled: options?.queryOptions?.enabled,\n });\n};\n\n/**\n * Signs the contract document\n * @param employmentId - The employment ID\n * @param contractDocumentId - The contract document ID\n * @param payload - The payload\n * @returns The signed contract document\n */\nexport const useSignContractDocument = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({\n employmentId,\n contractDocumentId,\n payload,\n }: {\n employmentId: string;\n contractDocumentId: string;\n payload: SignContractDocument;\n }) => {\n return postV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSign(\n {\n client: client as Client,\n body: payload,\n path: {\n employment_id: employmentId,\n contract_document_id: contractDocumentId,\n },\n },\n );\n },\n });\n};\n\n/**\n * Get the contract document for a given employment and contract document ID\n * @param employmentId - The employment ID\n * @param contractDocumentId - The contract document ID\n * @returns The contract document\n */\nexport const useGetShowContractDocument = ({\n employmentId,\n contractDocumentId,\n options,\n}: {\n employmentId: string;\n contractDocumentId: string;\n options?: { queryOptions?: { enabled?: boolean }; jsfModify?: JSFModify };\n}) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['contract-document', employmentId, contractDocumentId],\n queryFn: async () => {\n return getV1ContractorsEmploymentsEmploymentIdContractDocumentsId({\n client: client as Client,\n path: { employment_id: employmentId, id: contractDocumentId },\n });\n },\n enabled: options?.queryOptions?.enabled,\n select: ({ data }) => {\n return {\n ...data?.data,\n contract_document: {\n ...data?.data?.contract_document,\n content: clearBase64Data(\n data?.data?.contract_document?.content as $TSFixMe,\n ),\n },\n };\n },\n });\n};\n\nexport const useHasCompanySignedContract = ({\n employmentId,\n contractDocumentId,\n options,\n}: {\n employmentId: string;\n contractDocumentId: string;\n options?: { queryOptions?: { enabled?: boolean } };\n}) => {\n const { data: documentPreviewPdf } = useGetShowContractDocument({\n employmentId,\n contractDocumentId,\n options: {\n queryOptions: {\n enabled: options?.queryOptions?.enabled,\n },\n },\n });\n\n const hasCompanySignedContract =\n documentPreviewPdf?.contract_document?.signatories?.some(\n (signatory) =>\n signatory.type === 'company' && signatory.status === 'signed',\n );\n\n return {\n hasCompanySignedContract,\n };\n};\n/**\n * Get the contractor subscriptions for the given employment id\n * @param employmentId - The employment ID\n * @returns The contractor subscriptions available\n */\nexport const useGetContractorSubscriptions = ({\n employmentId,\n options,\n}: {\n employmentId: string;\n options?: { queryOptions?: { enabled?: boolean } };\n}) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['contractor-subscriptions', employmentId],\n queryFn: async () => {\n return getV1ContractorsEmploymentsEmploymentIdContractorSubscriptions({\n client: client as Client,\n path: { employment_id: employmentId },\n });\n },\n enabled: options?.queryOptions?.enabled,\n select: ({ data }) => {\n return data?.data;\n },\n });\n};\n\n/**\n * Upgrade or downgrade contractor subscription\n */\nexport const usePostManageContractorSubscriptions = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({\n employmentId,\n payload,\n }: {\n employmentId: string;\n payload: ManageContractorPlusSubscriptionOperationsParams;\n }) => {\n return postV1ContractorsEmploymentsEmploymentIdContractorPlusSubscription(\n {\n client: client as Client,\n body: payload,\n path: {\n employment_id: employmentId,\n },\n },\n );\n },\n });\n};\n\n/**\n * Saves the contractor details data\n * @param employmentId - The employment ID\n * @param payload - The payload\n * @returns The contractor contract document\n */\nexport const useCreateContractorContractDocument = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({\n employmentId,\n payload,\n }: {\n employmentId: string;\n payload: CreateContractDocument;\n }) => {\n return postV1ContractorsEmploymentsEmploymentIdContractDocuments({\n client: client as Client,\n body: payload,\n path: {\n employment_id: employmentId,\n },\n });\n },\n });\n};\n\nexport const CONTRACT_PRODUCT_TITLES = {\n [contractorStandardProductIdentifier]: 'Contractor Management',\n [contractorPlusProductIdentifier]: 'Contractor Management Plus',\n [corProductIdentifier]: 'Contractor of Record',\n};\n\nconst useEorSubscription = (options?: { enabled?: boolean }) => {\n const { data: pricingPlans, isLoading: isLoadingPricingPlans } =\n useCompanyPricingPlans({\n enabled: options?.enabled,\n });\n\n const eorPricingPlan = pricingPlans?.find(\n (plan) => plan.product.name === 'EOR Monthly',\n );\n\n const eorSubscription = eorPricingPlan\n ? {\n product: {\n identifier: eorProductIdentifier,\n short_name: 'EOR',\n },\n currency: eorPricingPlan.price.currency,\n price: {\n amount: convertFromCents(eorPricingPlan.price.amount),\n },\n features: [\n 'Contract between Remote and employee',\n 'Remote manages onboarding, payroll, and compliance',\n 'Manages taxes, benefits, and time-off tracking',\n 'Handles contracts, transfers, and terminations',\n ],\n description: 'Enables hiring in countries without a local entity',\n label: 'Employer of Record',\n value: eorProductIdentifier,\n }\n : null;\n\n return { eorSubscription, isLoading: isLoadingPricingPlans };\n};\n\ntype SelectedCountry =\n | (Pick<Country, 'eor_onboarding' | 'contractor_products_available'> & {\n label: string;\n })\n | undefined;\n\nconst addEorToFieldOptions = (\n fieldOptions: $TSFixMe[],\n eorSubscription: ReturnType<typeof useEorSubscription>['eorSubscription'],\n excludeProducts?: ProductType[],\n) => {\n if (\n eorSubscription &&\n shouldIncludeProduct(eorProductIdentifier, excludeProducts)\n ) {\n fieldOptions.push({\n label: eorSubscription.label,\n value: eorSubscription.value,\n description: eorSubscription.description,\n meta: {\n features: eorSubscription.features,\n price: {\n amount: eorSubscription.price.amount,\n currencyCode: eorSubscription.currency?.code ?? '',\n },\n },\n disabled: false,\n });\n }\n return fieldOptions;\n};\n\nexport const useContractorSubscriptionSchemaField = (\n employmentId: string,\n selectedCountry: SelectedCountry,\n options?: FlowOptions & {\n queryOptions?: { enabled?: boolean };\n excludeProducts?: ProductType[];\n },\n) => {\n const {\n data: contractorSubscriptions,\n isLoading,\n refetch,\n } = useGetContractorSubscriptions({\n employmentId: employmentId,\n options: {\n queryOptions: options?.queryOptions,\n },\n });\n\n const filteredContractorSubscriptions = useMemo(\n () =>\n contractorSubscriptions?.filter((subscription) =>\n shouldIncludeProduct(\n subscription.product.identifier ?? '',\n options?.excludeProducts,\n ),\n ) ?? [],\n [contractorSubscriptions, options?.excludeProducts],\n );\n\n // maximum number of subscriptions\n const MAXIMUM_CONTRACTOR_SUBSCRIPTIONS_COUNT = 3;\n\n const isMissingSubscriptions = contractorSubscriptions\n ? contractorSubscriptions?.length < MAXIMUM_CONTRACTOR_SUBSCRIPTIONS_COUNT\n : false;\n\n const corSubscription = contractorSubscriptions?.find(\n (subscription) => subscription.product.identifier === corProductIdentifier,\n );\n\n const isEligibilityQuestionnaireBlocked =\n corSubscription?.eligibility_questionnaire?.is_blocking;\n\n const showEorSubscription =\n (isMissingSubscriptions || isEligibilityQuestionnaireBlocked) &&\n selectedCountry?.eor_onboarding &&\n !options?.excludeProducts?.includes('eor');\n\n const { eorSubscription, isLoading: isLoadingEorSubscription } =\n useEorSubscription({\n enabled: showEorSubscription,\n });\n\n const hasAvailableOptions =\n filteredContractorSubscriptions.length > 0 ||\n (showEorSubscription && eorSubscription !== null);\n\n const form = createHeadlessForm(\n selectContractorSubscriptionStepSchema.data.schema,\n {},\n {\n ...options,\n jsfModify: {\n ...options?.jsfModify,\n // If no filtered subscriptions are available, make the subscription field optional\n required: hasAvailableOptions\n ? options?.jsfModify?.required\n : (existingRequired: string[]) =>\n existingRequired.filter(\n (fieldName: string) => fieldName !== 'subscription',\n ),\n },\n },\n );\n\n const field: JSFField | undefined = form.fields.find(\n (field) => field.name === 'subscription',\n ) as JSFField | undefined;\n\n if (field) {\n // Start with contractor management options\n const contractorOptions = filteredContractorSubscriptions.map((opts) => {\n const product = opts.product;\n const price = opts.price.amount;\n const currencyCode = opts.currency.code;\n const title =\n CONTRACT_PRODUCT_TITLES[\n product.identifier as keyof typeof CONTRACT_PRODUCT_TITLES\n ] ?? '';\n const label = title;\n const value = product.identifier ?? '';\n const description = product.description ?? '';\n\n if (!product.description) {\n console.error(\n `[Data Integrity] Missing description for product: ${product.identifier}`,\n { product },\n );\n }\n\n const features =\n product.features ??\n FEATURES_BY_IDENTIFIER[\n product.identifier as keyof typeof FEATURES_BY_IDENTIFIER\n ] ??\n [];\n const meta = {\n features,\n price: {\n amount: convertFromCents(price),\n currencyCode: currencyCode,\n },\n };\n return {\n label,\n value,\n description,\n meta,\n disabled:\n isEligibilityQuestionnaireBlocked &&\n product.identifier !== contractorStandardProductIdentifier,\n };\n });\n\n // Sort contractor options\n contractorOptions.sort((a, b) => a.label.localeCompare(b.label));\n\n // Build otherSubscriptions (EOR) with separator metadata\n const otherOptions: $TSFixMe[] = [];\n if (showEorSubscription) {\n addEorToFieldOptions(\n otherOptions as unknown as $TSFixMe[],\n eorSubscription,\n options?.excludeProducts,\n );\n\n // Add separator metadata to first \"other\" option\n // only the first option to avoid problems when iterating over the options\n if (otherOptions.length > 0) {\n otherOptions[0].meta = {\n ...otherOptions[0].meta,\n groupSeparator: {\n show: true,\n },\n };\n }\n }\n\n // Combine all options into the single field\n field.options = [...contractorOptions, ...otherOptions];\n }\n\n return {\n isLoading: isLoading || isLoadingEorSubscription,\n form,\n contractorSubscriptions,\n filteredContractorSubscriptions,\n refetch,\n isEligibilityQuestionnaireBlocked,\n };\n};\n\nexport const useUpdateUKandSaudiFields = (\n createContractorContractDocumentMutation: ReturnType<\n typeof useCreateContractorContractDocument\n >,\n uploadFileMutation: ReturnType<typeof useUploadFile>,\n parsedValues: FieldValues,\n) => {\n const { mutateAsyncOrThrow: uploadFileMutationAsync } =\n mutationToPromise(uploadFileMutation);\n const { mutateAsyncOrThrow: createContractorContractDocumentMutationAsync } =\n mutationToPromise(createContractorContractDocumentMutation);\n\n return {\n mutateAsync: async ({ employmentId }: { employmentId: string }) => {\n const {\n nationality_status: nationalityStatus,\n ir35: ir35Status,\n ir35_sds_file: ir35SdsFile,\n } = parsedValues;\n const ir35ContractDetailsPayload = {\n contract_document: {\n ir_35: ir35Status,\n },\n };\n const nationalityContractDetailsPayload = {\n contract_document: {\n nationality: nationalityStatus,\n },\n };\n if (ir35Status) {\n await createContractorContractDocumentMutationAsync({\n employmentId: employmentId,\n payload: ir35ContractDetailsPayload,\n });\n\n if (ir35SdsFile) {\n return uploadFileMutationAsync({\n employment_id: employmentId,\n file: ir35SdsFile,\n sub_type: IR35_FILE_SUBTYPE,\n });\n }\n return Promise.resolve();\n }\n // nationality status is sent for the countries SAU, KWT, OMN, QAT, BHR\n if (nationalityStatus) {\n return createContractorContractDocumentMutationAsync({\n employmentId: employmentId,\n payload: nationalityContractDetailsPayload,\n });\n }\n\n return Promise.resolve();\n },\n };\n};\n\nexport const useGetIR35File = (\n employmentId: string,\n options?: { enabled?: boolean },\n) => {\n const { data: ir35Files, isLoading: isLoadingFiles } = useEmploymentFiles(\n employmentId,\n {\n sub_type: IR35_FILE_SUBTYPE,\n },\n {\n ...options,\n select: ({ data }) =>\n data?.files?.filter((file) => file.sub_type === IR35_FILE_SUBTYPE),\n },\n );\n const id = ir35Files?.[0]?.id;\n\n const downloadQuery = useDownloadFile(id as string);\n\n return {\n ...downloadQuery,\n isLoading: isLoadingFiles || downloadQuery.isLoading,\n };\n};\n\nexport const useGetEligibilityQuestionnaire = ({\n options,\n fieldValues,\n}: {\n options?: FlowOptions & { queryOptions?: { enabled?: boolean } };\n fieldValues: FieldValues;\n}) => {\n const { client } = useClient();\n return useQuery<\n EligibilityQuestionnaireJsonSchemaResponse['data'],\n Error,\n JSONSchemaFormResultWithFieldsets\n >({\n queryKey: ['eligibility-questionnaire'],\n queryFn: async (): Promise<\n EligibilityQuestionnaireJsonSchemaResponse['data']\n > => {\n const response = await getV1ContractorsSchemasEligibilityQuestionnaire({\n client: client as Client,\n query: {\n type: 'contractor_of_record',\n json_schema_version: 1,\n },\n });\n\n // Extract the data from the response wrapper\n if (response.error) {\n throw new Error('Failed to fetch eligibility questionnaire');\n }\n\n return response.data\n .data as EligibilityQuestionnaireJsonSchemaResponse['data'];\n },\n select: (data: EligibilityQuestionnaireJsonSchemaResponse['data']) => {\n const schema = data?.schema || {};\n return createHeadlessForm(schema, fieldValues, {\n jsfModify: options?.jsfModify,\n });\n },\n enabled: options?.queryOptions?.enabled,\n });\n};\n\nexport const usePostCreateEligibilityQuestionnaire = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({\n employmentId,\n payload,\n }: {\n employmentId: string;\n payload: SubmitEligibilityQuestionnaireRequest['responses'];\n }) => {\n return postV1ContractorsEligibilityQuestionnaire({\n client: client as Client,\n body: {\n employment_slug: employmentId,\n responses: payload,\n type: 'contractor_of_record',\n },\n query: {\n json_schema_version: 1, // TODO: json_schema_version should be dynamic but fixed for now\n },\n });\n },\n });\n};\n\nexport const usePostManageContractorCorSubscription = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({ employmentId }: { employmentId: string }) => {\n return postV1ContractorsEmploymentsEmploymentIdContractorCorSubscription({\n client: client as Client,\n path: {\n employment_id: employmentId,\n },\n });\n },\n });\n};\n\nexport const useDeleteContractorCorSubscription = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({ employmentId }: { employmentId: string }) => {\n return deleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscription(\n {\n client: client as Client,\n path: { employment_id: employmentId },\n },\n );\n },\n });\n};\n\nexport const useSetContractOrigin = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: async ({\n employmentId,\n contractOrigin,\n templateType,\n }: {\n employmentId: string;\n contractOrigin: PostV1EmploymentsEmploymentIdContractOriginData['body']['contract_origin'];\n templateType: PostV1EmploymentsEmploymentIdContractOriginData['body']['template_type'];\n }) => {\n return postV1EmploymentsEmploymentIdContractOrigin({\n client: client as Client,\n path: {\n employment_id: employmentId,\n },\n body: {\n contract_origin: contractOrigin,\n template_type: templateType,\n },\n });\n },\n });\n};\n\nexport const useGetContractOriginSchema = ({\n fieldValues,\n options,\n}: {\n fieldValues: FieldValues;\n options?: { queryOptions?: { enabled?: boolean }; jsfModify?: JSFModify };\n}) => {\n return useQuery({\n queryKey: ['contract-origin-schema', options?.jsfModify],\n queryFn: async () => {\n return createHeadlessForm(contractOriginSchema, fieldValues, {\n jsfModify: options?.jsfModify,\n });\n },\n enabled: options?.queryOptions?.enabled,\n });\n};\n\n// Invoice-schedule API hooks are shared with the standalone InvoiceSchedule flow and live in\n// src/common/invoice-schedules. Re-exported here so existing imports keep resolving.\nexport {\n invoiceSchedulesOptions,\n useCreateInvoiceSchedule,\n useGetCreateInvoiceScheduleSchema,\n useGetExistingInvoiceSchedule,\n usePreviewContractorInvoice,\n useSkipInvoiceSchedule,\n useUpdateInvoiceSchedule,\n} from '@/src/common/invoice-schedules/api';\n\nexport const useGetInvoiceScheduleSchema = ({\n enabled,\n jsfModify,\n}: {\n enabled?: boolean;\n jsfModify?: JSFModify;\n}) => {\n return useMemo(() => {\n if (!enabled) return null;\n return createHeadlessForm(\n invoiceScheduleSchema,\n {},\n {\n jsfModify,\n },\n );\n }, [enabled, jsfModify]);\n};\n\nexport const useCountriesSchemaField = (\n options?: Omit<FlowOptions, 'jsonSchemaVersion'> & {\n queryOptions?: { enabled?: boolean };\n },\n) => {\n const { client } = useClient();\n const { data: countries, isLoading } = useQuery({\n ...countriesOptions(client as Client, 'contractor-onboarding-countries'),\n select: (response) => {\n return (\n response.data?.data?.map((country) => {\n return {\n label: country.name,\n value: country.code,\n eor_onboarding: country.eor_onboarding,\n contractor_products_available:\n country.contractor_products_available,\n };\n }) || []\n );\n },\n enabled: options?.queryOptions?.enabled,\n });\n\n const selectCountryForm = useMemo(\n () =>\n createHeadlessForm(\n selectCountryStepSchema.data.schema,\n {},\n {\n jsfModify: buildSelectCountryJsfModify(countries, options?.jsfModify),\n },\n ),\n [countries, options?.jsfModify],\n );\n\n return {\n isLoading,\n selectCountryForm,\n countries,\n };\n};\n\nexport const useCompanyOpenTasks = ({\n options,\n}: {\n options?: { queryOptions?: { enabled?: boolean } };\n} = {}) => {\n const { data: identity } = useIdentity();\n const companyId = hasCompany(identity) ? (identity?.company?.id ?? '') : '';\n const { client } = useClient();\n\n return useQuery({\n queryKey: ['company-open-tasks', companyId],\n queryFn: () =>\n getV1CompaniesCompanyIdActions({\n client: client as Client,\n path: { company_id: companyId },\n }),\n select: ({ data }) => data?.data?.actions ?? ([] as CompanyAction[]),\n enabled: (options?.queryOptions?.enabled ?? true) && !!companyId,\n });\n};\n","import { useMutation, useQuery, UseQueryOptions } from '@tanstack/react-query';\nimport { Client } from '@/src/client/client';\nimport {\n getV1EmploymentsEmploymentIdFiles,\n getV1FilesId,\n postV1Documents,\n} from '@/src/client/sdk.gen';\nimport {\n GetV1EmploymentsEmploymentIdFilesData,\n GetV1EmploymentsEmploymentIdFilesErrors,\n File as ApiFile,\n ListFilesResponse,\n PostV1DocumentsData,\n} from '@/src/client/types.gen';\nimport { useClient } from '@/src/context';\n\n/**\n * Hook to upload a file associated with a specified employment.\n * @returns A mutation result for uploading employee files.\n */\nexport const useUploadFile = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: (params: PostV1DocumentsData['body']) => {\n return postV1Documents({\n client: client as Client,\n body: params,\n headers: {\n Authorization: ``,\n },\n });\n },\n });\n};\n\n/**\n * Hook to download a file by its ID.\n * @param id - The ID of the file to download.\n * @returns A query result containing the file data.\n */\nexport const useDownloadFile = (id: string) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['download-file', id],\n queryFn: async () => {\n const result = await getV1FilesId({\n client: client as Client,\n path: { id: id },\n });\n\n if (result.error) {\n throw result.error;\n }\n\n return result.data;\n },\n select: ({ data }) => data?.file,\n enabled: !!id,\n });\n};\n\n/**\n * Hook to retrieve files associated with a specific employment.\n * @param employmentId - The ID of the employment to retrieve files for.\n * @param queryParams - The query parameters to filter the files.\n * @param queryOptions - Optional TanStack Query options to customize the query behavior.\n * @returns A query result containing the employment files.\n */\nexport const useEmploymentFiles = (\n employmentId: string,\n queryParams: GetV1EmploymentsEmploymentIdFilesData['query'],\n queryOptions?: Omit<\n UseQueryOptions<\n ListFilesResponse,\n GetV1EmploymentsEmploymentIdFilesErrors,\n ApiFile[] | undefined,\n unknown[]\n >,\n 'queryKey' | 'queryFn'\n >,\n) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['employment-files', employmentId],\n queryFn: async () => {\n const result = await getV1EmploymentsEmploymentIdFiles({\n client: client as Client,\n path: { employment_id: employmentId },\n query: queryParams,\n });\n\n if (result.error) {\n throw result.error;\n }\n\n return result.data;\n },\n ...queryOptions,\n });\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { useClient } from '@/src/context';\nimport {\n getV1CompaniesCompanyIdPricingPlans,\n IdentityCurrentResponse,\n} from '@/src/client';\nimport { Client } from '@/src/client/client';\nimport { useIdentity } from '@/src/common/api/identity';\n\nexport function hasCompany(\n identity: IdentityCurrentResponse['data'] | undefined,\n): identity is Extract<\n IdentityCurrentResponse['data'],\n { company: { id: string } }\n> {\n return identity != null && 'company' in identity;\n}\n\nexport const useCompanyPricingPlans = (\n queryOptions: { enabled?: boolean } = { enabled: true },\n) => {\n const { data: identity } = useIdentity();\n const companyId = hasCompany(identity) ? (identity?.company?.id ?? '') : '';\n const { client } = useClient();\n return useQuery({\n queryKey: ['pricing-plans', companyId],\n queryFn: () =>\n getV1CompaniesCompanyIdPricingPlans({\n client: client as Client,\n path: { company_id: companyId },\n }),\n select: (data) => data.data?.data?.pricing_plans,\n enabled: Boolean(queryOptions?.enabled) && !!companyId,\n });\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { getV1IdentityCurrent } from '@/src/client';\nimport { useClient } from '@/src/context';\nimport { Client } from '@/src/client/client';\n\nexport const useIdentity = () => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['identity'],\n queryFn: () =>\n getV1IdentityCurrent({\n client: client as Client,\n headers: { Authorization: `` },\n }),\n select: (data) => data.data?.data,\n });\n};\n"],"mappings":"yrBAAA,OAAS,WAAAA,MAAe,QAmCxB,OAAS,eAAAC,EAAa,YAAAC,MAAgB,wBCnCtC,OAAS,eAAAC,GAAa,YAAAC,OAAiC,wBAoBhD,IAAMC,GAAgBC,EAAA,IAAM,CACjC,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAU,EAC7B,OAAOC,GAAY,CACjB,WAAYH,EAACI,GACJC,EAAgB,CACrB,OAAQJ,EACR,KAAMG,EACN,QAAS,CACP,cAAe,EACjB,CACF,CAAC,EAPS,aASd,CAAC,CACH,EAb6B,iBAoBhBE,GAAkBN,EAACO,GAAe,CAC7C,GAAM,CAAE,OAAAN,CAAO,EAAIC,EAAU,EAC7B,OAAOM,GAAS,CACd,SAAU,CAAC,gBAAiBD,CAAE,EAC9B,QAASP,EAAA,SAAY,CACnB,IAAMS,EAAS,MAAMC,EAAa,CAChC,OAAQT,EACR,KAAM,CAAE,GAAIM,CAAG,CACjB,CAAC,EAED,GAAIE,EAAO,MACT,MAAMA,EAAO,MAGf,OAAOA,EAAO,IAChB,EAXS,WAYT,OAAQT,EAAA,CAAC,CAAE,KAAAW,CAAK,IAAMA,GAAM,KAApB,UACR,QAAS,CAAC,CAACJ,CACb,CAAC,CACH,EAnB+B,mBA4BlBK,GAAqBZ,EAAA,CAChCa,EACAC,EACAC,IASG,CACH,GAAM,CAAE,OAAAd,CAAO,EAAIC,EAAU,EAC7B,OAAOM,GAAS,CACd,SAAU,CAAC,mBAAoBK,CAAY,EAC3C,QAASb,EAAA,SAAY,CACnB,IAAMS,EAAS,MAAMO,EAAkC,CACrD,OAAQf,EACR,KAAM,CAAE,cAAeY,CAAa,EACpC,MAAOC,CACT,CAAC,EAED,GAAIL,EAAO,MACT,MAAMA,EAAO,MAGf,OAAOA,EAAO,IAChB,EAZS,WAaT,GAAGM,CACL,CAAC,CACH,EA/BkC,sBCpElC,OAAS,YAAAE,OAAgB,wBCAzB,OAAS,YAAAC,OAAgB,wBAKlB,IAAMC,EAAcC,EAAA,IAAM,CAC/B,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAU,EAC7B,OAAOC,GAAS,CACd,SAAU,CAAC,UAAU,EACrB,QAASH,EAAA,IACPI,EAAqB,CACnB,OAAQH,EACR,QAAS,CAAE,cAAe,EAAG,CAC/B,CAAC,EAJM,WAKT,OAAQD,EAACK,GAASA,EAAK,MAAM,KAArB,SACV,CAAC,CACH,EAX2B,eDIpB,SAASC,EACdC,EAIA,CACA,OAAOA,GAAY,MAAQ,YAAaA,CAC1C,CAPgBC,EAAAF,EAAA,cAST,IAAMG,GAAyBD,EAAA,CACpCE,EAAsC,CAAE,QAAS,EAAK,IACnD,CACH,GAAM,CAAE,KAAMH,CAAS,EAAII,EAAY,EACjCC,EAAYN,EAAWC,CAAQ,EAAKA,GAAU,SAAS,IAAM,GAAM,GACnE,CAAE,OAAAM,CAAO,EAAIC,EAAU,EAC7B,OAAOC,GAAS,CACd,SAAU,CAAC,gBAAiBH,CAAS,EACrC,QAASJ,EAAA,IACPQ,EAAoC,CAClC,OAAQH,EACR,KAAM,CAAE,WAAYD,CAAU,CAChC,CAAC,EAJM,WAKT,OAAQJ,EAACS,GAASA,EAAK,MAAM,MAAM,cAA3B,UACR,QAAS,EAAQP,GAAc,SAAY,CAAC,CAACE,CAC/C,CAAC,CACH,EAhBsC,0BFmD/B,IAAMM,GAAwCC,EAAA,CAAC,CACpD,YAAAC,EACA,QAAAC,CACF,IAISC,EAAS,CACd,SAAU,CACR,8BACAF,EAAY,iBACZC,GAAS,SACX,EACA,QAASF,EAAA,SACAI,EAAmBC,GAAiBJ,EAAa,CACtD,UAAWC,GAAS,SACtB,CAAC,EAHM,WAKT,QAASA,GAAS,cAAc,OAClC,CAAC,EAnBkD,yCA6BxCI,GAA0BN,EAAA,IAAM,CAC3C,GAAM,CAAE,OAAAO,CAAO,EAAIC,EAAU,EAC7B,OAAOC,EAAY,CACjB,WAAYT,EAAA,MAAO,CACjB,aAAAU,EACA,mBAAAC,EACA,QAAAC,CACF,IAKSC,EACL,CACE,OAAQN,EACR,KAAMK,EACN,KAAM,CACJ,cAAeF,EACf,qBAAsBC,CACxB,CACF,CACF,EAlBU,aAoBd,CAAC,CACH,EAxBuC,2BAgC1BG,GAA6Bd,EAAA,CAAC,CACzC,aAAAU,EACA,mBAAAC,EACA,QAAAT,CACF,IAIM,CACJ,GAAM,CAAE,OAAAK,CAAO,EAAIC,EAAU,EAC7B,OAAOL,EAAS,CACd,SAAU,CAAC,oBAAqBO,EAAcC,CAAkB,EAChE,QAASX,EAAA,SACAe,EAA2D,CAChE,OAAQR,EACR,KAAM,CAAE,cAAeG,EAAc,GAAIC,CAAmB,CAC9D,CAAC,EAJM,WAMT,QAAST,GAAS,cAAc,QAChC,OAAQF,EAAA,CAAC,CAAE,KAAAgB,CAAK,KACP,CACL,GAAGA,GAAM,KACT,kBAAmB,CACjB,GAAGA,GAAM,MAAM,kBACf,QAASC,EACPD,GAAM,MAAM,mBAAmB,OACjC,CACF,CACF,GATM,SAWV,CAAC,CACH,EA/B0C,8BAiC7BE,GAA8BlB,EAAA,CAAC,CAC1C,aAAAU,EACA,mBAAAC,EACA,QAAAT,CACF,IAIM,CACJ,GAAM,CAAE,KAAMiB,CAAmB,EAAIL,GAA2B,CAC9D,aAAAJ,EACA,mBAAAC,EACA,QAAS,CACP,aAAc,CACZ,QAAST,GAAS,cAAc,OAClC,CACF,CACF,CAAC,EAQD,MAAO,CACL,yBANAiB,GAAoB,mBAAmB,aAAa,KACjDC,GACCA,EAAU,OAAS,WAAaA,EAAU,SAAW,QACzD,CAIF,CACF,EA5B2C,+BAkC9BC,GAAgCrB,EAAA,CAAC,CAC5C,aAAAU,EACA,QAAAR,CACF,IAGM,CACJ,GAAM,CAAE,OAAAK,CAAO,EAAIC,EAAU,EAC7B,OAAOL,EAAS,CACd,SAAU,CAAC,2BAA4BO,CAAY,EACnD,QAASV,EAAA,SACAsB,EAA+D,CACpE,OAAQf,EACR,KAAM,CAAE,cAAeG,CAAa,CACtC,CAAC,EAJM,WAMT,QAASR,GAAS,cAAc,QAChC,OAAQF,EAAA,CAAC,CAAE,KAAAgB,CAAK,IACPA,GAAM,KADP,SAGV,CAAC,CACH,EArB6C,iCA0BhCO,GAAuCvB,EAAA,IAAM,CACxD,GAAM,CAAE,OAAAO,CAAO,EAAIC,EAAU,EAC7B,OAAOC,EAAY,CACjB,WAAYT,EAAA,MAAO,CACjB,aAAAU,EACA,QAAAE,CACF,IAISY,EACL,CACE,OAAQjB,EACR,KAAMK,EACN,KAAM,CACJ,cAAeF,CACjB,CACF,CACF,EAfU,aAiBd,CAAC,CACH,EArBoD,wCA6BvCe,GAAsCzB,EAAA,IAAM,CACvD,GAAM,CAAE,OAAAO,CAAO,EAAIC,EAAU,EAC7B,OAAOC,EAAY,CACjB,WAAYT,EAAA,MAAO,CACjB,aAAAU,EACA,QAAAE,CACF,IAISc,EAA0D,CAC/D,OAAQnB,EACR,KAAMK,EACN,KAAM,CACJ,cAAeF,CACjB,CACF,CAAC,EAbS,aAed,CAAC,CACH,EAnBmD,uCAqBtCiB,GAA0B,CACrC,CAACC,CAAmC,EAAG,wBACvC,CAACC,EAA+B,EAAG,6BACnC,CAACC,CAAoB,EAAG,sBAC1B,EAEMC,GAAqB/B,EAACE,GAAoC,CAC9D,GAAM,CAAE,KAAM8B,EAAc,UAAWC,CAAsB,EAC3DC,GAAuB,CACrB,QAAShC,GAAS,OACpB,CAAC,EAEGiC,EAAiBH,GAAc,KAClCI,GAASA,EAAK,QAAQ,OAAS,aAClC,EAwBA,MAAO,CAAE,gBAtBeD,EACpB,CACE,QAAS,CACP,WAAYE,EACZ,WAAY,KACd,EACA,SAAUF,EAAe,MAAM,SAC/B,MAAO,CACL,OAAQG,EAAiBH,EAAe,MAAM,MAAM,CACtD,EACA,SAAU,CACR,uCACA,qDACA,iDACA,gDACF,EACA,YAAa,qDACb,MAAO,qBACP,MAAOE,CACT,EACA,KAEsB,UAAWJ,CAAsB,CAC7D,EAjC2B,sBAyCrBM,GAAuBvC,EAAA,CAC3BwC,EACAC,EACAC,KAGED,GACAE,EAAqBN,EAAsBK,CAAe,GAE1DF,EAAa,KAAK,CAChB,MAAOC,EAAgB,MACvB,MAAOA,EAAgB,MACvB,YAAaA,EAAgB,YAC7B,KAAM,CACJ,SAAUA,EAAgB,SAC1B,MAAO,CACL,OAAQA,EAAgB,MAAM,OAC9B,aAAcA,EAAgB,UAAU,MAAQ,EAClD,CACF,EACA,SAAU,EACZ,CAAC,EAEID,GAvBoB,wBA0BhBI,GAAuC5C,EAAA,CAClDU,EACAmC,EACA3C,IAIG,CACH,GAAM,CACJ,KAAM4C,EACN,UAAAC,EACA,QAAAC,CACF,EAAI3B,GAA8B,CAChC,aAAcX,EACd,QAAS,CACP,aAAcR,GAAS,YACzB,CACF,CAAC,EAEK+C,EAAkCC,EACtC,IACEJ,GAAyB,OAAQK,GAC/BR,EACEQ,EAAa,QAAQ,YAAc,GACnCjD,GAAS,eACX,CACF,GAAK,CAAC,EACR,CAAC4C,EAAyB5C,GAAS,eAAe,CACpD,EAKMkD,EAAyBN,EAC3BA,GAAyB,OAHkB,EAI3C,GAMEO,EAJkBP,GAAyB,KAC9CK,GAAiBA,EAAa,QAAQ,aAAerB,CACxD,GAGmB,2BAA2B,YAExCwB,GACHF,GAA0BC,IAC3BR,GAAiB,gBACjB,CAAC3C,GAAS,iBAAiB,SAAS,KAAK,EAErC,CAAE,gBAAAuC,EAAiB,UAAWc,EAAyB,EAC3DxB,GAAmB,CACjB,QAASuB,CACX,CAAC,EAEGE,GACJP,EAAgC,OAAS,GACxCK,GAAuBb,IAAoB,KAExCgB,EAAOrD,EACXsD,GAAuC,KAAK,OAC5C,CAAC,EACD,CACE,GAAGxD,EACH,UAAW,CACT,GAAGA,GAAS,UAEZ,SAAUsD,GACNtD,GAAS,WAAW,SACnByD,GACCA,EAAiB,OACdC,GAAsBA,IAAc,cACvC,CACR,CACF,CACF,EAEMC,EAA8BJ,EAAK,OAAO,KAC7CI,GAAUA,EAAM,OAAS,cAC5B,EAEA,GAAIA,EAAO,CAET,IAAMC,EAAoBb,EAAgC,IAAKc,GAAS,CACtE,IAAMC,EAAUD,EAAK,QACfE,GAAQF,EAAK,MAAM,OACnBG,GAAeH,EAAK,SAAS,KAK7BI,GAHJxC,GACEqC,EAAQ,UACV,GAAK,GAEDI,GAAQJ,EAAQ,YAAc,GAC9BK,GAAcL,EAAQ,aAAe,GAEtCA,EAAQ,aACX,QAAQ,MACN,qDAAqDA,EAAQ,UAAU,GACvE,CAAE,QAAAA,CAAQ,CACZ,EASF,IAAMM,GAAO,CACX,SANAN,EAAQ,UACRO,GACEP,EAAQ,UACV,GACA,CAAC,EAGD,MAAO,CACL,OAAQ1B,EAAiB2B,EAAK,EAC9B,aAAcC,EAChB,CACF,EACA,MAAO,CACL,MAAAC,GACA,MAAAC,GACA,YAAAC,GACA,KAAAC,GACA,SACEjB,GACAW,EAAQ,aAAepC,CAC3B,CACF,CAAC,EAGDkC,EAAkB,KAAK,CAACU,EAAGC,IAAMD,EAAE,MAAM,cAAcC,EAAE,KAAK,CAAC,EAG/D,IAAMC,EAA2B,CAAC,EAC9BpB,IACFf,GACEmC,EACAjC,EACAvC,GAAS,eACX,EAIIwE,EAAa,OAAS,IACxBA,EAAa,CAAC,EAAE,KAAO,CACrB,GAAGA,EAAa,CAAC,EAAE,KACnB,eAAgB,CACd,KAAM,EACR,CACF,IAKJb,EAAM,QAAU,CAAC,GAAGC,EAAmB,GAAGY,CAAY,CACxD,CAEA,MAAO,CACL,UAAW3B,GAAaQ,GACxB,KAAAE,EACA,wBAAAX,EACA,gCAAAG,EACA,QAAAD,EACA,kCAAAK,CACF,CACF,EAjKoD,wCAmKvCsB,GAA4B3E,EAAA,CACvC4E,EAGAC,EACAC,IACG,CACH,GAAM,CAAE,mBAAoBC,CAAwB,EAClDC,EAAkBH,CAAkB,EAChC,CAAE,mBAAoBI,CAA8C,EACxED,EAAkBJ,CAAwC,EAE5D,MAAO,CACL,YAAa5E,EAAA,MAAO,CAAE,aAAAU,CAAa,IAAgC,CACjE,GAAM,CACJ,mBAAoBwE,EACpB,KAAMC,EACN,cAAeC,CACjB,EAAIN,EACEO,EAA6B,CACjC,kBAAmB,CACjB,MAAOF,CACT,CACF,EACMG,EAAoC,CACxC,kBAAmB,CACjB,YAAaJ,CACf,CACF,EACA,OAAIC,GACF,MAAMF,EAA8C,CAClD,aAAcvE,EACd,QAAS2E,CACX,CAAC,EAEGD,EACKL,EAAwB,CAC7B,cAAerE,EACf,KAAM0E,EACN,SAAUG,CACZ,CAAC,EAEI,QAAQ,QAAQ,GAGrBL,EACKD,EAA8C,CACnD,aAAcvE,EACd,QAAS4E,CACX,CAAC,EAGI,QAAQ,QAAQ,CACzB,EAxCa,cAyCf,CACF,EAvDyC,6BAyD5BE,GAAiBxF,EAAA,CAC5BU,EACAR,IACG,CACH,GAAM,CAAE,KAAMuF,EAAW,UAAWC,CAAe,EAAIC,GACrDjF,EACA,CACE,SAAU6E,CACZ,EACA,CACE,GAAGrF,EACH,OAAQF,EAAA,CAAC,CAAE,KAAAgB,CAAK,IACdA,GAAM,OAAO,OAAQ4E,GAASA,EAAK,WAAaL,CAAiB,EAD3D,SAEV,CACF,EACMM,EAAKJ,IAAY,CAAC,GAAG,GAErBK,EAAgBC,GAAgBF,CAAY,EAElD,MAAO,CACL,GAAGC,EACH,UAAWJ,GAAkBI,EAAc,SAC7C,CACF,EAvB8B,kBAyBjBE,GAAiChG,EAAA,CAAC,CAC7C,QAAAE,EACA,YAAAD,CACF,IAGM,CACJ,GAAM,CAAE,OAAAM,CAAO,EAAIC,EAAU,EAC7B,OAAOL,EAIL,CACA,SAAU,CAAC,2BAA2B,EACtC,QAASH,EAAA,SAEJ,CACH,IAAMiG,EAAW,MAAMC,EAAgD,CACrE,OAAQ3F,EACR,MAAO,CACL,KAAM,uBACN,oBAAqB,CACvB,CACF,CAAC,EAGD,GAAI0F,EAAS,MACX,MAAM,IAAI,MAAM,2CAA2C,EAG7D,OAAOA,EAAS,KACb,IACL,EAlBS,WAmBT,OAAQjG,EAACgB,GAA6D,CACpE,IAAMmF,EAASnF,GAAM,QAAU,CAAC,EAChC,OAAOZ,EAAmB+F,EAAQlG,EAAa,CAC7C,UAAWC,GAAS,SACtB,CAAC,CACH,EALQ,UAMR,QAASA,GAAS,cAAc,OAClC,CAAC,CACH,EAzC8C,kCA2CjCkG,GAAwCpG,EAAA,IAAM,CACzD,GAAM,CAAE,OAAAO,CAAO,EAAIC,EAAU,EAC7B,OAAOC,EAAY,CACjB,WAAYT,EAAA,MAAO,CACjB,aAAAU,EACA,QAAAE,CACF,IAISyF,EAA0C,CAC/C,OAAQ9F,EACR,KAAM,CACJ,gBAAiBG,EACjB,UAAWE,EACX,KAAM,sBACR,EACA,MAAO,CACL,oBAAqB,CACvB,CACF,CAAC,EAjBS,aAmBd,CAAC,CACH,EAvBqD,yCAyBxC0F,GAAyCtG,EAAA,IAAM,CAC1D,GAAM,CAAE,OAAAO,CAAO,EAAIC,EAAU,EAC7B,OAAOC,EAAY,CACjB,WAAYT,EAAA,MAAO,CAAE,aAAAU,CAAa,IACzB6F,EAAkE,CACvE,OAAQhG,EACR,KAAM,CACJ,cAAeG,CACjB,CACF,CAAC,EANS,aAQd,CAAC,CACH,EAZsD,0CAczC8F,GAAqCxG,EAAA,IAAM,CACtD,GAAM,CAAE,OAAAO,CAAO,EAAIC,EAAU,EAC7B,OAAOC,EAAY,CACjB,WAAYT,EAAA,MAAO,CAAE,aAAAU,CAAa,IACzB+F,EACL,CACE,OAAQlG,EACR,KAAM,CAAE,cAAeG,CAAa,CACtC,CACF,EANU,aAQd,CAAC,CACH,EAZkD,sCAcrCgG,GAAuB1G,EAAA,IAAM,CACxC,GAAM,CAAE,OAAAO,CAAO,EAAIC,EAAU,EAC7B,OAAOC,EAAY,CACjB,WAAYT,EAAA,MAAO,CACjB,aAAAU,EACA,eAAAiG,EACA,aAAAC,CACF,IAKSC,EAA4C,CACjD,OAAQtG,EACR,KAAM,CACJ,cAAeG,CACjB,EACA,KAAM,CACJ,gBAAiBiG,EACjB,cAAeC,CACjB,CACF,CAAC,EAlBS,aAoBd,CAAC,CACH,EAxBoC,wBA0BvBE,GAA6B9G,EAAA,CAAC,CACzC,YAAAC,EACA,QAAAC,CACF,IAISC,EAAS,CACd,SAAU,CAAC,yBAA0BD,GAAS,SAAS,EACvD,QAASF,EAAA,SACAI,EAAmB2G,GAAsB9G,EAAa,CAC3D,UAAWC,GAAS,SACtB,CAAC,EAHM,WAKT,QAASA,GAAS,cAAc,OAClC,CAAC,EAfuC,8BA8B7B8G,GAA8BhH,EAAA,CAAC,CAC1C,QAAAiH,EACA,UAAAC,CACF,IAIShE,EAAQ,IACR+D,EACE7G,EACL+G,GACA,CAAC,EACD,CACE,UAAAD,CACF,CACF,EAPqB,KAQpB,CAACD,EAASC,CAAS,CAAC,EAhBkB,+BAmB9BE,GAA0BpH,EACrCE,GAGG,CACH,GAAM,CAAE,OAAAK,CAAO,EAAIC,EAAU,EACvB,CAAE,KAAM6G,EAAW,UAAAtE,CAAU,EAAI5C,EAAS,CAC9C,GAAGmH,EAAiB/G,EAAkB,iCAAiC,EACvE,OAAQP,EAACiG,GAELA,EAAS,MAAM,MAAM,IAAKsB,IACjB,CACL,MAAOA,EAAQ,KACf,MAAOA,EAAQ,KACf,eAAgBA,EAAQ,eACxB,8BACEA,EAAQ,6BACZ,EACD,GAAK,CAAC,EAVH,UAaR,QAASrH,GAAS,cAAc,OAClC,CAAC,EAEKsH,EAAoBtE,EACxB,IACE9C,EACEqH,EAAwB,KAAK,OAC7B,CAAC,EACD,CACE,UAAWC,EAA4BL,EAAWnH,GAAS,SAAS,CACtE,CACF,EACF,CAACmH,EAAWnH,GAAS,SAAS,CAChC,EAEA,MAAO,CACL,UAAA6C,EACA,kBAAAyE,EACA,UAAAH,CACF,CACF,EAzCuC,2BA2C1BM,GAAsB3H,EAAA,CAAC,CAClC,QAAAE,CACF,EAEI,CAAC,IAAM,CACT,GAAM,CAAE,KAAM0H,CAAS,EAAIC,EAAY,EACjCC,EAAYC,EAAWH,CAAQ,EAAKA,GAAU,SAAS,IAAM,GAAM,GACnE,CAAE,OAAArH,CAAO,EAAIC,EAAU,EAE7B,OAAOL,EAAS,CACd,SAAU,CAAC,qBAAsB2H,CAAS,EAC1C,QAAS9H,EAAA,IACPgI,EAA+B,CAC7B,OAAQzH,EACR,KAAM,CAAE,WAAYuH,CAAU,CAChC,CAAC,EAJM,WAKT,OAAQ9H,EAAA,CAAC,CAAE,KAAAgB,CAAK,IAAMA,GAAM,MAAM,SAAY,CAAC,EAAvC,UACR,SAAUd,GAAS,cAAc,SAAW,KAAS,CAAC,CAAC4H,CACzD,CAAC,CACH,EAnBmC","names":["useMemo","useMutation","useQuery","useMutation","useQuery","useUploadFile","__name","client","useClient","useMutation","params","postV1Documents","useDownloadFile","id","useQuery","result","getV1FilesId","data","useEmploymentFiles","employmentId","queryParams","queryOptions","getV1EmploymentsEmploymentIdFiles","useQuery","useQuery","useIdentity","__name","client","useClient","useQuery","getV1IdentityCurrent","data","hasCompany","identity","__name","useCompanyPricingPlans","queryOptions","useIdentity","companyId","client","useClient","useQuery","getV1CompaniesCompanyIdPricingPlans","data","useGetContractDocumentSignatureSchema","__name","fieldValues","options","useQuery","createHeadlessForm","signatureSchema","useSignContractDocument","client","useClient","useMutation","employmentId","contractDocumentId","payload","postV1ContractorsEmploymentsEmploymentIdContractDocumentsContractDocumentIdSign","useGetShowContractDocument","getV1ContractorsEmploymentsEmploymentIdContractDocumentsId","data","clearBase64Data","useHasCompanySignedContract","documentPreviewPdf","signatory","useGetContractorSubscriptions","getV1ContractorsEmploymentsEmploymentIdContractorSubscriptions","usePostManageContractorSubscriptions","postV1ContractorsEmploymentsEmploymentIdContractorPlusSubscription","useCreateContractorContractDocument","postV1ContractorsEmploymentsEmploymentIdContractDocuments","CONTRACT_PRODUCT_TITLES","contractorStandardProductIdentifier","contractorPlusProductIdentifier","corProductIdentifier","useEorSubscription","pricingPlans","isLoadingPricingPlans","useCompanyPricingPlans","eorPricingPlan","plan","eorProductIdentifier","convertFromCents","addEorToFieldOptions","fieldOptions","eorSubscription","excludeProducts","shouldIncludeProduct","useContractorSubscriptionSchemaField","selectedCountry","contractorSubscriptions","isLoading","refetch","filteredContractorSubscriptions","useMemo","subscription","isMissingSubscriptions","isEligibilityQuestionnaireBlocked","showEorSubscription","isLoadingEorSubscription","hasAvailableOptions","form","selectContractorSubscriptionStepSchema","existingRequired","fieldName","field","contractorOptions","opts","product","price","currencyCode","label","value","description","meta","FEATURES_BY_IDENTIFIER","a","b","otherOptions","useUpdateUKandSaudiFields","createContractorContractDocumentMutation","uploadFileMutation","parsedValues","uploadFileMutationAsync","mutationToPromise","createContractorContractDocumentMutationAsync","nationalityStatus","ir35Status","ir35SdsFile","ir35ContractDetailsPayload","nationalityContractDetailsPayload","IR35_FILE_SUBTYPE","useGetIR35File","ir35Files","isLoadingFiles","useEmploymentFiles","file","id","downloadQuery","useDownloadFile","useGetEligibilityQuestionnaire","response","getV1ContractorsSchemasEligibilityQuestionnaire","schema","usePostCreateEligibilityQuestionnaire","postV1ContractorsEligibilityQuestionnaire","usePostManageContractorCorSubscription","postV1ContractorsEmploymentsEmploymentIdContractorCorSubscription","useDeleteContractorCorSubscription","deleteV1ContractorsEmploymentsEmploymentIdContractorCorSubscription","useSetContractOrigin","contractOrigin","templateType","postV1EmploymentsEmploymentIdContractOrigin","useGetContractOriginSchema","contractOriginSchema","useGetInvoiceScheduleSchema","enabled","jsfModify","invoiceScheduleSchema","useCountriesSchemaField","countries","countriesOptions","country","selectCountryForm","selectCountryStepSchema","buildSelectCountryJsfModify","useCompanyOpenTasks","identity","useIdentity","companyId","hasCompany","getV1CompaniesCompanyIdActions"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as _}from"./chunk-DSJXT5ZP.js";import{b as S,c as q}from"./chunk-AXZ4IDY7.js";import{a as y}from"./chunk-H6XROFQT.js";import{a as p}from"./chunk-JO5D2522.js";import{B as h,h as v,qa as b,ua as g,va as O,z as F}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as _}from"./chunk-DSJXT5ZP.js";import{b as S,c as q}from"./chunk-AXZ4IDY7.js";import{a as y}from"./chunk-H6XROFQT.js";import{a as p}from"./chunk-JO5D2522.js";import{B as h,h as v,qa as b,ua as g,va as O,z as F}from"./chunk-FPCF4TH2.js";import{e as a}from"./chunk-H2O4CVKF.js";import{a as o}from"./chunk-P37U34EQ.js";import{useMemo as V}from"react";import{useQuery as P}from"@tanstack/react-query";var f=o(({employmentId:e,options:t})=>{let{client:r}=a();return P({queryKey:["contractor-currencies",e],queryFn:o(async()=>F({client:r,path:{employment_id:e},query:{restrict_to_guaranteed_pay_out_currencies:!1}}),"queryFn"),enabled:t?.queryOptions?.enabled,select:o(({data:n})=>n?.data,"select")})},"useContractorCurrencies"),x=o(({countryCode:e,employmentId:t,fieldValues:r,options:n})=>{let{client:s}=a();return P({queryKey:["contractor-onboarding-details-schema",e,t],retry:!1,queryFn:o(async()=>v({client:s,path:{country_code:e},query:{json_schema_version:1,employment_id:t}}),"queryFn"),enabled:n?.queryOptions?.enabled,select:o(({data:i})=>{let c=i?.data?.schema||{};return p(c,r,n)},"select")})},"useContractorOnboardingDetailsSchema"),J=o(({countryCode:e,employmentId:t,fieldValues:r,options:n})=>{let s=x({countryCode:e,employmentId:t,fieldValues:r,options:n}),{data:i,isLoading:c}=f({employmentId:t,options:{queryOptions:{enabled:n?.queryOptions?.enabled}}}),u=V(()=>!s.data||!i?s.data:{...s.data,fields:s.data.fields.map(l=>l.name!=="payment_terms"?l:{...l,fields:l.fields?.map(d=>d.name!=="compensation_currency_code"?d:{...d,options:i.map(m=>({label:m.code,value:m.code,meta:{source:m.source}}))})})},[s.data,i]);return{...s,data:u,isLoading:s.isLoading||c}},"useContractorContractDetailsSchema");import{useMemo as N}from"react";import{useMutation as C,useQuery as w,queryOptions as E}from"@tanstack/react-query";var oe=o(({enabled:e,employmentId:t,jsfModify:r,includeOneTime:n,isContractorOfRecord:s,includeCustomDays:i,fieldValues:c})=>{let{data:u,isLoading:I}=f({employmentId:t,options:{queryOptions:{enabled:e&&!!t}}});return{data:N(()=>{if(!e||!u)return null;let d=_({currencies:u?.map(m=>m.code),includeOneTime:n,isContractorOfRecord:s,includeCustomDays:i});return p(d,c,{jsfModify:r,transformMoneyFields:!0})},[e,u,r,n,s,i,c]),isLoading:I}},"useGetCreateInvoiceScheduleSchema"),M=o((e,t)=>E({queryKey:["contractor-invoice-schedules",t],queryFn:o(async()=>{let r=await g({client:e,query:{employment_id:t}});if(r.error||!r.data)throw new Error("Failed to fetch invoice schedules");return r},"queryFn")}),"invoiceSchedulesOptions"),re=o(({employmentId:e,options:t})=>{let{client:r}=a();return w({...M(r,e),enabled:t?.queryOptions?.enabled,select:o(n=>n.data?.data?.contractor_invoice_schedules?.find(s=>s.status===y.PENDING_CONTRACTOR_ACTION||s.status===y.PROCESSING||s.status===y.PENDING_COMPANY_ACTION),"select")})},"useGetExistingInvoiceSchedule"),ne=o(()=>{let{client:e}=a();return C({mutationFn:o(async({employmentId:t,values:r})=>{let n={contractor_invoice_schedules:[{employment_id:t,...S(r)}]};return O({client:e,body:n})},"mutationFn")})},"useCreateInvoiceSchedule"),se=o(()=>{let{client:e}=a();return C({mutationFn:o(async({scheduleId:t,values:r})=>{let n=S(r);return h({client:e,path:{id:t},body:n})},"mutationFn")})},"useUpdateInvoiceSchedule"),ae=o(()=>{let{client:e}=a();return C({mutationFn:o(async({scheduleId:t})=>h({client:e,path:{id:t},body:{status:"deleted"}}),"mutationFn")})},"useSkipInvoiceSchedule"),ie=o(()=>{let{client:e}=a();return C({mutationFn:o(async({employmentId:t,values:r})=>{let n=q(r);return b({client:e,path:{employment_id:t},body:n})},"mutationFn")})},"usePreviewContractorInvoice");export{J as a,oe as b,M as c,re as d,ne as e,se as f,ae as g,ie as h};
|
|
2
|
+
//# sourceMappingURL=chunk-LVYZIOOZ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as J}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as J}from"./chunk-IROMMYZS.js";import{a as U}from"./chunk-6DHV4GT6.js";import{a as W}from"./chunk-W5WYIDDY.js";import{a as Y}from"./chunk-7LQEU3B4.js";import{a as Q}from"./chunk-DC4ZTOZE.js";import{a as H}from"./chunk-JIGRVBQS.js";import{f as Z,g as K}from"./chunk-JMBQAG6H.js";import{a as R}from"./chunk-SYZIGZ2F.js";import{a as q,b as B,c as L,d as z}from"./chunk-ASKPQZY2.js";import{a as S}from"./chunk-HBONR7VY.js";import{a as N}from"./chunk-SDF4QRJ2.js";import{a as E}from"./chunk-JO5D2522.js";import{a as v}from"./chunk-SSUL5J5I.js";import{a as _}from"./chunk-GPWQPJQ7.js";import{u as O}from"./chunk-FPCF4TH2.js";import{b as w,h as u,n as D}from"./chunk-C4HFMTSB.js";import{a as A}from"./chunk-M3TA5X2H.js";import{a as I}from"./chunk-FSGFBJJF.js";import{e as $}from"./chunk-H2O4CVKF.js";import{a as o}from"./chunk-P37U34EQ.js";import xe from"lodash.omitby";import je from"lodash.isnull";import{format as x,isFuture as Ve,parseISO as j,subDays as Pe}from"date-fns";import{useMemo as V}from"react";import be from"lodash.omit";import{useQuery as Fe}from"@tanstack/react-query";var G=o(({query:t,options:e})=>{let{client:y}=$();return Fe({queryKey:["payroll-calendars"],queryFn:o(()=>O({client:y,query:{year:t?.year,country_code:t?.countryCode}}),"queryFn"),enabled:e?.enabled,select:o(c=>c.data?.data?.payroll_calendars?.[0],"select")})},"usePayrollCalendars");import{isFuture as Me,isToday as ge,parseISO as Se}from"date-fns";var X=o(t=>{if(!t)return!1;let e=Se(t);return Me(e)||ge(e)},"isInProbationPeriod");import{Fragment as ke,jsx as m,jsxs as Ce}from"react/jsx-runtime";var lo=o(({employmentId:t,options:e,initialValues:y})=>{let{fieldValues:c,setFieldValues:ee,stepState:l,previousStep:oe,nextStep:ie}=A(q),{data:n,isLoading:te}=N({employmentId:t,queryParams:{exclude_files:!0}}),{data:ne}=G({query:{year:new Date().getFullYear().toString(),countryCode:n?.country?.code},options:{enabled:!!n?.country?.code}}),T=X(n?.probation_period_end_date),F=B(ne),P=V(()=>T?x(new Date,"yyyy-MM-dd"):x(F,"yyyy-MM-dd"),[T,F]),M=!!(n?.provisional_start_date&&Ve(j(n.provisional_start_date))),ae={personal_email:n?.basic_information?.email},g=z({...ae,...y,...l.values?.employee_communication,...l.values?.termination_details,...l.values?.paid_time_off,...l.values?.additional_information},M),d=V(()=>({...g,...c}),[c,g]),b=L({minTerminationDate:F,isEmployeeInProbationPeriod:T,selectedDate:j(d.proposed_termination_date)}),re=V(()=>{let s=R.data.schema.properties.termination_reason.oneOf,a=M?s.filter(i=>i.const==="cancellation_before_start_date"):s.filter(i=>i.const!=="cancellation_before_start_date");return{fields:{risk_assesment_info:S("Offboarding risk assessment","Employees may be protected from termination if they fall into certain categories. To help avoid claims from employees, let us know if the employee is part of one or more of these categories. Select all that apply.",{className:e?.jsfModify?.fields?.risk_assesment_info?.["x-jsf-presentation"]?.className}),termination_reason:{...e?.jsfModify?.fields?.termination_reason,oneOf:a},proposed_termination_date_info:S("Proposed termination date",Ce(ke,{children:["In most cases, Remote must provide notice to the employee before termination. The required notice period depends on local labor laws, the employment agreement, and other factors. We'll use those factors to determine the required notice period.",m(v,{external:!0,zendeskId:_.terminationNoticePeriods,className:D("text-sm",e?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.zendeskTriggerButtonClassName),children:"Learn about notice periods"})]}),{className:e?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.className}),proposed_termination_date:{...e?.jsfModify?.fields?.proposed_termination_date,"x-jsf-presentation":{...e?.jsfModify?.fields?.proposed_termination_date?.["x-jsf-presentation"],minDate:P,...d.termination_reason==="cancellation_before_start_date"&&n?.provisional_start_date?{maxDate:x(Pe(j(n.provisional_start_date),1),"yyyy-MM-dd")}:{},...b},...d.termination_reason==="cancellation_before_start_date"?{"x-jsf-errorMessage":{maximum:"The proposed termination date must be before the employee's start date."}}:{}},paid_time_off_info:{...e?.jsfModify?.fields?.paid_time_off_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.paid_time_off_info?.["x-jsf-presentation"],Component:o(()=>{let i=e?.jsfModify?.fields?.paid_time_off_info?.["x-jsf-presentation"]?.Component;return m(J,{employeeName:n?.basic_information?.name,proposedTerminationDate:d.proposed_termination_date,employmentId:t,employment:n,render:r=>i?m(i,{...r}):m(Q,{...r})})},"Component")}},acknowledge_termination_procedure_info:{...e?.jsfModify?.fields?.acknowledge_termination_procedure_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.acknowledge_termination_procedure_info?.["x-jsf-presentation"],Component:o(()=>{let i=e?.jsfModify?.fields?.acknowledge_termination_procedure_info?.["x-jsf-presentation"]?.Component;return m(U,{render:r=>i?m(i,{...r}):m(W,{...r})})},"Component")}},acknowledge_termination_procedure_fees_info:{...e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info?.["x-jsf-presentation"],Component:o(()=>{let i={involuntaryOffboardingServiceChargeZendeskId:_.involuntaryOffboardingServiceCharge,reconciliationInvoiceZendeskId:_.reconciliationInvoice},r=e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info?.["x-jsf-presentation"]?.Component;return r?m(r,{...i}):m(Y,{...i})},"Component")}}}}},[n,t,d.proposed_termination_date,d.termination_reason,M,P,e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info,e?.jsfModify?.fields?.acknowledge_termination_procedure_info,e?.jsfModify?.fields?.paid_time_off_info,e?.jsfModify?.fields?.proposed_termination_date,e?.jsfModify?.fields?.proposed_termination_date_info,e?.jsfModify?.fields?.risk_assesment_info,e?.jsfModify?.fields?.termination_reason,b]),{data:f,isLoading:se}=K({formValues:d,jsfModify:{...e?.jsfModify,fields:{...e?.jsfModify?.fields,...re?.fields}},step:l.currentStep.name}),me=E(H.data.schema),k=Z(),{mutateAsync:de}=w(k);async function fe(s){if(!t)throw new Error("Employment id is missing");if(f){let a=await C(s,!0),{customer_informed_employee:i}=a,r=i==="yes"?{employee_awareness:{date:a.customer_informed_employee_date,note:a.customer_informed_employee_description}}:void 0,ue=await I(a,["agrees_to_pto_amount","confidential","customer_informed_employee","will_challenge_termination"]),_e=be(ue,"customer_informed_employee_date","customer_informed_employee_description"),ye=xe({..._e,...r},je),p=a.timesheet_file??[],h=Array.isArray(p)&&p.length>0?{content:p[0].content,name:p[0].name}:void 0,Te={employment_id:t,termination_details:{...ye,timesheet_file:h||void 0},type:"termination"};return de(Te)}}o(fe,"onSubmit");function le(){oe()}o(le,"back");function ce(){ie()}o(ce,"next");let pe=Object.keys(c).length>0,C=o(async(s,a=!1)=>a?await u(s,me.fields,{isPartialValidation:!0}):f?await u(s,f?.fields,{isPartialValidation:!0}):{},"parseFormValues");return{employmentId:t,employment:n,fieldValues:d,isDirty:pe,stepState:l,fields:f?.fields||[],isLoading:se||te,isSubmitting:k.isPending,initialValues:g,handleValidation:o(async s=>{if(f){let a=await u(s,f?.fields);return f?.handleValidation(a)}return null},"handleValidation"),checkFieldUpdates:ee,parseFormValues:C,onSubmit:fe,back:le,next:ce}},"useTermination");export{lo as a};
|
|
2
|
+
//# sourceMappingURL=chunk-MBGHSHR6.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as f}from"./chunk-76ZDXC2T.js";import{b as p}from"./chunk-KFYWUBRS.js";import{a as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as f}from"./chunk-76ZDXC2T.js";import{b as p}from"./chunk-KFYWUBRS.js";import{a as c}from"./chunk-QYA7D7ZQ.js";import{a as d}from"./chunk-NEVSZEMH.js";import{i as a}from"./chunk-SRLBVFNQ.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as y,useRef as b}from"react";import{jsx as l}from"react/jsx-runtime";import{createElement as g}from"react";function B({defaultValues:s,onSubmit:u,components:F}){let{formId:C,createCompanyBag:o}=f(),m=b(s),h=p(o.handleValidation),r=a({resolver:h,defaultValues:s,shouldUnregister:!1,mode:"onBlur"});y(()=>{let n=r?.watch(e=>{Object.keys(e).some(i=>e[i]!==m.current[i])&&(o?.checkFieldUpdates(e),m.current={...e})});return()=>n?.unsubscribe()},[]);let S=t(async n=>{await u(n)},"handleSubmit");return g(d,{...r,key:`form-${o.stepState.currentStep.name}`},l("form",{id:C,onSubmit:r.handleSubmit(S),className:"space-y-4 RemoteFlows__OnboardingForm",children:l(c,{components:F,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}t(B,"CreateCompanyForm");export{B as a};
|
|
2
|
+
//# sourceMappingURL=chunk-MWBEA2NI.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as R,b as x,c as N,d as A}from"./chunk-OV4ARZIX.js";import{a as T}from"./chunk-ZE3YT3Q6.js";import{a as C}from"./chunk-SWLNTVAX.js";import{b as B}from"./chunk-LKHRHBFP.js";import{a as f}from"./chunk-3OHORFIX.js";import{a as w}from"./chunk-GPWQPJQ7.js";import{n as i,o as n,r as F}from"./chunk-C4HFMTSB.js";import{a as m}from"./chunk-P37U34EQ.js";import{MoreHorizontal as G}from"lucide-react";import{useState as P}from"react";import{Fragment as U,jsx as g,jsxs as E}from"react/jsx-runtime";function L({actions:e=[],className:r,label:a,"data-testid":l}){let[_,d]=P(!1);return E("div",{className:i("relative",r),children:[g(B,{"data-testid":l,variant:"ghost","aria-label":a,className:"h-8 w-8 p-0",onClick:()=>d(!_),children:g(G,{className:"h-4 w-4"})}),_&&E(U,{children:[g("div",{className:"fixed inset-0 z-40",onClick:()=>d(!1)}),g("div",{className:"absolute right-0 top-1/2 mt-1 bg-white border border-gray-200 rounded-md shadow-lg z-50 min-w-[120px]",children:e.map((c,u)=>g("button",{"data-testid":`${l}-${c.label.toLowerCase().replace(" ","-")}`,className:i("w-full text-left px-2 py-1.5 text-sm hover:bg-gray-100",c.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>{c.onClick(),d(!1)},disabled:c.disabled,children:c.label},u))})]})]})}m(L,"ActionsDropdown");import{ChevronDown as S,Info as $}from"lucide-react";import j from"react-flagpack";import{useState as O}from"react";import{Fragment as b,jsx as o,jsxs as t}from"react/jsx-runtime";var Z={GB:"GB-UKM"},K=m(({title:e,country:r,region:a,annualGrossSalary:l,onDelete:_,onExportPdf:d,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:d},{label:"Delete",onClick:_}];return t("div",{className:"RemoteFlows__EstimationResults__Header flex justify-between",children:[t("div",{className:"flex flex-row items-center gap-6",children:[o("div",{className:"RemoteFlows__EstimationResultsHeader__FlagContainer flex h-16 w-16 items-center justify-center rounded-lg bg-[#F4F4F5]",children:o(j,{code:Z[r.alpha_2_code]||r.alpha_2_code})}),t("div",{className:"space-y-1",children:[o("h2",{"data-testid":"estimation-results-header-title",className:"RemoteFlows__EstimationResultsHeader__Title text-lg font-medium leading-none text-[#181818]",children:e}),t("p",{className:"RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]",children:[r.name," ",a?` (${a.name})`:""]}),t("p",{"data-testid":"estimation-results-header-annual-gross-salary",className:"RemoteFlows__EstimationResultsHeader__AnnualGrossSalary text-xs text-[#71717A]",children:[o("span",{className:"text-[#181818]",children:"Employee annual gross salary:"})," ",l]})]})]}),o(L,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),V=m(()=>({steps:[{id:"add-employment-details",title:"Add employment details",description:"You add employee employments details."},{id:"invite-employee",title:"Invite employee",description:"Hire receives an email invitation from Remote to start the self-enrollment process."},{id:"verify-information",title:"Verify information",description:"Remote prepares the Employment Agreement and verifies all the information."},{id:"sign-contract",title:"Sign contract",description:"All parties sign the Employment Agreement and are ready to start. \u{1F389}"}],helpText:"For customers who accept Remote's Terms of Service (ToS), the employee onboarding timeline starts once the employee has been invited to the platform and completed self enrollment.",zendeskArticleId:w.employeeOnboardingTimeline}),"getOnboardingTimelineData");function Y({minimumOnboardingDays:e,data:r,className:a}){return o(R,{collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",a),children:t(x,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4",children:t("div",{className:"flex items-center justify-between w-full",children:[o("span",{className:"RemoteFlows__OnboardingTimeline__Title text-base font-medium text-[#0F172A]",children:"Onboarding timeline"}),e!=null&&t("span",{className:"RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4",children:[e," days"]})]})}),t(A,{className:"px-0 pb-4",children:[o("ul",{className:"RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2",children:r.steps.map(l=>t("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:l.title})," ","- ",l.description]},l.id))}),t("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[r.helpText,r.zendeskArticleId&&o(f,{zendeskId:r.zendeskArticleId,children:"Learn more"})]})]})]})})}m(Y,"OnboardingTimeline");function q({className:e,countryBenefitsUrl:r,countryGuideUrl:a,country:l}){return o(R,{collapsible:!0,className:i("RemoteFlows__EstimationResults__HiringSection w-full",e),children:t(x,{value:"timeline",className:"RemoteFlows__HiringSection__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__HiringSection__AccordionTrigger hover:no-underline px-0 py-4",children:o("div",{className:"flex items-center justify-between w-full",children:t("span",{className:"text-base font-medium text-[#0F172A]",children:["Hiring in ",l.name]})})}),o(A,{children:t("div",{className:"flex flex-col gap-1",children:[a&&o("a",{href:a,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),r&&o("a",{href:r,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}m(q,"HiringSection");function J({isMultipleCurrency:e,className:r}){return t("div",{className:i("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",r),children:[o("span",{"aria-hidden":!0}),e?t(b,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):t(b,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}m(J,"EstimationHeaders");function I({label:e,amounts:r,className:a,children:l}){let[_,d]=O(!0);return t("div",{className:i("RemoteFlows__EstimationResults__Row",a),children:[t("div",{className:"RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center",children:[t("div",{className:"RemoteFlows__EstimationRow__LabelContainer flex items-center gap-2",children:[o("span",{className:i("RemoteFlows__EstimationRow__Title min-w-[140px] font-medium text-[#09090B]"),children:e}),o("button",{onClick:()=>d(!_),className:"RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded",children:o(S,{className:`h-4 w-4 text-muted-foreground transition-transform ${_?"rotate-180":""}`})})]}),Array.isArray(r)?r.map((c,u)=>o("span",{className:i("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:c},u)):t(b,{children:[o("span",{}),o("span",{className:i("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:r})]})]}),_&&l&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:l})]})}m(I,"EstimationRow");function Q({item:e,isMultipleCurrency:r,level:a=0}){let[l,_]=O(!1),d=e.children&&e.children.length>0,c=a>0,u=e.isCollapsible||d;return t("li",{className:i("RemoteFlows__BreakdownList__Item pb-3",c&&"pb-1"),children:[t("div",{className:i(r?"RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between":"RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between"),children:[t("div",{className:i("RemoteFlows__BreakdownList__LabelContainer flex items-center gap-2",c&&"pl-3"),children:[!c&&o("span",{className:"RemoteFlows__BreakdownList__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0","aria-hidden":"true"}),u?t("button",{onClick:()=>_(!l),className:"RemoteFlows__BreakdownList__CollapseButton flex items-center gap-2 hover:bg-gray-100 rounded p-1",children:[o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B]"),children:e.label}),o(S,{className:`RemoteFlows__BreakdownList__ChevronDown h-3 w-3 text-muted-foreground transition-transform ${l?"rotate-180":""}`})]}):o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B] p-1"),children:e.label}),e.tooltip&&o(T,{content:t(b,{children:[o("span",{dangerouslySetInnerHTML:{__html:F(e.tooltip)}})," ",e.zendeskId&&o(f,{zendeskId:Number(e.zendeskId),children:"Learn more"})]}),children:o("button",{className:"RemoteFlows__BreakdownList__InfoButton p-1 hover:bg-gray-100 rounded",children:o($,{className:i("RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground",c?"h-3 w-3":"h-4 w-4")})})})]}),r?t(b,{children:[o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employee-amount",className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"}),o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employer-amount",className:i("RemoteFlows__BreakdownList__EmployerAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__EmployerAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__EmployerAmountText--NotNested text-[#09090B]"),children:e.employerAmount||"\u2014"})]}):o("span",{"data-testid":e.dataSelector,className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"})]}),d&&l&&o("div",{className:"mt-1",children:o(k,{items:e.children,isMultipleCurrency:r,level:a+1})})]})}m(Q,"BreakdownListItem");function k({items:e,isMultipleCurrency:r,className:a,level:l}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",a),children:e.map((_,d)=>o(Q,{item:_,isMultipleCurrency:r,level:l},d))})}m(k,"BreakdownList");var pe=m(({estimation:e,title:r,components:a,onDelete:l,onExportPdf:_,onEdit:d})=>{let c=a?.HiringSection||q,u=a?.OnboardingTimeline||Y,z=a?.Header||K,h=a?.Footer,H=V(),p=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,v=e.employer_currency_costs.monthly_management_fee,D=e.region.code!==e.country.code,M=n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code);return t(C,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(z,{title:r,annualGrossSalary:M,region:D?e.region:void 0,country:e.country,onDelete:l,onExportPdf:_,onEdit:d})}),t("div",{className:"RemoteFlows__Separator",children:[o(J,{isMultipleCurrency:p,className:"mb-3"}),o(I,{label:"Monthly total cost",amounts:p?[n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),n(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.code)]:n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),children:o(k,{items:[{label:"Gross monthly salary",regionalAmount:n(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_gross_salary,e.employer_currency_costs.currency.code),zendeskId:w.extraPayments.toString(),tooltip:"This country respects extra payments on top of the gross salary."},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.monthly_contributions_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_contributions_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.monthly_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.monthly_benefits_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_benefits_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.monthly_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Monthly fee",regionalAmount:n(e.regional_currency_costs.monthly_management_fee,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_management_fee,e.employer_currency_costs.currency.code),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})]}),o("div",{className:"RemoteFlows__Separator",children:o(I,{label:"Annual total cost",amounts:p?[n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),n(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.code)]:n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),children:o(k,{items:[{label:"Gross annual salary",dataSelector:"annual-gross-salary",regionalAmount:n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.code)},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_contributions_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.annual_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.annual_benefits_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_benefits_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.annual_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Extra statutory payments",regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.extra_statutory_payments_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.extra_statutory_payments_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Annual fee",regionalAmount:n(e.regional_currency_costs.annual_management_fee,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_management_fee,e.employer_currency_costs.currency.code),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})}),o("div",{className:"RemoteFlows__Separator",children:o(u,{minimumOnboardingDays:e.minimum_onboarding_time,data:H})}),o(c,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),h&&o(h,{})]})},"EstimationResults");export{pe as a};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as R,b as x,c as N,d as A}from"./chunk-OV4ARZIX.js";import{a as T}from"./chunk-ZE3YT3Q6.js";import{a as C}from"./chunk-SWLNTVAX.js";import{b as B}from"./chunk-LKHRHBFP.js";import{a as f}from"./chunk-SSUL5J5I.js";import{a as w}from"./chunk-GPWQPJQ7.js";import{n as i,o as n,r as F}from"./chunk-C4HFMTSB.js";import{a as m}from"./chunk-P37U34EQ.js";import{MoreHorizontal as G}from"lucide-react";import{useState as P}from"react";import{Fragment as U,jsx as g,jsxs as E}from"react/jsx-runtime";function L({actions:e=[],className:r,label:a,"data-testid":l}){let[_,d]=P(!1);return E("div",{className:i("relative",r),children:[g(B,{"data-testid":l,variant:"ghost","aria-label":a,className:"h-8 w-8 p-0",onClick:()=>d(!_),children:g(G,{className:"h-4 w-4"})}),_&&E(U,{children:[g("div",{className:"fixed inset-0 z-40",onClick:()=>d(!1)}),g("div",{className:"absolute right-0 top-1/2 mt-1 bg-white border border-gray-200 rounded-md shadow-lg z-50 min-w-[120px]",children:e.map((c,u)=>g("button",{"data-testid":`${l}-${c.label.toLowerCase().replace(" ","-")}`,className:i("w-full text-left px-2 py-1.5 text-sm hover:bg-gray-100",c.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>{c.onClick(),d(!1)},disabled:c.disabled,children:c.label},u))})]})]})}m(L,"ActionsDropdown");import{ChevronDown as S,Info as $}from"lucide-react";import j from"react-flagpack";import{useState as O}from"react";import{Fragment as b,jsx as o,jsxs as t}from"react/jsx-runtime";var Z={GB:"GB-UKM"},K=m(({title:e,country:r,region:a,annualGrossSalary:l,onDelete:_,onExportPdf:d,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:d},{label:"Delete",onClick:_}];return t("div",{className:"RemoteFlows__EstimationResults__Header flex justify-between",children:[t("div",{className:"flex flex-row items-center gap-6",children:[o("div",{className:"RemoteFlows__EstimationResultsHeader__FlagContainer flex h-16 w-16 items-center justify-center rounded-lg bg-[#F4F4F5]",children:o(j,{code:Z[r.alpha_2_code]||r.alpha_2_code})}),t("div",{className:"space-y-1",children:[o("h2",{"data-testid":"estimation-results-header-title",className:"RemoteFlows__EstimationResultsHeader__Title text-lg font-medium leading-none text-[#181818]",children:e}),t("p",{className:"RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]",children:[r.name," ",a?` (${a.name})`:""]}),t("p",{"data-testid":"estimation-results-header-annual-gross-salary",className:"RemoteFlows__EstimationResultsHeader__AnnualGrossSalary text-xs text-[#71717A]",children:[o("span",{className:"text-[#181818]",children:"Employee annual gross salary:"})," ",l]})]})]}),o(L,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),V=m(()=>({steps:[{id:"add-employment-details",title:"Add employment details",description:"You add employee employments details."},{id:"invite-employee",title:"Invite employee",description:"Hire receives an email invitation from Remote to start the self-enrollment process."},{id:"verify-information",title:"Verify information",description:"Remote prepares the Employment Agreement and verifies all the information."},{id:"sign-contract",title:"Sign contract",description:"All parties sign the Employment Agreement and are ready to start. \u{1F389}"}],helpText:"For customers who accept Remote's Terms of Service (ToS), the employee onboarding timeline starts once the employee has been invited to the platform and completed self enrollment.",zendeskArticleId:w.employeeOnboardingTimeline}),"getOnboardingTimelineData");function Y({minimumOnboardingDays:e,data:r,className:a}){return o(R,{collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",a),children:t(x,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4",children:t("div",{className:"flex items-center justify-between w-full",children:[o("span",{className:"RemoteFlows__OnboardingTimeline__Title text-base font-medium text-[#0F172A]",children:"Onboarding timeline"}),e!=null&&t("span",{className:"RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4",children:[e," days"]})]})}),t(A,{className:"px-0 pb-4",children:[o("ul",{className:"RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2",children:r.steps.map(l=>t("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:l.title})," ","- ",l.description]},l.id))}),t("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[r.helpText,r.zendeskArticleId&&o(f,{zendeskId:r.zendeskArticleId,children:"Learn more"})]})]})]})})}m(Y,"OnboardingTimeline");function q({className:e,countryBenefitsUrl:r,countryGuideUrl:a,country:l}){return o(R,{collapsible:!0,className:i("RemoteFlows__EstimationResults__HiringSection w-full",e),children:t(x,{value:"timeline",className:"RemoteFlows__HiringSection__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__HiringSection__AccordionTrigger hover:no-underline px-0 py-4",children:o("div",{className:"flex items-center justify-between w-full",children:t("span",{className:"text-base font-medium text-[#0F172A]",children:["Hiring in ",l.name]})})}),o(A,{children:t("div",{className:"flex flex-col gap-1",children:[a&&o("a",{href:a,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),r&&o("a",{href:r,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}m(q,"HiringSection");function J({isMultipleCurrency:e,className:r}){return t("div",{className:i("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",r),children:[o("span",{"aria-hidden":!0}),e?t(b,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):t(b,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}m(J,"EstimationHeaders");function I({label:e,amounts:r,className:a,children:l}){let[_,d]=O(!0);return t("div",{className:i("RemoteFlows__EstimationResults__Row",a),children:[t("div",{className:"RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center",children:[t("div",{className:"RemoteFlows__EstimationRow__LabelContainer flex items-center gap-2",children:[o("span",{className:i("RemoteFlows__EstimationRow__Title min-w-[140px] font-medium text-[#09090B]"),children:e}),o("button",{onClick:()=>d(!_),className:"RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded",children:o(S,{className:`h-4 w-4 text-muted-foreground transition-transform ${_?"rotate-180":""}`})})]}),Array.isArray(r)?r.map((c,u)=>o("span",{className:i("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:c},u)):t(b,{children:[o("span",{}),o("span",{className:i("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:r})]})]}),_&&l&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:l})]})}m(I,"EstimationRow");function Q({item:e,isMultipleCurrency:r,level:a=0}){let[l,_]=O(!1),d=e.children&&e.children.length>0,c=a>0,u=e.isCollapsible||d;return t("li",{className:i("RemoteFlows__BreakdownList__Item pb-3",c&&"pb-1"),children:[t("div",{className:i(r?"RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between":"RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between"),children:[t("div",{className:i("RemoteFlows__BreakdownList__LabelContainer flex items-center gap-2",c&&"pl-3"),children:[!c&&o("span",{className:"RemoteFlows__BreakdownList__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0","aria-hidden":"true"}),u?t("button",{onClick:()=>_(!l),className:"RemoteFlows__BreakdownList__CollapseButton flex items-center gap-2 hover:bg-gray-100 rounded p-1",children:[o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B]"),children:e.label}),o(S,{className:`RemoteFlows__BreakdownList__ChevronDown h-3 w-3 text-muted-foreground transition-transform ${l?"rotate-180":""}`})]}):o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B] p-1"),children:e.label}),e.tooltip&&o(T,{content:t(b,{children:[o("span",{dangerouslySetInnerHTML:{__html:F(e.tooltip)}})," ",e.zendeskId&&o(f,{zendeskId:Number(e.zendeskId),children:"Learn more"})]}),children:o("button",{className:"RemoteFlows__BreakdownList__InfoButton p-1 hover:bg-gray-100 rounded",children:o($,{className:i("RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground",c?"h-3 w-3":"h-4 w-4")})})})]}),r?t(b,{children:[o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employee-amount",className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"}),o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employer-amount",className:i("RemoteFlows__BreakdownList__EmployerAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__EmployerAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__EmployerAmountText--NotNested text-[#09090B]"),children:e.employerAmount||"\u2014"})]}):o("span",{"data-testid":e.dataSelector,className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"})]}),d&&l&&o("div",{className:"mt-1",children:o(k,{items:e.children,isMultipleCurrency:r,level:a+1})})]})}m(Q,"BreakdownListItem");function k({items:e,isMultipleCurrency:r,className:a,level:l}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",a),children:e.map((_,d)=>o(Q,{item:_,isMultipleCurrency:r,level:l},d))})}m(k,"BreakdownList");var pe=m(({estimation:e,title:r,components:a,onDelete:l,onExportPdf:_,onEdit:d})=>{let c=a?.HiringSection||q,u=a?.OnboardingTimeline||Y,z=a?.Header||K,h=a?.Footer,H=V(),p=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,v=e.employer_currency_costs.monthly_management_fee,D=e.region.code!==e.country.code,M=n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code);return t(C,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(z,{title:r,annualGrossSalary:M,region:D?e.region:void 0,country:e.country,onDelete:l,onExportPdf:_,onEdit:d})}),t("div",{className:"RemoteFlows__Separator",children:[o(J,{isMultipleCurrency:p,className:"mb-3"}),o(I,{label:"Monthly total cost",amounts:p?[n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),n(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.code)]:n(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),children:o(k,{items:[{label:"Gross monthly salary",regionalAmount:n(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_gross_salary,e.employer_currency_costs.currency.code),zendeskId:w.extraPayments.toString(),tooltip:"This country respects extra payments on top of the gross salary."},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.monthly_contributions_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_contributions_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.monthly_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.monthly_benefits_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_benefits_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.monthly_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.monthly_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Monthly fee",regionalAmount:n(e.regional_currency_costs.monthly_management_fee,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.monthly_management_fee,e.employer_currency_costs.currency.code),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})]}),o("div",{className:"RemoteFlows__Separator",children:o(I,{label:"Annual total cost",amounts:p?[n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),n(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.code)]:n(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),children:o(k,{items:[{label:"Gross annual salary",dataSelector:"annual-gross-salary",regionalAmount:n(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.code)},{label:"Mandatory employer costs",regionalAmount:n(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_contributions_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.annual_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:n(e.regional_currency_costs.annual_benefits_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_benefits_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.annual_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.annual_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Extra statutory payments",regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_total,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.extra_statutory_payments_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.extra_statutory_payments_breakdown?.map((s,y)=>({label:s.name,regionalAmount:n(e.regional_currency_costs.extra_statutory_payments_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:n(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...v?[{label:"Annual fee",regionalAmount:n(e.regional_currency_costs.annual_management_fee,e.regional_currency_costs.currency.code),employerAmount:n(e.employer_currency_costs.annual_management_fee,e.employer_currency_costs.currency.code),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})}),o("div",{className:"RemoteFlows__Separator",children:o(u,{minimumOnboardingDays:e.minimum_onboarding_time,data:H})}),o(c,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),h&&o(h,{})]})},"EstimationResults");export{pe as a};
|
|
2
|
+
//# sourceMappingURL=chunk-MZM26I3S.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as y}from"./chunk-WSRH5UQP.js";import{a as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as y}from"./chunk-WSRH5UQP.js";import{a as p}from"./chunk-OCZ5EG5J.js";import{a as n}from"./chunk-K3QDNFF5.js";import{a as l}from"./chunk-AP6FKWKX.js";import{a as m}from"./chunk-FPP5ZANJ.js";import{a}from"./chunk-RADQBXMO.js";import{a as i}from"./chunk-Z4Q2UO2Y.js";import{a as t}from"./chunk-SS2SYDCB.js";import{a as e}from"./chunk-5HXGF3IA.js";import{a as r}from"./chunk-P37U34EQ.js";import{useId as u}from"react";import{jsx as E}from"react/jsx-runtime";var I=r(({employmentId:s,countryCode:d,jurisdiction:f,initialValues:P,options:b,render:g})=>{let c=u(),o=e({employmentId:s,countryCode:d,jurisdiction:f,initialValues:P,options:b});return E(t.Provider,{value:{formId:c,employeeBag:o},children:g({employeeBag:o,components:{PersonalDetailsStep:m,HomeAddressStep:l,BankAccountStep:p,FederalTaxesStep:n,StateTaxesStep:a,SubmitButton:i,BackButton:y}})})},"PayrollEmployeeOnboardingFlow");export{I as a};
|
|
2
|
+
//# sourceMappingURL=chunk-NILEOD3X.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{X as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{X as e}from"./chunk-FPCF4TH2.js";import{a as t}from"./chunk-P37U34EQ.js";import{queryOptions as i}from"@tanstack/react-query";var a=t((o,n="default")=>i({queryKey:["countries",n],retry:!1,queryFn:t(async()=>{let r=await e({client:o,headers:{Authorization:""}});if(r.error||!r.data)throw new Error("Failed to fetch supported countries");return r},"queryFn")}),"countriesOptions");export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-NP3RMRKZ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-YPBPOUGX.js";import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-YPBPOUGX.js";import{a as n}from"./chunk-ADXTCKMJ.js";import{b as t}from"./chunk-SS2SYDCB.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as i}from"react/jsx-runtime";function b(l){let{employeeBag:e}=t(),r=a(l);return e.selfOnboardingSubsteps.some(s=>s.type==="employee_provides_bank_details")?i(n,{onSubmit:r,defaultValues:{...e.initialValues?.bank_account,...e.stepState.values?.bank_account}}):null}o(b,"BankAccountStep");export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OCZ5EG5J.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-EW6UABH3.js";import{b as a}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function p({onSubmit:t}){let{terminationBag:o}=a(),n=i(async r=>{let m=await o?.parseFormValues(r);await t?.(m),o?.next()},"handleSubmit");return s(e,{defaultValues:o.fieldValues,onSubmit:n})}i(p,"TerminationDetailsForm");export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ODRR3US4.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{w as s}from"./chunk-FPCF4TH2.js";import{e as r}from"./chunk-H2O4CVKF.js";import{a as e}from"./chunk-P37U34EQ.js";import{queryOptions as a,useQuery as m}from"@tanstack/react-query";var i=e((o,n)=>a({queryKey:["contract-documents",n],retry:!1,queryFn:e(async()=>{let t=await s({client:o,path:{employment_id:n}});if(t.error||!t.data)throw new Error("Failed to fetch contract documents");return t},"queryFn")}),"contractDocumentsOptions"),d=e((o,n)=>{let{client:t}=r();return m({...i(t,o),enabled:n?.enabled,select:e(({data:c})=>c?.data?.contract_documents,"select")})},"useGetContractDocuments");export{i as a,d as b};
|
|
2
|
+
//# sourceMappingURL=chunk-OGDYY2TK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/common/contract-documents/api.ts"],"sourcesContent":["import { queryOptions, useQuery } from '@tanstack/react-query';\nimport { getV1EmploymentsEmploymentIdContractDocuments } from '@/src/client';\nimport { Client } from '@/src/client/client';\nimport { useClient } from '@/src/context';\n\n/**\n * The contract documents of an employment, from\n * `GET /v1/employments/{employment_id}/contract-documents`.\n */\nexport const contractDocumentsOptions = (\n client: Client,\n employmentId: string,\n) =>\n queryOptions({\n queryKey: ['contract-documents', employmentId] as const,\n retry: false,\n queryFn: async () => {\n const response = await getV1EmploymentsEmploymentIdContractDocuments({\n client,\n path: { employment_id: employmentId },\n });\n\n if (response.error || !response.data) {\n throw new Error('Failed to fetch contract documents');\n }\n\n return response;\n },\n });\n\nexport const useGetContractDocuments = (\n employmentId: string,\n options?: { enabled?: boolean },\n) => {\n const { client } = useClient();\n return useQuery({\n ...contractDocumentsOptions(client as Client, employmentId),\n enabled: options?.enabled,\n select: ({ data }) => data?.data?.contract_documents,\n });\n};\n"],"mappings":"wHAAA,OAAS,gBAAAA,EAAc,YAAAC,MAAgB,wBAShC,IAAMC,EAA2BC,EAAA,CACtCC,EACAC,IAEAC,EAAa,CACX,SAAU,CAAC,qBAAsBD,CAAY,EAC7C,MAAO,GACP,QAASF,EAAA,SAAY,CACnB,IAAMI,EAAW,MAAMC,EAA8C,CACnE,OAAAJ,EACA,KAAM,CAAE,cAAeC,CAAa,CACtC,CAAC,EAED,GAAIE,EAAS,OAAS,CAACA,EAAS,KAC9B,MAAM,IAAI,MAAM,oCAAoC,EAGtD,OAAOA,CACT,EAXS,UAYX,CAAC,EAnBqC,4BAqB3BE,EAA0BN,EAAA,CACrCE,EACAK,IACG,CACH,GAAM,CAAE,OAAAN,CAAO,EAAIO,EAAU,EAC7B,OAAOC,EAAS,CACd,GAAGV,EAAyBE,EAAkBC,CAAY,EAC1D,QAASK,GAAS,QAClB,OAAQP,EAAA,CAAC,CAAE,KAAAU,CAAK,IAAMA,GAAM,MAAM,mBAA1B,SACV,CAAC,CACH,EAVuC","names":["queryOptions","useQuery","contractDocumentsOptions","__name","client","employmentId","queryOptions","response","getV1EmploymentsEmploymentIdContractDocuments","useGetContractDocuments","options","useClient","useQuery","data"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as I}from"./chunk-A3LRPGV3.js";import{a as N,b as j,c as D,d as O}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as I}from"./chunk-A3LRPGV3.js";import{a as N,b as j,c as D,d as O}from"./chunk-F62JZXCH.js";import{b as v}from"./chunk-NW3D7CPK.js";import{b as C,h as p,i as b,u as R,v as F}from"./chunk-C4HFMTSB.js";import{a as k}from"./chunk-M3TA5X2H.js";import{a as c}from"./chunk-P37U34EQ.js";import{useMemo as S,useRef as ee,useState as A}from"react";var pe=c(({countryCode:L,options:u,initialValues:l})=>{let P=N(),g=j(),{mutateAsync:q}=C(P),{mutateAsync:J}=C(g),[y,U]=A(L||null),[f,B]=A(null),w=ee({company_basic_information:{},address_details:{}}),{fieldValues:V,stepState:a,setFieldValues:W,previousStep:z,nextStep:G,goToStep:H}=k(I),{companyBasicInformationForm:d,isLoading:K}=D({jsfModify:u?.jsfModify?.company_basic_information,queryOptions:{enabled:a.currentStep.name==="company_basic_information"}}),{data:s,isLoading:Q}=O({countryCode:y,fieldValues:a.currentStep.name==="address_details"?{...a.values?.address_details||{},...V}:a.values?.address_details||{},options:{...u,jsfModify:u?.jsfModify?.address_details,queryOptions:{enabled:a.currentStep.name==="address_details"&&!!y&&!!f}}}),i=S(()=>({company_basic_information:d?.fields||[],address_details:s?.fields||[]}),[d?.fields,s?.fields]),X={company_basic_information:null,address_details:s?.meta?.["x-jsf-fieldsets"]||null},h=S(()=>b(i.company_basic_information,{...l,country_code:y||l?.country_code||""}),[i.company_basic_information,y,l]),E=S(()=>b(i.address_details,l||{}),[i.address_details,l]),Y=S(()=>({company_basic_information:h,address_details:E}),[h,E]),Z=c(o=>{H(o)},"goTo"),M=c(async o=>{let r=a.currentStep.name,e=i[r];return d&&r==="company_basic_information"?await p(o,e,{isPartialValidation:!1}):s&&r==="address_details"?await p(o,e,{isPartialValidation:!1}):{}},"parseFormValues");async function $(o){let r=a.currentStep.name,e=await M(o);switch(r in w.current&&(w.current[r]=R(e,i[r])),a.currentStep.name){case"company_basic_information":{if(U(e.country_code),f)return Promise.resolve({data:{countryCode:e.country_code??"",companyOwnerEmail:e.company_owner_email??"",companyOwnerName:e.company_owner_name??"",desiredCurrency:e.desired_currency??"",name:e.name??"",phoneNumber:e.phone_number??"",taxNumber:e.tax_number??""}});let x={country_code:e.country_code,company_owner_email:e.company_owner_email,company_owner_name:e.company_owner_name,desired_currency:e.desired_currency,name:e.name,phone_number:e.phone_number,tax_number:e.tax_number,terms_of_service_accepted_at:v()},n=await q(x);if(n.error)return Promise.resolve({data:null,error:n.error,rawError:n.rawError,fieldErrors:n.fieldErrors});let m=n.data?.data,_,t;if(m)if("data"in m&&m.data){let T=m.data.company;t=T,_=T?.id}else"company"in m&&(t=m.company,_=t?.id);return _&&B(_),Promise.resolve({data:{countryCode:t?.country_code??e.country_code??"",companyOwnerEmail:t?.company_owner_email??e.company_owner_email??"",companyOwnerName:t?.company_owner_name??e.company_owner_name??"",desiredCurrency:t?.desired_currency??e.desired_currency??"",name:t?.name??e.name??"",phoneNumber:t?.phone_number??e.phone_number??"",taxNumber:t?.tax_number??e.tax_number??""}})}case"address_details":{if(!f)throw F("Company ID is required to update address details");let n=await J({companyId:f,payload:{address_details:e},jsonSchemaVersion:u?.jsonSchemaVersion?.form_schema?.address_details});return n.error?Promise.resolve({data:null,error:n.error,rawError:n.rawError,fieldErrors:n.fieldErrors}):Promise.resolve({data:n.data})}default:throw F("Invalid step state")}}return c($,"onSubmit"),{isLoading:K||Q,isSubmitting:P.isPending||g.isPending,fieldValues:V,stepState:a,checkFieldUpdates:W,back:z,next:G,goTo:Z,onSubmit:$,fields:i[a.currentStep.name],meta:{fields:w.current,fieldsets:X[a.currentStep.name]},parseFormValues:M,handleValidation:c(async o=>{if(a.currentStep.name==="company_basic_information"&&d){let r=await p(o,d.fields,{isPartialValidation:!1});return d.handleValidation(r)}if(a.currentStep.name==="address_details"&&s){let r=await p(o,s.fields,{isPartialValidation:!1});return s.handleValidation(r)}return null},"handleValidation"),initialValues:Y}},"useCreateCompany");export{pe as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ONELHWYF.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-WC7TWLA7.js";import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-WC7TWLA7.js";import{a as t}from"./chunk-PUX6FYHV.js";import{a as m}from"./chunk-LFUMRNDK.js";import{a}from"./chunk-F6NFCJYW.js";import{a as n}from"./chunk-4MI7BMM5.js";import{a as r}from"./chunk-P37U34EQ.js";import{useId as S}from"react";import{jsx as y}from"react/jsx-runtime";var x=r(({defaultSchema:s,initialValues:d,schemas:u,onSubmit:c,onSchemaChange:P,onError:l,render:p})=>{let g=S(),o=e({defaultSchema:s,initialValues:d,schemas:u,onSubmit:c,onSchemaChange:P,onError:l});return y(n.Provider,{value:{formId:g,playgroundBag:o},children:p({playgroundBag:o,components:{Form:t,SubmitButton:a,ResetButton:m}})})},"JsonSchemaPlaygroundFlow");export{x as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OUVSBTOE.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as _}from"./chunk-JO5D2522.js";import{G as p,L as y,P as f,aa as h,k as c,wa as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as _}from"./chunk-JO5D2522.js";import{G as p,L as y,P as f,aa as h,k as c,wa as g}from"./chunk-FPCF4TH2.js";import{e as r}from"./chunk-H2O4CVKF.js";import{a as t}from"./chunk-P37U34EQ.js";import{useMutation as a,useQuery as F}from"@tanstack/react-query";var A=t((e,n,o,s,i)=>{let{client:x}=r(),d=s?.employmentId,u=s?.jurisdiction;return F({queryKey:["gp-employee-form-schema",e,n,d,u],enabled:!!e&&(s?.enabled??!0),retry:!1,queryFn:t(async()=>{let l={...d?{employment_id:d}:{},...u?{jurisdiction:u}:{}},m=await y({client:x,headers:{Authorization:""},path:{country_code:e,form:n},...Object.keys(l).length>0?{query:l}:{}});if(m.error||!m.data)throw new Error(`Failed to fetch ${n} schema`);return m},"queryFn"),select:t(({data:l})=>_(l?.data||{},o,i?{jsfModify:i}:void 0),"select")})},"useGPEmployeeFormSchema"),E=t(e=>{let{client:n}=r();return a({mutationFn:t(o=>{let{name:s,...i}=o;return h({client:n,headers:{Authorization:"","x-rf-employment-id":e},body:{personal_details:i}})},"mutationFn")})},"useGPUpdatePersonalDetails"),P=t(e=>{let{client:n}=r();return a({mutationFn:t(o=>p({client:n,headers:{Authorization:"","x-rf-employment-id":e},body:{address_details:o}}),"mutationFn")})},"useGPUpdateHomeAddress"),C=t(e=>{let{client:n}=r();return a({mutationFn:t(o=>c({client:n,headers:{Authorization:"","x-rf-employment-id":e},body:{bank_account_details:o}}),"mutationFn")})},"useGPUpdateBankAccount"),R=t(e=>{let{client:n}=r();return a({mutationFn:t(o=>f({client:n,headers:{Authorization:"","x-rf-employment-id":e},body:{federal_taxes:o}}),"mutationFn")})},"useGPUpdateFederalTaxes"),G=t((e,n)=>{let{client:o}=r();return a({mutationFn:t(s=>{if(!e)throw new Error("A `jurisdiction` (US state code) is required to submit state taxes.");return g({client:o,headers:{Authorization:"","x-rf-employment-id":n},path:{jurisdiction:e},body:{state_taxes:s}})},"mutationFn")})},"useGPUpdateStateTaxes");export{A as a,E as b,P as c,C as d,R as e,G as f};
|
|
2
|
+
//# sourceMappingURL=chunk-P4LSZLTJ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as b}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as b}from"./chunk-62EFEBHN.js";import{a as h,b as N,c as T,d as $,e as v,f as S}from"./chunk-QRSWXKRV.js";import{a as g}from"./chunk-2QVO3BVI.js";import{d as C,e as p,h as F,i as y}from"./chunk-NEVSZEMH.js";import{a as _}from"./chunk-P37U34EQ.js";import{jsx as e,jsxs as t}from"react/jsx-runtime";function B({field:f,fieldState:r,fieldData:n}){let{name:m,label:s,description:c,options:i,onChangeCountryCode:d,onChangePhoneNumber:w,currentCountry:o,nationalPhoneNumber:I}=n,R=o?`${o.name}-${o.dialCode}`:"";return t(C,{"data-field":m,className:`RemoteFlows__TelField__Item__${m}`,children:[s&&e(p,{className:"RemoteFlows__TelField__Label",children:s}),t("div",{className:"flex gap-2",children:[e("div",{className:"w-[180px]",children:t(h,{value:R,onValueChange:l=>{let a=i?.find(u=>`${u.label}-${u.meta?.countryCode}`===l);a&&d&&d({name:a.label,dialCode:a.meta?.countryCode||"",pattern:a.pattern||""})},children:[e($,{className:"RemoteFlows__TelField__CountrySelect","aria-invalid":!!r.error,"aria-label":"Country code",children:e("span",{className:"absolute",children:e(T,{placeholder:"Country code *",children:o&&`${o.name} +${o.dialCode}`})})}),e(v,{className:"RemoteFlows__TelField__CountryContent",children:e(N,{className:"RemoteFlows__TelField__CountryGroup",children:i?.map((l,a)=>t(S,{value:`${l.label}-${l.meta?.countryCode}`,className:"RemoteFlows__TelField__CountryItem",children:[l.label," +",l.meta?.countryCode]},`${l.label}-${l.meta?.countryCode}-${a}`))})})]})}),e("div",{className:"flex-1",children:e(g,{...f,type:"tel",value:I||"",onChange:w,className:"RemoteFlows__TelField__Input",placeholder:"Employee's phone number *","aria-invalid":!!r.error,"aria-label":"Phone number"})})]}),(c||n.meta?.helpCenter)&&e(F,{className:"RemoteFlows__TelField__Description",helpCenter:e(b,{helpCenter:n.meta?.helpCenter}),children:c}),r.error&&e(y,{})]})}_(B,"TelFieldDefault");export{B as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PE2UM2SW.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d,b as w}from"./chunk-BHTFKQJO.js";import{a as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d,b as w}from"./chunk-BHTFKQJO.js";import{a as g}from"./chunk-SDF4QRJ2.js";import{a as E}from"./chunk-JO5D2522.js";import{J as P,da as F,e as _}from"./chunk-FPCF4TH2.js";import{b as h,h as C}from"./chunk-C4HFMTSB.js";import{a as j}from"./chunk-M3TA5X2H.js";import{e as c}from"./chunk-H2O4CVKF.js";import{a as e}from"./chunk-P37U34EQ.js";import{useMutation as b,useQuery as I}from"@tanstack/react-query";var B=e(({countryCode:n,employment:r,fieldValues:a,options:t})=>{let{client:u}=c(),m=t?.jsonSchemaVersion?.contract_amendments?{json_schema_version:t.jsonSchemaVersion.contract_amendments}:{};return I({queryKey:["contract-amendment-schema"],retry:!1,queryFn:e(async()=>{let o=await _({client:u,headers:{Authorization:""},query:{employment_id:r?.id,country_code:n,...m}});if(o.error||!o.data)throw new Error("Failed to fetch contract amendment schema");return o},"queryFn"),enabled:!!r,select:e(({data:o})=>{let l=o?.data||{};return E(l,a,t)},"select")})},"useContractAmendmentSchemaQuery"),J=e(n=>{let{client:r}=c(),a=n?.jsonSchemaVersion?.contract_amendments?{json_schema_version:n.jsonSchemaVersion.contract_amendments}:{};return b({mutationFn:e(t=>P({client:r,headers:{Authorization:""},body:t,query:{...a}}),"mutationFn")})},"useCreateContractAmendmentMutation"),K=e(n=>{let{client:r}=c(),a=n?.jsonSchemaVersion?.contract_amendments?{json_schema_version:n.jsonSchemaVersion.contract_amendments}:{};return b({mutationFn:e(t=>F({client:r,headers:{Authorization:""},body:t,query:{...a}}),"mutationFn")})},"useAutomatableContractAmendmentMutation"),te=e(({employmentId:n,countryCode:r,options:a})=>{let{fieldValues:t,setFieldValues:u,stepState:m,nextStep:o,previousStep:l}=j(d),{data:i,isLoading:v,isError:q,error:Q}=g({employmentId:n,queryParams:{exclude_files:!0}}),{data:s,isLoading:L,isError:M,error:T}=B({employment:i,countryCode:r,fieldValues:{...m.values?.[m.currentStep.name],...t},options:a}),k=w(i,s?.fields),S=J(a),A=K(a);async function x(p){let f=await C(p,s?.fields||[],{isPartialValidation:!1}),V={employment_id:i?.id,amendment_contract_id:i?.active_contract_id,contract_amendment:{...f}};switch(m.currentStep.name){case d.form.name:{let{mutateAsync:y}=h(A),H=await y(V);return o(),H}case d.confirmation_form.name:{let{mutateAsync:y}=h(S);return y(V)}default:throw new Error("Invalid step state")}}e(x,"onSubmit");async function z(p){if(s){let f=await C(p,s?.fields);return s?.handleValidation(f)}return null}e(z,"handleValidation");function O(){l()}return e(O,"back"),{stepState:m,fields:s?.fields||[],isLoading:v||L,isError:q||M,error:Q||T,isSubmitting:A.isPending||S.isPending,initialValues:k,values:t,handleValidation:z,checkFieldUpdates:u,onSubmit:x,back:O}},"useContractAmendment");export{te as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PGS35CGC.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as w,e as V,h as F}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as w,e as V,h as F}from"./chunk-LVYZIOOZ.js";import{b as S}from"./chunk-AXZ4IDY7.js";import{a as P}from"./chunk-SDF4QRJ2.js";import{b as c,h as l,t as p}from"./chunk-C4HFMTSB.js";import{a as h}from"./chunk-P37U34EQ.js";import{useCallback as a,useState as _}from"react";var J=h(({employmentId:e,jsfModify:I})=>{let[C,g]=_({}),{data:y,isLoading:T}=P({employmentId:e,enabled:!!e}),u=y?.contractor_type==="cor",{data:i,isLoading:b}=w({enabled:!0,employmentId:e,jsfModify:I,includeOneTime:!0,isContractorOfRecord:u,includeCustomDays:!0,fieldValues:C}),d=V(),{mutateAsyncOrThrow:v}=c(d),m=F(),{mutateAsyncOrThrow:f}=c(m),O=a(o=>{g(o)},[]),L=a(async o=>{if(!i)return null;let n=await l(o,i.fields,{isPartialValidation:!1});return i.handleValidation(n)??null},[i]),t=a(async o=>await l(o,i?.fields??[],{isPartialValidation:!1}),[i]),R=a(async o=>{let n=await t(o);return{employment_id:e,...S(n)}},[e,t]),r=a(()=>{if(!e)throw new Error("No contractor to act on. Pass a non-empty `employmentId` to the flow.")},[e]),E=a(async o=>{r();let n=await t(o),s=(await f({employmentId:e,values:n}))?.data?.contractor_invoice_preview;if(s)return{...s,content:p(s.content)}},[r,e,t,f]),M=a(async o=>{r();let n=await t(o);return v({employmentId:e,values:n})},[r,e,v,t]);return{fields:i?.fields??[],handleValidation:L,parseFormValues:R,onSubmit:M,previewInvoice:E,checkFieldUpdates:O,employmentId:e,isSubmitting:d.isPending,isPreviewingInvoice:m.isPending,isLoading:!e||T||b&&!i,isContractorOfRecord:u,meta:{fields:i?.fields}}},"useInvoiceSchedule");export{J as a};
|
|
2
|
+
//# sourceMappingURL=chunk-POA6NSFQ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as m}from"./chunk-4MI7BMM5.js";import{a as i}from"./chunk-AFTFDGSD.js";import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as m}from"./chunk-4MI7BMM5.js";import{a as i}from"./chunk-AFTFDGSD.js";import{a as l}from"./chunk-QYA7D7ZQ.js";import{a as d}from"./chunk-NEVSZEMH.js";import{a as n}from"./chunk-P37U34EQ.js";import{useEffect as p}from"react";import{jsx as r}from"react/jsx-runtime";var h=n(({onSubmit:s,className:e,components:c})=>{let{formId:u,playgroundBag:o}=m(),a=i({handleValidation:o.handleValidation,defaultValues:o.initialValues,checkFieldUpdates:o.checkFieldUpdates});p(()=>{o.checkFieldUpdates(a.getValues())},[]);let f=n(async t=>{await o.handleSubmit(t),s?.(t)},"handleFormSubmit");return r(d,{...a,children:r("form",{id:u,onSubmit:a.handleSubmit(f),className:e,children:r(l,{components:c,fields:o.fields??[],fieldValues:o.fieldValues,fieldsets:o.meta["x-jsf-fieldsets"]})})})},"JsonSchemaPlaygroundFormInner"),J=n(s=>{let{playgroundBag:e}=m();return r(h,{...s},`form-${e.selectedSchema}-${e.resetKey}`)},"JsonSchemaPlaygroundForm");export{J as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PUX6FYHV.js.map
|