@remoteoss/remote-flows 1.21.1 → 1.23.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/{chunk-JTD4HJSK.js → chunk-2MTSUYN6.js} +2 -2
- package/dist/{chunk-IJQBLGTI.js → chunk-2PDHYTZ2.js} +2 -2
- package/dist/chunk-3MLYDDLK.js +2 -0
- package/dist/chunk-3MLYDDLK.js.map +1 -0
- package/dist/{chunk-AHBNUSR4.js → chunk-4EFT4EBW.js} +2 -2
- package/dist/{chunk-J5I5ZSW3.js → chunk-4EU3AWEX.js} +2 -2
- package/dist/{chunk-67GUBRC6.js → chunk-4Q2FKKQU.js} +2 -2
- package/dist/{chunk-MAOJJ4WX.js → chunk-5MDNW5H7.js} +2 -2
- package/dist/{chunk-E6B4ZECN.js → chunk-5QOEBELF.js} +2 -2
- package/dist/{chunk-XJECSJYB.js → chunk-6ORP3EVR.js} +2 -2
- package/dist/{chunk-SAUF7ZUE.js → chunk-7DRY6YCN.js} +2 -2
- package/dist/{chunk-BRPBSA4E.js → chunk-AKFNSADJ.js} +2 -2
- package/dist/chunk-D4TLSPX5.js +2 -0
- package/dist/chunk-D4TLSPX5.js.map +1 -0
- package/dist/{chunk-LT27CPJ6.js → chunk-D5ABWBC6.js} +2 -2
- package/dist/chunk-D5K4NBOG.js +2 -0
- package/dist/chunk-D5K4NBOG.js.map +1 -0
- package/dist/{chunk-BNY76RHM.js → chunk-DNVTXLTP.js} +2 -2
- package/dist/{chunk-Y2JE46ZY.js → chunk-FXTOBTW4.js} +2 -2
- package/dist/{chunk-YYGLCI2S.js → chunk-GECXYMDU.js} +2 -2
- package/dist/chunk-GRE4RCPB.js +2 -0
- package/dist/chunk-GRE4RCPB.js.map +1 -0
- package/dist/{chunk-OC3MVHTM.js → chunk-H3HNBOAE.js} +2 -2
- package/dist/{chunk-C52C6J6Q.js → chunk-HNTEGDI2.js} +2 -2
- package/dist/{chunk-XW7ZYSJ3.js → chunk-HVOYAQHI.js} +2 -2
- package/dist/{chunk-EULZWL2F.js → chunk-IN74TK34.js} +2 -2
- package/dist/{chunk-YVAEVXHP.js → chunk-ITTXYDGV.js} +2 -2
- package/dist/{chunk-KQSWP3Y3.js → chunk-JAZLNJM3.js} +2 -2
- package/dist/{chunk-I3DVKJCW.js → chunk-JEGVULKU.js} +2 -2
- package/dist/{chunk-I3DVKJCW.js.map → chunk-JEGVULKU.js.map} +1 -1
- package/dist/{chunk-KIQNU673.js → chunk-JJMBP6FU.js} +2 -2
- package/dist/{chunk-W5USIIXL.js → chunk-JNMD7SWN.js} +2 -2
- package/dist/{chunk-DPZHLV7U.js → chunk-JVHQ5EG3.js} +2 -2
- package/dist/{chunk-7XLP5WFW.js → chunk-K5HZE7M6.js} +2 -2
- package/dist/{chunk-72TX2GXH.js → chunk-KEFIHTZ2.js} +2 -2
- package/dist/{chunk-QWQPTZQD.js → chunk-KO264IE2.js} +2 -2
- package/dist/chunk-LU265KXN.js +2 -0
- package/dist/{chunk-VZ5BGG3N.js.map → chunk-LU265KXN.js.map} +1 -1
- package/dist/chunk-LXOYWRNU.js +2 -0
- package/dist/{chunk-STF3NTPS.js.map → chunk-LXOYWRNU.js.map} +1 -1
- package/dist/{chunk-KWLKQ6N6.js → chunk-NI3CJNG3.js} +2 -2
- package/dist/{chunk-XAPDPR3N.js → chunk-R7G5G45H.js} +2 -2
- package/dist/{chunk-7Y4XCQZX.js → chunk-RKGD6XC7.js} +2 -2
- package/dist/{chunk-KN5M3VJD.js → chunk-S42DBWAF.js} +2 -2
- package/dist/{chunk-EUQH4FU4.js → chunk-S5VSWHJY.js} +2 -2
- package/dist/{chunk-JD2O7KNE.js → chunk-SQPCNBJC.js} +2 -2
- package/dist/{chunk-UWL56AOZ.js → chunk-TGQTFWAB.js} +2 -2
- package/dist/{chunk-QELEVTDT.js → chunk-TJHW5QSC.js} +2 -2
- package/dist/{chunk-7AFCHGML.js → chunk-U33Q35CB.js} +2 -2
- package/dist/chunk-U4QOJDBZ.js +2 -0
- package/dist/chunk-U4QOJDBZ.js.map +1 -0
- package/dist/{chunk-HGNICQUY.js → chunk-UEDPRIG7.js} +2 -2
- package/dist/{chunk-CT2D4IBR.js → chunk-UTLIN5S6.js} +2 -2
- package/dist/{chunk-TMVRAQYA.js → chunk-UVBIRNQ4.js} +2 -2
- package/dist/{chunk-TZQ2O23Z.js → chunk-V3ZGBTES.js} +2 -2
- package/dist/{chunk-Z7AWT3MQ.js → chunk-VHLCM6IM.js} +2 -2
- package/dist/{chunk-KKOBWE62.js → chunk-VL5TI4XT.js} +2 -2
- package/dist/{chunk-7PTTOR6T.js → chunk-WWXX3PU7.js} +2 -2
- package/dist/{chunk-AQ4WWMOK.js → chunk-X6PTF3PD.js} +2 -2
- package/dist/{chunk-IW6OJUGY.js → chunk-ZEJRVVLJ.js} +2 -2
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
- package/dist/flows/ContractAmendment/hooks.js +1 -1
- package/dist/flows/ContractAmendment/index.js +1 -1
- package/dist/flows/ContractAmendment/utils.js +1 -1
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.d.ts +3 -2
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
- package/dist/flows/ContractorOnboarding/api.js +1 -1
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.d.ts +1 -1
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.d.ts +3 -2
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.d.ts +3 -2
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.d.ts +3 -2
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
- package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.d.ts +3 -2
- package/dist/flows/ContractorOnboarding/components/EligibilityQuestionnaireStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/OnboardingInvite.d.ts +2 -2
- package/dist/flows/ContractorOnboarding/components/OnboardingInvite.js +1 -1
- package/dist/flows/ContractorOnboarding/components/PricingPlan.d.ts +3 -2
- package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.d.ts +1 -1
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/ContractorOnboarding/context.d.ts +3 -2
- package/dist/flows/ContractorOnboarding/hooks.d.ts +3 -2
- package/dist/flows/ContractorOnboarding/hooks.js +1 -1
- package/dist/flows/ContractorOnboarding/index.d.ts +3 -2
- package/dist/flows/ContractorOnboarding/index.js +1 -1
- package/dist/flows/ContractorOnboarding/jsfModify.d.ts +3 -2
- package/dist/flows/ContractorOnboarding/types.d.ts +4 -3
- package/dist/flows/ContractorOnboarding/utils.d.ts +1 -1
- package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
- package/dist/flows/CostCalculator/api.js +1 -1
- package/dist/flows/CostCalculator/components/SalaryField.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/api.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/hooks.js +1 -1
- package/dist/flows/CreateCompany/index.js +1 -1
- package/dist/flows/Onboarding/OnboardingFlow.d.ts +1 -1
- package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
- package/dist/flows/Onboarding/api.d.ts +2 -2
- package/dist/flows/Onboarding/api.js +1 -1
- package/dist/flows/Onboarding/components/AnnualGrossSalary.js +1 -1
- package/dist/flows/Onboarding/components/BasicInformationStep.d.ts +1 -1
- package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/Onboarding/components/BenefitsStep.d.ts +1 -1
- package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
- package/dist/flows/Onboarding/components/ContractDetailsStep.d.ts +1 -1
- package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingForm.d.ts +1 -1
- package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingInvite.js +1 -1
- package/dist/flows/Onboarding/components/ReviewStep.d.ts +1 -1
- package/dist/flows/Onboarding/components/SelectCountryStep.d.ts +1 -1
- package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/Onboarding/context.d.ts +1 -1
- package/dist/flows/Onboarding/hooks.d.ts +1 -1
- package/dist/flows/Onboarding/hooks.js +1 -1
- package/dist/flows/Onboarding/index.d.ts +1 -1
- package/dist/flows/Onboarding/index.js +1 -1
- package/dist/flows/Onboarding/types.d.ts +1 -1
- package/dist/flows/Onboarding/utils.d.ts +1 -1
- package/dist/flows/Onboarding/utils.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/api.d.ts +1 -1
- package/dist/flows/Termination/api.js +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOff.d.ts +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.d.ts +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/PaidTimeOffContainer.js +1 -1
- package/dist/flows/Termination/components/PaidTimeOff/types.d.ts +1 -1
- package/dist/flows/Termination/hooks.js +1 -1
- package/dist/flows/Termination/index.d.ts +1 -1
- package/dist/flows/Termination/index.js +1 -1
- package/dist/flows/types.d.ts +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1 -1
- package/dist/{types-B_iVL6gW.d.ts → types-BUI5G3ML.d.ts} +36 -21
- package/dist/{types-gQ_Tx-qG.d.ts → types-C0m9mu0v.d.ts} +55 -7
- package/package.json +1 -1
- package/dist/chunk-5VNMVVUB.js +0 -2
- package/dist/chunk-5VNMVVUB.js.map +0 -1
- package/dist/chunk-HPLRAHY7.js +0 -2
- package/dist/chunk-HPLRAHY7.js.map +0 -1
- package/dist/chunk-RQWB2F74.js +0 -2
- package/dist/chunk-RQWB2F74.js.map +0 -1
- package/dist/chunk-SDDJBGXV.js +0 -2
- package/dist/chunk-SDDJBGXV.js.map +0 -1
- package/dist/chunk-STF3NTPS.js +0 -2
- package/dist/chunk-VZ5BGG3N.js +0 -2
- package/dist/chunk-Y2S7WYMO.js +0 -2
- package/dist/chunk-Y2S7WYMO.js.map +0 -1
- /package/dist/{chunk-JTD4HJSK.js.map → chunk-2MTSUYN6.js.map} +0 -0
- /package/dist/{chunk-IJQBLGTI.js.map → chunk-2PDHYTZ2.js.map} +0 -0
- /package/dist/{chunk-AHBNUSR4.js.map → chunk-4EFT4EBW.js.map} +0 -0
- /package/dist/{chunk-J5I5ZSW3.js.map → chunk-4EU3AWEX.js.map} +0 -0
- /package/dist/{chunk-67GUBRC6.js.map → chunk-4Q2FKKQU.js.map} +0 -0
- /package/dist/{chunk-MAOJJ4WX.js.map → chunk-5MDNW5H7.js.map} +0 -0
- /package/dist/{chunk-E6B4ZECN.js.map → chunk-5QOEBELF.js.map} +0 -0
- /package/dist/{chunk-XJECSJYB.js.map → chunk-6ORP3EVR.js.map} +0 -0
- /package/dist/{chunk-SAUF7ZUE.js.map → chunk-7DRY6YCN.js.map} +0 -0
- /package/dist/{chunk-BRPBSA4E.js.map → chunk-AKFNSADJ.js.map} +0 -0
- /package/dist/{chunk-LT27CPJ6.js.map → chunk-D5ABWBC6.js.map} +0 -0
- /package/dist/{chunk-BNY76RHM.js.map → chunk-DNVTXLTP.js.map} +0 -0
- /package/dist/{chunk-Y2JE46ZY.js.map → chunk-FXTOBTW4.js.map} +0 -0
- /package/dist/{chunk-YYGLCI2S.js.map → chunk-GECXYMDU.js.map} +0 -0
- /package/dist/{chunk-OC3MVHTM.js.map → chunk-H3HNBOAE.js.map} +0 -0
- /package/dist/{chunk-C52C6J6Q.js.map → chunk-HNTEGDI2.js.map} +0 -0
- /package/dist/{chunk-XW7ZYSJ3.js.map → chunk-HVOYAQHI.js.map} +0 -0
- /package/dist/{chunk-EULZWL2F.js.map → chunk-IN74TK34.js.map} +0 -0
- /package/dist/{chunk-YVAEVXHP.js.map → chunk-ITTXYDGV.js.map} +0 -0
- /package/dist/{chunk-KQSWP3Y3.js.map → chunk-JAZLNJM3.js.map} +0 -0
- /package/dist/{chunk-KIQNU673.js.map → chunk-JJMBP6FU.js.map} +0 -0
- /package/dist/{chunk-W5USIIXL.js.map → chunk-JNMD7SWN.js.map} +0 -0
- /package/dist/{chunk-DPZHLV7U.js.map → chunk-JVHQ5EG3.js.map} +0 -0
- /package/dist/{chunk-7XLP5WFW.js.map → chunk-K5HZE7M6.js.map} +0 -0
- /package/dist/{chunk-72TX2GXH.js.map → chunk-KEFIHTZ2.js.map} +0 -0
- /package/dist/{chunk-QWQPTZQD.js.map → chunk-KO264IE2.js.map} +0 -0
- /package/dist/{chunk-KWLKQ6N6.js.map → chunk-NI3CJNG3.js.map} +0 -0
- /package/dist/{chunk-XAPDPR3N.js.map → chunk-R7G5G45H.js.map} +0 -0
- /package/dist/{chunk-7Y4XCQZX.js.map → chunk-RKGD6XC7.js.map} +0 -0
- /package/dist/{chunk-KN5M3VJD.js.map → chunk-S42DBWAF.js.map} +0 -0
- /package/dist/{chunk-EUQH4FU4.js.map → chunk-S5VSWHJY.js.map} +0 -0
- /package/dist/{chunk-JD2O7KNE.js.map → chunk-SQPCNBJC.js.map} +0 -0
- /package/dist/{chunk-UWL56AOZ.js.map → chunk-TGQTFWAB.js.map} +0 -0
- /package/dist/{chunk-QELEVTDT.js.map → chunk-TJHW5QSC.js.map} +0 -0
- /package/dist/{chunk-7AFCHGML.js.map → chunk-U33Q35CB.js.map} +0 -0
- /package/dist/{chunk-HGNICQUY.js.map → chunk-UEDPRIG7.js.map} +0 -0
- /package/dist/{chunk-CT2D4IBR.js.map → chunk-UTLIN5S6.js.map} +0 -0
- /package/dist/{chunk-TMVRAQYA.js.map → chunk-UVBIRNQ4.js.map} +0 -0
- /package/dist/{chunk-TZQ2O23Z.js.map → chunk-V3ZGBTES.js.map} +0 -0
- /package/dist/{chunk-Z7AWT3MQ.js.map → chunk-VHLCM6IM.js.map} +0 -0
- /package/dist/{chunk-KKOBWE62.js.map → chunk-VL5TI4XT.js.map} +0 -0
- /package/dist/{chunk-7PTTOR6T.js.map → chunk-WWXX3PU7.js.map} +0 -0
- /package/dist/{chunk-AQ4WWMOK.js.map → chunk-X6PTF3PD.js.map} +0 -0
- /package/dist/{chunk-IW6OJUGY.js.map → chunk-ZEJRVVLJ.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as Z}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as Z}from"./chunk-UVBIRNQ4.js";import{a as I}from"./chunk-VFRHMNLJ.js";import{a as Q,b as W,c as X,f as Y}from"./chunk-AKFNSADJ.js";import{a as C}from"./chunk-HN5HLFTB.js";import{a as G}from"./chunk-LNV36S6D.js";import{b as ee}from"./chunk-UTLIN5S6.js";import{a as z}from"./chunk-S5VSWHJY.js";import{e as M}from"./chunk-JEGVULKU.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-KEFIHTZ2.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as f}from"./chunk-76ZDXC2T.js";import{b as p}from"./chunk-LNV36S6D.js";import{a as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as f}from"./chunk-76ZDXC2T.js";import{b as p}from"./chunk-LNV36S6D.js";import{a as c}from"./chunk-LU265KXN.js";import{f as a,g as d}from"./chunk-7EONM7HL.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as y,useRef as b}from"react";import{jsx as l}from"react/jsx-runtime";import{createElement as g}from"react";function B({defaultValues:s,onSubmit:u,components:F}){let{formId:C,createCompanyBag:o}=f(),m=b(s),h=p(o.handleValidation),r=a({resolver:h,defaultValues:s,shouldUnregister:!1,mode:"onBlur"});y(()=>{let n=r?.watch(e=>{Object.keys(e).some(i=>e[i]!==m.current[i])&&(o?.checkFieldUpdates(e),m.current={...e})});return()=>n?.unsubscribe()},[]);let S=t(async n=>{await u(n)},"handleSubmit");return g(d,{...r,key:`form-${o.stepState.currentStep.name}`},l("form",{id:C,onSubmit:r.handleSubmit(S),className:"space-y-4 RemoteFlows__OnboardingForm",children:l(c,{components:F,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}t(B,"CreateCompanyForm");export{B as a};
|
|
2
|
+
//# sourceMappingURL=chunk-KO264IE2.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as T,b as g}from"./chunk-UTLIN5S6.js";import{a as d}from"./chunk-SNECOPBD.js";import{g as C}from"./chunk-JEGVULKU.js";import{b as _}from"./chunk-YHCH57B7.js";import{c as l}from"./chunk-7EONM7HL.js";import{e as p}from"./chunk-VIGKOVHP.js";import{a as m}from"./chunk-P37U34EQ.js";import{Fragment as x}from"react";var y={...T,fieldset:g,"fieldset-flat":g};import{useEffect as P}from"react";import{jsx as c,jsxs as h}from"react/jsx-runtime";var R=m(({name:e,description:i,helpCenter:n})=>h("span",{children:[c("span",{className:`text-xs RemoteFlows__ForcedValue__Description__${e}`,dangerouslySetInnerHTML:{__html:p(i)}}),n?.callToAction&&n?.id&&c(_,{className:"RemoteFlows__ForcedValue__HelpCenterLink",zendeskId:n.id,children:n.callToAction})]}),"Description");function k({name:e,value:i,description:n,statement:r,label:u,helpCenter:F}){let{setValue:t}=l(),o=p(r?.description||n);P(()=>{t(e,i)},[]);let s=r?.title?p(r?.title):p(u);return h("div",{children:[s&&c("p",{className:`text-sm RemoteFlows__ForcedValue__Title__${e}`,dangerouslySetInnerHTML:{__html:s}}),c(R,{name:e,description:o,helpCenter:F})]})}m(k,"ForcedValueField");import{Fragment as M,jsx as a,jsxs as S}from"react/jsx-runtime";function J(e){return e.const!==void 0&&e.const===e.default&&e.type!=="checkbox"&&e.type!=="hidden"}m(J,"checkFieldHasForcedValue");var G=m(({fields:e,fieldsets:i,fieldValues:n,components:r})=>{let{setValue:u}=l();if(!e||e.length===0)return null;let F=i&&n?C({fields:e,fieldsets:i,values:n}):e;return a(M,{children:F.map(t=>{if(t.calculateDynamicProperties&&(t={...t,...t.calculateDynamicProperties(n,t)||{}}),t.isVisible===!1||t.deprecated||t.hidden)return null;if(J(t))return a(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 S(x,{children:[a(b,{setValue:V=>u(t.name,V),...t}),t.statement?a(d,{...t.statement}):null,t.extra?t.extra:null]},t.name)}let o=t.type,s=y[o];return s?o==="fieldset"?a(s,{...t,components:r},t.name):o==="fieldset-flat"?a(s,{...t,components:r,isFlatFieldset:!0},t.name):(o==="select"&&t.multiple&&(s=y["multi-select"]),S(x,{children:[a(s,{...t,component:r&&r[o]}),t.statement?a(d,{...t.statement}):null,t.extra?t.extra:null]},t.name)):S("p",{className:"error",children:["Field type ",o," not supported"]})})})},"JSONSchemaFormFields");export{G as a};
|
|
2
|
+
//# sourceMappingURL=chunk-LU265KXN.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/form/JSONSchemaForm.tsx","../src/components/form/fields/fieldsMapping.tsx","../src/components/form/fields/ForcedValueField.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { JSFFields } from '@/src/types/remoteFlows';\nimport React, { Fragment } from 'react';\n\nimport { fieldsMap } from '@/src/components/form/fields/fieldsMapping';\nimport { Statement } from '@/src/components/form/Statement';\nimport { ForcedValueField } from '@/src/components/form/fields/ForcedValueField';\nimport { Components, JSFFieldset } from '@/src/types/remoteFlows';\nimport { getFieldsWithFlatFieldsets } from './utils';\nimport { StatementComponentProps } from '@/src/types/fields';\nimport { useFormContext } from 'react-hook-form';\n\ntype JSONSchemaFormFieldsProps = {\n fields: JSFFields;\n components?: Components;\n fieldsets?: JSFFieldset | null | undefined;\n fieldValues?: Record<string, unknown>;\n};\n\nfunction checkFieldHasForcedValue(field: any) {\n // A field to be considered \"forced value\" must:\n return (\n field.const !== undefined && // Only accepts a specific value\n field.const === field.default && // It can be prefilled, meaning it's not critical\n field.type !== 'checkbox' && // Because checkbox must always be visible\n field.type !== 'hidden' // Because hidden inputs shouldn't be visible\n );\n}\n\nexport const JSONSchemaFormFields = ({\n fields,\n fieldsets,\n fieldValues,\n components,\n}: JSONSchemaFormFieldsProps) => {\n const { setValue } = useFormContext();\n\n if (!fields || fields.length === 0) return null;\n\n const maybeFieldWithFlatFieldsets =\n fieldsets && fieldValues\n ? getFieldsWithFlatFieldsets({\n fields: fields,\n fieldsets: fieldsets,\n values: fieldValues,\n })\n : fields;\n\n return (\n <>\n {maybeFieldWithFlatFieldsets.map((field) => {\n if (field.calculateDynamicProperties) {\n field = {\n ...field,\n ...(field.calculateDynamicProperties(fieldValues, field) || {}),\n };\n }\n\n if (field.isVisible === false || field.deprecated || field.hidden) {\n return null; // Skip hidden or deprecated fields\n }\n\n if (checkFieldHasForcedValue(field)) {\n return (\n <ForcedValueField\n key={field.name as string}\n name={field.name as string}\n description={field.description as string}\n value={field.const as string}\n statement={field.statement as any}\n label={field.label as string}\n helpCenter={field.meta?.helpCenter}\n />\n );\n }\n\n if (field.Component) {\n const { Component } = field as {\n Component: React.ComponentType<any>;\n };\n return (\n <Fragment key={field.name as string}>\n <Component\n setValue={(value: unknown) => setValue(field.name, value)}\n {...field}\n />\n {field.statement ? (\n <Statement\n {...(field.statement as StatementComponentProps['data'])}\n />\n ) : null}\n {field.extra ? field.extra : null}\n </Fragment>\n );\n }\n\n // We use field.type on purpose here, not field.inputType, when using field.inputType\n // the conditionals didn't work as expected\n // I believe json-schema-form in the latest versions uses field.inputType correctly but\n // the version of json-schema-form is decided by remote-json-schema-form-kit\n // our product uses field.type instead of field.inputType and we probably should do the same\n const fieldType = field.type;\n let FieldComponent = fieldsMap[fieldType as keyof typeof fieldsMap];\n\n if (!FieldComponent) {\n return (\n <p className='error'>\n Field type {fieldType as string} not supported\n </p>\n );\n }\n\n if (fieldType === 'fieldset') {\n return (\n <FieldComponent\n key={field.name}\n {...field}\n components={components}\n />\n );\n }\n\n if (fieldType === 'fieldset-flat') {\n return (\n <FieldComponent\n key={field.name}\n {...field}\n components={components}\n isFlatFieldset\n />\n );\n }\n\n // TODO: Have doubts about this, it seems we only support checkbox for multiple select\n if (fieldType === 'select' && field.multiple) {\n FieldComponent = fieldsMap['multi-select'];\n }\n\n return (\n <Fragment key={field.name as string}>\n <FieldComponent\n {...field}\n component={\n components && components[fieldType as keyof Components]\n }\n />\n {field.statement ? (\n <Statement\n {...(field.statement as StatementComponentProps['data'])}\n />\n ) : null}\n {field.extra ? field.extra : null}\n </Fragment>\n );\n })}\n </>\n );\n};\n","import { $TSFixMe } from '@/src/types/remoteFlows';\nimport { baseFields } from './baseFields';\nimport { FieldSetField } from './FieldSetField';\nimport { SupportedTypes } from './types';\n\nexport const fieldsMap: Record<\n SupportedTypes,\n React.ComponentType<$TSFixMe>\n> = {\n ...baseFields,\n fieldset: FieldSetField,\n 'fieldset-flat': FieldSetField,\n};\n","import { useFormContext } from 'react-hook-form';\nimport { sanitizeHtml } from '@/src/lib/utils';\nimport { useEffect } from 'react';\nimport { ZendeskTriggerButton } from '@/src/components/shared/zendesk-drawer/ZendeskTriggerButton';\n\nconst Description = ({\n name,\n description,\n helpCenter,\n}: {\n name: string;\n description: string;\n helpCenter?: {\n callToAction: string;\n id: number;\n url: string;\n label: string;\n };\n}) => {\n return (\n <span>\n <span\n className={`text-xs RemoteFlows__ForcedValue__Description__${name}`}\n dangerouslySetInnerHTML={{ __html: sanitizeHtml(description) }}\n />\n {helpCenter?.callToAction && helpCenter?.id && (\n <ZendeskTriggerButton\n className='RemoteFlows__ForcedValue__HelpCenterLink'\n zendeskId={helpCenter.id}\n >\n {helpCenter.callToAction}\n </ZendeskTriggerButton>\n )}\n </span>\n );\n};\n\nexport type ForcedValueFieldProps = {\n name: string;\n value: string;\n description: string;\n statement?: {\n title?: string;\n description?: string;\n };\n label: string;\n helpCenter?: {\n callToAction: string;\n id: number;\n url: string;\n label: string;\n };\n};\n\nexport function ForcedValueField({\n name,\n value,\n description,\n statement,\n label,\n helpCenter,\n}: ForcedValueFieldProps) {\n const { setValue } = useFormContext();\n const descriptionSanitized = sanitizeHtml(\n statement?.description || description,\n );\n useEffect(() => {\n setValue(name, value);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return (\n <div>\n {statement ? (\n <>\n {/* if statement?.title is undefined which could be for example belgium contract details form, we need to use the label attribute */}\n <p\n className={`text-sm RemoteFlows__ForcedValue__Title__${name}`}\n dangerouslySetInnerHTML={{\n __html: sanitizeHtml(statement?.title || label),\n }}\n />\n <Description\n name={name}\n description={sanitizeHtml(statement?.description || description)}\n helpCenter={helpCenter}\n />\n </>\n ) : (\n <Description\n name={name}\n description={descriptionSanitized}\n helpCenter={helpCenter}\n />\n )}\n </div>\n );\n}\n"],"mappings":"+RAEA,OAAgB,YAAAA,MAAgB,QCGzB,IAAMC,EAGT,CACF,GAAGC,EACH,SAAUC,EACV,gBAAiBA,CACnB,ECVA,OAAS,aAAAC,MAAiB,QAkBtB,OAsDI,YAAAC,EArDF,OAAAC,EADF,QAAAC,MAAA,oBAfJ,IAAMC,EAAcC,EAAA,CAAC,CACnB,KA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,CAA6B,EAE1D,EACCf,EAAM,UACLH,EAACiB,EAAA,CACE,GAAId,EAAM,UACb,EACE,KACHA,EAAM,MAAQA,EAAM,MAAQ,OAZhBA,EAAM,IAarB,GA9CEF,EAAC,KAAE,UAAU,QAAQ,wBACPiB,EAAoB,kBAClC,CA8CN,CAAC,EACH,CAEJ,EAhIoC","names":["Fragment","fieldsMap","baseFields","FieldSetField","useEffect","Fragment","jsx","jsxs","Description","__name","name","description","helpCenter","sanitizeHtml","ZendeskTriggerButton","ForcedValueField","value","statement","label","setValue","useFormContext","descriptionSanitized","useEffect","Fragment","jsx","jsxs","checkFieldHasForcedValue","field","__name","JSONSchemaFormFields","fields","fieldsets","fieldValues","components","setValue","useFormContext","maybeFieldWithFlatFieldsets","getFieldsWithFlatFieldsets","ForcedValueField","Component","value","Statement","fieldType","FieldComponent","fieldsMap"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/form/JSONSchemaForm.tsx","../src/components/form/fields/fieldsMapping.tsx","../src/components/form/fields/ForcedValueField.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { JSFFields } from '@/src/types/remoteFlows';\nimport React, { Fragment } from 'react';\n\nimport { fieldsMap } from '@/src/components/form/fields/fieldsMapping';\nimport { Statement } from '@/src/components/form/Statement';\nimport { ForcedValueField } from '@/src/components/form/fields/ForcedValueField';\nimport { Components, JSFFieldset } from '@/src/types/remoteFlows';\nimport { getFieldsWithFlatFieldsets } from './utils';\nimport { StatementComponentProps } from '@/src/types/fields';\nimport { useFormContext } from 'react-hook-form';\n\ntype JSONSchemaFormFieldsProps = {\n fields: JSFFields;\n components?: Components;\n fieldsets?: JSFFieldset | null | undefined;\n fieldValues?: Record<string, unknown>;\n};\n\nfunction checkFieldHasForcedValue(field: any) {\n // A field to be considered \"forced value\" must:\n return (\n field.const !== undefined && // Only accepts a specific value\n field.const === field.default && // It can be prefilled, meaning it's not critical\n field.type !== 'checkbox' && // Because checkbox must always be visible\n field.type !== 'hidden' // Because hidden inputs shouldn't be visible\n );\n}\n\nexport const JSONSchemaFormFields = ({\n fields,\n fieldsets,\n fieldValues,\n components,\n}: JSONSchemaFormFieldsProps) => {\n const { setValue } = useFormContext();\n\n if (!fields || fields.length === 0) return null;\n\n const maybeFieldWithFlatFieldsets =\n fieldsets && fieldValues\n ? getFieldsWithFlatFieldsets({\n fields: fields,\n fieldsets: fieldsets,\n values: fieldValues,\n })\n : fields;\n\n return (\n <>\n {maybeFieldWithFlatFieldsets.map((field) => {\n if (field.calculateDynamicProperties) {\n field = {\n ...field,\n ...(field.calculateDynamicProperties(fieldValues, field) || {}),\n };\n }\n\n if (field.isVisible === false || field.deprecated || field.hidden) {\n return null; // Skip hidden or deprecated fields\n }\n\n if (checkFieldHasForcedValue(field)) {\n return (\n <ForcedValueField\n key={field.name as string}\n name={field.name as string}\n description={field.description as string}\n value={field.const as string}\n statement={field.statement as any}\n label={field.label as string}\n helpCenter={field.meta?.helpCenter}\n />\n );\n }\n\n if (field.Component) {\n const { Component } = field as {\n Component: React.ComponentType<any>;\n };\n return (\n <Fragment key={field.name as string}>\n <Component\n setValue={(value: unknown) => setValue(field.name, value)}\n {...field}\n />\n {field.statement ? (\n <Statement\n {...(field.statement as StatementComponentProps['data'])}\n />\n ) : null}\n {field.extra ? field.extra : null}\n </Fragment>\n );\n }\n\n // We use field.type on purpose here, not field.inputType, when using field.inputType\n // the conditionals didn't work as expected\n // I believe json-schema-form in the latest versions uses field.inputType correctly but\n // the version of json-schema-form is decided by remote-json-schema-form-kit\n // our product uses field.type instead of field.inputType and we probably should do the same\n const fieldType = field.type;\n let FieldComponent = fieldsMap[fieldType as keyof typeof fieldsMap];\n\n if (!FieldComponent) {\n return (\n <p className='error'>\n Field type {fieldType as string} not supported\n </p>\n );\n }\n\n if (fieldType === 'fieldset') {\n return (\n <FieldComponent\n key={field.name}\n {...field}\n components={components}\n />\n );\n }\n\n if (fieldType === 'fieldset-flat') {\n return (\n <FieldComponent\n key={field.name}\n {...field}\n components={components}\n isFlatFieldset\n />\n );\n }\n\n // TODO: Have doubts about this, it seems we only support checkbox for multiple select\n if (fieldType === 'select' && field.multiple) {\n FieldComponent = fieldsMap['multi-select'];\n }\n\n return (\n <Fragment key={field.name as string}>\n <FieldComponent\n {...field}\n component={\n components && components[fieldType as keyof Components]\n }\n />\n {field.statement ? (\n <Statement\n {...(field.statement as StatementComponentProps['data'])}\n />\n ) : null}\n {field.extra ? field.extra : null}\n </Fragment>\n );\n })}\n </>\n );\n};\n","import { $TSFixMe } from '@/src/types/remoteFlows';\nimport { baseFields } from './baseFields';\nimport { FieldSetField } from './FieldSetField';\nimport { SupportedTypes } from './types';\n\nexport const fieldsMap: Record<\n SupportedTypes,\n React.ComponentType<$TSFixMe>\n> = {\n ...baseFields,\n fieldset: FieldSetField,\n 'fieldset-flat': FieldSetField,\n};\n","import { useFormContext } from 'react-hook-form';\nimport { sanitizeHtml } from '@/src/lib/utils';\nimport { useEffect } from 'react';\nimport { ZendeskTriggerButton } from '@/src/components/shared/zendesk-drawer/ZendeskTriggerButton';\n\nconst Description = ({\n name,\n description,\n helpCenter,\n}: {\n name: string;\n description: string;\n helpCenter?: {\n callToAction: string;\n id: number;\n url: string;\n label: string;\n };\n}) => {\n return (\n <span>\n <span\n className={`text-xs RemoteFlows__ForcedValue__Description__${name}`}\n dangerouslySetInnerHTML={{ __html: sanitizeHtml(description) }}\n />\n {helpCenter?.callToAction && helpCenter?.id && (\n <ZendeskTriggerButton\n className='RemoteFlows__ForcedValue__HelpCenterLink'\n zendeskId={helpCenter.id}\n >\n {helpCenter.callToAction}\n </ZendeskTriggerButton>\n )}\n </span>\n );\n};\n\nexport type ForcedValueFieldProps = {\n name: string;\n value: string;\n description: string;\n statement?: {\n title?: string;\n description?: string;\n };\n label: string;\n helpCenter?: {\n callToAction: string;\n id: number;\n url: string;\n label: string;\n };\n};\n\nexport function ForcedValueField({\n name,\n value,\n description,\n statement,\n label,\n helpCenter,\n}: ForcedValueFieldProps) {\n const { setValue } = useFormContext();\n const descriptionSanitized = sanitizeHtml(\n statement?.description || description,\n );\n useEffect(() => {\n setValue(name, value);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n const titleSanitized = statement?.title\n ? sanitizeHtml(statement?.title)\n : sanitizeHtml(label);\n return (\n <div>\n {titleSanitized && (\n <p\n className={`text-sm RemoteFlows__ForcedValue__Title__${name}`}\n dangerouslySetInnerHTML={{\n __html: titleSanitized,\n }}\n />\n )}\n <Description\n name={name}\n description={descriptionSanitized}\n helpCenter={helpCenter}\n />\n </div>\n );\n}\n"],"mappings":"+RAEA,OAAgB,YAAAA,MAAgB,QCGzB,IAAMC,EAGT,CACF,GAAGC,EACH,SAAUC,EACV,gBAAiBA,CACnB,ECVA,OAAS,aAAAC,MAAiB,QAkBtB,OACE,OAAAC,EADF,QAAAC,MAAA,oBAfJ,IAAMC,EAAcC,EAAA,CAAC,CACnB,KAAAC,EACA,YAAAC,EACA,WAAAC,CACF,IAWIL,EAAC,QACC,UAAAD,EAAC,QACC,UAAW,kDAAkDI,CAAI,GACjE,wBAAyB,CAAE,OAAQG,EAAaF,CAAW,CAAE,EAC/D,EACCC,GAAY,cAAgBA,GAAY,IACvCN,EAACQ,EAAA,CACC,UAAU,2CACV,UAAWF,EAAW,GAErB,SAAAA,EAAW,aACd,GAEJ,EA5BgB,eAiDb,SAASG,EAAiB,CAC/B,KAAAL,EACA,MAAAM,EACA,YAAAL,EACA,UAAAM,EACA,MAAAC,EACA,WAAAN,CACF,EAA0B,CACxB,GAAM,CAAE,SAAAO,CAAS,EAAIC,EAAe,EAC9BC,EAAuBR,EAC3BI,GAAW,aAAeN,CAC5B,EACAW,EAAU,IAAM,CACdH,EAAST,EAAMM,CAAK,CAEtB,EAAG,CAAC,CAAC,EAEL,IAAMO,EAAiBN,GAAW,MAC9BJ,EAAaI,GAAW,KAAK,EAC7BJ,EAAaK,CAAK,EACtB,OACEX,EAAC,OACE,UAAAgB,GACCjB,EAAC,KACC,UAA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,EAAM,UACLH,EAACiB,EAAA,CACE,GAAId,EAAM,UACb,EACE,KACHA,EAAM,MAAQA,EAAM,MAAQ,OAVhBA,EAAM,IAWrB,CAEJ,CAOA,IAAMe,EAAYf,EAAM,KACpBgB,EAAiBC,EAAUF,CAAmC,EAElE,OAAKC,EAQDD,IAAc,WAEdlB,EAACmB,EAAA,CAEE,GAAGhB,EACJ,WAAYM,GAFPN,EAAM,IAGb,EAIAe,IAAc,gBAEdlB,EAACmB,EAAA,CAEE,GAAGhB,EACJ,WAAYM,EACZ,eAAc,IAHTN,EAAM,IAIb,GAKAe,IAAc,UAAYf,EAAM,WAClCgB,EAAiBC,EAAU,cAAc,GAIzCnB,EAACF,EAAA,CACC,UAAAC,EAACmB,EAAA,CACE,GAAGhB,EACJ,UACEM,GAAcA,EAAWS,CAA6B,EAE1D,EACCf,EAAM,UACLH,EAACiB,EAAA,CACE,GAAId,EAAM,UACb,EACE,KACHA,EAAM,MAAQA,EAAM,MAAQ,OAZhBA,EAAM,IAarB,GA9CEF,EAAC,KAAE,UAAU,QAAQ,wBACPiB,EAAoB,kBAClC,CA8CN,CAAC,EACH,CAEJ,EAhIoC","names":["Fragment","fieldsMap","baseFields","FieldSetField","useEffect","jsx","jsxs","Description","__name","name","description","helpCenter","sanitizeHtml","ZendeskTriggerButton","ForcedValueField","value","statement","label","setValue","useFormContext","descriptionSanitized","useEffect","titleSanitized","Fragment","jsx","jsxs","checkFieldHasForcedValue","field","__name","JSONSchemaFormFields","fields","fieldsets","fieldValues","components","setValue","useFormContext","maybeFieldWithFlatFieldsets","getFieldsWithFlatFieldsets","ForcedValueField","Component","value","Statement","fieldType","FieldComponent","fieldsMap"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as t}from"./chunk-P37U34EQ.js";var c={select_country:{index:0,name:"select_country"},basic_information:{index:1,name:"basic_information"},contract_details:{index:2,name:"contract_details"},benefits:{index:3,name:"benefits"},review:{index:4,name:"review"}},m={basic_information:{index:0,name:"basic_information"},contract_details:{index:1,name:"contract_details"},benefits:{index:2,name:"benefits"},review:{index:3,name:"review"}},d=["invited","created_awaiting_reserve","created_reserve_paid"],p=["created_awaiting_reserve","invited"],n=1,i=t(()=>n,"getDefaultContractDetailsSchemaVersion"),l=t((e,o)=>{let s=e?.jsonSchemaVersionByCountry,r=o?s?.[o]?.contract_details:void 0;return r||i()},"getContractDetailsSchemaVersion"),_=t(e=>e?.jsonSchemaVersion?.employment_basic_information||n,"getBasicInformationSchemaVersion"),u=t(e=>e?.jsonSchemaVersion?.benefit_offers_form_schema||n,"getBenefitOffersSchemaVersion");export{c as a,m as b,d as c,p as d,n as e,l as f,_ as g,u as h};
|
|
2
|
+
//# sourceMappingURL=chunk-LXOYWRNU.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/flows/Onboarding/utils.ts"],"sourcesContent":["import { Employment, OnboardingFlowProps } from '@/src/flows/Onboarding/types';\nimport { Step } from '@/src/flows/useStepState';\n\ntype StepKeys =\n | 'select_country'\n | 'basic_information'\n | 'contract_details'\n | 'benefits'\n | 'review';\n\nexport const STEPS: Record<StepKeys, Step<StepKeys>> = {\n select_country: {\n index: 0,\n name: 'select_country',\n },\n basic_information: { index: 1, name: 'basic_information' },\n contract_details: { index: 2, name: 'contract_details' },\n benefits: { index: 3, name: 'benefits' },\n review: { index: 4, name: 'review' },\n} as const;\n\nexport const STEPS_WITHOUT_SELECT_COUNTRY: Record<\n Exclude<StepKeys, 'select_country'>,\n Step<Exclude<StepKeys, 'select_country'>>\n> = {\n basic_information: { index: 0, name: 'basic_information' },\n contract_details: { index: 1, name: 'contract_details' },\n benefits: { index: 2, name: 'benefits' },\n review: { index: 3, name: 'review' },\n} as const;\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\nexport const DEFAULT_VERSION = 1;\n\n/**\n * Gets the default (recommended) contract details schema version for a country\n */\nconst getDefaultContractDetailsSchemaVersion = (): number => {\n return DEFAULT_VERSION;\n};\n\n/**\n * Resolves the effective contract details schema version for a country\n *\n * @param options - The flow options containing version configurations\n * @param countryCode - The country code to resolve version for\n * @returns The effective jsonSchemaVersion configuration\n */\nexport const getContractDetailsSchemaVersion = (\n options: OnboardingFlowProps['options'],\n countryCode: string | null,\n) => {\n const jsonSchemaVersionByCountry = options?.jsonSchemaVersionByCountry;\n const countrySpecificVersion = countryCode\n ? jsonSchemaVersionByCountry?.[countryCode]?.contract_details\n : undefined;\n\n const requestedVersion = countrySpecificVersion\n ? countrySpecificVersion\n : getDefaultContractDetailsSchemaVersion();\n\n return requestedVersion;\n};\n"],"mappings":"wCAUO,IAAMA,EAA0C,CACrD,eAAgB,CACd,MAAO,EACP,KAAM,gBACR,EACA,kBAAmB,CAAE,MAAO,EAAG,KAAM,mBAAoB,EACzD,iBAAkB,CAAE,MAAO,EAAG,KAAM,kBAAmB,EACvD,SAAU,CAAE,MAAO,EAAG,KAAM,UAAW,EACvC,OAAQ,CAAE,MAAO,EAAG,KAAM,QAAS,CACrC,EAEaC,EAGT,CACF,kBAAmB,CAAE,MAAO,EAAG,KAAM,mBAAoB,EACzD,iBAAkB,CAAE,MAAO,EAAG,KAAM,kBAAmB,EACvD,SAAU,CAAE,MAAO,EAAG,KAAM,UAAW,EACvC,OAAQ,CAAE,MAAO,EAAG,KAAM,QAAS,CACrC,EAQaC,EAA4D,CACvE,UACA,2BACA,sBACF,EAEaC,EAA+D,CAC1E,2BACA,SACF,EAEaC,EAAkB,EAKzBC,EAAyCC,EAAA,IACtCF,EADsC,0CAWlCG,EAAkCD,EAAA,CAC7CE,EACAC,IACG,CACH,IAAMC,EAA6BF,GAAS,2BACtCG,EAAyBF,EAC3BC,IAA6BD,CAAW,GAAG,iBAC3C,OAMJ,OAJyBE,GAErBN,EAAuC,CAG7C,EAd+C","names":["STEPS","STEPS_WITHOUT_SELECT_COUNTRY","reviewStepAllowedEmploymentStatus","disabledInviteButtonEmploymentStatus","DEFAULT_VERSION","getDefaultContractDetailsSchemaVersion","__name","getContractDetailsSchemaVersion","options","countryCode","jsonSchemaVersionByCountry","countrySpecificVersion"]}
|
|
1
|
+
{"version":3,"sources":["../src/flows/Onboarding/utils.ts"],"sourcesContent":["import { Employment, OnboardingFlowProps } from '@/src/flows/Onboarding/types';\nimport { Step } from '@/src/flows/useStepState';\n\ntype StepKeys =\n | 'select_country'\n | 'basic_information'\n | 'contract_details'\n | 'benefits'\n | 'review';\n\nexport const STEPS: Record<StepKeys, Step<StepKeys>> = {\n select_country: {\n index: 0,\n name: 'select_country',\n },\n basic_information: { index: 1, name: 'basic_information' },\n contract_details: { index: 2, name: 'contract_details' },\n benefits: { index: 3, name: 'benefits' },\n review: { index: 4, name: 'review' },\n} as const;\n\nexport const STEPS_WITHOUT_SELECT_COUNTRY: Record<\n Exclude<StepKeys, 'select_country'>,\n Step<Exclude<StepKeys, 'select_country'>>\n> = {\n basic_information: { index: 0, name: 'basic_information' },\n contract_details: { index: 1, name: 'contract_details' },\n benefits: { index: 2, name: 'benefits' },\n review: { index: 3, name: 'review' },\n} as const;\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\nexport const DEFAULT_VERSION = 1;\n\n/**\n * Gets the default (recommended) contract details schema version for a country\n */\nconst getDefaultContractDetailsSchemaVersion = (): number => {\n return DEFAULT_VERSION;\n};\n\n/**\n * Resolves the effective contract details schema version for a country\n *\n * @param options - The flow options containing version configurations\n * @param countryCode - The country code to resolve version for\n * @returns The effective jsonSchemaVersion configuration\n */\nexport const getContractDetailsSchemaVersion = (\n options: OnboardingFlowProps['options'],\n countryCode: string | null,\n) => {\n const jsonSchemaVersionByCountry = options?.jsonSchemaVersionByCountry;\n const countrySpecificVersion = countryCode\n ? jsonSchemaVersionByCountry?.[countryCode]?.contract_details\n : undefined;\n\n const requestedVersion = countrySpecificVersion\n ? countrySpecificVersion\n : getDefaultContractDetailsSchemaVersion();\n\n return requestedVersion;\n};\n\n/**\n * Gets the basic information schema version from options\n * @param options - The flow options containing version configurations\n * @returns The jsonSchemaVersion for basic information or default\n */\nexport const getBasicInformationSchemaVersion = (\n options: OnboardingFlowProps['options'],\n): number | 'latest' => {\n return (\n options?.jsonSchemaVersion?.employment_basic_information || DEFAULT_VERSION\n );\n};\n\n/**\n * Gets the benefit offers schema version from options\n * @param options - The flow options containing version configurations\n * @returns The jsonSchemaVersion for benefit offers or undefined if not set\n */\nexport const getBenefitOffersSchemaVersion = (\n options: OnboardingFlowProps['options'],\n): number | 'latest' => {\n return (\n options?.jsonSchemaVersion?.benefit_offers_form_schema || DEFAULT_VERSION\n );\n};\n"],"mappings":"wCAUO,IAAMA,EAA0C,CACrD,eAAgB,CACd,MAAO,EACP,KAAM,gBACR,EACA,kBAAmB,CAAE,MAAO,EAAG,KAAM,mBAAoB,EACzD,iBAAkB,CAAE,MAAO,EAAG,KAAM,kBAAmB,EACvD,SAAU,CAAE,MAAO,EAAG,KAAM,UAAW,EACvC,OAAQ,CAAE,MAAO,EAAG,KAAM,QAAS,CACrC,EAEaC,EAGT,CACF,kBAAmB,CAAE,MAAO,EAAG,KAAM,mBAAoB,EACzD,iBAAkB,CAAE,MAAO,EAAG,KAAM,kBAAmB,EACvD,SAAU,CAAE,MAAO,EAAG,KAAM,UAAW,EACvC,OAAQ,CAAE,MAAO,EAAG,KAAM,QAAS,CACrC,EAQaC,EAA4D,CACvE,UACA,2BACA,sBACF,EAEaC,EAA+D,CAC1E,2BACA,SACF,EAEaC,EAAkB,EAKzBC,EAAyCC,EAAA,IACtCF,EADsC,0CAWlCG,EAAkCD,EAAA,CAC7CE,EACAC,IACG,CACH,IAAMC,EAA6BF,GAAS,2BACtCG,EAAyBF,EAC3BC,IAA6BD,CAAW,GAAG,iBAC3C,OAMJ,OAJyBE,GAErBN,EAAuC,CAG7C,EAd+C,mCAqBlCO,EAAmCN,EAC9CE,GAGEA,GAAS,mBAAmB,8BAAgCJ,EAJhB,oCAanCS,EAAgCP,EAC3CE,GAGEA,GAAS,mBAAmB,4BAA8BJ,EAJjB","names":["STEPS","STEPS_WITHOUT_SELECT_COUNTRY","reviewStepAllowedEmploymentStatus","disabledInviteButtonEmploymentStatus","DEFAULT_VERSION","getDefaultContractDetailsSchemaVersion","__name","getContractDetailsSchemaVersion","options","countryCode","jsonSchemaVersionByCountry","countrySpecificVersion","getBasicInformationSchemaVersion","getBenefitOffersSchemaVersion"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a}from"./chunk-WWXX3PU7.js";import{a as r}from"./chunk-MJQUJZCD.js";import{a as t}from"./chunk-HVOYAQHI.js";import{a as f}from"./chunk-X6PTF3PD.js";import{a as e}from"./chunk-V3ZGBTES.js";import{a as p}from"./chunk-R7G5G45H.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-NI3CJNG3.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-JVHQ5EG3.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-R7G5G45H.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-K5HZE7M6.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-RKGD6XC7.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-HNTEGDI2.js";import{b as a}from"./chunk-PGWKJ6FK.js";import{f as t}from"./chunk-JEGVULKU.js";import{b as s}from"./chunk-X6ZAR7ZL.js";import{a as e}from"./chunk-P37U34EQ.js";import{jsx as E}from"react/jsx-runtime";function P({components:d,onSubmit:l,onError:i,onSuccess:f}){let{onboardingBag:o}=a(),p=o.fields??[],c=t(p,o.initialValues.benefits);return E(m,{defaultValues:c,components:d,onSubmit:e(async n=>{try{await l?.(n);let r=await o.onSubmit(n);if(r?.data){await f?.(r.data),o?.next();return}if(r?.error){let u=s(r?.fieldErrors||[],o.meta?.fields?.benefits);i?.({error:r.error,rawError:r.rawError,fieldErrors:u})}}catch(r){i?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit")})}e(P,"BenefitsStep");export{P as a};
|
|
2
|
+
//# sourceMappingURL=chunk-S42DBWAF.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{c as m}from"./chunk-JEGVULKU.js";import{b as f}from"./chunk-Z5WMKCRJ.js";import{a as n}from"./chunk-P37U34EQ.js";import{createHeadlessForm as a,modify as u}from"@remoteoss/remote-json-schema-form-kit";var c=n((e,o,t)=>{if(t&&t.jsfModify){let{required:i,allOf:r,...s}=t.jsfModify,{schema:l}=u(e,s);e=l,i&&(e.required=[...l.required,...i]),r&&(e.allOf=[...l.allOf||[],...r])}let d={};o&&(d=f(e.properties||{},"money").reduce((r,s)=>(r[s]=m(o[s]),r),{}));let F=JSON.parse(JSON.stringify({...o,...d}));return{meta:{"x-jsf-fieldsets":e["x-jsf-fieldsets"]},...a(e,{initialValues:F})}},"createHeadlessForm");export{c as a};
|
|
2
|
+
//# sourceMappingURL=chunk-S5VSWHJY.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{d as o}from"./chunk-JEGVULKU.js";import{a as e}from"./chunk-P37U34EQ.js";var d={form:{index:0,name:"form"},confirmation_form:{index:1,name:"confirmation_form"}};function f(t,r){if(!t)return{};if(!r)return{...t.contract_details,effective_date:"",reason_for_change:"",job_title:t.job_title,additional_comments:"",annual_gross_salary:o(t.contract_details?.annual_gross_salary)};let s=r.map(n=>n.name),i=Object.keys(t?.contract_details||{});return{...s.reduce((n,a)=>{if(i.includes(a)){let c=t?.contract_details;n[a]=c[a]}return n},{}),effective_date:"",reason_for_change:"",job_title:t.job_title,additional_comments:"",annual_gross_salary:o(t.contract_details?.annual_gross_salary),additional_comments_toggle:!1}}e(f,"buildInitialValues");export{d as a,f as b};
|
|
2
|
+
//# sourceMappingURL=chunk-SQPCNBJC.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as I}from"./chunk-TXSUZLOI.js";import{a as N}from"./chunk-A3LRPGV3.js";import{a as j,b as v,c as D,d as O}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as I}from"./chunk-TXSUZLOI.js";import{a as N}from"./chunk-A3LRPGV3.js";import{a as j,b as v,c as D,d as O}from"./chunk-2MTSUYN6.js";import{e as p,f as F}from"./chunk-JEGVULKU.js";import{h as R,i as b}from"./chunk-VIGKOVHP.js";import{a as C}from"./chunk-X6ZAR7ZL.js";import{a as k}from"./chunk-TSPDJUGG.js";import{a as c}from"./chunk-P37U34EQ.js";import{useMemo as S,useRef as ee,useState as A}from"react";var pe=c(({countryCode:L,options:u,initialValues:l})=>{let P=j(),g=v(),{mutateAsync:q}=C(P),{mutateAsync:J}=C(g),[y,U]=A(L||null),[f,B]=A(null),w=ee({company_basic_information:{},address_details:{}}),{fieldValues:V,stepState:a,setFieldValues:W,previousStep:z,nextStep:G,goToStep:H}=k(N),{companyBasicInformationForm:d,isLoading:K}=D({jsfModify:u?.jsfModify?.company_basic_information,queryOptions:{enabled:a.currentStep.name==="company_basic_information"}}),{data:s,isLoading:Q}=O({countryCode:y,fieldValues:a.currentStep.name==="address_details"?{...a.values?.address_details||{},...V}:a.values?.address_details||{},options:{...u,jsfModify:u?.jsfModify?.address_details,queryOptions:{enabled:a.currentStep.name==="address_details"&&!!y&&!!f}}}),i=S(()=>({company_basic_information:d?.fields||[],address_details:s?.fields||[]}),[d?.fields,s?.fields]),X={company_basic_information:null,address_details:s?.meta?.["x-jsf-fieldsets"]||null},h=S(()=>F(i.company_basic_information,{...l,country_code:y||l?.country_code||""}),[i.company_basic_information,y,l]),E=S(()=>F(i.address_details,l||{}),[i.address_details,l]),Y=S(()=>({company_basic_information:h,address_details:E}),[h,E]),Z=c(t=>{H(t)},"goTo"),M=c(async t=>{let r=a.currentStep.name,e=i[r];return d&&r==="company_basic_information"?await p(t,e,{isPartialValidation:!1}):s&&r==="address_details"?await p(t,e,{isPartialValidation:!1}):{}},"parseFormValues");async function $(t){let r=a.currentStep.name;r in w.current&&(w.current[r]=R(t,i[r]));let e=await M(t);switch(a.currentStep.name){case"company_basic_information":{if(U(e.country_code),f)return Promise.resolve({data:{countryCode:e.country_code??"",companyOwnerEmail:e.company_owner_email??"",companyOwnerName:e.company_owner_name??"",desiredCurrency:e.desired_currency??"",name:e.name??"",phoneNumber:e.phone_number??"",taxNumber:e.tax_number??""}});let x={country_code:e.country_code,company_owner_email:e.company_owner_email,company_owner_name:e.company_owner_name,desired_currency:e.desired_currency,name:e.name,phone_number:e.phone_number,tax_number:e.tax_number,terms_of_service_accepted_at:I()},n=await q(x);if(n.error)return Promise.resolve({data:null,error:n.error,rawError:n.rawError,fieldErrors:n.fieldErrors});let m=n.data?.data,_,o;if(m)if("data"in m&&m.data){let T=m.data.company;o=T,_=T?.id}else"company"in m&&(o=m.company,_=o?.id);return _&&B(_),Promise.resolve({data:{countryCode:o?.country_code??e.country_code??"",companyOwnerEmail:o?.company_owner_email??e.company_owner_email??"",companyOwnerName:o?.company_owner_name??e.company_owner_name??"",desiredCurrency:o?.desired_currency??e.desired_currency??"",name:o?.name??e.name??"",phoneNumber:o?.phone_number??e.phone_number??"",taxNumber:o?.tax_number??e.tax_number??""}})}case"address_details":{if(!f)throw b("Company ID is required to update address details");let n=await J({companyId:f,payload:{address_details:e},jsonSchemaVersion:u?.jsonSchemaVersion?.form_schema?.address_details});return n.error?Promise.resolve({data:null,error:n.error,rawError:n.rawError,fieldErrors:n.fieldErrors}):Promise.resolve({data:n.data})}default:throw b("Invalid step state")}}return c($,"onSubmit"),{isLoading:K||Q,isSubmitting:P.isPending||g.isPending,fieldValues:V,stepState:a,checkFieldUpdates:W,back:z,next:G,goTo:Z,onSubmit:$,fields:i[a.currentStep.name],meta:{fields:w.current,fieldsets:X[a.currentStep.name]},parseFormValues:M,handleValidation:c(async t=>{if(a.currentStep.name==="company_basic_information"&&d){let r=await p(t,d.fields,{isPartialValidation:!1});return d.handleValidation(r)}if(a.currentStep.name==="address_details"&&s){let r=await p(t,s.fields,{isPartialValidation:!1});return s.handleValidation(r)}return null},"handleValidation"),initialValues:Y}},"useCreateCompany");export{pe as a};
|
|
2
|
+
//# sourceMappingURL=chunk-TGQTFWAB.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-KRJETP7I.js";import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-KRJETP7I.js";import{a}from"./chunk-4Q2FKKQU.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-4EFT4EBW.js";import{a as n}from"./chunk-JJMBP6FU.js";import{a as p}from"./chunk-S42DBWAF.js";import{a as s}from"./chunk-IN74TK34.js";import{c as e}from"./chunk-D4TLSPX5.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-TJHW5QSC.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-LU265KXN.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-U33Q35CB.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{f as x,g as y,h as d}from"./chunk-LXOYWRNU.js";import{a as j}from"./chunk-WVJDCDGZ.js";import{a as R}from"./chunk-O6H66UM2.js";import{a as p}from"./chunk-S5VSWHJY.js";import{A as S,E as w,G as v,H as O,J as E,O as q,T as P,g as f,i as h,j as g,n as b,o as C,w as F,x as _}from"./chunk-WQ4H5V7U.js";import{d as i}from"./chunk-KQPDXXG3.js";import{a as n}from"./chunk-P37U34EQ.js";import{useMutation as c,useQuery as u}from"@tanstack/react-query";var L=n(e=>{let{client:r}=i();return u({queryKey:["employment",e],retry:!1,enabled:!!e,select:n(({data:t})=>t?.data.employment,"select"),queryFn:n(async()=>{let t=await v({client:r,headers:{Authorization:""},path:{employment_id:e}});if(t.error||!t.data)throw new Error("Failed to fetch employment data");return t},"queryFn")})},"useEmployment"),G=n(e=>{let{client:r}=i();return u({queryKey:["company",e],retry:!1,enabled:!!e,queryFn:n(async()=>{let t=await _({client:r,headers:{Authorization:""},path:{company_id:e}});if(t.error||!t.data)throw new Error("Failed to fetch employment data");return t},"queryFn"),select:n(({data:t})=>t.data.company,"select")})},"useCompany"),X=n(e=>{let{client:r}=i();return u({queryKey:["benefit-offers",e],retry:!1,enabled:!!e,queryFn:n(async()=>b({client:r,path:{employment_id:e}}).then(t=>{if(t.error||!t.data)throw new Error("Failed to fetch benefit offers data");return t}),"queryFn"),select:n(({data:t})=>t?.data?.reduce((s,o)=>({...s,[o.benefit_group.slug]:{value:o.benefit_tier?.slug??"no",...o.benefit_group?.filter?.slug?{filter:o.benefit_group?.filter?.slug}:{}}}),{}),"select")})},"useBenefitOffers"),Y=n(()=>{let{client:e}=i();return c({mutationFn:n(r=>P({client:e,headers:{Authorization:""},path:r}),"mutationFn")})},"useEmploymentInvite"),Z=n(()=>{let{client:e}=i();return c({mutationFn:n(r=>F({client:e,body:r}),"mutationFn")})},"useCreateReserveInvoice"),$=n(({countryCode:e,form:r,fieldValues:t,options:s,query:o={},jsonSchemaVersion:a})=>{let{client:l}=i(),U=a?{json_schema_version:a}:{};return u({queryKey:["onboarding-json-schema-form",e,r],retry:!1,queryFn:n(async()=>{let m=await S({client:l,headers:{Authorization:""},path:{country_code:e,form:r},query:{skip_benefits:!0,...o,...U}});if(m.error||!m.data)throw new Error("Failed to fetch onboarding schema");return m},"queryFn"),enabled:s?.queryOptions?.enabled,select:n(({data:m})=>{let B=m?.data||{};return p(B,t,s)},"select")})},"useJSONSchemaForm"),ee=n((e,r,t)=>{let{client:s}=i(),o={json_schema_version:d(t)};return u({queryKey:["benefit-offers-schema",e],retry:!1,enabled:!!e,queryFn:n(async()=>{let a=await w({client:s,path:{employment_id:e},query:o});if(a.error||!a.data)throw new Error("Failed to fetch benefit offers schema");return a},"queryFn"),select:n(({data:a})=>{let l=a?.data?.schema||{};return p(l,r,{jsfModify:t?.jsfModify?.benefits})},"select")})},"useBenefitOffersSchema"),te=n(e=>{let{client:r}=i(),t={json_schema_version:y(e)};return c({mutationFn:n(s=>h({client:r,headers:{Authorization:""},body:s,query:{...t}}),"mutationFn")})},"useCreateEmployment"),ne=n((e,r)=>{let{client:t}=i(),s={employment_basic_information_json_schema_version:y(r),contract_details_json_schema_version:x(r,e)||1};return c({mutationFn:n(({employmentId:o,...a})=>O({client:t,headers:{Authorization:""},body:a,path:{employment_id:o},query:{skip_benefits:!0,...s}}),"mutationFn")})},"useUpdateEmployment"),re=n(e=>{let{client:r}=i();return c({mutationFn:n(({employmentId:t,...s})=>{let o={json_schema_version:d(e)};return C({client:r,body:s,path:{employment_id:t},query:o})},"mutationFn")})},"useUpdateBenefitsOffers"),oe=n(e=>{let{client:r}=i(),{data:t,isLoading:s}=u({...R(r,"onboarding-countries"),select:n(a=>a.data?.data?.filter(l=>l.eor_onboarding).map(l=>({label:l.name,value:l.code}))||[],"select"),enabled:e?.queryOptions?.enabled}),o=p(j.data.schema,{},e);if(t){let a=o.fields.find(l=>l.name==="country");a&&(a.options=t)}return{isLoading:s,selectCountryForm:o}},"useCountriesSchemaField"),se=n(({type:e="spread"})=>{let{client:r}=i();return c({mutationFn:n(t=>(e==="no_spread"?f:q)({client:r,body:t}),"mutationFn")})},"useConvertCurrency"),ae=n(()=>{let{client:e}=i();return c({mutationFn:n(({employmentId:r,...t})=>E({client:e,path:{employment_id:r},body:t}),"mutationFn")})},"useUpsertContractEligibility"),ie=n((e,r,t=!0)=>{let{client:s}=i();return u({queryKey:["employment-onboarding-reserves-status",e,r],retry:!1,enabled:t&&!!e&&!!r,queryFn:n(async()=>{let o=await g({client:s,headers:{Authorization:""},path:{company_id:e,employment_id:r}});if(o.error||!o.data)throw new Error("Failed to fetch employment onboarding reserves status");return o},"queryFn"),select:n(({data:o})=>o?.data?.status,"select")})},"useEmploymentOnboardingReservesStatus");export{L as a,G as b,X as c,Y as d,Z as e,$ as f,ee as g,te as h,ne as i,re as j,oe as k,se as l,ae as m,ie as n};
|
|
2
|
+
//# sourceMappingURL=chunk-U4QOJDBZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/flows/Onboarding/api.ts"],"sourcesContent":["import { useMutation, useQuery, UseQueryResult } from '@tanstack/react-query';\nimport { FieldValues } from 'react-hook-form';\nimport { Client } from '@/src/client/client';\nimport {\n ConvertCurrencyParams,\n CreateContractEligibilityParams,\n EmploymentCreateParams,\n EmploymentFullParams,\n getIndexBenefitOffer,\n getShowCompany,\n getShowCompanyEmploymentOnboardingReservesStatus,\n getShowEmployment,\n getShowFormCountry,\n getShowSchema,\n patchUpdateEmployment2,\n postConvertRawCurrencyConverter,\n postConvertWithSpreadCurrencyConverter,\n postCreateContractEligibility,\n postCreateEmployment2,\n postCreateRiskReserve,\n postInviteEmploymentInvitation,\n PostInviteEmploymentInvitationData,\n putUpdateBenefitOffer,\n UnifiedEmploymentUpsertBenefitOffersRequest,\n} from '@/src/client';\n\nimport { useClient } from '@/src/context';\nimport { selectCountryStepSchema } from '@/src/flows/Onboarding/json-schemas/selectCountryStep';\nimport { OnboardingFlowProps } from '@/src/flows/Onboarding/types';\nimport {\n JSONSchemaFormResultWithFieldsets,\n JSONSchemaFormType,\n FlowOptions,\n} from '@/src/flows/types';\nimport {\n getContractDetailsSchemaVersion,\n getBasicInformationSchemaVersion,\n getBenefitOffersSchemaVersion,\n} from '@/src/flows/Onboarding/utils';\nimport { createHeadlessForm } from '@/src/common/createHeadlessForm';\nimport { countriesOptions } from '@/src/common/api/countries';\n\nexport const useEmployment = (employmentId: string | undefined) => {\n const { client } = useClient();\n\n return useQuery({\n queryKey: ['employment', employmentId],\n retry: false,\n enabled: !!employmentId,\n select: ({ data }) => {\n return data?.data.employment;\n },\n queryFn: async () => {\n const response = await getShowEmployment({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n path: {\n employment_id: employmentId as string,\n },\n });\n\n // If response status is 404 or other error, throw an error to trigger isError\n if (response.error || !response.data) {\n throw new Error('Failed to fetch employment data');\n }\n\n return response;\n },\n });\n};\n\nexport const useCompany = (companyId: string) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['company', companyId],\n retry: false,\n enabled: !!companyId,\n queryFn: async () => {\n const response = await getShowCompany({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n path: {\n company_id: companyId,\n },\n });\n\n if (response.error || !response.data) {\n throw new Error('Failed to fetch employment data');\n }\n\n return response;\n },\n select: ({ data }) => {\n return data.data.company;\n },\n });\n};\n\nexport const useBenefitOffers = (employmentId: string | undefined) => {\n const { client } = useClient();\n return useQuery({\n queryKey: ['benefit-offers', employmentId],\n retry: false,\n enabled: !!employmentId,\n queryFn: async () => {\n return getIndexBenefitOffer({\n client: client as Client,\n path: {\n employment_id: employmentId as string,\n },\n }).then((response) => {\n // If response status is 404 or other error, throw an error to trigger isError\n if (response.error || !response.data) {\n throw new Error('Failed to fetch benefit offers data');\n }\n\n return response;\n });\n },\n select: ({ data }) =>\n data?.data?.reduce(\n (acc, item) => {\n return {\n ...acc,\n [item.benefit_group.slug]: {\n value: item.benefit_tier?.slug ?? 'no',\n ...(item.benefit_group?.filter?.slug\n ? { filter: item.benefit_group?.filter?.slug }\n : {}),\n },\n };\n },\n {} as Record<string, { value: string }>,\n ),\n });\n};\n/**\n * Use this hook to invite an employee to the onboarding flow\n * @returns\n */\nexport const useEmploymentInvite = () => {\n const { client } = useClient();\n\n return useMutation({\n mutationFn: (payload: PostInviteEmploymentInvitationData['path']) => {\n return postInviteEmploymentInvitation({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n path: payload,\n });\n },\n });\n};\n\nexport const useCreateReserveInvoice = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: (payload: { employment_slug: string }) => {\n return postCreateRiskReserve({\n client: client as Client,\n body: payload,\n });\n },\n });\n};\n\n/**\n * Use this hook to get the JSON schema form for the onboarding flow\n * @param param0\n * @returns\n */\nexport const useJSONSchemaForm = ({\n countryCode,\n form,\n fieldValues,\n options,\n query = {},\n jsonSchemaVersion,\n}: {\n countryCode: string;\n form: JSONSchemaFormType;\n fieldValues: FieldValues;\n options?: FlowOptions & { queryOptions?: { enabled?: boolean } };\n query?: Record<string, unknown>;\n jsonSchemaVersion?: number | 'latest';\n}): UseQueryResult<JSONSchemaFormResultWithFieldsets> => {\n const { client } = useClient();\n const jsonSchemaQueryParam = jsonSchemaVersion\n ? {\n json_schema_version: jsonSchemaVersion,\n }\n : {};\n return useQuery({\n queryKey: ['onboarding-json-schema-form', countryCode, form],\n retry: false,\n queryFn: async () => {\n const response = await getShowFormCountry({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n path: {\n country_code: countryCode,\n form: form,\n },\n query: {\n skip_benefits: true,\n ...query,\n ...jsonSchemaQueryParam,\n },\n });\n\n // If response status is 404 or other error, throw an error to trigger isError\n if (response.error || !response.data) {\n throw new Error('Failed to fetch onboarding schema');\n }\n\n return response;\n },\n enabled: options?.queryOptions?.enabled,\n select: ({ data }) => {\n const jsfSchema = data?.data || {};\n return createHeadlessForm(jsfSchema, fieldValues, options);\n },\n });\n};\n\nexport const useBenefitOffersSchema = (\n employmentId: string,\n fieldValues: FieldValues,\n options: OnboardingFlowProps['options'],\n) => {\n const { client } = useClient();\n const jsonSchemaQueryParam = {\n json_schema_version: getBenefitOffersSchemaVersion(options),\n };\n\n return useQuery({\n queryKey: ['benefit-offers-schema', employmentId],\n retry: false,\n enabled: !!employmentId,\n queryFn: async () => {\n const response = await getShowSchema({\n client: client as Client,\n path: {\n employment_id: employmentId,\n },\n query: jsonSchemaQueryParam,\n });\n\n // If response status is 404 or other error, throw an error to trigger isError\n if (response.error || !response.data) {\n throw new Error('Failed to fetch benefit offers schema');\n }\n\n return response;\n },\n select: ({ data }) => {\n const jsfSchema = data?.data?.schema || {};\n\n return createHeadlessForm(jsfSchema, fieldValues, {\n jsfModify: options?.jsfModify?.benefits,\n });\n },\n });\n};\n\n/**\n * Use this hook to create an employment\n * @returns\n */\nexport const useCreateEmployment = (\n options?: OnboardingFlowProps['options'],\n) => {\n const { client } = useClient();\n const jsonSchemaQueryParam = {\n json_schema_version: getBasicInformationSchemaVersion(options),\n };\n return useMutation({\n mutationFn: (payload: EmploymentCreateParams) => {\n return postCreateEmployment2({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n body: payload,\n query: {\n ...jsonSchemaQueryParam,\n },\n });\n },\n });\n};\n\nexport const useUpdateEmployment = (\n countryCode: string,\n options?: OnboardingFlowProps['options'],\n) => {\n const { client } = useClient();\n const jsonSchemaQueryParams = {\n employment_basic_information_json_schema_version:\n getBasicInformationSchemaVersion(options),\n contract_details_json_schema_version:\n getContractDetailsSchemaVersion(options, countryCode) || 1,\n };\n\n return useMutation({\n mutationFn: ({\n employmentId,\n ...payload\n }: EmploymentFullParams & { employmentId: string }) => {\n return patchUpdateEmployment2({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n body: payload,\n path: {\n employment_id: employmentId,\n },\n query: {\n skip_benefits: true,\n ...jsonSchemaQueryParams,\n },\n });\n },\n });\n};\n\nexport const useUpdateBenefitsOffers = (\n options?: OnboardingFlowProps['options'],\n) => {\n const { client } = useClient();\n return useMutation({\n mutationFn: ({\n employmentId,\n ...payload\n }: UnifiedEmploymentUpsertBenefitOffersRequest & {\n employmentId: string;\n }) => {\n const jsonSchemaQueryParam = {\n json_schema_version: getBenefitOffersSchemaVersion(options),\n };\n\n return putUpdateBenefitOffer({\n client: client as Client,\n body: payload,\n path: {\n employment_id: employmentId,\n },\n query: jsonSchemaQueryParam,\n });\n },\n });\n};\n\nexport const useCountriesSchemaField = (\n options?: Omit<FlowOptions, 'jsonSchemaVersion'> & {\n queryOptions?: { enabled?: boolean };\n },\n) => {\n const { client } = useClient();\n const { data: countries, isLoading } = useQuery({\n ...countriesOptions(client as Client, 'onboarding-countries'),\n select: (response) => {\n return (\n response.data?.data\n ?.filter((country) => country.eor_onboarding)\n .map((country) => {\n return {\n label: country.name,\n value: country.code,\n };\n }) || []\n );\n },\n enabled: options?.queryOptions?.enabled,\n });\n\n const selectCountryForm = createHeadlessForm(\n selectCountryStepSchema.data.schema,\n {},\n options,\n );\n\n if (countries) {\n const countryField = selectCountryForm.fields.find(\n (field) => field.name === 'country',\n );\n if (countryField) {\n countryField.options = countries;\n }\n }\n\n return {\n isLoading,\n selectCountryForm,\n };\n};\n\nexport const useConvertCurrency = ({\n type = 'spread',\n}: {\n type?: 'spread' | 'no_spread';\n}) => {\n const { client } = useClient();\n return useMutation({\n mutationFn: (payload: ConvertCurrencyParams) => {\n const apiFn =\n type === 'no_spread'\n ? postConvertRawCurrencyConverter\n : postConvertWithSpreadCurrencyConverter;\n return apiFn({\n client: client as Client,\n body: payload,\n });\n },\n });\n};\n\nexport const useUpsertContractEligibility = () => {\n const { client } = useClient();\n return useMutation({\n mutationFn: ({\n employmentId,\n ...payload\n }: { employmentId: string } & CreateContractEligibilityParams) => {\n return postCreateContractEligibility({\n client: client as Client,\n path: {\n employment_id: employmentId,\n },\n body: payload,\n });\n },\n });\n};\n\n/**\n * Hook to fetch onboarding reserves status for an employment\n * @param companyId - Company ID\n * @param employmentId - Employment ID\n * @param enabled - Whether the query should be enabled\n * @returns Query result with onboarding reserves status\n */\nexport const useEmploymentOnboardingReservesStatus = (\n companyId: string | undefined,\n employmentId: string | undefined,\n enabled = true,\n) => {\n const { client } = useClient();\n return useQuery({\n queryKey: [\n 'employment-onboarding-reserves-status',\n companyId,\n employmentId,\n ],\n retry: false,\n enabled: enabled && !!companyId && !!employmentId,\n queryFn: async () => {\n const response = await getShowCompanyEmploymentOnboardingReservesStatus({\n client: client as Client,\n headers: {\n Authorization: ``,\n },\n path: {\n company_id: companyId as string,\n employment_id: employmentId as string,\n },\n });\n\n if (response.error || !response.data) {\n throw new Error(\n 'Failed to fetch employment onboarding reserves status',\n );\n }\n\n return response;\n },\n select: ({ data }) => data?.data?.status,\n });\n};\n"],"mappings":"iYAAA,OAAS,eAAAA,EAAa,YAAAC,MAAgC,wBA0C/C,IAAMC,EAAgBC,EAACC,GAAqC,CACjE,GAAM,CAAE,OAAAC,CAAO,EAAIC,EAAU,EAE7B,OAAOC,EAAS,CACd,SAAU,CAAC,aAAcH,CAAY,EACrC,MAAO,GACP,QAAS,CAAC,CAACA,EACX,OAAQD,EAAA,CAAC,CAAE,KAAAK,CAAK,IACPA,GAAM,KAAK,WADZ,UAGR,QAASL,EAAA,SAAY,CACnB,IAAMM,EAAW,MAAMC,EAAkB,CACvC,OAAQL,EACR,QAAS,CACP,cAAe,EACjB,EACA,KAAM,CACJ,cAAeD,CACjB,CACF,CAAC,EAGD,GAAIK,EAAS,OAAS,CAACA,EAAS,KAC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KAAAsD,EAAO,QACT,IAEM,CACJ,GAAM,CAAE,OAAApD,CAAO,EAAIC,EAAU,EAC7B,OAAOa,EAAY,CACjB,WAAYhB,EAACiB,IAETqC,IAAS,YACLC,EACAC,GACO,CACX,OAAQtD,EACR,KAAMe,CACR,CAAC,EARS,aAUd,CAAC,CACH,EAlBkC,sBAoBrBwC,GAA+BzD,EAAA,IAAM,CAChD,GAAM,CAAE,OAAAE,CAAO,EAAIC,EAAU,EAC7B,OAAOa,EAAY,CACjB,WAAYhB,EAAA,CAAC,CACX,aAAAC,EACA,GAAGgB,CACL,IACSyC,EAA8B,CACnC,OAAQxD,EACR,KAAM,CACJ,cAAeD,CACjB,EACA,KAAMgB,CACR,CAAC,EAVS,aAYd,CAAC,CACH,EAhB4C,gCAyB/B0C,GAAwC3D,EAAA,CACnDS,EACAR,EACA2D,EAAU,KACP,CACH,GAAM,CAAE,OAAA1D,CAAO,EAAIC,EAAU,EAC7B,OAAOC,EAAS,CACd,SAAU,CACR,wCACAK,EACAR,CACF,EACA,MAAO,GACP,QAAS2D,GAAW,CAAC,CAACnD,GAAa,CAAC,CAACR,EACrC,QAASD,EAAA,SAAY,CACnB,IAAMM,EAAW,MAAMuD,EAAiD,CACtE,OAAQ3D,EACR,QAAS,CACP,cAAe,EACjB,EACA,KAAM,CACJ,WAAYO,EACZ,cAAeR,CACjB,CACF,CAAC,EAED,GAAIK,EAAS,OAAS,CAACA,EAAS,KAC9B,MAAM,IAAI,MACR,uDACF,EAGF,OAAOA,CACT,EAnBS,WAoBT,OAAQN,EAAA,CAAC,CAAE,KAAAK,CAAK,IAAMA,GAAM,MAAM,OAA1B,SACV,CAAC,CACH,EApCqD","names":["useMutation","useQuery","useEmployment","__name","employmentId","client","useClient","useQuery","data","response","getShowEmployment","useCompany","companyId","getShowCompany","useBenefitOffers","getIndexBenefitOffer","acc","item","useEmploymentInvite","useMutation","payload","postInviteEmploymentInvitation","useCreateReserveInvoice","postCreateRiskReserve","useJSONSchemaForm","countryCode","form","fieldValues","options","query","jsonSchemaVersion","jsonSchemaQueryParam","getShowFormCountry","jsfSchema","createHeadlessForm","useBenefitOffersSchema","getBenefitOffersSchemaVersion","getShowSchema","useCreateEmployment","getBasicInformationSchemaVersion","postCreateEmployment2","useUpdateEmployment","jsonSchemaQueryParams","getContractDetailsSchemaVersion","patchUpdateEmployment2","useUpdateBenefitsOffers","putUpdateBenefitOffer","useCountriesSchemaField","countries","isLoading","countriesOptions","country","selectCountryForm","selectCountryStepSchema","countryField","field","useConvertCurrency","type","postConvertRawCurrencyConverter","postConvertWithSpreadCurrencyConverter","useUpsertContractEligibility","postCreateContractEligibility","useEmploymentOnboardingReservesStatus","enabled","getShowCompanyEmploymentOnboardingReservesStatus"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-6ORP3EVR.js";import{a as r}from"./chunk-JNMD7SWN.js";import{a}from"./chunk-U6LRMWRI.js";import{a as c}from"./chunk-5QOEBELF.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-UEDPRIG7.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as N}from"./chunk-SNECOPBD.js";import{i as U}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as N}from"./chunk-SNECOPBD.js";import{i as U}from"./chunk-JEGVULKU.js";import{b as L,c as O,f as G}from"./chunk-AOSXULKY.js";import{a as I}from"./chunk-BYDQHL6O.js";import{a as z}from"./chunk-HJ7WOTV7.js";import{b as J}from"./chunk-YHCH57B7.js";import{c as p,h as g}from"./chunk-7EONM7HL.js";import{a as _,e as H}from"./chunk-VIGKOVHP.js";import{b as C}from"./chunk-KQPDXXG3.js";import{a as n}from"./chunk-P37U34EQ.js";import{Fragment as fe,useEffect as Pe,useRef as ge}from"react";import{jsx as Z}from"react/jsx-runtime";function q({description:e,label:t,name:i,minDate:l,maxDate:s,onChange:d,component:r,...c}){let{components:h}=C(),{control:u}=p(),F;c.meta?.mot&&typeof c.meta.mot=="number"?F=U(c.meta.mot):typeof l=="string"&&(F=new Date(`${l}T00:00:00`));let a;return s&&(a=new Date(`${s}T23:59:59`)),Z(g,{control:u,name:i,render:({field:f,fieldState:S})=>{let m=r||h?.date;if(!m)throw new Error(`Date picker component not found for field ${i}`);let y={description:e,label:t,name:i,onChange:d,...F&&{minDate:F.toISOString()},...a&&{maxDate:a.toISOString()},...c};return Z(m,{field:{...f,onChange:n(x=>{f.onChange(x),d?.(x)},"onChange")},fieldState:S,fieldData:y})}})}n(q,"DatePickerField");import{jsx as K}from"react/jsx-runtime";var xe=n((e,t)=>{if(!t)return null;for(let i of e)if(i.size>t){let l=Math.round(t/1048576),s=Math.round(i.size/(1024*1024));return`File "${i.name}" exceeds maximum size of ${l}MB (file is ${s}MB)`}return null},"validateFileSize");function Q({name:e,description:t,label:i,multiple:l,onChange:s,component:d,accept:r,maxSize:c,...h}){let{components:u}=C(),{control:F,setError:a,clearErrors:f}=p(),S=n(async(m,y)=>{let x=xe(m,c);if(x){a(e,{message:x});return}f(e),y.onChange(m),s?.(m)},"handleOnChange");return K(g,{control:F,name:e,render:({field:m,fieldState:y})=>{let x=d||u.file;if(!x)throw new Error(`File upload component not found for field ${e}`);let D={name:e,description:t,label:i,multiple:l,accept:r,maxFileSize:c,...h};return K(x,{field:{...m,value:m.value,onChange:n(async T=>S(T,m),"onChange")},fieldState:y,fieldData:D})}})}n(Q,"FileUploadField");import{jsx as X}from"react/jsx-runtime";function M(e){let{components:t}=C(),{control:i}=p(),l=e.component||t.number;if(!l)throw new Error(`Number component not found for field ${e.name}`);return X(g,{control:i,name:e.name,render:({field:s,fieldState:d})=>X(l,{field:{...s,onChange:n(r=>{s.onChange(r),e.onChange?.(r)},"onChange")},fieldState:d,fieldData:e})})}n(M,"NumberField");import{jsx as Y}from"react/jsx-runtime";function j({name:e,defaultValue:t,description:i,label:l,options:s,onChange:d,component:r,...c}){let{components:h}=C(),{control:u}=p();return Y(g,{control:u,name:e,defaultValue:t,render:({field:F,fieldState:a})=>{let f=r||h?.radio;if(!f)throw new Error(`Radio group component not found for field ${e}`);let S={name:e,defaultValue:t,description:i,label:l,options:s,...c};return Y(f,{field:{...F,onChange:n(m=>{F.onChange(m),d?.(m)},"onChange")},fieldState:a,fieldData:S})}})}n(j,"RadioGroupField");import{jsx as ee}from"react/jsx-runtime";function oe({label:e,name:t,options:i,defaultValue:l,description:s,onChange:d,component:r,...c}){let{control:h}=p(),{components:u}=C();return ee(g,{defaultValue:l,control:h,name:t,render:({field:F,fieldState:a})=>{let f=r||u?.select;if(!f)throw new Error(`Select component not found for field ${t}`);let S={label:e,name:t,options:i,defaultValue:l,description:s,onChange:d,...c};return ee(f,{field:{...F,onChange:n(m=>{let y=c.jsonType==="number"?Number(m):m;F.onChange(y),d?.(y)},"onChange")},fieldState:a,fieldData:S})}})}n(oe,"SelectField");import{jsx as te}from"react/jsx-runtime";function ne({label:e,name:t,options:i,defaultValue:l,description:s,onChange:d,$meta:r,component:c,...h}){let{control:u}=p(),{components:F}=C();return te(g,{defaultValue:l,control:u,name:t,render:({field:a,fieldState:f})=>{let S=c||F.countries;if(!S)throw new Error(`Country component not found for field ${t}`);let m={label:e,name:t,options:i,defaultValue:l,description:s,onChange:d,$meta:r,...h};return te(S,{field:{...a,onChange:n(y=>{a.onChange(y),d?.(y)},"onChange")},fieldState:f,fieldData:m})}})}n(ne,"CountryField");import{jsx as re}from"react/jsx-runtime";function ie({name:e,description:t,label:i,onChange:l,maxLength:s,component:d,...r}){let{components:c}=C(),{control:h}=p();return re(g,{control:h,name:e,render:({field:u,fieldState:F})=>{let a=d||c.textarea;if(!a)throw new Error(`Text area component not found for field ${e}`);let f={name:e,description:t,label:i,maxLength:s,...r};return re(a,{field:{...u,onChange:n(S=>{u.onChange(S),l?.(S)},"onChange")},fieldState:F,fieldData:f})}})}n(ie,"TextAreaField");import{jsx as le}from"react/jsx-runtime";function me(e){let{components:t}=C(),{control:i}=p(),l=e.component||t.email;if(!l)throw new Error(`Email component not found for field ${e.name}`);return le(g,{control:i,name:e.name,render:({field:s,fieldState:d})=>le(l,{field:{...s,onChange:n(r=>{s.onChange(r),e.onChange?.(r)},"onChange")},fieldState:d,fieldData:e})})}n(me,"EmailField");import{jsx as se}from"react/jsx-runtime";function ae(e){let{control:t}=p();return se(g,{control:t,name:e.name,render:({field:i})=>se("input",{...i,type:"hidden"})})}n(ae,"HiddenField");import{useEffect as be,useState as Te}from"react";import{jsx as de}from"react/jsx-runtime";function pe(e){let{components:t}=C(),{setValue:i,control:l,watch:s}=p(),d=s(e.name),[r,c]=Te(d),{workHoursSummary:h,breakSummary:u}=O(r),F=L(r);be(()=>{i(e.name,r)},[r,e.name,i]);function a(m){c(m)}n(a,"onSubmit");let f=e.component||t["work-schedule"];if(!f)throw new Error(`Work schedule component not found for field ${e.name}`);let S={...e,onSubmit:a,currentSchedule:r,defaultFormattedValue:{workHoursSummary:h,breakSummary:u,totalWorkHours:F}};return de(g,{control:l,name:e.name,render:({field:m,fieldState:y})=>de(f,{field:{...m,onChange:n(x=>{m.onChange(x),e.onChange?.(x)},"onChange")},fieldState:y,fieldData:S})})}n(pe,"WorkScheduleField");import{jsx as ce}from"react/jsx-runtime";function ue({label:e,name:t,options:i,defaultValue:l,description:s,onChange:d,component:r,...c}){let{control:h}=p(),{components:u}=C();return ce(g,{defaultValue:l,control:h,name:t,render:({field:F,fieldState:a})=>{let f=r||u?.["multi-select"];if(!f)throw new Error(`Multi select component not found for field ${t}`);let S={label:e,name:t,options:i,defaultValue:l,description:s,onChange:d,...c};return ce(f,{field:{...F,onChange:n(m=>{F.onChange(m),d?.(m)},"onChange")},fieldState:a,fieldData:S})}})}n(ue,"MultiSelectField");import{jsx as $e}from"react/jsx-runtime";var Fe=n(e=>$e(M,{maxLength:15,...e}),"MoneyField");var A={checkbox:G,text:z,email:me,money:Fe,select:oe,"multi-select":ue,radio:j,number:M,file:Q,date:q,textarea:ie,countries:ne,hidden:ae,"work-schedule":pe};import{Fragment as we,jsx as b,jsxs as P}from"react/jsx-runtime";function Ce({label:e,name:t,fields:i,description:l,components:s,statement:d,isFlatFieldset:r,extra:c,variant:h="outset",features:u,meta:F}){let{helpCenter:a}=F||{},{watch:f,setValue:S,trigger:m,formState:y}=p(),{components:x}=C(),D=u?.toggle?.stateField,T=D?f(D):u?.toggle?.defaultExpanded??!0,Se=i.map(({name:o})=>`${t}.${o}`),E=f(Se),B=ge(E),k=ge(null),he=n(()=>{D&&S(D,!T)},"toggleExpanded");Pe(()=>{let o=E,$=B.current,R=y.isSubmitted||y.submitCount>0,v=!1;for(let w=0;w<o.length;w++)if(o[w]!==void 0&&$[w]!==o[w]){v=!0;break}return v&&R&&(k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{m()},50)),B.current=[...o],()=>{k.current&&clearTimeout(k.current)}},[E,m,y.isSubmitted,y.submitCount]);let ye=x?.fieldsetToggle||I,V=`${t}-content`,W=`${t}-header`;return P("fieldset",{className:_("border-1 border-input p-4 rounded-xl","RemoteFlows__FieldSetField",`RemoteFlows__FieldSetField__${t}`),children:[b("legend",{className:_("text-sm font-semibold px-2",h==="inset"&&"hidden"),children:e}),a?.callToAction&&a?.id&&h==="outset"&&b(J,{className:"RemoteFlows__FieldSetField__HelpCenterLink mb-3",zendeskId:a.id,children:a.callToAction}),h==="inset"&&P(we,{children:[P("div",{className:"RemoteFlows__FieldSetField__Header",id:W,"data-state":T?"expanded":"collapsed","aria-expanded":T,children:[b("h3",{className:_("RemoteFlows__FieldSetField__Title"),children:e}),u?.toggle?.enabled&&b(ye,{isExpanded:T,onToggle:he,"aria-expanded":T,"aria-controls":V,"aria-label":`${T?"Hide":"Show"} ${e}`,className:_("RemoteFlows__FieldSetField__Toggle",u.toggle?.className),children:T?u.toggle.labels?.collapse??"Remove":u.toggle.labels?.expand??"Define"})]}),a?.callToAction&&a?.id&&b(J,{className:"RemoteFlows__FieldSetField__HelpCenterLink mb-3",zendeskId:a.id,children:a.callToAction})]}),T&&P("div",{id:V,"aria-labelledby":W,role:"region",children:[l?b("div",{className:"mb-5 RemoteFlows__FieldSetField__Description",dangerouslySetInnerHTML:{__html:H(l)}}):null,P("div",{className:"grid gap-4",children:[i.map(o=>{if(o.calculateDynamicProperties&&(o={...o,...o.calculateDynamicProperties(E,o)||{}}),o.isVisible===!1||o.deprecated)return null;let $=o.type;if($==="fieldset")return b(Ce,{...o,name:`${r?o.name:`${t}.${o.name}`}`,components:s},`${r?o.name:`${t}.${o.name}`}`);if($==="fieldset-flat")return b(Ce,{...o,name:`${r?o.name:`${t}.${o.name}`}`,components:s,isFlatFieldset:!0},`${r?o.name:`${t}.${o.name}`}`);let R=A[$];if(o.Component){let{Component:v}=o;return P(fe,{children:[b(v,{setValue:w=>S(r?o.name:`${t}.${o.name}`,w),...o}),o.statement?b(N,{...o.statement}):null,o.extra?o.extra:null]},`${r?o.name:`${t}.${o.name}`}`)}return R?($==="select"&&o.multiple&&(R=A["multi-select"]),P(fe,{children:[b(R,{...o,name:`${r?o.name:`${t}.${o.name}`}`,component:s?.[$]}),o.statement?b(N,{...o.statement}):null,o.extra?o.extra:null]},`${r?o.name:`${t}.${o.name}`}`)):P("p",{className:"error",children:["Field type ",$," not supported"]})}),c||null,d?b(N,{...d}):null]})]})]})}n(Ce,"FieldSetField");export{A as a,Ce as b};
|
|
2
|
+
//# sourceMappingURL=chunk-UTLIN5S6.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as y}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as y}from"./chunk-FXTOBTW4.js";import{a as l,b as m}from"./chunk-YHCH57B7.js";import{c}from"./chunk-7EONM7HL.js";import{a as t}from"./chunk-P37U34EQ.js";import{useEffect as N}from"react";import{Fragment as b,jsx as v,jsxs as C}from"react/jsx-runtime";var R=t(({currencies:{from:d,to:F},shouldSwapOrder:s,salary_conversion_properties:a,conversionType:_="no_spread",defaultValue:r,...e})=>{let{setValue:n,getValues:i}=c(),f={label:a?.label||"Salary conversion",description:a?.description||C(b,{children:["The conversion is based on the Remote FX rate."," ",v(m,{className:"text-sm",zendeskId:l.remoteFxRate,children:"Learn more \u2197"})]})},g=s?"salary_conversion":e.name,u=s?e.name:"salary_conversion";return N(()=>{if(s){let o=i(e.name);o?(n("salary_conversion",o),n("salary_converted","salary_conversion")):r&&(n("salary_conversion",r),n("salary_converted","salary_conversion"))}else{let o=i("salary_conversion");o?(n(e.name,o),n("salary_converted",e.name)):r&&(n(e.name,r),n("salary_converted",e.name))}},[s,r,n,i,e.name]),v(y,{...e,sourceCurrency:d,targetCurrency:F,mainFieldName:g,conversionFieldName:u,conversionProperties:f,classNamePrefix:"RemoteFlows-Salary",conversionType:_})},"SalaryField");export{R as a};
|
|
2
|
+
//# sourceMappingURL=chunk-UVBIRNQ4.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as i}from"./chunk-JVHQ5EG3.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-V3ZGBTES.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"./chunk-3C6N7DK6.js";import{a as c}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d}from"./chunk-3C6N7DK6.js";import{a as c}from"./chunk-K5HZE7M6.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-VHLCM6IM.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as i,c as m,d as s,e as f}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as i,c as m,d as s,e as f}from"./chunk-GECXYMDU.js";import{a as n}from"./chunk-TXSUZLOI.js";import{a}from"./chunk-P37U34EQ.js";import{useState as O}from"react";var B=a(({proposedTerminationDate:e,employeeName:y,employmentId:o,employment:r,render:d})=>{let[t,u]=O(!1),l=m({employmentId:o}),p=n(e).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"}),c=i({employmentId:o,options:{enabled:t}}),D=s({employmentId:o,date:e}),P=f({employmentId:o,proposedTerminationDate:e,employment:r});return d({leavePoliciesSummaryQuery:l,timeoffQuery:c||{data:{bookedDays:0,timeoffs:[]}},bookedTimeBeforeAndAfterTerminationQuery:D,formattedProposedTerminationDate:p,employeeName:y,proposedTerminationDate:e,summaryData:P??{data:{entitledDays:"0 days",bookedDays:"0 days",usedDays:"0 days",approvedDaysBeforeTermination:"0 days",approvedDaysAfterTermination:"0 days",remainingDays:"0 days",isUnlimitedPto:!1},isLoading:!1,isError:!1,error:null},employment:r,open:t,onOpenChange:a(()=>{u(T=>!T)},"onOpenChange")})},"PaidTimeOffContainer");export{B as a};
|
|
2
|
+
//# sourceMappingURL=chunk-VL5TI4XT.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as e}from"./chunk-JVHQ5EG3.js";import{b as a}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as s}from"react/jsx-runtime";function p({onSubmit:t}){let{terminationBag:o}=a(),n=i(async r=>{let m=await o?.parseFormValues(r);await t?.(m),o?.next()},"handleSubmit");return s(e,{defaultValues:o.fieldValues,onSubmit:n})}i(p,"TerminationDetailsForm");export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-WWXX3PU7.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-JVHQ5EG3.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-X6PTF3PD.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-K5HZE7M6.js";import{b as e}from"./chunk-Q3ALCPJN.js";import{k as n}from"./chunk-VIGKOVHP.js";import{a as t}from"./chunk-P37U34EQ.js";import{jsx as f}from"react/jsx-runtime";function b({onSubmit:m,onSuccess:d,onError:c}){let{contractorOnboardingBag:o}=e(),p=t(async i=>{try{let a=await o.parseFormValues(i);await m?.(a);let r=await o.onSubmit(i);if(r?.data){await d?.(r?.data),o?.next();return}}catch(a){let r=n(a,o.meta?.fields?.basic_information);c?.(r)}},"handleSubmit"),l=o.stepState.values?.basic_information||o.initialValues.basic_information;return f(s,{defaultValues:l,onSubmit:p})}t(b,"BasicInformationStep");export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ZEJRVVLJ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-6ORP3EVR.js";import"../../chunk-JEGVULKU.js";import"../../chunk-7EONM7HL.js";import"../../chunk-EOMVTXER.js";import"../../chunk-VIGKOVHP.js";import"../../chunk-X6ZAR7ZL.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentConfirmationForm};
|
|
2
2
|
//# sourceMappingURL=ContractAmendmentConfirmationForm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-UEDPRIG7.js";import"../../chunk-6ORP3EVR.js";import"../../chunk-JNMD7SWN.js";import"../../chunk-LNV36S6D.js";import"../../chunk-LU265KXN.js";import"../../chunk-UTLIN5S6.js";import"../../chunk-SNECOPBD.js";import"../../chunk-U6LRMWRI.js";import"../../chunk-5QOEBELF.js";import"../../chunk-SQPCNBJC.js";import"../../chunk-YIOLMWB5.js";import"../../chunk-S5VSWHJY.js";import"../../chunk-JEGVULKU.js";import"../../chunk-AOSXULKY.js";import"../../chunk-BYDQHL6O.js";import"../../chunk-HJ7WOTV7.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-TSPDJUGG.js";import"../../chunk-Z5WMKCRJ.js";import"../../chunk-D5AR26AI.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-KQPDXXG3.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentFlow};
|
|
2
2
|
//# sourceMappingURL=ContractAmendmentFlow.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-JNMD7SWN.js";import"../../chunk-LNV36S6D.js";import"../../chunk-LU265KXN.js";import"../../chunk-UTLIN5S6.js";import"../../chunk-SNECOPBD.js";import"../../chunk-JEGVULKU.js";import"../../chunk-AOSXULKY.js";import"../../chunk-BYDQHL6O.js";import"../../chunk-HJ7WOTV7.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-TVZAFTPT.js";import"../../chunk-KQPDXXG3.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentForm};
|
|
2
2
|
//# sourceMappingURL=ContractAmendmentForm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-5QOEBELF.js";import"../../chunk-SQPCNBJC.js";import"../../chunk-YIOLMWB5.js";import"../../chunk-S5VSWHJY.js";import"../../chunk-JEGVULKU.js";import"../../chunk-WQ4H5V7U.js";import"../../chunk-X6ZAR7ZL.js";import"../../chunk-TSPDJUGG.js";import"../../chunk-Z5WMKCRJ.js";import"../../chunk-KQPDXXG3.js";import"../../chunk-P37U34EQ.js";export{a as useContractAmendment};
|
|
2
2
|
//# sourceMappingURL=hooks.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../chunk-A7ZJQCNU.js";import{a as e}from"../../chunk-
|
|
1
|
+
import"../../chunk-A7ZJQCNU.js";import{a as e}from"../../chunk-UEDPRIG7.js";import{a}from"../../chunk-6ORP3EVR.js";import{a as b}from"../../chunk-JNMD7SWN.js";import"../../chunk-LNV36S6D.js";import"../../chunk-LU265KXN.js";import"../../chunk-UTLIN5S6.js";import"../../chunk-SNECOPBD.js";import{a as c}from"../../chunk-U6LRMWRI.js";import{a as d}from"../../chunk-5QOEBELF.js";import"../../chunk-SQPCNBJC.js";import"../../chunk-YIOLMWB5.js";import"../../chunk-S5VSWHJY.js";import"../../chunk-JEGVULKU.js";import"../../chunk-AOSXULKY.js";import"../../chunk-BYDQHL6O.js";import"../../chunk-HJ7WOTV7.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-TSPDJUGG.js";import"../../chunk-Z5WMKCRJ.js";import"../../chunk-D5AR26AI.js";import"../../chunk-TVZAFTPT.js";import"../../chunk-KQPDXXG3.js";import"../../chunk-P37U34EQ.js";export{a as ContractAmendmentConfirmationForm,e as ContractAmendmentFlow,b as ContractAmendmentForm,c as ContractAmendmentSubmit,d as useContractAmendment};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../chunk-
|
|
1
|
+
import{a,b}from"../../chunk-SQPCNBJC.js";import"../../chunk-JEGVULKU.js";import"../../chunk-P37U34EQ.js";export{a as STEPS,b as buildInitialValues};
|
|
2
2
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { C as ContractorOnboardingFlowProps } from '../../types-
|
|
2
|
+
import { C as ContractorOnboardingFlowProps } from '../../types-BUI5G3ML.js';
|
|
3
3
|
import './constants.js';
|
|
4
4
|
import '../../types.gen-Oz2Tvvr6.js';
|
|
5
5
|
import './components/OnboardingBack.js';
|
|
@@ -14,13 +14,14 @@ import '@tanstack/query-core';
|
|
|
14
14
|
import '../useStepState.js';
|
|
15
15
|
import '@remoteoss/remote-json-schema-form-kit';
|
|
16
16
|
import './utils.js';
|
|
17
|
-
import '../../types-
|
|
17
|
+
import '../../types-C0m9mu0v.js';
|
|
18
18
|
import '../Onboarding/components/OnboardingBack.js';
|
|
19
19
|
import '../Onboarding/components/OnboardingInvite.js';
|
|
20
20
|
import '../Onboarding/components/OnboardingSubmit.js';
|
|
21
21
|
import '../types.js';
|
|
22
22
|
import '../Onboarding/components/SaveDraftButton.js';
|
|
23
23
|
import './components/BasicInformationStep.js';
|
|
24
|
+
import './components/OnboardingInvite.js';
|
|
24
25
|
import './components/ContractReviewButton.js';
|
|
25
26
|
import './components/SaveDraftButton.js';
|
|
26
27
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-3MLYDDLK.js";import"../../chunk-RKGD6XC7.js";import"../../chunk-VAWEOFUO.js";import"../../chunk-D5K4NBOG.js";import"../../chunk-WD5DNUSS.js";import"../../chunk-ITTXYDGV.js";import"../../chunk-DPVXSN7T.js";import"../../chunk-DNVTXLTP.js";import"../../chunk-ZEJRVVLJ.js";import"../../chunk-VHLCM6IM.js";import"../../chunk-3C6N7DK6.js";import"../../chunk-D5ABWBC6.js";import"../../chunk-K5HZE7M6.js";import"../../chunk-P3QDMRCC.js";import"../../chunk-4WSJ2A6Q.js";import"../../chunk-Q3ALCPJN.js";import"../../chunk-GRE4RCPB.js";import"../../chunk-U4QOJDBZ.js";import"../../chunk-LXOYWRNU.js";import"../../chunk-7DRY6YCN.js";import"../../chunk-AP56UUME.js";import"../../chunk-IJCTN52C.js";import"../../chunk-WVJDCDGZ.js";import"../../chunk-O6H66UM2.js";import"../../chunk-ROQYHTFQ.js";import"../../chunk-3UDRMQNE.js";import"../../chunk-3DMWQJ5W.js";import"../../chunk-RAH453TV.js";import"../../chunk-VDRNNOVA.js";import"../../chunk-AHRG5QCS.js";import"../../chunk-PX5PE6GX.js";import"../../chunk-LNV36S6D.js";import"../../chunk-LU265KXN.js";import"../../chunk-UTLIN5S6.js";import"../../chunk-SNECOPBD.js";import"../../chunk-YIOLMWB5.js";import"../../chunk-S5VSWHJY.js";import"../../chunk-JEGVULKU.js";import"../../chunk-AOSXULKY.js";import"../../chunk-BYDQHL6O.js";import"../../chunk-HJ7WOTV7.js";import"../../chunk-YHCH57B7.js";import"../../chunk-7EONM7HL.js";import"../../chunk-WQ4H5V7U.js";import"../../chunk-TNN3W5TU.js";import"../../chunk-MP3VDCI7.js";import"../../chunk-EOMVTXER.js";import"../../chunk-VIGKOVHP.js";import"../../chunk-X6ZAR7ZL.js";import"../../chunk-TSPDJUGG.js";import"../../chunk-Z5WMKCRJ.js";import"../../chunk-KQPDXXG3.js";import"../../chunk-P37U34EQ.js";export{a as ContractorOnboardingFlow};
|
|
2
2
|
//# sourceMappingURL=ContractorOnboarding.js.map
|