@remoteoss/remote-flows 1.33.1 → 1.34.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-5NZEGPA6.js +2 -0
- package/dist/CountryFieldDefault-GP2S2KN6.js +2 -0
- package/dist/DatePickerFieldDefault-KN4COEEO.js +2 -0
- package/dist/RadioGroupFieldDefault-L3CZN2ZT.js +2 -0
- package/dist/TextAreaFieldDefault-YKBNDA4U.js +2 -0
- package/dist/chunk-2HREQZP4.js +2 -0
- package/dist/chunk-2HREQZP4.js.map +1 -0
- package/dist/{chunk-RITVVN7T.js → chunk-2IIHA7AA.js} +2 -2
- package/dist/{chunk-OFML5F4A.js → chunk-35LCD6VA.js} +2 -2
- package/dist/{chunk-ESYUJGB5.js → chunk-3I4I7VH6.js} +2 -2
- package/dist/{chunk-LS22BMPO.js → chunk-3M4RT5QK.js} +2 -2
- package/dist/{chunk-72K4C6OR.js → chunk-3PKL3V6F.js} +2 -2
- package/dist/{chunk-IQNQ4LFU.js → chunk-4LF5J3KW.js} +2 -2
- package/dist/{chunk-LK3FPLM5.js → chunk-4ZA3PGCP.js} +2 -2
- package/dist/{chunk-ORB2D4LR.js → chunk-5CFXZWQ5.js} +2 -2
- package/dist/{chunk-OGXMCNOP.js → chunk-5FHNCDLU.js} +2 -2
- package/dist/{chunk-DCEOZPQA.js → chunk-5IOV4ADT.js} +2 -2
- package/dist/{chunk-YP4H7UGJ.js → chunk-5JFH2KYZ.js} +2 -2
- package/dist/{chunk-3E7EDKBM.js → chunk-5TAAGXI6.js} +2 -2
- package/dist/{chunk-BZ6GXHXM.js → chunk-6BTNYUKU.js} +2 -2
- package/dist/{chunk-6Q54DYVX.js → chunk-7N552DET.js} +2 -2
- package/dist/{chunk-CVZGPWZH.js → chunk-AZSD5MTJ.js} +2 -2
- package/dist/{chunk-JAO2GIK3.js → chunk-B4JJN54S.js} +2 -2
- package/dist/{chunk-2SMK7OOK.js → chunk-BDDSSFUK.js} +2 -2
- package/dist/{chunk-6FOEJAXI.js → chunk-C7GJUNNC.js} +2 -2
- package/dist/{chunk-3V7ZQOOW.js → chunk-CFCUY6VA.js} +2 -2
- package/dist/{chunk-BZNN4OST.js → chunk-CMPHQVJ3.js} +2 -2
- package/dist/{chunk-TVBZT6FA.js → chunk-D6MFIXSJ.js} +2 -2
- package/dist/chunk-D6MFIXSJ.js.map +1 -0
- package/dist/{chunk-53WGX4C7.js → chunk-DILDN6DN.js} +2 -2
- package/dist/{chunk-XLPYO4QS.js → chunk-DNTUDKSN.js} +2 -2
- package/dist/{chunk-FDSUWSSY.js → chunk-DTTE663D.js} +2 -2
- package/dist/{chunk-CRO2FOF3.js → chunk-DZJDM6PM.js} +2 -2
- package/dist/{chunk-6AGNWLFO.js → chunk-E4VXY33I.js} +2 -2
- package/dist/chunk-EJWKMMZV.js +2 -0
- package/dist/chunk-EJWKMMZV.js.map +1 -0
- package/dist/chunk-ER46UFIU.js +8 -0
- package/dist/chunk-ER46UFIU.js.map +1 -0
- package/dist/{chunk-MKUSE7JK.js → chunk-F2ENM2JE.js} +2 -2
- package/dist/chunk-F2ENM2JE.js.map +1 -0
- package/dist/{chunk-QN2UHYGE.js → chunk-FTRPPW6E.js} +2 -2
- package/dist/chunk-FTRPPW6E.js.map +1 -0
- package/dist/{chunk-UDEKRW6Y.js → chunk-G7MJDZGB.js} +2 -2
- package/dist/chunk-G7MJDZGB.js.map +1 -0
- package/dist/{chunk-7AQ7V57P.js → chunk-GIO4RGLD.js} +2 -2
- package/dist/{chunk-62LLY3AT.js → chunk-HPO77UMT.js} +2 -2
- package/dist/{chunk-P6FBUGRL.js → chunk-IPLCBEJI.js} +2 -2
- package/dist/{chunk-PFK6TYWV.js → chunk-JBX6GAPY.js} +2 -2
- package/dist/{chunk-QTKCCR2M.js → chunk-KE5UI2WF.js} +2 -2
- package/dist/{chunk-GFPU6XMO.js → chunk-KEMKRC6N.js} +2 -2
- package/dist/{chunk-3B3IR4XI.js → chunk-KV7CBYSI.js} +2 -2
- package/dist/{chunk-4KJV4WU4.js → chunk-KXGHVCV2.js} +2 -2
- package/dist/{chunk-LW3ZZPWS.js → chunk-KYQIUVYP.js} +2 -2
- package/dist/{chunk-A5CJEHJA.js → chunk-LKFGJU72.js} +2 -2
- package/dist/{chunk-YGMFPM7A.js → chunk-LPXJW7UB.js} +2 -2
- package/dist/{chunk-CF3L7F4S.js → chunk-MKI4IWX6.js} +2 -2
- package/dist/{chunk-MND3NWG7.js → chunk-N5DHVRQR.js} +2 -2
- package/dist/chunk-NFI74GKN.js +2 -0
- package/dist/{chunk-3EIBETN3.js.map → chunk-NFI74GKN.js.map} +1 -1
- package/dist/{chunk-N57H62CC.js → chunk-OBF27DKO.js} +2 -2
- package/dist/chunk-OJMB3357.js +2 -0
- package/dist/{chunk-AHRG5QCS.js.map → chunk-OJMB3357.js.map} +1 -1
- package/dist/{chunk-YYSFI73T.js → chunk-OSHTXKLJ.js} +2 -2
- package/dist/{chunk-CWIILDO2.js → chunk-PURTKT5Q.js} +2 -2
- package/dist/chunk-Q65JWWKR.js +2 -0
- package/dist/chunk-Q65JWWKR.js.map +1 -0
- package/dist/chunk-QHZPSH52.js +2 -0
- package/dist/chunk-QHZPSH52.js.map +1 -0
- package/dist/{chunk-IHHDOH6Y.js → chunk-QSAZUS52.js} +2 -2
- package/dist/{chunk-62IEME2X.js → chunk-QXQYT7IC.js} +2 -2
- package/dist/chunk-QXQYT7IC.js.map +1 -0
- package/dist/{chunk-V4TK2JKS.js → chunk-R63ZJMJA.js} +2 -2
- package/dist/{chunk-V4TK2JKS.js.map → chunk-R63ZJMJA.js.map} +1 -1
- package/dist/chunk-SVVZOMLQ.js +2 -0
- package/dist/chunk-SVVZOMLQ.js.map +1 -0
- package/dist/chunk-TP3B2OEW.js +2 -0
- package/dist/chunk-TP3B2OEW.js.map +1 -0
- package/dist/{chunk-ZPMOCFFN.js → chunk-UG5UQ72J.js} +2 -2
- package/dist/{chunk-T3VXOELH.js → chunk-VDHWWC4J.js} +2 -2
- package/dist/{chunk-SFW4O42J.js → chunk-W4YDSTXA.js} +2 -2
- package/dist/chunk-W4YDSTXA.js.map +1 -0
- package/dist/{chunk-ACT6XGJM.js → chunk-W5THF3XS.js} +2 -2
- package/dist/{chunk-J4NCN3TG.js → chunk-X5ZZPJII.js} +2 -2
- package/dist/{chunk-J4NCN3TG.js.map → chunk-X5ZZPJII.js.map} +1 -1
- package/dist/{chunk-DKSN6HVI.js → chunk-XJHIF5ZE.js} +2 -2
- package/dist/{chunk-3HTQWY65.js → chunk-YGK26YJ2.js} +2 -2
- package/dist/chunk-YHQYBVLS.js +2 -0
- package/dist/chunk-YHQYBVLS.js.map +1 -0
- package/dist/{chunk-CDN7R7Y7.js → chunk-YLAJZTKB.js} +2 -2
- package/dist/chunk-Z6XIW4JQ.js +2 -0
- package/dist/chunk-Z6XIW4JQ.js.map +1 -0
- package/dist/chunk-ZAZ24JS2.js +2 -0
- package/dist/chunk-ZAZ24JS2.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 +2 -2
- 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 +2 -2
- package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
- package/dist/flows/ContractAmendment/context.d.ts +3 -3
- package/dist/flows/ContractAmendment/hooks.d.ts +3 -3
- package/dist/flows/ContractAmendment/hooks.js +1 -1
- package/dist/flows/ContractAmendment/index.d.ts +3 -3
- package/dist/flows/ContractAmendment/index.js +1 -1
- package/dist/flows/ContractAmendment/types.d.ts +2 -2
- package/dist/flows/ContractAmendment/utils.d.ts +2 -2
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
- package/dist/flows/ContractorOnboarding/api.d.ts +2 -2
- package/dist/flows/ContractorOnboarding/api.js +1 -1
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +4 -4
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractPreviewHeader.d.ts +2 -2
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStatement.d.ts +2 -2
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractReviewButton.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/SaveDraftButton.d.ts +3 -3
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +4 -4
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/ContractorOnboarding/context.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/hooks.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/hooks.js +1 -1
- package/dist/flows/ContractorOnboarding/index.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/index.js +1 -1
- package/dist/flows/ContractorOnboarding/jsfModify.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
- package/dist/flows/ContractorOnboarding/types.d.ts +5 -5
- package/dist/flows/ContractorOnboarding/utils.d.ts +4 -4
- package/dist/flows/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 +3 -3
- package/dist/flows/CostCalculator/utils.d.ts +3 -3
- package/dist/flows/CostCalculator/utils.js +1 -1
- package/dist/flows/CreateCompany/CreateCompany.d.ts +4 -4
- package/dist/flows/CreateCompany/CreateCompany.js +1 -1
- package/dist/flows/CreateCompany/api.d.ts +2 -2
- package/dist/flows/CreateCompany/api.js +1 -1
- package/dist/flows/CreateCompany/components/AddressDetailsStep.d.ts +4 -4
- package/dist/flows/CreateCompany/components/AddressDetailsStep.js +1 -1
- package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.d.ts +4 -4
- package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.js +1 -1
- package/dist/flows/CreateCompany/components/CreateCompanyForm.d.ts +2 -2
- package/dist/flows/CreateCompany/components/CreateCompanyForm.js +1 -1
- package/dist/flows/CreateCompany/context.d.ts +4 -4
- package/dist/flows/CreateCompany/hooks.d.ts +4 -4
- package/dist/flows/CreateCompany/hooks.js +1 -1
- package/dist/flows/CreateCompany/index.d.ts +4 -4
- package/dist/flows/CreateCompany/index.js +1 -1
- package/dist/flows/CreateCompany/types.d.ts +4 -4
- package/dist/flows/Onboarding/OnboardingFlow.d.ts +4 -4
- package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
- package/dist/flows/Onboarding/api.d.ts +4 -4
- package/dist/flows/Onboarding/api.js +1 -1
- package/dist/flows/Onboarding/components/AnnualGrossSalary.d.ts +2 -2
- package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
- package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/Onboarding/components/BenefitsStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
- package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/Onboarding/components/EngagementAgreementDetailsStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/EngagementAgreementDetailsStep.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingForm.d.ts +4 -4
- package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingInvite.d.ts +3 -3
- package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
- package/dist/flows/Onboarding/components/ReviewStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/SaveDraftButton.d.ts +3 -3
- package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +4 -4
- package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/Onboarding/context.d.ts +4 -4
- package/dist/flows/Onboarding/hooks.d.ts +4 -4
- package/dist/flows/Onboarding/hooks.js +1 -1
- package/dist/flows/Onboarding/index.d.ts +4 -4
- package/dist/flows/Onboarding/index.js +1 -1
- package/dist/flows/Onboarding/types.d.ts +4 -4
- package/dist/flows/Onboarding/utils.d.ts +4 -4
- package/dist/flows/Onboarding/utils.js +1 -1
- 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 +5 -3
- package/dist/flows/utils.d.ts +2 -2
- package/dist/index.d.ts +12 -12
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/internals.d.ts +3 -3
- package/dist/internals.js +1 -1
- package/dist/{mutations-DTK4GE8r.d.ts → mutations-D9HgX-Ms.d.ts} +1 -1
- package/dist/{remoteFlows-n8r_cW0z.d.ts → remoteFlows-BY_Bq_Wn.d.ts} +2 -2
- package/dist/{types-Cd5_2FHQ.d.ts → types-3T7anr5K.d.ts} +3 -3
- package/dist/{types-BD0b8UuQ.d.ts → types-DRJoYr0A.d.ts} +2 -2
- package/dist/{types-BJ9gyvly.d.ts → types-DaTID0Xm.d.ts} +4 -4
- package/dist/{types-BiMfLZYw.d.ts → types-DnD9HEvZ.d.ts} +3 -3
- package/dist/{types-BY3BtHb6.d.ts → types-DreSaMum.d.ts} +1 -1
- package/dist/{types.gen-DPZBntYq.d.ts → types.gen-N4dGBvBJ.d.ts} +25 -9
- package/dist/{utils-C5lwjSxr.d.ts → utils-DE_uIWef.d.ts} +1 -1
- package/package.json +9 -8
- package/dist/CheckboxFieldDefault-U2NRBOXO.js +0 -2
- package/dist/CountryFieldDefault-DC4B2JGN.js +0 -2
- package/dist/DatePickerFieldDefault-Q6VSUSEY.js +0 -2
- package/dist/RadioGroupFieldDefault-CU6LOX2R.js +0 -2
- package/dist/TextAreaFieldDefault-4XPXRKZZ.js +0 -2
- package/dist/chunk-3EIBETN3.js +0 -2
- package/dist/chunk-62IEME2X.js.map +0 -1
- package/dist/chunk-AHRG5QCS.js +0 -2
- package/dist/chunk-AIT2DBW2.js +0 -2
- package/dist/chunk-AIT2DBW2.js.map +0 -1
- package/dist/chunk-B6YWTMGV.js +0 -2
- package/dist/chunk-B6YWTMGV.js.map +0 -1
- package/dist/chunk-CJJQ4NIH.js +0 -2
- package/dist/chunk-CJJQ4NIH.js.map +0 -1
- package/dist/chunk-DKDE34ZC.js +0 -2
- package/dist/chunk-DKDE34ZC.js.map +0 -1
- package/dist/chunk-HS63DEGD.js +0 -2
- package/dist/chunk-HS63DEGD.js.map +0 -1
- package/dist/chunk-MCXUBLTV.js +0 -2
- package/dist/chunk-MCXUBLTV.js.map +0 -1
- package/dist/chunk-MKUSE7JK.js.map +0 -1
- package/dist/chunk-N7FE22T7.js +0 -2
- package/dist/chunk-N7FE22T7.js.map +0 -1
- package/dist/chunk-QN2UHYGE.js.map +0 -1
- package/dist/chunk-RWXZG4KO.js +0 -2
- package/dist/chunk-RWXZG4KO.js.map +0 -1
- package/dist/chunk-SFW4O42J.js.map +0 -1
- package/dist/chunk-TNQKP2XT.js +0 -8
- package/dist/chunk-TNQKP2XT.js.map +0 -1
- package/dist/chunk-TVBZT6FA.js.map +0 -1
- package/dist/chunk-UDEKRW6Y.js.map +0 -1
- package/dist/chunk-XNW6UHSW.js +0 -2
- package/dist/chunk-XNW6UHSW.js.map +0 -1
- /package/dist/{CheckboxFieldDefault-U2NRBOXO.js.map → CheckboxFieldDefault-5NZEGPA6.js.map} +0 -0
- /package/dist/{CountryFieldDefault-DC4B2JGN.js.map → CountryFieldDefault-GP2S2KN6.js.map} +0 -0
- /package/dist/{DatePickerFieldDefault-Q6VSUSEY.js.map → DatePickerFieldDefault-KN4COEEO.js.map} +0 -0
- /package/dist/{RadioGroupFieldDefault-CU6LOX2R.js.map → RadioGroupFieldDefault-L3CZN2ZT.js.map} +0 -0
- /package/dist/{TextAreaFieldDefault-4XPXRKZZ.js.map → TextAreaFieldDefault-YKBNDA4U.js.map} +0 -0
- /package/dist/{chunk-RITVVN7T.js.map → chunk-2IIHA7AA.js.map} +0 -0
- /package/dist/{chunk-OFML5F4A.js.map → chunk-35LCD6VA.js.map} +0 -0
- /package/dist/{chunk-ESYUJGB5.js.map → chunk-3I4I7VH6.js.map} +0 -0
- /package/dist/{chunk-LS22BMPO.js.map → chunk-3M4RT5QK.js.map} +0 -0
- /package/dist/{chunk-72K4C6OR.js.map → chunk-3PKL3V6F.js.map} +0 -0
- /package/dist/{chunk-IQNQ4LFU.js.map → chunk-4LF5J3KW.js.map} +0 -0
- /package/dist/{chunk-LK3FPLM5.js.map → chunk-4ZA3PGCP.js.map} +0 -0
- /package/dist/{chunk-ORB2D4LR.js.map → chunk-5CFXZWQ5.js.map} +0 -0
- /package/dist/{chunk-OGXMCNOP.js.map → chunk-5FHNCDLU.js.map} +0 -0
- /package/dist/{chunk-DCEOZPQA.js.map → chunk-5IOV4ADT.js.map} +0 -0
- /package/dist/{chunk-YP4H7UGJ.js.map → chunk-5JFH2KYZ.js.map} +0 -0
- /package/dist/{chunk-3E7EDKBM.js.map → chunk-5TAAGXI6.js.map} +0 -0
- /package/dist/{chunk-BZ6GXHXM.js.map → chunk-6BTNYUKU.js.map} +0 -0
- /package/dist/{chunk-6Q54DYVX.js.map → chunk-7N552DET.js.map} +0 -0
- /package/dist/{chunk-CVZGPWZH.js.map → chunk-AZSD5MTJ.js.map} +0 -0
- /package/dist/{chunk-JAO2GIK3.js.map → chunk-B4JJN54S.js.map} +0 -0
- /package/dist/{chunk-2SMK7OOK.js.map → chunk-BDDSSFUK.js.map} +0 -0
- /package/dist/{chunk-6FOEJAXI.js.map → chunk-C7GJUNNC.js.map} +0 -0
- /package/dist/{chunk-3V7ZQOOW.js.map → chunk-CFCUY6VA.js.map} +0 -0
- /package/dist/{chunk-BZNN4OST.js.map → chunk-CMPHQVJ3.js.map} +0 -0
- /package/dist/{chunk-53WGX4C7.js.map → chunk-DILDN6DN.js.map} +0 -0
- /package/dist/{chunk-XLPYO4QS.js.map → chunk-DNTUDKSN.js.map} +0 -0
- /package/dist/{chunk-FDSUWSSY.js.map → chunk-DTTE663D.js.map} +0 -0
- /package/dist/{chunk-CRO2FOF3.js.map → chunk-DZJDM6PM.js.map} +0 -0
- /package/dist/{chunk-6AGNWLFO.js.map → chunk-E4VXY33I.js.map} +0 -0
- /package/dist/{chunk-7AQ7V57P.js.map → chunk-GIO4RGLD.js.map} +0 -0
- /package/dist/{chunk-62LLY3AT.js.map → chunk-HPO77UMT.js.map} +0 -0
- /package/dist/{chunk-P6FBUGRL.js.map → chunk-IPLCBEJI.js.map} +0 -0
- /package/dist/{chunk-PFK6TYWV.js.map → chunk-JBX6GAPY.js.map} +0 -0
- /package/dist/{chunk-QTKCCR2M.js.map → chunk-KE5UI2WF.js.map} +0 -0
- /package/dist/{chunk-GFPU6XMO.js.map → chunk-KEMKRC6N.js.map} +0 -0
- /package/dist/{chunk-3B3IR4XI.js.map → chunk-KV7CBYSI.js.map} +0 -0
- /package/dist/{chunk-4KJV4WU4.js.map → chunk-KXGHVCV2.js.map} +0 -0
- /package/dist/{chunk-LW3ZZPWS.js.map → chunk-KYQIUVYP.js.map} +0 -0
- /package/dist/{chunk-A5CJEHJA.js.map → chunk-LKFGJU72.js.map} +0 -0
- /package/dist/{chunk-YGMFPM7A.js.map → chunk-LPXJW7UB.js.map} +0 -0
- /package/dist/{chunk-CF3L7F4S.js.map → chunk-MKI4IWX6.js.map} +0 -0
- /package/dist/{chunk-MND3NWG7.js.map → chunk-N5DHVRQR.js.map} +0 -0
- /package/dist/{chunk-N57H62CC.js.map → chunk-OBF27DKO.js.map} +0 -0
- /package/dist/{chunk-YYSFI73T.js.map → chunk-OSHTXKLJ.js.map} +0 -0
- /package/dist/{chunk-CWIILDO2.js.map → chunk-PURTKT5Q.js.map} +0 -0
- /package/dist/{chunk-IHHDOH6Y.js.map → chunk-QSAZUS52.js.map} +0 -0
- /package/dist/{chunk-ZPMOCFFN.js.map → chunk-UG5UQ72J.js.map} +0 -0
- /package/dist/{chunk-T3VXOELH.js.map → chunk-VDHWWC4J.js.map} +0 -0
- /package/dist/{chunk-ACT6XGJM.js.map → chunk-W5THF3XS.js.map} +0 -0
- /package/dist/{chunk-DKSN6HVI.js.map → chunk-XJHIF5ZE.js.map} +0 -0
- /package/dist/{chunk-3HTQWY65.js.map → chunk-YGK26YJ2.js.map} +0 -0
- /package/dist/{chunk-CDN7R7Y7.js.map → chunk-YLAJZTKB.js.map} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-CFCUY6VA.js";import"./chunk-DXKUARQF.js";import"./chunk-C7GJUNNC.js";import"./chunk-W4YDSTXA.js";import"./chunk-5BU3CD2P.js";import"./chunk-ER46UFIU.js";import"./chunk-JXAAON7I.js";import"./chunk-H2O4CVKF.js";import"./chunk-P37U34EQ.js";export{a as CheckboxFieldDefault};
|
|
2
|
+
//# sourceMappingURL=CheckboxFieldDefault-5NZEGPA6.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-5FHNCDLU.js";import"./chunk-LDI7E3ZK.js";import"./chunk-IX5SV6J2.js";import"./chunk-242UBL3Z.js";import"./chunk-4ZMRPH3M.js";import"./chunk-C7GJUNNC.js";import"./chunk-R4TTPUH7.js";import"./chunk-W4YDSTXA.js";import"./chunk-5BU3CD2P.js";import"./chunk-ER46UFIU.js";import"./chunk-JXAAON7I.js";import"./chunk-H2O4CVKF.js";import"./chunk-P37U34EQ.js";export{a as CountryFieldDefault};
|
|
2
|
+
//# sourceMappingURL=CountryFieldDefault-GP2S2KN6.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-CMPHQVJ3.js";import"./chunk-IX5SV6J2.js";import"./chunk-C7GJUNNC.js";import"./chunk-R4TTPUH7.js";import"./chunk-W4YDSTXA.js";import"./chunk-5BU3CD2P.js";import"./chunk-ER46UFIU.js";import"./chunk-JXAAON7I.js";import"./chunk-H2O4CVKF.js";import"./chunk-P37U34EQ.js";export{a as DatePickerFieldDefault};
|
|
2
|
+
//# sourceMappingURL=DatePickerFieldDefault-KN4COEEO.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-LKFGJU72.js";import"./chunk-XWBNZAGY.js";import"./chunk-4ZMRPH3M.js";import"./chunk-C7GJUNNC.js";import"./chunk-W4YDSTXA.js";import"./chunk-5BU3CD2P.js";import"./chunk-ER46UFIU.js";import"./chunk-JXAAON7I.js";import"./chunk-H2O4CVKF.js";import"./chunk-P37U34EQ.js";export{a as RadioGroupFieldDefault};
|
|
2
|
+
//# sourceMappingURL=RadioGroupFieldDefault-L3CZN2ZT.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-OSHTXKLJ.js";import"./chunk-C7GJUNNC.js";import"./chunk-W4YDSTXA.js";import"./chunk-5BU3CD2P.js";import"./chunk-ER46UFIU.js";import"./chunk-JXAAON7I.js";import"./chunk-H2O4CVKF.js";import"./chunk-P37U34EQ.js";export{a as TextAreaFieldDefault};
|
|
2
|
+
//# sourceMappingURL=TextAreaFieldDefault-YKBNDA4U.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as p}from"./chunk-QHZPSH52.js";import{C as c,J as m,N as C,S as d,m as l,v as u}from"./chunk-ER46UFIU.js";import{e as i}from"./chunk-H2O4CVKF.js";import{a as t}from"./chunk-P37U34EQ.js";import{useMutation as n,useQuery as r}from"@tanstack/react-query";var q=t(({includePremiumBenefits:e})=>{let{client:o}=i();return r({queryKey:["cost-calculator-countries",e],queryFn:t(()=>c({client:o,query:{include_premium_benefits:e}}),"queryFn"),select:t(a=>a.data?.data.filter(s=>s.availability==="active").map(s=>({value:s.region_slug,label:s.name,childRegions:s.child_regions,hasAdditionalFields:s.has_additional_fields,regionSlug:s.region_slug,currency:s.currency.code})),"select")})},"useCostCalculatorCountries"),P=t(()=>{let{client:e}=i();return r({queryKey:["company-currencies"],queryFn:t(()=>d({client:e}),"queryFn"),select:t(o=>o.data?.data?.company_currencies.map(a=>({value:a.slug,label:a.code})),"select")})},"useCompanyCurrencies"),h=t(()=>{let{client:e}=i();return n({mutationFn:t(o=>l({client:e,body:o}),"mutationFn")})},"useCostCalculatorEstimation"),v=t(()=>{let{client:e}=i();return n({mutationFn:t(o=>u({client:e,body:o}),"mutationFn")})},"useCostCalculatorEstimationPdf"),x=t(()=>{let{client:e}=i();return n({mutationFn:t(o=>C({client:e,body:o}),"mutationFn")})},"useCostCalculatorEstimationCsv"),V=t((e,{includePremiumBenefits:o,options:a})=>{let{client:s}=i();return r({queryKey:["cost-calculator-region-fields",e,o],queryFn:t(()=>m({client:s,path:{slug:e},query:{include_premium_benefits:o}}),"queryFn"),enabled:!!e,select:t(({data:f})=>{let y=f?.data?.schema||{};return p(y,void 0,a)},"select")})},"useRegionFields");export{q as a,P as b,h as c,v as d,x as e,V as f};
|
|
2
|
+
//# sourceMappingURL=chunk-2HREQZP4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/flows/CostCalculator/api.ts"],"sourcesContent":["import { createHeadlessForm } from '@/src/common/createHeadlessForm';\nimport {\n CostCalculatorEstimateParams,\n getV1CompanyCurrencies,\n getV1CostCalculatorCountries,\n getV1CostCalculatorRegionsSlugFields,\n postV1CostCalculatorEstimation,\n postV1CostCalculatorEstimationCsv,\n postV1CostCalculatorEstimationPdf,\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 getV1CostCalculatorCountries({\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 getV1CompanyCurrencies({\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 postV1CostCalculatorEstimation({\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 postV1CostCalculatorEstimationPdf({\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 postV1CostCalculatorEstimationCsv({\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 getV1CostCalculatorRegionsSlugFields({\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,EAA6B,CAClC,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,EAAuB,CAC5B,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,EAA+B,CACpC,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,EAAkC,CACvC,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,EAAkC,CACvC,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,EAAqC,CAC1C,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","getV1CostCalculatorCountries","data","country","useCompanyCurrencies","getV1CompanyCurrencies","currency","useCostCalculatorEstimation","useMutation","payload","postV1CostCalculatorEstimation","useCostCalculatorEstimationPdf","postV1CostCalculatorEstimationPdf","useCostCalculatorEstimationCsv","postV1CostCalculatorEstimationCsv","useRegionFields","region","options","getV1CostCalculatorRegionsSlugFields","jsfSchema","createHeadlessForm"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n,b as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n,b as i}from"./chunk-W4YDSTXA.js";import{n as e}from"./chunk-JXAAON7I.js";import{a as o}from"./chunk-P37U34EQ.js";import{Fragment as s,jsx as t,jsxs as r}from"react/jsx-runtime";var l=["You submit your termination request.","Remote reviews your request along with the employment agreement, local labor laws, and any collective bargaining agreements in place.","A lifecycle specialist contacts you if they need additional details. Sometimes they will request a call.","Depending on the country-specific laws and the terms of the employment agreement, Remote may need to seek additional legal advice. We\u2019ll let you know if there are additional charges before proceeding.","Terms and conditions for the termination are finalized.","You verbally communicate the termination to the employee.","Remote shares termination documents with the employee.","The employee signs the termination documents if required.","Remote processes the final salary and offboards the employee."],f=o(()=>r(s,{children:[t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__Title"),children:"Please read carefully before you continue"}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description"),children:"Please do not inform the employee of the termination. Remote will lead communication with them after you submit this form and they finalize the termination terms."}),t("p",{className:e("RemoteFlows__TerminationDialogInfoContent__Description RemoteFlows__TerminationDialogInfoContent__FollowUpDescription"),children:"If you already informed them, that's okay. Remote will ask for the details regarding that communication and they'll take it from there."}),t(i,{className:e("RemoteFlows__TerminationDialogInfoContent__ZendeskTriggerButton text-sm"),zendeskId:n.terminationEmployeeCommunication,children:"Learn more about employee communication"}),t("h3",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessTitle"),children:"The termination process"}),t("ul",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessList list-disc list-inside"),children:l.map((a,m)=>t("li",{className:e("RemoteFlows__TerminationDialogInfoContent__ProcessListItem"),children:a},m))})]}),"TerminationDialogInfoContent");export{f as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2IIHA7AA.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-DZJDM6PM.js";import{b as e}from"./chunk-MRYRNB7Y.js";import{a as m}from"./chunk-P37U34EQ.js";import{jsx as u}from"react/jsx-runtime";function p({onSubmit:n}){let{terminationBag:o}=e(),a=m(async t=>{let r=await o?.parseFormValues(t);await n?.(r),o?.next()},"handleSubmit");return u(i,{defaultValues:o.fieldValues,onSubmit:a})}m(p,"EmployeeCommunicationForm");export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-35LCD6VA.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-DILDN6DN.js";import{b as a}from"./chunk-PGWKJ6FK.js";import{c as s,i as t}from"./chunk-JXAAON7I.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function P({components:d,onSubmit:l,onError:i,onSuccess:f}){let{onboardingBag:o}=a(),p=o.fields??[],c=t(p,o.initialValues.benefits);return E(m,{defaultValues:c,components:d,onSubmit:e(async n=>{try{await l?.(n);let r=await o.onSubmit(n);if(r?.data){await f?.(r.data),o?.next();return}if(r?.error){let u=s(r?.fieldErrors||[],o.meta?.fields?.benefits);i?.({error:r.error,rawError:r.rawError,fieldErrors:u})}}catch(r){i?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit")})}e(P,"BenefitsStep");export{P as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3I4I7VH6.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-YLAJZTKB.js";import{b as n}from"./chunk-Q3ALCPJN.js";import{x as i}from"./chunk-JXAAON7I.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as c}from"react/jsx-runtime";function F({onSubmit:m,onSuccess:d,onError:p}){let{contractorOnboardingBag:r}=n(),l=t(async(a,v)=>{try{let e=await r.parseFormValues(a);await m?.(e);let o=await r.onSubmit(a);if(o?.data){await d?.(o?.data),r?.next();return}}catch(e){let o=i(e,r.meta?.fields?.contract_preview,v);p?.(o)}},"handleSubmit"),u=r.stepState.values?.contract_preview||r.initialValues.contract_preview;return c("div",{className:"space-y-4",children:c(s,{defaultValues:u,onSubmit:l})})}t(F,"ContractPreviewStep");export{F as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3M4RT5QK.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as R,b as x,c as N,d as A}from"./chunk-UBIW2GE4.js";import{a as C}from"./chunk-ZE37CBDF.js";import{b as B}from"./chunk-R4TTPUH7.js";import{a as w,b as f}from"./chunk-SFW4O42J.js";import{n as i,o as t,r as F}from"./chunk-JXAAON7I.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,{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,{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-UBIW2GE4.js";import{a as C}from"./chunk-ZE37CBDF.js";import{b as B}from"./chunk-R4TTPUH7.js";import{a as w,b as f}from"./chunk-W4YDSTXA.js";import{n as i,o as t,r as F}from"./chunk-JXAAON7I.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,{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,{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-3PKL3V6F.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"./chunk-OO3VBBVN.js";import{a as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d}from"./chunk-OO3VBBVN.js";import{a as c}from"./chunk-YLAJZTKB.js";import{b as s}from"./chunk-Q3ALCPJN.js";import{c as l}from"./chunk-OJMB3357.js";import{x as n}from"./chunk-JXAAON7I.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as m,jsxs as g}from"react/jsx-runtime";function x({onSubmit:p,onSuccess:u,onError:S}){let{contractorOnboardingBag:r}=s(),f=a(async(e,F)=>{try{let t=await r.parseFormValues(e);await p?.(t);let o=await r.onSubmit(e);if(o?.data){await u?.(o?.data),r?.next();return}}catch(t){let o=n(t,r.meta?.fields?.contract_details,F);S?.(o)}},"handleSubmit"),C=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:C,onSubmit:f}),b&&m(d,{subscription:i})]})}a(x,"ContractDetailsStep");export{x as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4LF5J3KW.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-PURTKT5Q.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-4ZA3PGCP.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-EJWKMMZV.js";import{a as r}from"./chunk-QXQYT7IC.js";import{a}from"./chunk-H66IKMI4.js";import{a as c}from"./chunk-FTRPPW6E.js";import{a as e}from"./chunk-SWCZJY6I.js";import{a as o}from"./chunk-TVZAFTPT.js";import{a as n}from"./chunk-P37U34EQ.js";import{useId as f}from"react";import{jsx as s}from"react/jsx-runtime";function k({employmentId:d,countryCode:C,options:p,render:A}){let t=c({employmentId:d,countryCode:C,options:p}),i=f();return s(o.Provider,{value:{formId:i,contractAmendmentBag:t},children:A({contractAmendmentBag:t,components:{Form:r,SubmitButton:a,ConfirmationForm:m,BackButton:e}})})}n(k,"ContractAmendmentFlow");export{k as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5CFXZWQ5.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as F}from"./chunk-LDI7E3ZK.js";import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as F}from"./chunk-LDI7E3ZK.js";import{a as u}from"./chunk-C7GJUNNC.js";import{j as p,k as l,l as i,n as a,o as c}from"./chunk-5BU3CD2P.js";import{a as m}from"./chunk-P37U34EQ.js";import{useEffect as $,useState as v}from"react";import{jsx as n,jsxs as C}from"react/jsx-runtime";function L({field:t,fieldState:b,fieldData:o}){let[g,s]=v([]),_=m(e=>{let r=e.map(({value:S})=>S);t.onChange(r),s(e)},"handleChange");$(()=>{t.value&&o.options&&s(t.value.map(e=>o?.options?.find(r=>r.value===e)))},[t.value,o.options]);let y=[...Object.entries(o.$meta?.regions||{}).map(([e,r])=>({value:r,label:e,category:"Regions"})),...Object.entries(o.$meta?.subregions||{}).map(([e,r])=>({value:r,label:e,category:"Subregions"})),...o.options?.map(e=>({...e,value:e.value,label:e.label,category:"Countries"}))||[]];return C(p,{"data-field":t.name,className:`RemoteFlows__CountryField__Item__${t.name}`,children:[n(l,{className:"RemoteFlows__CountryField__Label",children:o.label}),n(i,{children:n(F,{options:y,selected:g,onChange:_})}),o.description&&C(a,{children:[o.description," ",n(u,{helpCenter:o.meta?.helpCenter})]}),b.error&&n(c,{})]})}m(L,"CountryFieldDefault");export{L as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5FHNCDLU.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as Qe}from"./chunk-VAIBLWOY.js";import{a as ze}from"./chunk-LK3FPLM5.js";import{a as We}from"./chunk-RWXZG4KO.js";import{a as Ae,b as Be,c as je,f as qe,g as ke,h as Ne,i as Je,j as Te,k as Ie,l as Ke,n as Ue,o as He,p as Ge}from"./chunk-MCXUBLTV.js";import{a as De,b as Pe,c as we,e as Le,f as Re}from"./chunk-TVBZT6FA.js";import{b as w,h as b,i as L,k as Y,u as h}from"./chunk-JXAAON7I.js";import{a as $e}from"./chunk-JDIKYCN6.js";import{a as s}from"./chunk-P37U34EQ.js";import{useCallback as Nt,useEffect as tt,useMemo as f,useRef as Jt,useState as Z}from"react";import Tt from"lodash.mergewith";import{createContext as Lt,useContext as Rt,useMemo as At,useCallback as Bt,useRef as jt}from"react";import{jsx as qt}from"react/jsx-runtime";var Xe=Lt(void 0);function $t({children:o}){let p=jt({}),m=Bt(a=>{p.current={...p.current,...a}},[]),x=At(()=>({errorContextRef:p,updateContext:m}),[m]);return qt(Xe.Provider,{value:x,children:o})}s($t,"ErrorContextProvider");var Ye=s(()=>{let o=Rt(Xe);if(!o)throw new Error("useErrorContext must be used within ErrorContextProvider");return o},"useErrorContext");import{useEffect as Ze,useMemo as kt}from"react";function et(o){let{updateContext:p,errorContextRef:m}=Ye();return Ze(()=>{o&&(m.current=o)},[]),Ze(()=>()=>{m.current={}},[m]),{...kt(()=>({updateErrorContext:s(a=>{p(a)},"updateErrorContext"),clearErrorContext:s(()=>{m.current={}},"clearErrorContext")}),[]),errorContext:m}}s(et,"useErrorReporting");import{jsx as nt}from"react/jsx-runtime";var It={employment_basic_information:"basic_information",contract_details:"contract_details"},Kt={select_country:null,basic_information:"employment_basic_information",engagement_agreement_details:null,contract_details:"contract_details",benefits:null,review:null},Ut=s(({isLoadingBasicInformationForm:o,isLoadingContractDetailsForm:p,isLoadingEngagementAgreementDetails:m,isLoadingEmploymentEngagementAgreementDetails:x,isLoadingEmployment:a,isLoadingBenefitsOffersSchema:q,isLoadingBenefitOffers:R,isLoadingCompany:c,isLoadingCountries:k,employmentStatus:r,employmentId:H,currentStepName:i,basicInformationFields:N,contractDetailsFields:V})=>{let J=o||p||m||x||a||q||R||c||k,A=r&&Pe.includes(r),G=r&&!we.includes(r),T=!!(H&&A&&i!=="review"),W=J||T,y=!!(T&&!J&&N.length>0&&V.length>0);return{isLoading:W,isNavigatingToReview:y,isEmploymentReadOnly:A,canInvite:G}},"getLoadingStates"),_n=s(({employmentId:o,companyId:p,countryCode:m,type:x,options:a,skipSteps:q,externalId:R,initialValues:c})=>{let{updateErrorContext:k}=et({flow:"onboarding",metadata:{employmentId:o,companyId:p,isUpdating:!!o}}),[r,H]=Z(o),[i,N]=Z(m||null),[V,J]=Z(!1),A=a?.features?.includes("dynamic_steps")??!1,{steps:G,stepsArray:T}=f(()=>De({includeSelectCountry:!q?.includes("select_country"),includeEngagementAgreementDetails:V,useDynamicSteps:A}),[V,q,A]),W=Nt(e=>{k({step:e.name})},[k]),{fieldValues:y,stepState:t,setFieldValues:at,previousStep:rt,nextStep:st,goToStep:$,setStepValues:ee}=$e(G,W),{data:I,isLoading:te}=je(r,{enabled:!!(r&&a?.features?.includes("dynamic_steps"))}),ot=f(()=>({...c,...I,...t.values?.engagement_agreement_details,...y}),[I,c,t.values?.engagement_agreement_details,y]),{data:d,isLoading:ne}=Ge(i,ot,{jsfModify:a?.jsfModify,queryOptions:{enabled:!!(i&&a?.features?.includes("dynamic_steps"))}});tt(()=>{let e=!!(d?.fields&&d.fields.length>0);e!==V&&J(e)},[d?.fields,V]);let K=Jt({select_country:{},basic_information:{},contract_details:{},benefits:{},engagement_agreement_details:{}}),{data:g,isLoading:ae,refetch:it}=We({employmentId:r,queryParams:{exclude_files:!0}});o&&g?.country?.code&&!i&&N(g.country.code);let{data:re,isLoading:se}=Be(r),{data:U,isLoading:oe,refetch:lt}=Ae(p),ct=a?.features?.includes("onboarding_reserves")&&t.currentStep.name==="review"||!1,{data:mt}=He(p,r,ct),{selectCountryForm:B,isLoading:ie}=Ke({jsfModify:a?.jsfModify?.select_country,queryOptions:{enabled:t.currentStep.name==="select_country"}}),le=Ne(a),ce=Je(i,a),me=Ie(a),de=Te(),ue=Ue(),{mutateAsync:dt}=w(le),{mutateAsync:fe}=w(ce),{mutateAsync:ut}=w(me),{mutateAsync:ft}=w(de),{mutateAsync:pt}=w(ue),yt=Kt[t.currentStep.name]||"employment_basic_information",gt=It[yt],_t=g?.[gt]||{},pe=s(({form:e,options:l={},query:u={},jsonSchemaVersion:P})=>{let Q=Object.keys(y).length>0?{...c,...t.values?.[t.currentStep.name],...y}:{...c,..._t};return qe({countryCode:i,form:e,fieldValues:Q,query:u,options:{...l,queryOptions:{enabled:l.queryOptions?.enabled??!0}},jsonSchemaVersion:P})},"useJSONSchema"),St=!!(i&&(t.currentStep.name==="basic_information"||o)),bt=!!(i&&(t.currentStep.name==="contract_details"||o)),{data:_,isLoading:ye}=pe({form:"employment_basic_information",options:{jsfModify:a?.jsfModify?.basic_information,queryOptions:{enabled:St}},jsonSchemaVersion:Re(a)}),M=a?.jsfModify?.contract_details?.fields?.annual_gross_salary,z=M&&typeof M=="object"&&"presentation"in M?M.presentation:void 0,ge=a?.jsfModify?.contract_details?.fields?.equity_compensation,Et=f(()=>({fields:{annual_gross_salary:{...M,presentation:{annual_gross_salary_conversion_properties:{label:z?.annual_gross_salary_conversion_properties?.label,description:z?.annual_gross_salary_conversion_properties?.description},desiredCurrency:U?.desired_currency,Component:s(e=>nt(ze,{desiredCurrency:U?.desired_currency||"",...e}),"Component")}},equity_compensation:{...ge,presentation:{calculateDynamicProperties:s((e,l)=>{let u=e.equity_compensation?.offer_equity_compensation,P=l?.meta?.cost;return{extra:nt(Qe,{offerEquity:u,equityCost:P})}},"calculateDynamicProperties")}}}}),[M,z,U?.desired_currency,ge]),Ct=Le(a,i),{data:S,isLoading:_e}=pe({form:"contract_details",query:{employment_id:r},options:{jsfModify:{...a?.jsfModify?.contract_details,fields:{...a?.jsfModify?.contract_details?.fields,...Et.fields}},queryOptions:{enabled:bt}},jsonSchemaVersion:Ct}),{data:E,isLoading:Se}=ke(r,y,a),be=f(()=>{if(t.currentStep.name==="benefits"){let e={...t.values?.[t.currentStep.name],...y};return Tt({},re,e)}return{}},[t.currentStep.name,re,t.values,y]),n=f(()=>({select_country:B?.fields||[],basic_information:_?.fields||[],engagement_agreement_details:d?.fields||[],contract_details:S?.fields||[],benefits:E?.fields||[],review:[]}),[B?.fields,_?.fields,S?.fields,E?.fields,d?.fields]),Ft={select_country:null,basic_information:_?.meta["x-jsf-fieldsets"],engagement_agreement_details:d?.meta["x-jsf-fieldsets"],contract_details:S?.meta["x-jsf-fieldsets"],benefits:null,review:null},ht={select_country:B?.meta?.["x-jsf-presentation"],basic_information:_?.meta?.["x-jsf-presentation"],engagement_agreement_details:d?.meta?.["x-jsf-presentation"],contract_details:S?.meta?.["x-jsf-presentation"],benefits:E?.meta?.["x-jsf-presentation"],review:null},{country:Ee,basic_information:Ce={},contract_details:Fe={},status:he}=g||{},xe=Ee?.code,Ve=t.currentStep.name,v=f(()=>L(n.select_country,{country:i||xe||""}),[n.select_country,i,xe]),O=f(()=>{let e={...c,...Ce};return L(n.basic_information,e)},[n.basic_information,Ce,c]),j=f(()=>{let e={...c,...I};return L(n.engagement_agreement_details,e)},[n.engagement_agreement_details,c,I]),F=f(()=>{let e={...c,...Fe};return L(n.contract_details,e)},[n.contract_details,Fe,c]),D=f(()=>{let e={...c,...be};return L(n.benefits,e)},[n.benefits,be,c]),xt=f(()=>g?{select_country:v,basic_information:Y(n.basic_information,O),engagement_agreement_details:j,contract_details:g?.contract_details!==null?Y(n.contract_details,F):F,benefits:D}:{select_country:v,basic_information:O,contract_details:F,benefits:D},[v,O,j,F,D,g,n]),{isLoading:Vt,isNavigatingToReview:Me,isEmploymentReadOnly:Mt,canInvite:vt}=f(()=>Ut({isLoadingBasicInformationForm:ye,isLoadingContractDetailsForm:_e,isLoadingEngagementAgreementDetails:ne,isLoadingEmploymentEngagementAgreementDetails:te,isLoadingEmployment:ae,isLoadingBenefitsOffersSchema:Se,isLoadingBenefitOffers:se,isLoadingCompany:oe,isLoadingCountries:ie,employmentId:o,employmentStatus:he,basicInformationFields:n.basic_information,contractDetailsFields:n.contract_details,currentStepName:Ve}),[ye,_e,ne,te,ae,Se,se,oe,ie,o,he,n.basic_information,n.contract_details,Ve]);tt(()=>{Me&&(K.current={select_country:h(v,n.select_country,{skipMoneyConversion:!0}),basic_information:h(O,n.basic_information,{skipMoneyConversion:!0}),engagement_agreement_details:h(j,n.engagement_agreement_details,{skipMoneyConversion:!0}),contract_details:h(F,n.contract_details,{skipMoneyConversion:!0}),benefits:h(D,n.benefits,{skipMoneyConversion:!0})},ee({select_country:v,basic_information:O,contract_details:F,benefits:D,engagement_agreement_details:j,review:{}}),$("review"))},[O,D,F,j,$,Me,v,ee,n.basic_information,n.benefits,n.contract_details,n.select_country,n.engagement_agreement_details]);let ve=s(async e=>B&&t.currentStep.name==="select_country"?e:_&&t.currentStep.name==="basic_information"?await b(e,_?.fields,{isPartialValidation:!1}):d&&t.currentStep.name==="engagement_agreement_details"?await b(e,d?.fields,{isPartialValidation:!1}):S&&t.currentStep.name==="contract_details"?await b(e,S?.fields,{isPartialValidation:!1}):E&&t.currentStep.name==="benefits"?await b(e,E?.fields,{isPartialValidation:!1}):{},"parseFormValues");async function Ot(e){let l=t.currentStep.name,u=await ve(e);switch(l in K.current&&(K.current[l]=h(u,n[l])),lt(),t.currentStep.name){case"select_country":return N(u.country),Promise.resolve({data:{countryCode:u.country}});case"basic_information":{let P=!r&&i,Oe=r&&i&&g?.country&&g?.country.code!==i;if(P||Oe){let Q={basic_information:u,type:x,country_code:i,external_id:R};try{let C=await dt(Q);if(C.error)return C;if(C.data){let X=C.data?.data?.employment?.id;return X&&(H(X),await pt({employmentId:X,eligible_to_work_in_residing_country:"citizen",employer_or_work_restrictions:!1})),C}}catch(C){throw console.error("Error creating onboarding:",C),C}}else if(r)return fe({employmentId:r,basic_information:u,pricing_plan_details:{frequency:"monthly"},external_id:R});return}case"engagement_agreement_details":return ft({employmentId:r,engagement_agreement_details:u});case"contract_details":return fe({employmentId:r,external_id:R,...{contract_details:u,pricing_plan_details:{frequency:"monthly"}}});case"benefits":return ut({employmentId:r,...u})}}s(Ot,"onSubmit");function Dt(){rt()}s(Dt,"back");function Pt(){st()}s(Pt,"next");function wt(e){$(e)}return s(wt,"goTo"),{employmentId:r,creditRiskStatus:U?.default_legal_entity_credit_risk_status,onboardingReservesStatus:mt,fieldValues:y,stepState:t,fields:n[t.currentStep.name],isLoading:Vt,isSubmitting:le.isPending||ce.isPending||me.isPending||de.isPending||ue.isPending,initialValues:xt,handleValidation:s(async e=>{if(t.currentStep.name==="select_country")return B.handleValidation(e);if(t.currentStep.name==="benefits"&&E){let l=await b(e,E?.fields,{isPartialValidation:!1});return E?.handleValidation(l)}if(_&&t.currentStep.name==="basic_information"){let l=await b(e,_?.fields,{isPartialValidation:!1});return _?.handleValidation(l)}if(d&&t.currentStep.name==="engagement_agreement_details"){let l=await b(e,d?.fields,{isPartialValidation:!1});return d?.handleValidation(l)}if(S&&t.currentStep.name==="contract_details"){let l=await b(e,S?.fields,{isPartialValidation:!1});return S?.handleValidation(l)}return null},"handleValidation"),checkFieldUpdates:at,parseFormValues:ve,onSubmit:Ot,back:Dt,next:Pt,goTo:wt,meta:{fields:K.current,fieldsets:Ft[t.currentStep.name],presentation:ht[t.currentStep.name]},refetchEmployment:it,employment:g,isEmploymentReadOnly:Mt,canInvite:vt,steps:T,selectedCountry:i?{code:i,name:Ee?.name}:null}},"useOnboarding");export{Xe as a,$t as b,_n as c};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as Qe}from"./chunk-VAIBLWOY.js";import{a as ze}from"./chunk-4ZA3PGCP.js";import{a as We}from"./chunk-Q65JWWKR.js";import{a as Ae,b as Be,c as je,f as qe,g as ke,h as Ne,i as Je,j as Te,k as Ie,l as Ke,n as Ue,o as He,p as Ge}from"./chunk-YHQYBVLS.js";import{a as De,b as Pe,c as we,e as Le,f as Re}from"./chunk-D6MFIXSJ.js";import{b as w,h as b,i as L,k as Y,u as h}from"./chunk-JXAAON7I.js";import{a as $e}from"./chunk-JDIKYCN6.js";import{a as s}from"./chunk-P37U34EQ.js";import{useCallback as Nt,useEffect as tt,useMemo as f,useRef as Jt,useState as Z}from"react";import Tt from"lodash.mergewith";import{createContext as Lt,useContext as Rt,useMemo as At,useCallback as Bt,useRef as jt}from"react";import{jsx as qt}from"react/jsx-runtime";var Xe=Lt(void 0);function $t({children:o}){let p=jt({}),m=Bt(a=>{p.current={...p.current,...a}},[]),x=At(()=>({errorContextRef:p,updateContext:m}),[m]);return qt(Xe.Provider,{value:x,children:o})}s($t,"ErrorContextProvider");var Ye=s(()=>{let o=Rt(Xe);if(!o)throw new Error("useErrorContext must be used within ErrorContextProvider");return o},"useErrorContext");import{useEffect as Ze,useMemo as kt}from"react";function et(o){let{updateContext:p,errorContextRef:m}=Ye();return Ze(()=>{o&&(m.current=o)},[]),Ze(()=>()=>{m.current={}},[m]),{...kt(()=>({updateErrorContext:s(a=>{p(a)},"updateErrorContext"),clearErrorContext:s(()=>{m.current={}},"clearErrorContext")}),[]),errorContext:m}}s(et,"useErrorReporting");import{jsx as nt}from"react/jsx-runtime";var It={employment_basic_information:"basic_information",contract_details:"contract_details"},Kt={select_country:null,basic_information:"employment_basic_information",engagement_agreement_details:null,contract_details:"contract_details",benefits:null,review:null},Ut=s(({isLoadingBasicInformationForm:o,isLoadingContractDetailsForm:p,isLoadingEngagementAgreementDetails:m,isLoadingEmploymentEngagementAgreementDetails:x,isLoadingEmployment:a,isLoadingBenefitsOffersSchema:q,isLoadingBenefitOffers:R,isLoadingCompany:c,isLoadingCountries:k,employmentStatus:r,employmentId:H,currentStepName:i,basicInformationFields:N,contractDetailsFields:V})=>{let J=o||p||m||x||a||q||R||c||k,A=r&&Pe.includes(r),G=r&&!we.includes(r),T=!!(H&&A&&i!=="review"),W=J||T,y=!!(T&&!J&&N.length>0&&V.length>0);return{isLoading:W,isNavigatingToReview:y,isEmploymentReadOnly:A,canInvite:G}},"getLoadingStates"),_n=s(({employmentId:o,companyId:p,countryCode:m,type:x,options:a,skipSteps:q,externalId:R,initialValues:c})=>{let{updateErrorContext:k}=et({flow:"onboarding",metadata:{employmentId:o,companyId:p,isUpdating:!!o}}),[r,H]=Z(o),[i,N]=Z(m||null),[V,J]=Z(!1),A=a?.features?.includes("dynamic_steps")??!1,{steps:G,stepsArray:T}=f(()=>De({includeSelectCountry:!q?.includes("select_country"),includeEngagementAgreementDetails:V,useDynamicSteps:A}),[V,q,A]),W=Nt(e=>{k({step:e.name})},[k]),{fieldValues:y,stepState:t,setFieldValues:at,previousStep:rt,nextStep:st,goToStep:$,setStepValues:ee}=$e(G,W),{data:I,isLoading:te}=je(r,{enabled:!!(r&&a?.features?.includes("dynamic_steps"))}),ot=f(()=>({...c,...I,...t.values?.engagement_agreement_details,...y}),[I,c,t.values?.engagement_agreement_details,y]),{data:d,isLoading:ne}=Ge(i,ot,{jsfModify:a?.jsfModify,queryOptions:{enabled:!!(i&&a?.features?.includes("dynamic_steps"))}});tt(()=>{let e=!!(d?.fields&&d.fields.length>0);e!==V&&J(e)},[d?.fields,V]);let K=Jt({select_country:{},basic_information:{},contract_details:{},benefits:{},engagement_agreement_details:{}}),{data:g,isLoading:ae,refetch:it}=We({employmentId:r,queryParams:{exclude_files:!0}});o&&g?.country?.code&&!i&&N(g.country.code);let{data:re,isLoading:se}=Be(r),{data:U,isLoading:oe,refetch:lt}=Ae(p),ct=a?.features?.includes("onboarding_reserves")&&t.currentStep.name==="review"||!1,{data:mt}=He(p,r,ct),{selectCountryForm:B,isLoading:ie}=Ke({jsfModify:a?.jsfModify?.select_country,queryOptions:{enabled:t.currentStep.name==="select_country"}}),le=Ne(a),ce=Je(i,a),me=Ie(a),de=Te(),ue=Ue(),{mutateAsync:dt}=w(le),{mutateAsync:fe}=w(ce),{mutateAsync:ut}=w(me),{mutateAsync:ft}=w(de),{mutateAsync:pt}=w(ue),yt=Kt[t.currentStep.name]||"employment_basic_information",gt=It[yt],_t=g?.[gt]||{},pe=s(({form:e,options:l={},query:u={},jsonSchemaVersion:P})=>{let Q=Object.keys(y).length>0?{...c,...t.values?.[t.currentStep.name],...y}:{...c,..._t};return qe({countryCode:i,form:e,fieldValues:Q,query:u,options:{...l,queryOptions:{enabled:l.queryOptions?.enabled??!0}},jsonSchemaVersion:P})},"useJSONSchema"),St=!!(i&&(t.currentStep.name==="basic_information"||o)),bt=!!(i&&(t.currentStep.name==="contract_details"||o)),{data:_,isLoading:ye}=pe({form:"employment_basic_information",options:{jsfModify:a?.jsfModify?.basic_information,queryOptions:{enabled:St}},jsonSchemaVersion:Re(a)}),M=a?.jsfModify?.contract_details?.fields?.annual_gross_salary,z=M&&typeof M=="object"&&"presentation"in M?M.presentation:void 0,ge=a?.jsfModify?.contract_details?.fields?.equity_compensation,Et=f(()=>({fields:{annual_gross_salary:{...M,presentation:{annual_gross_salary_conversion_properties:{label:z?.annual_gross_salary_conversion_properties?.label,description:z?.annual_gross_salary_conversion_properties?.description},desiredCurrency:U?.desired_currency,Component:s(e=>nt(ze,{desiredCurrency:U?.desired_currency||"",...e}),"Component")}},equity_compensation:{...ge,presentation:{calculateDynamicProperties:s((e,l)=>{let u=e.equity_compensation?.offer_equity_compensation,P=l?.meta?.cost;return{extra:nt(Qe,{offerEquity:u,equityCost:P})}},"calculateDynamicProperties")}}}}),[M,z,U?.desired_currency,ge]),Ct=Le(a,i),{data:S,isLoading:_e}=pe({form:"contract_details",query:{employment_id:r},options:{jsfModify:{...a?.jsfModify?.contract_details,fields:{...a?.jsfModify?.contract_details?.fields,...Et.fields}},queryOptions:{enabled:bt}},jsonSchemaVersion:Ct}),{data:E,isLoading:Se}=ke(r,y,a),be=f(()=>{if(t.currentStep.name==="benefits"){let e={...t.values?.[t.currentStep.name],...y};return Tt({},re,e)}return{}},[t.currentStep.name,re,t.values,y]),n=f(()=>({select_country:B?.fields||[],basic_information:_?.fields||[],engagement_agreement_details:d?.fields||[],contract_details:S?.fields||[],benefits:E?.fields||[],review:[]}),[B?.fields,_?.fields,S?.fields,E?.fields,d?.fields]),Ft={select_country:null,basic_information:_?.meta["x-jsf-fieldsets"],engagement_agreement_details:d?.meta["x-jsf-fieldsets"],contract_details:S?.meta["x-jsf-fieldsets"],benefits:null,review:null},ht={select_country:B?.meta?.["x-jsf-presentation"],basic_information:_?.meta?.["x-jsf-presentation"],engagement_agreement_details:d?.meta?.["x-jsf-presentation"],contract_details:S?.meta?.["x-jsf-presentation"],benefits:E?.meta?.["x-jsf-presentation"],review:null},{country:Ee,basic_information:Ce={},contract_details:Fe={},status:he}=g||{},xe=Ee?.code,Ve=t.currentStep.name,v=f(()=>L(n.select_country,{country:i||xe||""}),[n.select_country,i,xe]),O=f(()=>{let e={...c,...Ce};return L(n.basic_information,e)},[n.basic_information,Ce,c]),j=f(()=>{let e={...c,...I};return L(n.engagement_agreement_details,e)},[n.engagement_agreement_details,c,I]),F=f(()=>{let e={...c,...Fe};return L(n.contract_details,e)},[n.contract_details,Fe,c]),D=f(()=>{let e={...c,...be};return L(n.benefits,e)},[n.benefits,be,c]),xt=f(()=>g?{select_country:v,basic_information:Y(n.basic_information,O),engagement_agreement_details:j,contract_details:g?.contract_details!==null?Y(n.contract_details,F):F,benefits:D}:{select_country:v,basic_information:O,contract_details:F,benefits:D},[v,O,j,F,D,g,n]),{isLoading:Vt,isNavigatingToReview:Me,isEmploymentReadOnly:Mt,canInvite:vt}=f(()=>Ut({isLoadingBasicInformationForm:ye,isLoadingContractDetailsForm:_e,isLoadingEngagementAgreementDetails:ne,isLoadingEmploymentEngagementAgreementDetails:te,isLoadingEmployment:ae,isLoadingBenefitsOffersSchema:Se,isLoadingBenefitOffers:se,isLoadingCompany:oe,isLoadingCountries:ie,employmentId:o,employmentStatus:he,basicInformationFields:n.basic_information,contractDetailsFields:n.contract_details,currentStepName:Ve}),[ye,_e,ne,te,ae,Se,se,oe,ie,o,he,n.basic_information,n.contract_details,Ve]);tt(()=>{Me&&(K.current={select_country:h(v,n.select_country,{skipMoneyConversion:!0}),basic_information:h(O,n.basic_information,{skipMoneyConversion:!0}),engagement_agreement_details:h(j,n.engagement_agreement_details,{skipMoneyConversion:!0}),contract_details:h(F,n.contract_details,{skipMoneyConversion:!0}),benefits:h(D,n.benefits,{skipMoneyConversion:!0})},ee({select_country:v,basic_information:O,contract_details:F,benefits:D,engagement_agreement_details:j,review:{}}),$("review"))},[O,D,F,j,$,Me,v,ee,n.basic_information,n.benefits,n.contract_details,n.select_country,n.engagement_agreement_details]);let ve=s(async e=>B&&t.currentStep.name==="select_country"?e:_&&t.currentStep.name==="basic_information"?await b(e,_?.fields,{isPartialValidation:!1}):d&&t.currentStep.name==="engagement_agreement_details"?await b(e,d?.fields,{isPartialValidation:!1}):S&&t.currentStep.name==="contract_details"?await b(e,S?.fields,{isPartialValidation:!1}):E&&t.currentStep.name==="benefits"?await b(e,E?.fields,{isPartialValidation:!1}):{},"parseFormValues");async function Ot(e){let l=t.currentStep.name,u=await ve(e);switch(l in K.current&&(K.current[l]=h(u,n[l])),lt(),t.currentStep.name){case"select_country":return N(u.country),Promise.resolve({data:{countryCode:u.country}});case"basic_information":{let P=!r&&i,Oe=r&&i&&g?.country&&g?.country.code!==i;if(P||Oe){let Q={basic_information:u,type:x,country_code:i,external_id:R};try{let C=await dt(Q);if(C.error)return C;if(C.data){let X=C.data?.data?.employment?.id;return X&&(H(X),await pt({employmentId:X,eligible_to_work_in_residing_country:"citizen",employer_or_work_restrictions:!1})),C}}catch(C){throw console.error("Error creating onboarding:",C),C}}else if(r)return fe({employmentId:r,basic_information:u,pricing_plan_details:{frequency:"monthly"},external_id:R});return}case"engagement_agreement_details":return ft({employmentId:r,engagement_agreement_details:u});case"contract_details":return fe({employmentId:r,external_id:R,...{contract_details:u,pricing_plan_details:{frequency:"monthly"}}});case"benefits":return ut({employmentId:r,...u})}}s(Ot,"onSubmit");function Dt(){rt()}s(Dt,"back");function Pt(){st()}s(Pt,"next");function wt(e){$(e)}return s(wt,"goTo"),{employmentId:r,creditRiskStatus:U?.default_legal_entity_credit_risk_status,onboardingReservesStatus:mt,fieldValues:y,stepState:t,fields:n[t.currentStep.name],isLoading:Vt,isSubmitting:le.isPending||ce.isPending||me.isPending||de.isPending||ue.isPending,initialValues:xt,handleValidation:s(async e=>{if(t.currentStep.name==="select_country")return B.handleValidation(e);if(t.currentStep.name==="benefits"&&E){let l=await b(e,E?.fields,{isPartialValidation:!1});return E?.handleValidation(l)}if(_&&t.currentStep.name==="basic_information"){let l=await b(e,_?.fields,{isPartialValidation:!1});return _?.handleValidation(l)}if(d&&t.currentStep.name==="engagement_agreement_details"){let l=await b(e,d?.fields,{isPartialValidation:!1});return d?.handleValidation(l)}if(S&&t.currentStep.name==="contract_details"){let l=await b(e,S?.fields,{isPartialValidation:!1});return S?.handleValidation(l)}return null},"handleValidation"),checkFieldUpdates:at,parseFormValues:ve,onSubmit:Ot,back:Dt,next:Pt,goTo:wt,meta:{fields:K.current,fieldsets:Ft[t.currentStep.name],presentation:ht[t.currentStep.name]},refetchEmployment:it,employment:g,isEmploymentReadOnly:Mt,canInvite:vt,steps:T,selectedCountry:i?{code:i,name:Ee?.name}:null}},"useOnboarding");export{Xe as a,$t as b,_n as c};
|
|
2
|
+
//# sourceMappingURL=chunk-5IOV4ADT.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-DILDN6DN.js";import{b as s}from"./chunk-PGWKJ6FK.js";import{c as t}from"./chunk-JXAAON7I.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function b({onSubmit:d,onSuccess:l,onError:n}){let{onboardingBag:r}=s(),f=a(async e=>{try{let i=await r.parseFormValues(e);await d?.(i);let o=await r.onSubmit(e);if(o?.data){await l?.(o?.data),r?.next();return}if(o?.error){let c=t(o?.fieldErrors||[],r.meta?.fields?.basic_information);n?.({error:o?.error,rawError:o?.rawError,fieldErrors:c})}}catch(i){n?.({error:i,rawError:i,fieldErrors:[]})}},"handleSubmit"),p=r.stepState.values?.basic_information||r.initialValues.basic_information;return E(m,{defaultValues:p,onSubmit:f})}a(b,"BasicInformationStep");export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5JFH2KYZ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as y}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as y}from"./chunk-PURTKT5Q.js";import{a as l,b as m}from"./chunk-W4YDSTXA.js";import{c}from"./chunk-5BU3CD2P.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as N}from"react";import{Fragment as b,jsx as v,jsxs as C}from"react/jsx-runtime";var R=t(({currencies:{from:d,to:F},shouldSwapOrder:s,salary_conversion_properties:a,conversionType:_="no_spread",defaultValue:r,...e})=>{let{setValue:n,getValues:i}=c(),f={label:a?.label||"Salary conversion",description:a?.description||C(b,{children:["The conversion is based on the Remote FX rate."," ",v(m,{className:"text-sm",zendeskId:l.remoteFxRate,children:"Learn more \u2197"})]})},g=s?"salary_conversion":e.name,u=s?e.name:"salary_conversion";return N(()=>{if(s){let o=i(e.name);o?(n("salary_conversion",o),n("salary_converted","salary_conversion")):r&&(n("salary_conversion",r),n("salary_converted","salary_conversion"))}else{let o=i("salary_conversion");o?(n(e.name,o),n("salary_converted",e.name)):r&&(n(e.name,r),n("salary_converted",e.name))}},[s,r,n,i,e.name]),v(y,{...e,sourceCurrency:d,targetCurrency:F,mainFieldName:g,conversionFieldName:u,conversionProperties:f,classNamePrefix:"RemoteFlows-Salary",conversionType:_})},"SalaryField");export{R as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5TAAGXI6.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as y}from"./chunk-Q3ALCPJN.js";import{d as p,e as v}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as y}from"./chunk-Q3ALCPJN.js";import{d as p,e as v}from"./chunk-YHQYBVLS.js";import{b as n,w as u}from"./chunk-JXAAON7I.js";import{b as l}from"./chunk-H2O4CVKF.js";import{a as r}from"./chunk-P37U34EQ.js";import O from"lodash.omit";import{jsx as C}from"react/jsx-runtime";function T({onSubmit:f,onSuccess:i,onError:s,render:w,...o}){let{components:E}=l(),{contractorOnboardingBag:e}=y(),a=p(),m=v(),{mutateAsyncOrThrow:g}=n(a),{mutateAsyncOrThrow:I}=n(m),c=e.employment?.contractor_type==="cor"&&!e.isEmploymentReadOnly,R=r(async()=>{try{if(await f?.(),c&&e.employmentId){let t=await I({employment_slug:e.employmentId});if(t?.data){await i?.({data:t,employmentStatus:"created_awaiting_reserve"}),e.refetchEmployment();return}}else if(e.employmentId){let t=await g({employment_id:e.employmentId});t&&(await i?.({data:t,employmentStatus:"invited"}),e.refetchEmployment())}}catch(t){u(t)?s?.(O(t,"response")):s?.({error:t,rawError:t,fieldErrors:[]})}},"handleSubmit"),d=E?.button;if(!d)throw new Error("Button component not found");let b=a.isPending||m.isPending||!e.canInvite||o.disabled;return C(d,{...o,disabled:b,onClick:t=>{R(),o.onClick?.(t)},children:w({status:c?"create_reserve":"invite"})})}r(T,"OnboardingInvite");export{T as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6BTNYUKU.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as d,d as S}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as d,d as S}from"./chunk-JBX6GAPY.js";import{a as u}from"./chunk-HN5HLFTB.js";import{a as f}from"./chunk-KSHK3ZPX.js";import{b as C}from"./chunk-KFYWUBRS.js";import{f as y}from"./chunk-5BU3CD2P.js";import{a as o}from"./chunk-P37U34EQ.js";import{useEffect as T,useId as U,useState as I}from"react";import{jsx as k}from"react/jsx-runtime";var l=o((n,e,r)=>r&&r[e]?r[e]:n[e]?n[e]/100:0,"getDefaultManagementFee"),A=o((n,e,r,g)=>!e&&!r?.management_fee&&n?l(u,n,g):e&&!r?.management_fee?"":r?.management_fee,"getManagementFee"),W=o(({estimationOptions:n=d,defaultValues:e={countryRegionSlug:"",regionSlug:"",currencySlug:"",salary:"",benefits:{},management:{management_fee:""}},options:r,render:g,version:_="standard"})=>{let p=U(),[R,m]=I("USD"),F=o(s=>{m(s);let a=l(u,s,n.managementFees);a&&c.setValue("management.management_fee",a.toString())},"onCurrencyChange"),t=S({defaultRegion:e.countryRegionSlug,defaultCurrency:e.currencySlug,defaultSalary:e.salary,estimationOptions:n,version:_,options:{...r,onCurrencyChange:F}}),K=C(t.handleValidation),b=A(R,e.currencySlug,e.management,n.managementFees),{countryRegionSlug:v,currencySlug:h,salary:D,benefits:P,hiringBudget:B,age:E,contractDurationType:M,regionSlug:w,...x}=e,c=y({resolver:K,defaultValues:{country:v,currency:h,region:w,salary:D,salary_conversion:"",salary_converted:void 0,hiring_budget:B||"employee_annual_salary",age:E,contract_duration_type:M,management:{management_fee:b?.toString()||""},benefits:P,estimation_title:n.title,...x},shouldUnregister:!1,mode:"onBlur"});return T(()=>{if(e.currencySlug&&t.currencies&&n.includeManagementFee&&!e.management?.management_fee){let a=t.currencies.find(i=>i.value===e.currencySlug)?.label;if(a){m(a);let i=l(u,a,n.managementFees);c.setValue("management.management_fee",i?.toString()||"")}}},[e.currencySlug,t.currencies,n.includeManagementFee,n.managementFees,e.management?.management_fee,c]),k(f.Provider,{value:{form:c,formId:p,costCalculatorBag:t},children:g(t)})},"CostCalculatorFlow");export{W as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7N552DET.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-DZJDM6PM.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-AZSD5MTJ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as p}from"./chunk-IFIJ7OVJ.js";import{a}from"./chunk-LPXJW7UB.js";import{a as m}from"./chunk-BDDSSFUK.js";import{a as e}from"./chunk-76ZDXC2T.js";import{a as r}from"./chunk-N5DHVRQR.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-B4JJN54S.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-KEMKRC6N.js";import{b as m}from"./chunk-76ZDXC2T.js";import{x as i}from"./chunk-JXAAON7I.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-BDDSSFUK.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as o}from"./chunk-W4YDSTXA.js";import{a as r}from"./chunk-P37U34EQ.js";import{jsx as n}from"react/jsx-runtime";function i({helpCenter:e,className:t}){return!e||!e.id||!e.callToAction?null:n(o,{zendeskId:e.id,className:t,children:e.callToAction})}r(i,"HelpCenter");export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-C7GJUNNC.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-DXKUARQF.js";import{a as k}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-DXKUARQF.js";import{a as k}from"./chunk-C7GJUNNC.js";import{j as p,k as a,l as d,n as i,o as u}from"./chunk-5BU3CD2P.js";import{n as _}from"./chunk-JXAAON7I.js";import{a as F}from"./chunk-P37U34EQ.js";import{Fragment as x,jsx as e,jsxs as r}from"react/jsx-runtime";var w=F(({field:l,fieldState:b,fieldData:s})=>{let{name:m,label:n,description:C,options:t,multiple:h}=s;return r(p,{"data-field":m,className:_(`RemoteFlows__CheckBoxField__Item__${m}`),children:[e(d,{children:r(x,{children:[t&&h?e(a,{children:n}):null,t&&h?t.map(o=>r("div",{className:"flex space-x-2",children:[e(c,{id:o.value,onCheckedChange:v=>{l.onChange(v===!0,o.value)},checked:l.value?.includes(o.value),className:"RemoteFlows__CheckBox__Input"}),e(a,{htmlFor:o.value,className:"mb-0 RemoteFlows__CheckBox__Label",children:o.label})]},o.value)):r("div",{className:"flex space-x-2",children:[e(c,{id:m,onCheckedChange:o=>{l.onChange(o===!0,null)},checked:l.value,className:"RemoteFlows__CheckBox__Input"}),e(a,{htmlFor:m,className:"mb-0 RemoteFlows__CheckBox__Label",children:n})]})]})}),C&&e(i,{helpCenter:e(k,{helpCenter:s.meta?.helpCenter}),children:C}),b.error&&e(u,{})]})},"CheckboxFieldDefault");export{w as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CFCUY6VA.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as F,b as P,c as k}from"./chunk-IX5SV6J2.js";import{a as w}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as F,b as P,c as k}from"./chunk-IX5SV6J2.js";import{a as w}from"./chunk-C7GJUNNC.js";import{a as c,b as C}from"./chunk-R4TTPUH7.js";import{j as h,k as x,l as v,n as b,o as D}from"./chunk-5BU3CD2P.js";import{n as t}from"./chunk-JXAAON7I.js";import{a as n}from"./chunk-P37U34EQ.js";import{CalendarIcon as V}from"lucide-react";import{format as R}from"date-fns";import{ChevronLeft as z,ChevronRight as L}from"lucide-react";import{DayPicker as O}from"react-day-picker";import{jsx as p}from"react/jsx-runtime";function N({className:r,classNames:i,showOutsideDays:m=!0,...a}){return p(O,{showOutsideDays:m,className:t("p-3",r),classNames:{months:"flex flex-col sm:flex-row gap-2",month:"flex flex-col gap-4",caption:"flex justify-center pt-1 relative items-center w-full",caption_label:"text-sm font-medium",nav:"flex items-center gap-1",nav_button:t(c({variant:"outline"}),"size-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-x-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:t("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-range-end)]:rounded-r-md",a.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:t(c({variant:"ghost"}),"size-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start aria-selected:bg-primary aria-selected:text-primary-foreground",day_range_end:"day-range-end aria-selected:bg-primary aria-selected:text-primary-foreground",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...i},components:{IconLeft:n(({className:l,...o})=>p(z,{className:t("size-4",l),...o}),"IconLeft"),IconRight:n(({className:l,...o})=>p(L,{className:t("size-4",l),...o}),"IconRight")},...a})}n(N,"Calendar");import{useState as B}from"react";import{Fragment as T,jsx as e,jsxs as u}from"react/jsx-runtime";function ee({field:r,fieldData:i,fieldState:m}){let{name:a,label:l,description:o,minDate:f,maxDate:g}=i,s=f?new Date(f):void 0,y=g?new Date(g):void 0,[I,_]=B(!1);return u(h,{"data-field":a,className:`flex flex-col RemoteFlows__DatePickerField__Item__${a}`,children:[e(x,{className:"RemoteFlows__DatePickerField__Label",children:l}),u(F,{open:I,onOpenChange:_,children:[e(P,{asChild:!0,children:e(v,{children:e("div",{children:u(C,{type:"button",variant:"outline",className:t("w-full pl-3 text-left font-normal",!r.value&&"text-muted-foreground"),"data-testid":`date-picker-button-${a}`,children:[r.value&&e(T,{children:R(r.value,"yyyy-MM-dd")}),e(V,{className:"ml-auto h-4 w-4 opacity-50"})]})})})}),e(k,{className:"w-auto p-0 RemoteFlows__DatepickerField__PopoverContent",align:"start",children:e(N,{mode:"single",className:"RemoteFlows__DatepickerField__Calendar",selected:r.value?new Date(r.value):void 0,onDayClick:d=>{let M=R(d,"yyyy-MM-dd");r.onChange(M),_(!1)},defaultMonth:s,disabled:d=>!!(s&&d<s||y&&d>y)})})]}),o?e(b,{helpCenter:e(w,{helpCenter:i.meta?.helpCenter}),children:o}):null,m.error&&e(D,{className:"RemoteFlows__DatePickerField__Error"})]})}n(ee,"DatePickerFieldDefault");export{ee as a};
|
|
2
|
+
//# sourceMappingURL=chunk-CMPHQVJ3.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-P37U34EQ.js";function m(t={}){let o=[{name:"select_country",label:"Select Country",visible:!!t?.includeSelectCountry},{name:"basic_information",label:"Basic Information",visible:!0},{name:"engagement_agreement_details",label:"Engagement Agreement Details",visible:!!t?.includeEngagementAgreementDetails},{name:"contract_details",label:"Contract Details",visible:!0},{name:"benefits",label:"Benefits",visible:!0},{name:"review",label:"Review",visible:!0}],a=t.useDynamicSteps?o.map((e,n)=>({name:e.name,index:n,label:e.label,visible:e.visible})):o.filter(e=>e.visible).map((e,n)=>({name:e.name,index:n,label:e.label,visible:e.visible}));return{steps:a.reduce((e,n)=>(e[n.name]={index:n.index,name:n.name,visible:n.visible},e),{}),stepsArray:a}}i(m,"buildSteps");var c=["invited","created_awaiting_reserve","created_reserve_paid"],b=["created_awaiting_reserve","invited"],s=1,l=i(()=>s,"getDefaultContractDetailsSchemaVersion"),u=i((t,o)=>{let a=t?.jsonSchemaVersionByCountry,r=o?a?.[o]?.contract_details:void 0;return r||l()},"getContractDetailsSchemaVersion"),p=i(t=>t?.jsonSchemaVersion?.employment_basic_information||s,"getBasicInformationSchemaVersion"),d=i(t=>t?.jsonSchemaVersion?.benefit_offers_form_schema||s,"getBenefitOffersSchemaVersion");export{m as a,c as b,b as c,s as d,u as e,p as f,d as g};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-P37U34EQ.js";function m(t={}){let o=[{name:"select_country",label:"Select Country",visible:!!t?.includeSelectCountry},{name:"basic_information",label:"Basic Information",visible:!0},{name:"engagement_agreement_details",label:"Engagement Agreement Details",visible:!!t?.includeEngagementAgreementDetails},{name:"contract_details",label:"Contract Details",visible:!0},{name:"benefits",label:"Benefits",visible:!0},{name:"review",label:"Review",visible:!0}],a=t.useDynamicSteps?o.map((e,n)=>({name:e.name,index:n,label:e.label,visible:e.visible})):o.filter(e=>e.visible).map((e,n)=>({name:e.name,index:n,label:e.label,visible:e.visible}));return{steps:a.reduce((e,n)=>(e[n.name]={index:n.index,name:n.name,visible:n.visible},e),{}),stepsArray:a}}i(m,"buildSteps");var c=["initiated","invited","created_awaiting_reserve","created_reserve_paid"],b=["initiated","created_awaiting_reserve","invited"],s=1,l=i(()=>s,"getDefaultContractDetailsSchemaVersion"),u=i((t,o)=>{let a=t?.jsonSchemaVersionByCountry,r=o?a?.[o]?.contract_details:void 0;return r||l()},"getContractDetailsSchemaVersion"),p=i(t=>t?.jsonSchemaVersion?.employment_basic_information||s,"getBasicInformationSchemaVersion"),d=i(t=>t?.jsonSchemaVersion?.benefit_offers_form_schema||s,"getBenefitOffersSchemaVersion");export{m as a,c as b,b as c,s as d,u as e,p as f,d as g};
|
|
2
|
+
//# sourceMappingURL=chunk-D6MFIXSJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/flows/Onboarding/utils.ts"],"sourcesContent":["import { Employment, OnboardingFlowProps } from '@/src/flows/Onboarding/types';\nimport { Step } from '@/src/flows/useStepState';\n\nexport type StepKeys =\n | 'select_country'\n | 'basic_information'\n | 'engagement_agreement_details'\n | 'contract_details'\n | 'benefits'\n | 'review';\n\ntype StepConfig = {\n includeSelectCountry?: boolean;\n includeEngagementAgreementDetails?: boolean;\n useDynamicSteps?: boolean;\n};\n\nexport function buildSteps(config: StepConfig = {}) {\n const stepDefinitions: Array<{\n name: StepKeys;\n label: string;\n visible: boolean;\n }> = [\n {\n name: 'select_country',\n label: 'Select Country',\n visible: Boolean(config?.includeSelectCountry),\n },\n {\n name: 'basic_information',\n label: 'Basic Information',\n visible: true,\n },\n {\n name: 'engagement_agreement_details',\n label: 'Engagement Agreement Details',\n visible: Boolean(config?.includeEngagementAgreementDetails),\n },\n {\n name: 'contract_details',\n label: 'Contract Details',\n visible: true,\n },\n {\n name: 'benefits',\n label: 'Benefits',\n visible: true,\n },\n {\n name: 'review',\n label: 'Review',\n visible: true,\n },\n ];\n\n // When useDynamicSteps is false (default/legacy behavior):\n // - Filter out hidden steps first\n // - Assign sequential indices (0, 1, 2, 3...)\n // - This maintains backwards compatibility with existing implementations\n //\n // When useDynamicSteps is true (new behavior):\n // - Keep all steps including hidden ones\n // - Preserve original indices even for hidden steps\n // - Consumers must filter by `visible` property\n const stepsArray = config.useDynamicSteps\n ? stepDefinitions.map((step, index) => ({\n name: step.name,\n index,\n label: step.label,\n visible: step.visible,\n }))\n : stepDefinitions\n .filter((step) => step.visible)\n .map((step, index) => ({\n name: step.name,\n index,\n label: step.label,\n visible: step.visible,\n }));\n\n const steps = stepsArray.reduce(\n (acc, step) => {\n acc[step.name] = {\n index: step.index,\n name: step.name,\n visible: step.visible,\n };\n return acc;\n },\n {} as Record<string, Step<StepKeys>>,\n );\n\n return { steps, stepsArray };\n}\n\n/**\n * Array of employment statuses that are allowed to proceed to the review step.\n * These statuses indicate that the employment is in a final state and the employment cannot be modified further.\n * @type {Employment['status'][]}\n * @constant\n */\nexport const reviewStepAllowedEmploymentStatus: Employment['status'][] = [\n 'initiated',\n 'invited',\n 'created_awaiting_reserve',\n 'created_reserve_paid',\n];\n\nexport const disabledInviteButtonEmploymentStatus: Employment['status'][] = [\n 'initiated',\n 'created_awaiting_reserve',\n 'invited',\n];\n\nexport const DEFAULT_VERSION = 1;\n\n/**\n * Gets the default (recommended) contract details schema version for a country\n */\nconst getDefaultContractDetailsSchemaVersion = (): number => {\n return DEFAULT_VERSION;\n};\n\n/**\n * Resolves the effective contract details schema version for a country\n *\n * @param options - The flow options containing version configurations\n * @param countryCode - The country code to resolve version for\n * @returns The effective jsonSchemaVersion configuration\n */\nexport const getContractDetailsSchemaVersion = (\n options: OnboardingFlowProps['options'],\n countryCode: string | null,\n) => {\n const jsonSchemaVersionByCountry = options?.jsonSchemaVersionByCountry;\n const countrySpecificVersion = countryCode\n ? jsonSchemaVersionByCountry?.[countryCode]?.contract_details\n : undefined;\n\n const requestedVersion = countrySpecificVersion\n ? countrySpecificVersion\n : getDefaultContractDetailsSchemaVersion();\n\n return requestedVersion;\n};\n\n/**\n * Gets the basic information schema version from options\n * @param options - The flow options containing version configurations\n * @returns The jsonSchemaVersion for basic information or default\n */\nexport const getBasicInformationSchemaVersion = (\n options: OnboardingFlowProps['options'],\n): number | 'latest' => {\n return (\n options?.jsonSchemaVersion?.employment_basic_information || DEFAULT_VERSION\n );\n};\n\n/**\n * Gets the benefit offers schema version from options\n * @param options - The flow options containing version configurations\n * @returns The jsonSchemaVersion for benefit offers or undefined if not set\n */\nexport const getBenefitOffersSchemaVersion = (\n options: OnboardingFlowProps['options'],\n): number | 'latest' => {\n return (\n options?.jsonSchemaVersion?.benefit_offers_form_schema || DEFAULT_VERSION\n );\n};\n"],"mappings":"wCAiBO,SAASA,EAAWC,EAAqB,CAAC,EAAG,CAClD,IAAMC,EAID,CACH,CACE,KAAM,iBACN,MAAO,iBACP,QAAS,EAAQD,GAAQ,oBAC3B,EACA,CACE,KAAM,oBACN,MAAO,oBACP,QAAS,EACX,EACA,CACE,KAAM,+BACN,MAAO,+BACP,QAAS,EAAQA,GAAQ,iCAC3B,EACA,CACE,KAAM,mBACN,MAAO,mBACP,QAAS,EACX,EACA,CACE,KAAM,WACN,MAAO,WACP,QAAS,EACX,EACA,CACE,KAAM,SACN,MAAO,SACP,QAAS,EACX,CACF,EAWME,EAAaF,EAAO,gBACtBC,EAAgB,IAAI,CAACE,EAAMC,KAAW,CACpC,KAAMD,EAAK,KACX,MAAAC,EACA,MAAOD,EAAK,MACZ,QAASA,EAAK,OAChB,EAAE,EACFF,EACG,OAAQE,GAASA,EAAK,OAAO,EAC7B,IAAI,CAACA,EAAMC,KAAW,CACrB,KAAMD,EAAK,KACX,MAAAC,EACA,MAAOD,EAAK,MACZ,QAASA,EAAK,OAChB,EAAE,EAcR,MAAO,CAAE,MAZKD,EAAW,OACvB,CAACG,EAAKF,KACJE,EAAIF,EAAK,IAAI,EAAI,CACf,MAAOA,EAAK,MACZ,KAAMA,EAAK,KACX,QAASA,EAAK,OAChB,EACOE,GAET,CAAC,CACH,EAEgB,WAAAH,CAAW,CAC7B,CA5EgBI,EAAAP,EAAA,cAoFT,IAAMQ,EAA4D,CACvE,YACA,UACA,2BACA,sBACF,EAEaC,EAA+D,CAC1E,YACA,2BACA,SACF,EAEaC,EAAkB,EAKzBC,EAAyCJ,EAAA,IACtCG,EADsC,0CAWlCE,EAAkCL,EAAA,CAC7CM,EACAC,IACG,CACH,IAAMC,EAA6BF,GAAS,2BACtCG,EAAyBF,EAC3BC,IAA6BD,CAAW,GAAG,iBAC3C,OAMJ,OAJyBE,GAErBL,EAAuC,CAG7C,EAd+C,mCAqBlCM,EAAmCV,EAC9CM,GAGEA,GAAS,mBAAmB,8BAAgCH,EAJhB,oCAanCQ,EAAgCX,EAC3CM,GAGEA,GAAS,mBAAmB,4BAA8BH,EAJjB","names":["buildSteps","config","stepDefinitions","stepsArray","step","index","acc","__name","reviewStepAllowedEmploymentStatus","disabledInviteButtonEmploymentStatus","DEFAULT_VERSION","getDefaultContractDetailsSchemaVersion","getContractDetailsSchemaVersion","options","countryCode","jsonSchemaVersionByCountry","countrySpecificVersion","getBasicInformationSchemaVersion","getBenefitOffersSchemaVersion"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as f}from"./chunk-PGWKJ6FK.js";import{a as l}from"./chunk-U5QVIJOS.js";import{a as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as f}from"./chunk-PGWKJ6FK.js";import{a as l}from"./chunk-U5QVIJOS.js";import{a as d}from"./chunk-OBF27DKO.js";import{h as m}from"./chunk-5BU3CD2P.js";import{c as s}from"./chunk-JXAAON7I.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as k}from"react";import{jsx as c}from"react/jsx-runtime";import{createElement as w}from"react";function R({defaultValues:p,onSubmit:F,components:u}){let{formId:S,onboardingBag:e}=f(),r=l({handleValidation:e.handleValidation,defaultValues:p,checkFieldUpdates:e.checkFieldUpdates});k(()=>{e.employmentId&&e?.checkFieldUpdates(r.getValues())},[]);let g=t(async(a,y)=>{let n=y?.nativeEvent;if(n?.isDraftSubmission){let{onSuccess:E,onError:i}=n.draftCallbacks;try{let o=await e.onSubmit(a);if(o?.data)E?.();else if(o?.error){let b=e.stepState.currentStep.name,h=e.meta?.fields?.[b],P=s(o?.fieldErrors||[],h);i?.({error:o.error,rawError:o.rawError,fieldErrors:P})}}catch(o){i?.({error:o,rawError:o,fieldErrors:[]})}}else await F(a)},"handleSubmit");return w(m,{...r,key:`form-${e.stepState.currentStep.name}`},c("form",{id:S,onSubmit:r.handleSubmit(g),className:"space-y-4 RemoteFlows__OnboardingForm",children:c(d,{components:u,fields:e.fields,fieldsets:e.meta.fieldsets,fieldValues:e.fieldValues})}))}t(R,"OnboardingForm");export{R as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DILDN6DN.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-DILDN6DN.js";import{b as s}from"./chunk-PGWKJ6FK.js";import{c as i}from"./chunk-JXAAON7I.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as c}from"react/jsx-runtime";function F({onSubmit:d,onSuccess:l,onError:n}){let{onboardingBag:r}=s(),g=a(async t=>{try{let o=await r.parseFormValues(t);await d?.(o);let e=await r.onSubmit(t);if(e?.data){await l?.(e?.data),r?.next();return}if(e?.error){let E=i(e?.fieldErrors||[],r.meta?.fields?.engagement_agreement_details);n?.({error:e?.error,rawError:e?.rawError,fieldErrors:E})}}catch(o){n?.({error:o,rawError:o,fieldErrors:[]})}},"handleSubmit"),u=r.stepState.values?.engagement_agreement_details||r.initialValues.engagement_agreement_details;return c(m,{defaultValues:u,onSubmit:g})}a(F,"EngagementAgreementDetailsStep");export{F as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DNTUDKSN.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as i,c as m,d as s,e as f}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as i,c as m,d as s,e as f}from"./chunk-G7MJDZGB.js";import{a as n}from"./chunk-TXSUZLOI.js";import{a}from"./chunk-P37U34EQ.js";import{useState as O}from"react";var B=a(({proposedTerminationDate:e,employeeName:y,employmentId:o,employment:r,render:d})=>{let[t,u]=O(!1),l=m({employmentId:o}),p=n(e).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),c=i({employmentId:o,options:{enabled:t}}),D=s({employmentId:o,date:e}),P=f({employmentId:o,proposedTerminationDate:e,employment:r});return d({leavePoliciesSummaryQuery:l,timeoffQuery:c||{data:{bookedDays:0,timeoffs:[]}},bookedTimeBeforeAndAfterTerminationQuery:D,formattedProposedTerminationDate:p,employeeName:y,proposedTerminationDate:e,summaryData:P??{data:{entitledDays:"0 days",bookedDays:"0 days",usedDays:"0 days",approvedDaysBeforeTermination:"0 days",approvedDaysAfterTermination:"0 days",remainingDays:"0 days",isUnlimitedPto:!1},isLoading:!1,isError:!1,error:null},employment:r,open:t,onOpenChange:a(()=>{u(T=>!T)},"onOpenChange")})},"PaidTimeOffContainer");export{B as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DTTE663D.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as n}from"./chunk-MRYRNB7Y.js";import{a as l}from"./chunk-U5QVIJOS.js";import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as n}from"./chunk-MRYRNB7Y.js";import{a as l}from"./chunk-U5QVIJOS.js";import{a as t}from"./chunk-OBF27DKO.js";import{h as a}from"./chunk-5BU3CD2P.js";import{a as r}from"./chunk-P37U34EQ.js";import{jsx as e}from"react/jsx-runtime";function S({defaultValues:s,fields:i,onSubmit:d}){let{formId:F,terminationBag:o}=n(),m=l({handleValidation:o.handleValidation,defaultValues:s,checkFieldUpdates:o.checkFieldUpdates}),u=i||(o?.fields??[]);return e(a,{...m,children:e("form",{id:F,onSubmit:m.handleSubmit(d),className:"space-y-4 RemoteFlows__TerminationForm",children:e(t,{fields:u})})})}r(S,"TerminationForm");export{S as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DZJDM6PM.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-YLAJZTKB.js";import{b as e}from"./chunk-Q3ALCPJN.js";import{x as a}from"./chunk-JXAAON7I.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as g}from"react/jsx-runtime";function E({components:m,onSubmit:p,onSuccess:l,onError:c}){let{contractorOnboardingBag:r}=e(),d=i(async(t,P)=>{try{let n=await r.parseFormValues(t);await p?.(n);let o=await r.onSubmit(t);if(o?.data){await l?.(o?.data),r?.next();return}}catch(n){let o=a(n,r.meta?.fields?.pricing_plan,P);c?.(o)}},"handleSubmit"),u=r.stepState.values?.pricing_plan||r.initialValues.pricing_plan;return g(s,{components:m,defaultValues:u,onSubmit:d})}i(E,"PricingPlanStep");export{E as a};
|
|
2
|
+
//# sourceMappingURL=chunk-E4VXY33I.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{f as e,h as a}from"./chunk-5BU3CD2P.js";import{h as m}from"./chunk-JXAAON7I.js";import{b as s}from"./chunk-TVZAFTPT.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as i}from"react/jsx-runtime";function R({onSubmit:d,onError:c,onSuccess:l}){let{contractAmendment:{stepState:u,isSubmitting:f,onSubmit:C,fields:p},formId:A}=s(),n=e({defaultValues:u.values?.form}),F=o(async r=>{let V=await m(r,p,{isPartialValidation:!1});await d?.(V);let t=await C(r);t.error?c?.(t.error):await l?.(t.data)},"handleSubmit");return f?null:i(a,{...n,children:i("form",{id:A,onSubmit:n.handleSubmit(F),className:"RemoteFlows__ContractAmendmentConfirmationForm"})})}o(R,"ContractAmendmentConfirmationForm");export{R as a};
|
|
2
|
+
//# sourceMappingURL=chunk-EJWKMMZV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/flows/ContractAmendment/ContractAmendmentConfirmationForm.tsx"],"sourcesContent":["import {\n ContractAmendmentResponse,\n PostV1ContractAmendmentsError,\n} from '@/src/client';\nimport { parseJSFToValidate } from '@/src/components/form/utils';\nimport { Form } from '@/src/components/ui/form';\nimport { FieldValues, useForm } from 'react-hook-form';\nimport { useContractAmendmentContext } from './context';\n\ntype ContractAmendmentConfirmationFormProps = {\n /**\n * Callback function to be called when the contract amendment form is submitted.\n * This function is called before the contract amendment is submitted.\n * It can be used to perform any additional validation or processing before\n * the contract amendment is submitted.\n * @param values\n * @returns\n */\n onSubmit?: (values: FieldValues) => void | Promise<void>;\n /**\n * Callback function to be called when the contract amendment fails.\n * @param error\n * @returns\n */\n onError?: (error: PostV1ContractAmendmentsError) => void;\n /**\n * Callback function to be called when the contract amendment is successfully submitted.\n * @param data\n * @returns\n */\n onSuccess?: (data: ContractAmendmentResponse) => void | Promise<void>;\n};\n\nexport function ContractAmendmentConfirmationForm({\n onSubmit,\n onError,\n onSuccess,\n}: ContractAmendmentConfirmationFormProps) {\n const {\n contractAmendment: {\n stepState,\n isSubmitting,\n onSubmit: submitContractAmendment,\n fields,\n },\n formId,\n } = useContractAmendmentContext();\n const form = useForm({\n defaultValues: stepState.values?.form,\n });\n\n const handleSubmit = async (values: FieldValues) => {\n const parsedValues = await parseJSFToValidate(values, fields, {\n isPartialValidation: false,\n });\n await onSubmit?.(parsedValues);\n\n const contractAmendmentResult = await submitContractAmendment(values);\n\n if (contractAmendmentResult.error) {\n onError?.(contractAmendmentResult.error as PostV1ContractAmendmentsError);\n } else {\n await onSuccess?.(\n contractAmendmentResult.data as ContractAmendmentResponse,\n );\n }\n };\n\n // Ensure that step\n if (isSubmitting) {\n return null;\n }\n\n return (\n <Form {...form}>\n <form\n id={formId}\n onSubmit={form.handleSubmit(handleSubmit)}\n className='RemoteFlows__ContractAmendmentConfirmationForm'\n ></form>\n </Form>\n );\n}\n"],"mappings":"uKA2EM,cAAAA,MAAA,oBA1CC,SAASC,EAAkC,CAChD,SAAAC,EACA,QAAAC,EACA,UAAAC,CACF,EAA2C,CACzC,GAAM,CACJ,kBAAmB,CACjB,UAAAC,EACA,aAAAC,EACA,SAAUC,EACV,OAAAC,CACF,EACA,OAAAC,CACF,EAAIC,EAA4B,EAC1BC,EAAOC,EAAQ,CACnB,cAAeP,EAAU,QAAQ,IACnC,CAAC,EAEKQ,EAAeC,EAAA,MAAOC,GAAwB,CAClD,IAAMC,EAAe,MAAMC,EAAmBF,EAAQP,EAAQ,CAC5D,oBAAqB,EACvB,CAAC,EACD,MAAMN,IAAWc,CAAY,EAE7B,IAAME,EAA0B,MAAMX,EAAwBQ,CAAM,EAEhEG,EAAwB,MAC1Bf,IAAUe,EAAwB,KAAsC,EAExE,MAAMd,IACJc,EAAwB,IAC1B,CAEJ,EAfqB,gBAkBrB,OAAIZ,EACK,KAIPN,EAACmB,EAAA,CAAM,GAAGR,EACR,SAAAX,EAAC,QACC,GAAIS,EACJ,SAAUE,EAAK,aAAaE,CAAY,EACxC,UAAU,iDACX,EACH,CAEJ,CAjDgBC,EAAAb,EAAA","names":["jsx","ContractAmendmentConfirmationForm","onSubmit","onError","onSuccess","stepState","isSubmitting","submitContractAmendment","fields","formId","useContractAmendmentContext","form","useForm","handleSubmit","__name","values","parsedValues","parseJSFToValidate","contractAmendmentResult","Form"]}
|