@remoteoss/remote-flows 1.19.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ButtonDefault-2YV2Z474.js +2 -0
- package/dist/{CountryFieldDefault-X7772U44.js → CountryFieldDefault-IBVQJVMW.js} +2 -2
- package/dist/DatePickerFieldDefault-5LEOVIM2.js +2 -0
- package/dist/FieldsetToggleButtonDefault-MFLN2WWT.js +2 -0
- package/dist/FileUploadFieldDefault-Y2ZYBSTV.js +2 -0
- package/dist/MultiSelectFieldDefault-UK7652MS.js +2 -0
- package/dist/{WorkScheduleFieldDefault-FPXVZLXP.js → WorkScheduleFieldDefault-SR3G37MN.js} +2 -2
- package/dist/{chunk-U4H65USG.js → chunk-24FMEFH5.js} +2 -2
- package/dist/{chunk-ZWIH53GL.js → chunk-3C6N7DK6.js} +2 -2
- package/dist/{chunk-FUGPVPYX.js → chunk-3NESYBEJ.js} +2 -2
- package/dist/{chunk-N7CS4LVY.js → chunk-3OJVYYPZ.js} +2 -2
- package/dist/{chunk-EKR5ME7C.js → chunk-3UEQXLRC.js} +2 -2
- package/dist/{chunk-4QNOC3FL.js → chunk-4S7BRDNF.js} +2 -2
- package/dist/{chunk-IYQDAHMG.js → chunk-5JGEEJ3A.js} +2 -2
- package/dist/chunk-6JTHV4QS.js +2 -0
- package/dist/chunk-6JTHV4QS.js.map +1 -0
- package/dist/{chunk-2QGJBYQP.js → chunk-74ZEXZAY.js} +2 -2
- package/dist/{chunk-QH57S4OP.js → chunk-7EUMRKH4.js} +2 -2
- package/dist/{chunk-PP25XZSV.js → chunk-7M7VN4WI.js} +2 -2
- package/dist/{chunk-GCMEX4I6.js → chunk-AFHSKSGA.js} +2 -2
- package/dist/chunk-AHRG5QCS.js +2 -0
- package/dist/chunk-AHRG5QCS.js.map +1 -0
- package/dist/{chunk-WH4AY6UO.js → chunk-BLGKOMH3.js} +2 -2
- package/dist/{chunk-QYWF2RMX.js → chunk-BTS5Q6UZ.js} +2 -2
- package/dist/{chunk-BAGPUVVO.js → chunk-BUOCIXUH.js} +2 -2
- package/dist/{chunk-SS2FAFUZ.js → chunk-BYDQHL6O.js} +2 -2
- package/dist/{chunk-RZQIAOMZ.js → chunk-CR3X2TWM.js} +2 -2
- package/dist/{chunk-CRKLC7BP.js → chunk-D36G74ID.js} +2 -2
- package/dist/{chunk-WUOSCFTG.js → chunk-DFYEI445.js} +2 -2
- package/dist/{chunk-QEEZZSOQ.js → chunk-DHRMW63S.js} +2 -2
- package/dist/{chunk-3DKYJYLD.js → chunk-DPRCPBRB.js} +2 -2
- package/dist/{chunk-3W3VKY2J.js → chunk-EMP4ZIVB.js} +2 -2
- package/dist/{chunk-FVBPHUV6.js → chunk-I5FVESDZ.js} +2 -2
- package/dist/{chunk-VYINI3DD.js → chunk-IVXIAOMR.js} +2 -2
- package/dist/{chunk-3GBODX6S.js → chunk-JDVILEVL.js} +2 -2
- package/dist/{chunk-UAWJQ3EH.js → chunk-JEFPOHCP.js} +2 -2
- package/dist/{chunk-R7R6D7D4.js → chunk-JTPKAIYL.js} +2 -2
- package/dist/{chunk-ONXEJSDK.js → chunk-KYBKW4FE.js} +2 -2
- package/dist/{chunk-P7P5KATB.js → chunk-LM766FLB.js} +2 -2
- package/dist/{chunk-U32PNP6D.js → chunk-LSW66EIR.js} +2 -2
- package/dist/{chunk-UKTMSVMG.js → chunk-M7KQPXCS.js} +2 -2
- package/dist/{chunk-FDEJ4CIO.js → chunk-MGY23P25.js} +2 -2
- package/dist/chunk-MP3VDCI7.js +2 -0
- package/dist/chunk-MP3VDCI7.js.map +1 -0
- package/dist/{chunk-FY5OFJRY.js → chunk-MVQOMW7S.js} +2 -2
- package/dist/{chunk-E2ONHNZD.js → chunk-MXSKCQOT.js} +2 -2
- package/dist/{chunk-IGLKMXWJ.js → chunk-NAMR4DA5.js} +2 -2
- package/dist/{chunk-YBAV2FE4.js → chunk-OUSCSVMQ.js} +2 -2
- package/dist/chunk-PX5PE6GX.js +2 -0
- package/dist/chunk-PX5PE6GX.js.map +1 -0
- package/dist/chunk-ROQYHTFQ.js +2 -0
- package/dist/chunk-ROQYHTFQ.js.map +1 -0
- package/dist/{chunk-EFLRT7G5.js → chunk-RSZZMCB2.js} +2 -2
- package/dist/{chunk-D3EB2FG3.js → chunk-RZJ7WE6G.js} +2 -2
- package/dist/{chunk-2HBSVDEH.js → chunk-T5JT2ZU2.js} +2 -2
- package/dist/{chunk-YMNB6DO2.js → chunk-VCDA76UN.js} +2 -2
- package/dist/{chunk-7RP5F62S.js → chunk-VPSESR6G.js} +2 -2
- package/dist/{chunk-7FHNJWIY.js → chunk-VXMLYWZ2.js} +2 -2
- package/dist/chunk-X6IMS3NL.js +2 -0
- package/dist/chunk-X6IMS3NL.js.map +1 -0
- package/dist/{chunk-RQJYOWP4.js → chunk-Y2LBI32D.js} +2 -2
- package/dist/{chunk-QLMEA4FA.js → chunk-YHQQSL4Q.js} +2 -2
- package/dist/{chunk-AJCKNHZB.js → chunk-YWOJ4NKF.js} +2 -2
- package/dist/{chunk-AUV3PA2A.js → chunk-Z6B3PA4M.js} +2 -2
- package/dist/default-components.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
- package/dist/flows/ContractAmendment/index.js +1 -1
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +1 -1
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
- package/dist/flows/ContractorOnboarding/api.js +1 -1
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
- package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.d.ts +1 -1
- package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +1 -1
- package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/StatementOfWorkDisclaimer.js +1 -1
- package/dist/flows/ContractorOnboarding/constants.d.ts +4 -1
- package/dist/flows/ContractorOnboarding/constants.js +1 -1
- package/dist/flows/ContractorOnboarding/context.d.ts +2 -1
- package/dist/flows/ContractorOnboarding/hooks.d.ts +1 -1
- package/dist/flows/ContractorOnboarding/hooks.js +1 -1
- package/dist/flows/ContractorOnboarding/index.d.ts +1 -1
- package/dist/flows/ContractorOnboarding/index.js +1 -1
- package/dist/flows/ContractorOnboarding/jsfModify.d.ts +3 -3
- package/dist/flows/ContractorOnboarding/jsfModify.js +1 -1
- package/dist/flows/ContractorOnboarding/types.d.ts +1 -1
- package/dist/flows/ContractorOnboarding/utils.d.ts +8 -1
- package/dist/flows/ContractorOnboarding/utils.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
- package/dist/flows/CostCalculator/EstimationResults/EstimationResults.js +1 -1
- package/dist/flows/CostCalculator/hooks.js +1 -1
- package/dist/flows/CostCalculator/index.js +1 -1
- package/dist/flows/CostCalculator/utils.js +1 -1
- package/dist/flows/CreateCompany/CreateCompany.js +1 -1
- package/dist/flows/CreateCompany/components/AddressDetailsStep.js +1 -1
- package/dist/flows/CreateCompany/components/CompanyBasicInformationStep.js +1 -1
- package/dist/flows/CreateCompany/components/CreateCompanyForm.js +1 -1
- package/dist/flows/CreateCompany/index.js +1 -1
- package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
- package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
- package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
- package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/Onboarding/index.js +1 -1
- package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
- package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
- package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
- package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
- package/dist/flows/Termination/TerminationFlow.js +1 -1
- package/dist/flows/Termination/TerminationForm.js +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.js +1 -1
- package/dist/flows/Termination/components/TerminationDialogInfoContent/TerminationDialogInfoContent.js +1 -1
- package/dist/flows/Termination/hooks.js +1 -1
- package/dist/flows/Termination/index.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/internals.d.ts +2 -6
- package/dist/internals.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/dist/{types-5zVzEzw3.d.ts → types-D_exxPuY.d.ts} +12 -1
- package/package.json +1 -2
- package/dist/ButtonDefault-6LBHWUQH.js +0 -2
- package/dist/DatePickerFieldDefault-7HPCPBEI.js +0 -2
- package/dist/FieldsetToggleButtonDefault-MXBQJ55Q.js +0 -2
- package/dist/FileUploadFieldDefault-T7EK7RTI.js +0 -2
- package/dist/MultiSelectFieldDefault-57GAREIU.js +0 -2
- package/dist/chunk-LHEF2FN7.js +0 -2
- package/dist/chunk-LHEF2FN7.js.map +0 -1
- package/dist/chunk-RJY6AEJB.js +0 -2
- package/dist/chunk-RJY6AEJB.js.map +0 -1
- package/dist/chunk-TXQWBDNF.js +0 -2
- package/dist/chunk-TXQWBDNF.js.map +0 -1
- package/dist/chunk-U2LHFJXY.js +0 -2
- package/dist/chunk-U2LHFJXY.js.map +0 -1
- package/dist/chunk-VWFZ6CMP.js +0 -2
- package/dist/chunk-VWFZ6CMP.js.map +0 -1
- package/dist/chunk-WFXSA66P.js +0 -2
- package/dist/chunk-WFXSA66P.js.map +0 -1
- /package/dist/{ButtonDefault-6LBHWUQH.js.map → ButtonDefault-2YV2Z474.js.map} +0 -0
- /package/dist/{CountryFieldDefault-X7772U44.js.map → CountryFieldDefault-IBVQJVMW.js.map} +0 -0
- /package/dist/{DatePickerFieldDefault-7HPCPBEI.js.map → DatePickerFieldDefault-5LEOVIM2.js.map} +0 -0
- /package/dist/{FieldsetToggleButtonDefault-MXBQJ55Q.js.map → FieldsetToggleButtonDefault-MFLN2WWT.js.map} +0 -0
- /package/dist/{FileUploadFieldDefault-T7EK7RTI.js.map → FileUploadFieldDefault-Y2ZYBSTV.js.map} +0 -0
- /package/dist/{MultiSelectFieldDefault-57GAREIU.js.map → MultiSelectFieldDefault-UK7652MS.js.map} +0 -0
- /package/dist/{WorkScheduleFieldDefault-FPXVZLXP.js.map → WorkScheduleFieldDefault-SR3G37MN.js.map} +0 -0
- /package/dist/{chunk-U4H65USG.js.map → chunk-24FMEFH5.js.map} +0 -0
- /package/dist/{chunk-ZWIH53GL.js.map → chunk-3C6N7DK6.js.map} +0 -0
- /package/dist/{chunk-FUGPVPYX.js.map → chunk-3NESYBEJ.js.map} +0 -0
- /package/dist/{chunk-N7CS4LVY.js.map → chunk-3OJVYYPZ.js.map} +0 -0
- /package/dist/{chunk-EKR5ME7C.js.map → chunk-3UEQXLRC.js.map} +0 -0
- /package/dist/{chunk-4QNOC3FL.js.map → chunk-4S7BRDNF.js.map} +0 -0
- /package/dist/{chunk-IYQDAHMG.js.map → chunk-5JGEEJ3A.js.map} +0 -0
- /package/dist/{chunk-2QGJBYQP.js.map → chunk-74ZEXZAY.js.map} +0 -0
- /package/dist/{chunk-QH57S4OP.js.map → chunk-7EUMRKH4.js.map} +0 -0
- /package/dist/{chunk-PP25XZSV.js.map → chunk-7M7VN4WI.js.map} +0 -0
- /package/dist/{chunk-GCMEX4I6.js.map → chunk-AFHSKSGA.js.map} +0 -0
- /package/dist/{chunk-WH4AY6UO.js.map → chunk-BLGKOMH3.js.map} +0 -0
- /package/dist/{chunk-QYWF2RMX.js.map → chunk-BTS5Q6UZ.js.map} +0 -0
- /package/dist/{chunk-BAGPUVVO.js.map → chunk-BUOCIXUH.js.map} +0 -0
- /package/dist/{chunk-SS2FAFUZ.js.map → chunk-BYDQHL6O.js.map} +0 -0
- /package/dist/{chunk-RZQIAOMZ.js.map → chunk-CR3X2TWM.js.map} +0 -0
- /package/dist/{chunk-CRKLC7BP.js.map → chunk-D36G74ID.js.map} +0 -0
- /package/dist/{chunk-WUOSCFTG.js.map → chunk-DFYEI445.js.map} +0 -0
- /package/dist/{chunk-QEEZZSOQ.js.map → chunk-DHRMW63S.js.map} +0 -0
- /package/dist/{chunk-3DKYJYLD.js.map → chunk-DPRCPBRB.js.map} +0 -0
- /package/dist/{chunk-3W3VKY2J.js.map → chunk-EMP4ZIVB.js.map} +0 -0
- /package/dist/{chunk-FVBPHUV6.js.map → chunk-I5FVESDZ.js.map} +0 -0
- /package/dist/{chunk-VYINI3DD.js.map → chunk-IVXIAOMR.js.map} +0 -0
- /package/dist/{chunk-3GBODX6S.js.map → chunk-JDVILEVL.js.map} +0 -0
- /package/dist/{chunk-UAWJQ3EH.js.map → chunk-JEFPOHCP.js.map} +0 -0
- /package/dist/{chunk-R7R6D7D4.js.map → chunk-JTPKAIYL.js.map} +0 -0
- /package/dist/{chunk-ONXEJSDK.js.map → chunk-KYBKW4FE.js.map} +0 -0
- /package/dist/{chunk-P7P5KATB.js.map → chunk-LM766FLB.js.map} +0 -0
- /package/dist/{chunk-U32PNP6D.js.map → chunk-LSW66EIR.js.map} +0 -0
- /package/dist/{chunk-UKTMSVMG.js.map → chunk-M7KQPXCS.js.map} +0 -0
- /package/dist/{chunk-FDEJ4CIO.js.map → chunk-MGY23P25.js.map} +0 -0
- /package/dist/{chunk-FY5OFJRY.js.map → chunk-MVQOMW7S.js.map} +0 -0
- /package/dist/{chunk-E2ONHNZD.js.map → chunk-MXSKCQOT.js.map} +0 -0
- /package/dist/{chunk-IGLKMXWJ.js.map → chunk-NAMR4DA5.js.map} +0 -0
- /package/dist/{chunk-YBAV2FE4.js.map → chunk-OUSCSVMQ.js.map} +0 -0
- /package/dist/{chunk-EFLRT7G5.js.map → chunk-RSZZMCB2.js.map} +0 -0
- /package/dist/{chunk-D3EB2FG3.js.map → chunk-RZJ7WE6G.js.map} +0 -0
- /package/dist/{chunk-2HBSVDEH.js.map → chunk-T5JT2ZU2.js.map} +0 -0
- /package/dist/{chunk-YMNB6DO2.js.map → chunk-VCDA76UN.js.map} +0 -0
- /package/dist/{chunk-7RP5F62S.js.map → chunk-VPSESR6G.js.map} +0 -0
- /package/dist/{chunk-7FHNJWIY.js.map → chunk-VXMLYWZ2.js.map} +0 -0
- /package/dist/{chunk-RQJYOWP4.js.map → chunk-Y2LBI32D.js.map} +0 -0
- /package/dist/{chunk-QLMEA4FA.js.map → chunk-YHQQSL4Q.js.map} +0 -0
- /package/dist/{chunk-AJCKNHZB.js.map → chunk-YWOJ4NKF.js.map} +0 -0
- /package/dist/{chunk-AUV3PA2A.js.map → chunk-Z6B3PA4M.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=CountryFieldDefault-
|
|
1
|
+
import{a}from"./chunk-M7KQPXCS.js";import"./chunk-VPSESR6G.js";import"./chunk-RGLQY27T.js";import"./chunk-MSBCYMSH.js";import"./chunk-YHCH57B7.js";import"./chunk-7EONM7HL.js";import"./chunk-WQ4H5V7U.js";import"./chunk-6JTHV4QS.js";import"./chunk-547UHEDI.js";import"./chunk-MP3VDCI7.js";import"./chunk-EOMVTXER.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as CountryFieldDefault};
|
|
2
|
+
//# sourceMappingURL=CountryFieldDefault-IBVQJVMW.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-DPRCPBRB.js";import"./chunk-RGLQY27T.js";import"./chunk-MSBCYMSH.js";import"./chunk-YHCH57B7.js";import"./chunk-7EONM7HL.js";import"./chunk-WQ4H5V7U.js";import"./chunk-MP3VDCI7.js";import"./chunk-EOMVTXER.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as DatePickerFieldDefault};
|
|
2
|
+
//# sourceMappingURL=DatePickerFieldDefault-5LEOVIM2.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-VXMLYWZ2.js";import"./chunk-7EONM7HL.js";import"./chunk-3NESYBEJ.js";import"./chunk-MP3VDCI7.js";import"./chunk-EOMVTXER.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-P37U34EQ.js";export{a as FileUploadFieldDefault};
|
|
2
|
+
//# sourceMappingURL=FileUploadFieldDefault-Y2ZYBSTV.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"./chunk-YHQQSL4Q.js";import"./chunk-VPSESR6G.js";import"./chunk-MSBCYMSH.js";import"./chunk-7EONM7HL.js";import"./chunk-6JTHV4QS.js";import"./chunk-547UHEDI.js";import"./chunk-MP3VDCI7.js";import"./chunk-EOMVTXER.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-P37U34EQ.js";export{a as MultiSelectFieldDefault};
|
|
2
|
+
//# sourceMappingURL=MultiSelectFieldDefault-UK7652MS.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=WorkScheduleFieldDefault-
|
|
1
|
+
import{a}from"./chunk-MGY23P25.js";import"./chunk-AOSXULKY.js";import"./chunk-HJ7WOTV7.js";import"./chunk-7EONM7HL.js";import"./chunk-547UHEDI.js";import"./chunk-MP3VDCI7.js";import"./chunk-EOMVTXER.js";import"./chunk-VIGKOVHP.js";import"./chunk-X6ZAR7ZL.js";import"./chunk-KQPDXXG3.js";import"./chunk-P37U34EQ.js";export{a as WorkScheduleFieldDefault};
|
|
2
|
+
//# sourceMappingURL=WorkScheduleFieldDefault-SR3G37MN.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-Z6B3PA4M.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-24FMEFH5.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o,b as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o,b as r}from"./chunk-PX5PE6GX.js";import{a as t}from"./chunk-SNECOPBD.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as a}from"react/jsx-runtime";var n={[o]:" Remote provides its Contractor Services Agreement (CSA) \u201Cas is\u201D; it does not constitute legal advice or create an attorney-client relationship with Remote. Remote is not liable for the content You enter herein and You are encouraged to seek independent legal advice tailored to the specific relationship between You and Your Contractor. By use of the CSA, You release Remote from liability for any claim for damages or losses which may arise related to Your use thereof.",[r]:"Remote provides its Contractor Services Agreement (CSA) \u201Cas is\u201D; it does not constitute legal advice or create an attorney-client relationship with Remote. Remote is not liable for the content You enter herein and You are encouraged to seek independent legal advice tailored to the specific relationship between You and Your Contractor."},d=e(({subscription:i})=>a(t,{title:"Contractor Services Agreement",description:n[i],severity:"info"}),"StatementOfWorkDisclaimer");export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3C6N7DK6.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as p}from"./chunk-MP3VDCI7.js";import{a as g}from"./chunk-VIGKOVHP.js";import{a as n}from"./chunk-P37U34EQ.js";import{useState as y,useRef as E,useEffect as R}from"react";import{Upload as k,X as B}from"lucide-react";import{jsx as t,jsxs as o}from"react/jsx-runtime";var M=n(l=>l?l.split(",").map(m=>m.trim().toUpperCase()).join(", "):null,"getAcceptedFormats");function L({onChange:l,className:m,multiple:r,accept:f,files:i,id:h}){let[a,c]=y(i||[]),d=E(null);R(()=>{i&&i.length>0&&c(i)},[i]);let v=n(e=>{e.preventDefault(),d.current?.click()},"handleClick"),N=n(e=>{if(e.target.files&&e.target.files.length>0){let s=Array.from(e.target.files);c([...a,...s]),l([...a,...s])}},"handleChange"),F=n(e=>{c(s=>s.filter(C=>C.name!==e.name)),l(a.filter(s=>s.name!==e.name))},"onRemoveFile"),u=M(f);return o("div",{className:g("flex flex-col items-start gap-4",m),children:[t("input",{type:"file",ref:d,id:h,onChange:N,className:"hidden","aria-label":"File upload",multiple:r,accept:f}),o(p,{type:"button",onClick:v,className:"gap-2",children:[t(k,{className:"h-4 w-4"}),"Choose File"]}),u&&o("div",{className:"text-sm text-gray-600",children:["Accepted formats:"," ",t("span",{className:"font-medium",children:u})]}),a.length===0&&t("div",{className:"text-sm",children:r?t("span",{className:"font-medium",children:"No files selected. You can select multiple files"}):t("span",{className:"font-medium",children:"No file selected."})}),a.length>0&&a.map((e,s)=>o("div",{className:"text-sm flex items-center gap-2",children:["Selected file: ",t("span",{className:"font-medium",children:e.name})," (",Math.round(e.size/1024)," KB)",t(p,{type:"button",variant:"ghost",onClick:()=>F(e),children:t(B,{})})]},s))]})}n(L,"FileUploader");export{L as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3NESYBEJ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as p}from"./chunk-KSHK3ZPX.js";import{a as F}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as p}from"./chunk-KSHK3ZPX.js";import{a as F}from"./chunk-BUOCIXUH.js";import{g as C}from"./chunk-7EONM7HL.js";import{h as E}from"./chunk-VIGKOVHP.js";import{b as f}from"./chunk-X6ZAR7ZL.js";import{a as n}from"./chunk-P37U34EQ.js";import{useEffect as R}from"react";import{jsx as u}from"react/jsx-runtime";function T({onSubmit:S,onError:w,onSuccess:y,onErrorWithFields:c,shouldResetForm:d,resetFields:a}){let{form:e,formId:V,costCalculatorBag:o}=p(),{formState:{isSubmitSuccessful:s}}=e;R(()=>{if(s&&d){o?.resetForm(),e.reset();return}if(s&&a){let t={...e.getValues()};a.forEach(r=>{t[r]=""}),o?.resetForm(),e.reset(t)}},[s,e,d,o,a]);let b=n(async i=>{try{let t=await o?.parseFormValues(i);o?.meta?.fields&&(o.meta.fields=E(i,o.fields),o.meta.fields.employer_currency_slug=o.meta.fields.currency);let r=await o?.onSubmit(t);if(await S?.(t),r?.data&&!r.error){let l={data:{...r.data.data,employments:r.data.data.employments?.map(m=>({...m,title:t.estimation_title}))}};await y?.(l)}else throw{data:null,error:r?.error,fieldErrors:r?.fieldErrors,rawError:r?.rawError}}catch(t){let r=t,l=r.fieldErrors;if(c){let m=o?.meta?.fields,h=f(l,m);c({error:r.error,rawError:r.rawError,fieldErrors:h})}else w?.(r.error)}},"handleSubmit");return u(C,{...e,children:u("form",{id:V,onSubmit:e.handleSubmit(b),className:"space-y-4 RemoteFlows__CostCalculatorForm",children:u(F,{fields:o?.fields??[]})})})}n(T,"CostCalculatorForm");export{T as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3OJVYYPZ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-ZOTT6IZN.js";import{a as i}from"./chunk-W7YC2IO2.js";import{a as c}from"./chunk-FHYOWPXB.js";import{a as S}from"./chunk-YIMWF5GR.js";import{a as f}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-ZOTT6IZN.js";import{a as i}from"./chunk-W7YC2IO2.js";import{a as c}from"./chunk-FHYOWPXB.js";import{a as S}from"./chunk-YIMWF5GR.js";import{a as f}from"./chunk-4S7BRDNF.js";import{a as n}from"./chunk-CR3X2TWM.js";import{a as p}from"./chunk-Y2LBI32D.js";import{a as s}from"./chunk-DHRMW63S.js";import{a as m}from"./chunk-KRJETP7I.js";import{c as e}from"./chunk-6EAABHVV.js";import{a as r}from"./chunk-PGWKJ6FK.js";import{a as t}from"./chunk-P37U34EQ.js";import{useId as D,useState as P}from"react";import{jsx as R}from"react/jsx-runtime";var L=t(({employmentId:d,companyId:u,countryCode:b,type:l="employee",externalId:v,skipSteps:g,initialValues:B,render:I,options:O})=>{let w=D(),o=e({companyId:u,countryCode:b,employmentId:d,type:l,options:O,skipSteps:g,externalId:v,initialValues:B}),[C,h]=P({showReserveInvoice:!1,showInviteSuccessful:!1});return R(r.Provider,{value:{formId:w,onboardingBag:o,creditScore:C,setCreditScore:h},children:I({onboardingBag:o,components:{BasicInformationStep:n,ContractDetailsStep:s,BenefitsStep:p,SubmitButton:i,SaveDraftButton:S,BackButton:m,OnboardingInvite:a,SelectCountryStep:f,ReviewStep:c}})})},"OnboardingFlow");export{L as a};
|
|
2
|
+
//# sourceMappingURL=chunk-3UEQXLRC.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-JEFPOHCP.js";import{b as i}from"./chunk-PGWKJ6FK.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function y({onSubmit:s,onSuccess:c,onError:t}){let{onboardingBag:o}=i(),u=e(async n=>{try{await s?.({countryCode:n.country});let r=await o.onSubmit(n);if(r?.data){await c?.(r?.data),o?.next();return}r?.error&&t?.({error:r.error,rawError:r.rawError,fieldErrors:[]})}catch(r){t?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),l=o.stepState.values?.select_country||o.initialValues.select_country;return d(a,{defaultValues:l,onSubmit:u})}e(y,"SelectCountryStep");export{y as a};
|
|
2
|
+
//# sourceMappingURL=chunk-4S7BRDNF.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-MXSKCQOT.js";import{a as r}from"./chunk-MJQUJZCD.js";import{a as t}from"./chunk-74ZEXZAY.js";import{a as f}from"./chunk-BTS5Q6UZ.js";import{a as e}from"./chunk-24FMEFH5.js";import{a as p}from"./chunk-7EUMRKH4.js";import{a as n}from"./chunk-WR5DSTKP.js";import{a as m}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{useId as c}from"react";import{jsx as F}from"react/jsx-runtime";var k=i(({employmentId:l,render:T,options:d,initialValues:s})=>{let u=c(),o=t({employmentId:l,options:d,initialValues:s});return F(m.Provider,{value:{formId:u,terminationBag:o},children:T({terminationBag:o,components:{SubmitButton:r,Back:n,EmployeeComunicationStep:e,TerminationDetailsStep:a,PaidTimeOffStep:p,AdditionalDetailsStep:f}})})},"TerminationFlow");export{k as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5JGEEJ3A.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as r}from"./chunk-VIGKOVHP.js";import{a as e}from"./chunk-P37U34EQ.js";import{cva as i}from"class-variance-authority";import{jsx as d}from"react/jsx-runtime";var o=i("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-badge text-badge-foreground rounded-full [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground rounded-full [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white rounded-full [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40",outline:"text-foreground rounded-full [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function c({className:t,variant:a,...n}){return d("span",{"data-slot":"badge",className:r(o({variant:a}),t),...n})}e(c,"Badge");export{o as a,c as b};
|
|
2
|
+
//# sourceMappingURL=chunk-6JTHV4QS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/ui/badge.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\n\nimport { cn } from '@/src/lib/utils';\n\nconst badgeVariants = cva(\n 'inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden',\n {\n variants: {\n variant: {\n default:\n 'border-transparent bg-badge text-badge-foreground rounded-full [a&]:hover:bg-primary/90',\n secondary:\n 'border-transparent bg-secondary text-secondary-foreground rounded-full [a&]:hover:bg-secondary/90',\n destructive:\n 'border-transparent bg-destructive text-white rounded-full [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40',\n outline:\n 'text-foreground rounded-full [a&]:hover:bg-accent [a&]:hover:text-accent-foreground',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nfunction Badge({\n className,\n variant,\n ...props\n}: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants>) {\n return (\n <span\n data-slot='badge'\n className={cn(badgeVariants({ variant }), className)}\n {...props}\n />\n );\n}\n\nexport { Badge, badgeVariants };\n"],"mappings":"gFACA,OAAS,OAAAA,MAA8B,2BA+BnC,cAAAC,MAAA,oBA3BJ,IAAMC,EAAgBC,EACpB,iZACA,CACE,SAAU,CACR,QAAS,CACP,QACE,0FACF,UACE,oGACF,YACE,kKACF,QACE,qFACJ,CACF,EACA,gBAAiB,CACf,QAAS,SACX,CACF,CACF,EAEA,SAASC,EAAM,CACb,UAAAC,EACA,QAAAC,EACA,GAAGC,CACL,EAAsE,CACpE,OACEN,EAAC,QACC,YAAU,QACV,UAAWO,EAAGN,EAAc,CAAE,QAAAI,CAAQ,CAAC,EAAGD,CAAS,EAClD,GAAGE,EACN,CAEJ,CAZSE,EAAAL,EAAA","names":["cva","jsx","badgeVariants","cva","Badge","className","variant","props","cn","__name"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as Y}from"./chunk-CJG77FUT.js";import{a as Q}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as Y}from"./chunk-CJG77FUT.js";import{a as Q}from"./chunk-YWOJ4NKF.js";import{a as J}from"./chunk-WURYTVWC.js";import{a as H}from"./chunk-NEKE5PRJ.js";import{a as U}from"./chunk-6DHV4GT6.js";import{a as W}from"./chunk-TRBEYNRN.js";import{a as q,b as B,c as L,d as z}from"./chunk-L5DII4MV.js";import{f as Z,g as K}from"./chunk-W4RON3XZ.js";import{a as R}from"./chunk-ZXGAFQXW.js";import{a as S}from"./chunk-RAH453TV.js";import{a as N}from"./chunk-YIOLMWB5.js";import{a as E}from"./chunk-EUSCQL4H.js";import{e as _}from"./chunk-T7O3YYOG.js";import{a as u,b as v}from"./chunk-YHCH57B7.js";import{q as $}from"./chunk-WQ4H5V7U.js";import{a as D}from"./chunk-VIGKOVHP.js";import{a as w}from"./chunk-X6ZAR7ZL.js";import{a as A}from"./chunk-TSPDJUGG.js";import{a as I}from"./chunk-Z5WMKCRJ.js";import{d as O}from"./chunk-KQPDXXG3.js";import{a as o}from"./chunk-P37U34EQ.js";import xe from"lodash.omitby";import je from"lodash.isnull";import{format as x,isFuture as Ve,parseISO as j,subDays as Pe}from"date-fns";import{useMemo as V}from"react";import be from"lodash.omit";import{useQuery as Fe}from"@tanstack/react-query";var G=o(({query:t,options:e})=>{let{client:y}=O();return Fe({queryKey:["payroll-calendars"],queryFn:o(()=>$({client:y,query:{year:t?.year,country_code:t?.countryCode}}),"queryFn"),enabled:e?.enabled,select:o(c=>c.data?.data?.payroll_calendars?.[0],"select")})},"usePayrollCalendars");import{isFuture as Me,isToday as ge,parseISO as Se}from"date-fns";var X=o(t=>{if(!t)return!1;let e=Se(t);return Me(e)||ge(e)},"isInProbationPeriod");import{Fragment as ke,jsx as m,jsxs as Ce}from"react/jsx-runtime";var lo=o(({employmentId:t,options:e,initialValues:y})=>{let{fieldValues:c,setFieldValues:ee,stepState:l,previousStep:oe,nextStep:ie}=A(q),{data:n,isLoading:te}=N({employmentId:t,queryParams:{exclude_files:!0}}),{data:ne}=G({query:{year:new Date().getFullYear().toString(),countryCode:n?.country?.code},options:{enabled:!!n?.country?.code}}),T=X(n?.probation_period_end_date),F=B(ne),P=V(()=>T?x(new Date,"yyyy-MM-dd"):x(F,"yyyy-MM-dd"),[T,F]),M=!!(n?.provisional_start_date&&Ve(j(n.provisional_start_date))),ae={personal_email:n?.basic_information?.email},g=z({...ae,...y,...l.values?.employee_communication,...l.values?.termination_details,...l.values?.paid_time_off,...l.values?.additional_information},M),d=V(()=>({...g,...c}),[c,g]),b=L({minTerminationDate:F,isEmployeeInProbationPeriod:T,selectedDate:j(d.proposed_termination_date)}),re=V(()=>{let s=R.data.schema.properties.termination_reason.oneOf,a=M?s.filter(i=>i.const==="cancellation_before_start_date"):s.filter(i=>i.const!=="cancellation_before_start_date");return{fields:{risk_assesment_info:S("Offboarding risk assessment","Employees may be protected from termination if they fall into certain categories. To help avoid claims from employees, let us know if the employee is part of one or more of these categories. Select all that apply.",{className:e?.jsfModify?.fields?.risk_assesment_info?.["x-jsf-presentation"]?.className}),termination_reason:{...e?.jsfModify?.fields?.termination_reason,oneOf:a},proposed_termination_date_info:S("Proposed termination date",Ce(ke,{children:["In most cases, Remote must provide notice to the employee before termination. The required notice period depends on local labor laws, the employment agreement, and other factors. We'll use those factors to determine the required notice period.",m(v,{external:!0,zendeskId:u.terminationNoticePeriods,className:D("text-sm",e?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.zendeskTriggerButtonClassName),children:"Learn about notice periods"})]}),{className:e?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.className}),proposed_termination_date:{...e?.jsfModify?.fields?.proposed_termination_date,"x-jsf-presentation":{...e?.jsfModify?.fields?.proposed_termination_date?.["x-jsf-presentation"],minDate:P,...d.termination_reason==="cancellation_before_start_date"&&n?.provisional_start_date?{maxDate:x(Pe(j(n.provisional_start_date),1),"yyyy-MM-dd")}:{},...b},...d.termination_reason==="cancellation_before_start_date"?{"x-jsf-errorMessage":{maximum:"The proposed termination date must be before the employee's start date."}}:{}},paid_time_off_info:{...e?.jsfModify?.fields?.paid_time_off_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.paid_time_off_info?.["x-jsf-presentation"],Component:o(()=>{let i=e?.jsfModify?.fields?.paid_time_off_info?.["x-jsf-presentation"]?.Component;return m(J,{employeeName:n?.basic_information?.name,proposedTerminationDate:d.proposed_termination_date,employmentId:t,employment:n,render:r=>i?m(i,{...r}):m(Q,{...r})})},"Component")}},acknowledge_termination_procedure_info:{...e?.jsfModify?.fields?.acknowledge_termination_procedure_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.acknowledge_termination_procedure_info?.["x-jsf-presentation"],Component:o(()=>{let i=e?.jsfModify?.fields?.acknowledge_termination_procedure_info?.["x-jsf-presentation"]?.Component;return m(U,{render:r=>i?m(i,{...r}):m(W,{...r})})},"Component")}},acknowledge_termination_procedure_fees_info:{...e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info?.["x-jsf-presentation"],Component:o(()=>{let i={involuntaryOffboardingServiceChargeZendeskId:u.involuntaryOffboardingServiceCharge,reconciliationInvoiceZendeskId:u.reconciliationInvoice},r=e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info?.["x-jsf-presentation"]?.Component;return r?m(r,{...i}):m(Y,{...i})},"Component")}}}}},[n,t,d.proposed_termination_date,d.termination_reason,M,P,e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info,e?.jsfModify?.fields?.acknowledge_termination_procedure_info,e?.jsfModify?.fields?.paid_time_off_info,e?.jsfModify?.fields?.proposed_termination_date,e?.jsfModify?.fields?.proposed_termination_date_info,e?.jsfModify?.fields?.risk_assesment_info,e?.jsfModify?.fields?.termination_reason,b]),{data:f,isLoading:se}=K({formValues:d,jsfModify:{...e?.jsfModify,fields:{...e?.jsfModify?.fields,...re?.fields}},step:l.currentStep.name}),me=E(H.data.schema),k=Z(),{mutateAsync:de}=w(k);async function fe(s){if(!t)throw new Error("Employment id is missing");if(f){let a=await C(s,!0),{customer_informed_employee:i}=a,r=i==="yes"?{employee_awareness:{date:a.customer_informed_employee_date,note:a.customer_informed_employee_description}}:void 0,ue=await I(a,["agrees_to_pto_amount","confidential","customer_informed_employee","will_challenge_termination"]),_e=be(ue,"customer_informed_employee_date","customer_informed_employee_description"),ye=xe({..._e,...r},je),p=a.timesheet_file??[],h=Array.isArray(p)&&p.length>0?{content:p[0].content,name:p[0].name}:void 0,Te={employment_id:t,termination_details:{...ye,timesheet_file:h||void 0},type:"termination"};return de(Te)}}o(fe,"onSubmit");function le(){oe()}o(le,"back");function ce(){ie()}o(ce,"next");let pe=Object.keys(c).length>0,C=o(async(s,a=!1)=>a?await _(s,me.fields,{isPartialValidation:!0}):f?await _(s,f?.fields,{isPartialValidation:!0}):{},"parseFormValues");return{employmentId:t,employment:n,fieldValues:d,isDirty:pe,stepState:l,fields:f?.fields||[],isLoading:se||te,isSubmitting:k.isPending,initialValues:g,handleValidation:o(async s=>{if(f){let a=await _(s,f?.fields);return f?.handleValidation(a)}return null},"handleValidation"),checkFieldUpdates:ee,parseFormValues:C,onSubmit:fe,back:le,next:ce}},"useTermination");export{lo as a};
|
|
2
|
+
//# sourceMappingURL=chunk-74ZEXZAY.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-Z6B3PA4M.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 d({onSubmit:m}){let{terminationBag:o}=a(),r=i(async t=>{let n=await o?.parseFormValues(t);await m?.(n),o?.next()},"handleSubmit");return s(e,{defaultValues:o.fieldValues,onSubmit:r})}i(d,"PaidTimeOffForm");export{d as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7EUMRKH4.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-JDVILEVL.js";import{b as a}from"./chunk-Q3ALCPJN.js";import{k as n}from"./chunk-VIGKOVHP.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as b}from"react/jsx-runtime";function g({onSubmit:l,onSuccess:u,onError:d}){let{contractorOnboardingBag:i}=a(),m=e(async t=>{try{let o=await i.parseFormValues(t);await l?.(o);let r=await i.onSubmit(t);if(r?.data){await u?.(r?.data),r?._skipNextStep||i?.next();return}}catch(o){let r=n(o,i.meta?.fields?.eligibility_questionnaire);d?.(r)}},"handleSubmit"),p=i.stepState.values?.eligibility_questionnaire||i.initialValues.eligibility_questionnaire;return b(s,{defaultValues:p,onSubmit:m})}e(g,"EligibilityQuestionnaireStep");export{g as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7M7VN4WI.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d}from"./chunk-3C6N7DK6.js";import{a as c}from"./chunk-JDVILEVL.js";import{b as s}from"./chunk-Q3ALCPJN.js";import{c as l}from"./chunk-AHRG5QCS.js";import{k as e}from"./chunk-VIGKOVHP.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as m,jsxs as g}from"react/jsx-runtime";function O({onSubmit:p,onSuccess:u,onError:S}){let{contractorOnboardingBag:r}=s(),C=a(async n=>{try{let t=await r.parseFormValues(n);await p?.(t);let o=await r.onSubmit(n);if(o?.data){await u?.(o?.data),r?.next();return}}catch(t){let o=e(t,r.meta?.fields?.contract_details);S?.(o)}},"handleSubmit"),f=r.stepState.values?.contract_details||r.initialValues.contract_details,i=r.stepState.values?.pricing_plan?.subscription,b=l(i);return g("div",{className:"space-y-4",children:[m(c,{defaultValues:f,onSubmit:C}),b&&m(d,{subscription:i})]})}a(O,"ContractDetailsStep");export{O as a};
|
|
2
|
+
//# sourceMappingURL=chunk-AFHSKSGA.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,b as s,e as l,h as c,i as d}from"./chunk-PX5PE6GX.js";import{a as n}from"./chunk-P37U34EQ.js";function _(e={}){let o=[{name:"select_country",label:"Select Country",visible:!!e?.includeSelectCountry},{name:"basic_information",label:"Basic Information",visible:!0},{name:"pricing_plan",label:"Pricing Plan",visible:!0},{name:"eligibility_questionnaire",label:"Eligibility Questionnaire",visible:!!e?.includeEligibilityQuestionnaire},{name:"contract_details",label:"Contract Details",visible:!0},{name:"contract_preview",label:"Contract Preview",visible:!!e?.includeContractPreview},{name:"review",label:"Review",visible:!0}].map((i,r)=>({name:i.name,index:r,label:i.label,visible:i.visible}));return{steps:o.reduce((i,r)=>(i[r.name]={index:r.index,name:r.name,visible:r.visible},i),{}),stepsArray:o}}n(_,"buildSteps");var E=n((e,t)=>{if(e&&t&&e!==t)return`When the contractor will start providing service to your company. ${`This date does not match the date you provided in the Basic Information step - ${e} - and will override it only when both parties have signed the contract.`}`},"calculateProvisionalStartDateDescription"),v=n(e=>e===a||e===s,"isCMOrCMPlus"),p=["SAU","KWT","OMN","QAT","BHR"],g=n(e=>p.includes(e),"isNationalityCountryCode"),y=n((e,t)=>!t||t.length===0?!0:!t.some(o=>l[o]===e),"shouldIncludeProduct"),S=["invited","created_awaiting_reserve","created_reserve_paid"],f=["created_awaiting_reserve","invited"];function R(e){return e?d:c}n(R,"transformAiErrorResponse");export{_ as a,E as b,v as c,g as d,y as e,S as f,f as g,R as h};
|
|
2
|
+
//# sourceMappingURL=chunk-AHRG5QCS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/flows/ContractorOnboarding/utils.ts"],"sourcesContent":["import { Step } from '@/src/flows/useStepState';\nimport {\n contractorStandardProductIdentifier,\n contractorPlusProductIdentifier,\n ProductType,\n PRODUCT_IDENTIFIER_MAP,\n REMOTE_AI_SERVICES_AND_DELIVERABLES_ERROR_MESSAGE,\n REMOTE_AI_SERVICES_AND_DELIVERABLES_COR_ERROR_MESSAGE,\n} from '@/src/flows/ContractorOnboarding/constants';\nimport { Employment } from '@/src/flows/Onboarding/types';\n\nexport type StepKeys =\n | 'select_country'\n | 'basic_information'\n | 'contract_details'\n | 'eligibility_questionnaire'\n | 'contract_preview'\n | 'pricing_plan'\n | 'review';\n\ntype StepConfig = {\n includeSelectCountry?: boolean;\n includeEligibilityQuestionnaire?: boolean;\n includeContractPreview?: 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: 'pricing_plan',\n label: 'Pricing Plan',\n visible: true,\n },\n {\n name: 'eligibility_questionnaire',\n label: 'Eligibility Questionnaire',\n visible: Boolean(config?.includeEligibilityQuestionnaire),\n },\n {\n name: 'contract_details',\n label: 'Contract Details',\n visible: true,\n },\n {\n name: 'contract_preview',\n label: 'Contract Preview',\n visible: Boolean(config?.includeContractPreview),\n },\n {\n name: 'review',\n label: 'Review',\n visible: true,\n },\n ];\n\n const stepsArray = stepDefinitions.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 * Calculates the description for the provisional start date field\n * based on whether the dates match between basic information and contract details steps\n */\nexport const calculateProvisionalStartDateDescription = (\n employmentProvisionalStartDate: string | undefined,\n fieldProvisionalStartDate: string | undefined,\n): string | undefined => {\n const datesNotMatching =\n employmentProvisionalStartDate &&\n fieldProvisionalStartDate &&\n employmentProvisionalStartDate !== fieldProvisionalStartDate;\n\n if (datesNotMatching) {\n const datesDontMatchWarning = `This date does not match the date you provided in the Basic Information step - ${\n employmentProvisionalStartDate\n } - and will override it only when both parties have signed the contract.`;\n return `When the contractor will start providing service to your company. ${datesDontMatchWarning}`;\n }\n return undefined;\n};\n\n/**\n * Checks if the selected pricing plan is CM (standard) or CM+ (plus)\n */\nexport const isCMOrCMPlus = (subscription: string | undefined): boolean => {\n return (\n subscription === contractorStandardProductIdentifier ||\n subscription === contractorPlusProductIdentifier\n );\n};\n\nconst NATIONALITY_COUNTRY_CODES = ['SAU', 'KWT', 'OMN', 'QAT', 'BHR'];\n\n/**\n * Checks if the country code is a country code that requires nationality status field\n */\nexport const isNationalityCountryCode = (countryCode: string) => {\n return NATIONALITY_COUNTRY_CODES.includes(countryCode);\n};\n\n/**\n * Checks if a product should be included based on the excludeProducts list\n * @param productIdentifier - The product identifier to check\n * @param excludeProducts - Array of products to exclude\n * @returns true if the product should be included, false otherwise\n */\nexport const shouldIncludeProduct = (\n productIdentifier: string,\n excludeProducts?: ProductType[],\n): boolean => {\n if (!excludeProducts || excludeProducts.length === 0) {\n return true;\n }\n\n return !excludeProducts.some(\n (excluded) => PRODUCT_IDENTIFIER_MAP[excluded] === productIdentifier,\n );\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 'invited',\n 'created_awaiting_reserve',\n 'created_reserve_paid',\n];\n\nexport const disabledInviteButtonEmploymentStatus: Employment['status'][] = [\n 'created_awaiting_reserve',\n 'invited',\n];\n\n/**\n * Transforms AI error messages to use default localized messages\n * @param isContractorOfRecord - Whether the contractor is a Contractor of Record\n * @param errors - Array of error messages from the API\n * @returns Array containing the appropriate default error message\n */\nexport function transformAiErrorResponse(\n isContractorOfRecord: boolean,\n): string {\n const remoteAiErrorMessage = isContractorOfRecord\n ? REMOTE_AI_SERVICES_AND_DELIVERABLES_COR_ERROR_MESSAGE\n : REMOTE_AI_SERVICES_AND_DELIVERABLES_ERROR_MESSAGE;\n return remoteAiErrorMessage;\n}\n"],"mappings":"uGA0BO,SAASA,EAAWC,EAAqB,CAAC,EAAG,CA2ClD,IAAMC,EAtCD,CACH,CACE,KAAM,iBACN,MAAO,iBACP,QAAS,EAAQD,GAAQ,oBAC3B,EACA,CACE,KAAM,oBACN,MAAO,oBACP,QAAS,EACX,EACA,CACE,KAAM,eACN,MAAO,eACP,QAAS,EACX,EACA,CACE,KAAM,4BACN,MAAO,4BACP,QAAS,EAAQA,GAAQ,+BAC3B,EACA,CACE,KAAM,mBACN,MAAO,mBACP,QAAS,EACX,EACA,CACE,KAAM,mBACN,MAAO,mBACP,QAAS,EAAQA,GAAQ,sBAC3B,EACA,CACE,KAAM,SACN,MAAO,SACP,QAAS,EACX,CACF,EAEmC,IAAI,CAACE,EAAMC,KAAW,CACvD,KAAMD,EAAK,KACX,MAAAC,EACA,MAAOD,EAAK,MACZ,QAASA,EAAK,OAChB,EAAE,EAcF,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,CA/DgBI,EAAAN,EAAA,cAqET,IAAMO,EAA2CD,EAAA,CACtDE,EACAC,IACuB,CAMvB,GAJED,GACAC,GACAD,IAAmCC,EAMnC,MAAO,qEAHuB,kFAC5BD,CACF,0EACiG,EAGrG,EAhBwD,4CAqB3CE,EAAeJ,EAACK,GAEzBA,IAAiBC,GACjBD,IAAiBE,EAHO,gBAOtBC,EAA4B,CAAC,MAAO,MAAO,MAAO,MAAO,KAAK,EAKvDC,EAA2BT,EAACU,GAChCF,EAA0B,SAASE,CAAW,EADf,4BAU3BC,EAAuBX,EAAA,CAClCY,EACAC,IAEI,CAACA,GAAmBA,EAAgB,SAAW,EAC1C,GAGF,CAACA,EAAgB,KACrBC,GAAaC,EAAuBD,CAAQ,IAAMF,CACrD,EAVkC,wBAmBvBI,EAA4D,CACvE,UACA,2BACA,sBACF,EAEaC,EAA+D,CAC1E,2BACA,SACF,EAQO,SAASC,EACdC,EACQ,CAIR,OAH6BA,EACzBC,EACAC,CAEN,CAPgBrB,EAAAkB,EAAA","names":["buildSteps","config","stepsArray","step","index","acc","__name","calculateProvisionalStartDateDescription","employmentProvisionalStartDate","fieldProvisionalStartDate","isCMOrCMPlus","subscription","contractorStandardProductIdentifier","contractorPlusProductIdentifier","NATIONALITY_COUNTRY_CODES","isNationalityCountryCode","countryCode","shouldIncludeProduct","productIdentifier","excludeProducts","excluded","PRODUCT_IDENTIFIER_MAP","reviewStepAllowedEmploymentStatus","disabledInviteButtonEmploymentStatus","transformAiErrorResponse","isContractorOfRecord","REMOTE_AI_SERVICES_AND_DELIVERABLES_COR_ERROR_MESSAGE","REMOTE_AI_SERVICES_AND_DELIVERABLES_ERROR_MESSAGE"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-QJ2XK63I.js";import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-QJ2XK63I.js";import{a as r}from"./chunk-LSW66EIR.js";import{a}from"./chunk-U6LRMWRI.js";import{a as c}from"./chunk-POKLRB3M.js";import{a as e}from"./chunk-D5AR26AI.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-BLGKOMH3.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-Z6B3PA4M.js";import{b as e}from"./chunk-MRYRNB7Y.js";import{a as r}from"./chunk-P37U34EQ.js";import{jsx as u}from"react/jsx-runtime";function F({onSubmit:t,onSuccess:s,onError:m}){let{terminationBag:o}=e(),d=r(async a=>{let l=await o?.parseFormValues(a,!0);await t?.(l);let i=await o?.onSubmit(a);i?.error?m?.(i.rawError):i?.data&&await s?.(i.data)},"handleSubmit");return u(n,{defaultValues:o.fieldValues,fields:o?.fields,onSubmit:d})}r(F,"AdditionalDetailsForm");export{F as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BTS5Q6UZ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as _,b as g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as _,b as g}from"./chunk-JTPKAIYL.js";import{a as F}from"./chunk-SNECOPBD.js";import{g as S}from"./chunk-T7O3YYOG.js";import{b as T}from"./chunk-YHCH57B7.js";import{c}from"./chunk-7EONM7HL.js";import{e as m}from"./chunk-VIGKOVHP.js";import{a as i}from"./chunk-P37U34EQ.js";import{Fragment as x}from"react";var d={..._,fieldset:g,"fieldset-flat":g};import{useEffect as P}from"react";import{Fragment as R,jsx as p,jsxs as h}from"react/jsx-runtime";var C=i(({name:e,description:a,helpCenter:n})=>h("span",{children:[p("span",{className:`text-xs RemoteFlows__ForcedValue__Description__${e}`,dangerouslySetInnerHTML:{__html:m(a)}}),n?.callToAction&&n?.id&&p(T,{className:"RemoteFlows__ForcedValue__HelpCenterLink",zendeskId:n.id,children:n.callToAction})]}),"Description");function k({name:e,value:a,description:n,statement:r,label:u,helpCenter:l}){let{setValue:t}=c(),s=m(r?.description||n);return P(()=>{t(e,a)},[]),p("div",{children:r?h(R,{children:[p("p",{className:`text-sm RemoteFlows__ForcedValue__Title__${e}`,dangerouslySetInnerHTML:{__html:m(r?.title||u)}}),p(C,{name:e,description:m(r?.description||n),helpCenter:l})]}):p(C,{name:e,description:s,helpCenter:l})})}i(k,"ForcedValueField");import{Fragment as M,jsx as o,jsxs as y}from"react/jsx-runtime";function J(e){return e.const!==void 0&&e.const===e.default&&e.inputType!=="checkbox"&&e.inputType!=="hidden"}i(J,"checkFieldHasForcedValue");var G=i(({fields:e,fieldsets:a,fieldValues:n,components:r})=>{let{setValue:u}=c();if(!e||e.length===0)return null;let l=a&&n?S({fields:e,fieldsets:a,values:n}):e;return o(M,{children:l.map(t=>{if(t.calculateDynamicProperties&&(t={...t,...t.calculateDynamicProperties(n,t)||{}}),t.isVisible===!1||t.deprecated||t.hidden)return null;if(J(t))return o(k,{name:t.name,description:t.description,value:t.const,statement:t.statement,label:t.label,helpCenter:t.meta?.helpCenter},t.name);if(t.Component){let{Component:b}=t;return y(x,{children:[o(b,{setValue:V=>u(t.name,V),...t}),t.statement?o(F,{...t.statement}):null,t.extra?t.extra:null]},t.name)}let s=d[t.inputType];return s?t.inputType==="fieldset"?o(s,{...t,components:r},t.name):t.inputType==="fieldset-flat"?o(s,{...t,components:r,isFlatFieldset:!0},t.name):(t.inputType==="select"&&t.multiple&&(s=d["multi-select"]),y(x,{children:[o(s,{...t,component:r&&r[t.inputType]}),t.statement?o(F,{...t.statement}):null,t.extra?t.extra:null]},t.name)):y("p",{className:"error",children:["Field type ",t.inputType," not supported"]})})})},"JSONSchemaFormFields");export{G as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BUOCIXUH.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as e}from"./chunk-MP3VDCI7.js";import{a as t}from"./chunk-VIGKOVHP.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as p}from"react/jsx-runtime";var s=o(({isExpanded:l,onToggle:n,className:m,...i})=>p(e,{type:"button",className:t("RemoteFlows__Button RemoteFlows__FieldSetField__ToggleButton",m),variant:"default",onClick:n,...i,children:l?"Remove":"Define"}),"FieldsetToggleButtonDefault");export{s as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BYDQHL6O.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-JEFPOHCP.js";import{b as s}from"./chunk-PGWKJ6FK.js";import{b as t}from"./chunk-X6ZAR7ZL.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-CR3X2TWM.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as R,b as x,c as N,d as A}from"./chunk-KRSUSMJK.js";import{a as w,b as f}from"./chunk-YHCH57B7.js";import{a as C}from"./chunk-TFSRZOMP.js";import{b as B}from"./chunk-RJY6AEJB.js";import{a as i,b as t,e as F}from"./chunk-VIGKOVHP.js";import{a as m}from"./chunk-P37U34EQ.js";import{MoreHorizontal as P}from"lucide-react";import{useState as U}from"react";import{Fragment as $,jsx as g,jsxs as T}from"react/jsx-runtime";function E({actions:e=[],className:n,label:a,"data-testid":l}){let[_,d]=U(!1);return T("div",{className:i("relative",n),children:[g(B,{"data-testid":l,variant:"ghost","aria-label":a,className:"h-8 w-8 p-0",onClick:()=>d(!_),children:g(P,{className:"h-4 w-4"})}),_&&T($,{children:[g("div",{className:"fixed inset-0 z-40",onClick:()=>d(!1)}),g("div",{className:"absolute right-0 top-1/2 mt-1 bg-white border border-gray-200 rounded-md shadow-lg z-50 min-w-[120px]",children:e.map((c,u)=>g("button",{"data-testid":`${l}-${c.label.toLowerCase().replace(" ","-")}`,className:i("w-full text-left px-2 py-1.5 text-sm hover:bg-gray-100",c.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>{c.onClick(),d(!1)},disabled:c.disabled,children:c.label},u))})]})]})}m(E,"ActionsDropdown");import{ChevronDown as O,Info as Z}from"lucide-react";import K from"react-flagpack";import{useState as z}from"react";import{jsx as j,jsxs as L}from"react/jsx-runtime";var I=m(({children:e,content:n})=>L("div",{className:"relative inline-block group",children:[e,L("div",{className:"absolute bottom-full right-0 mb-2 px-3 py-2 bg-gray-900 text-white text-xs rounded-md opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50 w-64 whitespace-normal break-words",children:[n,j("div",{className:"absolute top-full right-3 border-4 border-transparent border-t-gray-900"})]})]}),"BasicTooltip");import{Fragment as b,jsx as o,jsxs as r}from"react/jsx-runtime";var V={GB:"GB-UKM"},Y=m(({title:e,country:n,region:a,annualGrossSalary:l,onDelete:_,onExportPdf:d,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:d},{label:"Delete",onClick:_}];return r("div",{className:"RemoteFlows__EstimationResults__Header flex justify-between",children:[r("div",{className:"flex flex-row items-center gap-6",children:[o("div",{className:"RemoteFlows__EstimationResultsHeader__FlagContainer flex h-16 w-16 items-center justify-center rounded-lg bg-[#F4F4F5]",children:o(K,{code:V[n.alpha_2_code]||n.alpha_2_code})}),r("div",{className:"space-y-1",children:[o("h2",{"data-testid":"estimation-results-header-title",className:"RemoteFlows__EstimationResultsHeader__Title text-lg font-medium leading-none text-[#181818]",children:e}),r("p",{className:"RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]",children:[n.name," ",a?` (${a.name})`:""]}),r("p",{"data-testid":"estimation-results-header-annual-gross-salary",className:"RemoteFlows__EstimationResultsHeader__AnnualGrossSalary text-xs text-[#71717A]",children:[o("span",{className:"text-[#181818]",children:"Employee annual gross salary:"})," ",l]})]})]}),o(E,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),q=m(()=>({steps:[{id:"add-employment-details",title:"Add employment details",description:"You add employee employments details."},{id:"invite-employee",title:"Invite employee",description:"Hire receives an email invitation from Remote to start the self-enrollment process."},{id:"verify-information",title:"Verify information",description:"Remote prepares the Employment Agreement and verifies all the information."},{id:"sign-contract",title:"Sign contract",description:"All parties sign the Employment Agreement and are ready to start. \u{1F389}"}],helpText:"For customers who accept Remote's Terms of Service (ToS), the employee onboarding timeline starts once the employee has been invited to the platform and completed self enrollment.",zendeskArticleId:w.employeeOnboardingTimeline}),"getOnboardingTimelineData");function J({minimumOnboardingDays:e,data:n,className:a}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",a),children:r(x,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4",children:r("div",{className:"flex items-center justify-between w-full",children:[o("span",{className:"RemoteFlows__OnboardingTimeline__Title text-base font-medium text-[#0F172A]",children:"Onboarding timeline"}),e!=null&&r("span",{className:"RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4",children:[e," days"]})]})}),r(A,{className:"px-0 pb-4",children:[o("ul",{className:"RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2",children:n.steps.map(l=>r("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:l.title})," ","- ",l.description]},l.id))}),r("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[n.helpText,n.zendeskArticleId&&o(f,{zendeskId:n.zendeskArticleId,children:"Learn more"})]})]})]})})}m(J,"OnboardingTimeline");function Q({className:e,countryBenefitsUrl:n,countryGuideUrl:a,country:l}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__HiringSection w-full",e),children:r(x,{value:"timeline",className:"RemoteFlows__HiringSection__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__HiringSection__AccordionTrigger hover:no-underline px-0 py-4",children:o("div",{className:"flex items-center justify-between w-full",children:r("span",{className:"text-base font-medium text-[#0F172A]",children:["Hiring in ",l.name]})})}),o(A,{children:r("div",{className:"flex flex-col gap-1",children:[a&&o("a",{href:a,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),n&&o("a",{href:n,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}m(Q,"HiringSection");function W({isMultipleCurrency:e,className:n}){return r("div",{className:i("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",n),children:[o("span",{"aria-hidden":!0}),e?r(b,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):r(b,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}m(W,"EstimationHeaders");function S({label:e,amounts:n,className:a,children:l}){let[_,d]=z(!0);return r("div",{className:i("RemoteFlows__EstimationResults__Row",a),children:[r("div",{className:"RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center",children:[r("div",{className:"RemoteFlows__EstimationRow__LabelContainer flex items-center gap-2",children:[o("span",{className:i("RemoteFlows__EstimationRow__Title min-w-[140px] font-medium text-[#09090B]"),children:e}),o("button",{onClick:()=>d(!_),className:"RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded",children:o(O,{className:`h-4 w-4 text-muted-foreground transition-transform ${_?"rotate-180":""}`})})]}),Array.isArray(n)?n.map((c,u)=>o("span",{className:i("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:c},u)):r(b,{children:[o("span",{}),o("span",{className:i("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:n})]})]}),_&&l&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:l})]})}m(S,"EstimationRow");function X({item:e,isMultipleCurrency:n,level:a=0}){let[l,_]=z(!1),d=e.children&&e.children.length>0,c=a>0,u=e.isCollapsible||d;return r("li",{className:i("RemoteFlows__BreakdownList__Item pb-3",c&&"pb-1"),children:[r("div",{className:i(n?"RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between":"RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between"),children:[r("div",{className:i("RemoteFlows__BreakdownList__LabelContainer flex items-center gap-2",c&&"pl-3"),children:[!c&&o("span",{className:"RemoteFlows__BreakdownList__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0","aria-hidden":"true"}),u?r("button",{onClick:()=>_(!l),className:"RemoteFlows__BreakdownList__CollapseButton flex items-center gap-2 hover:bg-gray-100 rounded p-1",children:[o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B]"),children:e.label}),o(O,{className:`RemoteFlows__BreakdownList__ChevronDown h-3 w-3 text-muted-foreground transition-transform ${l?"rotate-180":""}`})]}):o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B] p-1"),children:e.label}),e.tooltip&&o(I,{content:r(b,{children:[o("span",{dangerouslySetInnerHTML:{__html:F(e.tooltip)}})," ",e.zendeskId&&o(f,{zendeskId:Number(e.zendeskId),children:"Learn more"})]}),children:o("button",{className:"RemoteFlows__BreakdownList__InfoButton p-1 hover:bg-gray-100 rounded",children:o(Z,{className:i("RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground",c?"h-3 w-3":"h-4 w-4")})})})]}),n?r(b,{children:[o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employee-amount",className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"}),o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employer-amount",className:i("RemoteFlows__BreakdownList__EmployerAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__EmployerAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__EmployerAmountText--NotNested text-[#09090B]"),children:e.employerAmount||"\u2014"})]}):o("span",{"data-testid":e.dataSelector,className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"})]}),d&&l&&o("div",{className:"mt-1",children:o(h,{items:e.children,isMultipleCurrency:n,level:a+1})})]})}m(X,"BreakdownListItem");function h({items:e,isMultipleCurrency:n,className:a,level:l}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",a),children:e.map((_,d)=>o(X,{item:_,isMultipleCurrency:n,level:l},d))})}m(h,"BreakdownList");var Re=m(({estimation:e,title:n,components:a,onDelete:l,onExportPdf:_,onEdit:d})=>{let c=a?.HiringSection||Q,u=a?.OnboardingTimeline||J,H=a?.Header||Y,v=a?.Footer,D=q(),p=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,k=e.employer_currency_costs.monthly_management_fee,M=e.region.code!==e.country.code,G=t(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code);return r(C,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(H,{title:n,annualGrossSalary:G,region:M?e.region:void 0,country:e.country,onDelete:l,onExportPdf:_,onEdit:d})}),r("div",{className:"RemoteFlows__Separator",children:[o(W,{isMultipleCurrency:p,className:"mb-3"}),o(S,{label:"Monthly total cost",amounts:p?[t(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),t(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.code)]:t(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),children:o(h,{items:[{label:"Gross monthly salary",regionalAmount:t(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.monthly_gross_salary,e.employer_currency_costs.currency.code),zendeskId:w.extraPayments.toString(),tooltip:"This country respects extra payments on top of the gross salary."},{label:"Mandatory employer costs",regionalAmount:t(e.regional_currency_costs.monthly_contributions_total,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.monthly_contributions_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.monthly_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.monthly_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:t(e.regional_currency_costs.monthly_benefits_total,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.monthly_benefits_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.monthly_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.monthly_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...k?[{label:"Monthly fee",regionalAmount:t(e.regional_currency_costs.monthly_management_fee,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.monthly_management_fee,e.employer_currency_costs.currency.code),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})]}),o("div",{className:"RemoteFlows__Separator",children:o(S,{label:"Annual total cost",amounts:p?[t(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),t(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.code)]:t(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),children:o(h,{items:[{label:"Gross annual salary",dataSelector:"annual-gross-salary",regionalAmount:t(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.code)},{label:"Mandatory employer costs",regionalAmount:t(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.annual_contributions_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.annual_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.annual_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:t(e.regional_currency_costs.annual_benefits_total,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.annual_benefits_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.annual_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.annual_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Extra statutory payments",regionalAmount:t(e.regional_currency_costs.extra_statutory_payments_total,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.extra_statutory_payments_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.extra_statutory_payments_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.extra_statutory_payments_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...k?[{label:"Annual fee",regionalAmount:t(e.regional_currency_costs.annual_management_fee,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.annual_management_fee,e.employer_currency_costs.currency.code),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})}),o("div",{className:"RemoteFlows__Separator",children:o(u,{minimumOnboardingDays:e.minimum_onboarding_time,data:D})}),o(c,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),v&&o(v,{})]})},"EstimationResults");export{Re as a};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as R,b as x,c as N,d as A}from"./chunk-KRSUSMJK.js";import{a as w,b as f}from"./chunk-YHCH57B7.js";import{a as C}from"./chunk-TFSRZOMP.js";import{b as B}from"./chunk-MP3VDCI7.js";import{a as i,b as t,e as F}from"./chunk-VIGKOVHP.js";import{a as m}from"./chunk-P37U34EQ.js";import{MoreHorizontal as P}from"lucide-react";import{useState as U}from"react";import{Fragment as $,jsx as g,jsxs as T}from"react/jsx-runtime";function E({actions:e=[],className:n,label:a,"data-testid":l}){let[_,d]=U(!1);return T("div",{className:i("relative",n),children:[g(B,{"data-testid":l,variant:"ghost","aria-label":a,className:"h-8 w-8 p-0",onClick:()=>d(!_),children:g(P,{className:"h-4 w-4"})}),_&&T($,{children:[g("div",{className:"fixed inset-0 z-40",onClick:()=>d(!1)}),g("div",{className:"absolute right-0 top-1/2 mt-1 bg-white border border-gray-200 rounded-md shadow-lg z-50 min-w-[120px]",children:e.map((c,u)=>g("button",{"data-testid":`${l}-${c.label.toLowerCase().replace(" ","-")}`,className:i("w-full text-left px-2 py-1.5 text-sm hover:bg-gray-100",c.disabled&&"opacity-50 cursor-not-allowed"),onClick:()=>{c.onClick(),d(!1)},disabled:c.disabled,children:c.label},u))})]})]})}m(E,"ActionsDropdown");import{ChevronDown as O,Info as Z}from"lucide-react";import K from"react-flagpack";import{useState as z}from"react";import{jsx as j,jsxs as L}from"react/jsx-runtime";var I=m(({children:e,content:n})=>L("div",{className:"relative inline-block group",children:[e,L("div",{className:"absolute bottom-full right-0 mb-2 px-3 py-2 bg-gray-900 text-white text-xs rounded-md opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50 w-64 whitespace-normal break-words",children:[n,j("div",{className:"absolute top-full right-3 border-4 border-transparent border-t-gray-900"})]})]}),"BasicTooltip");import{Fragment as b,jsx as o,jsxs as r}from"react/jsx-runtime";var V={GB:"GB-UKM"},Y=m(({title:e,country:n,region:a,annualGrossSalary:l,onDelete:_,onExportPdf:d,onEdit:c})=>{let u=[{label:"Edit",onClick:c},{label:"Export",onClick:d},{label:"Delete",onClick:_}];return r("div",{className:"RemoteFlows__EstimationResults__Header flex justify-between",children:[r("div",{className:"flex flex-row items-center gap-6",children:[o("div",{className:"RemoteFlows__EstimationResultsHeader__FlagContainer flex h-16 w-16 items-center justify-center rounded-lg bg-[#F4F4F5]",children:o(K,{code:V[n.alpha_2_code]||n.alpha_2_code})}),r("div",{className:"space-y-1",children:[o("h2",{"data-testid":"estimation-results-header-title",className:"RemoteFlows__EstimationResultsHeader__Title text-lg font-medium leading-none text-[#181818]",children:e}),r("p",{className:"RemoteFlows__EstimationResultsHeader__Country text-xs text-[#71717A]",children:[n.name," ",a?` (${a.name})`:""]}),r("p",{"data-testid":"estimation-results-header-annual-gross-salary",className:"RemoteFlows__EstimationResultsHeader__AnnualGrossSalary text-xs text-[#71717A]",children:[o("span",{className:"text-[#181818]",children:"Employee annual gross salary:"})," ",l]})]})]}),o(E,{label:"Actions",className:"RemoteFlows__EstimationResults__ActionsDropdown",actions:u})]})},"EstimationResultsHeader"),q=m(()=>({steps:[{id:"add-employment-details",title:"Add employment details",description:"You add employee employments details."},{id:"invite-employee",title:"Invite employee",description:"Hire receives an email invitation from Remote to start the self-enrollment process."},{id:"verify-information",title:"Verify information",description:"Remote prepares the Employment Agreement and verifies all the information."},{id:"sign-contract",title:"Sign contract",description:"All parties sign the Employment Agreement and are ready to start. \u{1F389}"}],helpText:"For customers who accept Remote's Terms of Service (ToS), the employee onboarding timeline starts once the employee has been invited to the platform and completed self enrollment.",zendeskArticleId:w.employeeOnboardingTimeline}),"getOnboardingTimelineData");function J({minimumOnboardingDays:e,data:n,className:a}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__OnboardingTimeline w-full",a),children:r(x,{value:"timeline",className:"RemoteFlows__OnboardingTimeline__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__OnboardingTimeline__AccordionTrigger hover:no-underline px-0 py-4",children:r("div",{className:"flex items-center justify-between w-full",children:[o("span",{className:"RemoteFlows__OnboardingTimeline__Title text-base font-medium text-[#0F172A]",children:"Onboarding timeline"}),e!=null&&r("span",{className:"RemoteFlows__OnboardingTimeline__Description text-base text-muted-foreground mr-4",children:[e," days"]})]})}),r(A,{className:"px-0 pb-4",children:[o("ul",{className:"RemoteFlows__OnboardingTimeline__List list-disc list-inside space-y-2",children:n.steps.map(l=>r("li",{children:[o("strong",{className:"font-medium text-[#09090B]",children:l.title})," ","- ",l.description]},l.id))}),r("p",{className:"RemoteFlows__OnboardingTimeline__HelpText text-xs text-muted-foreground mt-4",children:[n.helpText,n.zendeskArticleId&&o(f,{zendeskId:n.zendeskArticleId,children:"Learn more"})]})]})]})})}m(J,"OnboardingTimeline");function Q({className:e,countryBenefitsUrl:n,countryGuideUrl:a,country:l}){return o(R,{type:"single",collapsible:!0,className:i("RemoteFlows__EstimationResults__HiringSection w-full",e),children:r(x,{value:"timeline",className:"RemoteFlows__HiringSection__AccordionItem border-border",children:[o(N,{className:"RemoteFlows__HiringSection__AccordionTrigger hover:no-underline px-0 py-4",children:o("div",{className:"flex items-center justify-between w-full",children:r("span",{className:"text-base font-medium text-[#0F172A]",children:["Hiring in ",l.name]})})}),o(A,{children:r("div",{className:"flex flex-col gap-1",children:[a&&o("a",{href:a,target:"_blank",className:"RemoteFlows__Link",children:"Explore our complete guide \u2197"}),n&&o("a",{href:n,target:"_blank",className:"RemoteFlows__Link",children:"Explore our available benefits \u2197"})]})})]})})}m(Q,"HiringSection");function W({isMultipleCurrency:e,className:n}){return r("div",{className:i("RemoteFlows__EstimationResults__Headers grid grid-cols-3 items-center",n),children:[o("span",{"aria-hidden":!0}),e?r(b,{children:[o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employee currency"}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Employer currency"})]}):r(b,{children:[o("span",{}),o("span",{className:"RemoteFlows__EstimationResults__Headers__Label",children:"Amount"})]})]})}m(W,"EstimationHeaders");function S({label:e,amounts:n,className:a,children:l}){let[_,d]=z(!0);return r("div",{className:i("RemoteFlows__EstimationResults__Row",a),children:[r("div",{className:"RemoteFlows__EstimationRow__Grid grid grid-cols-3 items-center",children:[r("div",{className:"RemoteFlows__EstimationRow__LabelContainer flex items-center gap-2",children:[o("span",{className:i("RemoteFlows__EstimationRow__Title min-w-[140px] font-medium text-[#09090B]"),children:e}),o("button",{onClick:()=>d(!_),className:"RemoteFlows__EstimationRow__CollapseButton p-1 hover:bg-gray-100 rounded",children:o(O,{className:`h-4 w-4 text-muted-foreground transition-transform ${_?"rotate-180":""}`})})]}),Array.isArray(n)?n.map((c,u)=>o("span",{className:i("RemoteFlows__EstimationRow__RegionalAmount text-right font-medium text-[#09090B]"),children:c},u)):r(b,{children:[o("span",{}),o("span",{className:i("RemoteFlows__EstimationRow__EmployerAmount text-right font-medium text-[#09090B]"),children:n})]})]}),_&&l&&o("div",{className:"RemoteFlows__EstimationRow__CollapsibleContent mt-4",children:l})]})}m(S,"EstimationRow");function X({item:e,isMultipleCurrency:n,level:a=0}){let[l,_]=z(!1),d=e.children&&e.children.length>0,c=a>0,u=e.isCollapsible||d;return r("li",{className:i("RemoteFlows__BreakdownList__Item pb-3",c&&"pb-1"),children:[r("div",{className:i(n?"RemoteFlows__BreakdownList__Grid grid grid-cols-3 items-center justify-between":"RemoteFlows__BreakdownList__Grid grid grid-cols-2 items-center justify-between"),children:[r("div",{className:i("RemoteFlows__BreakdownList__LabelContainer flex items-center gap-2",c&&"pl-3"),children:[!c&&o("span",{className:"RemoteFlows__BreakdownList__Bullet w-1 h-1 bg-[#09090B] rounded-full flex-shrink-0","aria-hidden":"true"}),u?r("button",{onClick:()=>_(!l),className:"RemoteFlows__BreakdownList__CollapseButton flex items-center gap-2 hover:bg-gray-100 rounded p-1",children:[o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B]"),children:e.label}),o(O,{className:`RemoteFlows__BreakdownList__ChevronDown h-3 w-3 text-muted-foreground transition-transform ${l?"rotate-180":""}`})]}):o("span",{className:i(c?"RemoteFlows__BreakdownList__Text--Nested text-xs text-[#71717A]":"RemoteFlows__BreakdownList__Text--NotNested text-sm text-[#09090B] p-1"),children:e.label}),e.tooltip&&o(I,{content:r(b,{children:[o("span",{dangerouslySetInnerHTML:{__html:F(e.tooltip)}})," ",e.zendeskId&&o(f,{zendeskId:Number(e.zendeskId),children:"Learn more"})]}),children:o("button",{className:"RemoteFlows__BreakdownList__InfoButton p-1 hover:bg-gray-100 rounded",children:o(Z,{className:i("RemoteFlows__BreakdownList__InfoButton__Icon text-muted-foreground",c?"h-3 w-3":"h-4 w-4")})})})]}),n?r(b,{children:[o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employee-amount",className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"}),o("span",{"data-testid":e.dataSelector&&e.dataSelector+"-employer-amount",className:i("RemoteFlows__BreakdownList__EmployerAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__EmployerAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__EmployerAmountText--NotNested text-[#09090B]"),children:e.employerAmount||"\u2014"})]}):o("span",{"data-testid":e.dataSelector,className:i("RemoteFlows__BreakdownList__RegionalAmountText text-sm text-right",c?"RemoteFlows__BreakdownList__RegionalAmountText--Nested text-[#71717A]":"RemoteFlows__BreakdownList__RegionalAmountText--NotNested text-[#09090B]"),children:e.regionalAmount||"\u2014"})]}),d&&l&&o("div",{className:"mt-1",children:o(h,{items:e.children,isMultipleCurrency:n,level:a+1})})]})}m(X,"BreakdownListItem");function h({items:e,isMultipleCurrency:n,className:a,level:l}){return o("ul",{className:i("RemoteFlows__BreakdownList list-none",a),children:e.map((_,d)=>o(X,{item:_,isMultipleCurrency:n,level:l},d))})}m(h,"BreakdownList");var Re=m(({estimation:e,title:n,components:a,onDelete:l,onExportPdf:_,onEdit:d})=>{let c=a?.HiringSection||Q,u=a?.OnboardingTimeline||J,H=a?.Header||Y,v=a?.Footer,D=q(),p=e.employer_currency_costs.currency.code!==e.regional_currency_costs.currency.code,k=e.employer_currency_costs.monthly_management_fee,M=e.region.code!==e.country.code,G=t(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code);return r(C,{className:"RemoteFlows__EstimationResults__Card p-10",children:[o("div",{className:"RemoteFlows__Separator",children:o(H,{title:n,annualGrossSalary:G,region:M?e.region:void 0,country:e.country,onDelete:l,onExportPdf:_,onEdit:d})}),r("div",{className:"RemoteFlows__Separator",children:[o(W,{isMultipleCurrency:p,className:"mb-3"}),o(S,{label:"Monthly total cost",amounts:p?[t(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),t(e.employer_currency_costs.monthly_total,e.employer_currency_costs.currency.code)]:t(e.regional_currency_costs.monthly_total,e.regional_currency_costs.currency.code),children:o(h,{items:[{label:"Gross monthly salary",regionalAmount:t(e.regional_currency_costs.monthly_gross_salary,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.monthly_gross_salary,e.employer_currency_costs.currency.code),zendeskId:w.extraPayments.toString(),tooltip:"This country respects extra payments on top of the gross salary."},{label:"Mandatory employer costs",regionalAmount:t(e.regional_currency_costs.monthly_contributions_total,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.monthly_contributions_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.monthly_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.monthly_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:t(e.regional_currency_costs.monthly_benefits_total,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.monthly_benefits_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.monthly_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.monthly_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...k?[{label:"Monthly fee",regionalAmount:t(e.regional_currency_costs.monthly_management_fee,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.monthly_management_fee,e.employer_currency_costs.currency.code),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})]}),o("div",{className:"RemoteFlows__Separator",children:o(S,{label:"Annual total cost",amounts:p?[t(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),t(e.employer_currency_costs.annual_total,e.employer_currency_costs.currency.code)]:t(e.regional_currency_costs.annual_total,e.regional_currency_costs.currency.code),children:o(h,{items:[{label:"Gross annual salary",dataSelector:"annual-gross-salary",regionalAmount:t(e.regional_currency_costs.annual_gross_salary,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.annual_gross_salary,e.employer_currency_costs.currency.code)},{label:"Mandatory employer costs",regionalAmount:t(e.regional_currency_costs.annual_contributions_total,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.annual_contributions_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.annual_contributions_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.annual_contributions_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Benefits",regionalAmount:t(e.regional_currency_costs.annual_benefits_total,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.annual_benefits_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.annual_benefits_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.annual_benefits_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},{label:"Extra statutory payments",regionalAmount:t(e.regional_currency_costs.extra_statutory_payments_total,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.extra_statutory_payments_total,e.employer_currency_costs.currency.code),children:e.employer_currency_costs.extra_statutory_payments_breakdown?.map((s,y)=>({label:s.name,regionalAmount:t(e.regional_currency_costs.extra_statutory_payments_breakdown?.[y]?.amount,e.regional_currency_costs.currency.code),employerAmount:t(s.amount,e.employer_currency_costs.currency.code),zendeskId:s.zendesk_article_id||void 0,tooltip:s.description||void 0}))||[]},...k?[{label:"Annual fee",regionalAmount:t(e.regional_currency_costs.annual_management_fee,e.regional_currency_costs.currency.code),employerAmount:t(e.employer_currency_costs.annual_management_fee,e.employer_currency_costs.currency.code),tooltip:"Discounts may be available based on your commitment and team size. Speak to your account or customer success manager to learn more."}]:[]],isMultipleCurrency:p})})}),o("div",{className:"RemoteFlows__Separator",children:o(u,{minimumOnboardingDays:e.minimum_onboarding_time,data:D})}),o(c,{countryBenefitsUrl:e.country_benefits_details_url,countryGuideUrl:e.country_guide_url,country:e.country}),v&&o(v,{})]})},"EstimationResults");export{Re as a};
|
|
2
|
+
//# sourceMappingURL=chunk-D36G74ID.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-EMP4ZIVB.js";import{a as f}from"./chunk-KSHK3ZPX.js";import{a as u}from"./chunk-HN5HLFTB.js";import{b as C}from"./chunk-LNV36S6D.js";import{f as y}from"./chunk-7EONM7HL.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-DFYEI445.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as l}from"./chunk-JEFPOHCP.js";import{b as s}from"./chunk-PGWKJ6FK.js";import{b as n}from"./chunk-X6ZAR7ZL.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function S({onSubmit:d,onError:a,onSuccess:m}){let{onboardingBag:r}=s(),c=t(async i=>{try{let e=await r.parseFormValues(i);await d?.(e);let o=await r.onSubmit(i);if(o?.data){await m?.(o.data),r?.next();return}if(o?.error){let p=n(o?.fieldErrors||[],r.meta?.fields?.contract_details);a?.({error:o.error,rawError:o.rawError,fieldErrors:p})}}catch(e){a?.({error:e,rawError:e,fieldErrors:[]})}},"handleSubmit");return E(l,{defaultValues:r.stepState.values?.contract_details||r.initialValues.contract_details,onSubmit:c})}t(S,"ContractDetailsStep");export{S as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DHRMW63S.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as k}from"./chunk-RGLQY27T.js";import{a as C,b as w,c as F,d as P}from"./chunk-MSBCYMSH.js";import{i as _,j as v,k as x,l as h,m as b}from"./chunk-7EONM7HL.js";import{a as u,b as D}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as k}from"./chunk-RGLQY27T.js";import{a as C,b as w,c as F,d as P}from"./chunk-MSBCYMSH.js";import{i as _,j as v,k as x,l as h,m as b}from"./chunk-7EONM7HL.js";import{a as u,b as D}from"./chunk-MP3VDCI7.js";import{a as t}from"./chunk-VIGKOVHP.js";import{a as o}from"./chunk-P37U34EQ.js";import{CalendarIcon as L}from"lucide-react";import{format as R}from"date-fns";import{ChevronLeft as I,ChevronRight as M}from"lucide-react";import{DayPicker as z}from"react-day-picker";import{jsx as p}from"react/jsx-runtime";function N({className:r,classNames:i,showOutsideDays:s=!0,...n}){return p(z,{showOutsideDays:s,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(u({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",n.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(u({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:o(({className:d,...l})=>p(I,{className:t("size-4",d),...l}),"IconLeft"),IconRight:o(({className:d,...l})=>p(M,{className:t("size-4",d),...l}),"IconRight")},...n})}o(N,"Calendar");import{Fragment as V,jsx as e,jsxs as m}from"react/jsx-runtime";function X({field:r,fieldData:i,fieldState:s}){let{name:n,label:d,description:l,minDate:f,maxDate:g}=i,c=f?new Date(f):void 0,y=g?new Date(g):void 0;return m(_,{"data-field":n,className:`flex flex-col RemoteFlows__DatePickerField__Item__${n}`,children:[e(v,{className:"RemoteFlows__DatePickerField__Label",children:d}),m(w,{children:[e(F,{asChild:!0,children:e(x,{children:e("div",{children:m(D,{type:"button",variant:"outline",className:t("w-full pl-3 text-left font-normal",!r.value&&"text-muted-foreground"),"data-testid":`date-picker-button-${n}`,children:[r.value&&e(V,{children:R(r.value,"yyyy-MM-dd")}),e(L,{className:"ml-auto h-4 w-4 opacity-50"})]})})})}),e(P,{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,onSelect:a=>{r.onChange(a?R(a,"yyyy-MM-dd"):null)},defaultMonth:c,components:{DayContent:o(a=>e(C,{children:a.date.getDate()}),"DayContent")},disabled:a=>!!(c&&a<c||y&&a>y)})})]}),l?m(h,{children:[l," ",e(k,{helpCenter:i.meta?.helpCenter})]}):null,s.error&&e(b,{className:"RemoteFlows__DatePickerField__Error"})]})}o(X,"DatePickerFieldDefault");export{X as a};
|
|
2
|
+
//# sourceMappingURL=chunk-DPRCPBRB.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as Z}from"./chunk-RMIAJZOG.js";import{a as I}from"./chunk-VFRHMNLJ.js";import{a as Q,b as W,c as X,f as Y}from"./chunk-KJ4JS75E.js";import{a as C}from"./chunk-HN5HLFTB.js";import{a as G}from"./chunk-LNV36S6D.js";import{b as ee}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as Z}from"./chunk-RMIAJZOG.js";import{a as I}from"./chunk-VFRHMNLJ.js";import{a as Q,b as W,c as X,f as Y}from"./chunk-KJ4JS75E.js";import{a as C}from"./chunk-HN5HLFTB.js";import{a as G}from"./chunk-LNV36S6D.js";import{b as ee}from"./chunk-JTPKAIYL.js";import{a as z}from"./chunk-EUSCQL4H.js";import{e as M}from"./chunk-T7O3YYOG.js";import{a as K}from"./chunk-X6ZAR7ZL.js";import{a as o}from"./chunk-P37U34EQ.js";import{number as Be,object as se}from"yup";import{useCallback as je,useEffect as te,useMemo as we,useRef as Re,useState as j}from"react";import{string as ne,ValidationError as re}from"yup";import{jsx as ie}from"react/jsx-runtime";var O={title:"Estimation",includeBenefits:!1,includeCostBreakdowns:!1,includePremiumBenefits:!1,enableCurrencyConversion:!1,includeEstimationTitle:!1,includeManagementFee:!1},Pe=o(t=>z(I.data.schema,void 0,t),"useStaticSchema");function xe(t,i){if(typeof t=="object"&&t!==null&&"title"in t){let l=t.title;if(l)return l}return i==="my_hiring_budget"?"Hiring budget":"Employee's annual salary"}o(xe,"getSalaryTitle");var ze=o(({defaultRegion:t,defaultCurrency:i,defaultSalary:l,estimationOptions:s,options:n,version:a}={estimationOptions:O})=>{let u=Re({fields:{}}),[k,h]=j(t),[w,R]=j(),[m,q]=j(),[H,le]=j(),{data:_,isLoading:ue}=Q({includePremiumBenefits:s.includePremiumBenefits}),{data:d,isLoading:ce}=W(),me=k||w?.value,{data:P,isLoading:de}=Y(me,{includePremiumBenefits:s.includePremiumBenefits,options:n}),U=X(),{mutateAsync:fe}=K(U),b=w?.currency,p=n?.jsfModify?.fields?.salary,F=p&&typeof p=="object"&&"presentation"in p?p.presentation:void 0,L=je(()=>{let e=b&&m?b!==m:!1;return b!==m?{from:m,to:b,shouldSwapOrder:e}:{from:b,to:m,shouldSwapOrder:e}},[b,m]),J=s.showManagementFee,$=s.includeEstimationTitle,ge=we(()=>{let{from:e,to:r,shouldSwapOrder:c}=L(),g=xe(p,H);return{fields:{salary:{...p,title:g,presentation:{salary_conversion_properties:{label:F?.salary_conversion_properties?.label,description:F?.salary_conversion_properties?.description},currencies:{from:e,to:r},Component:o(y=>ie(Z,{...y,shouldSwapOrder:c,conversionType:a==="marketing"?"no_spread":"spread",defaultValue:l}),"Component")}},hiring_budget:{...n?.jsfModify?.fields?.hiring_budget,presentation:{hidden:a=="marketing"}},management:{...n?.jsfModify?.fields?.management,properties:{...n?.jsfModify?.fields?.management?.properties,management_fee:{...n?.jsfModify?.fields?.management?.properties?.management_fee,"x-jsf-presentation":{inputType:"money",additionalProps:{currency:m||"USD"}}}},presentation:{...typeof n?.jsfModify?.fields?.management=="object"?(n?.jsfModify?.fields?.management)["x-jsf-presentation"]:{},hidden:!J,Component:o(y=>ie(ee,{...y,variant:"inset",features:{toggle:{enabled:!0,stateField:"management._expanded",labels:{expand:"Define",collapse:"Remove"}}}}),"Component")}},estimation_title:{...n?.jsfModify?.fields?.estimation_title,"x-jsf-presentation":{hidden:!$}}}}},[L,p,H,F?.salary_conversion_properties?.label,F?.salary_conversion_properties?.description,n?.jsfModify?.fields?.hiring_budget,n?.jsfModify?.fields?.management,n?.jsfModify?.fields?.estimation_title,a,m,J,$,l]),f=Pe({jsfModify:{fields:{...n?.jsfModify?.fields,...ge?.fields}}});te(()=>{if(t&&_){let e=_.find(({value:r})=>r===t);e&&R(e)}},[t,_]),te(()=>{if(i&&d){let e=d.find(({value:r})=>r===i);e&&q(e.label)}},[i,d]);async function ye(e){return fe(oe(e,s,a))}o(ye,"onSubmit");function pe(e){let r=_?.find(({value:c})=>c===e);r&&r.childRegions.length===0&&r.hasAdditionalFields?h(r.regionSlug):h(void 0),R(r)}o(pe,"onCountryChange");function Ce(e){h(e)}o(Ce,"onRegionChange");function _e(e){le(e.target.value)}o(_e,"onHiringBudgetChange");function be(e){let r=d?.find(c=>c.value===e)?.label;q(r),n?.onCurrencyChange?.(r||"")}o(be,"onChangeCurrency");let E=f.fields.find(e=>e.name==="region");if(E){let e=w?.childRegions.map(r=>({value:r.slug,label:r.name}))??[];E.options=e,E.isVisible=e.length>0,E.required=e.length>0,E.onChange=Ce,E.schema=e.length>0?ne().transform(r=>typeof r=="string"?r:"").required("Region is required"):ne()}if(d){let e=f.fields.find(r=>r.name==="currency");e&&(e.options=d,e.onChange=be)}let v=f.fields.find(e=>e.name==="hiring_budget");if(v&&(v.onChange=_e),_){let e=f.fields.find(r=>r.name==="country");e&&(e.options=_,e.onChange=pe)}let Ee=o(()=>{R(void 0),h(t)},"resetForm"),D=[...f.fields.filter(e=>e.name!=="management"),...P?.fields||[],...f.fields.filter(e=>e.name==="management")],N=ae(f.fields,m||"USD",s.includeEstimationTitle);async function Se(e){let r=null;n?.onValidation?.(e);let c=await M(e,D);try{await N.validate(c,{abortEarly:!1}),r={formErrors:{},yupError:new re([],e)}}catch(S){let B=G(S);r={formErrors:Object.entries(B).reduce((T,[A,V])=>({...T,[A]:V.message}),{}),yupError:S}}let g=P?.handleValidation(c),y=[...r?.yupError.inner||[],...g?.yupError?.inner||[]],x={...r?.yupError?.value||{},...g?.yupError?.value||{}};return{formErrors:{...r?.formErrors||{},...g?.formErrors||{}},yupError:new re(y,x)}}return o(Se,"handleValidation"),{stepState:{current:0,total:1,isLastStep:!0},fields:D,validationSchema:N,parseFormValues:o(async e=>{let{country:r,region:c,currency:g,salary_converted:y,hiring_budget:x,salary_conversion:S,management:B,estimation_title:T,...A}=e,V=e.salary;y==="salary_conversion"&&(V=S);let he=await M({country:r,region:c,salary:V,salary_converted:y,salary_conversion:S,hiring_budget:x,currency:g,management:B,estimation_title:T},f.fields),Fe=await M(A,P?.fields||[]),Ve={currency_code:d?.find(Me=>Me.value===g)?.label};return{...he,...Fe,...Ve}},"parseFormValues"),handleValidation:Se,isSubmitting:U.isPending,isLoading:ue&&ce&&de,onSubmit:ye,resetForm:Ee,currencies:d,meta:{fields:u.current?.fields}}},"useCostCalculator");function ae(t,i,l){let s=t.reduce((n,a)=>(a.name==="salary"||a.name==="salary_conversion"?n[a.name]=a.schema.when("salary_converted",{is:o(u=>u===a.name,"is"),then:o(u=>u.required("Required field"),"then"),otherwise:o(u=>u.optional(),"otherwise")}):a.name==="management"?n[a.name]=se({management_fee:Be().transform(u=>isNaN(u)?void 0:u).min(0,"Management fee must be greater than or equal to 0").max(i?C[i]:C.USD,()=>`Management fee cannot exceed ${(i?C[i]:C.USD)/100} ${i}`)}):a.name==="estimation_title"&&l?n[a.name]=a.schema.required("Required field"):n[a.name]=a.schema,n),{});return se(s)}o(ae,"buildValidationSchema");function Te(t){let i="benefit-";return Object.keys(t).reduce((l,s)=>{let n=t[s];if(n==="none")return l;let u={benefit_group_slug:s.replace(i,""),benefit_tier_slug:n};return[...l,u]},[])}o(Te,"formatBenefits");function Ae(t,i,l){let s=Number(t.management?.management_fee),n=t.currency_code;return{...{region_slug:t.region||t.country,employment_term:t.contract_duration_type??"fixed",title:t.estimation_title||i.title,age:t.age??void 0,...t.benefits&&{benefits:Te(t.benefits)},...i.includeManagementFee&&s&&{discount:{quoted_amount:i.showManagementFee?s:C[n]||C.USD,text:""}}},...Oe(t,l)}}o(Ae,"mapValueToEmployment");function Oe(t,i){let l=i==="marketing"||t.salary_converted==="salary_conversion",s=i==="standard"&&t.salary_converted==="salary",n=t.hiring_budget==="my_hiring_budget";if(l){let a=t.salary_converted==="salary_conversion";return n?{annual_total_cost_in_employer_currency:t.salary}:{[a?"annual_gross_salary_in_employer_currency":"annual_gross_salary"]:t.salary}}return s?n?{annual_total_cost:t.salary}:{annual_gross_salary:t.salary}:{}}o(Oe,"getSalaryFields");function oe(t,i=O,l="standard"){let s=Array.isArray(t)?t:[t];if(s.length===0)throw new Error("At least one employment value is required");return s.length>1&&new Set(s.map(a=>a.currency)).size>1&&console.warn("Multiple currencies detected in array. Using currency from first employment."),{employer_currency_slug:s[0].currency,include_benefits:i.includeBenefits,include_cost_breakdowns:i.includeCostBreakdowns,include_premium_benefits:i.includePremiumBenefits,include_management_fee:i.includeManagementFee,employments:s.map(n=>Ae(n,i,l))}}o(oe,"buildPayload");export{ae as a,oe as b,O as c,ze as d};
|
|
2
|
+
//# sourceMappingURL=chunk-EMP4ZIVB.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-T5JT2ZU2.js";import{b as m}from"./chunk-76ZDXC2T.js";import{k as i}from"./chunk-VIGKOVHP.js";import{a}from"./chunk-P37U34EQ.js";import{jsx as d}from"react/jsx-runtime";function l({onSubmit:c,onSuccess:p,onError:t}){let{createCompanyBag:o}=m(),u=a(async r=>{try{await c?.({countryCode:r.country_code,companyOwnerEmail:r.company_owner_email,companyOwnerName:r.company_owner_name,desiredCurrency:r.desired_currency,name:r.name,phoneNumber:r.phone_number,taxNumber:r.tax_number});let n=await o.onSubmit(r);if(n?.data){await p?.(n?.data),o?.next();return}if(n?.error){let e=i(n,o.meta?.fields?.company_basic_information);t?.(e)}}catch(n){let e=i(n,o.meta?.fields?.company_basic_information);t?.(e)}},"handleSubmit"),f=o.stepState.values?.company_basic_information||o.initialValues.company_basic_information;return d(s,{defaultValues:f,onSubmit:u})}a(l,"CompanyBasicInformationStep");export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-I5FVESDZ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as H}from"./chunk-AP56UUME.js";import{a as z}from"./chunk-IJCTN52C.js";import{a as N}from"./chunk-WVJDCDGZ.js";import{a as W}from"./chunk-O6H66UM2.js";import{e as E}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as H}from"./chunk-AP56UUME.js";import{a as z}from"./chunk-IJCTN52C.js";import{a as N}from"./chunk-WVJDCDGZ.js";import{a as W}from"./chunk-O6H66UM2.js";import{e as E}from"./chunk-AHRG5QCS.js";import{a as P,b as Y,c as X,d as _,f as q}from"./chunk-PX5PE6GX.js";import{a as b}from"./chunk-EUSCQL4H.js";import{d as x}from"./chunk-T7O3YYOG.js";import{$ as B,B as v,F as U,N as J,Q as K,S as j,U as A,V as G,W as V,X as k,_ as $,f as I,h as M,p as D,r as T,s as L,t as Q}from"./chunk-WQ4H5V7U.js";import{g as w}from"./chunk-VIGKOVHP.js";import{a as O}from"./chunk-X6ZAR7ZL.js";import{d as a}from"./chunk-KQPDXXG3.js";import{a as n}from"./chunk-P37U34EQ.js";import{useMemo as be}from"react";import{useMutation as f,useQuery as p}from"@tanstack/react-query";import{useMutation as de,useQuery as Z}from"@tanstack/react-query";var Re=n(()=>{let{client:e}=a();return de({mutationFn:n(t=>j({client:e,body:t,headers:{Authorization:""}}),"mutationFn")})},"useUploadFile"),ee=n(e=>{let{client:t}=a();return Z({queryKey:["download-file",e],queryFn:n(async()=>{let o=await v({client:t,path:{id:e}});if(o.error)throw o.error;return o.data},"queryFn"),select:n(({data:o})=>o?.file,"select"),enabled:!!e})},"useDownloadFile"),te=n((e,t,o)=>{let{client:r}=a();return Z({queryKey:["employment-files",e],queryFn:n(async()=>{let i=await K({client:r,path:{employment_id:e},query:t});if(i.error)throw i.error;return i.data},"queryFn"),...o})},"useEmploymentFiles");import{useQuery as me}from"@tanstack/react-query";import{useQuery as pe}from"@tanstack/react-query";var ne=n(()=>{let{client:e}=a();return pe({queryKey:["identity"],queryFn:n(()=>G({client:e,headers:{Authorization:""}}),"queryFn"),select:n(t=>t.data?.data,"select")})},"useIdentity");function ye(e){return e!=null&&"company"in e}n(ye,"hasCompany");var oe=n((e={enabled:!0})=>{let{data:t}=ne(),o=ye(t)?t?.company?.id??"":"",{client:r}=a();return me({queryKey:["pricing-plans",o],queryFn:n(()=>I({client:r,path:{company_id:o}}),"queryFn"),select:n(i=>i.data?.data?.pricing_plans,"select"),enabled:!!e?.enabled&&!!o})},"useCompanyPricingPlans");var fe=n(({employmentId:e,options:t})=>{let{client:o}=a();return p({queryKey:["contractor-currencies",e],queryFn:n(async()=>Q({client:o,path:{employment_id:e},query:{restrict_to_guaranteed_pay_out_currencies:!1}}),"queryFn"),enabled:t?.queryOptions?.enabled,select:n(({data:r})=>r?.data,"select")})},"useContractorCurrencies"),yt=n(({fieldValues:e,options:t})=>p({queryKey:["contract-document-signature",e.review_completed,t?.jsfModify],queryFn:n(async()=>b(z,e,{jsfModify:t?.jsfModify}),"queryFn"),enabled:t?.queryOptions?.enabled}),"useGetContractDocumentSignatureSchema"),bt=n(()=>{let{client:e}=a();return f({mutationFn:n(async({employmentId:t,contractDocumentId:o,payload:r})=>A({client:e,body:r,path:{employment_id:t,contract_document_id:o}}),"mutationFn")})},"useSignContractDocument"),ft=n(({employmentId:e,contractDocumentId:t,options:o})=>{let{client:r}=a();return p({queryKey:["contract-document",e,t],queryFn:n(async()=>T({client:r,path:{employment_id:e,id:t}}),"queryFn"),enabled:o?.queryOptions?.enabled,select:n(({data:i})=>({...i?.data,contract_document:{...i?.data?.contract_document,content:w(i?.data?.contract_document?.content)}}),"select")})},"useGetShowContractDocument"),Ce=n(({employmentId:e,options:t})=>{let{client:o}=a();return p({queryKey:["contractor-subscriptions",e],queryFn:n(async()=>D({client:o,path:{employment_id:e}}),"queryFn"),enabled:t?.queryOptions?.enabled,select:n(({data:r})=>r?.data,"select")})},"useGetContractorSubscriptions"),Ct=n(()=>{let{client:e}=a();return f({mutationFn:n(async({employmentId:t,payload:o})=>k({client:e,body:o,path:{employment_id:t}}),"mutationFn")})},"usePostManageContractorSubscriptions"),gt=n(()=>{let{client:e}=a();return f({mutationFn:n(async({employmentId:t,payload:o})=>J({client:e,body:o,path:{employment_id:t}}),"mutationFn")})},"useCreateContractorContractDocument"),ge=n(({countryCode:e,employmentId:t,fieldValues:o,options:r})=>{let{client:i}=a();return p({queryKey:["contractor-onboarding-details-schema",e,t],retry:!1,queryFn:n(async()=>M({client:i,path:{country_code:e},query:{json_schema_version:1,employment_id:t}}),"queryFn"),enabled:r?.queryOptions?.enabled,select:n(({data:s})=>{let c=s?.data?.schema||{};return b(c,o,r)},"select")})},"useContractorOnboardingDetailsSchema"),Fe={[P]:"Contractor Management",[Y]:"Contractor Management Plus",[X]:"Contractor of Record"},Se=n(e=>{let{data:t,isLoading:o}=oe({enabled:e?.enabled}),r=t?.find(s=>s.product.name==="EOR Monthly");return{eorSubscription:{product:{identifier:_,short_name:"EOR"},currency:r?.price.currency,price:{amount:x(r?.price.amount??0)},features:["Contract between Remote and employee","Remote manages onboarding, payroll, and compliance","Manages taxes, benefits, and time-off tracking","Handles contracts, transfers, and terminations"],description:"Enables hiring in countries without a local entity",label:"Employer of Record",value:_},isLoading:o}},"useEorSubscription"),he=n((e,t,o)=>(E(_,o)&&e.push({label:t.label,value:t.value,description:t.description,meta:{features:t.features,price:{amount:t.price.amount,currencyCode:t.currency?.code??""}},disabled:!1}),e),"addEorToFieldOptions"),Ft=n((e,t,o)=>{let{data:r,isLoading:i,refetch:s}=Ce({employmentId:e,options:{queryOptions:o?.queryOptions}}),c=r?.length===0,u=r?.length===1,l=r?.find(S=>S.product.short_name==="COR")?.eligibility_questionnaire?.is_blocking,d=(u||l===!0||c)&&t?.eor_onboarding,{eorSubscription:C,isLoading:re}=Se({enabled:d}),R=b(H.data.schema,{},o);if(r){let S=R.fields.find(h=>h.name==="subscription");if(S){let h=r.filter(m=>E(m.product.identifier??"",o?.excludeProducts)).map(m=>{let y=m.product,ie=m.price.amount,ae=m.currency.code,se=Fe[y.identifier]??"",ce=y.identifier??"",le=y.description??"",ue={features:y.features??[],price:{amount:x(ie),currencyCode:ae}};return{label:se,value:ce,description:le,meta:ue,disabled:l&&y.identifier!==P}});h.sort((m,y)=>m.label.localeCompare(y.label));let g=[];d&&(he(g,C,o?.excludeProducts),g.length>0&&(g[0].meta={...g[0].meta,groupSeparator:{show:!0}})),S.options=[...h,...g]}}return{isLoading:i||re,form:R,contractorSubscriptions:r,refetch:s,isEligibilityQuestionnaireBlocked:l}},"useContractorSubscriptionSchemaField"),St=n((e,t,o)=>{let{mutateAsyncOrThrow:r}=O(t),{mutateAsyncOrThrow:i}=O(e);return{mutateAsync:n(async({employmentId:s})=>{let{nationality_status:c,ir35:u,ir35_sds_file:F}=o,l={contract_document:{ir_35:u}},d={contract_document:{nationality:c}};return u?(await i({employmentId:s,payload:l}),F?r({employment_id:s,file:F,sub_type:q}):Promise.resolve()):c?i({employmentId:s,payload:d}):Promise.resolve()},"mutateAsync")}},"useUpdateUKandSaudiFields"),ht=n((e,t)=>{let{data:o,isLoading:r}=te(e,{sub_type:q},{...t,select:n(({data:c})=>c?.files?.filter(u=>u.sub_type===q),"select")}),i=o?.[0]?.id,s=ee(i);return{...s,isLoading:r||s.isLoading}},"useGetIR35File"),_t=n((e,t)=>{let{client:o}=a();return p({queryKey:["contract-documents",e],queryFn:n(async()=>L({client:o,path:{employment_id:e}}),"queryFn"),enabled:t?.enabled,select:n(({data:r})=>r?.data?.contract_documents,"select")})},"useGetContractDocuments"),qt=n(({options:e,fieldValues:t})=>{let{client:o}=a();return p({queryKey:["eligibility-questionnaire"],queryFn:n(async()=>{let r=await V({client:o,query:{type:"contractor_of_record",json_schema_version:1}});if(r.error)throw new Error("Failed to fetch eligibility questionnaire");return r.data.data},"queryFn"),select:n(r=>{let i=r?.schema||{};return b(i,t,{jsfModify:e?.jsfModify})},"select"),enabled:e?.queryOptions?.enabled})},"useGetEligibilityQuestionnaire"),Ot=n(()=>{let{client:e}=a();return f({mutationFn:n(async({employmentId:t,payload:o})=>U({client:e,body:{employment_slug:t,responses:o,type:"contractor_of_record"},query:{json_schema_version:1}}),"mutationFn")})},"usePostCreateEligibilityQuestionnaire"),xt=n(()=>{let{client:e}=a();return f({mutationFn:n(async({employmentId:t})=>B({client:e,path:{employment_id:t}}),"mutationFn")})},"usePostManageContractorCorSubscription"),Pt=n(()=>{let{client:e}=a();return f({mutationFn:n(async({employmentId:t})=>$({client:e,path:{employment_id:t}}),"mutationFn")})},"useDeleteContractorCorSubscription"),Et=n(e=>{let{client:t}=a(),{data:o,isLoading:r}=p({...W(t,"contractor-onboarding-countries"),select:n(s=>s.data?.data?.map(c=>({label:c.name,value:c.code,eor_onboarding:c.eor_onboarding,contractor_products_available:c.contractor_products_available}))||[],"select"),enabled:e?.queryOptions?.enabled}),i=b(N.data.schema,{},e);if(o){let s=i.fields.find(c=>c.name==="country");s&&(s.options=o)}return{isLoading:r,selectCountryForm:i,countries:o}},"useCountriesSchemaField"),Rt=n(({countryCode:e,employmentId:t,fieldValues:o,options:r})=>{let i=ge({countryCode:e,employmentId:t,fieldValues:o,options:r}),{data:s,isLoading:c}=fe({employmentId:t,options:{queryOptions:{enabled:r?.queryOptions?.enabled}}}),u=be(()=>!i.data||!s?i.data:{...i.data,fields:i.data.fields.map(l=>l.name!=="payment_terms"?l:{...l,fields:l.fields?.map(d=>d.name!=="compensation_currency_code"?d:{...d,options:s.map(C=>({label:C.code,value:C.code,meta:{source:C.source}}))})})},[i.data,s]);return{...i,data:u,isLoading:i.isLoading||c}},"useContractorOnboardingDetailsSchemaWithCurrencies");export{Re as a,ne as b,ye as c,yt as d,bt as e,ft as f,Ce as g,Ct as h,gt as i,Fe as j,Ft as k,St as l,ht as m,_t as n,qt as o,Ot as p,xt as q,Pt as r,Et as s,Rt as t};
|
|
2
|
+
//# sourceMappingURL=chunk-IVXIAOMR.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as p}from"./chunk-Q3ALCPJN.js";import{b as f}from"./chunk-LNV36S6D.js";import{a as u}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as p}from"./chunk-Q3ALCPJN.js";import{b as f}from"./chunk-LNV36S6D.js";import{a as u}from"./chunk-BUOCIXUH.js";import{f as d,g as c}from"./chunk-7EONM7HL.js";import{a}from"./chunk-P37U34EQ.js";import{useEffect as i,useRef as C}from"react";import{jsx as F}from"react/jsx-runtime";import{createElement as S}from"react";function J({defaultValues:s,onSubmit:g,components:b}){let{formId:y,contractorOnboardingBag:o,formRef:n}=p(),m=C(s),P=f(o.handleValidation),r=d({resolver:P,defaultValues:s,shouldUnregister:!1,mode:"onBlur"});i(()=>{n?.setValue&&(n.setValue.current=r.setValue)},[r.setValue,n]),i(()=>{o.employmentId&&o?.checkFieldUpdates(r.getValues())},[]),i(()=>{let t=r?.watch(e=>{Object.keys(e).some(l=>e[l]!==m.current[l])&&(o?.checkFieldUpdates(e),m.current={...e})});return()=>t?.unsubscribe()},[]);let h=a(async t=>{await g(t)},"handleSubmit");return S(c,{...r,key:`form-${o.stepState.currentStep.name}`},F("form",{id:y,onSubmit:r.handleSubmit(h),className:"space-y-4 RemoteFlows__OnboardingForm",children:F(u,{components:b,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}a(J,"ContractorOnboardingForm");export{J as a};
|
|
2
|
+
//# sourceMappingURL=chunk-JDVILEVL.js.map
|