@remoteoss/remote-flows 1.17.0 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CheckboxFieldDefault-SZZQUVAM.js +2 -0
- package/dist/CountryFieldDefault-X7772U44.js +2 -0
- package/dist/DatePickerFieldDefault-7HPCPBEI.js +2 -0
- package/dist/DrawerDefault-AAUS7T5W.js +2 -0
- package/dist/EmailFieldDefault-2PMSDIXF.js +2 -0
- package/dist/FileUploadFieldDefault-T7EK7RTI.js +2 -0
- package/dist/MultiSelectFieldDefault-57GAREIU.js +2 -0
- package/dist/NumberFieldDefault-C5V6POQ7.js +2 -0
- package/dist/RadioGroupFieldDefault-DNESPKMT.js +2 -0
- package/dist/SelectFieldDefault-4KQUV57C.js +2 -0
- package/dist/TextAreaFieldDefault-5P2MEQUR.js +2 -0
- package/dist/TextFieldDefault-PMCQSPPT.js +2 -0
- package/dist/WorkScheduleFieldDefault-FPXVZLXP.js +2 -0
- package/dist/ZendeskDrawerDefault-A5PVWI4R.js +2 -0
- package/dist/{chunk-PHPCCABU.js → chunk-2HBSVDEH.js} +2 -2
- package/dist/{chunk-HFI3LXZ2.js → chunk-2QGJBYQP.js} +2 -2
- package/dist/{chunk-B7EJ2OAA.js → chunk-3DKYJYLD.js} +2 -2
- package/dist/{chunk-YOIXPHGR.js → chunk-3GBODX6S.js} +2 -2
- package/dist/{chunk-4N4MQECC.js → chunk-3W3VKY2J.js} +2 -2
- package/dist/{chunk-DNDYXEZ6.js → chunk-4J36XOH2.js} +2 -2
- package/dist/{chunk-EDLQ3JNY.js → chunk-4QNOC3FL.js} +2 -2
- package/dist/{chunk-PKK2EEXH.js → chunk-547UHEDI.js} +1 -1
- package/dist/chunk-547UHEDI.js.map +1 -0
- package/dist/{chunk-VLSOHNT2.js → chunk-56UXOD27.js} +2 -2
- package/dist/chunk-56UXOD27.js.map +1 -0
- package/dist/chunk-6EAABHVV.js +2 -0
- package/dist/chunk-6EAABHVV.js.map +1 -0
- package/dist/{chunk-C6KWUSCU.js → chunk-6PYJAPM2.js} +2 -2
- package/dist/chunk-7EONM7HL.js +2 -0
- package/dist/{chunk-H2JFQGQJ.js.map → chunk-7EONM7HL.js.map} +1 -1
- package/dist/{chunk-ZAFGVOU5.js → chunk-7FHNJWIY.js} +2 -2
- package/dist/{chunk-EHD2YB5F.js → chunk-AOSXULKY.js} +2 -2
- package/dist/{chunk-BVFQ6LFD.js → chunk-AUV3PA2A.js} +2 -2
- package/dist/{chunk-MHAY555P.js → chunk-B7TQYSAY.js} +2 -2
- package/dist/{chunk-SLLDKJ7K.js → chunk-BAGPUVVO.js} +2 -2
- package/dist/{chunk-KQKH3H6S.js → chunk-BAMGHBLT.js} +2 -2
- package/dist/{chunk-CARPUKT7.js → chunk-CJG77FUT.js} +2 -2
- package/dist/{chunk-3B6XXK5H.js → chunk-CRKLC7BP.js} +2 -2
- package/dist/{chunk-OB2J5WSO.js → chunk-D3EB2FG3.js} +2 -2
- package/dist/{chunk-YPUP5LNV.js → chunk-E2ONHNZD.js} +2 -2
- package/dist/{chunk-NMLBGBK2.js → chunk-EFLRT7G5.js} +2 -2
- package/dist/{chunk-HKNK5Z6N.js → chunk-EIVCBH53.js} +2 -2
- package/dist/{chunk-6MAQMAY5.js → chunk-EKR5ME7C.js} +2 -2
- package/dist/chunk-EOMVTXER.js +2 -0
- package/dist/chunk-EOMVTXER.js.map +1 -0
- package/dist/{chunk-ULP5B6DG.js → chunk-FDEJ4CIO.js} +2 -2
- package/dist/chunk-FHYOWPXB.js +2 -0
- package/dist/chunk-FHYOWPXB.js.map +1 -0
- package/dist/{chunk-62O3CKKH.js → chunk-FVBPHUV6.js} +2 -2
- package/dist/{chunk-NAH5PAUK.js → chunk-FY5OFJRY.js} +2 -2
- package/dist/{chunk-G6QGYKPO.js → chunk-GCMEX4I6.js} +2 -2
- package/dist/{chunk-HYYILYKU.js → chunk-GSPD4EIV.js} +2 -2
- package/dist/{chunk-44RIEWXA.js → chunk-HFQAVCD2.js} +2 -2
- package/dist/{chunk-TOQPDTGG.js → chunk-HJ7WOTV7.js} +2 -2
- package/dist/{chunk-B2CNIT3P.js → chunk-IYQDAHMG.js} +2 -2
- package/dist/chunk-KJ4JS75E.js +2 -0
- package/dist/{chunk-246D2A55.js.map → chunk-KJ4JS75E.js.map} +1 -1
- package/dist/{chunk-7WGZGAQY.js → chunk-KNHDPKRL.js} +2 -2
- package/dist/{chunk-4EMAROPQ.js → chunk-N7CS4LVY.js} +2 -2
- package/dist/{chunk-UB6PYKNX.js → chunk-O6H66UM2.js} +2 -2
- package/dist/{chunk-Q73675NI.js → chunk-OIBZ7VUR.js} +2 -2
- package/dist/{chunk-LJIJ6UKB.js → chunk-ONXEJSDK.js} +2 -2
- package/dist/{chunk-RYQQDPI7.js → chunk-P7P5KATB.js} +2 -2
- package/dist/{chunk-BGRX3DBF.js → chunk-POKLRB3M.js} +2 -2
- package/dist/{chunk-TAHMDXUS.js → chunk-PP25XZSV.js} +2 -2
- package/dist/{chunk-ERSP6CZ3.js → chunk-PVZTOW7Z.js} +2 -2
- package/dist/chunk-Q3VMPVT3.js +2 -0
- package/dist/chunk-Q3VMPVT3.js.map +1 -0
- package/dist/{chunk-TPGN6QTL.js → chunk-QEEZZSOQ.js} +2 -2
- package/dist/{chunk-AJIDQALB.js → chunk-QH57S4OP.js} +2 -2
- package/dist/{chunk-XU3B7N3C.js → chunk-QJ2XK63I.js} +2 -2
- package/dist/{chunk-J2BTEUAM.js → chunk-QLMEA4FA.js} +2 -2
- package/dist/{chunk-4UO7KLRK.js → chunk-QYWF2RMX.js} +2 -2
- package/dist/{chunk-I3TP6JKM.js → chunk-R4X2WQXX.js} +2 -2
- package/dist/chunk-R4X2WQXX.js.map +1 -0
- package/dist/{chunk-HOR3KPOZ.js → chunk-R7R6D7D4.js} +2 -2
- package/dist/{chunk-DFAY4TWC.js → chunk-RGLQY27T.js} +2 -2
- package/dist/{chunk-XHAJ544L.js → chunk-RMIAJZOG.js} +2 -2
- package/dist/{chunk-LVXV3GHT.js → chunk-RQJYOWP4.js} +2 -2
- package/dist/{chunk-YWZHBXEI.js → chunk-RZQIAOMZ.js} +2 -2
- package/dist/{chunk-B66V5QEC.js → chunk-TV2NNJVO.js} +2 -2
- package/dist/{chunk-FERWQW33.js → chunk-U2LHFJXY.js} +2 -2
- package/dist/{chunk-BG66XH5L.js → chunk-U32PNP6D.js} +2 -2
- package/dist/{chunk-UMVMNUPH.js → chunk-U4H65USG.js} +2 -2
- package/dist/{chunk-WEAO46EO.js → chunk-UAWJQ3EH.js} +2 -2
- package/dist/{chunk-W4ECFBIA.js → chunk-UKTMSVMG.js} +2 -2
- package/dist/{chunk-HUZBKPGP.js → chunk-VKQQKGGY.js} +2 -2
- package/dist/chunk-VWFZ6CMP.js +2 -0
- package/dist/{chunk-3474OEAS.js.map → chunk-VWFZ6CMP.js.map} +1 -1
- package/dist/chunk-VYINI3DD.js +2 -0
- package/dist/{chunk-3NB2BN46.js.map → chunk-VYINI3DD.js.map} +1 -1
- package/dist/{chunk-4HPV2VMI.js → chunk-W4RON3XZ.js} +2 -2
- package/dist/chunk-WFXSA66P.js +2 -0
- package/dist/{chunk-IZGJP7OI.js.map → chunk-WFXSA66P.js.map} +1 -1
- package/dist/{chunk-MLVB5MYU.js → chunk-WH4AY6UO.js} +2 -2
- package/dist/{chunk-37RMY44V.js → chunk-WKLTHGWU.js} +2 -2
- package/dist/{chunk-7ENB7H4E.js → chunk-WQ4H5V7U.js} +3 -3
- package/dist/chunk-WQ4H5V7U.js.map +1 -0
- package/dist/{chunk-IMVVZZFZ.js → chunk-WUOSCFTG.js} +2 -2
- package/dist/{chunk-6SSDV2GX.js → chunk-WURYTVWC.js} +2 -2
- package/dist/{chunk-VBQVXR4U.js → chunk-X6CON4YE.js} +2 -2
- package/dist/{chunk-R7BHA5RA.js → chunk-XQZI2FRQ.js} +2 -2
- package/dist/{chunk-TPGM3OIU.js → chunk-YBAV2FE4.js} +2 -2
- package/dist/{chunk-A232PIG7.js → chunk-YHCH57B7.js} +2 -2
- package/dist/{chunk-JI4CYPLW.js → chunk-YIOLMWB5.js} +2 -2
- package/dist/{chunk-O6IBNOQU.js → chunk-YMNB6DO2.js} +2 -2
- package/dist/chunk-ZOTT6IZN.js +2 -0
- package/dist/chunk-ZOTT6IZN.js.map +1 -0
- package/dist/default-components.d.ts +2 -2
- package/dist/default-components.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +3 -3
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
- package/dist/flows/ContractAmendment/context.d.ts +3 -3
- package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
- package/dist/flows/ContractAmendment/hooks.js +1 -1
- package/dist/flows/ContractAmendment/index.d.ts +3 -3
- package/dist/flows/ContractAmendment/index.js +1 -1
- package/dist/flows/ContractAmendment/types.d.ts +2 -2
- package/dist/flows/ContractAmendment/utils.d.ts +2 -2
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
- package/dist/flows/ContractorOnboarding/api.d.ts +3 -2
- package/dist/flows/ContractorOnboarding/api.js +1 -1
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractPreviewHeader.d.ts +2 -2
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.d.ts +2 -2
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
- package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +3 -3
- package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
- package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/ContractorOnboarding/context.d.ts +7 -5
- package/dist/flows/ContractorOnboarding/hooks.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/hooks.js +1 -1
- package/dist/flows/ContractorOnboarding/index.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/index.js +1 -1
- package/dist/flows/ContractorOnboarding/jsfModify.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
- package/dist/flows/ContractorOnboarding/types.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/utils.d.ts +4 -4
- package/dist/flows/ContractorOnboarding/utils.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +3 -3
- package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +3 -3
- package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
- package/dist/flows/CostCalculator/EstimationResults/EstimationResults.d.ts +2 -2
- package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
- package/dist/flows/CostCalculator/SummaryResults/SummaryResults.d.ts +2 -2
- package/dist/flows/CostCalculator/api.d.ts +2 -2
- package/dist/flows/CostCalculator/api.js +1 -1
- package/dist/flows/CostCalculator/components/SalaryField.d.ts +2 -2
- package/dist/flows/CostCalculator/components/SalaryField.js +1 -1
- package/dist/flows/CostCalculator/context.d.ts +3 -3
- package/dist/flows/CostCalculator/hooks.d.ts +3 -3
- package/dist/flows/CostCalculator/hooks.js +1 -1
- package/dist/flows/CostCalculator/index.d.ts +3 -3
- package/dist/flows/CostCalculator/index.js +1 -1
- package/dist/flows/CostCalculator/types.d.ts +2 -2
- package/dist/flows/CostCalculator/utils.d.ts +3 -3
- package/dist/flows/CostCalculator/utils.js +1 -1
- package/dist/flows/CreateCompany/CreateCompany.d.ts +4 -4
- package/dist/flows/CreateCompany/CreateCompany.js +1 -1
- package/dist/flows/CreateCompany/api.d.ts +2 -2
- package/dist/flows/CreateCompany/api.js +1 -1
- package/dist/flows/CreateCompany/components/AddressDetailsStep.d.ts +4 -4
- package/dist/flows/CreateCompany/components/AddressDetailsStep.js +1 -1
- package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.d.ts +4 -4
- package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.js +1 -1
- package/dist/flows/CreateCompany/components/CreateCompanyForm.d.ts +2 -2
- package/dist/flows/CreateCompany/components/CreateCompanyForm.js +1 -1
- package/dist/flows/CreateCompany/context.d.ts +4 -4
- package/dist/flows/CreateCompany/hooks.d.ts +4 -4
- package/dist/flows/CreateCompany/hooks.js +1 -1
- package/dist/flows/CreateCompany/index.d.ts +4 -4
- package/dist/flows/CreateCompany/index.js +1 -1
- package/dist/flows/CreateCompany/types.d.ts +4 -4
- package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
- package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
- package/dist/flows/Onboarding/api.d.ts +13 -5
- 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/ReviewStep.js +1 -1
- 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 +5 -4
- package/dist/flows/Onboarding/hooks.d.ts +4 -4
- package/dist/flows/Onboarding/hooks.js +1 -1
- package/dist/flows/Onboarding/index.d.ts +4 -4
- package/dist/flows/Onboarding/index.js +1 -1
- package/dist/flows/Onboarding/types.d.ts +4 -4
- package/dist/flows/Onboarding/utils.d.ts +4 -4
- package/dist/flows/Termination/AdditionalDetailsForm.d.ts +4 -4
- package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
- package/dist/flows/Termination/EmployeeComunicationForm.d.ts +4 -4
- package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
- package/dist/flows/Termination/PaidTimeOffForm.d.ts +4 -4
- package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
- package/dist/flows/Termination/TerminationDetailsForm.d.ts +4 -4
- package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
- package/dist/flows/Termination/TerminationFlow.d.ts +4 -4
- package/dist/flows/Termination/TerminationFlow.js +1 -1
- package/dist/flows/Termination/TerminationForm.d.ts +4 -4
- package/dist/flows/Termination/TerminationForm.js +1 -1
- package/dist/flows/Termination/api.d.ts +5 -5
- package/dist/flows/Termination/api.js +1 -1
- package/dist/flows/Termination/components/AcknowledgeInformation/AcknowledgeInformationFees.js +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +6 -6
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +6 -6
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +6 -6
- package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
- package/dist/flows/Termination/context.d.ts +4 -4
- package/dist/flows/Termination/hooks.d.ts +4 -4
- package/dist/flows/Termination/hooks.js +1 -1
- package/dist/flows/Termination/index.d.ts +6 -6
- package/dist/flows/Termination/index.js +1 -1
- package/dist/flows/Termination/json-schemas/schema.d.ts +4 -4
- package/dist/flows/Termination/types.d.ts +4 -4
- package/dist/flows/Termination/utils.d.ts +4 -4
- package/dist/flows/types.d.ts +2 -2
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +11 -11
- package/dist/index.js +2 -2
- package/dist/internals.d.ts +4 -5
- package/dist/internals.js +1 -1
- package/dist/{mutations-Cqu0sBct.d.ts → mutations-BsydWn3-.d.ts} +1 -1
- package/dist/{remoteFlows-Dq_HhlrK.d.ts → remoteFlows-BVt9wH8Z.d.ts} +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/dist/{types-C4ZurZsm.d.ts → types-5zVzEzw3.d.ts} +11 -4
- package/dist/{types-6I1B0MOG.d.ts → types-BfQMv-8p.d.ts} +2 -2
- package/dist/{types-Cspu8sBY.d.ts → types-C0ri3b3L.d.ts} +1 -1
- package/dist/{types-BxDv4R-M.d.ts → types-DqoTDHM1.d.ts} +8 -3
- package/dist/{types-CpquG01D.d.ts → types-uW0BsP56.d.ts} +3 -3
- package/dist/{types.gen-DOfO2pGp.d.ts → types.gen-Oz2Tvvr6.d.ts} +6 -2
- package/dist/{utils-DOln70Os.d.ts → utils-Db2G1Kxo.d.ts} +1 -1
- package/package.json +1 -5
- package/dist/CheckboxFieldDefault-X4DYVQCE.js +0 -2
- package/dist/CountryFieldDefault-JZDE75HS.js +0 -2
- package/dist/DatePickerFieldDefault-LJV4QSEP.js +0 -2
- package/dist/DrawerDefault-FLNSDSMB.js +0 -2
- package/dist/EmailFieldDefault-T6HHE5RL.js +0 -2
- package/dist/FileUploadFieldDefault-5NW3ZFXD.js +0 -2
- package/dist/MultiSelectFieldDefault-OQ6SNNBI.js +0 -2
- package/dist/NumberFieldDefault-IVUTWJS5.js +0 -2
- package/dist/RadioGroupFieldDefault-CXY33ONT.js +0 -2
- package/dist/SelectFieldDefault-66GGFDX3.js +0 -2
- package/dist/TextAreaFieldDefault-5H34RRBA.js +0 -2
- package/dist/TextFieldDefault-VHIF2KLF.js +0 -2
- package/dist/WorkScheduleFieldDefault-T7IP52VU.js +0 -2
- package/dist/ZendeskDrawerDefault-YSBMA2ZH.js +0 -2
- package/dist/chunk-246D2A55.js +0 -2
- package/dist/chunk-3474OEAS.js +0 -2
- package/dist/chunk-3NB2BN46.js +0 -2
- package/dist/chunk-5FTC6HMG.js +0 -2
- package/dist/chunk-5FTC6HMG.js.map +0 -1
- package/dist/chunk-7ENB7H4E.js.map +0 -1
- package/dist/chunk-H2JFQGQJ.js +0 -2
- package/dist/chunk-I3TP6JKM.js.map +0 -1
- package/dist/chunk-IZGJP7OI.js +0 -2
- package/dist/chunk-NEWXVHFX.js +0 -2
- package/dist/chunk-NEWXVHFX.js.map +0 -1
- package/dist/chunk-OENTT2KT.js +0 -2
- package/dist/chunk-OENTT2KT.js.map +0 -1
- package/dist/chunk-PKK2EEXH.js.map +0 -1
- package/dist/chunk-SLD227LM.js +0 -2
- package/dist/chunk-SLD227LM.js.map +0 -1
- package/dist/chunk-VLSOHNT2.js.map +0 -1
- package/dist/chunk-Z7WBY27D.js +0 -2
- package/dist/chunk-Z7WBY27D.js.map +0 -1
- /package/dist/{CheckboxFieldDefault-X4DYVQCE.js.map → CheckboxFieldDefault-SZZQUVAM.js.map} +0 -0
- /package/dist/{CountryFieldDefault-JZDE75HS.js.map → CountryFieldDefault-X7772U44.js.map} +0 -0
- /package/dist/{DatePickerFieldDefault-LJV4QSEP.js.map → DatePickerFieldDefault-7HPCPBEI.js.map} +0 -0
- /package/dist/{DrawerDefault-FLNSDSMB.js.map → DrawerDefault-AAUS7T5W.js.map} +0 -0
- /package/dist/{EmailFieldDefault-T6HHE5RL.js.map → EmailFieldDefault-2PMSDIXF.js.map} +0 -0
- /package/dist/{FileUploadFieldDefault-5NW3ZFXD.js.map → FileUploadFieldDefault-T7EK7RTI.js.map} +0 -0
- /package/dist/{MultiSelectFieldDefault-OQ6SNNBI.js.map → MultiSelectFieldDefault-57GAREIU.js.map} +0 -0
- /package/dist/{NumberFieldDefault-IVUTWJS5.js.map → NumberFieldDefault-C5V6POQ7.js.map} +0 -0
- /package/dist/{RadioGroupFieldDefault-CXY33ONT.js.map → RadioGroupFieldDefault-DNESPKMT.js.map} +0 -0
- /package/dist/{SelectFieldDefault-66GGFDX3.js.map → SelectFieldDefault-4KQUV57C.js.map} +0 -0
- /package/dist/{TextAreaFieldDefault-5H34RRBA.js.map → TextAreaFieldDefault-5P2MEQUR.js.map} +0 -0
- /package/dist/{TextFieldDefault-VHIF2KLF.js.map → TextFieldDefault-PMCQSPPT.js.map} +0 -0
- /package/dist/{WorkScheduleFieldDefault-T7IP52VU.js.map → WorkScheduleFieldDefault-FPXVZLXP.js.map} +0 -0
- /package/dist/{ZendeskDrawerDefault-YSBMA2ZH.js.map → ZendeskDrawerDefault-A5PVWI4R.js.map} +0 -0
- /package/dist/{chunk-PHPCCABU.js.map → chunk-2HBSVDEH.js.map} +0 -0
- /package/dist/{chunk-HFI3LXZ2.js.map → chunk-2QGJBYQP.js.map} +0 -0
- /package/dist/{chunk-B7EJ2OAA.js.map → chunk-3DKYJYLD.js.map} +0 -0
- /package/dist/{chunk-YOIXPHGR.js.map → chunk-3GBODX6S.js.map} +0 -0
- /package/dist/{chunk-4N4MQECC.js.map → chunk-3W3VKY2J.js.map} +0 -0
- /package/dist/{chunk-DNDYXEZ6.js.map → chunk-4J36XOH2.js.map} +0 -0
- /package/dist/{chunk-EDLQ3JNY.js.map → chunk-4QNOC3FL.js.map} +0 -0
- /package/dist/{chunk-C6KWUSCU.js.map → chunk-6PYJAPM2.js.map} +0 -0
- /package/dist/{chunk-ZAFGVOU5.js.map → chunk-7FHNJWIY.js.map} +0 -0
- /package/dist/{chunk-EHD2YB5F.js.map → chunk-AOSXULKY.js.map} +0 -0
- /package/dist/{chunk-BVFQ6LFD.js.map → chunk-AUV3PA2A.js.map} +0 -0
- /package/dist/{chunk-MHAY555P.js.map → chunk-B7TQYSAY.js.map} +0 -0
- /package/dist/{chunk-SLLDKJ7K.js.map → chunk-BAGPUVVO.js.map} +0 -0
- /package/dist/{chunk-KQKH3H6S.js.map → chunk-BAMGHBLT.js.map} +0 -0
- /package/dist/{chunk-CARPUKT7.js.map → chunk-CJG77FUT.js.map} +0 -0
- /package/dist/{chunk-3B6XXK5H.js.map → chunk-CRKLC7BP.js.map} +0 -0
- /package/dist/{chunk-OB2J5WSO.js.map → chunk-D3EB2FG3.js.map} +0 -0
- /package/dist/{chunk-YPUP5LNV.js.map → chunk-E2ONHNZD.js.map} +0 -0
- /package/dist/{chunk-NMLBGBK2.js.map → chunk-EFLRT7G5.js.map} +0 -0
- /package/dist/{chunk-HKNK5Z6N.js.map → chunk-EIVCBH53.js.map} +0 -0
- /package/dist/{chunk-6MAQMAY5.js.map → chunk-EKR5ME7C.js.map} +0 -0
- /package/dist/{chunk-ULP5B6DG.js.map → chunk-FDEJ4CIO.js.map} +0 -0
- /package/dist/{chunk-62O3CKKH.js.map → chunk-FVBPHUV6.js.map} +0 -0
- /package/dist/{chunk-NAH5PAUK.js.map → chunk-FY5OFJRY.js.map} +0 -0
- /package/dist/{chunk-G6QGYKPO.js.map → chunk-GCMEX4I6.js.map} +0 -0
- /package/dist/{chunk-HYYILYKU.js.map → chunk-GSPD4EIV.js.map} +0 -0
- /package/dist/{chunk-44RIEWXA.js.map → chunk-HFQAVCD2.js.map} +0 -0
- /package/dist/{chunk-TOQPDTGG.js.map → chunk-HJ7WOTV7.js.map} +0 -0
- /package/dist/{chunk-B2CNIT3P.js.map → chunk-IYQDAHMG.js.map} +0 -0
- /package/dist/{chunk-7WGZGAQY.js.map → chunk-KNHDPKRL.js.map} +0 -0
- /package/dist/{chunk-4EMAROPQ.js.map → chunk-N7CS4LVY.js.map} +0 -0
- /package/dist/{chunk-UB6PYKNX.js.map → chunk-O6H66UM2.js.map} +0 -0
- /package/dist/{chunk-Q73675NI.js.map → chunk-OIBZ7VUR.js.map} +0 -0
- /package/dist/{chunk-LJIJ6UKB.js.map → chunk-ONXEJSDK.js.map} +0 -0
- /package/dist/{chunk-RYQQDPI7.js.map → chunk-P7P5KATB.js.map} +0 -0
- /package/dist/{chunk-BGRX3DBF.js.map → chunk-POKLRB3M.js.map} +0 -0
- /package/dist/{chunk-TAHMDXUS.js.map → chunk-PP25XZSV.js.map} +0 -0
- /package/dist/{chunk-ERSP6CZ3.js.map → chunk-PVZTOW7Z.js.map} +0 -0
- /package/dist/{chunk-TPGN6QTL.js.map → chunk-QEEZZSOQ.js.map} +0 -0
- /package/dist/{chunk-AJIDQALB.js.map → chunk-QH57S4OP.js.map} +0 -0
- /package/dist/{chunk-XU3B7N3C.js.map → chunk-QJ2XK63I.js.map} +0 -0
- /package/dist/{chunk-J2BTEUAM.js.map → chunk-QLMEA4FA.js.map} +0 -0
- /package/dist/{chunk-4UO7KLRK.js.map → chunk-QYWF2RMX.js.map} +0 -0
- /package/dist/{chunk-HOR3KPOZ.js.map → chunk-R7R6D7D4.js.map} +0 -0
- /package/dist/{chunk-DFAY4TWC.js.map → chunk-RGLQY27T.js.map} +0 -0
- /package/dist/{chunk-XHAJ544L.js.map → chunk-RMIAJZOG.js.map} +0 -0
- /package/dist/{chunk-LVXV3GHT.js.map → chunk-RQJYOWP4.js.map} +0 -0
- /package/dist/{chunk-YWZHBXEI.js.map → chunk-RZQIAOMZ.js.map} +0 -0
- /package/dist/{chunk-B66V5QEC.js.map → chunk-TV2NNJVO.js.map} +0 -0
- /package/dist/{chunk-FERWQW33.js.map → chunk-U2LHFJXY.js.map} +0 -0
- /package/dist/{chunk-BG66XH5L.js.map → chunk-U32PNP6D.js.map} +0 -0
- /package/dist/{chunk-UMVMNUPH.js.map → chunk-U4H65USG.js.map} +0 -0
- /package/dist/{chunk-WEAO46EO.js.map → chunk-UAWJQ3EH.js.map} +0 -0
- /package/dist/{chunk-W4ECFBIA.js.map → chunk-UKTMSVMG.js.map} +0 -0
- /package/dist/{chunk-HUZBKPGP.js.map → chunk-VKQQKGGY.js.map} +0 -0
- /package/dist/{chunk-4HPV2VMI.js.map → chunk-W4RON3XZ.js.map} +0 -0
- /package/dist/{chunk-MLVB5MYU.js.map → chunk-WH4AY6UO.js.map} +0 -0
- /package/dist/{chunk-37RMY44V.js.map → chunk-WKLTHGWU.js.map} +0 -0
- /package/dist/{chunk-IMVVZZFZ.js.map → chunk-WUOSCFTG.js.map} +0 -0
- /package/dist/{chunk-6SSDV2GX.js.map → chunk-WURYTVWC.js.map} +0 -0
- /package/dist/{chunk-VBQVXR4U.js.map → chunk-X6CON4YE.js.map} +0 -0
- /package/dist/{chunk-R7BHA5RA.js.map → chunk-XQZI2FRQ.js.map} +0 -0
- /package/dist/{chunk-TPGM3OIU.js.map → chunk-YBAV2FE4.js.map} +0 -0
- /package/dist/{chunk-A232PIG7.js.map → chunk-YHCH57B7.js.map} +0 -0
- /package/dist/{chunk-JI4CYPLW.js.map → chunk-YIOLMWB5.js.map} +0 -0
- /package/dist/{chunk-O6IBNOQU.js.map → chunk-YMNB6DO2.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as a,j as i,k as s,l as p,m as F}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{i as a,j as i,k as s,l as p,m as F}from"./chunk-7EONM7HL.js";import{a as n}from"./chunk-FUGPVPYX.js";import{a as t}from"./chunk-VIGKOVHP.js";import{a as r}from"./chunk-P37U34EQ.js";import{jsx as e,jsxs as U}from"react/jsx-runtime";function b({field:o,fieldState:_,fieldData:c}){let{name:l,label:d,description:m,multiple:f,accept:u}=c;return U(a,{"data-field":l,className:`RemoteFlows__FileUpload__Item__${l}`,children:[e(i,{className:"RemoteFlows__FileUpload__Label",children:d}),e(s,{children:e(n,{onChange:o.onChange,multiple:f,className:t("RemoteFlows__FileUpload__Input"),accept:u,files:o.value})}),m&&e("div",{className:"flex items-center justify-between",children:e(p,{className:"RemoteFlows__FileUpload__Description",children:m})}),_.error&&e(F,{className:"RemoteFlows__FileUpload__Error"})]})}r(b,"FileUploadFieldDefault");export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7FHNJWIY.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as x,h as _}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as x,h as _}from"./chunk-7EONM7HL.js";import{b as C}from"./chunk-KQPDXXG3.js";import{a}from"./chunk-P37U34EQ.js";import D from"lodash.groupby";import $ from"lodash.capitalize";var S=60,F=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"];function M(e){if(e<60)return`${e}m`;let s=Math.floor(e/S),n=e%S;return n>0?`${s}h${n}m`:`${s}h`}a(M,"convertBreakDurationToHours");function O(e){let s=e.reduce((n,u)=>u.hours+n,0);return Number(s.toFixed(2))}a(O,"calculateTotalWorkHours");function H(e,s){let n=s.map(({day:c})=>c.toLowerCase()),u=n.indexOf(e),i=null;for(;u<n.length&&!i;){let c=n[u],k=n[u+1],r=F.indexOf(c)+1;F[r]===k||(i=c),u+=1}return i}a(H,"findLastConsecutiveDay");function N(e){return e.start_time&&e.end_time&&(typeof e.hours=="number"?e.hours:Number.parseInt(e.hours))>0}a(N,"shouldSummarizeSchedule");function T(e){return Number.parseInt(e.break_duration_minutes)>0}a(T,"shouldSummarizeBreaks");function I(e){let s=e.filter(N),n=D(s,r=>`${r.start_time}|${r.end_time}`),u=e.filter(T),i=D(u,"break_duration_minutes"),c=Object.keys(n).map(r=>{let o=n[r],y=o[0].day,[p,h]=r.split("|"),t=`from <span>${p.replace(":","h")}</span> to <span>${h.replace(":","h")}</span>`,d=H(y,o),m=(d?o.findIndex(f=>f.day===d):-1)===o.length-1;return o.length===1?`${$(y)}, ${t}`:!m||!d?o.reduce((f,b,v)=>{let g=$(b.day);return v===o.length-1?`${f}and ${g}, ${t}`:`${f}<span>${g}</span>, `},""):`<span>${$(y)}</span> to <span>${$(d)}</span>, ${t}`}),k=Object.keys(i).reverse().map((r,o)=>{let y=o===0,p=i[r],h=M(parseInt(r,10));if(Object.keys(i).length===1)return`With ${h} daily breaks`;if(p.length===1){let t=`${h} break on ${$(p[0].day)}.`;return y?`With ${t}`:t}return p.reduce((t,d,l)=>{let m=$(d.day);return l===0?`${t} ${m}`:l===p.length-1?`${t}, and ${m}.`:`${t}, ${m}`},y?`With ${h} break on`:`${h} break on`)});return{workHoursSummary:c,breakSummary:k}}a(I,"buildWorkScheduleSummary");function P(e){let{checked:s,start_time:n,end_time:u,break_duration_minutes:i}=e;if(!s)return 0;let[c,k]=n.split(":").map(Number),[r,o]=u.split(":").map(Number),y=c*60+k,t=(r*60+o-y-Number.parseInt(i||"0"))/60;return t===Math.floor(t)?t:Number(t.toFixed(2))}a(P,"calculateHours");var w={monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat",sunday:"Sun"};function R(e){return w[e]}a(R,"getShortWeekday");import{jsx as W}from"react/jsx-runtime";function U({name:e,defaultValue:s,description:n,label:u,onChange:i,multiple:c,options:k,component:r,...o}){let{components:y}=C(),{control:p}=x(),h=a((t,d,l)=>{if(c&&l){let m=t.value?[...t.value]:[];d?m.includes(l)||t.onChange([...m,l]):t.onChange(m.filter(f=>f!==l))}else t.onChange(d)},"handleCheckboxChange");return W(_,{control:p,name:e,defaultValue:s,render:({field:t,fieldState:d})=>{let l=r||y?.checkbox;if(!l)throw new Error(`Checkbox component not found for field ${e}`);let m={name:e,description:n,label:u,defaultValue:s,multiple:c,options:k,...o};return W(l,{field:{...t,onChange:a((f,b)=>{h(t,f,b),i?.(f,b)},"onChange")},fieldState:d,fieldData:m})}})}a(U,"CheckBoxField");export{F as a,O as b,I as c,P as d,R as e,U as f};
|
|
2
|
+
//# sourceMappingURL=chunk-AOSXULKY.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as f}from"./chunk-MRYRNB7Y.js";import{b as l}from"./chunk-LNV36S6D.js";import{a as F}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as f}from"./chunk-MRYRNB7Y.js";import{b as l}from"./chunk-LNV36S6D.js";import{a as F}from"./chunk-BAGPUVVO.js";import{f as s,g as a}from"./chunk-7EONM7HL.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as y}from"react";import{jsx as r}from"react/jsx-runtime";function A({defaultValues:u,fields:m,onSubmit:d}){let{formId:c,terminationBag:o}=f(),p=l(o.handleValidation),e=s({resolver:p,defaultValues:u,shouldUnregister:!1,mode:"onBlur"});y(()=>{let V=e?.watch(i=>{Object.keys(i).some(n=>i[n]!==o?.initialValues?.[n])&&o?.checkFieldUpdates(i)});return()=>V?.unsubscribe()},[]);let T=m||(o?.fields??[]);return r(a,{...e,children:r("form",{id:c,onSubmit:e.handleSubmit(d),className:"space-y-4 RemoteFlows__TerminationForm",children:r(F,{fields:T})})})}t(A,"TerminationForm");export{A as a};
|
|
2
|
+
//# sourceMappingURL=chunk-AUV3PA2A.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-XQZI2FRQ.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as i}from"react/jsx-runtime";var l=e(({currency:n,desiredCurrency:o,annual_gross_salary_conversion_properties:r,...a})=>i(s,{...a,sourceCurrency:n,targetCurrency:o,conversionFieldName:"annual_gross_salary_conversion",conversionProperties:{...r,description:r?.description||"Estimated amount. This is an estimation. We calculate conversions based on spot rates that are subject to fluctuation over time."},classNamePrefix:"RemoteFlows-AnnualGrossSalary",conversionType:"no_spread"}),"AnnualGrossSalary");export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-B7TQYSAY.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as _,b as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as _,b as g}from"./chunk-R7R6D7D4.js";import{a as F}from"./chunk-SNECOPBD.js";import{g as S}from"./chunk-T7O3YYOG.js";import{b as T}from"./chunk-YHCH57B7.js";import{c}from"./chunk-7EONM7HL.js";import{e as m}from"./chunk-VIGKOVHP.js";import{a as i}from"./chunk-P37U34EQ.js";import{Fragment as x}from"react";var d={..._,fieldset:g,"fieldset-flat":g};import{useEffect as P}from"react";import{Fragment as R,jsx as p,jsxs as h}from"react/jsx-runtime";var C=i(({name:e,description:a,helpCenter:n})=>h("span",{children:[p("span",{className:`text-xs RemoteFlows__ForcedValue__Description__${e}`,dangerouslySetInnerHTML:{__html:m(a)}}),n?.callToAction&&n?.id&&p(T,{className:"RemoteFlows__ForcedValue__HelpCenterLink",zendeskId:n.id,children:n.callToAction})]}),"Description");function k({name:e,value:a,description:n,statement:r,label:u,helpCenter:l}){let{setValue:t}=c(),s=m(r?.description||n);return P(()=>{t(e,a)},[]),p("div",{children:r?h(R,{children:[p("p",{className:`text-sm RemoteFlows__ForcedValue__Title__${e}`,dangerouslySetInnerHTML:{__html:m(r?.title||u)}}),p(C,{name:e,description:m(r?.description||n),helpCenter:l})]}):p(C,{name:e,description:s,helpCenter:l})})}i(k,"ForcedValueField");import{Fragment as M,jsx as o,jsxs as y}from"react/jsx-runtime";function J(e){return e.const!==void 0&&e.const===e.default&&e.inputType!=="checkbox"&&e.inputType!=="hidden"}i(J,"checkFieldHasForcedValue");var G=i(({fields:e,fieldsets:a,fieldValues:n,components:r})=>{let{setValue:u}=c();if(!e||e.length===0)return null;let l=a&&n?S({fields:e,fieldsets:a,values:n}):e;return o(M,{children:l.map(t=>{if(t.calculateDynamicProperties&&(t={...t,...t.calculateDynamicProperties(n,t)||{}}),t.isVisible===!1||t.deprecated||t.hidden)return null;if(J(t))return o(k,{name:t.name,description:t.description,value:t.const,statement:t.statement,label:t.label,helpCenter:t.meta?.helpCenter},t.name);if(t.Component){let{Component:b}=t;return y(x,{children:[o(b,{setValue:V=>u(t.name,V),...t}),t.statement?o(F,{...t.statement}):null,t.extra?t.extra:null]},t.name)}let s=d[t.inputType];return s?t.inputType==="fieldset"?o(s,{...t,components:r},t.name):t.inputType==="fieldset-flat"?o(s,{...t,components:r,isFlatFieldset:!0},t.name):(t.inputType==="select"&&t.multiple&&(s=d["multi-select"]),y(x,{children:[o(s,{...t,component:r&&r[t.inputType]}),t.statement?o(F,{...t.statement}):null,t.extra?t.extra:null]},t.name)):y("p",{className:"error",children:["Field type ",t.inputType," not supported"]})})})},"JSONSchemaFormFields");export{G as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BAGPUVVO.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t,b as n,c as l,d as i,e as s,f as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t,b as n,c as l,d as i,e as s,f as d}from"./chunk-56UXOD27.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as e,jsxs as r}from"react/jsx-runtime";function h({open:w,onClose:D,data:o,isLoading:m,error:p,zendeskURL:f,Trigger:c}){return r(t,{open:w,onOpenChange:g=>!g&&D(),direction:"right",children:[e(n,{asChild:!0,children:c}),e(l,{className:"h-full w-[540px] mt-0 ml-auto RemoteFlows_ZendeskDrawer",children:r("div",{className:"h-full flex flex-col",children:[r(i,{children:[e(s,{children:o?.title}),r(d,{children:["For more details see our"," ",e("a",{href:f,target:"_blank",rel:"noopener noreferrer",children:"help article"})," "]})]}),m&&e("div",{children:"Loading..."}),p&&e("div",{className:"text-sm p-4 text-red-500",children:"Error loading article"}),e("div",{className:"flex-1 overflow-y-auto p-4 RemoteFlows_ZendeskDrawer__Content",dangerouslySetInnerHTML:{__html:o?.body||""}})]})})]})}a(h,"ZendeskDrawerDefault");export{h as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BAMGHBLT.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as e}from"./chunk-YHCH57B7.js";import{a as n}from"./chunk-P37U34EQ.js";import{jsx as o,jsxs as t}from"react/jsx-runtime";var a=n(({involuntaryOffboardingServiceChargeZendeskId:r,reconciliationInvoiceZendeskId:i})=>t("p",{className:"RemoteFlows__AcknowledgeInformationFees text-xs text-[#71717A]",children:["You'll receive an"," ",o(e,{zendeskId:r,className:"align-baseline",children:"involuntary offboarding service charge \u2197"})," ","on your"," ",o(e,{zendeskId:i,children:"reconciliation invoice \u2197"})]}),"AcknowledgeInformationFees");export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-CJG77FUT.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
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-
|
|
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-YHCH57B7.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-CRKLC7BP.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-3GBODX6S.js";import{b as e}from"./chunk-Q3ALCPJN.js";import{k as t}from"./chunk-VIGKOVHP.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as u}from"react/jsx-runtime";function E({components:l,onSubmit:p,onSuccess:c,onError:m}){let{contractorOnboardingBag:r}=e(),d=i(async a=>{try{let n=await r.parseFormValues(a);await p?.(n);let o=await r.onSubmit(a);if(o?.data){await c?.(o?.data),r?.next();return}}catch(n){let o=t(n,r.meta?.fields?.pricing_plan);m?.(o)}},"handleSubmit"),P=r.stepState.values?.pricing_plan||r.initialValues.pricing_plan;return u(s,{components:l,defaultValues:P,onSubmit:d})}i(E,"PricingPlanStep");export{E as a};
|
|
2
|
+
//# sourceMappingURL=chunk-D3EB2FG3.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-AUV3PA2A.js";import{b as a}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function p({onSubmit:t}){let{terminationBag:o}=a(),n=i(async r=>{let m=await o?.parseFormValues(r);await t?.(m),o?.next()},"handleSubmit");return s(e,{defaultValues:o.fieldValues,onSubmit:n})}i(p,"TerminationDetailsForm");export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-E2ONHNZD.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-3GBODX6S.js";import{b as e}from"./chunk-Q3ALCPJN.js";import{k as n}from"./chunk-VIGKOVHP.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as f}from"react/jsx-runtime";function b({onSubmit:m,onSuccess:d,onError:c}){let{contractorOnboardingBag:o}=e(),p=t(async i=>{try{let a=await o.parseFormValues(i);await m?.(a);let r=await o.onSubmit(i);if(r?.data){await d?.(r?.data),o?.next();return}}catch(a){let r=n(a,o.meta?.fields?.basic_information);c?.(r)}},"handleSubmit"),l=o.stepState.values?.basic_information||o.initialValues.basic_information;return f(s,{defaultValues:l,onSubmit:p})}t(b,"BasicInformationStep");export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EFLRT7G5.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o,b as i,c as t,d as l,e as w}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o,b as i,c as t,d as l,e as w}from"./chunk-56UXOD27.js";import{a}from"./chunk-VIGKOVHP.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as r,jsxs as n}from"react/jsx-runtime";function C({open:D,onOpenChange:m,direction:p,className:f,title:s,trigger:d,children:v}){return n(o,{open:D,onOpenChange:m,direction:p,children:[r(i,{asChild:!0,children:d}),r(t,{className:a("RemoteFlows__Drawer h-full w-[540px] mt-0 ml-auto px-4",f),children:n("div",{className:"h-full flex flex-col",children:[r(l,{children:r(w,{children:s})}),r("div",{className:"flex-1 overflow-y-auto",children:v})]})})]})}e(C,"DrawerDefault");export{C as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EIVCBH53.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-ZOTT6IZN.js";import{a as i}from"./chunk-W7YC2IO2.js";import{a as c}from"./chunk-FHYOWPXB.js";import{a as S}from"./chunk-YIMWF5GR.js";import{a as f}from"./chunk-4QNOC3FL.js";import{a as n}from"./chunk-RZQIAOMZ.js";import{a as p}from"./chunk-RQJYOWP4.js";import{a as s}from"./chunk-QEEZZSOQ.js";import{a as m}from"./chunk-KRJETP7I.js";import{c as e}from"./chunk-6EAABHVV.js";import{a as r}from"./chunk-PGWKJ6FK.js";import{a as t}from"./chunk-P37U34EQ.js";import{useId as D,useState as P}from"react";import{jsx as R}from"react/jsx-runtime";var L=t(({employmentId:d,companyId:u,countryCode:b,type:l="employee",externalId:v,skipSteps:g,initialValues:B,render:I,options:O})=>{let w=D(),o=e({companyId:u,countryCode:b,employmentId:d,type:l,options:O,skipSteps:g,externalId:v,initialValues:B}),[C,h]=P({showReserveInvoice:!1,showInviteSuccessful:!1});return R(r.Provider,{value:{formId:w,onboardingBag:o,creditScore:C,setCreditScore:h},children:I({onboardingBag:o,components:{BasicInformationStep:n,ContractDetailsStep:s,BenefitsStep:p,SubmitButton:i,SaveDraftButton:S,BackButton:m,OnboardingInvite:a,SelectCountryStep:f,ReviewStep:c}})})},"OnboardingFlow");export{L as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EKR5ME7C.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t}from"./chunk-VIGKOVHP.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as n}from"react/jsx-runtime";function r({className:a,...o}){return n("label",{"data-slot":"label",className:t("flex items-center gap-2 text-sm leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50",a),...o})}e(r,"Label");export{r as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EOMVTXER.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/ui/label.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { cn } from '@/src/lib/utils';\n\nfunction Label({ className, ...props }: React.ComponentProps<'label'>) {\n return (\n <label\n data-slot='label'\n className={cn(\n 'flex items-center gap-2 text-sm leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Label };\n"],"mappings":"gFAMI,cAAAA,MAAA,oBAFJ,SAASC,EAAM,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAkC,CACrE,OACEH,EAAC,SACC,YAAU,QACV,UAAWI,EACT,gJACAF,CACF,EACC,GAAGC,EACN,CAEJ,CAXSE,EAAAJ,EAAA","names":["jsx","Label","className","props","cn","__name"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as $,d as w,e as x,f as B}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as $,d as w,e as x,f as B}from"./chunk-AOSXULKY.js";import{a as N}from"./chunk-HJ7WOTV7.js";import{a as g,b as k,d as D,e as R,f as H,g as C}from"./chunk-7EONM7HL.js";import{a as T,b as E,c as j,d as O,f as V}from"./chunk-547UHEDI.js";import{b as F}from"./chunk-RJY6AEJB.js";import{a as s}from"./chunk-P37U34EQ.js";import*as l from"yup";var P=s((t,a,r)=>{if(t&&"reportValidity"in t){let o=g(r,a);t.setCustomValidity(o&&o.message||""),t.reportValidity()}},"r"),b=s((t,a)=>{for(let r in a.fields){let o=a.fields[r];o&&o.ref&&"reportValidity"in o.ref?P(o.ref,r,t):o&&o.refs&&o.refs.forEach(u=>P(u,r,t))}},"o"),q=s((t,a)=>{a.shouldUseNativeValidation&&b(t,a);let r={};for(let o in t){let u=g(a.fields,o),i=Object.assign(t[o]||{},{ref:u&&u.ref});if(A(a.names||Object.keys(t),o)){let n=Object.assign({},g(r,o));k(n,"root",i),k(r,o,n)}else k(r,o,i)}return r},"s"),A=s((t,a)=>{let r=M(a);return t.some(o=>M(o).match(`^${r}\\.\\d+`))},"i");function M(t){return t.replace(/\]|\[/g,"")}s(M,"n");function L(t,a,r){return a===void 0&&(a={}),r===void 0&&(r={}),function(o,u,i){try{return Promise.resolve((function(n,_){try{var p=(a.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(t[r.mode==="sync"?"validateSync":"validate"](o,Object.assign({abortEarly:!1},a,{context:u}))).then(function(m){return i.shouldUseNativeValidation&&b({},i),{values:r.raw?Object.assign({},o):m,errors:{}}}))}catch(m){return _(m)}return p&&p.then?p.then(void 0,_):p})(0,function(n){if(!n.inner)throw n;return{values:{},errors:q((_=n,p=!i.shouldUseNativeValidation&&i.criteriaMode==="all",(_.inner||[]).reduce(function(m,c){if(m[c.path]||(m[c.path]={message:c.message,type:c.type}),p){var S=m[c.path].types,y=S&&S[c.type];m[c.path]=D(c.path,p,m,c.type,y?[].concat(y,c.message):c.message)}return m},{})),i)};var _,p}))}catch(n){return Promise.reject(n)}}}s(L,"o");import{Fragment as Y,useState as z}from"react";import{jsx as e,jsxs as d}from"react/jsx-runtime";var K=l.object({day:l.string().required(),checked:l.boolean().required(),start_time:l.string().matches(/^([01]\d|2[0-3]):([0-5]\d)$/,"Invalid time format (HH:mm)").when("checked",{is:!0,then:s(t=>t.required("Required"),"then"),otherwise:s(t=>t.optional().nullable(),"otherwise")}),end_time:l.string().matches(/^([01]\d|2[0-3]):([0-5]\d)$/,"Invalid time format (HH:mm)").when("checked",{is:!0,then:s(t=>t.required("Required"),"then"),otherwise:s(t=>t.optional().nullable(),"otherwise")}),hours:l.number().default(0),break_duration_minutes:l.string().default("0")}),G=l.object({schedule:l.array(K)});function J({defaultSchedule:t,onSubmit:a}){let[r,o]=z(!1),u=$.map(f=>{let h=t.find(v=>v.day.toLowerCase()===x(f).toLowerCase()||v.day.toLowerCase()===f.toLowerCase());return h?{...h,day:x(f),checked:!0}:{...t[0],checked:!1,day:x(f)}}),i=H({defaultValues:{schedule:u},resolver:L(G)}),{handleSubmit:n,watch:_,reset:p,control:m,formState:c}=i,{fields:S}=R({name:"schedule",control:m}),y=_("schedule");function I(f){let h=f.schedule.filter(({checked:v})=>v).map(v=>({...v,hours:w(v)}));a(h),o(!1)}s(I,"handleSubmitWorkingHours");function U(){p(),o(!1)}return s(U,"handleCancel"),e("div",{className:"flex items-center justify-between",children:d(T,{open:r,onOpenChange:o,children:[e(E,{asChild:!0,children:e(F,{variant:"link",className:"flex items-center p-0 RemoteFlows__WorkScheduleSelectionForm__Trigger",children:"Edit Schedule"})}),d(j,{className:"max-w-5xl max-h-[90vh] overflow-y-auto px-8 py-4 RemoteFlows__WorkScheduleSelectionForm__Content",children:[e(O,{children:e(V,{className:"RemoteFlows__WorkScheduleSelectionForm__Title",children:"Edit employee working hours"})}),e(C,{...i,children:d("form",{className:"space-y-4 RemoteFlows__WorkScheduleSelectionForm__Form",children:[d("div",{className:"rounded-lg",children:[e("p",{className:"text-gray-600 text-sm mb-4 RemoteFlows__WorkScheduleSelectionForm__Description",children:"The times displayed are in the employee's time zone in the 24-hour format."}),d("div",{className:"grid grid-cols-12 gap-4 text-sm font-medium text-gray-500 uppercase tracking-wide RemoteFlows__WorkScheduleSelectionForm__Header",children:[e("div",{className:"col-span-2"}),e("div",{className:"col-span-3 text-center",children:"START"}),e("div",{className:"col-span-1 text-center"}),e("div",{className:"col-span-3 text-center",children:"END"}),e("div",{className:"col-span-2 text-center",children:"HOURS"})]}),e("div",{className:"RemoteFlows__WorkScheduleSelectionForm__Rows",children:S.map((f,h)=>{let v=y[h],W=w(v);return d(Y,{children:[d("div",{className:"grid grid-cols-12 gap-4 items-center py-2 RemoteFlows__WorkScheduleSelectionForm__Row-Hours",children:[e("div",{className:"col-span-2 flex items-center gap-3",children:e(B,{label:f.day,name:`schedule.${h}.checked`})}),e("div",{className:"col-span-3",children:e(N,{name:`schedule.${h}.start_time`,includeErrorMessage:!1})}),e("div",{className:"col-span-1 text-center text-gray-500",children:"to"}),e("div",{className:"col-span-3",children:e(N,{name:`schedule.${h}.end_time`,includeErrorMessage:!1})}),e("div",{className:"col-span-2 text-center text-gray-600",children:isNaN(W)?"-":`${W} hours`})]}),d("div",{className:"grid grid-cols-12 gap-4 items-center py-2 RemoteFlows__WorkScheduleSelectionForm__Row-Break",children:[e("div",{className:"col-span-2 text-gray-500",children:"Break"}),e("div",{className:"col-span-2",children:e(N,{name:`schedule.${h}.break_duration_minutes`,includeErrorMessage:!1})}),e("div",{className:"col-span-2 text-gray-500",children:"minutes"}),e("div",{className:"col-span-4"})]})]},f.id)})})]}),Object.keys(c.errors).length>0&&e("p",{className:"text-destructive text-sm mb-0",children:"Invalid time format (HH:mm)"}),d("div",{className:"flex gap-4 pt-4",children:[e(F,{type:"button",className:"reset-button",variant:"outline",onClick:U,children:"Cancel"}),e(F,{type:"button",className:"submit-button",onClick:n(I),children:"Save Schedule"})]})]})})]})]})})}s(J,"WorkScheduleSelectionForm");var he=s(({fieldData:t})=>{let{defaultFormattedValue:a,currentSchedule:r,onSubmit:o}=t,{workHoursSummary:u,breakSummary:i,totalWorkHours:n}=a;return d("div",{className:"flex flex-col gap-3 RemoteFlows__WorkScheduleField",children:[e("p",{className:"text-sm RemoteFlows__WorkScheduleField__Title",children:"Work hours"}),d("div",{className:"flex flex-col gap-1 RemoteFlows__WorkScheduleField__Summary",children:[e("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__WorkHours",dangerouslySetInnerHTML:{__html:u.join(", ")}}),e("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__Break",children:i.join()}),d("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__Total",children:["Total of ",e("span",{children:n})," hours per week"]}),e(J,{defaultSchedule:r,onSubmit:o})]})]})},"WorkScheduleFieldDefault");export{he as a};
|
|
2
|
+
//# sourceMappingURL=chunk-FDEJ4CIO.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as o}from"./chunk-PGWKJ6FK.js";import{a as e}from"./chunk-P37U34EQ.js";var k=["invited","created_reserve_paid"],l=["deposit_required","referred"];function v({render:d}){let{onboardingBag:t,creditScore:s}=o(),u=t.creditRiskStatus==="deposit_required",n=t.onboardingReservesStatus==="deposit_required",i=u||n,c=t.creditRiskStatus==="referred",r=t.employment?.status&&k.includes(t.employment.status),a=t.creditRiskStatus&&l.includes(t.creditRiskStatus),R=i&&t.employment?.status&&!r,S=!i&&t.creditRiskStatus&&!a||t.employment?.status&&r,p=e(()=>c?"referred":R?s.showReserveInvoice?"deposit_required_successful":"deposit_required":S?s.showInviteSuccessful?"invite_successful":"invite":null,"getCreditRiskState")();return d({creditRiskState:p,creditRiskStatus:t.creditRiskStatus})}e(v,"ReviewStep");export{v as a};
|
|
2
|
+
//# sourceMappingURL=chunk-FHYOWPXB.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/flows/Onboarding/components/ReviewStep.tsx"],"sourcesContent":["import { useOnboardingContext } from '@/src/flows/Onboarding/context';\nimport {\n CreditRiskStatus,\n CreditRiskState,\n Employment,\n} from '@/src/flows/Onboarding/types';\n\ntype ReviewStepProps = {\n /**\n * Render prop function for customizing the review step credit risk flow UI\n *\n * @param props - Object containing credit risk information\n * @param props.creditRiskState - Current state of the credit risk flow\n * - 'referred': Company has been referred for manual review\n * - 'deposit_required': Deposit payment is required but not yet paid\n * - 'deposit_required_successful': Deposit payment has been successfully processed\n * - 'invite': Regular invite flow is available (no deposit required)\n * - 'invite_successful': Invitation has been successfully sent\n * - null: No specific credit risk state applies\n *\n * @param props.creditRiskStatus - Credit risk status from the backend\n * - 'not_started': Credit risk assessment has not been initiated\n * - 'ready': Ready for credit risk assessment\n * - 'in_progress': Credit risk assessment is in progress\n * - 'referred': Company has been referred for manual review\n * - 'fail': Credit risk assessment failed\n * - 'deposit_required': Company requires a deposit payment\n * - 'no_deposit_required': No deposit is required for this company\n * - undefined: Credit risk status not yet determined\n * @returns React.ReactNode to render for the review step\n */\n render: (props: {\n creditRiskState: CreditRiskState;\n creditRiskStatus: CreditRiskStatus | undefined;\n }) => React.ReactNode;\n};\n\nconst statusesToNotShowDeposit: Employment['status'][] = [\n 'invited',\n 'created_reserve_paid',\n];\n\nconst CREDIT_RISK_STATUSES: CreditRiskStatus[] = [\n 'deposit_required',\n 'referred',\n];\n\nexport function ReviewStep({ render }: ReviewStepProps) {\n const { onboardingBag, creditScore } = useOnboardingContext();\n\n // Helper variables to make logic more readable\n const isDepositRequiredCreditRisk =\n onboardingBag.creditRiskStatus === 'deposit_required';\n\n const isDepositRequiredReservesStatus =\n onboardingBag.onboardingReservesStatus === 'deposit_required';\n\n const isDepositRequired =\n isDepositRequiredCreditRisk || isDepositRequiredReservesStatus;\n\n const isReferred = onboardingBag.creditRiskStatus === 'referred';\n\n const hasEmploymentStatusThatHidesDeposit =\n onboardingBag.employment?.status &&\n statusesToNotShowDeposit.includes(onboardingBag.employment.status);\n\n const isCreditRiskStatusInExclusionList =\n onboardingBag.creditRiskStatus &&\n CREDIT_RISK_STATUSES.includes(onboardingBag.creditRiskStatus);\n\n const shouldShowDepositFlow =\n isDepositRequired &&\n onboardingBag.employment?.status &&\n !hasEmploymentStatusThatHidesDeposit;\n\n const shouldShowInviteFlow =\n (!isDepositRequired &&\n onboardingBag.creditRiskStatus &&\n !isCreditRiskStatusInExclusionList) ||\n (onboardingBag.employment?.status && hasEmploymentStatusThatHidesDeposit);\n\n const getCreditRiskState = (): CreditRiskState => {\n // check if the company is referred\n if (isReferred) {\n return 'referred';\n }\n\n // Deposit required flow\n if (shouldShowDepositFlow) {\n return creditScore.showReserveInvoice\n ? 'deposit_required_successful'\n : 'deposit_required';\n }\n\n // Invite flow\n if (shouldShowInviteFlow) {\n return creditScore.showInviteSuccessful ? 'invite_successful' : 'invite';\n }\n\n // Default case\n return null;\n };\n\n const creditRiskState = getCreditRiskState();\n\n return render({\n creditRiskState,\n creditRiskStatus: onboardingBag.creditRiskStatus,\n });\n}\n"],"mappings":"gFAqCA,IAAMA,EAAmD,CACvD,UACA,sBACF,EAEMC,EAA2C,CAC/C,mBACA,UACF,EAEO,SAASC,EAAW,CAAE,OAAAC,CAAO,EAAoB,CACtD,GAAM,CAAE,cAAAC,EAAe,YAAAC,CAAY,EAAIC,EAAqB,EAGtDC,EACJH,EAAc,mBAAqB,mBAE/BI,EACJJ,EAAc,2BAA6B,mBAEvCK,EACJF,GAA+BC,EAE3BE,EAAaN,EAAc,mBAAqB,WAEhDO,EACJP,EAAc,YAAY,QAC1BJ,EAAyB,SAASI,EAAc,WAAW,MAAM,EAE7DQ,EACJR,EAAc,kBACdH,EAAqB,SAASG,EAAc,gBAAgB,EAExDS,EACJJ,GACAL,EAAc,YAAY,QAC1B,CAACO,EAEGG,EACH,CAACL,GACAL,EAAc,kBACd,CAACQ,GACFR,EAAc,YAAY,QAAUO,EAwBjCI,EAtBqBC,EAAA,IAErBN,EACK,WAILG,EACKR,EAAY,mBACf,8BACA,mBAIFS,EACKT,EAAY,qBAAuB,oBAAsB,SAI3D,KAnBkB,sBAsBgB,EAE3C,OAAOF,EAAO,CACZ,gBAAAY,EACA,iBAAkBX,EAAc,gBAClC,CAAC,CACH,CA9DgBY,EAAAd,EAAA","names":["statusesToNotShowDeposit","CREDIT_RISK_STATUSES","ReviewStep","render","onboardingBag","creditScore","useOnboardingContext","isDepositRequiredCreditRisk","isDepositRequiredReservesStatus","isDepositRequired","isReferred","hasEmploymentStatusThatHidesDeposit","isCreditRiskStatusInExclusionList","shouldShowDepositFlow","shouldShowInviteFlow","creditRiskState","__name"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-2HBSVDEH.js";import{b as m}from"./chunk-76ZDXC2T.js";import{k as i}from"./chunk-VIGKOVHP.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function l({onSubmit:c,onSuccess:p,onError:t}){let{createCompanyBag:o}=m(),u=a(async r=>{try{await c?.({countryCode:r.country_code,companyOwnerEmail:r.company_owner_email,companyOwnerName:r.company_owner_name,desiredCurrency:r.desired_currency,name:r.name,phoneNumber:r.phone_number,taxNumber:r.tax_number});let n=await o.onSubmit(r);if(n?.data){await p?.(n?.data),o?.next();return}if(n?.error){let e=i(n,o.meta?.fields?.company_basic_information);t?.(e)}}catch(n){let e=i(n,o.meta?.fields?.company_basic_information);t?.(e)}},"handleSubmit"),f=o.stepState.values?.company_basic_information||o.initialValues.company_basic_information;return d(s,{defaultValues:f,onSubmit:u})}a(l,"CompanyBasicInformationStep");export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-FVBPHUV6.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-2HBSVDEH.js";import{b as i}from"./chunk-76ZDXC2T.js";import{k as a}from"./chunk-VIGKOVHP.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as c}from"react/jsx-runtime";function C({onSubmit:m,onSuccess:l,onError:t}){let{createCompanyBag:e}=i(),p=o(async d=>{try{await m?.(d);let r=await e.onSubmit(d);if(r?.data){await l?.(r?.data);return}if(r?.error){let s=a(r,e.meta?.fields?.address_details);t?.(s)}}catch(r){let s=a(r,e.meta?.fields?.address_details);t?.(s)}},"handleSubmit"),u=e.stepState.values?.address_details||e.initialValues.address_details;return c(n,{defaultValues:u,onSubmit:p})}o(C,"AddressDetailsStep");export{C as a};
|
|
2
|
+
//# sourceMappingURL=chunk-FY5OFJRY.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"./chunk-ZWIH53GL.js";import{a as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d}from"./chunk-ZWIH53GL.js";import{a as c}from"./chunk-3GBODX6S.js";import{b as s}from"./chunk-Q3ALCPJN.js";import{c as l}from"./chunk-WFXSA66P.js";import{k as e}from"./chunk-VIGKOVHP.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as m,jsxs as g}from"react/jsx-runtime";function O({onSubmit:p,onSuccess:u,onError:S}){let{contractorOnboardingBag:r}=s(),C=a(async n=>{try{let t=await r.parseFormValues(n);await p?.(t);let o=await r.onSubmit(n);if(o?.data){await u?.(o?.data),r?.next();return}}catch(t){let o=e(t,r.meta?.fields?.contract_details);S?.(o)}},"handleSubmit"),f=r.stepState.values?.contract_details||r.initialValues.contract_details,i=r.stepState.values?.pricing_plan?.subscription,b=l(i);return g("div",{className:"space-y-4",children:[m(c,{defaultValues:f,onSubmit:C}),b&&m(d,{subscription:i})]})}a(O,"ContractDetailsStep");export{O as a};
|
|
2
|
+
//# sourceMappingURL=chunk-GCMEX4I6.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as c}from"./chunk-Q3ALCPJN.js";import{d as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as c}from"./chunk-Q3ALCPJN.js";import{d as u}from"./chunk-Q3VMPVT3.js";import{j as a}from"./chunk-VIGKOVHP.js";import{a as m}from"./chunk-X6ZAR7ZL.js";import{b as d}from"./chunk-KQPDXXG3.js";import{a as n}from"./chunk-P37U34EQ.js";import w from"lodash.omit";import{jsx as b}from"react/jsx-runtime";function C({onSubmit:p,onSuccess:l,onError:e,render:f,...t}){let{components:y}=d(),{contractorOnboardingBag:r}=c(),i=u(),{mutateAsyncOrThrow:E}=m(i),v=n(async()=>{try{if(await p?.(),r.employmentId){let o=await E({employment_id:r.employmentId});await l?.({data:o,employmentStatus:"invited"}),r.refetchEmployment()}}catch(o){a(o)?e?.(w(o,"response")):e?.({error:o,rawError:o,fieldErrors:[]})}},"handleSubmit"),s=y?.button;if(!s)throw new Error("Button component not found");return b(s,{...t,disabled:i.isPending||t.disabled,onClick:o=>{v(),t.onClick?.(o)},children:f({employmentStatus:"invited"})})}n(C,"OnboardingInvite");export{C as a};
|
|
2
|
+
//# sourceMappingURL=chunk-GSPD4EIV.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as d,j as _,k as x,l as u,m as f}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{i as d,j as _,k as x,l as u,m as f}from"./chunk-7EONM7HL.js";import{a as t}from"./chunk-VIGKOVHP.js";import{a as p}from"./chunk-P37U34EQ.js";import*as b from"react";import{jsx as T}from"react/jsx-runtime";var n=b.forwardRef(({className:e,...r},a)=>T("textarea",{className:t("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:a,...r}));n.displayName="Textarea";import{jsx as o,jsxs as l}from"react/jsx-runtime";function C({field:e,fieldState:r,fieldData:a}){let{name:i,label:c,description:s,maxLength:m}=a,g=e.value?.length??0;return l(d,{"data-field":i,className:`RemoteFlows__TextArea__Item__${i}`,children:[o(_,{className:"RemoteFlows__TextArea__Label",children:c}),o(x,{children:o(n,{...e,value:e.value??"",onChange:F=>{e.onChange(F)},className:t(r.error&&"border-red-500 focus-visible:ring-red-500","RemoteFlows__TextArea__Input"),placeholder:c})}),(s||m)&&l("div",{className:"flex items-center justify-between",children:[s&&o(u,{className:"RemoteFlows__TextArea__Description",children:s}),m&&l("span",{className:"text-sm ml-auto RemoteFlows__TextArea__MaxLength",children:[g,"/",m]})]}),r.error&&o(f,{className:"RemoteFlows__TextArea__Error"})]})}p(C,"TextAreaFieldDefault");export{C as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HFQAVCD2.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as p,h as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as p,h as s}from"./chunk-7EONM7HL.js";import{b as a}from"./chunk-KQPDXXG3.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as m}from"react/jsx-runtime";function D({name:o,description:d,label:l,type:F,onChange:e,component:c,includeErrorMessage:f=!0,additionalProps:u={},maxLength:x,...C}){let{components:P}=a(),{control:T}=p();return m(s,{control:T,name:o,render:({field:n,fieldState:g})=>{let r=c||P?.text;if(!r)throw new Error(`Text component not found for field ${o}`);let y={name:o,description:d,label:l,type:F,onChange:e,metadata:u,maxLength:x,includeErrorMessage:f,...C};return m(r,{field:{...n,onChange:t(i=>{n.onChange(i),e?.(i)},"onChange")},fieldState:g,fieldData:y})}})}t(D,"TextField");export{D as a};
|
|
2
|
+
//# sourceMappingURL=chunk-HJ7WOTV7.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-E2ONHNZD.js";import{a as r}from"./chunk-MJQUJZCD.js";import{a as t}from"./chunk-2QGJBYQP.js";import{a as f}from"./chunk-QYWF2RMX.js";import{a as e}from"./chunk-U4H65USG.js";import{a as p}from"./chunk-QH57S4OP.js";import{a as n}from"./chunk-WR5DSTKP.js";import{a as m}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{useId as c}from"react";import{jsx as F}from"react/jsx-runtime";var k=i(({employmentId:l,render:T,options:d,initialValues:s})=>{let u=c(),o=t({employmentId:l,options:d,initialValues:s});return F(m.Provider,{value:{formId:u,terminationBag:o},children:T({terminationBag:o,components:{SubmitButton:r,Back:n,EmployeeComunicationStep:e,TerminationDetailsStep:a,PaidTimeOffStep:p,AdditionalDetailsStep:f}})})},"TerminationFlow");export{k as a};
|
|
2
|
+
//# sourceMappingURL=chunk-IYQDAHMG.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as p}from"./chunk-EUSCQL4H.js";import{C as c,I as m,M as C,R as d,m as l,v as u}from"./chunk-WQ4H5V7U.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-KJ4JS75E.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":"mMAYA,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"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as _}from"./chunk-5WIBTOCI.js";import{a as C}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as _}from"./chunk-5WIBTOCI.js";import{a as C}from"./chunk-O6H66UM2.js";import{a as l}from"./chunk-EUSCQL4H.js";import{A as y,R as f,Z as h,y as p}from"./chunk-WQ4H5V7U.js";import{d as c}from"./chunk-KQPDXXG3.js";import{a as n}from"./chunk-P37U34EQ.js";import{useMutation as F}from"@tanstack/react-query";import{useQuery as u}from"@tanstack/react-query";var b=n(e=>{let{client:t}=c();return u({...e,queryKey:["company-currencies"],retry:!1,queryFn:n(async()=>{let r=await f({client:t});if(r.error||!r.data)throw new Error("Failed to fetch company currencies");return r},"queryFn"),select:n(({data:r})=>r?.data?.company_currencies.map(a=>({value:a.code,label:a.code}))||[],"select")})},"useCompanyCurrencies"),A=n(()=>{let{client:e}=c();return F({mutationFn:n(t=>h({client:e,headers:{Authorization:""},body:t,query:{action:"send_create_password_email"}}),"mutationFn")})},"useCreateCompanyRequest"),I=n(()=>{let{client:e}=c();return F({mutationFn:n(({companyId:t,payload:r,jsonSchemaVersion:a})=>p({client:e,headers:{Authorization:""},path:{company_id:t},body:r,query:{address_details_json_schema_version:a}}),"mutationFn")})},"useUpdateCompanyRequest"),P=n(e=>{let{client:t}=c(),{data:r,isLoading:a}=u({...C(t,"create-company-countries"),select:n(i=>i.data?.data?.filter(s=>s.eor_onboarding).map(s=>({label:s.name,value:s.code}))||[],"select"),enabled:e?.queryOptions?.enabled}),{data:o,isLoading:m}=b(e?.queryOptions),d=l(_.data.schema,{},e);if(r){let i=d.fields.find(s=>s.name==="country_code");i&&(i.options=r)}if(o){let i=d.fields.find(s=>s.name==="desired_currency");i&&(i.options=o)}return{isLoading:a||m,companyBasicInformationForm:d}},"useCountriesSchemaField"),U=n(({countryCode:e,fieldValues:t,options:r})=>{let{client:a}=c();return u({queryKey:["company-address-details-schema",e],retry:!1,queryFn:n(async()=>{if(!e)throw new Error("Country code is required");let o=await y({client:a,headers:{Authorization:""},path:{country_code:e,form:"address_details"},query:{json_schema_version:r?.jsonSchemaVersion?.form_schema?.address_details||"latest"}});if(o.error||!o.data)throw new Error("Failed to fetch address details schema");return o},"queryFn"),enabled:r?.queryOptions?.enabled&&!!e,select:n(({data:o})=>{let m=o?.data||{};return l(m,t,r)},"select")})},"useAddressDetailsSchema");export{A as a,I as b,P as c,U as d};
|
|
2
|
+
//# sourceMappingURL=chunk-KNHDPKRL.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as p}from"./chunk-KSHK3ZPX.js";import{a as F}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as p}from"./chunk-KSHK3ZPX.js";import{a as F}from"./chunk-BAGPUVVO.js";import{g as C}from"./chunk-7EONM7HL.js";import{h as E}from"./chunk-VIGKOVHP.js";import{b as f}from"./chunk-X6ZAR7ZL.js";import{a as n}from"./chunk-P37U34EQ.js";import{useEffect as R}from"react";import{jsx as u}from"react/jsx-runtime";function T({onSubmit:S,onError:w,onSuccess:y,onErrorWithFields:c,shouldResetForm:d,resetFields:a}){let{form:e,formId:V,costCalculatorBag:o}=p(),{formState:{isSubmitSuccessful:s}}=e;R(()=>{if(s&&d){o?.resetForm(),e.reset();return}if(s&&a){let t={...e.getValues()};a.forEach(r=>{t[r]=""}),o?.resetForm(),e.reset(t)}},[s,e,d,o,a]);let b=n(async i=>{try{let t=await o?.parseFormValues(i);o?.meta?.fields&&(o.meta.fields=E(i,o.fields),o.meta.fields.employer_currency_slug=o.meta.fields.currency);let r=await o?.onSubmit(t);if(await S?.(t),r?.data&&!r.error){let l={data:{...r.data.data,employments:r.data.data.employments?.map(m=>({...m,title:t.estimation_title}))}};await y?.(l)}else throw{data:null,error:r?.error,fieldErrors:r?.fieldErrors,rawError:r?.rawError}}catch(t){let r=t,l=r.fieldErrors;if(c){let m=o?.meta?.fields,h=f(l,m);c({error:r.error,rawError:r.rawError,fieldErrors:h})}else w?.(r.error)}},"handleSubmit");return u(C,{...e,children:u("form",{id:V,onSubmit:e.handleSubmit(b),className:"space-y-4 RemoteFlows__CostCalculatorForm",children:u(F,{fields:o?.fields??[]})})})}n(T,"CostCalculatorForm");export{T as a};
|
|
2
|
+
//# sourceMappingURL=chunk-N7CS4LVY.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{K as e}from"./chunk-WQ4H5V7U.js";import{a as t}from"./chunk-P37U34EQ.js";import{queryOptions as i}from"@tanstack/react-query";var a=t((o,n="default")=>i({queryKey:["countries",n],retry:!1,queryFn:t(async()=>{let r=await e({client:o,headers:{Authorization:""}});if(r.error||!r.data)throw new Error("Failed to fetch supported countries");return r},"queryFn")}),"countriesOptions");export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-O6H66UM2.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as a,j as n,k as s,l as F,m as _}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{i as a,j as n,k as s,l as F,m as _}from"./chunk-7EONM7HL.js";import{a as i}from"./chunk-7G5JSUZU.js";import{a as l}from"./chunk-P37U34EQ.js";import{jsx as e,jsxs as u}from"react/jsx-runtime";function I({field:o,fieldState:p,fieldData:c}){let{name:r,label:t,description:m,maxLength:d,includeErrorMessage:x}=c;return u(a,{"data-field":r,className:`RemoteFlows__TextField__Item__${r}`,children:[t&&e(n,{className:"RemoteFlows__TextField__Label",children:t}),e(s,{children:e(i,{...o,value:o.value??"",onChange:T=>{o.onChange(T)},className:"RemoteFlows__TextField__Input",placeholder:t,maxLength:d})}),m&&e(F,{className:"RemoteFlows__TextField__Description",children:m}),x&&p.error&&e(_,{className:"RemoteFlows__TextField__Error"})]})}l(I,"TextFieldDefault");export{I as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OIBZ7VUR.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-3GBODX6S.js";import{b as a}from"./chunk-Q3ALCPJN.js";import{k as n}from"./chunk-VIGKOVHP.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as S}from"react/jsx-runtime";function C({onSubmit:c,onSuccess:s,onError:u}){let{contractorOnboardingBag:r}=a(),l=t(async e=>{try{await c?.({countryCode:e.country});let o=await r.onSubmit(e);if(o?.data){await s?.(o?.data),r?.next();return}}catch(o){let m=n(o,r.meta?.fields?.select_country);u?.(m)}},"handleSubmit"),d=r.stepState.values?.select_country||r.initialValues.select_country;return S(i,{defaultValues:d,onSubmit:l})}t(C,"SelectCountryStep");export{C as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ONXEJSDK.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as p}from"./chunk-QPN6X6UA.js";import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as p}from"./chunk-QPN6X6UA.js";import{a}from"./chunk-FY5OFJRY.js";import{a as m}from"./chunk-FVBPHUV6.js";import{a as e}from"./chunk-76ZDXC2T.js";import{a as r}from"./chunk-WKLTHGWU.js";import{a as t}from"./chunk-P37U34EQ.js";import{useId as y}from"react";import{jsx as d}from"react/jsx-runtime";var P=t(({render:n,countryCode:C,options:i,initialValues:s})=>{let o=r({options:i,countryCode:C,initialValues:s}),f=y();return d(e.Provider,{value:{createCompanyBag:o,formId:f},children:n({createCompanyBag:o,components:{CompanyBasicInformationStep:m,AddressDetailsStep:a,SubmitButton:p}})})},"CreateCompanyFlow");export{P as a};
|
|
2
|
+
//# sourceMappingURL=chunk-P7P5KATB.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d,b as w}from"./chunk-EAF6XPH6.js";import{a as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d,b as w}from"./chunk-EAF6XPH6.js";import{a as g}from"./chunk-YIOLMWB5.js";import{a as E}from"./chunk-EUSCQL4H.js";import{e as C}from"./chunk-T7O3YYOG.js";import{P as F,e as _,z as P}from"./chunk-WQ4H5V7U.js";import{a as h}from"./chunk-X6ZAR7ZL.js";import{a as j}from"./chunk-TSPDJUGG.js";import{d as c}from"./chunk-KQPDXXG3.js";import{a as e}from"./chunk-P37U34EQ.js";import{useMutation as b,useQuery as I}from"@tanstack/react-query";var B=e(({countryCode:n,employment:r,fieldValues:a,options:t})=>{let{client:u}=c(),m=t?.jsonSchemaVersion?.contract_amendments?{json_schema_version:t.jsonSchemaVersion.contract_amendments}:{};return I({queryKey:["contract-amendment-schema"],retry:!1,queryFn:e(async()=>{let o=await _({client:u,headers:{Authorization:""},query:{employment_id:r?.id,country_code:n,...m}});if(o.error||!o.data)throw new Error("Failed to fetch contract amendment schema");return o},"queryFn"),enabled:!!r,select:e(({data:o})=>{let l=o?.data||{};return E(l,a,t)},"select")})},"useContractAmendmentSchemaQuery"),J=e(n=>{let{client:r}=c(),a=n?.jsonSchemaVersion?.contract_amendments?{json_schema_version:n.jsonSchemaVersion.contract_amendments}:{};return b({mutationFn:e(t=>P({client:r,headers:{Authorization:""},body:t,query:{...a}}),"mutationFn")})},"useCreateContractAmendmentMutation"),K=e(n=>{let{client:r}=c(),a=n?.jsonSchemaVersion?.contract_amendments?{json_schema_version:n.jsonSchemaVersion.contract_amendments}:{};return b({mutationFn:e(t=>F({client:r,headers:{Authorization:""},body:t,query:{...a}}),"mutationFn")})},"useAutomatableContractAmendmentMutation"),te=e(({employmentId:n,countryCode:r,options:a})=>{let{fieldValues:t,setFieldValues:u,stepState:m,nextStep:o,previousStep:l}=j(d),{data:i,isLoading:v,isError:q,error:Q}=g({employmentId:n,queryParams:{exclude_files:!0}}),{data:s,isLoading:L,isError:M,error:T}=B({employment:i,countryCode:r,fieldValues:{...m.values?.[m.currentStep.name],...t},options:a}),k=w(i,s?.fields),S=J(a),A=K(a);async function x(p){let f=await C(p,s?.fields||[],{isPartialValidation:!1}),V={employment_id:i?.id,amendment_contract_id:i?.active_contract_id,contract_amendment:{...f}};switch(m.currentStep.name){case d.form.name:{let{mutateAsync:y}=h(A),H=await y(V);return o(),H}case d.confirmation_form.name:{let{mutateAsync:y}=h(S);return y(V)}default:throw new Error("Invalid step state")}}e(x,"onSubmit");async function z(p){if(s){let f=await C(p,s?.fields);return s?.handleValidation(f)}return null}e(z,"handleValidation");function O(){l()}return e(O,"back"),{stepState:m,fields:s?.fields||[],isLoading:v||L,isError:q||M,error:Q||T,isSubmitting:A.isPending||S.isPending,initialValues:k,values:t,handleValidation:z,checkFieldUpdates:u,onSubmit:x,back:O}},"useContractAmendment");export{te as a};
|
|
2
|
+
//# sourceMappingURL=chunk-POKLRB3M.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-3GBODX6S.js";import{b as a}from"./chunk-Q3ALCPJN.js";import{k as n}from"./chunk-VIGKOVHP.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as b}from"react/jsx-runtime";function g({onSubmit:l,onSuccess:u,onError:d}){let{contractorOnboardingBag:i}=a(),m=e(async t=>{try{let o=await i.parseFormValues(t);await l?.(o);let r=await i.onSubmit(t);if(r?.data){await u?.(r?.data),r?._skipNextStep||i?.next();return}}catch(o){let r=n(o,i.meta?.fields?.eligibility_questionnaire);d?.(r)}},"handleSubmit"),p=i.stepState.values?.eligibility_questionnaire||i.initialValues.eligibility_questionnaire;return b(s,{defaultValues:p,onSubmit:m})}e(g,"EligibilityQuestionnaireStep");export{g as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PP25XZSV.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as f}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as f}from"./chunk-RGLQY27T.js";import{i as a,j as c,k as l,l as m,m as _}from"./chunk-7EONM7HL.js";import{a as u,b as R}from"./chunk-SNBAM7SA.js";import{a as F}from"./chunk-VIGKOVHP.js";import{a as p}from"./chunk-P37U34EQ.js";import{Fragment as g}from"react";import{jsx as e,jsxs as t}from"react/jsx-runtime";var w=p(({field:s,fieldData:i,fieldState:C})=>{let{name:r,label:d,description:n,options:b}=i;return e("fieldset",{className:F("space-y-3",`RemoteFlows__RadioGroupField__Item__${r}`),"data-field":r,children:t(a,{children:[e("legend",{children:d}),n&&e(m,{helpCenter:e(f,{helpCenter:i.meta?.helpCenter}),children:n}),e(l,{children:e(u,{"aria-label":d||r,onValueChange:o=>{s.onChange(o)},value:s.value,className:"flex flex-col space-y-3",children:b?.map(o=>e(g,{children:t(a,{"data-field":r,className:"flex items-start space-x-3 space-y-0 gap-0 RemoteFlows__RadioField__Item",children:[e(l,{children:e(R,{value:o.value,className:"RemoteFlows__RadioField__Input",disabled:o.disabled})}),t("div",{children:[e(c,{className:"font-normal mb-0 RemoteFlows__RadioField__Label",children:o.label}),o.description&&e(m,{className:"mt-2",children:o.description})]})]})},o.value))})}),C.error&&e(_,{})]})})},"RadioGroupFieldDefault");export{w as a};
|
|
2
|
+
//# sourceMappingURL=chunk-PVZTOW7Z.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{f as j}from"./chunk-STF3NTPS.js";import{a as q}from"./chunk-WVJDCDGZ.js";import{a as P}from"./chunk-O6H66UM2.js";import{a as p}from"./chunk-EUSCQL4H.js";import{A as _,E as F,G as S,H as w,J as v,O as E,T as O,g as f,i as y,j as d,n as h,o as b,w as g,x as C}from"./chunk-WQ4H5V7U.js";import{d as i}from"./chunk-KQPDXXG3.js";import{a as n}from"./chunk-P37U34EQ.js";import{useMutation as c,useQuery as m}from"@tanstack/react-query";var H=n(e=>{let{client:r}=i();return m({queryKey:["employment",e],retry:!1,enabled:!!e,select:n(({data:t})=>t?.data.employment,"select"),queryFn:n(async()=>{let t=await S({client:r,headers:{Authorization:""},path:{employment_id:e}});if(t.error||!t.data)throw new Error("Failed to fetch employment data");return t},"queryFn")})},"useEmployment"),L=n(e=>{let{client:r}=i();return m({queryKey:["company",e],retry:!1,enabled:!!e,queryFn:n(async()=>{let t=await C({client:r,headers:{Authorization:""},path:{company_id:e}});if(t.error||!t.data)throw new Error("Failed to fetch employment data");return t},"queryFn"),select:n(({data:t})=>t.data.company,"select")})},"useCompany"),G=n(e=>{let{client:r}=i();return m({queryKey:["benefit-offers",e],retry:!1,enabled:!!e,queryFn:n(async()=>h({client:r,path:{employment_id:e}}).then(t=>{if(t.error||!t.data)throw new Error("Failed to fetch benefit offers data");return t}),"queryFn"),select:n(({data:t})=>t?.data?.reduce((s,o)=>({...s,[o.benefit_group.slug]:{value:o.benefit_tier?.slug??"no",...o.benefit_group?.filter?.slug?{filter:o.benefit_group?.filter?.slug}:{}}}),{}),"select")})},"useBenefitOffers"),I=n(()=>{let{client:e}=i();return c({mutationFn:n(r=>O({client:e,headers:{Authorization:""},path:r}),"mutationFn")})},"useEmploymentInvite"),X=n(()=>{let{client:e}=i();return c({mutationFn:n(r=>g({client:e,body:r}),"mutationFn")})},"useCreateReserveInvoice"),Y=n(({countryCode:e,form:r,fieldValues:t,options:s,query:o={},jsonSchemaVersion:a})=>{let{client:l}=i(),x=a?{json_schema_version:a}:{};return m({queryKey:["onboarding-json-schema-form",e,r],retry:!1,queryFn:n(async()=>{let u=await _({client:l,headers:{Authorization:""},path:{country_code:e,form:r},query:{skip_benefits:!0,...o,...x}});if(u.error||!u.data)throw new Error("Failed to fetch onboarding schema");return u},"queryFn"),enabled:s?.queryOptions?.enabled,select:n(({data:u})=>{let R=u?.data||{};return p(R,t,s)},"select")})},"useJSONSchemaForm"),Z=n((e,r,t)=>{let s=t?.jsonSchemaVersion?.benefit_offers_form_schema?{json_schema_version:t.jsonSchemaVersion.benefit_offers_form_schema}:{},{client:o}=i();return m({queryKey:["benefit-offers-schema",e],retry:!1,enabled:!!e,queryFn:n(async()=>{let a=await F({client:o,path:{employment_id:e},query:s});if(a.error||!a.data)throw new Error("Failed to fetch benefit offers schema");return a},"queryFn"),select:n(({data:a})=>{let l=a?.data?.schema||{};return p(l,r,{jsfModify:t?.jsfModify?.benefits})},"select")})},"useBenefitOffersSchema"),$=n(()=>{let{client:e}=i(),r={json_schema_version:1};return c({mutationFn:n(t=>y({client:e,headers:{Authorization:""},body:t,query:{...r}}),"mutationFn")})},"useCreateEmployment"),ee=n((e,r)=>{let{client:t}=i(),s={employment_basic_information_json_schema_version:1,contract_details_json_schema_version:j(r,e)||1};return c({mutationFn:n(({employmentId:o,...a})=>w({client:t,headers:{Authorization:""},body:a,path:{employment_id:o},query:{skip_benefits:!0,...s}}),"mutationFn")})},"useUpdateEmployment"),te=n(e=>{let{client:r}=i();return c({mutationFn:n(({employmentId:t,...s})=>{let o=e?.jsonSchemaVersion?.benefit_offers_form_schema?{json_schema_version:e.jsonSchemaVersion.benefit_offers_form_schema}:{};return b({client:r,body:s,path:{employment_id:t},query:{...o}})},"mutationFn")})},"useUpdateBenefitsOffers"),ne=n(e=>{let{client:r}=i(),{data:t,isLoading:s}=m({...P(r,"onboarding-countries"),select:n(a=>a.data?.data?.filter(l=>l.eor_onboarding).map(l=>({label:l.name,value:l.code}))||[],"select"),enabled:e?.queryOptions?.enabled}),o=p(q.data.schema,{},e);if(t){let a=o.fields.find(l=>l.name==="country");a&&(a.options=t)}return{isLoading:s,selectCountryForm:o}},"useCountriesSchemaField"),re=n(({type:e="spread"})=>{let{client:r}=i();return c({mutationFn:n(t=>(e==="no_spread"?f:E)({client:r,body:t}),"mutationFn")})},"useConvertCurrency"),oe=n(()=>{let{client:e}=i();return c({mutationFn:n(({employmentId:r,...t})=>v({client:e,path:{employment_id:r},body:t}),"mutationFn")})},"useUpsertContractEligibility"),se=n((e,r,t=!0)=>{let{client:s}=i();return m({queryKey:["employment-onboarding-reserves-status",e,r],retry:!1,enabled:t&&!!e&&!!r,queryFn:n(async()=>{let o=await d({client:s,headers:{Authorization:""},path:{company_id:e,employment_id:r}});if(o.error||!o.data)throw new Error("Failed to fetch employment onboarding reserves status");return o},"queryFn"),select:n(({data:o})=>o?.data?.status,"select")})},"useEmploymentOnboardingReservesStatus");export{H as a,L as b,G as c,I as d,X as e,Y as f,Z as g,$ as h,ee as i,te as j,ne as k,re as l,oe as m,se as n};
|
|
2
|
+
//# sourceMappingURL=chunk-Q3VMPVT3.js.map
|