@remoteoss/remote-flows 0.20.0 → 0.20.1

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.
@@ -0,0 +1,2 @@
1
+ import{a as y}from"./chunk-32GSS4UM.js";import{a as l}from"./chunk-R4LFNFC2.js";import{a as m}from"./chunk-A76UTPRW.js";import{c}from"./chunk-U23SN7CM.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:y.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(l,{...e,sourceCurrency:d,targetCurrency:F,mainFieldName:g,conversionFieldName:u,conversionProperties:f,classNamePrefix:"RemoteFlows-Salary",conversionType:_})},"SalaryField");export{R as a};
2
+ //# sourceMappingURL=chunk-M6ATR43P.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/flows/CostCalculator/components/SalaryField.tsx"],"sourcesContent":["import { CurrencyConversionField } from '@/src/components/form/fields/CurrencyConversionField';\nimport { ZendeskTriggerButton } from '@/src/components/shared/zendesk-drawer/ZendeskTriggerButton';\nimport { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\nimport { JSFField } from '@/src/types/remoteFlows';\nimport { useEffect } from 'react';\nimport { useFormContext } from 'react-hook-form';\n\ntype SalaryFieldProps = JSFField & {\n currencies: {\n from: string;\n to: string;\n };\n salary_conversion_properties?: {\n label?: string;\n description?: string;\n };\n conversionType?: 'spread' | 'no_spread';\n shouldSwapOrder: boolean;\n defaultValue?: string;\n};\n\nexport const SalaryField = ({\n currencies: { from, to },\n shouldSwapOrder,\n salary_conversion_properties,\n conversionType = 'no_spread',\n defaultValue,\n ...props\n}: SalaryFieldProps) => {\n const { setValue, getValues } = useFormContext();\n\n const conversionProperties = {\n label: salary_conversion_properties?.label || 'Salary conversion',\n description: salary_conversion_properties?.description || (\n <>\n The conversion is based on the Remote FX rate.{' '}\n <ZendeskTriggerButton\n className='text-sm'\n zendeskId={zendeskArticles.remoteFxRate}\n >\n Learn more ↗\n </ZendeskTriggerButton>\n </>\n ),\n };\n\n const mainFieldName = shouldSwapOrder ? 'salary_conversion' : props.name;\n const conversionFieldName = shouldSwapOrder\n ? props.name\n : 'salary_conversion';\n\n useEffect(() => {\n if (shouldSwapOrder) {\n const currentValue = getValues(props.name);\n\n if (currentValue) {\n setValue('salary_conversion', currentValue);\n setValue('salary_converted', 'salary_conversion');\n } else if (defaultValue) {\n // Fallback to defaultValue if no current value\n setValue('salary_conversion', defaultValue);\n setValue('salary_converted', 'salary_conversion');\n }\n } else {\n const conversionValue = getValues('salary_conversion');\n\n if (conversionValue) {\n setValue(props.name, conversionValue);\n setValue('salary_converted', props.name);\n } else if (defaultValue) {\n // Fallback to defaultValue if no conversion value\n setValue(props.name, defaultValue);\n setValue('salary_converted', props.name);\n }\n }\n }, [shouldSwapOrder, defaultValue, setValue, getValues, props.name]);\n return (\n <CurrencyConversionField\n {...props}\n sourceCurrency={from}\n targetCurrency={to}\n mainFieldName={mainFieldName}\n conversionFieldName={conversionFieldName}\n conversionProperties={conversionProperties}\n classNamePrefix='RemoteFlows-Salary'\n conversionType={conversionType}\n />\n );\n};\n"],"mappings":"mMAIA,OAAS,aAAAA,MAAiB,QA8BpB,mBAAAC,EAEE,OAAAC,EAFF,QAAAC,MAAA,oBAbC,IAAMC,EAAcC,EAAA,CAAC,CAC1B,WAAY,CAAE,KAAAC,EAAM,GAAAC,CAAG,EACvB,gBAAAC,EACA,6BAAAC,EACA,eAAAC,EAAiB,YACjB,aAAAC,EACA,GAAGC,CACL,IAAwB,CACtB,GAAM,CAAE,SAAAC,EAAU,UAAAC,CAAU,EAAIC,EAAe,EAEzCC,EAAuB,CAC3B,MAAOP,GAA8B,OAAS,oBAC9C,YAAaA,GAA8B,aACzCN,EAAAF,EAAA,CAAE,2DAC+C,IAC/CC,EAACe,EAAA,CACC,UAAU,UACV,UAAWC,EAAgB,aAC5B,6BAED,GACF,CAEJ,EAEMC,EAAgBX,EAAkB,oBAAsBI,EAAM,KAC9DQ,EAAsBZ,EACxBI,EAAM,KACN,oBAEJ,OAAAS,EAAU,IAAM,CACd,GAAIb,EAAiB,CACnB,IAAMc,EAAeR,EAAUF,EAAM,IAAI,EAErCU,GACFT,EAAS,oBAAqBS,CAAY,EAC1CT,EAAS,mBAAoB,mBAAmB,GACvCF,IAETE,EAAS,oBAAqBF,CAAY,EAC1CE,EAAS,mBAAoB,mBAAmB,EAEpD,KAAO,CACL,IAAMU,EAAkBT,EAAU,mBAAmB,EAEjDS,GACFV,EAASD,EAAM,KAAMW,CAAe,EACpCV,EAAS,mBAAoBD,EAAM,IAAI,GAC9BD,IAETE,EAASD,EAAM,KAAMD,CAAY,EACjCE,EAAS,mBAAoBD,EAAM,IAAI,EAE3C,CACF,EAAG,CAACJ,EAAiBG,EAAcE,EAAUC,EAAWF,EAAM,IAAI,CAAC,EAEjEV,EAACsB,EAAA,CACE,GAAGZ,EACJ,eAAgBN,EAChB,eAAgBC,EAChB,cAAeY,EACf,oBAAqBC,EACrB,qBAAsBJ,EACtB,gBAAgB,qBAChB,eAAgBN,EAClB,CAEJ,EAnE2B","names":["useEffect","Fragment","jsx","jsxs","SalaryField","__name","from","to","shouldSwapOrder","salary_conversion_properties","conversionType","defaultValue","props","setValue","getValues","useFormContext","conversionProperties","ZendeskTriggerButton","zendeskArticles","mainFieldName","conversionFieldName","useEffect","currentValue","conversionValue","CurrencyConversionField"]}
@@ -1,2 +1,2 @@
1
- import{c as d,d as S}from"./chunk-AVSWJUYN.js";import{a as u}from"./chunk-HN5HLFTB.js";import{a as f}from"./chunk-KSHK3ZPX.js";import{b as C}from"./chunk-CFIJKJXD.js";import{f as y}from"./chunk-U23SN7CM.js";import{a as o}from"./chunk-P37U34EQ.js";import{useEffect as T,useId as U,useState as I}from"react";import{jsx as k}from"react/jsx-runtime";var i=o((n,e,r)=>r&&r[e]?r[e]:n[e]?n[e]/100:0,"getDefaultManagementFee"),A=o((n,e,r,s)=>!e&&!r?.management_fee&&n?i(u,n,s):e&&!r?.management_fee?"":r?.management_fee,"getManagementFee"),W=o(({estimationOptions:n=d,defaultValues:e={countryRegionSlug:"",regionSlug:"",currencySlug:"",salary:"",benefits:{},management:{management_fee:""}},options:r,render:s,version:_="standard"})=>{let p=U(),[R,m]=I("USD"),F=o(g=>{m(g);let a=i(u,g,n.managementFees);a&&c.setValue("management.management_fee",a)},"onCurrencyChange"),t=S({defaultRegion:e.countryRegionSlug,defaultCurrency:e.currencySlug,defaultSalary:e.salary,estimationOptions:n,version:_,options:{...r,onCurrencyChange:F}}),K=C(t.handleValidation),b=A(R,e.currencySlug,e.management,n.managementFees),{countryRegionSlug:v,currencySlug:h,salary:D,benefits:P,hiringBudget:B,age:E,contractDurationType:M,regionSlug:w,...x}=e,c=y({resolver:K,defaultValues:{country:v,currency:h,region:w,salary:D,salary_conversion:"",salary_converted:"",hiring_budget:B||"employee_annual_salary",age:E,contract_duration_type:M,management:{management_fee:b},benefits:P,estimation_title:n.title,...x},shouldUnregister:!1,mode:"onBlur"});return T(()=>{if(e.currencySlug&&t.currencies&&n.includeManagementFee&&!e.management?.management_fee){let a=t.currencies.find(l=>l.value===e.currencySlug)?.label;if(a){m(a);let l=i(u,a,n.managementFees);c.setValue("management.management_fee",l)}}},[e.currencySlug,t.currencies,n.includeManagementFee,n.managementFees,e.management?.management_fee,c]),k(f.Provider,{value:{form:c,formId:p,costCalculatorBag:t},children:s(t)})},"CostCalculatorFlow");export{W as a};
2
- //# sourceMappingURL=chunk-6TSSHWBM.js.map
1
+ import{c as d,d as S}from"./chunk-YFEIQZGJ.js";import{a as u}from"./chunk-HN5HLFTB.js";import{a as f}from"./chunk-KSHK3ZPX.js";import{b as C}from"./chunk-CFIJKJXD.js";import{f as y}from"./chunk-U23SN7CM.js";import{a as o}from"./chunk-P37U34EQ.js";import{useEffect as T,useId as U,useState as I}from"react";import{jsx as k}from"react/jsx-runtime";var i=o((n,e,r)=>r&&r[e]?r[e]:n[e]?n[e]/100:0,"getDefaultManagementFee"),A=o((n,e,r,s)=>!e&&!r?.management_fee&&n?i(u,n,s):e&&!r?.management_fee?"":r?.management_fee,"getManagementFee"),W=o(({estimationOptions:n=d,defaultValues:e={countryRegionSlug:"",regionSlug:"",currencySlug:"",salary:"",benefits:{},management:{management_fee:""}},options:r,render:s,version:_="standard"})=>{let p=U(),[R,m]=I("USD"),F=o(g=>{m(g);let a=i(u,g,n.managementFees);a&&c.setValue("management.management_fee",a)},"onCurrencyChange"),t=S({defaultRegion:e.countryRegionSlug,defaultCurrency:e.currencySlug,defaultSalary:e.salary,estimationOptions:n,version:_,options:{...r,onCurrencyChange:F}}),K=C(t.handleValidation),b=A(R,e.currencySlug,e.management,n.managementFees),{countryRegionSlug:v,currencySlug:h,salary:D,benefits:P,hiringBudget:B,age:E,contractDurationType:M,regionSlug:w,...x}=e,c=y({resolver:K,defaultValues:{country:v,currency:h,region:w,salary:D,salary_conversion:"",salary_converted:"",hiring_budget:B||"employee_annual_salary",age:E,contract_duration_type:M,management:{management_fee:b},benefits:P,estimation_title:n.title,...x},shouldUnregister:!1,mode:"onBlur"});return T(()=>{if(e.currencySlug&&t.currencies&&n.includeManagementFee&&!e.management?.management_fee){let a=t.currencies.find(l=>l.value===e.currencySlug)?.label;if(a){m(a);let l=i(u,a,n.managementFees);c.setValue("management.management_fee",l)}}},[e.currencySlug,t.currencies,n.includeManagementFee,n.managementFees,e.management?.management_fee,c]),k(f.Provider,{value:{form:c,formId:p,costCalculatorBag:t},children:s(t)})},"CostCalculatorFlow");export{W as a};
2
+ //# sourceMappingURL=chunk-WL3IJ7WA.js.map
@@ -1,2 +1,2 @@
1
- import{a as X}from"./chunk-RJZ426NO.js";import{a as G}from"./chunk-VFRHMNLJ.js";import{a as I,b as z,c as Q,f as W}from"./chunk-BITHG5X4.js";import{a as C}from"./chunk-HN5HLFTB.js";import{a as K}from"./chunk-CFIJKJXD.js";import{c as Y}from"./chunk-5TUFZVWO.js";import{a as Z}from"./chunk-7XRPOR7L.js";import{c as V}from"./chunk-PAQW5BFW.js";import{a as o}from"./chunk-P37U34EQ.js";import{number as Te,object as oe}from"yup";import{createHeadlessForm as Ve,modify as je}from"@remoteoss/json-schema-form";import{useCallback as Re,useEffect as ee,useMemo as Pe,useRef as we,useState as j}from"react";import{string as te,ValidationError as ne}from"yup";import{jsx as re}from"react/jsx-runtime";var O={title:"Estimation",includeBenefits:!1,includeCostBreakdowns:!1,includePremiumBenefits:!1,enableCurrencyConversion:!1,includeEstimationTitle:!1,includeManagementFee:!1},xe=o(t=>{let{schema:i}=je(G.data.schema,t?.jsfModify||{});return Ve(i)},"useStaticSchema");function Be(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(Be,"getSalaryTitle");var Qe=o(({defaultRegion:t,defaultCurrency:i,defaultSalary:l,estimationOptions:s,options:n,version:a}={estimationOptions:O})=>{let c=we({fields:{}}),[k,E]=j(t),[R,P]=j(),[m,q]=j(),[H,se]=j(),{data:_,isLoading:le}=I({includePremiumBenefits:s.includePremiumBenefits}),{data:d,isLoading:ce}=z(),ue=k||R?.value,{data:w,isLoading:me}=W(ue,{includePremiumBenefits:s.includePremiumBenefits,options:n}),U=Q(),{mutateAsync:de}=Z(U),b=R?.currency,p=n?.jsfModify?.fields?.salary,F=p&&typeof p=="object"&&"presentation"in p?p.presentation:void 0,L=Re(()=>{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,fe=Pe(()=>{let{from:e,to:r,shouldSwapOrder:u}=L(),g=Be(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=>re(X,{...y,shouldSwapOrder:u,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=>re(Y,{...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=xe({jsfModify:{fields:{...n?.jsfModify?.fields,...fe?.fields}}});ee(()=>{if(t&&_){let e=_.find(({value:r})=>r===t);e&&P(e)}},[t,_]),ee(()=>{if(i&&d){let e=d.find(({value:r})=>r===i);e&&q(e.label)}},[i,d]);async function ge(e){return de(ae(e,s,a))}o(ge,"onSubmit");function ye(e){let r=_?.find(({value:u})=>u===e);r&&r.childRegions.length===0&&r.hasAdditionalFields?E(r.regionSlug):E(void 0),P(r)}o(ye,"onCountryChange");function pe(e){E(e)}o(pe,"onRegionChange");function Ce(e){se(e.target.value)}o(Ce,"onHiringBudgetChange");function _e(e){let r=d?.find(u=>u.value===e)?.label;q(r),n?.onCurrencyChange?.(r||"")}o(_e,"onChangeCurrency");let S=f.fields.find(e=>e.name==="region");if(S){let e=R?.childRegions.map(r=>({value:r.slug,label:r.name}))??[];S.options=e,S.isVisible=e.length>0,S.required=e.length>0,S.onChange=pe,S.schema=e.length>0?te().transform(r=>typeof r=="string"?r:"").required("Region is required"):te()}if(d){let e=f.fields.find(r=>r.name==="currency");e&&(e.options=d,e.onChange=_e)}let v=f.fields.find(e=>e.name==="hiring_budget");if(v&&(v.onChange=Ce),_){let e=f.fields.find(r=>r.name==="country");e&&(e.options=_,e.onChange=ye)}let be=o(()=>{P(void 0),E(t)},"resetForm"),D=[...f.fields.filter(e=>e.name!=="management"),...w?.fields||[],...f.fields.filter(e=>e.name==="management")],N=ie(f.fields,m||"USD",s.includeEstimationTitle);async function Se(e){let r=null;n?.onValidation?.(e);let u=V(e,D);try{await N.validate(u,{abortEarly:!1}),r={formErrors:{},yupError:new ne([],e)}}catch(h){let B=K(h);r={formErrors:Object.entries(B).reduce((T,[A,M])=>({...T,[A]:M.message}),{}),yupError:h}}let g=w?.handleValidation(u),y=[...r?.yupError.inner||[],...g?.yupError?.inner||[]],x={...r?.yupError?.value||{},...g?.yupError?.value||{}};return{formErrors:{...r?.formErrors||{},...g?.formErrors||{}},yupError:new ne(y,x)}}return o(Se,"handleValidation"),{stepState:{current:0,total:1,isLastStep:!0},fields:D,validationSchema:N,parseFormValues:o(e=>{let{country:r,region:u,currency:g,salary_converted:y,hiring_budget:x,salary_conversion:h,management:B,estimation_title:T,...A}=e,M=e.salary;y==="salary_conversion"&&(M=h);let he=V({country:r,region:u,salary:M,salary_converted:y,salary_conversion:h,hiring_budget:x,currency:g,management:B,estimation_title:T},f.fields),Ee=V(A,w?.fields||[]),Fe={currency_code:d?.find(Me=>Me.value===g)?.label};return{...he,...Ee,...Fe}},"parseFormValues"),handleValidation:Se,isSubmitting:U.isPending,isLoading:le&&ce&&me,onSubmit:ge,resetForm:be,currencies:d,meta:{fields:c.current?.fields}}},"useCostCalculator");function ie(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(c=>c===a.name,"is"),then:o(c=>c.required("Required field"),"then"),otherwise:o(c=>c.optional(),"otherwise")}):a.name==="management"?n[a.name]=oe({management_fee:Te().transform(c=>isNaN(c)?void 0:c).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 oe(s)}o(ie,"buildValidationSchema");function Ae(t){let i="benefit-";return Object.keys(t).reduce((l,s)=>{let n=t[s];if(n==="none")return l;let c={benefit_group_slug:s.replace(i,""),benefit_tier_slug:n};return[...l,c]},[])}o(Ae,"formatBenefits");function Oe(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:Ae(t.benefits)},...i.includeManagementFee&&s&&{discount:{quoted_amount:i.showManagementFee?s:C[n]||C.USD,text:""}}},...ke(t,l)}}o(Oe,"mapValueToEmployment");function ke(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(ke,"getSalaryFields");function ae(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=>Oe(n,i,l))}}o(ae,"buildPayload");export{ie as a,ae as b,O as c,Qe as d};
2
- //# sourceMappingURL=chunk-AVSWJUYN.js.map
1
+ import{a as X}from"./chunk-M6ATR43P.js";import{a as G}from"./chunk-VFRHMNLJ.js";import{a as I,b as z,c as Q,f as W}from"./chunk-BITHG5X4.js";import{a as C}from"./chunk-HN5HLFTB.js";import{a as K}from"./chunk-CFIJKJXD.js";import{c as Y}from"./chunk-5TUFZVWO.js";import{a as Z}from"./chunk-7XRPOR7L.js";import{c as V}from"./chunk-PAQW5BFW.js";import{a as o}from"./chunk-P37U34EQ.js";import{number as Te,object as oe}from"yup";import{createHeadlessForm as Ve,modify as je}from"@remoteoss/json-schema-form";import{useCallback as Re,useEffect as ee,useMemo as Pe,useRef as we,useState as j}from"react";import{string as te,ValidationError as ne}from"yup";import{jsx as re}from"react/jsx-runtime";var O={title:"Estimation",includeBenefits:!1,includeCostBreakdowns:!1,includePremiumBenefits:!1,enableCurrencyConversion:!1,includeEstimationTitle:!1,includeManagementFee:!1},xe=o(t=>{let{schema:i}=je(G.data.schema,t?.jsfModify||{});return Ve(i)},"useStaticSchema");function Be(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(Be,"getSalaryTitle");var Qe=o(({defaultRegion:t,defaultCurrency:i,defaultSalary:l,estimationOptions:s,options:n,version:a}={estimationOptions:O})=>{let c=we({fields:{}}),[k,E]=j(t),[R,P]=j(),[m,q]=j(),[H,se]=j(),{data:_,isLoading:le}=I({includePremiumBenefits:s.includePremiumBenefits}),{data:d,isLoading:ce}=z(),ue=k||R?.value,{data:w,isLoading:me}=W(ue,{includePremiumBenefits:s.includePremiumBenefits,options:n}),U=Q(),{mutateAsync:de}=Z(U),b=R?.currency,p=n?.jsfModify?.fields?.salary,F=p&&typeof p=="object"&&"presentation"in p?p.presentation:void 0,L=Re(()=>{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,fe=Pe(()=>{let{from:e,to:r,shouldSwapOrder:u}=L(),g=Be(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=>re(X,{...y,shouldSwapOrder:u,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=>re(Y,{...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=xe({jsfModify:{fields:{...n?.jsfModify?.fields,...fe?.fields}}});ee(()=>{if(t&&_){let e=_.find(({value:r})=>r===t);e&&P(e)}},[t,_]),ee(()=>{if(i&&d){let e=d.find(({value:r})=>r===i);e&&q(e.label)}},[i,d]);async function ge(e){return de(ae(e,s,a))}o(ge,"onSubmit");function ye(e){let r=_?.find(({value:u})=>u===e);r&&r.childRegions.length===0&&r.hasAdditionalFields?E(r.regionSlug):E(void 0),P(r)}o(ye,"onCountryChange");function pe(e){E(e)}o(pe,"onRegionChange");function Ce(e){se(e.target.value)}o(Ce,"onHiringBudgetChange");function _e(e){let r=d?.find(u=>u.value===e)?.label;q(r),n?.onCurrencyChange?.(r||"")}o(_e,"onChangeCurrency");let S=f.fields.find(e=>e.name==="region");if(S){let e=R?.childRegions.map(r=>({value:r.slug,label:r.name}))??[];S.options=e,S.isVisible=e.length>0,S.required=e.length>0,S.onChange=pe,S.schema=e.length>0?te().transform(r=>typeof r=="string"?r:"").required("Region is required"):te()}if(d){let e=f.fields.find(r=>r.name==="currency");e&&(e.options=d,e.onChange=_e)}let v=f.fields.find(e=>e.name==="hiring_budget");if(v&&(v.onChange=Ce),_){let e=f.fields.find(r=>r.name==="country");e&&(e.options=_,e.onChange=ye)}let be=o(()=>{P(void 0),E(t)},"resetForm"),D=[...f.fields.filter(e=>e.name!=="management"),...w?.fields||[],...f.fields.filter(e=>e.name==="management")],N=ie(f.fields,m||"USD",s.includeEstimationTitle);async function Se(e){let r=null;n?.onValidation?.(e);let u=V(e,D);try{await N.validate(u,{abortEarly:!1}),r={formErrors:{},yupError:new ne([],e)}}catch(h){let B=K(h);r={formErrors:Object.entries(B).reduce((T,[A,M])=>({...T,[A]:M.message}),{}),yupError:h}}let g=w?.handleValidation(u),y=[...r?.yupError.inner||[],...g?.yupError?.inner||[]],x={...r?.yupError?.value||{},...g?.yupError?.value||{}};return{formErrors:{...r?.formErrors||{},...g?.formErrors||{}},yupError:new ne(y,x)}}return o(Se,"handleValidation"),{stepState:{current:0,total:1,isLastStep:!0},fields:D,validationSchema:N,parseFormValues:o(e=>{let{country:r,region:u,currency:g,salary_converted:y,hiring_budget:x,salary_conversion:h,management:B,estimation_title:T,...A}=e,M=e.salary;y==="salary_conversion"&&(M=h);let he=V({country:r,region:u,salary:M,salary_converted:y,salary_conversion:h,hiring_budget:x,currency:g,management:B,estimation_title:T},f.fields),Ee=V(A,w?.fields||[]),Fe={currency_code:d?.find(Me=>Me.value===g)?.label};return{...he,...Ee,...Fe}},"parseFormValues"),handleValidation:Se,isSubmitting:U.isPending,isLoading:le&&ce&&me,onSubmit:ge,resetForm:be,currencies:d,meta:{fields:c.current?.fields}}},"useCostCalculator");function ie(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(c=>c===a.name,"is"),then:o(c=>c.required("Required field"),"then"),otherwise:o(c=>c.optional(),"otherwise")}):a.name==="management"?n[a.name]=oe({management_fee:Te().transform(c=>isNaN(c)?void 0:c).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 oe(s)}o(ie,"buildValidationSchema");function Ae(t){let i="benefit-";return Object.keys(t).reduce((l,s)=>{let n=t[s];if(n==="none")return l;let c={benefit_group_slug:s.replace(i,""),benefit_tier_slug:n};return[...l,c]},[])}o(Ae,"formatBenefits");function Oe(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:Ae(t.benefits)},...i.includeManagementFee&&s&&{discount:{quoted_amount:i.showManagementFee?s:C[n]||C.USD,text:""}}},...ke(t,l)}}o(Oe,"mapValueToEmployment");function ke(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(ke,"getSalaryFields");function ae(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=>Oe(n,i,l))}}o(ae,"buildPayload");export{ie as a,ae as b,O as c,Qe as d};
2
+ //# sourceMappingURL=chunk-YFEIQZGJ.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../chunk-6TSSHWBM.js";import"../../chunk-AVSWJUYN.js";import"../../chunk-RJZ426NO.js";import"../../chunk-32GSS4UM.js";import"../../chunk-VFRHMNLJ.js";import"../../chunk-R4LFNFC2.js";import"../../chunk-QGGKDM3N.js";import"../../chunk-WVJDCDGZ.js";import"../../chunk-BITHG5X4.js";import"../../chunk-HN5HLFTB.js";import"../../chunk-KSHK3ZPX.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-5TUFZVWO.js";import"../../chunk-ZJ3JHILJ.js";import"../../chunk-7XRPOR7L.js";import"../../chunk-A76UTPRW.js";import"../../chunk-2I5DIIJP.js";import"../../chunk-GGXKORRZ.js";import"../../chunk-R2VVXLL7.js";import"../../chunk-7IHBNPZK.js";import"../../chunk-ZX5OIIJX.js";import"../../chunk-FHHAGWU5.js";import"../../chunk-Z5WMKCRJ.js";import"../../chunk-2QGDCMCE.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-U23SN7CM.js";import"../../chunk-PAQW5BFW.js";import"../../chunk-XVW2URFK.js";import"../../chunk-54KJP7WD.js";import"../../chunk-P37U34EQ.js";export{a as CostCalculatorFlow};
1
+ import{a}from"../../chunk-WL3IJ7WA.js";import"../../chunk-YFEIQZGJ.js";import"../../chunk-M6ATR43P.js";import"../../chunk-32GSS4UM.js";import"../../chunk-VFRHMNLJ.js";import"../../chunk-R4LFNFC2.js";import"../../chunk-QGGKDM3N.js";import"../../chunk-WVJDCDGZ.js";import"../../chunk-BITHG5X4.js";import"../../chunk-HN5HLFTB.js";import"../../chunk-KSHK3ZPX.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-5TUFZVWO.js";import"../../chunk-ZJ3JHILJ.js";import"../../chunk-7XRPOR7L.js";import"../../chunk-A76UTPRW.js";import"../../chunk-2I5DIIJP.js";import"../../chunk-GGXKORRZ.js";import"../../chunk-R2VVXLL7.js";import"../../chunk-7IHBNPZK.js";import"../../chunk-ZX5OIIJX.js";import"../../chunk-FHHAGWU5.js";import"../../chunk-Z5WMKCRJ.js";import"../../chunk-2QGDCMCE.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-U23SN7CM.js";import"../../chunk-PAQW5BFW.js";import"../../chunk-XVW2URFK.js";import"../../chunk-54KJP7WD.js";import"../../chunk-P37U34EQ.js";export{a as CostCalculatorFlow};
2
2
  //# sourceMappingURL=CostCalculatorFlow.js.map
@@ -1,2 +1,2 @@
1
- import{a}from"../../../chunk-RJZ426NO.js";import"../../../chunk-32GSS4UM.js";import"../../../chunk-R4LFNFC2.js";import"../../../chunk-QGGKDM3N.js";import"../../../chunk-WVJDCDGZ.js";import"../../../chunk-ZJ3JHILJ.js";import"../../../chunk-A76UTPRW.js";import"../../../chunk-2I5DIIJP.js";import"../../../chunk-7IHBNPZK.js";import"../../../chunk-ZX5OIIJX.js";import"../../../chunk-FHHAGWU5.js";import"../../../chunk-Z5WMKCRJ.js";import"../../../chunk-3ZWDIEEM.js";import"../../../chunk-U23SN7CM.js";import"../../../chunk-PAQW5BFW.js";import"../../../chunk-XVW2URFK.js";import"../../../chunk-54KJP7WD.js";import"../../../chunk-P37U34EQ.js";export{a as SalaryField};
1
+ import{a}from"../../../chunk-M6ATR43P.js";import"../../../chunk-32GSS4UM.js";import"../../../chunk-R4LFNFC2.js";import"../../../chunk-QGGKDM3N.js";import"../../../chunk-WVJDCDGZ.js";import"../../../chunk-ZJ3JHILJ.js";import"../../../chunk-A76UTPRW.js";import"../../../chunk-2I5DIIJP.js";import"../../../chunk-7IHBNPZK.js";import"../../../chunk-ZX5OIIJX.js";import"../../../chunk-FHHAGWU5.js";import"../../../chunk-Z5WMKCRJ.js";import"../../../chunk-3ZWDIEEM.js";import"../../../chunk-U23SN7CM.js";import"../../../chunk-PAQW5BFW.js";import"../../../chunk-XVW2URFK.js";import"../../../chunk-54KJP7WD.js";import"../../../chunk-P37U34EQ.js";export{a as SalaryField};
2
2
  //# sourceMappingURL=SalaryField.js.map
@@ -1,2 +1,2 @@
1
- import{c as a,d as b}from"../../chunk-AVSWJUYN.js";import"../../chunk-RJZ426NO.js";import"../../chunk-32GSS4UM.js";import"../../chunk-VFRHMNLJ.js";import"../../chunk-R4LFNFC2.js";import"../../chunk-QGGKDM3N.js";import"../../chunk-WVJDCDGZ.js";import"../../chunk-BITHG5X4.js";import"../../chunk-HN5HLFTB.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-5TUFZVWO.js";import"../../chunk-ZJ3JHILJ.js";import"../../chunk-7XRPOR7L.js";import"../../chunk-A76UTPRW.js";import"../../chunk-2I5DIIJP.js";import"../../chunk-GGXKORRZ.js";import"../../chunk-R2VVXLL7.js";import"../../chunk-7IHBNPZK.js";import"../../chunk-ZX5OIIJX.js";import"../../chunk-FHHAGWU5.js";import"../../chunk-Z5WMKCRJ.js";import"../../chunk-2QGDCMCE.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-U23SN7CM.js";import"../../chunk-PAQW5BFW.js";import"../../chunk-XVW2URFK.js";import"../../chunk-54KJP7WD.js";import"../../chunk-P37U34EQ.js";export{a as defaultEstimationOptions,b as useCostCalculator};
1
+ import{c as a,d as b}from"../../chunk-YFEIQZGJ.js";import"../../chunk-M6ATR43P.js";import"../../chunk-32GSS4UM.js";import"../../chunk-VFRHMNLJ.js";import"../../chunk-R4LFNFC2.js";import"../../chunk-QGGKDM3N.js";import"../../chunk-WVJDCDGZ.js";import"../../chunk-BITHG5X4.js";import"../../chunk-HN5HLFTB.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-5TUFZVWO.js";import"../../chunk-ZJ3JHILJ.js";import"../../chunk-7XRPOR7L.js";import"../../chunk-A76UTPRW.js";import"../../chunk-2I5DIIJP.js";import"../../chunk-GGXKORRZ.js";import"../../chunk-R2VVXLL7.js";import"../../chunk-7IHBNPZK.js";import"../../chunk-ZX5OIIJX.js";import"../../chunk-FHHAGWU5.js";import"../../chunk-Z5WMKCRJ.js";import"../../chunk-2QGDCMCE.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-U23SN7CM.js";import"../../chunk-PAQW5BFW.js";import"../../chunk-XVW2URFK.js";import"../../chunk-54KJP7WD.js";import"../../chunk-P37U34EQ.js";export{a as defaultEstimationOptions,b as useCostCalculator};
2
2
  //# sourceMappingURL=hooks.js.map
@@ -1,2 +1,2 @@
1
- import"../../chunk-Z3BMF4BO.js";import{a as m}from"../../chunk-FCRW2EG3.js";import"../../chunk-MORMQBAF.js";import"../../chunk-3PCSFTM3.js";import{a as l}from"../../chunk-OIBVTGB4.js";import{a as k}from"../../chunk-NO2TRS5O.js";import"../../chunk-CWEPL5J3.js";import"../../chunk-5T25IMZ3.js";import"../../chunk-A42AGGNH.js";import"../../chunk-PLWXRCGQ.js";import"../../chunk-756MHC7A.js";import"../../chunk-QFZ3XVDT.js";import"../../chunk-ZE3YT3Q6.js";import{a as j}from"../../chunk-GNZJOPIS.js";import{a as i}from"../../chunk-DYB3RWP7.js";import{a as e}from"../../chunk-6TSSHWBM.js";import{b as a,d}from"../../chunk-AVSWJUYN.js";import"../../chunk-RJZ426NO.js";import"../../chunk-32GSS4UM.js";import"../../chunk-VFRHMNLJ.js";import"../../chunk-R4LFNFC2.js";import"../../chunk-QGGKDM3N.js";import"../../chunk-WVJDCDGZ.js";import{a as f}from"../../chunk-JB6XA3P6.js";import{a as h}from"../../chunk-OJNWWRD5.js";import{a as g}from"../../chunk-X4GAGLFN.js";import{d as b,e as c}from"../../chunk-BITHG5X4.js";import"../../chunk-HN5HLFTB.js";import"../../chunk-KSHK3ZPX.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-XGMQPLVG.js";import"../../chunk-5TUFZVWO.js";import"../../chunk-ZJ3JHILJ.js";import"../../chunk-7XRPOR7L.js";import"../../chunk-M4EVWRWB.js";import"../../chunk-ASKKS4Z3.js";import"../../chunk-HRA6BY3O.js";import"../../chunk-A76UTPRW.js";import"../../chunk-2I5DIIJP.js";import"../../chunk-GGXKORRZ.js";import"../../chunk-R2VVXLL7.js";import"../../chunk-7IHBNPZK.js";import"../../chunk-ZX5OIIJX.js";import"../../chunk-FHHAGWU5.js";import"../../chunk-Z5WMKCRJ.js";import"../../chunk-2QGDCMCE.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-U23SN7CM.js";import"../../chunk-PAQW5BFW.js";import"../../chunk-XVW2URFK.js";import"../../chunk-54KJP7WD.js";import"../../chunk-P37U34EQ.js";export{j as CostCalculatorDisclaimer,e as CostCalculatorFlow,f as CostCalculatorForm,h as CostCalculatorResetButton,m as CostCalculatorResults,g as CostCalculatorSubmitButton,k as EstimationResults,l as SummaryResults,a as buildCostCalculatorEstimationPayload,i as disclaimerData,d as useCostCalculator,c as useCostCalculatorEstimationCsv,b as useCostCalculatorEstimationPdf};
1
+ import"../../chunk-Z3BMF4BO.js";import{a as m}from"../../chunk-FCRW2EG3.js";import"../../chunk-MORMQBAF.js";import"../../chunk-3PCSFTM3.js";import{a as l}from"../../chunk-OIBVTGB4.js";import{a as k}from"../../chunk-NO2TRS5O.js";import"../../chunk-CWEPL5J3.js";import"../../chunk-5T25IMZ3.js";import"../../chunk-A42AGGNH.js";import"../../chunk-PLWXRCGQ.js";import"../../chunk-756MHC7A.js";import"../../chunk-QFZ3XVDT.js";import"../../chunk-ZE3YT3Q6.js";import{a as j}from"../../chunk-GNZJOPIS.js";import{a as i}from"../../chunk-DYB3RWP7.js";import{a as e}from"../../chunk-WL3IJ7WA.js";import{b as a,d}from"../../chunk-YFEIQZGJ.js";import"../../chunk-M6ATR43P.js";import"../../chunk-32GSS4UM.js";import"../../chunk-VFRHMNLJ.js";import"../../chunk-R4LFNFC2.js";import"../../chunk-QGGKDM3N.js";import"../../chunk-WVJDCDGZ.js";import{a as f}from"../../chunk-JB6XA3P6.js";import{a as h}from"../../chunk-OJNWWRD5.js";import{a as g}from"../../chunk-X4GAGLFN.js";import{d as b,e as c}from"../../chunk-BITHG5X4.js";import"../../chunk-HN5HLFTB.js";import"../../chunk-KSHK3ZPX.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-XGMQPLVG.js";import"../../chunk-5TUFZVWO.js";import"../../chunk-ZJ3JHILJ.js";import"../../chunk-7XRPOR7L.js";import"../../chunk-M4EVWRWB.js";import"../../chunk-ASKKS4Z3.js";import"../../chunk-HRA6BY3O.js";import"../../chunk-A76UTPRW.js";import"../../chunk-2I5DIIJP.js";import"../../chunk-GGXKORRZ.js";import"../../chunk-R2VVXLL7.js";import"../../chunk-7IHBNPZK.js";import"../../chunk-ZX5OIIJX.js";import"../../chunk-FHHAGWU5.js";import"../../chunk-Z5WMKCRJ.js";import"../../chunk-2QGDCMCE.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-U23SN7CM.js";import"../../chunk-PAQW5BFW.js";import"../../chunk-XVW2URFK.js";import"../../chunk-54KJP7WD.js";import"../../chunk-P37U34EQ.js";export{j as CostCalculatorDisclaimer,e as CostCalculatorFlow,f as CostCalculatorForm,h as CostCalculatorResetButton,m as CostCalculatorResults,g as CostCalculatorSubmitButton,k as EstimationResults,l as SummaryResults,a as buildCostCalculatorEstimationPayload,i as disclaimerData,d as useCostCalculator,c as useCostCalculatorEstimationCsv,b as useCostCalculatorEstimationPdf};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{a,b}from"../../chunk-AVSWJUYN.js";import"../../chunk-RJZ426NO.js";import"../../chunk-32GSS4UM.js";import"../../chunk-VFRHMNLJ.js";import"../../chunk-R4LFNFC2.js";import"../../chunk-QGGKDM3N.js";import"../../chunk-WVJDCDGZ.js";import"../../chunk-BITHG5X4.js";import"../../chunk-HN5HLFTB.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-5TUFZVWO.js";import"../../chunk-ZJ3JHILJ.js";import"../../chunk-7XRPOR7L.js";import"../../chunk-A76UTPRW.js";import"../../chunk-2I5DIIJP.js";import"../../chunk-GGXKORRZ.js";import"../../chunk-R2VVXLL7.js";import"../../chunk-7IHBNPZK.js";import"../../chunk-ZX5OIIJX.js";import"../../chunk-FHHAGWU5.js";import"../../chunk-Z5WMKCRJ.js";import"../../chunk-2QGDCMCE.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-U23SN7CM.js";import"../../chunk-PAQW5BFW.js";import"../../chunk-XVW2URFK.js";import"../../chunk-54KJP7WD.js";import"../../chunk-P37U34EQ.js";export{b as buildPayload,a as buildValidationSchema};
1
+ import{a,b}from"../../chunk-YFEIQZGJ.js";import"../../chunk-M6ATR43P.js";import"../../chunk-32GSS4UM.js";import"../../chunk-VFRHMNLJ.js";import"../../chunk-R4LFNFC2.js";import"../../chunk-QGGKDM3N.js";import"../../chunk-WVJDCDGZ.js";import"../../chunk-BITHG5X4.js";import"../../chunk-HN5HLFTB.js";import"../../chunk-CFIJKJXD.js";import"../../chunk-5TUFZVWO.js";import"../../chunk-ZJ3JHILJ.js";import"../../chunk-7XRPOR7L.js";import"../../chunk-A76UTPRW.js";import"../../chunk-2I5DIIJP.js";import"../../chunk-GGXKORRZ.js";import"../../chunk-R2VVXLL7.js";import"../../chunk-7IHBNPZK.js";import"../../chunk-ZX5OIIJX.js";import"../../chunk-FHHAGWU5.js";import"../../chunk-Z5WMKCRJ.js";import"../../chunk-2QGDCMCE.js";import"../../chunk-3ZWDIEEM.js";import"../../chunk-U23SN7CM.js";import"../../chunk-PAQW5BFW.js";import"../../chunk-XVW2URFK.js";import"../../chunk-54KJP7WD.js";import"../../chunk-P37U34EQ.js";export{b as buildPayload,a as buildValidationSchema};
2
2
  //# sourceMappingURL=utils.js.map
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import"./chunk-FZ7FWFJX.js";import{a as gr}from"./chunk-CKVQ4PIK.js";import{a as pr}from"./chunk-KN4F5TMS.js";import{a as dr}from"./chunk-BP2JYRI7.js";import"./chunk-SERAGBDA.js";import"./chunk-UBLE2J7V.js";import"./chunk-A7ZEA2WU.js";import"./chunk-6O6CNAMF.js";import"./chunk-OZCQ6AOF.js";import"./chunk-E5PSJ75C.js";import"./chunk-S4XU4SE7.js";import"./chunk-GULCZWSK.js";import"./chunk-CVDZ35YA.js";import"./chunk-GS5NA664.js";import"./chunk-76VMCRDE.js";import"./chunk-QIN5BLVI.js";import"./chunk-MRYRNB7Y.js";import"./chunk-Z3BMF4BO.js";import{a as O}from"./chunk-FCRW2EG3.js";import"./chunk-MORMQBAF.js";import"./chunk-3PCSFTM3.js";import{a as N}from"./chunk-OIBVTGB4.js";import{a as D}from"./chunk-NO2TRS5O.js";import"./chunk-CWEPL5J3.js";import"./chunk-5T25IMZ3.js";import"./chunk-A42AGGNH.js";import"./chunk-PLWXRCGQ.js";import"./chunk-756MHC7A.js";import"./chunk-QFZ3XVDT.js";import"./chunk-ZE3YT3Q6.js";import{a as vr}from"./chunk-Y7QVIBFX.js";import"./chunk-5KHLOGTR.js";import"./chunk-RNNZ5ZKE.js";import"./chunk-EGVWFZBR.js";import"./chunk-RUMP764Z.js";import"./chunk-5CGII7CZ.js";import"./chunk-LCIBPBLY.js";import"./chunk-MCAK5KPI.js";import"./chunk-Z7WBY27D.js";import"./chunk-ATC4YO7K.js";import"./chunk-V2PBVCRH.js";import"./chunk-PGWKJ6FK.js";import"./chunk-663AKXTN.js";import"./chunk-VAIBLWOY.js";import"./chunk-K4VWUMNO.js";import"./chunk-FB2QGVI2.js";import{a as j}from"./chunk-GNZJOPIS.js";import{a as A}from"./chunk-DYB3RWP7.js";import{a as B}from"./chunk-6TSSHWBM.js";import{b as F,d as _}from"./chunk-AVSWJUYN.js";import"./chunk-RJZ426NO.js";import{a as T}from"./chunk-32GSS4UM.js";import"./chunk-VFRHMNLJ.js";import"./chunk-R4LFNFC2.js";import"./chunk-QGGKDM3N.js";import"./chunk-WVJDCDGZ.js";import{a as E}from"./chunk-JB6XA3P6.js";import{a as I}from"./chunk-OJNWWRD5.js";import{a as S}from"./chunk-X4GAGLFN.js";import{d as R,e as P}from"./chunk-BITHG5X4.js";import"./chunk-HN5HLFTB.js";import"./chunk-KSHK3ZPX.js";import"./chunk-A7ZJQCNU.js";import{a as lr}from"./chunk-4C6O4QTI.js";import{a as or}from"./chunk-4KA5AP7X.js";import"./chunk-CFIJKJXD.js";import"./chunk-XGMQPLVG.js";import"./chunk-5TUFZVWO.js";import"./chunk-ZJ3JHILJ.js";import{a as ir}from"./chunk-JWZIWG4T.js";import{a as sr}from"./chunk-MGOT272R.js";import{a as nr,b as cr}from"./chunk-ZTVYWMBY.js";import"./chunk-7XRPOR7L.js";import"./chunk-3AEKPMIN.js";import"./chunk-JBUNDNKJ.js";import"./chunk-M4EVWRWB.js";import"./chunk-ASKKS4Z3.js";import"./chunk-HRA6BY3O.js";import"./chunk-A76UTPRW.js";import"./chunk-2I5DIIJP.js";import"./chunk-GGXKORRZ.js";import"./chunk-R2VVXLL7.js";import"./chunk-7IHBNPZK.js";import"./chunk-ZX5OIIJX.js";import"./chunk-MDQ6YJMV.js";import"./chunk-UH3E6HSQ.js";import"./chunk-W5DG5WWJ.js";import"./chunk-GC23RRCI.js";import"./chunk-XSHHMBMT.js";import"./chunk-XFD3ULUF.js";import"./chunk-N6G4VZXF.js";import{a as v}from"./chunk-FHHAGWU5.js";import"./chunk-PJBAQZ6G.js";import"./chunk-Z5WMKCRJ.js";import"./chunk-UQYM3PBZ.js";import"./chunk-2QGDCMCE.js";import{a as u,c as h}from"./chunk-3ZWDIEEM.js";import{a as er}from"./chunk-B3WXLC2R.js";import"./chunk-U23SN7CM.js";import{b as C}from"./chunk-PAQW5BFW.js";import"./chunk-XVW2URFK.js";import"./chunk-TVZAFTPT.js";import{c as z,d as m}from"./chunk-54KJP7WD.js";import{a as t}from"./chunk-P37U34EQ.js";import{QueryClient as G,QueryClientProvider as H}from"@tanstack/react-query";function d(r){let a=document.documentElement;Object.keys(r).forEach(e=>{let o=r[e];o&&a.style.setProperty(e,o)})}t(d,"setCssProperties");function K(r){let a={};return Object.keys(r).forEach(e=>{a[`--${e}`]=r[e]}),a}t(K,"mapThemeColors");function V(r){return{"--spacing":r}}t(V,"mapThemeSpacing");function M(r){return{"--radius":r}}t(M,"mapThemeBorderRadius");function U(r){return{"--fontSizeBase":r.fontSizeBase}}t(U,"mapThemeFont");function w(r){r?.colors&&d(K(r.colors)),r?.spacing&&d(V(r.spacing)),r?.borderRadius&&d(M(r.borderRadius)),r?.font&&d(U(r.font))}t(w,"applyTheme");import{createContext as W,useEffect as L,useMemo as q}from"react";import{jsx as X}from"react/jsx-runtime";var Q=W({theme:{}});function f(r){L(()=>{r.theme&&Object.keys(r.theme).length>0&&w(r.theme)},[r.theme]);let a=q(()=>({theme:r.theme}),[r.theme]);return X(Q.Provider,{value:a,children:r.children})}t(f,"ThemeProvider");var x={local:"http://localhost:4000/api/eor",partners:"https://gateway.partners.remote-sandbox.com",production:"https://gateway.remote.com",sandbox:"https://gateway.remote-sandbox.com",staging:"https://gateway.niceremote.com"};import{createClient as Y}from"@hey-api/client-fetch";import{useQuery as Z}from"@tanstack/react-query";import{useRef as b}from"react";function $(r){try{return new URL(r),!0}catch{return!1}}t($,"isValidUrl");var y=t(({auth:r,options:a,authId:e="default"})=>{let o=b(null),{refetch:c}=Z({queryKey:["auth",e],queryFn:r,enabled:!1}),s=a?.environment?x[a?.environment]:"https://gateway.remote.com",l=v.getConfig(),g="0.20.0";a?.environment&&a?.environment!=="production"&&m(g);let p=!!a?.proxy&&$(a.proxy.url);return a?.proxy&&!p&&console.error("Invalid proxy URL provided. Using default base URL."),b(Y({...l,headers:{...l.headers,...p?a?.proxy?.headers:{},"X-Client-Name":"remote-flows-sdk","X-Client-Version":g},baseUrl:p?a.proxy?.url:s,auth:t(async()=>{function k(i){return!i||Date.now()+6e4>i}if(t(k,"hasTokenExpired"),!o.current||k(o.current.expiresAt)){let{data:i}=await c();i&&(o.current={accessToken:i.accessToken,expiresAt:Date.now()+i.expiresIn*1e3})}return o.current?.accessToken},"auth")}))},"useAuth");import{jsx as n}from"react/jsx-runtime";var J=new G;function rr({children:r,auth:a,authId:e,proxy:o,environment:c}){let s=y({auth:a,authId:e,options:{proxy:o,environment:c}});return n(h.Provider,{value:{client:s.current},children:r})}t(rr,"RemoteFlowContextWrapper");function ar({children:r,components:a}){return n(u.Provider,{value:a?{components:a}:{components:{}},children:r})}t(ar,"FormFieldsProvider");function tr({auth:r,authId:a,children:e,components:o,theme:c,proxy:s,environment:l}){return n(H,{client:J,children:n(ar,{components:o,children:n(rr,{auth:r,authId:a,proxy:s,environment:l,children:n(f,{theme:c,children:e})})})})}t(tr,"RemoteFlows");export{er as ContractAmendmentConfirmationForm,lr as ContractAmendmentFlow,or as ContractAmendmentForm,ir as ContractAmendmentSubmit,j as CostCalculatorDisclaimer,B as CostCalculatorFlow,E as CostCalculatorForm,I as CostCalculatorResetButton,O as CostCalculatorResults,S as CostCalculatorSubmitButton,D as EstimationResults,vr as OnboardingFlow,tr as RemoteFlows,N as SummaryResults,gr as TerminationDialogInfoContent,dr as TerminationFlow,pr as TerminationReasonsDetailContent,F as buildCostCalculatorEstimationPayload,C as convertFromCents,A as disclaimerData,z as transformYupErrorsIntoObject,sr as useContractAmendment,_ as useCostCalculator,P as useCostCalculatorEstimationCsv,R as useCostCalculatorEstimationPdf,nr as useEmploymentQuery,cr as useTimeOffQuery,T as zendeskArticles};
1
+ import"./chunk-FZ7FWFJX.js";import{a as gr}from"./chunk-CKVQ4PIK.js";import{a as pr}from"./chunk-KN4F5TMS.js";import{a as dr}from"./chunk-BP2JYRI7.js";import"./chunk-SERAGBDA.js";import"./chunk-UBLE2J7V.js";import"./chunk-A7ZEA2WU.js";import"./chunk-6O6CNAMF.js";import"./chunk-OZCQ6AOF.js";import"./chunk-E5PSJ75C.js";import"./chunk-S4XU4SE7.js";import"./chunk-GULCZWSK.js";import"./chunk-CVDZ35YA.js";import"./chunk-GS5NA664.js";import"./chunk-76VMCRDE.js";import"./chunk-QIN5BLVI.js";import"./chunk-MRYRNB7Y.js";import"./chunk-Z3BMF4BO.js";import{a as O}from"./chunk-FCRW2EG3.js";import"./chunk-MORMQBAF.js";import"./chunk-3PCSFTM3.js";import{a as N}from"./chunk-OIBVTGB4.js";import{a as D}from"./chunk-NO2TRS5O.js";import"./chunk-CWEPL5J3.js";import"./chunk-5T25IMZ3.js";import"./chunk-A42AGGNH.js";import"./chunk-PLWXRCGQ.js";import"./chunk-756MHC7A.js";import"./chunk-QFZ3XVDT.js";import"./chunk-ZE3YT3Q6.js";import{a as vr}from"./chunk-Y7QVIBFX.js";import"./chunk-5KHLOGTR.js";import"./chunk-RNNZ5ZKE.js";import"./chunk-EGVWFZBR.js";import"./chunk-RUMP764Z.js";import"./chunk-5CGII7CZ.js";import"./chunk-LCIBPBLY.js";import"./chunk-MCAK5KPI.js";import"./chunk-Z7WBY27D.js";import"./chunk-ATC4YO7K.js";import"./chunk-V2PBVCRH.js";import"./chunk-PGWKJ6FK.js";import"./chunk-663AKXTN.js";import"./chunk-VAIBLWOY.js";import"./chunk-K4VWUMNO.js";import"./chunk-FB2QGVI2.js";import{a as j}from"./chunk-GNZJOPIS.js";import{a as A}from"./chunk-DYB3RWP7.js";import{a as B}from"./chunk-WL3IJ7WA.js";import{b as F,d as _}from"./chunk-YFEIQZGJ.js";import"./chunk-M6ATR43P.js";import{a as T}from"./chunk-32GSS4UM.js";import"./chunk-VFRHMNLJ.js";import"./chunk-R4LFNFC2.js";import"./chunk-QGGKDM3N.js";import"./chunk-WVJDCDGZ.js";import{a as E}from"./chunk-JB6XA3P6.js";import{a as I}from"./chunk-OJNWWRD5.js";import{a as S}from"./chunk-X4GAGLFN.js";import{d as R,e as P}from"./chunk-BITHG5X4.js";import"./chunk-HN5HLFTB.js";import"./chunk-KSHK3ZPX.js";import"./chunk-A7ZJQCNU.js";import{a as lr}from"./chunk-4C6O4QTI.js";import{a as or}from"./chunk-4KA5AP7X.js";import"./chunk-CFIJKJXD.js";import"./chunk-XGMQPLVG.js";import"./chunk-5TUFZVWO.js";import"./chunk-ZJ3JHILJ.js";import{a as ir}from"./chunk-JWZIWG4T.js";import{a as sr}from"./chunk-MGOT272R.js";import{a as nr,b as cr}from"./chunk-ZTVYWMBY.js";import"./chunk-7XRPOR7L.js";import"./chunk-3AEKPMIN.js";import"./chunk-JBUNDNKJ.js";import"./chunk-M4EVWRWB.js";import"./chunk-ASKKS4Z3.js";import"./chunk-HRA6BY3O.js";import"./chunk-A76UTPRW.js";import"./chunk-2I5DIIJP.js";import"./chunk-GGXKORRZ.js";import"./chunk-R2VVXLL7.js";import"./chunk-7IHBNPZK.js";import"./chunk-ZX5OIIJX.js";import"./chunk-MDQ6YJMV.js";import"./chunk-UH3E6HSQ.js";import"./chunk-W5DG5WWJ.js";import"./chunk-GC23RRCI.js";import"./chunk-XSHHMBMT.js";import"./chunk-XFD3ULUF.js";import"./chunk-N6G4VZXF.js";import{a as v}from"./chunk-FHHAGWU5.js";import"./chunk-PJBAQZ6G.js";import"./chunk-Z5WMKCRJ.js";import"./chunk-UQYM3PBZ.js";import"./chunk-2QGDCMCE.js";import{a as u,c as h}from"./chunk-3ZWDIEEM.js";import{a as er}from"./chunk-B3WXLC2R.js";import"./chunk-U23SN7CM.js";import{b as C}from"./chunk-PAQW5BFW.js";import"./chunk-XVW2URFK.js";import"./chunk-TVZAFTPT.js";import{c as z,d as m}from"./chunk-54KJP7WD.js";import{a as t}from"./chunk-P37U34EQ.js";import{QueryClient as G,QueryClientProvider as H}from"@tanstack/react-query";function d(r){let a=document.documentElement;Object.keys(r).forEach(e=>{let o=r[e];o&&a.style.setProperty(e,o)})}t(d,"setCssProperties");function K(r){let a={};return Object.keys(r).forEach(e=>{a[`--${e}`]=r[e]}),a}t(K,"mapThemeColors");function V(r){return{"--spacing":r}}t(V,"mapThemeSpacing");function M(r){return{"--radius":r}}t(M,"mapThemeBorderRadius");function U(r){return{"--fontSizeBase":r.fontSizeBase}}t(U,"mapThemeFont");function w(r){r?.colors&&d(K(r.colors)),r?.spacing&&d(V(r.spacing)),r?.borderRadius&&d(M(r.borderRadius)),r?.font&&d(U(r.font))}t(w,"applyTheme");import{createContext as W,useEffect as L,useMemo as q}from"react";import{jsx as X}from"react/jsx-runtime";var Q=W({theme:{}});function f(r){L(()=>{r.theme&&Object.keys(r.theme).length>0&&w(r.theme)},[r.theme]);let a=q(()=>({theme:r.theme}),[r.theme]);return X(Q.Provider,{value:a,children:r.children})}t(f,"ThemeProvider");var x={local:"http://localhost:4000/api/eor",partners:"https://gateway.partners.remote-sandbox.com",production:"https://gateway.remote.com",sandbox:"https://gateway.remote-sandbox.com",staging:"https://gateway.niceremote.com"};import{createClient as Y}from"@hey-api/client-fetch";import{useQuery as Z}from"@tanstack/react-query";import{useRef as b}from"react";function $(r){try{return new URL(r),!0}catch{return!1}}t($,"isValidUrl");var y=t(({auth:r,options:a,authId:e="default"})=>{let o=b(null),{refetch:c}=Z({queryKey:["auth",e],queryFn:r,enabled:!1}),s=a?.environment?x[a?.environment]:"https://gateway.remote.com",l=v.getConfig(),g="0.20.1";a?.environment&&a?.environment!=="production"&&m(g);let p=!!a?.proxy&&$(a.proxy.url);return a?.proxy&&!p&&console.error("Invalid proxy URL provided. Using default base URL."),b(Y({...l,headers:{...l.headers,...p?a?.proxy?.headers:{},"X-Client-Name":"remote-flows-sdk","X-Client-Version":g},baseUrl:p?a.proxy?.url:s,auth:t(async()=>{function k(i){return!i||Date.now()+6e4>i}if(t(k,"hasTokenExpired"),!o.current||k(o.current.expiresAt)){let{data:i}=await c();i&&(o.current={accessToken:i.accessToken,expiresAt:Date.now()+i.expiresIn*1e3})}return o.current?.accessToken},"auth")}))},"useAuth");import{jsx as n}from"react/jsx-runtime";var J=new G;function rr({children:r,auth:a,authId:e,proxy:o,environment:c}){let s=y({auth:a,authId:e,options:{proxy:o,environment:c}});return n(h.Provider,{value:{client:s.current},children:r})}t(rr,"RemoteFlowContextWrapper");function ar({children:r,components:a}){return n(u.Provider,{value:a?{components:a}:{components:{}},children:r})}t(ar,"FormFieldsProvider");function tr({auth:r,authId:a,children:e,components:o,theme:c,proxy:s,environment:l}){return n(H,{client:J,children:n(ar,{components:o,children:n(rr,{auth:r,authId:a,proxy:s,environment:l,children:n(f,{theme:c,children:e})})})})}t(tr,"RemoteFlows");export{er as ContractAmendmentConfirmationForm,lr as ContractAmendmentFlow,or as ContractAmendmentForm,ir as ContractAmendmentSubmit,j as CostCalculatorDisclaimer,B as CostCalculatorFlow,E as CostCalculatorForm,I as CostCalculatorResetButton,O as CostCalculatorResults,S as CostCalculatorSubmitButton,D as EstimationResults,vr as OnboardingFlow,tr as RemoteFlows,N as SummaryResults,gr as TerminationDialogInfoContent,dr as TerminationFlow,pr as TerminationReasonsDetailContent,F as buildCostCalculatorEstimationPayload,C as convertFromCents,A as disclaimerData,z as transformYupErrorsIntoObject,sr as useContractAmendment,_ as useCostCalculator,P as useCostCalculatorEstimationCsv,R as useCostCalculatorEstimationPdf,nr as useEmploymentQuery,cr as useTimeOffQuery,T as zendeskArticles};
2
2
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remoteoss/remote-flows",
3
- "version": "0.20.0",
3
+ "version": "0.20.1",
4
4
  "scripts": {
5
5
  "build": "NODE_ENV=production tsup",
6
6
  "ci": "npm run build && npm run check-format && npm run check-exports && npm run lint && npm run type-check && npm run test",
@@ -1,2 +0,0 @@
1
- import{a as l}from"./chunk-32GSS4UM.js";import{a}from"./chunk-R4LFNFC2.js";import{a as c}from"./chunk-A76UTPRW.js";import{c as t}from"./chunk-U23SN7CM.js";import{a as i}from"./chunk-P37U34EQ.js";import{useEffect as u}from"react";import{Fragment as _,jsx as m,jsxs as N}from"react/jsx-runtime";var k=i(({currencies:{from:d,to:y},shouldSwapOrder:e,salary_conversion_properties:s,conversionType:F="no_spread",defaultValue:r,...o})=>{let{setValue:n,getValues:p}=t(),v={label:s?.label||"Salary conversion",description:s?.description||N(_,{children:["The conversion is based on the Remote FX rate."," ",m(c,{className:"text-sm",zendeskId:l.remoteFxRate,children:"Learn more \u2197"})]})},g=e?"salary_conversion":o.name,f=e?o.name:"salary_conversion";return u(()=>{e&&r&&(n("salary_conversion",r),n("salary_converted","salary_conversion"))},[e,r,n,p]),m(a,{...o,sourceCurrency:d,targetCurrency:y,mainFieldName:g,conversionFieldName:f,conversionProperties:v,classNamePrefix:"RemoteFlows-Salary",conversionType:F})},"SalaryField");export{k as a};
2
- //# sourceMappingURL=chunk-RJZ426NO.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/flows/CostCalculator/components/SalaryField.tsx"],"sourcesContent":["import { CurrencyConversionField } from '@/src/components/form/fields/CurrencyConversionField';\nimport { ZendeskTriggerButton } from '@/src/components/shared/zendesk-drawer/ZendeskTriggerButton';\nimport { zendeskArticles } from '@/src/components/shared/zendesk-drawer/utils';\nimport { JSFField } from '@/src/types/remoteFlows';\nimport { useEffect } from 'react';\nimport { useFormContext } from 'react-hook-form';\n\ntype SalaryFieldProps = JSFField & {\n currencies: {\n from: string;\n to: string;\n };\n salary_conversion_properties?: {\n label?: string;\n description?: string;\n };\n conversionType?: 'spread' | 'no_spread';\n shouldSwapOrder: boolean;\n defaultValue?: string;\n};\n\nexport const SalaryField = ({\n currencies: { from, to },\n shouldSwapOrder,\n salary_conversion_properties,\n conversionType = 'no_spread',\n defaultValue,\n ...props\n}: SalaryFieldProps) => {\n const { setValue, getValues } = useFormContext();\n\n const conversionProperties = {\n label: salary_conversion_properties?.label || 'Salary conversion',\n description: salary_conversion_properties?.description || (\n <>\n The conversion is based on the Remote FX rate.{' '}\n <ZendeskTriggerButton\n className='text-sm'\n zendeskId={zendeskArticles.remoteFxRate}\n >\n Learn more ↗\n </ZendeskTriggerButton>\n </>\n ),\n };\n\n const mainFieldName = shouldSwapOrder ? 'salary_conversion' : props.name;\n const conversionFieldName = shouldSwapOrder\n ? props.name\n : 'salary_conversion';\n\n useEffect(() => {\n if (shouldSwapOrder && defaultValue) {\n setValue('salary_conversion', defaultValue);\n setValue('salary_converted', 'salary_conversion');\n }\n }, [shouldSwapOrder, defaultValue, setValue, getValues]);\n\n return (\n <CurrencyConversionField\n {...props}\n sourceCurrency={from}\n targetCurrency={to}\n mainFieldName={mainFieldName}\n conversionFieldName={conversionFieldName}\n conversionProperties={conversionProperties}\n classNamePrefix='RemoteFlows-Salary'\n conversionType={conversionType}\n />\n );\n};\n"],"mappings":"mMAIA,OAAS,aAAAA,MAAiB,QA8BpB,mBAAAC,EAEE,OAAAC,EAFF,QAAAC,MAAA,oBAbC,IAAMC,EAAcC,EAAA,CAAC,CAC1B,WAAY,CAAE,KAAAC,EAAM,GAAAC,CAAG,EACvB,gBAAAC,EACA,6BAAAC,EACA,eAAAC,EAAiB,YACjB,aAAAC,EACA,GAAGC,CACL,IAAwB,CACtB,GAAM,CAAE,SAAAC,EAAU,UAAAC,CAAU,EAAIC,EAAe,EAEzCC,EAAuB,CAC3B,MAAOP,GAA8B,OAAS,oBAC9C,YAAaA,GAA8B,aACzCN,EAAAF,EAAA,CAAE,2DAC+C,IAC/CC,EAACe,EAAA,CACC,UAAU,UACV,UAAWC,EAAgB,aAC5B,6BAED,GACF,CAEJ,EAEMC,EAAgBX,EAAkB,oBAAsBI,EAAM,KAC9DQ,EAAsBZ,EACxBI,EAAM,KACN,oBAEJ,OAAAS,EAAU,IAAM,CACVb,GAAmBG,IACrBE,EAAS,oBAAqBF,CAAY,EAC1CE,EAAS,mBAAoB,mBAAmB,EAEpD,EAAG,CAACL,EAAiBG,EAAcE,EAAUC,CAAS,CAAC,EAGrDZ,EAACoB,EAAA,CACE,GAAGV,EACJ,eAAgBN,EAChB,eAAgBC,EAChB,cAAeY,EACf,oBAAqBC,EACrB,qBAAsBJ,EACtB,gBAAgB,qBAChB,eAAgBN,EAClB,CAEJ,EAjD2B","names":["useEffect","Fragment","jsx","jsxs","SalaryField","__name","from","to","shouldSwapOrder","salary_conversion_properties","conversionType","defaultValue","props","setValue","getValues","useFormContext","conversionProperties","ZendeskTriggerButton","zendeskArticles","mainFieldName","conversionFieldName","useEffect","CurrencyConversionField"]}