@remoteoss/remote-flows 1.15.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ButtonDefault-6LBHWUQH.js +2 -0
- package/dist/CheckboxFieldDefault-X4DYVQCE.js +2 -0
- package/dist/CountryFieldDefault-JZDE75HS.js +2 -0
- package/dist/DatePickerFieldDefault-LJV4QSEP.js +2 -0
- package/dist/DrawerDefault-FLNSDSMB.js +2 -0
- package/dist/EmailFieldDefault-T6HHE5RL.js +2 -0
- package/dist/FieldsetToggleButtonDefault-MXBQJ55Q.js +2 -0
- package/dist/FileUploadFieldDefault-5NW3ZFXD.js +2 -0
- package/dist/MultiSelectFieldDefault-OQ6SNNBI.js +2 -0
- package/dist/NumberFieldDefault-IVUTWJS5.js +2 -0
- package/dist/PDFPreviewDefault-HSSMYKV5.js +2 -0
- package/dist/RadioGroupFieldDefault-CXY33ONT.js +2 -0
- package/dist/SelectFieldDefault-66GGFDX3.js +2 -0
- package/dist/StatementDefault-DORMITL7.js +2 -0
- package/dist/TableFieldDefault-URJVK7YR.js +2 -0
- package/dist/TextAreaFieldDefault-5H34RRBA.js +2 -0
- package/dist/TextFieldDefault-VHIF2KLF.js +2 -0
- package/dist/WorkScheduleFieldDefault-T7IP52VU.js +2 -0
- package/dist/ZendeskDrawerDefault-YSBMA2ZH.js +2 -0
- package/dist/chunk-246D2A55.js +2 -0
- package/dist/{chunk-47YUPC2L.js.map → chunk-246D2A55.js.map} +1 -1
- package/dist/chunk-3474OEAS.js +2 -0
- package/dist/chunk-3474OEAS.js.map +1 -0
- package/dist/{chunk-D6KO5LX6.js → chunk-37RMY44V.js} +2 -2
- package/dist/{chunk-D5YMIXK5.js → chunk-3B6XXK5H.js} +2 -2
- package/dist/{chunk-AFJIZDZG.js → chunk-3BBQDNZD.js} +2 -2
- package/dist/{chunk-CD6F3H7B.js → chunk-3DMWQJ5W.js} +2 -2
- package/dist/chunk-3NB2BN46.js +2 -0
- package/dist/chunk-3NB2BN46.js.map +1 -0
- package/dist/{chunk-UXHMIIOB.js → chunk-44RIEWXA.js} +2 -2
- package/dist/{chunk-AB3RAEMM.js → chunk-4EMAROPQ.js} +2 -2
- package/dist/{chunk-Z4STVEJE.js → chunk-4HPV2VMI.js} +2 -2
- package/dist/{chunk-3ACL4IFO.js → chunk-4N4MQECC.js} +2 -2
- package/dist/{chunk-2ZS5F6C7.js → chunk-4UO7KLRK.js} +2 -2
- package/dist/chunk-5FTC6HMG.js +2 -0
- package/dist/chunk-5FTC6HMG.js.map +1 -0
- package/dist/{chunk-BIDZO7XH.js → chunk-62O3CKKH.js} +2 -2
- package/dist/{chunk-ZIXR3VSB.js → chunk-6AAV34CT.js} +2 -2
- package/dist/{chunk-PQP3KZ7P.js → chunk-6MAQMAY5.js} +2 -2
- package/dist/{chunk-H463PCBN.js → chunk-6SSDV2GX.js} +2 -2
- package/dist/chunk-7ENB7H4E.js +6 -0
- package/dist/{chunk-KJQN6GHW.js.map → chunk-7ENB7H4E.js.map} +1 -1
- package/dist/{chunk-ZPDZ6V5R.js → chunk-7G5JSUZU.js} +2 -2
- package/dist/{chunk-T7CGGZOK.js → chunk-7RP5F62S.js} +2 -2
- package/dist/chunk-7WGZGAQY.js +2 -0
- package/dist/chunk-7WGZGAQY.js.map +1 -0
- package/dist/{chunk-XO5VURZY.js → chunk-A232PIG7.js} +2 -2
- package/dist/{chunk-FI2MVRZR.js → chunk-AJCKNHZB.js} +2 -2
- package/dist/{chunk-VOUP5SMR.js → chunk-AJIDQALB.js} +2 -2
- package/dist/{chunk-UXP2IITO.js → chunk-ALVZNFB7.js} +2 -2
- package/dist/{chunk-SZVBNL6O.js → chunk-B2CNIT3P.js} +2 -2
- package/dist/{chunk-OCTMRR2C.js → chunk-B66V5QEC.js} +2 -2
- package/dist/{chunk-DI2QNZ2O.js → chunk-B7EJ2OAA.js} +2 -2
- package/dist/{chunk-HLAKUOQB.js → chunk-BG66XH5L.js} +2 -2
- package/dist/{chunk-NOY2YNXO.js → chunk-BGRX3DBF.js} +2 -2
- package/dist/{chunk-I7JUAYNN.js → chunk-BVFQ6LFD.js} +2 -2
- package/dist/{chunk-RM7W6QA7.js → chunk-C6KWUSCU.js} +2 -2
- package/dist/{chunk-MTOXXQYK.js → chunk-CARPUKT7.js} +2 -2
- package/dist/{chunk-7TOCURKO.js → chunk-DFAY4TWC.js} +2 -2
- package/dist/{chunk-O5ENJKI6.js → chunk-DNDYXEZ6.js} +2 -2
- package/dist/{chunk-46QJ44CZ.js → chunk-DXIJUMLU.js} +2 -2
- package/dist/{chunk-RFMIAO6J.js → chunk-EDLQ3JNY.js} +2 -2
- package/dist/{chunk-TZCNONDA.js → chunk-EHD2YB5F.js} +2 -2
- package/dist/{chunk-GLKITZNI.js → chunk-ERSP6CZ3.js} +2 -2
- package/dist/{chunk-RKS3FX3C.js → chunk-FERWQW33.js} +2 -2
- package/dist/{chunk-5R66NDTQ.js → chunk-FUGPVPYX.js} +2 -2
- package/dist/{chunk-JXXZH6KH.js → chunk-G6QGYKPO.js} +2 -2
- package/dist/{chunk-ZSJ6YADQ.js → chunk-H2JFQGQJ.js} +2 -2
- package/dist/{chunk-C36VO7DO.js → chunk-HFI3LXZ2.js} +2 -2
- package/dist/{chunk-MCGUHRQL.js → chunk-HKNK5Z6N.js} +2 -2
- package/dist/{chunk-5F7FMTGE.js → chunk-HOR3KPOZ.js} +2 -2
- package/dist/{chunk-WLMHGJWB.js → chunk-HUZBKPGP.js} +2 -2
- package/dist/chunk-HYYILYKU.js +2 -0
- package/dist/chunk-HYYILYKU.js.map +1 -0
- package/dist/{chunk-7SVSJ7NG.js → chunk-I3TP6JKM.js} +2 -2
- package/dist/{chunk-D67Z4NEP.js → chunk-IGLKMXWJ.js} +2 -2
- package/dist/chunk-IHGCXP2X.js +2 -0
- package/dist/chunk-IHGCXP2X.js.map +1 -0
- package/dist/{chunk-IHVEK72X.js → chunk-IMVVZZFZ.js} +2 -2
- package/dist/chunk-IZGJP7OI.js +2 -0
- package/dist/chunk-IZGJP7OI.js.map +1 -0
- package/dist/{chunk-ZKS7DJDT.js → chunk-J2BTEUAM.js} +2 -2
- package/dist/{chunk-KUTIJABX.js → chunk-JI4CYPLW.js} +2 -2
- package/dist/{chunk-OV7TLEE6.js → chunk-KQKH3H6S.js} +2 -2
- package/dist/{chunk-6VQEAU6A.js → chunk-KRSUSMJK.js} +2 -2
- package/dist/{chunk-FBE7F5HU.js → chunk-L3LOATSG.js} +2 -2
- package/dist/{chunk-3PVZEAGI.js → chunk-L5DII4MV.js} +2 -2
- package/dist/{chunk-A37NW25N.js → chunk-LJIJ6UKB.js} +2 -2
- package/dist/{chunk-D36BZQTP.js → chunk-LVXV3GHT.js} +2 -2
- package/dist/{chunk-6DRAZSGG.js → chunk-MHAY555P.js} +2 -2
- package/dist/{chunk-37RBGAMM.js → chunk-MLVB5MYU.js} +2 -2
- package/dist/{chunk-CU3WQ2KN.js → chunk-MSBCYMSH.js} +2 -2
- package/dist/chunk-MTYN4AM3.js +2 -0
- package/dist/{chunk-NZ64KNDV.js → chunk-NAH5PAUK.js} +2 -2
- package/dist/{chunk-IF42CZJH.js → chunk-NEKE5PRJ.js} +2 -2
- package/dist/{chunk-2DCJODMR.js → chunk-NEWXVHFX.js} +2 -2
- package/dist/{chunk-MUJT3F2Q.js → chunk-NMLBGBK2.js} +2 -2
- package/dist/{chunk-DCB2H2SG.js → chunk-O6IBNOQU.js} +2 -2
- package/dist/{chunk-HU453KWI.js → chunk-OB2J5WSO.js} +2 -2
- package/dist/{chunk-XLTZ7SN3.js → chunk-OENTT2KT.js} +2 -2
- package/dist/{chunk-FKYEST54.js → chunk-PHPCCABU.js} +2 -2
- package/dist/{chunk-AS4ND5IO.js → chunk-PKK2EEXH.js} +2 -2
- package/dist/{chunk-HMMFY4PV.js → chunk-Q73675NI.js} +2 -2
- package/dist/{chunk-M4BR3FKN.js → chunk-R7BHA5RA.js} +2 -2
- package/dist/{chunk-IUCFOQAD.js → chunk-RAH453TV.js} +2 -2
- package/dist/{chunk-4YPJKEHT.js → chunk-RJY6AEJB.js} +2 -2
- package/dist/{chunk-CQ2EF32E.js → chunk-RYQQDPI7.js} +2 -2
- package/dist/chunk-SLD227LM.js +2 -0
- package/dist/chunk-SLD227LM.js.map +1 -0
- package/dist/{chunk-VSYION5R.js → chunk-SLLDKJ7K.js} +2 -2
- package/dist/{chunk-JEULZR34.js → chunk-SNBAM7SA.js} +2 -2
- package/dist/{chunk-ZPG6GRAX.js → chunk-SNECOPBD.js} +2 -2
- package/dist/{chunk-BDMCADQ6.js → chunk-SS2FAFUZ.js} +2 -2
- package/dist/{chunk-TGLB5MA2.js → chunk-TAHMDXUS.js} +2 -2
- package/dist/{chunk-JJEFWMLY.js → chunk-TFSRZOMP.js} +2 -2
- package/dist/{chunk-W5EXVAEO.js → chunk-TNN3W5TU.js} +2 -2
- package/dist/{chunk-D5NBOIPS.js → chunk-TOQPDTGG.js} +2 -2
- package/dist/chunk-TPGM3OIU.js +2 -0
- package/dist/chunk-TPGM3OIU.js.map +1 -0
- package/dist/{chunk-HN7ZP5AX.js → chunk-TPGN6QTL.js} +2 -2
- package/dist/{chunk-OJ3HJ7QL.js → chunk-TQXCLXWH.js} +2 -2
- package/dist/{chunk-RQRODRCR.js → chunk-TRBEYNRN.js} +2 -2
- package/dist/{chunk-OK3CYSHV.js → chunk-TXQWBDNF.js} +2 -2
- package/dist/chunk-UB6PYKNX.js +2 -0
- package/dist/chunk-UB6PYKNX.js.map +1 -0
- package/dist/{chunk-4ZQ7NOAL.js → chunk-ULP5B6DG.js} +2 -2
- package/dist/{chunk-OPWMRKZP.js → chunk-UMVA4SIV.js} +2 -2
- package/dist/{chunk-RNXUKKPF.js → chunk-UMVMNUPH.js} +2 -2
- package/dist/{chunk-5TBUDUEB.js → chunk-VBQVXR4U.js} +2 -2
- package/dist/{chunk-3PIJOIYR.js → chunk-VIGKOVHP.js} +2 -2
- package/dist/{chunk-3PIJOIYR.js.map → chunk-VIGKOVHP.js.map} +1 -1
- package/dist/{chunk-W2PJUNWX.js → chunk-VLSOHNT2.js} +2 -2
- package/dist/{chunk-PS5T7URZ.js → chunk-W4ECFBIA.js} +2 -2
- package/dist/{chunk-LWGNRGU3.js → chunk-WD2JGIDK.js} +2 -2
- package/dist/{chunk-BC4UT7KC.js → chunk-WEAO46EO.js} +2 -2
- package/dist/{chunk-2J4XRENJ.js → chunk-XHAJ544L.js} +2 -2
- package/dist/{chunk-KCTY6YAP.js → chunk-XU3B7N3C.js} +2 -2
- package/dist/{chunk-S63QGDMR.js → chunk-YOIXPHGR.js} +2 -2
- package/dist/chunk-YOIXPHGR.js.map +1 -0
- package/dist/{chunk-LDWPRPN4.js → chunk-YPUP5LNV.js} +2 -2
- package/dist/{chunk-I2ED6EUG.js → chunk-YWZHBXEI.js} +2 -2
- package/dist/{chunk-5GAFQRDA.js → chunk-ZAFGVOU5.js} +2 -2
- package/dist/{chunk-EPLPD54O.js → chunk-ZWIH53GL.js} +2 -2
- package/dist/default-components.d.ts +2 -2
- package/dist/default-components.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +3 -3
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
- package/dist/flows/ContractAmendment/context.d.ts +3 -3
- package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
- package/dist/flows/ContractAmendment/hooks.js +1 -1
- package/dist/flows/ContractAmendment/index.d.ts +3 -3
- package/dist/flows/ContractAmendment/index.js +1 -1
- package/dist/flows/ContractAmendment/types.d.ts +2 -2
- package/dist/flows/ContractAmendment/utils.d.ts +2 -2
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +5 -6
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
- package/dist/flows/ContractorOnboarding/api.d.ts +14 -20
- package/dist/flows/ContractorOnboarding/api.js +1 -1
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +5 -6
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractPreviewHeader.d.ts +2 -2
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.d.ts +2 -2
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +5 -6
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +5 -6
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
- package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.d.ts +5 -6
- package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
- package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
- package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +5 -6
- package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/StatementOfWorkDisclaimer.js +1 -1
- package/dist/flows/ContractorOnboarding/context.d.ts +5 -11
- package/dist/flows/ContractorOnboarding/hooks.d.ts +5 -6
- package/dist/flows/ContractorOnboarding/hooks.js +1 -1
- package/dist/flows/ContractorOnboarding/index.d.ts +5 -6
- package/dist/flows/ContractorOnboarding/index.js +1 -1
- package/dist/flows/ContractorOnboarding/jsfModify.d.ts +5 -6
- package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
- package/dist/flows/ContractorOnboarding/types.d.ts +8 -9
- package/dist/flows/ContractorOnboarding/utils.d.ts +6 -5
- package/dist/flows/ContractorOnboarding/utils.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
- package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
- package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorResetButton.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorSubmitButton.js +1 -1
- package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +2 -2
- package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
- package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +2 -2
- package/dist/flows/CostCalculator/SummaryResults/SummaryResults.js +1 -1
- package/dist/flows/CostCalculator/api.d.ts +2 -2
- package/dist/flows/CostCalculator/api.js +1 -1
- package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
- package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
- package/dist/flows/CostCalculator/context.d.ts +3 -3
- package/dist/flows/CostCalculator/hooks.d.ts +3 -3
- package/dist/flows/CostCalculator/hooks.js +1 -1
- package/dist/flows/CostCalculator/index.d.ts +3 -3
- package/dist/flows/CostCalculator/index.js +1 -1
- package/dist/flows/CostCalculator/types.d.ts +2 -2
- package/dist/flows/CostCalculator/utils.d.ts +3 -3
- package/dist/flows/CostCalculator/utils.js +1 -1
- package/dist/flows/CreateCompany/CreateCompany.d.ts +4 -4
- package/dist/flows/CreateCompany/CreateCompany.js +1 -1
- package/dist/flows/CreateCompany/api.d.ts +2 -2
- package/dist/flows/CreateCompany/api.js +1 -1
- package/dist/flows/CreateCompany/components/AddressDetailsStep.d.ts +4 -4
- package/dist/flows/CreateCompany/components/AddressDetailsStep.js +1 -1
- package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.d.ts +4 -4
- package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.js +1 -1
- package/dist/flows/CreateCompany/components/CreateCompanyForm.d.ts +2 -2
- package/dist/flows/CreateCompany/components/CreateCompanyForm.js +1 -1
- package/dist/flows/CreateCompany/context.d.ts +4 -4
- package/dist/flows/CreateCompany/hooks.d.ts +4 -4
- package/dist/flows/CreateCompany/hooks.js +1 -1
- package/dist/flows/CreateCompany/index.d.ts +4 -4
- package/dist/flows/CreateCompany/index.js +1 -1
- package/dist/flows/CreateCompany/types.d.ts +4 -4
- package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
- package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
- package/dist/flows/Onboarding/api.d.ts +4 -4
- package/dist/flows/Onboarding/api.js +1 -1
- package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
- package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
- package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/Onboarding/components/BenefitsStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
- package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingForm.d.ts +4 -4
- package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
- package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
- package/dist/flows/Onboarding/components/ReviewStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
- package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/Onboarding/context.d.ts +4 -4
- package/dist/flows/Onboarding/hooks.d.ts +4 -4
- package/dist/flows/Onboarding/hooks.js +1 -1
- package/dist/flows/Onboarding/index.d.ts +4 -4
- package/dist/flows/Onboarding/index.js +1 -1
- package/dist/flows/Onboarding/types.d.ts +4 -4
- package/dist/flows/Onboarding/utils.d.ts +4 -4
- package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -4
- package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
- package/dist/flows/Termination/EmployeeComunicationForm.d.ts +4 -4
- package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
- package/dist/flows/Termination/PaidTimeOffForm.d.ts +4 -4
- package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
- package/dist/flows/Termination/TerminationDetailsForm.d.ts +4 -4
- package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
- package/dist/flows/Termination/TerminationFlow.d.ts +4 -4
- package/dist/flows/Termination/TerminationFlow.js +1 -1
- package/dist/flows/Termination/TerminationForm.d.ts +4 -4
- package/dist/flows/Termination/TerminationForm.js +1 -1
- package/dist/flows/Termination/api.d.ts +5 -5
- package/dist/flows/Termination/api.js +1 -1
- package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformation.js +1 -1
- package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +6 -6
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.js +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +6 -6
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +6 -6
- package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
- package/dist/flows/Termination/components/TerminationReasonsDetailContent/TerminationReasonsDetailContent.js +1 -1
- package/dist/flows/Termination/context.d.ts +4 -4
- package/dist/flows/Termination/hooks.d.ts +4 -4
- package/dist/flows/Termination/hooks.js +1 -1
- package/dist/flows/Termination/index.d.ts +6 -6
- package/dist/flows/Termination/index.js +1 -1
- package/dist/flows/Termination/json-schemas/jsonSchema.js +1 -1
- package/dist/flows/Termination/json-schemas/schema.d.ts +4 -4
- package/dist/flows/Termination/json-schemas/schema.js +1 -1
- package/dist/flows/Termination/types.d.ts +4 -4
- package/dist/flows/Termination/utils.d.ts +4 -4
- package/dist/flows/Termination/utils.js +1 -1
- package/dist/flows/types.d.ts +2 -2
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +11 -12
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/internals.d.ts +3 -3
- package/dist/internals.js +1 -1
- package/dist/{mutations-B8OzuyhA.d.ts → mutations-Cqu0sBct.d.ts} +1 -1
- package/dist/{remoteFlows-Bphgh2nl.d.ts → remoteFlows-Dq_HhlrK.d.ts} +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/dist/{types-Ck-iVGL_.d.ts → types-6I1B0MOG.d.ts} +2 -2
- package/dist/{types-Dcg5CIEH.d.ts → types-BxDv4R-M.d.ts} +3 -3
- package/dist/{types-Dr-apmY1.d.ts → types-C4ZurZsm.d.ts} +11 -15
- package/dist/{types-Bs66Ma28.d.ts → types-CpquG01D.d.ts} +3 -3
- package/dist/{types-Jy-_3Y7m.d.ts → types-Cspu8sBY.d.ts} +1 -1
- package/dist/{types.gen-Yvu8ksE5.d.ts → types.gen-DOfO2pGp.d.ts} +1 -1
- package/dist/{utils-C8T9BiQ3.d.ts → utils-DOln70Os.d.ts} +1 -1
- package/package.json +1 -3
- package/dist/ButtonDefault-C5BX67YU.js +0 -2
- package/dist/CheckboxFieldDefault-HEIDOSI7.js +0 -2
- package/dist/CountryFieldDefault-DJ7VD267.js +0 -2
- package/dist/DatePickerFieldDefault-ZWLN5P55.js +0 -2
- package/dist/DrawerDefault-I7PMYMPK.js +0 -2
- package/dist/EmailFieldDefault-T7YHR6EN.js +0 -2
- package/dist/FieldsetToggleButtonDefault-4JT4HGZ5.js +0 -2
- package/dist/FileUploadFieldDefault-66JYQDRY.js +0 -2
- package/dist/MultiSelectFieldDefault-ZECWDTTO.js +0 -2
- package/dist/NumberFieldDefault-IOL6KD5M.js +0 -2
- package/dist/PDFPreviewDefault-LVWCRQ6A.js +0 -2
- package/dist/RadioGroupFieldDefault-7SVQ7ZQQ.js +0 -2
- package/dist/SelectFieldDefault-HYT2DRK4.js +0 -2
- package/dist/StatementDefault-HUOZEIEC.js +0 -2
- package/dist/TableFieldDefault-OACG7RGJ.js +0 -2
- package/dist/TextAreaFieldDefault-KCPQWVZX.js +0 -2
- package/dist/TextFieldDefault-MUGUO7GT.js +0 -2
- package/dist/WorkScheduleFieldDefault-CHW2ODQK.js +0 -2
- package/dist/ZendeskDrawerDefault-NYESVAZM.js +0 -2
- package/dist/chunk-3FCX7SWN.js +0 -2
- package/dist/chunk-3FCX7SWN.js.map +0 -1
- package/dist/chunk-3XG2MGD3.js +0 -2
- package/dist/chunk-3XG2MGD3.js.map +0 -1
- package/dist/chunk-42R2H2DW.js +0 -2
- package/dist/chunk-47YUPC2L.js +0 -2
- package/dist/chunk-4SGUDT5K.js +0 -2
- package/dist/chunk-4SGUDT5K.js.map +0 -1
- package/dist/chunk-AJ7L3ZO3.js +0 -2
- package/dist/chunk-AJ7L3ZO3.js.map +0 -1
- package/dist/chunk-DI3XZUMY.js +0 -2
- package/dist/chunk-DI3XZUMY.js.map +0 -1
- package/dist/chunk-E6256SK7.js +0 -2
- package/dist/chunk-E6256SK7.js.map +0 -1
- package/dist/chunk-JITSAYF7.js +0 -2
- package/dist/chunk-JITSAYF7.js.map +0 -1
- package/dist/chunk-KJQN6GHW.js +0 -6
- package/dist/chunk-QORZCJSR.js +0 -2
- package/dist/chunk-QORZCJSR.js.map +0 -1
- package/dist/chunk-S63QGDMR.js.map +0 -1
- package/dist/chunk-STEDOWHX.js +0 -2
- package/dist/chunk-STEDOWHX.js.map +0 -1
- package/dist/chunk-VGIG5OUD.js +0 -2
- package/dist/chunk-VGIG5OUD.js.map +0 -1
- package/dist/chunk-VLKG3SNS.js +0 -2
- package/dist/chunk-VLKG3SNS.js.map +0 -1
- package/dist/chunk-YA2G4A3K.js +0 -2
- package/dist/chunk-YA2G4A3K.js.map +0 -1
- package/dist/flows/ContractorOnboarding/components/ChooseAlternativePlanStep.d.ts +0 -29
- package/dist/flows/ContractorOnboarding/components/ChooseAlternativePlanStep.js +0 -2
- package/dist/flows/ContractorOnboarding/components/ChooseAlternativePlanStep.js.map +0 -1
- package/dist/flows/ContractorOnboarding/json-schemas/chooseAlternativePlanStep.d.ts +0 -23
- package/dist/flows/ContractorOnboarding/json-schemas/chooseAlternativePlanStep.js +0 -2
- package/dist/flows/ContractorOnboarding/json-schemas/chooseAlternativePlanStep.js.map +0 -1
- /package/dist/{ButtonDefault-C5BX67YU.js.map → ButtonDefault-6LBHWUQH.js.map} +0 -0
- /package/dist/{CheckboxFieldDefault-HEIDOSI7.js.map → CheckboxFieldDefault-X4DYVQCE.js.map} +0 -0
- /package/dist/{CountryFieldDefault-DJ7VD267.js.map → CountryFieldDefault-JZDE75HS.js.map} +0 -0
- /package/dist/{DatePickerFieldDefault-ZWLN5P55.js.map → DatePickerFieldDefault-LJV4QSEP.js.map} +0 -0
- /package/dist/{DrawerDefault-I7PMYMPK.js.map → DrawerDefault-FLNSDSMB.js.map} +0 -0
- /package/dist/{EmailFieldDefault-T7YHR6EN.js.map → EmailFieldDefault-T6HHE5RL.js.map} +0 -0
- /package/dist/{FieldsetToggleButtonDefault-4JT4HGZ5.js.map → FieldsetToggleButtonDefault-MXBQJ55Q.js.map} +0 -0
- /package/dist/{FileUploadFieldDefault-66JYQDRY.js.map → FileUploadFieldDefault-5NW3ZFXD.js.map} +0 -0
- /package/dist/{MultiSelectFieldDefault-ZECWDTTO.js.map → MultiSelectFieldDefault-OQ6SNNBI.js.map} +0 -0
- /package/dist/{NumberFieldDefault-IOL6KD5M.js.map → NumberFieldDefault-IVUTWJS5.js.map} +0 -0
- /package/dist/{PDFPreviewDefault-LVWCRQ6A.js.map → PDFPreviewDefault-HSSMYKV5.js.map} +0 -0
- /package/dist/{RadioGroupFieldDefault-7SVQ7ZQQ.js.map → RadioGroupFieldDefault-CXY33ONT.js.map} +0 -0
- /package/dist/{SelectFieldDefault-HYT2DRK4.js.map → SelectFieldDefault-66GGFDX3.js.map} +0 -0
- /package/dist/{StatementDefault-HUOZEIEC.js.map → StatementDefault-DORMITL7.js.map} +0 -0
- /package/dist/{TableFieldDefault-OACG7RGJ.js.map → TableFieldDefault-URJVK7YR.js.map} +0 -0
- /package/dist/{TextAreaFieldDefault-KCPQWVZX.js.map → TextAreaFieldDefault-5H34RRBA.js.map} +0 -0
- /package/dist/{TextFieldDefault-MUGUO7GT.js.map → TextFieldDefault-VHIF2KLF.js.map} +0 -0
- /package/dist/{WorkScheduleFieldDefault-CHW2ODQK.js.map → WorkScheduleFieldDefault-T7IP52VU.js.map} +0 -0
- /package/dist/{ZendeskDrawerDefault-NYESVAZM.js.map → ZendeskDrawerDefault-YSBMA2ZH.js.map} +0 -0
- /package/dist/{chunk-D6KO5LX6.js.map → chunk-37RMY44V.js.map} +0 -0
- /package/dist/{chunk-D5YMIXK5.js.map → chunk-3B6XXK5H.js.map} +0 -0
- /package/dist/{chunk-AFJIZDZG.js.map → chunk-3BBQDNZD.js.map} +0 -0
- /package/dist/{chunk-CD6F3H7B.js.map → chunk-3DMWQJ5W.js.map} +0 -0
- /package/dist/{chunk-UXHMIIOB.js.map → chunk-44RIEWXA.js.map} +0 -0
- /package/dist/{chunk-AB3RAEMM.js.map → chunk-4EMAROPQ.js.map} +0 -0
- /package/dist/{chunk-Z4STVEJE.js.map → chunk-4HPV2VMI.js.map} +0 -0
- /package/dist/{chunk-3ACL4IFO.js.map → chunk-4N4MQECC.js.map} +0 -0
- /package/dist/{chunk-2ZS5F6C7.js.map → chunk-4UO7KLRK.js.map} +0 -0
- /package/dist/{chunk-BIDZO7XH.js.map → chunk-62O3CKKH.js.map} +0 -0
- /package/dist/{chunk-ZIXR3VSB.js.map → chunk-6AAV34CT.js.map} +0 -0
- /package/dist/{chunk-PQP3KZ7P.js.map → chunk-6MAQMAY5.js.map} +0 -0
- /package/dist/{chunk-H463PCBN.js.map → chunk-6SSDV2GX.js.map} +0 -0
- /package/dist/{chunk-ZPDZ6V5R.js.map → chunk-7G5JSUZU.js.map} +0 -0
- /package/dist/{chunk-T7CGGZOK.js.map → chunk-7RP5F62S.js.map} +0 -0
- /package/dist/{chunk-XO5VURZY.js.map → chunk-A232PIG7.js.map} +0 -0
- /package/dist/{chunk-FI2MVRZR.js.map → chunk-AJCKNHZB.js.map} +0 -0
- /package/dist/{chunk-VOUP5SMR.js.map → chunk-AJIDQALB.js.map} +0 -0
- /package/dist/{chunk-UXP2IITO.js.map → chunk-ALVZNFB7.js.map} +0 -0
- /package/dist/{chunk-SZVBNL6O.js.map → chunk-B2CNIT3P.js.map} +0 -0
- /package/dist/{chunk-OCTMRR2C.js.map → chunk-B66V5QEC.js.map} +0 -0
- /package/dist/{chunk-DI2QNZ2O.js.map → chunk-B7EJ2OAA.js.map} +0 -0
- /package/dist/{chunk-HLAKUOQB.js.map → chunk-BG66XH5L.js.map} +0 -0
- /package/dist/{chunk-NOY2YNXO.js.map → chunk-BGRX3DBF.js.map} +0 -0
- /package/dist/{chunk-I7JUAYNN.js.map → chunk-BVFQ6LFD.js.map} +0 -0
- /package/dist/{chunk-RM7W6QA7.js.map → chunk-C6KWUSCU.js.map} +0 -0
- /package/dist/{chunk-MTOXXQYK.js.map → chunk-CARPUKT7.js.map} +0 -0
- /package/dist/{chunk-7TOCURKO.js.map → chunk-DFAY4TWC.js.map} +0 -0
- /package/dist/{chunk-O5ENJKI6.js.map → chunk-DNDYXEZ6.js.map} +0 -0
- /package/dist/{chunk-46QJ44CZ.js.map → chunk-DXIJUMLU.js.map} +0 -0
- /package/dist/{chunk-RFMIAO6J.js.map → chunk-EDLQ3JNY.js.map} +0 -0
- /package/dist/{chunk-TZCNONDA.js.map → chunk-EHD2YB5F.js.map} +0 -0
- /package/dist/{chunk-GLKITZNI.js.map → chunk-ERSP6CZ3.js.map} +0 -0
- /package/dist/{chunk-RKS3FX3C.js.map → chunk-FERWQW33.js.map} +0 -0
- /package/dist/{chunk-5R66NDTQ.js.map → chunk-FUGPVPYX.js.map} +0 -0
- /package/dist/{chunk-JXXZH6KH.js.map → chunk-G6QGYKPO.js.map} +0 -0
- /package/dist/{chunk-ZSJ6YADQ.js.map → chunk-H2JFQGQJ.js.map} +0 -0
- /package/dist/{chunk-C36VO7DO.js.map → chunk-HFI3LXZ2.js.map} +0 -0
- /package/dist/{chunk-MCGUHRQL.js.map → chunk-HKNK5Z6N.js.map} +0 -0
- /package/dist/{chunk-5F7FMTGE.js.map → chunk-HOR3KPOZ.js.map} +0 -0
- /package/dist/{chunk-WLMHGJWB.js.map → chunk-HUZBKPGP.js.map} +0 -0
- /package/dist/{chunk-7SVSJ7NG.js.map → chunk-I3TP6JKM.js.map} +0 -0
- /package/dist/{chunk-D67Z4NEP.js.map → chunk-IGLKMXWJ.js.map} +0 -0
- /package/dist/{chunk-IHVEK72X.js.map → chunk-IMVVZZFZ.js.map} +0 -0
- /package/dist/{chunk-ZKS7DJDT.js.map → chunk-J2BTEUAM.js.map} +0 -0
- /package/dist/{chunk-KUTIJABX.js.map → chunk-JI4CYPLW.js.map} +0 -0
- /package/dist/{chunk-OV7TLEE6.js.map → chunk-KQKH3H6S.js.map} +0 -0
- /package/dist/{chunk-6VQEAU6A.js.map → chunk-KRSUSMJK.js.map} +0 -0
- /package/dist/{chunk-FBE7F5HU.js.map → chunk-L3LOATSG.js.map} +0 -0
- /package/dist/{chunk-3PVZEAGI.js.map → chunk-L5DII4MV.js.map} +0 -0
- /package/dist/{chunk-A37NW25N.js.map → chunk-LJIJ6UKB.js.map} +0 -0
- /package/dist/{chunk-D36BZQTP.js.map → chunk-LVXV3GHT.js.map} +0 -0
- /package/dist/{chunk-6DRAZSGG.js.map → chunk-MHAY555P.js.map} +0 -0
- /package/dist/{chunk-37RBGAMM.js.map → chunk-MLVB5MYU.js.map} +0 -0
- /package/dist/{chunk-CU3WQ2KN.js.map → chunk-MSBCYMSH.js.map} +0 -0
- /package/dist/{chunk-42R2H2DW.js.map → chunk-MTYN4AM3.js.map} +0 -0
- /package/dist/{chunk-NZ64KNDV.js.map → chunk-NAH5PAUK.js.map} +0 -0
- /package/dist/{chunk-IF42CZJH.js.map → chunk-NEKE5PRJ.js.map} +0 -0
- /package/dist/{chunk-2DCJODMR.js.map → chunk-NEWXVHFX.js.map} +0 -0
- /package/dist/{chunk-MUJT3F2Q.js.map → chunk-NMLBGBK2.js.map} +0 -0
- /package/dist/{chunk-DCB2H2SG.js.map → chunk-O6IBNOQU.js.map} +0 -0
- /package/dist/{chunk-HU453KWI.js.map → chunk-OB2J5WSO.js.map} +0 -0
- /package/dist/{chunk-XLTZ7SN3.js.map → chunk-OENTT2KT.js.map} +0 -0
- /package/dist/{chunk-FKYEST54.js.map → chunk-PHPCCABU.js.map} +0 -0
- /package/dist/{chunk-AS4ND5IO.js.map → chunk-PKK2EEXH.js.map} +0 -0
- /package/dist/{chunk-HMMFY4PV.js.map → chunk-Q73675NI.js.map} +0 -0
- /package/dist/{chunk-M4BR3FKN.js.map → chunk-R7BHA5RA.js.map} +0 -0
- /package/dist/{chunk-IUCFOQAD.js.map → chunk-RAH453TV.js.map} +0 -0
- /package/dist/{chunk-4YPJKEHT.js.map → chunk-RJY6AEJB.js.map} +0 -0
- /package/dist/{chunk-CQ2EF32E.js.map → chunk-RYQQDPI7.js.map} +0 -0
- /package/dist/{chunk-VSYION5R.js.map → chunk-SLLDKJ7K.js.map} +0 -0
- /package/dist/{chunk-JEULZR34.js.map → chunk-SNBAM7SA.js.map} +0 -0
- /package/dist/{chunk-ZPG6GRAX.js.map → chunk-SNECOPBD.js.map} +0 -0
- /package/dist/{chunk-BDMCADQ6.js.map → chunk-SS2FAFUZ.js.map} +0 -0
- /package/dist/{chunk-TGLB5MA2.js.map → chunk-TAHMDXUS.js.map} +0 -0
- /package/dist/{chunk-JJEFWMLY.js.map → chunk-TFSRZOMP.js.map} +0 -0
- /package/dist/{chunk-W5EXVAEO.js.map → chunk-TNN3W5TU.js.map} +0 -0
- /package/dist/{chunk-D5NBOIPS.js.map → chunk-TOQPDTGG.js.map} +0 -0
- /package/dist/{chunk-HN7ZP5AX.js.map → chunk-TPGN6QTL.js.map} +0 -0
- /package/dist/{chunk-OJ3HJ7QL.js.map → chunk-TQXCLXWH.js.map} +0 -0
- /package/dist/{chunk-RQRODRCR.js.map → chunk-TRBEYNRN.js.map} +0 -0
- /package/dist/{chunk-OK3CYSHV.js.map → chunk-TXQWBDNF.js.map} +0 -0
- /package/dist/{chunk-4ZQ7NOAL.js.map → chunk-ULP5B6DG.js.map} +0 -0
- /package/dist/{chunk-OPWMRKZP.js.map → chunk-UMVA4SIV.js.map} +0 -0
- /package/dist/{chunk-RNXUKKPF.js.map → chunk-UMVMNUPH.js.map} +0 -0
- /package/dist/{chunk-5TBUDUEB.js.map → chunk-VBQVXR4U.js.map} +0 -0
- /package/dist/{chunk-W2PJUNWX.js.map → chunk-VLSOHNT2.js.map} +0 -0
- /package/dist/{chunk-PS5T7URZ.js.map → chunk-W4ECFBIA.js.map} +0 -0
- /package/dist/{chunk-LWGNRGU3.js.map → chunk-WD2JGIDK.js.map} +0 -0
- /package/dist/{chunk-BC4UT7KC.js.map → chunk-WEAO46EO.js.map} +0 -0
- /package/dist/{chunk-2J4XRENJ.js.map → chunk-XHAJ544L.js.map} +0 -0
- /package/dist/{chunk-KCTY6YAP.js.map → chunk-XU3B7N3C.js.map} +0 -0
- /package/dist/{chunk-LDWPRPN4.js.map → chunk-YPUP5LNV.js.map} +0 -0
- /package/dist/{chunk-I2ED6EUG.js.map → chunk-YWZHBXEI.js.map} +0 -0
- /package/dist/{chunk-5GAFQRDA.js.map → chunk-ZAFGVOU5.js.map} +0 -0
- /package/dist/{chunk-EPLPD54O.js.map → chunk-ZWIH53GL.js.map} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-HUZBKPGP.js";import"./chunk-H2JFQGQJ.js";import"./chunk-I3TP6JKM.js";import"./chunk-NEWXVHFX.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-P37U34EQ.js";export{a as CheckboxFieldDefault};
|
|
2
|
+
//# sourceMappingURL=CheckboxFieldDefault-X4DYVQCE.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-W4ECFBIA.js";import"./chunk-7RP5F62S.js";import"./chunk-DFAY4TWC.js";import"./chunk-MSBCYMSH.js";import"./chunk-A232PIG7.js";import"./chunk-H2JFQGQJ.js";import"./chunk-7ENB7H4E.js";import"./chunk-TXQWBDNF.js";import"./chunk-PKK2EEXH.js";import"./chunk-RJY6AEJB.js";import"./chunk-NEWXVHFX.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as CountryFieldDefault};
|
|
2
|
+
//# sourceMappingURL=CountryFieldDefault-JZDE75HS.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-B7EJ2OAA.js";import"./chunk-DFAY4TWC.js";import"./chunk-MSBCYMSH.js";import"./chunk-A232PIG7.js";import"./chunk-H2JFQGQJ.js";import"./chunk-7ENB7H4E.js";import"./chunk-RJY6AEJB.js";import"./chunk-NEWXVHFX.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as DatePickerFieldDefault};
|
|
2
|
+
//# sourceMappingURL=DatePickerFieldDefault-LJV4QSEP.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-DNDYXEZ6.js";import"./chunk-TOQPDTGG.js";import"./chunk-H2JFQGQJ.js";import"./chunk-NEWXVHFX.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as EmailFieldDefault};
|
|
2
|
+
//# sourceMappingURL=EmailFieldDefault-T6HHE5RL.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-ZAFGVOU5.js";import"./chunk-H2JFQGQJ.js";import"./chunk-FUGPVPYX.js";import"./chunk-RJY6AEJB.js";import"./chunk-NEWXVHFX.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-P37U34EQ.js";export{a as FileUploadFieldDefault};
|
|
2
|
+
//# sourceMappingURL=FileUploadFieldDefault-5NW3ZFXD.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-J2BTEUAM.js";import"./chunk-7RP5F62S.js";import"./chunk-MSBCYMSH.js";import"./chunk-H2JFQGQJ.js";import"./chunk-TXQWBDNF.js";import"./chunk-PKK2EEXH.js";import"./chunk-RJY6AEJB.js";import"./chunk-NEWXVHFX.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-P37U34EQ.js";export{a as MultiSelectFieldDefault};
|
|
2
|
+
//# sourceMappingURL=MultiSelectFieldDefault-OQ6SNNBI.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-B66V5QEC.js";import"./chunk-TOQPDTGG.js";import"./chunk-H2JFQGQJ.js";import"./chunk-NEWXVHFX.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as NumberFieldDefault};
|
|
2
|
+
//# sourceMappingURL=NumberFieldDefault-IVUTWJS5.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-ERSP6CZ3.js";import"./chunk-DFAY4TWC.js";import"./chunk-A232PIG7.js";import"./chunk-H2JFQGQJ.js";import"./chunk-7ENB7H4E.js";import"./chunk-SNBAM7SA.js";import"./chunk-NEWXVHFX.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as RadioGroupFieldDefault};
|
|
2
|
+
//# sourceMappingURL=RadioGroupFieldDefault-CXY33ONT.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-C6KWUSCU.js";import"./chunk-H2JFQGQJ.js";import"./chunk-DXIJUMLU.js";import"./chunk-NEWXVHFX.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-P37U34EQ.js";export{a as SelectFieldDefault};
|
|
2
|
+
//# sourceMappingURL=SelectFieldDefault-66GGFDX3.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-Q73675NI.js";import"./chunk-H2JFQGQJ.js";import"./chunk-7G5JSUZU.js";import"./chunk-NEWXVHFX.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-P37U34EQ.js";export{a as TextFieldDefault};
|
|
2
|
+
//# sourceMappingURL=TextFieldDefault-VHIF2KLF.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-ULP5B6DG.js";import"./chunk-EHD2YB5F.js";import"./chunk-TOQPDTGG.js";import"./chunk-H2JFQGQJ.js";import"./chunk-PKK2EEXH.js";import"./chunk-RJY6AEJB.js";import"./chunk-NEWXVHFX.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as WorkScheduleFieldDefault};
|
|
2
|
+
//# sourceMappingURL=WorkScheduleFieldDefault-T7IP52VU.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as p}from"./chunk-EUSCQL4H.js";import{B as c,H as m,L as C,Q as d,l,u}from"./chunk-7ENB7H4E.js";import{d as o}from"./chunk-KQPDXXG3.js";import{a as t}from"./chunk-P37U34EQ.js";import{useMutation as a,useQuery as r}from"@tanstack/react-query";var h=t(({includePremiumBenefits:e})=>{let{client:i}=o();return r({queryKey:["cost-calculator-countries",e],queryFn:t(()=>c({client:i,query:{include_premium_benefits:e}}),"queryFn"),select:t(s=>s.data?.data.filter(n=>n.availability==="active").map(n=>({value:n.region_slug,label:n.name,childRegions:n.child_regions,hasAdditionalFields:n.has_additional_fields,regionSlug:n.region_slug,currency:n.currency.code})),"select")})},"useCostCalculatorCountries"),q=t(()=>{let{client:e}=o();return r({queryKey:["company-currencies"],queryFn:t(()=>d({client:e}),"queryFn"),select:t(i=>i.data?.data?.company_currencies.map(s=>({value:s.slug,label:s.code})),"select")})},"useCompanyCurrencies"),x=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>l({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimation"),P=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>u({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimationPdf"),v=t(()=>{let{client:e}=o();return a({mutationFn:t(i=>C({client:e,body:i}),"mutationFn")})},"useCostCalculatorEstimationCsv"),S=t((e,{includePremiumBenefits:i,options:s})=>{let{client:n}=o();return r({queryKey:["cost-calculator-region-fields",e,i],queryFn:t(()=>m({client:n,path:{slug:e},query:{include_premium_benefits:i}}),"queryFn"),enabled:!!e,select:t(({data:f})=>{let y=f?.data?.schema||{};return p(y,void 0,s)},"select")})},"useRegionFields");export{h as a,q as b,x as c,P as d,v as e,S as f};
|
|
2
|
+
//# sourceMappingURL=chunk-246D2A55.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/CostCalculator/api.ts"],"sourcesContent":["import { createHeadlessForm } from '@/src/common/createHeadlessForm';\nimport {\n CostCalculatorEstimateParams,\n getIndexCompanyCurrency,\n getIndexCountry,\n getShowRegionField,\n postCreateEstimation,\n postCreateEstimationCsv,\n postCreateEstimationPdf,\n} from '@/src/client';\nimport { Client } from '@/src/client/client';\nimport { useClient } from '@/src/context';\nimport { useMutation, useQuery } from '@tanstack/react-query';\nimport { CostCalculatorEstimationOptions } from '@/src/flows/CostCalculator/types';\nimport { JSFModify } from '@/src/flows/types';\n\n/**\n * Hook to fetch the countries for the cost calculator.\n * @returns\n */\nexport const useCostCalculatorCountries = ({\n includePremiumBenefits,\n}: {\n includePremiumBenefits: CostCalculatorEstimationOptions['includePremiumBenefits'];\n}) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['cost-calculator-countries', includePremiumBenefits],\n queryFn: () => {\n return getIndexCountry({\n client: client as Client,\n query: {\n include_premium_benefits: includePremiumBenefits,\n },\n });\n },\n select: (data) =>\n data.data?.data\n .filter((country) => country.availability === 'active')\n .map((country) => ({\n value: country.region_slug,\n label: country.name,\n childRegions: country.child_regions,\n hasAdditionalFields: country.has_additional_fields,\n regionSlug: country.region_slug,\n currency: country.currency.code,\n })),\n });\n};\n\n/**\n * Hook to fetch the company currencies.\n * @returns\n */\nexport const useCompanyCurrencies = () => {\n const { client } = useClient();\n\n return useQuery({\n queryKey: ['company-currencies'],\n queryFn: () => {\n return getIndexCompanyCurrency({\n client: client as Client,\n });\n },\n select: (data) =>\n data.data?.data?.company_currencies.map((currency) => ({\n value: currency.slug,\n label: currency.code,\n })),\n });\n};\n\n/**\n * Hook to create an estimation.\n * @returns\n */\nexport const useCostCalculatorEstimation = () => {\n const { client } = useClient();\n\n return useMutation({\n mutationFn: (payload: CostCalculatorEstimateParams) => {\n return postCreateEstimation({\n client: client as Client,\n body: payload,\n });\n },\n });\n};\n\n/**\n * Custom hook to create a PDF estimation.\n *\n * @returns\n */\nexport const useCostCalculatorEstimationPdf = () => {\n const { client } = useClient();\n\n return useMutation({\n mutationFn: (payload: CostCalculatorEstimateParams) => {\n return postCreateEstimationPdf({\n client: client as Client,\n body: payload,\n });\n },\n });\n};\n\n/**\n * Custom hook to create a CSV estimation.\n *\n * @returns\n */\nexport const useCostCalculatorEstimationCsv = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: (payload: CostCalculatorEstimateParams) => {\n return postCreateEstimationCsv({\n client: client as Client,\n body: payload,\n });\n },\n });\n};\n\n/**\n * Hook to fetch the region fields.\n * @param region\n * @returns\n */\nexport const useRegionFields = (\n region: string | undefined,\n {\n includePremiumBenefits,\n options,\n }: {\n includePremiumBenefits: CostCalculatorEstimationOptions['includePremiumBenefits'];\n options?: {\n jsfModify?: JSFModify;\n };\n },\n) => {\n const { client } = useClient();\n\n return useQuery({\n queryKey: ['cost-calculator-region-fields', region, includePremiumBenefits],\n queryFn: () => {\n return getShowRegionField({\n client: client as Client,\n path: { slug: region as string },\n query: {\n include_premium_benefits: includePremiumBenefits,\n },\n });\n },\n enabled: !!region,\n select: ({ data }) => {\n const jsfSchema = data?.data?.schema || {};\n return createHeadlessForm(jsfSchema, undefined, options);\n },\n });\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/flows/CostCalculator/api.ts"],"sourcesContent":["import { createHeadlessForm } from '@/src/common/createHeadlessForm';\nimport {\n CostCalculatorEstimateParams,\n getIndexCompanyCurrency,\n getIndexCountry,\n getShowRegionField,\n postCreateEstimation,\n postCreateEstimationCsv,\n postCreateEstimationPdf,\n} from '@/src/client';\nimport { Client } from '@/src/client/client';\nimport { useClient } from '@/src/context';\nimport { useMutation, useQuery } from '@tanstack/react-query';\nimport { CostCalculatorEstimationOptions } from '@/src/flows/CostCalculator/types';\nimport { JSFModify } from '@/src/flows/types';\n\n/**\n * Hook to fetch the countries for the cost calculator.\n * @returns\n */\nexport const useCostCalculatorCountries = ({\n includePremiumBenefits,\n}: {\n includePremiumBenefits: CostCalculatorEstimationOptions['includePremiumBenefits'];\n}) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['cost-calculator-countries', includePremiumBenefits],\n queryFn: () => {\n return getIndexCountry({\n client: client as Client,\n query: {\n include_premium_benefits: includePremiumBenefits,\n },\n });\n },\n select: (data) =>\n data.data?.data\n .filter((country) => country.availability === 'active')\n .map((country) => ({\n value: country.region_slug,\n label: country.name,\n childRegions: country.child_regions,\n hasAdditionalFields: country.has_additional_fields,\n regionSlug: country.region_slug,\n currency: country.currency.code,\n })),\n });\n};\n\n/**\n * Hook to fetch the company currencies.\n * @returns\n */\nexport const useCompanyCurrencies = () => {\n const { client } = useClient();\n\n return useQuery({\n queryKey: ['company-currencies'],\n queryFn: () => {\n return getIndexCompanyCurrency({\n client: client as Client,\n });\n },\n select: (data) =>\n data.data?.data?.company_currencies.map((currency) => ({\n value: currency.slug,\n label: currency.code,\n })),\n });\n};\n\n/**\n * Hook to create an estimation.\n * @returns\n */\nexport const useCostCalculatorEstimation = () => {\n const { client } = useClient();\n\n return useMutation({\n mutationFn: (payload: CostCalculatorEstimateParams) => {\n return postCreateEstimation({\n client: client as Client,\n body: payload,\n });\n },\n });\n};\n\n/**\n * Custom hook to create a PDF estimation.\n *\n * @returns\n */\nexport const useCostCalculatorEstimationPdf = () => {\n const { client } = useClient();\n\n return useMutation({\n mutationFn: (payload: CostCalculatorEstimateParams) => {\n return postCreateEstimationPdf({\n client: client as Client,\n body: payload,\n });\n },\n });\n};\n\n/**\n * Custom hook to create a CSV estimation.\n *\n * @returns\n */\nexport const useCostCalculatorEstimationCsv = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: (payload: CostCalculatorEstimateParams) => {\n return postCreateEstimationCsv({\n client: client as Client,\n body: payload,\n });\n },\n });\n};\n\n/**\n * Hook to fetch the region fields.\n * @param region\n * @returns\n */\nexport const useRegionFields = (\n region: string | undefined,\n {\n includePremiumBenefits,\n options,\n }: {\n includePremiumBenefits: CostCalculatorEstimationOptions['includePremiumBenefits'];\n options?: {\n jsfModify?: JSFModify;\n };\n },\n) => {\n const { client } = useClient();\n\n return useQuery({\n queryKey: ['cost-calculator-region-fields', region, includePremiumBenefits],\n queryFn: () => {\n return getShowRegionField({\n client: client as Client,\n path: { slug: region as string },\n query: {\n include_premium_benefits: includePremiumBenefits,\n },\n });\n },\n enabled: !!region,\n select: ({ data }) => {\n const jsfSchema = data?.data?.schema || {};\n return createHeadlessForm(jsfSchema, undefined, options);\n },\n });\n};\n"],"mappings":"yLAYA,OAAS,eAAAA,EAAa,YAAAC,MAAgB,wBAQ/B,IAAMC,EAA6BC,EAAA,CAAC,CACzC,uBAAAC,CACF,IAEM,CACJ,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAU,EAC7B,OAAOC,EAAS,CACd,SAAU,CAAC,4BAA6BH,CAAsB,EAC9D,QAASD,EAAA,IACAK,EAAgB,CACrB,OAAQH,EACR,MAAO,CACL,yBAA0BD,CAC5B,CACF,CAAC,EANM,WAQT,OAAQD,EAACM,GACPA,EAAK,MAAM,KACR,OAAQC,GAAYA,EAAQ,eAAiB,QAAQ,EACrD,IAAKA,IAAa,CACjB,MAAOA,EAAQ,YACf,MAAOA,EAAQ,KACf,aAAcA,EAAQ,cACtB,oBAAqBA,EAAQ,sBAC7B,WAAYA,EAAQ,YACpB,SAAUA,EAAQ,SAAS,IAC7B,EAAE,EAVE,SAWV,CAAC,CACH,EA5B0C,8BAkC7BC,EAAuBR,EAAA,IAAM,CACxC,GAAM,CAAE,OAAAE,CAAO,EAAIC,EAAU,EAE7B,OAAOC,EAAS,CACd,SAAU,CAAC,oBAAoB,EAC/B,QAASJ,EAAA,IACAS,EAAwB,CAC7B,OAAQP,CACV,CAAC,EAHM,WAKT,OAAQF,EAACM,GACPA,EAAK,MAAM,MAAM,mBAAmB,IAAKI,IAAc,CACrD,MAAOA,EAAS,KAChB,MAAOA,EAAS,IAClB,EAAE,EAJI,SAKV,CAAC,CACH,EAhBoC,wBAsBvBC,EAA8BX,EAAA,IAAM,CAC/C,GAAM,CAAE,OAAAE,CAAO,EAAIC,EAAU,EAE7B,OAAOS,EAAY,CACjB,WAAYZ,EAACa,GACJC,EAAqB,CAC1B,OAAQZ,EACR,KAAMW,CACR,CAAC,EAJS,aAMd,CAAC,CACH,EAX2C,+BAkB9BE,EAAiCf,EAAA,IAAM,CAClD,GAAM,CAAE,OAAAE,CAAO,EAAIC,EAAU,EAE7B,OAAOS,EAAY,CACjB,WAAYZ,EAACa,GACJG,EAAwB,CAC7B,OAAQd,EACR,KAAMW,CACR,CAAC,EAJS,aAMd,CAAC,CACH,EAX8C,kCAkBjCI,EAAiCjB,EAAA,IAAM,CAClD,GAAM,CAAE,OAAAE,CAAO,EAAIC,EAAU,EAC7B,OAAOS,EAAY,CACjB,WAAYZ,EAACa,GACJK,EAAwB,CAC7B,OAAQhB,EACR,KAAMW,CACR,CAAC,EAJS,aAMd,CAAC,CACH,EAV8C,kCAiBjCM,EAAkBnB,EAAA,CAC7BoB,EACA,CACE,uBAAAnB,EACA,QAAAoB,CACF,IAMG,CACH,GAAM,CAAE,OAAAnB,CAAO,EAAIC,EAAU,EAE7B,OAAOC,EAAS,CACd,SAAU,CAAC,gCAAiCgB,EAAQnB,CAAsB,EAC1E,QAASD,EAAA,IACAsB,EAAmB,CACxB,OAAQpB,EACR,KAAM,CAAE,KAAMkB,CAAiB,EAC/B,MAAO,CACL,yBAA0BnB,CAC5B,CACF,CAAC,EAPM,WAST,QAAS,CAAC,CAACmB,EACX,OAAQpB,EAAA,CAAC,CAAE,KAAAM,CAAK,IAAM,CACpB,IAAMiB,EAAYjB,GAAM,MAAM,QAAU,CAAC,EACzC,OAAOkB,EAAmBD,EAAW,OAAWF,CAAO,CACzD,EAHQ,SAIV,CAAC,CACH,EA/B+B","names":["useMutation","useQuery","useCostCalculatorCountries","__name","includePremiumBenefits","client","useClient","useQuery","getIndexCountry","data","country","useCompanyCurrencies","getIndexCompanyCurrency","currency","useCostCalculatorEstimation","useMutation","payload","postCreateEstimation","useCostCalculatorEstimationPdf","postCreateEstimationPdf","useCostCalculatorEstimationCsv","postCreateEstimationCsv","useRegionFields","region","options","getShowRegionField","jsfSchema","createHeadlessForm"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{f as jt,h as Qt,i as Jt}from"./chunk-SLD227LM.js";import{a as Ut,b as Ht,c as zt,d as Xt,e as Yt,f as Zt,h as te,i as ee,j as ie,k as ne,l as oe,m as re,n as ae,o as se,p as ce,q as le,r as ue,s as de,t as me}from"./chunk-3NB2BN46.js";import{a as pe,b as fe,c as ye}from"./chunk-FERWQW33.js";import{a as Kt,b as Gt,f as $t,g as Wt}from"./chunk-IZGJP7OI.js";import{a as G,b as it,c as b,d as Nt}from"./chunk-LHEF2FN7.js";import{a as kt}from"./chunk-JI4CYPLW.js";import{a as Bt,e as p,f as M}from"./chunk-T7O3YYOG.js";import{K as Rt}from"./chunk-7ENB7H4E.js";import{h as P,i as V}from"./chunk-VIGKOVHP.js";import{a as g}from"./chunk-X6ZAR7ZL.js";import{a as xt}from"./chunk-TSPDJUGG.js";import{d as At}from"./chunk-KQPDXXG3.js";import{a as d}from"./chunk-P37U34EQ.js";import{useEffect as q,useMemo as o,useRef as pi,useState as O}from"react";import ge from"lodash.omit";import{useQuery as di}from"@tanstack/react-query";var mi=d(()=>{let{client:L}=At(),{data:I}=Ht(),a=zt(I)?I?.company?.id??"":"";return di({queryKey:["legal-entities",a],queryFn:d(()=>Rt({client:L,path:{company_id:a}}),"queryFn"),select:d($=>$.data?.data?.legal_entities,"select"),enabled:!!a})},"useLegalEntities"),_e=d(()=>{let{data:L}=mi();return L?.find(I=>I.is_default)},"useDefaultLegalEntity");var fi={select_country:null,basic_information:"employment_basic_information",contract_details:null,eligibility_questionnaire:null,pricing_plan:null,contract_preview:null,review:null},yi={employment_basic_information:"basic_information"},Ji=d(({countryCode:L,externalId:I,employmentId:a,skipSteps:$,options:_,initialValues:u})=>{let be=_?.excludeProducts||[],[c,mt]=O(L||null),[s,Se]=O(a),[h,pt]=O(void 0),W=pi({select_country:{},basic_information:{},contract_details:{},contract_preview:{},pricing_plan:{},eligibility_questionnaire:{}}),[H,Ce]=O(void 0),[ft,z]=O(!1),[yt,we]=O(!0),[nt,_t]=O(null),{steps:Pe,stepsArray:he}=o(()=>Kt({includeSelectCountry:!$?.includes("select_country"),includeEligibilityQuestionnaire:ft,includeContractPreview:yt}),[ft,yt,$]),{fieldValues:l,stepState:e,setFieldValues:Fe,previousStep:Ee,nextStep:ve,goToStep:R,setStepValues:gt}=xt(Pe);q(()=>{nt&&(R(nt),_t(null))},[nt,R]);let{data:r,isLoading:Ve,refetch:bt}=kt({employmentId:s,queryParams:{exclude_files:!0}}),Me=_e(),{status:D}=r||{},S=D&&$t.includes(D),Oe=D&&!Wt.includes(D),Ie=o(()=>D==="invited"?"invited":"not_invited",[D]),St=Qt(),Ct=Jt(c,_),ot=ee(),wt=Ut(),{mutateAsync:Pt}=oe(ot,wt,l),ht=ce(),Ft=le(),{mutateAsyncOrThrow:De}=g(Ct),Et=Yt(),vt=te(),Vt=ue(),{mutateAsyncOrThrow:Te}=g(St),{mutateAsyncOrThrow:qe}=g(ot),{mutateAsyncOrThrow:Le}=g(Et),{mutateAsyncOrThrow:Mt}=g(vt),{mutateAsyncOrThrow:Re}=g(ht),{mutateAsyncOrThrow:Ae}=g(Ft),{mutateAsyncOrThrow:Be}=g(Vt);a&&r?.country?.code&&!c&&mt(r.country.code);let{selectCountryForm:X,isLoading:je,countries:Ot}=de({jsfModify:_?.jsfModify?.select_country}),rt=o(()=>Ot?.find(t=>t.value===c),[Ot,c]),Qe=o(()=>rt?.label,[rt]),Je=e.currentStep.name==="pricing_plan"||!!a&&S,{form:F,isLoading:ke,contractorSubscriptions:Y,refetch:at,isEligibilityQuestionnaireBlocked:A}=ne(s,rt,{jsonSchemaVersion:_?.jsonSchemaVersion,queryOptions:{enabled:Je},excludeProducts:be,jsfModify:_?.jsfModify?.pricing_plan}),T=o(()=>!!Y?.find(t=>t.product.short_name==="COR")?.eligibility_questionnaire?.submitted_at,[Y]);q(()=>{if(T){z(!1);return}else z(H===b)},[T,H]),q(()=>{let t=r?.contractor_type==="cor";we(!t)},[r?.contractor_type]);let Z=o(()=>Y?.find(t=>t.product.short_name==="COR")?.eligibility_questionnaire?.responses,[Y]),xe=fi[e.currentStep.name]||"contractor_basic_information",Ne=yi[xe],Ue=r?.[Ne]||{},Ke=d(({form:t,options:n={},query:m={}})=>{let y=Object.keys(l).length>0?{...u,...e.values?.[e.currentStep.name],...l}:{...u,...Ue};return jt({countryCode:c,form:t,fieldValues:y,query:m,options:{...n,queryOptions:{enabled:n.queryOptions?.enabled??!0}}})},"useJSONSchema"),Ge=!!(c&&(e.currentStep.name==="basic_information"||a)),$e=!!(c==="GBR"&&a&&e.currentStep.name==="basic_information"),{data:B,isLoading:We}=re(a,{enabled:$e}),{data:tt,isLoading:He}=ae(a,{enabled:!!a});q(()=>{tt&&tt.length>0&&!h&&pt(tt[0].id)},[tt,h]);let{data:C,isLoading:ze}=Ke({form:"contractor_basic_information",options:{jsfModify:fe(c,Qe,_),queryOptions:{enabled:Ge}}}),Xe=o(()=>Gt(r?.basic_information?.provisional_start_date,l?.service_duration?.provisional_start_date),[r?.basic_information?.provisional_start_date,l?.service_duration?.provisional_start_date]),f=o(()=>{let t={standard:G,plus:it,cor:b};if(l.subscription)return l.subscription;let n=e.values?.pricing_plan?.subscription;return n&&!A?n:T&&!A?b:A&&T?G:t[r?.contractor_type]||G},[l,e.values,T,r?.contractor_type,A]);q(()=>{f&&f!==H&&Ce(f)},[f,H]);let Ye=o(()=>({...Z,...u,...e.values?.eligibility_questionnaire,...l}),[Z,u,e.values?.eligibility_questionnaire,l]),Ze=o(()=>f===b&&e.currentStep.name==="eligibility_questionnaire"||!!a&&S&&f===b,[f,e.currentStep.name,a,S]),{data:E,isLoading:ti}=se({options:{queryOptions:{enabled:Ze},jsfModify:_?.jsfModify?.eligibility_questionnaire},fieldValues:Ye}),ei=!!(c&&e.currentStep.name==="contract_details"||S),{data:w,isLoading:ii}=me({countryCode:c,fieldValues:l,employmentId:s,options:{queryOptions:{enabled:ei},jsfModify:pe(_?.jsfModify?.contract_details,Xe,f,l)}}),ni=o(()=>e.currentStep.name==="contract_preview"||!!a&&S,[e.currentStep.name,a,S]),{data:v}=Xt({fieldValues:l,options:{queryOptions:{enabled:ni},jsfModify:ye(_,l)}}),{data:st,isLoading:oi}=Zt({employmentId:s,contractDocumentId:h,options:{queryOptions:{enabled:!!h}}}),i=o(()=>({select_country:X?.fields||[],basic_information:C?.fields||[],pricing_plan:F?.fields||[],eligibility_questionnaire:E?.fields||[],contract_details:w?.fields||[],contract_preview:v?.fields||[],review:[]}),[X?.fields,C?.fields,F?.fields,w?.fields,v?.fields,E?.fields]),ri={select_country:null,basic_information:C?.meta["x-jsf-fieldsets"],pricing_plan:null,contract_details:w?.meta["x-jsf-fieldsets"],eligibility_questionnaire:null,contract_preview:null,review:null},{country:ai,basic_information:et={},contract_details:It={}}=r||{},Dt=ai?.code,j=o(()=>M(i.select_country,{country:c||Dt||""}),[i.select_country,c,Dt]),ct=o(()=>B?.content?Bt(B.content,B.name):null,[B?.content,B?.name]),Q=o(()=>{let t={...u,...et,ir35:r?.contract_details?.ir_35,nationality_status:r?.contract_details?.nationality,...ct&&{ir35_sds_file:[ct]}};return M(i.basic_information,t)},[u,et,r?.contract_details?.ir_35,r?.contract_details?.nationality,ct,i.basic_information]),J=o(()=>{let n={...{service_duration:{provisional_start_date:et.provisional_start_date}},...u,...It};return M(i.contract_details,n)},[i.contract_details,It,u,et]),k=o(()=>{let t=st?.contract_document?.signatories?.find(m=>m.type==="company"),n={...u,signature:t?.signature};return M(i.contract_preview,n)},[i.contract_preview,u,st]),x=o(()=>{let n={...{subscription:f},...u};return M(i.pricing_plan,n)},[i.pricing_plan,u,f]),N=o(()=>{let t={...u,...Z};return M(i.eligibility_questionnaire,t)},[i.eligibility_questionnaire,u,Z]),si=o(()=>({select_country:j,basic_information:Q,contract_details:J,contract_preview:k,pricing_plan:x,eligibility_questionnaire:N}),[j,Q,J,k,x,N]),lt=!!(a&&S&&e.currentStep.name!=="review"),ut=je||ze||Ve||ii||ke||oi||We||He||ti,Tt=o(()=>{let n=r?.contractor_type==="cor"||i.contract_preview.length>0;return!!(lt&&!ut&&h&&i.basic_information.length>0&&i.contract_details.length>0&&n)},[lt,ut,h,i.basic_information.length,i.contract_details.length,i.contract_preview.length,r?.contractor_type]);q(()=>{Tt&&(W.current={select_country:P(j,i.select_country),basic_information:P(Q,i.basic_information),contract_details:P(J,i.contract_details),contract_preview:P(k,i.contract_preview),pricing_plan:P(x,i.pricing_plan),eligibility_questionnaire:P(N,i.eligibility_questionnaire)},gt({select_country:j,basic_information:Q,contract_details:J,contract_preview:k,pricing_plan:x,eligibility_questionnaire:N,review:{}}),R("review"))},[Tt,R,j,Q,J,gt,i.select_country,i.basic_information,i.contract_details,i.pricing_plan,x,i.contract_preview,k,i.eligibility_questionnaire,N]);let ci=d(t=>{R(t)},"goTo"),qt=d(async t=>X&&e.currentStep.name==="select_country"?t:C&&e.currentStep.name==="basic_information"?await p(t,C?.fields,{isPartialValidation:!1}):w&&e.currentStep.name==="contract_details"?await p(t,w?.fields,{isPartialValidation:!1}):v&&e.currentStep.name==="contract_preview"?await p(t,v?.fields,{isPartialValidation:!1}):F&&e.currentStep.name==="pricing_plan"?await p(t,F?.fields,{isPartialValidation:!1}):E&&e.currentStep.name==="eligibility_questionnaire"?await p(t,E?.fields,{isPartialValidation:!1}):{},"parseFormValues");async function li(t){let n=e.currentStep.name;n in W.current&&(W.current[n]=P(t,i[n]));let m=await qt(t);switch(e.currentStep.name){case"select_country":return mt(m.country),Promise.resolve({data:{countryCode:m.country}});case"basic_information":{let U=!s&&c,y=s&&c&&r?.country&&r?.country.code!==c;if(U||y){let ui={basic_information:ge(m,"nationality_status","ir35","ir35_sds_file"),type:"contractor",country_code:c,external_id:I},Lt=await Te(ui),dt=Lt?.data?.employment?.id;if(!dt)throw V("Employment ID not found");return await Pt({employmentId:dt}),Se(dt),Lt}else if(s){let K=ge(m,"nationality_status","ir35","ir35_sds_file");return await Pt({employmentId:s}),De({employmentId:s,basic_information:K})}return}case"contract_details":{let y=await qe({employmentId:s,payload:{contract_document:m}}),K=y?.data?.contract_document?.id;if(!K)throw V("Contract document ID not found");return pt(K),await bt(),y}case"contract_preview":return Le({employmentId:s,contractDocumentId:h,payload:{signature:m.signature}});case"pricing_plan":{if(A&&[b,it].includes(t.subscription))throw V(`This individual is not eligible for ${ie[t.subscription]}.`);if(t.subscription===Nt)return Promise.resolve({data:{subscription:t.subscription}});if(T&&t.subscription!==b)try{await Be({employmentId:s}),await at()}catch(y){if(y?.response?.status!==404)throw y;await at()}if(t.subscription==G)return Mt({employmentId:s,payload:{operation:"downgrade"}});if(t.subscription==it)return Mt({employmentId:s,payload:{operation:"upgrade"}});if(t.subscription==b)return Promise.resolve({data:{subscription:t.subscription}});throw V("invalid selection")}case"eligibility_questionnaire":try{if((await Re({employmentId:s,payload:m}))?.data?.is_blocking)throw z(!1),_t("pricing_plan"),V("This individual is not eligible for Contractor of Record.");return await Ae({employmentId:s})}finally{await at()}default:throw V("Invalid step state")}}return d(li,"onSubmit"),{isLoading:ut||lt,fieldValues:l,stepState:e,checkFieldUpdates:Fe,back:Ee,next:ve,goTo:ci,onSubmit:li,fields:i[e.currentStep.name],meta:{fields:W.current,fieldsets:ri[e.currentStep.name]},parseFormValues:qt,handleValidation:d(async t=>{if(e.currentStep.name==="select_country")return X.handleValidation(t);if(C&&e.currentStep.name==="basic_information"){let n=await p(t,C?.fields,{isPartialValidation:!1});return C?.handleValidation(n)}if(w&&e.currentStep.name==="contract_details"){let n=await p(t,w?.fields,{isPartialValidation:!1});return w?.handleValidation(n)}if(v&&e.currentStep.name==="contract_preview"){let n=await p(t,v?.fields,{isPartialValidation:!0});return v?.handleValidation(n)}if(F&&e.currentStep.name==="pricing_plan"){let n=await p(t,F?.fields,{isPartialValidation:!1});return F?.handleValidation(n)}if(E&&e.currentStep.name==="eligibility_questionnaire"){let n=await p(t,E?.fields,{isPartialValidation:!1});return E?.handleValidation(n)}return null},"handleValidation"),initialValues:si,employmentId:s,refetchEmployment:bt,isSubmitting:St.isPending||Ct.isPending||ot.isPending||Et.isPending||vt.isPending||wt.isPending||ht.isPending||Ft.isPending||Vt.isPending,documentPreviewPdf:st,canInvite:Oe,isEmploymentReadOnly:S,invitedStatus:Ie,employment:r,defaultLegalEntity:Me,steps:he}},"useContractorOnboarding");export{Ji as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3474OEAS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/flows/ContractorOnboarding/hooks.tsx","../src/common/api/legal-entities.ts"],"sourcesContent":["import { useEffect, useMemo, useRef, useState } from 'react';\nimport { FieldValues } from 'react-hook-form';\nimport omit from 'lodash.omit';\nimport { $TSFixMe, JSFFields } from '@/src/types/remoteFlows';\nimport {\n CreateContractDocument,\n Employment,\n EmploymentCreateParams,\n} from '@/src/client/types.gen';\nimport {\n getInitialValues,\n parseJSFToValidate,\n} from '@/src/components/form/utils';\nimport { ValidationResult } from '@remoteoss/remote-json-schema-form-kit';\nimport {\n useCreateContractorContractDocument,\n useGetContractDocumentSignatureSchema,\n usePostManageContractorSubscriptions,\n useContractorSubscriptionSchemaField,\n useGetShowContractDocument,\n useSignContractDocument,\n useUpdateUKandSaudiFields,\n useGetIR35File,\n useGetContractDocuments,\n useGetEligibilityQuestionnaire,\n usePostCreateEligibilityQuestionnaire,\n usePostManageContractorCorSubscription,\n useDeleteContractorCorSubscription,\n useCountriesSchemaField,\n useContractorOnboardingDetailsSchemaWithCurrencies,\n CONTRACT_PRODUCT_TITLES,\n} from '@/src/flows/ContractorOnboarding/api';\nimport { ContractorOnboardingFlowProps } from '@/src/flows/ContractorOnboarding/types';\nimport {\n buildSteps,\n calculateProvisionalStartDateDescription,\n reviewStepAllowedEmploymentStatus,\n disabledInviteButtonEmploymentStatus,\n StepKeys,\n} from '@/src/flows/ContractorOnboarding/utils';\nimport {\n useCreateEmployment,\n useJSONSchemaForm,\n useUpdateEmployment,\n} from '@/src/flows/Onboarding/api';\nimport { FlowOptions, JSFModify, JSONSchemaFormType } from '@/src/flows/types';\nimport { useStepState } from '@/src/flows/useStepState';\nimport { mutationToPromise } from '@/src/lib/mutations';\nimport { createStructuredError, prettifyFormValues } from '@/src/lib/utils';\nimport { JSFFieldset, Meta } from '@/src/types/remoteFlows';\nimport {\n contractorStandardProductIdentifier,\n contractorPlusProductIdentifier,\n corProductIdentifier,\n eorProductIdentifier,\n} from '@/src/flows/ContractorOnboarding/constants';\nimport {\n buildBasicInformationJsfModify,\n buildContractDetailsJsfModify,\n buildContractPreviewJsfModify,\n} from '@/src/flows/ContractorOnboarding/jsfModify';\nimport { useUploadFile } from '@/src/common/api/files';\nimport { dataURLtoFile } from '@/src/lib/files';\nimport { useEmploymentQuery } from '@/src/common/api/employment';\nimport { useDefaultLegalEntity } from '@/src/common/api/legal-entities';\n\ntype useContractorOnboardingProps = Omit<\n ContractorOnboardingFlowProps,\n 'render'\n>;\n\nconst stepToFormSchemaMap: Record<StepKeys, JSONSchemaFormType | null> = {\n select_country: null,\n basic_information: 'employment_basic_information',\n contract_details: null,\n eligibility_questionnaire: null,\n pricing_plan: null,\n contract_preview: null,\n review: null,\n};\n\nconst jsonSchemaToEmployment: Partial<\n Record<JSONSchemaFormType, keyof Employment>\n> = {\n employment_basic_information: 'basic_information',\n};\n\nexport const useContractorOnboarding = ({\n countryCode,\n externalId,\n employmentId,\n skipSteps,\n options,\n initialValues: onboardingInitialValues,\n}: useContractorOnboardingProps) => {\n const excludeProducts = options?.excludeProducts || [];\n const [internalCountryCode, setInternalCountryCode] = useState<string | null>(\n countryCode || null,\n );\n const [internalEmploymentId, setInternalEmploymentId] = useState<\n string | undefined\n >(employmentId);\n const [internalContractDocumentId, setInternalContractDocumentId] = useState<\n string | undefined\n >(undefined);\n const fieldsMetaRef = useRef<{\n select_country: Meta;\n basic_information: Meta;\n contract_details: Meta;\n contract_preview: Meta;\n pricing_plan: Meta;\n eligibility_questionnaire: Meta;\n }>({\n select_country: {},\n basic_information: {},\n contract_details: {},\n contract_preview: {},\n pricing_plan: {},\n eligibility_questionnaire: {},\n });\n\n const [selectedProduct, setSelectedProduct] = useState<string | undefined>(\n undefined,\n );\n\n const [includeEligibilityQuestionnaire, setIncludeEligibilityQuestionnaire] =\n useState<boolean>(false);\n\n const [includeContractPreview, setIncludeContractPreview] =\n useState<boolean>(true);\n\n const [pendingNavigationStep, setPendingNavigationStep] =\n useState<StepKeys | null>(null);\n\n const { steps, stepsArray } = useMemo(\n () =>\n buildSteps({\n includeSelectCountry: !skipSteps?.includes('select_country'),\n includeEligibilityQuestionnaire: includeEligibilityQuestionnaire,\n includeContractPreview: includeContractPreview,\n }),\n [includeEligibilityQuestionnaire, includeContractPreview, skipSteps],\n );\n\n const {\n fieldValues,\n stepState,\n setFieldValues,\n previousStep,\n nextStep,\n goToStep,\n setStepValues,\n } = useStepState(steps);\n\n useEffect(() => {\n if (pendingNavigationStep) {\n // Now steps have been updated\n goToStep(pendingNavigationStep);\n setPendingNavigationStep(null);\n }\n }, [pendingNavigationStep, goToStep]);\n\n const {\n data: employment,\n isLoading: isLoadingEmployment,\n refetch: refetchEmployment,\n } = useEmploymentQuery({\n employmentId: internalEmploymentId as string,\n queryParams: { exclude_files: true },\n });\n\n const defaultLegalEntity = useDefaultLegalEntity();\n\n const { status: employmentStatus } = employment || {};\n\n const isEmploymentReadOnly =\n employmentStatus &&\n reviewStepAllowedEmploymentStatus.includes(employmentStatus);\n\n const canInvite =\n employmentStatus &&\n !disabledInviteButtonEmploymentStatus.includes(employmentStatus);\n\n const invitedStatus: 'invited' | 'not_invited' = useMemo(() => {\n const isInvited = employmentStatus === 'invited';\n\n return isInvited ? 'invited' : 'not_invited';\n }, [employmentStatus]);\n\n const createEmploymentMutation = useCreateEmployment();\n const updateEmploymentMutation = useUpdateEmployment(\n internalCountryCode as string,\n options,\n );\n const createContractorContractDocumentMutation =\n useCreateContractorContractDocument();\n const uploadFileMutation = useUploadFile();\n const { mutateAsync: updateUKandSaudiFieldsMutation } =\n useUpdateUKandSaudiFields(\n createContractorContractDocumentMutation,\n uploadFileMutation,\n fieldValues,\n );\n const createEligibilityQuestionnaireMutation =\n usePostCreateEligibilityQuestionnaire();\n const manageContractorCorSubscriptionMutation =\n usePostManageContractorCorSubscription();\n\n const { mutateAsyncOrThrow: updateEmploymentMutationAsync } =\n mutationToPromise(updateEmploymentMutation);\n const signContractDocumentMutation = useSignContractDocument();\n const manageContractorSubscriptionMutation =\n usePostManageContractorSubscriptions();\n const deleteContractorCorSubscriptionMutation =\n useDeleteContractorCorSubscription();\n\n const { mutateAsyncOrThrow: createEmploymentMutationAsync } =\n mutationToPromise(createEmploymentMutation);\n\n const { mutateAsyncOrThrow: createContractorContractDocumentMutationAsync } =\n mutationToPromise(createContractorContractDocumentMutation);\n\n const { mutateAsyncOrThrow: signContractDocumentMutationAsync } =\n mutationToPromise(signContractDocumentMutation);\n\n const { mutateAsyncOrThrow: manageContractorSubscriptionMutationAsync } =\n mutationToPromise(manageContractorSubscriptionMutation);\n\n const { mutateAsyncOrThrow: createEligibilityQuestionnaireMutationAsync } =\n mutationToPromise(createEligibilityQuestionnaireMutation);\n\n const { mutateAsyncOrThrow: manageContractorCorSubscriptionMutationAsync } =\n mutationToPromise(manageContractorCorSubscriptionMutation);\n\n const { mutateAsyncOrThrow: deleteContractorCorSubscriptionMutationAsync } =\n mutationToPromise(deleteContractorCorSubscriptionMutation);\n\n // if the employment is loaded, country code has not been set yet\n // we set the internal country code with the employment country code\n if (employmentId && employment?.country?.code && !internalCountryCode) {\n setInternalCountryCode(employment.country.code);\n }\n\n const {\n selectCountryForm,\n isLoading: isLoadingCountries,\n countries,\n } = useCountriesSchemaField({\n jsfModify: options?.jsfModify?.select_country,\n });\n\n const selectedCountry = useMemo(() => {\n return countries?.find((country) => country.value === internalCountryCode);\n }, [countries, internalCountryCode]);\n\n const countryName = useMemo(() => {\n return selectedCountry?.label;\n }, [selectedCountry]);\n\n const isPricingPlanEnabled =\n stepState.currentStep.name === 'pricing_plan' ||\n (Boolean(employmentId) && isEmploymentReadOnly);\n\n const {\n form: selectContractorSubscriptionForm,\n isLoading: isLoadingContractorSubscriptions,\n contractorSubscriptions,\n refetch: refetchContractorSubscriptions,\n isEligibilityQuestionnaireBlocked,\n } = useContractorSubscriptionSchemaField(\n internalEmploymentId as string,\n selectedCountry,\n {\n jsonSchemaVersion: options?.jsonSchemaVersion,\n queryOptions: {\n enabled: isPricingPlanEnabled,\n },\n excludeProducts: excludeProducts,\n jsfModify: options?.jsfModify?.pricing_plan,\n },\n );\n\n const hasEligibilityQuestionnaireSubmitted = useMemo(() => {\n return Boolean(\n contractorSubscriptions?.find(\n (subscription) => subscription.product.short_name === 'COR',\n )?.eligibility_questionnaire?.submitted_at,\n );\n }, [contractorSubscriptions]);\n\n useEffect(() => {\n if (hasEligibilityQuestionnaireSubmitted) {\n setIncludeEligibilityQuestionnaire(false);\n return;\n } else if (selectedProduct === corProductIdentifier) {\n setIncludeEligibilityQuestionnaire(true);\n } else {\n setIncludeEligibilityQuestionnaire(false);\n }\n }, [hasEligibilityQuestionnaireSubmitted, selectedProduct]);\n\n useEffect(() => {\n const isCor = employment?.contractor_type === 'cor';\n setIncludeContractPreview(!isCor);\n }, [employment?.contractor_type]);\n\n const eligibilityAnswers = useMemo(() => {\n return contractorSubscriptions?.find(\n (subscription) => subscription.product.short_name === 'COR',\n )?.eligibility_questionnaire?.responses;\n }, [contractorSubscriptions]);\n\n const formType =\n stepToFormSchemaMap[stepState.currentStep.name] ||\n 'contractor_basic_information';\n const employmentKey = jsonSchemaToEmployment[formType] as keyof Employment;\n const serverEmploymentData = (employment?.[employmentKey] || {}) as Record<\n string,\n unknown\n >;\n\n const useJSONSchema = ({\n form,\n options: jsonSchemaOptions = {},\n query = {},\n }: {\n form: JSONSchemaFormType;\n options?: {\n jsfModify?: JSFModify;\n queryOptions?: { enabled?: boolean };\n jsonSchemaVersion?: FlowOptions['jsonSchemaVersion'];\n };\n query?: Record<string, string>;\n }) => {\n const hasUserEnteredAnyValues = Object.keys(fieldValues).length > 0;\n // when you write on the fields, the values are stored in the fieldValues state\n // when values are stored in the stepState is when the user has navigated to the step\n // and then we have the values from the server and the onboardingInitialValues that the user can inject,\n const mergedFormValues = hasUserEnteredAnyValues\n ? {\n ...onboardingInitialValues,\n ...stepState.values?.[stepState.currentStep.name], // Restore values for the current step\n ...fieldValues,\n }\n : {\n ...onboardingInitialValues,\n ...serverEmploymentData,\n };\n\n return useJSONSchemaForm({\n countryCode: internalCountryCode as string,\n form: form,\n fieldValues: mergedFormValues,\n query,\n options: {\n ...jsonSchemaOptions,\n queryOptions: {\n enabled: jsonSchemaOptions.queryOptions?.enabled ?? true,\n },\n },\n });\n };\n\n const isBasicInformationDetailsEnabled = Boolean(\n internalCountryCode &&\n (stepState.currentStep.name === 'basic_information' ||\n Boolean(employmentId)),\n );\n\n const isIR35FileEnabled = Boolean(\n internalCountryCode === 'GBR' &&\n employmentId &&\n stepState.currentStep.name === 'basic_information',\n );\n\n const { data: ir35File, isLoading: isLoadingIR35File } = useGetIR35File(\n employmentId as string,\n {\n enabled: isIR35FileEnabled,\n },\n );\n\n const { data: contractDocuments, isLoading: isLoadingContractDocuments } =\n useGetContractDocuments(employmentId as string, {\n enabled: Boolean(employmentId),\n });\n\n useEffect(() => {\n if (\n contractDocuments &&\n contractDocuments.length > 0 &&\n !internalContractDocumentId\n ) {\n setInternalContractDocumentId(contractDocuments[0].id);\n }\n }, [contractDocuments, internalContractDocumentId]);\n\n const {\n data: basicInformationForm,\n isLoading: isLoadingBasicInformationForm,\n } = useJSONSchema({\n form: 'contractor_basic_information',\n options: {\n jsfModify: buildBasicInformationJsfModify(\n internalCountryCode as string,\n countryName,\n options,\n ),\n queryOptions: {\n enabled: isBasicInformationDetailsEnabled,\n },\n },\n });\n\n const descriptionProvisionalStartDate = useMemo(() => {\n return calculateProvisionalStartDateDescription(\n employment?.basic_information?.provisional_start_date as string,\n fieldValues?.service_duration?.provisional_start_date as string,\n );\n }, [\n employment?.basic_information?.provisional_start_date,\n fieldValues?.service_duration?.provisional_start_date,\n ]);\n\n /**\n * When the user selects COR, the data isn't saved yet in the BE\n * We need to use the internalState to know what has happened\n */\n const selectedPricingPlan = useMemo(() => {\n const subscriptions = {\n standard: contractorStandardProductIdentifier,\n plus: contractorPlusProductIdentifier,\n cor: corProductIdentifier,\n };\n\n // HIGHEST PRIORITY: Current form value (user is actively selecting)\n if (fieldValues.subscription) {\n return fieldValues.subscription;\n }\n\n // SECOND: Previously submitted value in this session\n const subscription = stepState.values?.pricing_plan?.subscription;\n if (subscription && !isEligibilityQuestionnaireBlocked) {\n return subscription;\n }\n\n // THIRD: Backend state (eligibility submitted or employment contractor_type)\n if (\n hasEligibilityQuestionnaireSubmitted &&\n !isEligibilityQuestionnaireBlocked\n ) {\n return corProductIdentifier;\n }\n\n // Fourth: If the eligibility questionnaire is blocked and has been submitted, return the standard product\n if (\n isEligibilityQuestionnaireBlocked &&\n hasEligibilityQuestionnaireSubmitted\n ) {\n return contractorStandardProductIdentifier;\n }\n\n // FALLBACK: Employment contractor_type or default\n return (\n subscriptions[\n employment?.contractor_type as keyof typeof subscriptions\n ] || contractorStandardProductIdentifier\n );\n }, [\n fieldValues,\n stepState.values,\n hasEligibilityQuestionnaireSubmitted,\n employment?.contractor_type,\n isEligibilityQuestionnaireBlocked,\n ]);\n\n useEffect(() => {\n if (selectedPricingPlan && selectedPricingPlan !== selectedProduct) {\n setSelectedProduct(selectedPricingPlan);\n }\n }, [selectedPricingPlan, selectedProduct]);\n\n const eligibilityFields = useMemo(() => {\n return {\n ...eligibilityAnswers,\n ...onboardingInitialValues,\n ...stepState.values?.eligibility_questionnaire,\n ...fieldValues,\n };\n }, [\n eligibilityAnswers,\n onboardingInitialValues,\n stepState.values?.eligibility_questionnaire,\n fieldValues,\n ]);\n\n const isEligibilityQuestionnaireEnabled = useMemo(() => {\n return (\n (selectedPricingPlan === corProductIdentifier &&\n stepState.currentStep.name === 'eligibility_questionnaire') ||\n (Boolean(employmentId) &&\n isEmploymentReadOnly &&\n selectedPricingPlan === corProductIdentifier)\n );\n }, [\n selectedPricingPlan,\n stepState.currentStep.name,\n employmentId,\n isEmploymentReadOnly,\n ]);\n\n const {\n data: eligibilityQuestionnaireForm,\n isLoading: isLoadingEligibilityQuestionnaire,\n } = useGetEligibilityQuestionnaire({\n options: {\n queryOptions: {\n enabled: isEligibilityQuestionnaireEnabled,\n },\n jsfModify: options?.jsfModify?.eligibility_questionnaire,\n },\n fieldValues: eligibilityFields,\n });\n\n const isContractorOnboardingDetailsEnabled = Boolean(\n (internalCountryCode &&\n stepState.currentStep.name === 'contract_details') ||\n isEmploymentReadOnly,\n );\n\n const {\n data: contractorOnboardingDetailsForm,\n isLoading: isLoadingContractorOnboardingDetailsForm,\n } = useContractorOnboardingDetailsSchemaWithCurrencies({\n countryCode: internalCountryCode as string,\n fieldValues: fieldValues,\n employmentId: internalEmploymentId as string,\n options: {\n queryOptions: {\n enabled: isContractorOnboardingDetailsEnabled,\n },\n jsfModify: buildContractDetailsJsfModify(\n options?.jsfModify?.contract_details,\n descriptionProvisionalStartDate,\n selectedPricingPlan,\n fieldValues,\n ),\n },\n });\n\n const isSignatureSchemaEnabled = useMemo(() => {\n return (\n stepState.currentStep.name === 'contract_preview' ||\n (Boolean(employmentId) && isEmploymentReadOnly)\n );\n }, [stepState.currentStep.name, employmentId, isEmploymentReadOnly]);\n\n const { data: signatureSchemaForm } = useGetContractDocumentSignatureSchema({\n fieldValues: fieldValues,\n options: {\n queryOptions: {\n enabled: isSignatureSchemaEnabled,\n },\n jsfModify: buildContractPreviewJsfModify(options, fieldValues),\n },\n });\n\n const { data: documentPreviewPdf, isLoading: isLoadingDocumentPreviewForm } =\n useGetShowContractDocument({\n employmentId: internalEmploymentId as string,\n contractDocumentId: internalContractDocumentId as string,\n options: {\n queryOptions: {\n enabled: Boolean(internalContractDocumentId),\n },\n },\n });\n\n const stepFields: Record<StepKeys, JSFFields> = useMemo(\n () => ({\n select_country: selectCountryForm?.fields || [],\n basic_information: basicInformationForm?.fields || [],\n pricing_plan: selectContractorSubscriptionForm?.fields || [],\n eligibility_questionnaire: eligibilityQuestionnaireForm?.fields || [],\n contract_details: contractorOnboardingDetailsForm?.fields || [],\n contract_preview: signatureSchemaForm?.fields || [],\n review: [],\n }),\n [\n selectCountryForm?.fields,\n basicInformationForm?.fields,\n selectContractorSubscriptionForm?.fields,\n contractorOnboardingDetailsForm?.fields,\n signatureSchemaForm?.fields,\n eligibilityQuestionnaireForm?.fields,\n ],\n );\n\n const stepFieldsWithFlatFieldsets: Record<\n StepKeys,\n JSFFieldset | null | undefined\n > = {\n select_country: null,\n basic_information: basicInformationForm?.meta['x-jsf-fieldsets'],\n pricing_plan: null,\n contract_details: contractorOnboardingDetailsForm?.meta['x-jsf-fieldsets'],\n eligibility_questionnaire: null,\n contract_preview: null,\n review: null,\n };\n\n const {\n country,\n basic_information: employmentBasicInformation = {},\n contract_details: employmentContractDetails = {},\n } = employment || {};\n\n const employmentCountryCode = country?.code;\n\n const selectCountryInitialValues = useMemo(\n () =>\n getInitialValues(stepFields.select_country, {\n country: internalCountryCode || employmentCountryCode || '',\n }),\n [stepFields.select_country, internalCountryCode, employmentCountryCode],\n );\n\n // memoize file conversion to avoid re-converting the file on every render\n // noticed performance issues when not doing memoizing individually\n const convertedIr35File = useMemo(() => {\n if (!ir35File?.content) return null;\n return dataURLtoFile(ir35File.content as unknown as string, ir35File.name);\n }, [ir35File?.content, ir35File?.name]);\n\n const basicInformationInitialValues = useMemo(() => {\n const initialValues = {\n ...onboardingInitialValues,\n ...employmentBasicInformation,\n ir35: employment?.contract_details?.ir_35,\n nationality_status: employment?.contract_details?.nationality,\n ...(convertedIr35File && {\n ir35_sds_file: [convertedIr35File],\n }),\n };\n\n return getInitialValues(stepFields.basic_information, initialValues);\n }, [\n onboardingInitialValues,\n employmentBasicInformation,\n employment?.contract_details?.ir_35,\n employment?.contract_details?.nationality,\n convertedIr35File,\n stepFields.basic_information,\n ]);\n\n const contractDetailsInitialValues = useMemo(() => {\n const hardcodedValues = {\n service_duration: {\n provisional_start_date:\n employmentBasicInformation.provisional_start_date,\n },\n };\n const initialValues = {\n ...hardcodedValues,\n ...onboardingInitialValues,\n ...employmentContractDetails,\n };\n\n return getInitialValues(stepFields.contract_details, initialValues);\n }, [\n stepFields.contract_details,\n employmentContractDetails,\n onboardingInitialValues,\n employmentBasicInformation,\n ]);\n\n const contractPreviewInitialValues = useMemo(() => {\n const signature = documentPreviewPdf?.contract_document?.signatories?.find(\n (signatory) => signatory.type === 'company',\n );\n const initialValues = {\n ...onboardingInitialValues,\n signature: signature?.signature,\n };\n\n return getInitialValues(stepFields.contract_preview, initialValues);\n }, [\n stepFields.contract_preview,\n onboardingInitialValues,\n documentPreviewPdf,\n ]);\n\n const pricingPlanInitialValues = useMemo(() => {\n const preselectedPricingPlan = {\n subscription: selectedPricingPlan,\n };\n const initialValues = {\n ...preselectedPricingPlan,\n ...onboardingInitialValues,\n };\n\n return getInitialValues(stepFields.pricing_plan, initialValues);\n }, [stepFields.pricing_plan, onboardingInitialValues, selectedPricingPlan]);\n\n const eligibilityQuestionnaireInitialValues = useMemo(() => {\n const initialValues = {\n ...onboardingInitialValues,\n ...eligibilityAnswers,\n };\n return getInitialValues(\n stepFields.eligibility_questionnaire,\n initialValues,\n );\n }, [\n stepFields.eligibility_questionnaire,\n onboardingInitialValues,\n eligibilityAnswers,\n ]);\n\n const initialValues = useMemo(() => {\n return {\n select_country: selectCountryInitialValues,\n basic_information: basicInformationInitialValues,\n contract_details: contractDetailsInitialValues,\n contract_preview: contractPreviewInitialValues,\n pricing_plan: pricingPlanInitialValues,\n eligibility_questionnaire: eligibilityQuestionnaireInitialValues,\n };\n }, [\n selectCountryInitialValues,\n basicInformationInitialValues,\n contractDetailsInitialValues,\n contractPreviewInitialValues,\n pricingPlanInitialValues,\n eligibilityQuestionnaireInitialValues,\n ]);\n\n const shouldHandleReadOnlyEmployment = Boolean(\n employmentId &&\n isEmploymentReadOnly &&\n stepState.currentStep.name !== 'review',\n );\n\n const initialLoading =\n isLoadingCountries ||\n isLoadingBasicInformationForm ||\n isLoadingEmployment ||\n isLoadingContractorOnboardingDetailsForm ||\n isLoadingContractorSubscriptions ||\n isLoadingDocumentPreviewForm ||\n isLoadingIR35File ||\n isLoadingContractDocuments ||\n isLoadingEligibilityQuestionnaire;\n\n const isNavigatingToReview = useMemo(() => {\n const isCor = employment?.contractor_type === 'cor';\n const hasContractPreviewFields =\n isCor || stepFields.contract_preview.length > 0;\n\n return Boolean(\n shouldHandleReadOnlyEmployment &&\n !initialLoading &&\n Boolean(internalContractDocumentId) &&\n stepFields.basic_information.length > 0 &&\n stepFields.contract_details.length > 0 &&\n hasContractPreviewFields,\n );\n }, [\n shouldHandleReadOnlyEmployment,\n initialLoading,\n internalContractDocumentId,\n stepFields.basic_information.length,\n stepFields.contract_details.length,\n stepFields.contract_preview.length,\n employment?.contractor_type,\n ]);\n\n useEffect(() => {\n if (isNavigatingToReview) {\n fieldsMetaRef.current = {\n select_country: prettifyFormValues(\n selectCountryInitialValues,\n stepFields.select_country,\n ),\n basic_information: prettifyFormValues(\n basicInformationInitialValues,\n stepFields.basic_information,\n ),\n contract_details: prettifyFormValues(\n contractDetailsInitialValues,\n stepFields.contract_details,\n ),\n contract_preview: prettifyFormValues(\n contractPreviewInitialValues,\n stepFields.contract_preview,\n ),\n pricing_plan: prettifyFormValues(\n pricingPlanInitialValues,\n stepFields.pricing_plan,\n ),\n eligibility_questionnaire: prettifyFormValues(\n eligibilityQuestionnaireInitialValues,\n stepFields.eligibility_questionnaire,\n ),\n };\n\n setStepValues({\n select_country: selectCountryInitialValues,\n basic_information: basicInformationInitialValues,\n contract_details: contractDetailsInitialValues,\n contract_preview: contractPreviewInitialValues,\n pricing_plan: pricingPlanInitialValues,\n eligibility_questionnaire: eligibilityQuestionnaireInitialValues,\n review: {},\n });\n goToStep('review');\n }\n }, [\n isNavigatingToReview,\n goToStep,\n selectCountryInitialValues,\n basicInformationInitialValues,\n contractDetailsInitialValues,\n setStepValues,\n stepFields.select_country,\n stepFields.basic_information,\n stepFields.contract_details,\n stepFields.pricing_plan,\n pricingPlanInitialValues,\n stepFields.contract_preview,\n contractPreviewInitialValues,\n stepFields.eligibility_questionnaire,\n eligibilityQuestionnaireInitialValues,\n ]);\n\n const goTo = (step: StepKeys) => {\n goToStep(step);\n };\n\n const parseFormValues = async (values: FieldValues) => {\n if (selectCountryForm && stepState.currentStep.name === 'select_country') {\n return values;\n }\n\n if (\n basicInformationForm &&\n stepState.currentStep.name === 'basic_information'\n ) {\n return await parseJSFToValidate(values, basicInformationForm?.fields, {\n isPartialValidation: false,\n });\n }\n\n if (\n contractorOnboardingDetailsForm &&\n stepState.currentStep.name === 'contract_details'\n ) {\n return await parseJSFToValidate(\n values,\n contractorOnboardingDetailsForm?.fields,\n {\n isPartialValidation: false,\n },\n );\n }\n\n if (\n signatureSchemaForm &&\n stepState.currentStep.name === 'contract_preview'\n ) {\n return await parseJSFToValidate(values, signatureSchemaForm?.fields, {\n isPartialValidation: false,\n });\n }\n\n if (\n selectContractorSubscriptionForm &&\n stepState.currentStep.name === 'pricing_plan'\n ) {\n return await parseJSFToValidate(\n values,\n selectContractorSubscriptionForm?.fields,\n {\n isPartialValidation: false,\n },\n );\n }\n\n if (\n eligibilityQuestionnaireForm &&\n stepState.currentStep.name === 'eligibility_questionnaire'\n ) {\n return await parseJSFToValidate(\n values,\n eligibilityQuestionnaireForm?.fields,\n {\n isPartialValidation: false,\n },\n );\n }\n\n return {};\n };\n\n async function onSubmit(values: FieldValues) {\n const currentStepName = stepState.currentStep.name;\n if (currentStepName in fieldsMetaRef.current) {\n fieldsMetaRef.current[\n currentStepName as keyof typeof fieldsMetaRef.current\n ] = prettifyFormValues(values, stepFields[currentStepName]);\n }\n const parsedValues = await parseFormValues(values);\n switch (stepState.currentStep.name) {\n case 'select_country': {\n setInternalCountryCode(parsedValues.country);\n return Promise.resolve({ data: { countryCode: parsedValues.country } });\n }\n case 'basic_information': {\n const isEmploymentNotLoaded =\n !internalEmploymentId && internalCountryCode;\n const hasChangedCountry =\n internalEmploymentId &&\n internalCountryCode &&\n employment?.country &&\n employment?.country.code !== internalCountryCode;\n\n if (isEmploymentNotLoaded || hasChangedCountry) {\n const basicInformationParsedValues = omit(\n parsedValues,\n 'nationality_status',\n 'ir35',\n 'ir35_sds_file',\n );\n const basicInformationPayload: EmploymentCreateParams = {\n basic_information: basicInformationParsedValues,\n type: 'contractor',\n country_code: internalCountryCode,\n external_id: externalId,\n };\n const response = await createEmploymentMutationAsync(\n basicInformationPayload,\n );\n const employmentId = response?.data?.employment?.id;\n if (!employmentId) {\n throw createStructuredError('Employment ID not found');\n }\n\n await updateUKandSaudiFieldsMutation({\n employmentId: employmentId as string,\n });\n\n // Only update state (triggers queries with fully consistent backend state) if not caused a bug\n // if one of the updateUKandSaudiFieldsMutation fails with a 422 for example\n setInternalEmploymentId(employmentId);\n\n return response;\n } else if (internalEmploymentId) {\n const basicInformationParsedValues = omit(\n parsedValues,\n 'nationality_status',\n 'ir35',\n 'ir35_sds_file',\n );\n\n await updateUKandSaudiFieldsMutation({\n employmentId: internalEmploymentId,\n });\n return updateEmploymentMutationAsync({\n employmentId: internalEmploymentId,\n basic_information: basicInformationParsedValues,\n });\n }\n\n return;\n }\n case 'contract_details': {\n const payload: CreateContractDocument = {\n contract_document: parsedValues,\n };\n const response = await createContractorContractDocumentMutationAsync({\n employmentId: internalEmploymentId as string,\n payload,\n });\n const contractDocumentId = response?.data?.contract_document?.id;\n if (!contractDocumentId) {\n throw createStructuredError('Contract document ID not found');\n }\n setInternalContractDocumentId(contractDocumentId);\n\n await refetchEmployment();\n\n return response;\n }\n\n case 'contract_preview': {\n return signContractDocumentMutationAsync({\n employmentId: internalEmploymentId as string,\n contractDocumentId: internalContractDocumentId as string,\n payload: {\n signature: parsedValues.signature,\n },\n });\n }\n case 'pricing_plan': {\n const blockedProductsEligibility = [\n corProductIdentifier,\n contractorPlusProductIdentifier,\n ];\n\n if (\n isEligibilityQuestionnaireBlocked &&\n blockedProductsEligibility.includes(values.subscription)\n ) {\n throw createStructuredError(\n `This individual is not eligible for ${\n CONTRACT_PRODUCT_TITLES[\n values.subscription as keyof typeof CONTRACT_PRODUCT_TITLES\n ]\n }.`,\n );\n }\n // Handle EOR selection (from merged options)\n if (values.subscription === eorProductIdentifier) {\n // EOR selection - no API call needed at this step\n return Promise.resolve({\n data: {\n subscription: values.subscription,\n },\n });\n }\n\n if (\n hasEligibilityQuestionnaireSubmitted &&\n values.subscription !== corProductIdentifier\n ) {\n try {\n await deleteContractorCorSubscriptionMutationAsync({\n employmentId: internalEmploymentId as string,\n });\n await refetchContractorSubscriptions();\n } catch (error) {\n if ((error as $TSFixMe)?.response?.status !== 404) {\n throw error;\n }\n // Still refetch to update the UI state\n await refetchContractorSubscriptions();\n }\n }\n\n if (values.subscription == contractorStandardProductIdentifier) {\n return manageContractorSubscriptionMutationAsync({\n employmentId: internalEmploymentId as string,\n payload: {\n operation: 'downgrade',\n },\n });\n } else if (values.subscription == contractorPlusProductIdentifier) {\n return manageContractorSubscriptionMutationAsync({\n employmentId: internalEmploymentId as string,\n payload: {\n operation: 'upgrade',\n },\n });\n } else if (values.subscription == corProductIdentifier) {\n return Promise.resolve({\n data: { subscription: values.subscription },\n });\n }\n\n throw createStructuredError('invalid selection');\n }\n\n case 'eligibility_questionnaire': {\n try {\n const response = await createEligibilityQuestionnaireMutationAsync({\n employmentId: internalEmploymentId as string,\n payload: parsedValues,\n });\n\n const isEligibilityQuestionnaireBlocked = response?.data?.is_blocking;\n\n if (isEligibilityQuestionnaireBlocked) {\n setIncludeEligibilityQuestionnaire(false);\n setPendingNavigationStep('pricing_plan');\n throw createStructuredError(\n 'This individual is not eligible for Contractor of Record.',\n );\n }\n\n return await manageContractorCorSubscriptionMutationAsync({\n employmentId: internalEmploymentId as string,\n });\n } finally {\n // Always refetch to keep state in sync, even on error\n await refetchContractorSubscriptions();\n }\n }\n\n default: {\n throw createStructuredError('Invalid step state');\n }\n }\n }\n\n const isLoading = initialLoading || shouldHandleReadOnlyEmployment;\n\n return {\n /**\n * Loading state indicating if the flow is loading data\n */\n isLoading,\n\n /**\n * Current state of the form fields for the current step.\n */\n fieldValues,\n\n /**\n * Current step state containing the current step and total number of steps\n */\n stepState,\n\n /**\n * Function to update the current form field values\n * @param values - New form values to set\n */\n checkFieldUpdates: setFieldValues,\n\n /**\n * Function to handle going back to the previous step\n * @returns {void}\n */\n back: previousStep,\n\n /**\n * Function to handle going to the next step\n * @returns {void}\n */\n next: nextStep,\n\n /**\n * Function to handle going to a specific step\n * @param step The step to go to.\n * @returns {void}\n */\n goTo: goTo,\n\n /**\n * Function to handle form submission\n * @param values - Form values to submit\n * @returns Promise resolving to the mutation result\n */\n onSubmit,\n\n /**\n * Array of form fields from the onboarding schema\n */\n fields: stepFields[stepState.currentStep.name],\n\n /**\n * Fields metadata for each step\n */\n meta: {\n fields: fieldsMetaRef.current,\n fieldsets: stepFieldsWithFlatFieldsets[stepState.currentStep.name],\n },\n\n /**\n * Function to parse form values before submission\n * @param values - Form values to parse\n * @returns Parsed form values\n */\n parseFormValues,\n\n /**\n * Function to validate form values against the onboarding schema\n * @param values - Form values to validate\n * @returns Validation result or null if no schema is available\n */\n handleValidation: async (\n values: FieldValues,\n ): Promise<ValidationResult | null> => {\n if (stepState.currentStep.name === 'select_country') {\n return selectCountryForm.handleValidation(values);\n }\n\n if (\n basicInformationForm &&\n stepState.currentStep.name === 'basic_information'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n basicInformationForm?.fields,\n { isPartialValidation: false },\n );\n return basicInformationForm?.handleValidation(parsedValues);\n }\n\n if (\n contractorOnboardingDetailsForm &&\n stepState.currentStep.name === 'contract_details'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n contractorOnboardingDetailsForm?.fields,\n { isPartialValidation: false },\n );\n return contractorOnboardingDetailsForm?.handleValidation(parsedValues);\n }\n\n if (\n signatureSchemaForm &&\n stepState.currentStep.name === 'contract_preview'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n signatureSchemaForm?.fields,\n { isPartialValidation: true },\n );\n return signatureSchemaForm?.handleValidation(parsedValues);\n }\n\n if (\n selectContractorSubscriptionForm &&\n stepState.currentStep.name === 'pricing_plan'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n selectContractorSubscriptionForm?.fields,\n { isPartialValidation: false },\n );\n return selectContractorSubscriptionForm?.handleValidation(parsedValues);\n }\n\n if (\n eligibilityQuestionnaireForm &&\n stepState.currentStep.name === 'eligibility_questionnaire'\n ) {\n const parsedValues = await parseJSFToValidate(\n values,\n eligibilityQuestionnaireForm?.fields,\n { isPartialValidation: false },\n );\n return eligibilityQuestionnaireForm?.handleValidation(parsedValues);\n }\n\n return null;\n },\n\n /**\n * Initial form values\n */\n initialValues,\n\n /**\n * Employment id\n */\n employmentId: internalEmploymentId,\n\n /**\n * Function to refetch the employment data\n * @returns {void}\n */\n refetchEmployment: refetchEmployment,\n\n /**\n * Loading state indicating if the onboarding mutation is in progress\n */\n isSubmitting:\n createEmploymentMutation.isPending ||\n updateEmploymentMutation.isPending ||\n createContractorContractDocumentMutation.isPending ||\n signContractDocumentMutation.isPending ||\n manageContractorSubscriptionMutation.isPending ||\n uploadFileMutation.isPending ||\n createEligibilityQuestionnaireMutation.isPending ||\n manageContractorCorSubscriptionMutation.isPending ||\n deleteContractorCorSubscriptionMutation.isPending,\n\n /**\n * Document preview PDF data\n */\n documentPreviewPdf,\n\n /**\n * let's the user know if the company can invite employees\n * @returns {boolean}\n */\n canInvite,\n\n /**\n * let's the user know that the employment cannot be edited, happens when employment.status is invited\n * @returns {boolean}\n */\n isEmploymentReadOnly,\n /**\n * let's the user know if the employment is invited or not\n * @returns {'invited' | 'not_invited'}\n */\n invitedStatus,\n\n /**\n * Employment data\n * @returns {Employment}\n */\n employment,\n\n /**\n * Default legal entity\n * @returns {CompanyLegalEntity}\n */\n defaultLegalEntity,\n /**\n * Steps array\n * @returns {Array<{name: string, index: number, label: string}>}\n */\n steps: stepsArray,\n };\n};\n","import { useQuery } from '@tanstack/react-query';\nimport { getIndexCompanyLegalEntities } from '@/src/client';\nimport { Client } from '@/src/client/client';\nimport { useClient } from '@/src/context';\nimport { useIdentity } from '@/src/common/api/identity';\nimport { hasCompany } from '@/src/common/api/companies';\n\n/**\n * Hook to get the legal entities for a company\n * @param companyId - The company ID\n * @returns The legal entities\n */\nexport const useLegalEntities = () => {\n const { client } = useClient();\n const { data: identity } = useIdentity();\n const companyId = hasCompany(identity) ? (identity?.company?.id ?? '') : '';\n\n return useQuery({\n queryKey: ['legal-entities', companyId],\n queryFn: () =>\n getIndexCompanyLegalEntities({\n client: client as Client,\n path: {\n company_id: companyId,\n },\n }),\n select: (data) => data.data?.data?.legal_entities,\n enabled: !!companyId,\n });\n};\n\nexport const useDefaultLegalEntity = () => {\n const { data: legalEntities } = useLegalEntities();\n return legalEntities?.find((legalEntity) => legalEntity.is_default);\n};\n"],"mappings":"qwBAAA,OAAS,aAAAA,EAAW,WAAAC,EAAS,UAAAC,GAAQ,YAAAC,MAAgB,QAErD,OAAOC,OAAU,cCFjB,OAAS,YAAAC,OAAgB,wBAYlB,IAAMC,GAAmBC,EAAA,IAAM,CACpC,GAAM,CAAE,OAAAC,CAAO,EAAIC,GAAU,EACvB,CAAE,KAAMC,CAAS,EAAIC,GAAY,EACjCC,EAAYC,GAAWH,CAAQ,EAAKA,GAAU,SAAS,IAAM,GAAM,GAEzE,OAAOI,GAAS,CACd,SAAU,CAAC,iBAAkBF,CAAS,EACtC,QAASL,EAAA,IACPQ,GAA6B,CAC3B,OAAQP,EACR,KAAM,CACJ,WAAYI,CACd,CACF,CAAC,EANM,WAOT,OAAQL,EAACS,GAASA,EAAK,MAAM,MAAM,eAA3B,UACR,QAAS,CA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EAMA,mBAAAI,GAKA,MAAOhB,EACT,CACF,EA/sCuC","names":["useEffect","useMemo","useRef","useState","omit","useQuery","useLegalEntities","__name","client","useClient","identity","useIdentity","companyId","hasCompany","useQuery","getIndexCompanyLegalEntities","data","useDefaultLegalEntity","legalEntities","legalEntity","stepToFormSchemaMap","jsonSchemaToEmployment","useContractorOnboarding","__name","countryCode","externalId","employmentId","skipSteps","options","onboardingInitialValues","excludeProducts","internalCountryCode","setInternalCountryCode","useState","internalEmploymentId","setInternalEmploymentId","internalContractDocumentId","setInternalContractDocumentId","fieldsMetaRef","useRef","selectedProduct","setSelectedProduct","includeEligibilityQuestionnaire","setIncludeEligibilityQuestionnaire","includeContractPreview","setIncludeContractPreview","pendingNavigationStep","setPendingNavigationStep","steps","stepsArray","useMemo","buildSteps","fieldValues","stepState","setFieldValues","previousStep","nextStep","goToStep","setStepValues","useStepState","useEffect","employment","isLoadingEmployment","refetchEmployment","useEmploymentQuery","defaultLegalEntity","useDefaultLegalEntity","employmentStatus","isEmploymentReadOnly","reviewStepAllowedEmploymentStatus","canInvite","disabledInviteButtonEmploymentStatus","invitedStatus","createEmploymentMutation","useCreateEmployment","updateEmploymentMutation","useUpdateEmployment","createContractorContractDocumentMutation","useCreateContractorContractDocument","uploadFileMutation","useUploadFile","updateUKandSaudiFieldsMutation","useUpdateUKandSaudiFields","createEligibilityQuestionnaireMutation","usePostCreateEligibilityQuestionnaire","manageContractorCorSubscriptionMutation","usePostManageContractorCorSubscription","updateEmploymentMutationAsync","mutationToPromise","signContractDocumentMutation","useSignContractDocument","manageContractorSubscriptionMutation","usePostManageContractorSubscriptions","deleteContractorCorSubscriptionMutation","useDeleteContractorCorSubscription","createEmploymentMutationAsync","createContractorContractDocumentMutationAsync","signContractDocumentMutationAsync","manageContractorSubscriptionMutationAsync","createEligibilityQuestionnaireMutationAsync","manageContractorCorSubscriptionMutationAsync","deleteContractorCorSubscriptionMutationAsync","selectCountryForm","isLoadingCountries","countries","useCountriesSchemaField","selectedCountry","country","countryName","isPricingPlanEnabled","selectContractorSubscriptionForm","isLoadingContractorSubscriptions","contractorSubscriptions","refetchContractorSubscriptions","isEligibilityQuestionnaireBlocked","useContractorSubscriptionSchemaField","hasEligibilityQuestionnaireSubmitted","subscription","corProductIdentifier","isCor","eligibilityAnswers","formType","employmentKey","serverEmploymentData","useJSONSchema","form","jsonSchemaOptions","query","mergedFormValues","useJSONSchemaForm","isBasicInformationDetailsEnabled","isIR35FileEnabled","ir35File","isLoadingIR35File","useGetIR35File","contractDocuments","isLoadingContractDocuments","useGetContractDocuments","basicInformationForm","isLoadingBasicInformationForm","buildBasicInformationJsfModify","descriptionProvisionalStartDate","calculateProvisionalStartDateDescription","selectedPricingPlan","subscriptions","contractorStandardProductIdentifier","contractorPlusProductIdentifier","eligibilityFields","isEligibilityQuestionnaireEnabled","eligibilityQuestionnaireForm","isLoadingEligibilityQuestionnaire","useGetEligibilityQuestionnaire","isContractorOnboardingDetailsEnabled","contractorOnboardingDetailsForm","isLoadingContractorOnboardingDetailsForm","useContractorOnboardingDetailsSchemaWithCurrencies","buildContractDetailsJsfModify","isSignatureSchemaEnabled","signatureSchemaForm","useGetContractDocumentSignatureSchema","buildContractPreviewJsfModify","documentPreviewPdf","isLoadingDocumentPreviewForm","useGetShowContractDocument","stepFields","stepFieldsWithFlatFieldsets","employmentBasicInformation","employmentContractDetails","employmentCountryCode","selectCountryInitialValues","getInitialValues","convertedIr35File","dataURLtoFile","basicInformationInitialValues","initialValues","contractDetailsInitialValues","contractPreviewInitialValues","signature","signatory","pricingPlanInitialValues","eligibilityQuestionnaireInitialValues","shouldHandleReadOnlyEmployment","initialLoading","isNavigatingToReview","hasContractPreviewFields","prettifyFormValues","goTo","step","parseFormValues","values","parseJSFToValidate","onSubmit","currentStepName","parsedValues","isEmploymentNotLoaded","hasChangedCountry","basicInformationPayload","omit","response","createStructuredError","basicInformationParsedValues","contractDocumentId","CONTRACT_PRODUCT_TITLES","eorProductIdentifier","error"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as I}from"./chunk-TXSUZLOI.js";import{a as N}from"./chunk-A3LRPGV3.js";import{a as j,b as v,c as D,d as O}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as I}from"./chunk-TXSUZLOI.js";import{a as N}from"./chunk-A3LRPGV3.js";import{a as j,b as v,c as D,d as O}from"./chunk-7WGZGAQY.js";import{e as p,f as F}from"./chunk-T7O3YYOG.js";import{h as R,i as b}from"./chunk-VIGKOVHP.js";import{a as C}from"./chunk-X6ZAR7ZL.js";import{a as k}from"./chunk-TSPDJUGG.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=j(),g=v(),{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(N),{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(()=>F(i.company_basic_information,{...l,country_code:y||l?.country_code||""}),[i.company_basic_information,y,l]),E=S(()=>F(i.address_details,l||{}),[i.address_details,l]),Y=S(()=>({company_basic_information:h,address_details:E}),[h,E]),Z=c(t=>{H(t)},"goTo"),M=c(async t=>{let r=a.currentStep.name,e=i[r];return d&&r==="company_basic_information"?await p(t,e,{isPartialValidation:!1}):s&&r==="address_details"?await p(t,e,{isPartialValidation:!1}):{}},"parseFormValues");async function $(t){let r=a.currentStep.name;r in w.current&&(w.current[r]=R(t,i[r]));let e=await M(t);switch(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:I()},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,_,o;if(m)if("data"in m&&m.data){let T=m.data.company;o=T,_=T?.id}else"company"in m&&(o=m.company,_=o?.id);return _&&B(_),Promise.resolve({data:{countryCode:o?.country_code??e.country_code??"",companyOwnerEmail:o?.company_owner_email??e.company_owner_email??"",companyOwnerName:o?.company_owner_name??e.company_owner_name??"",desiredCurrency:o?.desired_currency??e.desired_currency??"",name:o?.name??e.name??"",phoneNumber:o?.phone_number??e.phone_number??"",taxNumber:o?.tax_number??e.tax_number??""}})}case"address_details":{if(!f)throw b("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 b("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 t=>{if(a.currentStep.name==="company_basic_information"&&d){let r=await p(t,d.fields,{isPartialValidation:!1});return d.handleValidation(r)}if(a.currentStep.name==="address_details"&&s){let r=await p(t,s.fields,{isPartialValidation:!1});return s.handleValidation(r)}return null},"handleValidation"),initialValues:Y}},"useCreateCompany");export{pe as a};
|
|
2
|
+
//# sourceMappingURL=chunk-37RMY44V.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as R,b as x,c as N,d as A}from"./chunk-6VQEAU6A.js";import{a as w,b as f}from"./chunk-XO5VURZY.js";import{a as C}from"./chunk-JJEFWMLY.js";import{b as B}from"./chunk-4YPJKEHT.js";import{a as i,b as t,e as F}from"./chunk-3PIJOIYR.js";import{a as m}from"./chunk-P37U34EQ.js";import{MoreHorizontal as P}from"lucide-react";import{useState as U}from"react";import{Fragment as $,jsx as g,jsxs as T}from"react/jsx-runtime";function E({actions:e=[],className:n,label:a,"data-testid":l}){let[_,d]=U(!1);return T("div",{className:i("relative",n),children:[g(B,{"data-testid":l,variant:"ghost","aria-label":a,className:"h-8 w-8 p-0",onClick:()=>d(!_),children:g(P,{className:"h-4 w-4"})}),_&&T($,{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(E,"ActionsDropdown");import{ChevronDown as O,Info as Z}from"lucide-react";import K from"react-flagpack";import{useState as z}from"react";import{jsx as j,jsxs as L}from"react/jsx-runtime";var I=m(({children:e,content:n})=>L("div",{className:"relative inline-block group",children:[e,L("div",{className:"absolute bottom-full right-0 mb-2 px-3 py-2 bg-gray-900 text-white text-xs rounded-md opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50 w-64 whitespace-normal break-words",children:[n,j("div",{className:"absolute top-full right-3 border-4 border-transparent border-t-gray-900"})]})]}),"BasicTooltip");import{Fragment as b,jsx as o,jsxs as r}from"react/jsx-runtime";var V={GB:"GB-UKM"},Y=m(({title:e,country:n,region:a,annualGrossSalary:l,onDelete:_,onExportPdf:d,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:d},{label:"Delete",onClick:_}];return r("div",{className:"RemoteFlows__EstimationResults__Header flex justify-between",children:[r("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(K,{code:V[n.alpha_2_code]||n.alpha_2_code})}),r("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}),r("p",{className:"RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]",children:[n.name," ",a?` (${a.name})`:""]}),r("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(E,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),q=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 J({minimumOnboardingDays:e,data:n,className:a}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",a),children:r(x,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4",children:r("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&&r("span",{className:"RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4",children:[e," days"]})]})}),r(A,{className:"px-0 pb-4",children:[o("ul",{className:"RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2",children:n.steps.map(l=>r("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:l.title})," ","- ",l.description]},l.id))}),r("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[n.helpText,n.zendeskArticleId&&o(f,{zendeskId:n.zendeskArticleId,children:"Learn more"})]})]})]})})}m(J,"OnboardingTimeline");function Q({className:e,countryBenefitsUrl:n,countryGuideUrl:a,country:l}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__HiringSection w-full",e),children:r(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:r("span",{className:"text-base font-medium text-[#0F172A]",children:["Hiring in ",l.name]})})}),o(A,{children:r("div",{className:"flex flex-col gap-1",children:[a&&o("a",{href:a,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),n&&o("a",{href:n,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}m(Q,"HiringSection");function W({isMultipleCurrency:e,className:n}){return r("div",{className:i("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",n),children:[o("span",{"aria-hidden":!0}),e?r(b,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):r(b,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}m(W,"EstimationHeaders");function S({label:e,amounts:n,className:a,children:l}){let[_,d]=z(!0);return r("div",{className:i("RemoteFlows__EstimationResults__Row",a),children:[r("div",{className:"RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center",children:[r("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(O,{className:`h-4 w-4 text-muted-foreground transition-transform ${_?"rotate-180":""}`})})]}),Array.isArray(n)?n.map((c,u)=>o("span",{className:i("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:c},u)):r(b,{children:[o("span",{}),o("span",{className:i("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:n})]})]}),_&&l&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:l})]})}m(S,"EstimationRow");function X({item:e,isMultipleCurrency:n,level:a=0}){let[l,_]=z(!1),d=e.children&&e.children.length>0,c=a>0,u=e.isCollapsible||d;return r("li",{className:i("RemoteFlows__BreakdownList__Item pb-3",c&&"pb-1"),children:[r("div",{className:i(n?"RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between":"RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between"),children:[r("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?r("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(O,{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(I,{content:r(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(Z,{className:i("RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground",c?"h-3 w-3":"h-4 w-4")})})})]}),n?r(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(h,{items:e.children,isMultipleCurrency:n,level:a+1})})]})}m(X,"BreakdownListItem");function h({items:e,isMultipleCurrency:n,className:a,level:l}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",a),children:e.map((_,d)=>o(X,{item:_,isMultipleCurrency:n,level:l},d))})}m(h,"BreakdownList");var Re=m(({estimation:e,title:n,components:a,onDelete:l,onExportPdf:_,onEdit:d})=>{let c=a?.HiringSection||Q,u=a?.OnboardingTimeline||J,H=a?.Header||Y,v=a?.Footer,D=q(),p=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,k=e.employer_currency_costs.monthly_management_fee,M=e.region.code!==e.country.code,G=t(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code);return r(C,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(H,{title:n,annualGrossSalary:G,region:M?e.region:void 0,country:e.country,onDelete:l,onExportPdf:_,onEdit:d})}),r("div",{className:"RemoteFlows__Separator",children:[o(W,{isMultipleCurrency:p,className:"mb-3"}),o(S,{label:"Monthly total cost",amounts:p?[t(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),t(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.code)]:t(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),children:o(h,{items:[{label:"Gross monthly salary",regionalAmount:t(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.code),employerAmount:t(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:t(e.regional_currency_costs.monthly_contributions_total,e.regional_currency_costs.currency.code),employerAmount:t(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:t(e.regional_currency_costs.monthly_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:t(e.regional_currency_costs.monthly_benefits_total,e.regional_currency_costs.currency.code),employerAmount:t(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:t(e.regional_currency_costs.monthly_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...k?[{label:"Monthly fee",regionalAmount:t(e.regional_currency_costs.monthly_management_fee,e.regional_currency_costs.currency.code),employerAmount:t(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(S,{label:"Annual total cost",amounts:p?[t(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),t(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.code)]:t(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),children:o(h,{items:[{label:"Gross annual salary",dataSelector:"annual-gross-salary",regionalAmount:t(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.code)},{label:"Mandatory employer costs",regionalAmount:t(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.code),employerAmount:t(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:t(e.regional_currency_costs.annual_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:t(e.regional_currency_costs.annual_benefits_total,e.regional_currency_costs.currency.code),employerAmount:t(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:t(e.regional_currency_costs.annual_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(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:t(e.regional_currency_costs.extra_statutory_payments_total,e.regional_currency_costs.currency.code),employerAmount:t(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:t(e.regional_currency_costs.extra_statutory_payments_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...k?[{label:"Annual fee",regionalAmount:t(e.regional_currency_costs.annual_management_fee,e.regional_currency_costs.currency.code),employerAmount:t(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:D})}),o(c,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),v&&o(v,{})]})},"EstimationResults");export{Re as a};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as R,b as x,c as N,d as A}from"./chunk-KRSUSMJK.js";import{a as w,b as f}from"./chunk-A232PIG7.js";import{a as C}from"./chunk-TFSRZOMP.js";import{b as B}from"./chunk-RJY6AEJB.js";import{a as i,b as t,e as F}from"./chunk-VIGKOVHP.js";import{a as m}from"./chunk-P37U34EQ.js";import{MoreHorizontal as P}from"lucide-react";import{useState as U}from"react";import{Fragment as $,jsx as g,jsxs as T}from"react/jsx-runtime";function E({actions:e=[],className:n,label:a,"data-testid":l}){let[_,d]=U(!1);return T("div",{className:i("relative",n),children:[g(B,{"data-testid":l,variant:"ghost","aria-label":a,className:"h-8 w-8 p-0",onClick:()=>d(!_),children:g(P,{className:"h-4 w-4"})}),_&&T($,{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(E,"ActionsDropdown");import{ChevronDown as O,Info as Z}from"lucide-react";import K from"react-flagpack";import{useState as z}from"react";import{jsx as j,jsxs as L}from"react/jsx-runtime";var I=m(({children:e,content:n})=>L("div",{className:"relative inline-block group",children:[e,L("div",{className:"absolute bottom-full right-0 mb-2 px-3 py-2 bg-gray-900 text-white text-xs rounded-md opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50 w-64 whitespace-normal break-words",children:[n,j("div",{className:"absolute top-full right-3 border-4 border-transparent border-t-gray-900"})]})]}),"BasicTooltip");import{Fragment as b,jsx as o,jsxs as r}from"react/jsx-runtime";var V={GB:"GB-UKM"},Y=m(({title:e,country:n,region:a,annualGrossSalary:l,onDelete:_,onExportPdf:d,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:d},{label:"Delete",onClick:_}];return r("div",{className:"RemoteFlows__EstimationResults__Header flex justify-between",children:[r("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(K,{code:V[n.alpha_2_code]||n.alpha_2_code})}),r("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}),r("p",{className:"RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]",children:[n.name," ",a?` (${a.name})`:""]}),r("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(E,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),q=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 J({minimumOnboardingDays:e,data:n,className:a}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",a),children:r(x,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4",children:r("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&&r("span",{className:"RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4",children:[e," days"]})]})}),r(A,{className:"px-0 pb-4",children:[o("ul",{className:"RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2",children:n.steps.map(l=>r("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:l.title})," ","- ",l.description]},l.id))}),r("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[n.helpText,n.zendeskArticleId&&o(f,{zendeskId:n.zendeskArticleId,children:"Learn more"})]})]})]})})}m(J,"OnboardingTimeline");function Q({className:e,countryBenefitsUrl:n,countryGuideUrl:a,country:l}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__HiringSection w-full",e),children:r(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:r("span",{className:"text-base font-medium text-[#0F172A]",children:["Hiring in ",l.name]})})}),o(A,{children:r("div",{className:"flex flex-col gap-1",children:[a&&o("a",{href:a,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),n&&o("a",{href:n,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}m(Q,"HiringSection");function W({isMultipleCurrency:e,className:n}){return r("div",{className:i("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",n),children:[o("span",{"aria-hidden":!0}),e?r(b,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):r(b,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}m(W,"EstimationHeaders");function S({label:e,amounts:n,className:a,children:l}){let[_,d]=z(!0);return r("div",{className:i("RemoteFlows__EstimationResults__Row",a),children:[r("div",{className:"RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center",children:[r("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(O,{className:`h-4 w-4 text-muted-foreground transition-transform ${_?"rotate-180":""}`})})]}),Array.isArray(n)?n.map((c,u)=>o("span",{className:i("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:c},u)):r(b,{children:[o("span",{}),o("span",{className:i("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:n})]})]}),_&&l&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:l})]})}m(S,"EstimationRow");function X({item:e,isMultipleCurrency:n,level:a=0}){let[l,_]=z(!1),d=e.children&&e.children.length>0,c=a>0,u=e.isCollapsible||d;return r("li",{className:i("RemoteFlows__BreakdownList__Item pb-3",c&&"pb-1"),children:[r("div",{className:i(n?"RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between":"RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between"),children:[r("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?r("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(O,{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(I,{content:r(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(Z,{className:i("RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground",c?"h-3 w-3":"h-4 w-4")})})})]}),n?r(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(h,{items:e.children,isMultipleCurrency:n,level:a+1})})]})}m(X,"BreakdownListItem");function h({items:e,isMultipleCurrency:n,className:a,level:l}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",a),children:e.map((_,d)=>o(X,{item:_,isMultipleCurrency:n,level:l},d))})}m(h,"BreakdownList");var Re=m(({estimation:e,title:n,components:a,onDelete:l,onExportPdf:_,onEdit:d})=>{let c=a?.HiringSection||Q,u=a?.OnboardingTimeline||J,H=a?.Header||Y,v=a?.Footer,D=q(),p=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,k=e.employer_currency_costs.monthly_management_fee,M=e.region.code!==e.country.code,G=t(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code);return r(C,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(H,{title:n,annualGrossSalary:G,region:M?e.region:void 0,country:e.country,onDelete:l,onExportPdf:_,onEdit:d})}),r("div",{className:"RemoteFlows__Separator",children:[o(W,{isMultipleCurrency:p,className:"mb-3"}),o(S,{label:"Monthly total cost",amounts:p?[t(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),t(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.code)]:t(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),children:o(h,{items:[{label:"Gross monthly salary",regionalAmount:t(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.code),employerAmount:t(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:t(e.regional_currency_costs.monthly_contributions_total,e.regional_currency_costs.currency.code),employerAmount:t(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:t(e.regional_currency_costs.monthly_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:t(e.regional_currency_costs.monthly_benefits_total,e.regional_currency_costs.currency.code),employerAmount:t(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:t(e.regional_currency_costs.monthly_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...k?[{label:"Monthly fee",regionalAmount:t(e.regional_currency_costs.monthly_management_fee,e.regional_currency_costs.currency.code),employerAmount:t(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(S,{label:"Annual total cost",amounts:p?[t(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),t(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.code)]:t(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),children:o(h,{items:[{label:"Gross annual salary",dataSelector:"annual-gross-salary",regionalAmount:t(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.code)},{label:"Mandatory employer costs",regionalAmount:t(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.code),employerAmount:t(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:t(e.regional_currency_costs.annual_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:t(e.regional_currency_costs.annual_benefits_total,e.regional_currency_costs.currency.code),employerAmount:t(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:t(e.regional_currency_costs.annual_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(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:t(e.regional_currency_costs.extra_statutory_payments_total,e.regional_currency_costs.currency.code),employerAmount:t(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:t(e.regional_currency_costs.extra_statutory_payments_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...k?[{label:"Annual fee",regionalAmount:t(e.regional_currency_costs.annual_management_fee,e.regional_currency_costs.currency.code),employerAmount:t(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:D})}),o(c,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),v&&o(v,{})]})},"EstimationResults");export{Re as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3B6XXK5H.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as s}from"./chunk-KSHK3ZPX.js";import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as s}from"./chunk-KSHK3ZPX.js";import{a as r}from"./chunk-VIGKOVHP.js";import{b as u}from"./chunk-KQPDXXG3.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as a}from"react/jsx-runtime";function b({children:m,...t}){let{formId:e,costCalculatorBag:i}=s(),{components:l}=u(),o=l?.button;if(!o)throw new Error("Button component not found");return a(o,{...t,type:"submit",className:r("RemoteFlows__CostCalculatorForm__SubmitButton",t.className),form:e,disabled:t.disabled||i?.isSubmitting,children:m})}n(b,"CostCalculatorSubmitButton");export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3BBQDNZD.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n,b as m,c as a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n,b as m,c as a}from"./chunk-TNN3W5TU.js";import{a as r}from"./chunk-P37U34EQ.js";import{CheckIcon as p,FileText as s}from"lucide-react";import{jsx as t,jsxs as i}from"react/jsx-runtime";var P=r(({reviewCompleted:l,label:e,description:o})=>i(n,{variant:"default",children:[l?t(p,{className:"h-4 w-4"}):t(s,{className:"h-4 w-4"}),e&&t(m,{dangerouslySetInnerHTML:{__html:e}}),o&&t(a,{dangerouslySetInnerHTML:{__html:o}})]}),"ContractPreviewStatement");export{P as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3DMWQJ5W.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as H}from"./chunk-AP56UUME.js";import{a as z}from"./chunk-IJCTN52C.js";import{a as N}from"./chunk-WVJDCDGZ.js";import{a as W}from"./chunk-UB6PYKNX.js";import{e as E}from"./chunk-IZGJP7OI.js";import{a as P,b as Y,c as X,d as _,f as q}from"./chunk-LHEF2FN7.js";import{a as b}from"./chunk-EUSCQL4H.js";import{d as x}from"./chunk-T7O3YYOG.js";import{A as v,E as U,M as J,P as K,R as j,T as A,U as G,V,W as k,Z as $,_ as B,f as I,h as M,o as D,q as T,r as L,s as Q}from"./chunk-7ENB7H4E.js";import{g as w}from"./chunk-VIGKOVHP.js";import{a as O}from"./chunk-X6ZAR7ZL.js";import{d as a}from"./chunk-KQPDXXG3.js";import{a as n}from"./chunk-P37U34EQ.js";import{useMemo as be}from"react";import{useMutation as f,useQuery as p}from"@tanstack/react-query";import{useMutation as de,useQuery as Z}from"@tanstack/react-query";var Re=n(()=>{let{client:e}=a();return de({mutationFn:n(t=>j({client:e,body:t,headers:{Authorization:""}}),"mutationFn")})},"useUploadFile"),ee=n(e=>{let{client:t}=a();return Z({queryKey:["download-file",e],queryFn:n(async()=>{let o=await v({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"),te=n((e,t,o)=>{let{client:r}=a();return Z({queryKey:["employment-files",e],queryFn:n(async()=>{let i=await K({client:r,path:{employment_id:e},query:t});if(i.error)throw i.error;return i.data},"queryFn"),...o})},"useEmploymentFiles");import{useQuery as me}from"@tanstack/react-query";import{useQuery as pe}from"@tanstack/react-query";var ne=n(()=>{let{client:e}=a();return pe({queryKey:["identity"],queryFn:n(()=>G({client:e,headers:{Authorization:""}}),"queryFn"),select:n(t=>t.data?.data,"select")})},"useIdentity");function ye(e){return e!=null&&"company"in e}n(ye,"hasCompany");var oe=n((e={enabled:!0})=>{let{data:t}=ne(),o=ye(t)?t?.company?.id??"":"",{client:r}=a();return me({queryKey:["pricing-plans",o],queryFn:n(()=>I({client:r,path:{company_id:o}}),"queryFn"),select:n(i=>i.data?.data?.pricing_plans,"select"),enabled:!!e?.enabled&&!!o})},"useCompanyPricingPlans");var fe=n(({employmentId:e,options:t})=>{let{client:o}=a();return p({queryKey:["contractor-currencies",e],queryFn:n(async()=>Q({client:o,path:{employment_id:e},query:{restrict_to_guaranteed_pay_out_currencies:!1}}),"queryFn"),enabled:t?.queryOptions?.enabled,select:n(({data:r})=>r?.data,"select")})},"useContractorCurrencies"),yt=n(({fieldValues:e,options:t})=>p({queryKey:["contract-document-signature",e.review_completed,t?.jsfModify],queryFn:n(async()=>b(z,e,{jsfModify:t?.jsfModify}),"queryFn"),enabled:t?.queryOptions?.enabled}),"useGetContractDocumentSignatureSchema"),bt=n(()=>{let{client:e}=a();return f({mutationFn:n(async({employmentId:t,contractDocumentId:o,payload:r})=>A({client:e,body:r,path:{employment_id:t,contract_document_id:o}}),"mutationFn")})},"useSignContractDocument"),ft=n(({employmentId:e,contractDocumentId:t,options:o})=>{let{client:r}=a();return p({queryKey:["contract-document",e,t],queryFn:n(async()=>T({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"),Ce=n(({employmentId:e,options:t})=>{let{client:o}=a();return p({queryKey:["contractor-subscriptions",e],queryFn:n(async()=>D({client:o,path:{employment_id:e}}),"queryFn"),enabled:t?.queryOptions?.enabled,select:n(({data:r})=>r?.data,"select")})},"useGetContractorSubscriptions"),Ct=n(()=>{let{client:e}=a();return f({mutationFn:n(async({employmentId:t,payload:o})=>k({client:e,body:o,path:{employment_id:t}}),"mutationFn")})},"usePostManageContractorSubscriptions"),gt=n(()=>{let{client:e}=a();return f({mutationFn:n(async({employmentId:t,payload:o})=>J({client:e,body:o,path:{employment_id:t}}),"mutationFn")})},"useCreateContractorContractDocument"),ge=n(({countryCode:e,employmentId:t,fieldValues:o,options:r})=>{let{client:i}=a();return p({queryKey:["contractor-onboarding-details-schema",e,t],retry:!1,queryFn:n(async()=>M({client:i,path:{country_code:e},query:{json_schema_version:1,employment_id:t}}),"queryFn"),enabled:r?.queryOptions?.enabled,select:n(({data:s})=>{let c=s?.data?.schema||{};return b(c,o,r)},"select")})},"useContractorOnboardingDetailsSchema"),Fe={[P]:"Contractor Management",[Y]:"Contractor Management Plus",[X]:"Contractor of Record"},Se=n(e=>{let{data:t,isLoading:o}=oe({enabled:e?.enabled}),r=t?.find(s=>s.product.name==="EOR Monthly");return{eorSubscription:{product:{identifier:_,short_name:"EOR"},currency:r?.price.currency,price:{amount:x(r?.price.amount??0)},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:_},isLoading:o}},"useEorSubscription"),he=n((e,t,o)=>(E(_,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"),Ft=n((e,t,o)=>{let{data:r,isLoading:i,refetch:s}=Ce({employmentId:e,options:{queryOptions:o?.queryOptions}}),c=r?.length===0,u=r?.length===1,l=r?.find(S=>S.product.short_name==="COR")?.eligibility_questionnaire?.is_blocking,d=(u||l===!0||c)&&t?.eor_onboarding,{eorSubscription:C,isLoading:re}=Se({enabled:d}),R=b(H.data.schema,{},o);if(r){let S=R.fields.find(h=>h.name==="subscription");if(S){let h=r.filter(m=>E(m.product.identifier??"",o?.excludeProducts)).map(m=>{let y=m.product,ie=m.price.amount,ae=m.currency.code,se=Fe[y.identifier]??"",ce=y.identifier??"",le=y.description??"",ue={features:y.features??[],price:{amount:x(ie),currencyCode:ae}};return{label:se,value:ce,description:le,meta:ue,disabled:l&&y.identifier!==P}});h.sort((m,y)=>m.label.localeCompare(y.label));let g=[];d&&(he(g,C,o?.excludeProducts),g.length>0&&(g[0].meta={...g[0].meta,groupSeparator:{show:!0}})),S.options=[...h,...g]}}return{isLoading:i||re,form:R,contractorSubscriptions:r,refetch:s,isEligibilityQuestionnaireBlocked:l}},"useContractorSubscriptionSchemaField"),St=n((e,t,o)=>{let{mutateAsyncOrThrow:r}=O(t),{mutateAsyncOrThrow:i}=O(e);return{mutateAsync:n(async({employmentId:s})=>{let{nationality_status:c,ir35:u,ir35_sds_file:F}=o,l={contract_document:{ir_35:u}},d={contract_document:{nationality:c}};return u?(await i({employmentId:s,payload:l}),F?r({employment_id:s,file:F,sub_type:q}):Promise.resolve()):c?i({employmentId:s,payload:d}):Promise.resolve()},"mutateAsync")}},"useUpdateUKandSaudiFields"),ht=n((e,t)=>{let{data:o,isLoading:r}=te(e,{sub_type:q},{...t,select:n(({data:c})=>c?.files?.filter(u=>u.sub_type===q),"select")}),i=o?.[0]?.id,s=ee(i);return{...s,isLoading:r||s.isLoading}},"useGetIR35File"),_t=n((e,t)=>{let{client:o}=a();return p({queryKey:["contract-documents",e],queryFn:n(async()=>L({client:o,path:{employment_id:e}}),"queryFn"),enabled:t?.enabled,select:n(({data:r})=>r?.data?.contract_documents,"select")})},"useGetContractDocuments"),qt=n(({options:e,fieldValues:t})=>{let{client:o}=a();return p({queryKey:["eligibility-questionnaire"],queryFn:n(async()=>{let r=await V({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 b(i,t,{jsfModify:e?.jsfModify})},"select"),enabled:e?.queryOptions?.enabled})},"useGetEligibilityQuestionnaire"),Ot=n(()=>{let{client:e}=a();return f({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"),xt=n(()=>{let{client:e}=a();return f({mutationFn:n(async({employmentId:t})=>B({client:e,path:{employment_id:t}}),"mutationFn")})},"usePostManageContractorCorSubscription"),Pt=n(()=>{let{client:e}=a();return f({mutationFn:n(async({employmentId:t})=>$({client:e,path:{employment_id:t}}),"mutationFn")})},"useDeleteContractorCorSubscription"),Et=n(e=>{let{client:t}=a(),{data:o,isLoading:r}=p({...W(t,"contractor-onboarding-countries"),select:n(s=>s.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=b(N.data.schema,{},e);if(o){let s=i.fields.find(c=>c.name==="country");s&&(s.options=o)}return{isLoading:r,selectCountryForm:i,countries:o}},"useCountriesSchemaField"),Rt=n(({countryCode:e,employmentId:t,fieldValues:o,options:r})=>{let i=ge({countryCode:e,employmentId:t,fieldValues:o,options:r}),{data:s,isLoading:c}=fe({employmentId:t,options:{queryOptions:{enabled:r?.queryOptions?.enabled}}}),u=be(()=>!i.data||!s?i.data:{...i.data,fields:i.data.fields.map(l=>l.name!=="payment_terms"?l:{...l,fields:l.fields?.map(d=>d.name!=="compensation_currency_code"?d:{...d,options:s.map(C=>({label:C.code,value:C.code,meta:{source:C.source}}))})})},[i.data,s]);return{...i,data:u,isLoading:i.isLoading||c}},"useContractorOnboardingDetailsSchemaWithCurrencies");export{Re as a,ne as b,ye as c,yt as d,bt as e,ft as f,Ce as g,Ct as h,gt as i,Fe as j,Ft as k,St as l,ht as m,_t as n,qt as o,Ot as p,xt as q,Pt as r,Et as s,Rt as t};
|
|
2
|
+
//# sourceMappingURL=chunk-3NB2BN46.js.map
|