@remoteoss/remote-flows 0.4.0-alpha.3 → 0.4.0-alpha.5
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-2SDJ4PZ5.js +2 -0
- package/dist/chunk-2SDJ4PZ5.js.map +1 -0
- package/dist/chunk-2Y22JKVE.js +2 -0
- package/dist/chunk-3EQND6W7.js +2 -0
- package/dist/chunk-3EQND6W7.js.map +1 -0
- package/dist/{chunk-QOMUXX6W.js → chunk-3PH5E6CZ.js} +2 -2
- package/dist/chunk-4B7QPI2R.js +2 -0
- package/dist/chunk-4B7QPI2R.js.map +1 -0
- package/dist/{chunk-76JJOA3E.js → chunk-66UY5UHP.js} +2 -2
- package/dist/chunk-6UHKKHB6.js +2 -0
- package/dist/chunk-6UHKKHB6.js.map +1 -0
- package/dist/{chunk-P2COURSU.js → chunk-7CP4PNU4.js} +2 -2
- package/dist/chunk-A36XQBXQ.js +2 -0
- package/dist/chunk-A36XQBXQ.js.map +1 -0
- package/dist/{chunk-TXLTMGOU.js → chunk-ASMIUBMG.js} +2 -2
- package/dist/{chunk-FNTHWOZU.js → chunk-CIGSCITX.js} +2 -2
- package/dist/chunk-CVGR3FDH.js +2 -0
- package/dist/chunk-CVGR3FDH.js.map +1 -0
- package/dist/{chunk-JT5XHQEY.js → chunk-EAB7VHAW.js} +2 -2
- package/dist/{chunk-MI3HDT5D.js → chunk-FQLSGKCJ.js} +2 -2
- package/dist/chunk-G7BISHWK.js +2 -0
- package/dist/chunk-G7BISHWK.js.map +1 -0
- package/dist/{chunk-KGUR7YMA.js → chunk-GHT53KSP.js} +2 -2
- package/dist/chunk-GMU3QGAR.js +2 -0
- package/dist/chunk-GMU3QGAR.js.map +1 -0
- package/dist/{chunk-XOUAD7MS.js → chunk-KDRQW7SO.js} +2 -2
- package/dist/{chunk-YIBRPAR3.js → chunk-LRVJ53MM.js} +2 -2
- package/dist/{chunk-C4E24DUG.js → chunk-NJPLL3RR.js} +2 -2
- package/dist/{chunk-4N3CYS6F.js → chunk-PBUHBIVK.js} +2 -2
- package/dist/{chunk-GQD6NNYO.js → chunk-PX72OIDO.js} +2 -2
- package/dist/{chunk-OXOB35EA.js → chunk-PZKA77DU.js} +2 -2
- package/dist/{chunk-S4FKLPBB.js → chunk-TICIER55.js} +2 -2
- package/dist/{chunk-TGB3TV3K.js → chunk-VT2PJJC7.js} +2 -2
- package/dist/{chunk-D3SD6MMV.js → chunk-WEIRXEXU.js} +2 -2
- package/dist/chunk-WVJDCDGZ.js +2 -0
- package/dist/chunk-WVJDCDGZ.js.map +1 -0
- package/dist/{chunk-WZ5AXHQT.js → chunk-X7BVA4MH.js} +2 -2
- package/dist/chunk-Y4RTK2VE.js +2 -0
- package/dist/chunk-Y4RTK2VE.js.map +1 -0
- package/dist/{chunk-T3PTQ4QM.js → chunk-Y4ZFQBM3.js} +2 -2
- package/dist/{chunk-QOXOAPGX.js → chunk-ZKZDAXNJ.js} +2 -2
- package/dist/flows/ContractAmendment/ContractAmendmentConfirmationForm.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentForm.d.ts +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
- package/dist/flows/ContractAmendment/context.d.ts +1 -1
- package/dist/flows/ContractAmendment/hooks.d.ts +1 -1
- package/dist/flows/ContractAmendment/hooks.js +1 -1
- package/dist/flows/ContractAmendment/index.d.ts +1 -1
- package/dist/flows/ContractAmendment/index.js +1 -1
- package/dist/flows/ContractAmendment/types.d.ts +1 -1
- package/dist/flows/ContractAmendment/utils.d.ts +1 -1
- package/dist/flows/CostCalculator/CostCalculatorFlow.d.ts +1 -1
- package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorForm.d.ts +1 -1
- package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorResults.d.ts +1 -1
- package/dist/flows/CostCalculator/Results/CostCalculatorResults.js +1 -1
- package/dist/flows/CostCalculator/context.d.ts +1 -1
- package/dist/flows/CostCalculator/hooks.d.ts +1 -1
- package/dist/flows/CostCalculator/hooks.js +1 -1
- package/dist/flows/CostCalculator/index.d.ts +1 -1
- package/dist/flows/CostCalculator/index.js +1 -1
- package/dist/flows/CostCalculator/types.d.ts +1 -1
- package/dist/flows/CostCalculator/utils.d.ts +1 -1
- package/dist/flows/CostCalculator/utils.js +1 -1
- package/dist/flows/Onboarding/BasicInformationStep.d.ts +1 -1
- package/dist/flows/Onboarding/BasicInformationStep.js +1 -1
- package/dist/flows/Onboarding/BenefitsStep.d.ts +3 -2
- package/dist/flows/Onboarding/BenefitsStep.js +1 -1
- package/dist/flows/Onboarding/ContractDetailsStep.d.ts +1 -1
- package/dist/flows/Onboarding/ContractDetailsStep.js +1 -1
- package/dist/flows/Onboarding/OnboardingFlow.d.ts +8 -4
- package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
- package/dist/flows/Onboarding/OnboardingForm.d.ts +3 -2
- package/dist/flows/Onboarding/OnboardingForm.js +1 -1
- package/dist/flows/Onboarding/OnboardingInvite.d.ts +1 -1
- package/dist/flows/Onboarding/OnboardingInvite.js +1 -1
- package/dist/flows/Onboarding/SelectCountryStep.d.ts +15 -0
- package/dist/flows/Onboarding/SelectCountryStep.js +2 -0
- package/dist/flows/Onboarding/SelectCountryStep.js.map +1 -0
- package/dist/flows/Onboarding/api.d.ts +114 -0
- package/dist/flows/Onboarding/api.js +2 -0
- package/dist/flows/Onboarding/api.js.map +1 -0
- package/dist/flows/Onboarding/context.d.ts +12 -5
- package/dist/flows/Onboarding/hooks.d.ts +25 -23
- package/dist/flows/Onboarding/hooks.js +1 -1
- package/dist/flows/Onboarding/index.d.ts +5 -4
- package/dist/flows/Onboarding/index.js +1 -1
- package/dist/flows/Onboarding/json-schemas/selectCountryStep.d.ts +24 -0
- package/dist/flows/Onboarding/json-schemas/selectCountryStep.js +2 -0
- package/dist/flows/Onboarding/json-schemas/selectCountryStep.js.map +1 -0
- package/dist/flows/Onboarding/types.d.ts +10 -3
- package/dist/flows/Onboarding/utils.d.ts +3 -2
- package/dist/flows/Onboarding/utils.js +1 -1
- package/dist/flows/Termination/AdditionalDetailsForm.d.ts +1 -1
- package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
- package/dist/flows/Termination/EmployeeComunicationForm.d.ts +1 -1
- package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
- package/dist/flows/Termination/PaidTimeOffForm.d.ts +1 -1
- package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
- package/dist/flows/Termination/TerminationDetailsForm.d.ts +1 -1
- package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
- package/dist/flows/Termination/TerminationFlow.d.ts +1 -1
- package/dist/flows/Termination/TerminationFlow.js +1 -1
- package/dist/flows/Termination/TerminationForm.d.ts +1 -1
- package/dist/flows/Termination/TerminationForm.js +1 -1
- package/dist/flows/Termination/TimeOff.d.ts +1 -1
- package/dist/flows/Termination/TimeOff.js +1 -1
- package/dist/flows/Termination/context.d.ts +1 -1
- package/dist/flows/Termination/hooks.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/Termination/json-schemas/schema.js +1 -1
- package/dist/flows/Termination/types.d.ts +1 -1
- package/dist/flows/types.d.ts +1 -1
- package/dist/flows/utils.d.ts +3 -11
- package/dist/flows/utils.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{remoteFlows-BqpqaWsU.d.ts → remoteFlows-DgAmG_TD.d.ts} +2 -3
- package/dist/types-CxSFjQw5.d.ts +3 -0
- package/dist/{types.gen-D5alruJJ.d.ts → types.gen-CAOUvsW-.d.ts} +268 -2
- package/package.json +1 -1
- package/dist/chunk-36UPHOJS.js +0 -2
- package/dist/chunk-36UPHOJS.js.map +0 -1
- package/dist/chunk-3KAYKVK5.js +0 -2
- package/dist/chunk-3KAYKVK5.js.map +0 -1
- package/dist/chunk-7B32RZXH.js +0 -2
- package/dist/chunk-7B32RZXH.js.map +0 -1
- package/dist/chunk-DHRIURRT.js +0 -2
- package/dist/chunk-DHRIURRT.js.map +0 -1
- package/dist/chunk-DQM4AWYT.js +0 -2
- package/dist/chunk-DQM4AWYT.js.map +0 -1
- package/dist/chunk-HSW5HMHH.js +0 -2
- package/dist/chunk-SYWI4UB6.js +0 -2
- package/dist/chunk-SYWI4UB6.js.map +0 -1
- package/dist/chunk-U3I3TJKB.js +0 -2
- package/dist/chunk-U3I3TJKB.js.map +0 -1
- /package/dist/{chunk-HSW5HMHH.js.map → chunk-2Y22JKVE.js.map} +0 -0
- /package/dist/{chunk-QOMUXX6W.js.map → chunk-3PH5E6CZ.js.map} +0 -0
- /package/dist/{chunk-76JJOA3E.js.map → chunk-66UY5UHP.js.map} +0 -0
- /package/dist/{chunk-P2COURSU.js.map → chunk-7CP4PNU4.js.map} +0 -0
- /package/dist/{chunk-TXLTMGOU.js.map → chunk-ASMIUBMG.js.map} +0 -0
- /package/dist/{chunk-FNTHWOZU.js.map → chunk-CIGSCITX.js.map} +0 -0
- /package/dist/{chunk-JT5XHQEY.js.map → chunk-EAB7VHAW.js.map} +0 -0
- /package/dist/{chunk-MI3HDT5D.js.map → chunk-FQLSGKCJ.js.map} +0 -0
- /package/dist/{chunk-KGUR7YMA.js.map → chunk-GHT53KSP.js.map} +0 -0
- /package/dist/{chunk-XOUAD7MS.js.map → chunk-KDRQW7SO.js.map} +0 -0
- /package/dist/{chunk-YIBRPAR3.js.map → chunk-LRVJ53MM.js.map} +0 -0
- /package/dist/{chunk-C4E24DUG.js.map → chunk-NJPLL3RR.js.map} +0 -0
- /package/dist/{chunk-4N3CYS6F.js.map → chunk-PBUHBIVK.js.map} +0 -0
- /package/dist/{chunk-GQD6NNYO.js.map → chunk-PX72OIDO.js.map} +0 -0
- /package/dist/{chunk-OXOB35EA.js.map → chunk-PZKA77DU.js.map} +0 -0
- /package/dist/{chunk-S4FKLPBB.js.map → chunk-TICIER55.js.map} +0 -0
- /package/dist/{chunk-TGB3TV3K.js.map → chunk-VT2PJJC7.js.map} +0 -0
- /package/dist/{chunk-D3SD6MMV.js.map → chunk-WEIRXEXU.js.map} +0 -0
- /package/dist/{chunk-WZ5AXHQT.js.map → chunk-X7BVA4MH.js.map} +0 -0
- /package/dist/{chunk-T3PTQ4QM.js.map → chunk-Y4ZFQBM3.js.map} +0 -0
- /package/dist/{chunk-QOXOAPGX.js.map → chunk-ZKZDAXNJ.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as x}from"./chunk-J55S4SEH.js";import{a as N}from"./chunk-6A3F6JG6.js";import{a as g,b as _,c as h,d as v,e as T}from"./chunk-GMGKIQLI.js";import{a as P}from"./chunk-WQHKB5T7.js";import{a as w}from"./chunk-KH6QS5OU.js";import{a as y}from"./chunk-GFBF55NR.js";import{a as l}from"./chunk-5ETXP2QF.js";import{a as n}from"./chunk-AYDF3IFZ.js";import{Euro as j}from"lucide-react";import t,{lazy as z,useState as E}from"react";import*as c from"react";import*as r from"@radix-ui/react-tabs";function k({className:a,...o}){return c.createElement(r.Root,{"data-slot":"tabs",className:l("flex flex-col gap-2",a),...o})}n(k,"Tabs");function B({className:a,...o}){return c.createElement(r.List,{"data-slot":"tabs-list",className:l("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-1",a),...o})}n(B,"TabsList");function d({className:a,...o}){return c.createElement(r.Trigger,{"data-slot":"tabs-trigger",className:l("data-[state=active]:bg-background data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex flex-1 items-center justify-center gap-1.5 rounded-md px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",a),...o})}n(d,"TabsTrigger");var H=z(()=>import("./flows/CostCalculator/Results/CostCalculatorResultsChart.js"));function X({employmentData:a,options:o}){let[e,S]=E("monthly"),i=a.employments?.[0];if(!i)return null;let s=i.employer_currency_costs,m=s.currency.symbol,b=e==="monthly"?s.monthly_gross_salary:s.annual_gross_salary,f=e==="monthly"?s.monthly_benefits_total:s.annual_benefits_total,C=e==="monthly"?s.monthly_contributions_total:s.annual_contributions_total,D=e==="monthly"?s.monthly_total:s.annual_total,u=e==="monthly"?s.monthly_benefits_breakdown:s.annual_benefits_breakdown,L=e==="monthly"?s.monthly_contributions_breakdown:s.annual_contributions_breakdown,p=[{name:"Gross Salary",value:b,color:o?.chartColors?.grossSalary??"#3b82f6"},{name:"Contributions",value:C,color:o?.chartColors?.contributions??"#f59e0b"}];return u&&p.push({name:"Benefits",value:f??0,color:o?.chartColors?.benefits??"#10b981"}),t.createElement(t.Fragment,null,t.createElement("div",{className:"flex flex-col md:flex-row gap-4 md:items-center justify-between mb-6 RemoteFlows__CostCalculatorResults"},t.createElement("div",{className:"RemoteFlows__CostCalculatorResults__Header"},t.createElement("h2",{className:"text-xl font-semibold flex items-center gap-2"},t.createElement("span",{className:"flex items-center gap-1"},t.createElement(j,{className:"h-5 w-5 text-gray-600"}),o?.title??"Cost Calculator"),t.createElement(y,{className:"ml-2"},i.country.name)),t.createElement("p",{className:"text-primary-foreground font-medium mt-1"},o?.description??`Total cost of employment in ${i.country.name}`)),t.createElement(k,{value:e,onValueChange:F=>S(F),className:"w-full md:w-auto RemoteFlows__CostCalculatorResults__Tabs"},t.createElement(B,{className:"grid w-full md:w-[200px] grid-cols-2"},t.createElement(d,{value:"monthly"},"Monthly"),t.createElement(d,{value:"annual"},"Annual")))),t.createElement("div",{className:l("grid grid-cols-1 gap-6",o?.showChart?"md:grid-cols-3":"","RemoteFlows__CostCalculatorResults_CostBreakdown")},t.createElement(g,{className:"md:col-span-2 rounded-lg"},t.createElement(_,{className:"pb-2"},t.createElement(h,null,"Cost Breakdown"),t.createElement(v,null,"Detailed breakdown of all employer costs")),t.createElement(T,null,t.createElement("div",{className:"space-y-6"},t.createElement(N,{grossSalary:b,currency:m}),u?t.createElement(w,{benefitsBreakdown:u,benefitsTotal:f,currency:m}):null,t.createElement(x,{contributionsBreakdown:L,contributionsTotal:C,currency:m}),t.createElement(P,{totalCost:D,currency:m})))),o?.showChart&&t.createElement(H,{chartData:p,currency:m})))}n(X,"CostCalculatorResults");export{X as a};
|
|
2
|
+
//# sourceMappingURL=chunk-TICIER55.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as v}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as v}from"./chunk-3PH5E6CZ.js";import{a as S}from"./chunk-JRQSZHUU.js";import{a as l,b as V}from"./chunk-NVMRRBRE.js";import{c as P,l as b,t as w}from"./chunk-GMU3QGAR.js";import{a as M}from"./chunk-2URGWNSM.js";import{d}from"./chunk-WRDKLT4N.js";import{a as j,c as A}from"./chunk-N25EBX6R.js";import{a as e}from"./chunk-AYDF3IFZ.js";import{createHeadlessForm as R,modify as B}from"@remoteoss/json-schema-form";import{useMutation as L,useQuery as J}from"@tanstack/react-query";var K=e(({countryCode:a,employment:t,fieldValues:i,options:n})=>{let{client:u}=d(),s=n?.jsonSchemaVersion?.contract_amendments?{json_schema_version:n.jsonSchemaVersion.contract_amendments}:{};return J({queryKey:["contract-amendment-schema"],retry:!1,queryFn:e(async()=>{let r=await P({client:u,headers:{Authorization:""},query:{employment_id:t?.data?.employment?.id,country_code:a,...s}});if(r.error||!r.data)throw new Error("Failed to fetch contract amendment schema");return r},"queryFn"),enabled:!!t,select:e(({data:r})=>{let c=r?.data||{};if(n&&n.jsfModify){let{schema:f}=B(c,n.jsfModify);c=f}let o={...i,annual_gross_salary:i?.annual_gross_salary?j(i?.annual_gross_salary):void 0},p=Object.keys(o).length>0;return R(c,{initialValues:p?o:V(t)})},"select")})},"useContractAmendmentSchemaQuery"),O=e(()=>{let{client:a}=d();return L({mutationFn:e(t=>b({client:a,headers:{Authorization:""},body:t}),"mutationFn")})},"useCreateContractAmendmentMutation"),U=e(()=>{let{client:a}=d();return L({mutationFn:e(t=>w({client:a,headers:{Authorization:""},body:t}),"mutationFn")})},"useAutomatableContractAmendmentMutation"),ae=e(({employmentId:a,countryCode:t,options:i})=>{let{fieldValues:n,setFieldValues:u,stepState:s,nextStep:r,previousStep:c}=M(l),{data:o,isLoading:p,isError:_,error:f}=v({employmentId:a}),{data:m,isLoading:T,isError:k,error:Q}=K({employment:o,countryCode:t,fieldValues:{...s.values?.[s.currentStep.name],...n},options:i}),q=V(o,m?.fields),g=O(),E=U();async function z(y){let C=A(y,m?.fields||[],{isPartialValidation:!1}),F={employment_id:o?.data.employment?.id,amendment_contract_id:o?.data.employment?.active_contract_id,contract_amendment:{...C}};switch(s.currentStep.name){case l.form.name:{let{mutateAsync:h}=S(E),I=await h(F);return r(),I}case l.confirmation_form.name:{let{mutateAsync:h}=S(g);return h(F)}default:throw new Error("Invalid step state")}}e(z,"onSubmit");function x(y){if(m){let C=A(y,m?.fields);return m?.handleValidation(C)}return null}e(x,"handleValidation");function H(){c()}return e(H,"back"),{stepState:s,fields:m?.fields||[],isLoading:p||T,isError:_||k,error:f||Q,isSubmitting:E.isPending||g.isPending,initialValues:q,values:n,handleValidation:x,checkFieldUpdates:u,onSubmit:z,back:H}},"useContractAmendment");export{ae as a};
|
|
2
|
+
//# sourceMappingURL=chunk-VT2PJJC7.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as n}from"./chunk-DZYFSFZ7.js";import{a as t,b as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as n}from"./chunk-DZYFSFZ7.js";import{a as t,b as m}from"./chunk-3PH5E6CZ.js";import{a as o}from"./chunk-AYDF3IFZ.js";var a=o(({render:p})=>{let{terminationBag:e}=n(),{data:s}=t({employmentId:e.employmentId}),{data:f}=m({employmentId:e.employmentId,status:"taken"});return p({employment:s,timeoff:f})},"TimeOff");export{a};
|
|
2
|
+
//# sourceMappingURL=chunk-WEIRXEXU.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e={data:{version:7,schema:{additionalProperties:!1,properties:{country:{title:"Country",description:"",type:"string",oneOf:[],"x-jsf-presentation":{inputType:"select"}}},required:["country"],type:"object","x-jsf-order":["country"]}}};export{e as a};
|
|
2
|
+
//# sourceMappingURL=chunk-WVJDCDGZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/flows/Onboarding/json-schemas/selectCountryStep.ts"],"sourcesContent":["export const selectCountryStepSchema = {\n data: {\n version: 7,\n schema: {\n additionalProperties: false,\n properties: {\n country: {\n title: 'Country',\n description: '',\n type: 'string',\n oneOf: [],\n 'x-jsf-presentation': {\n inputType: 'select',\n },\n },\n },\n required: ['country'],\n type: 'object',\n 'x-jsf-order': ['country'],\n },\n },\n};\n"],"mappings":"AAAO,IAAMA,EAA0B,CACrC,KAAM,CACJ,QAAS,EACT,OAAQ,CACN,qBAAsB,GACtB,WAAY,CACV,QAAS,CACP,MAAO,UACP,YAAa,GACb,KAAM,SACN,MAAO,CAAC,EACR,qBAAsB,CACpB,UAAW,QACb,CACF,CACF,EACA,SAAU,CAAC,SAAS,EACpB,KAAM,SACN,cAAe,CAAC,SAAS,CAC3B,CACF,CACF","names":["selectCountryStepSchema"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-FQLSGKCJ.js";import{b as a}from"./chunk-DZYFSFZ7.js";import{a as i}from"./chunk-AYDF3IFZ.js";import p from"react";function b({requesterName:n,onSubmit:m,onSuccess:s,onError:d}){let{terminationBag:e}=a(),l=i(async r=>{await m?.(e?.parseFormValues(r));let o=await e?.onSubmit(r);o?.error?d?.(o.error):o?.data&&await s?.(o.data)},"handleSubmit"),u=e?.fields.map(r=>r.name==="acknowledge_termination_procedure"?{...r,label:r.label.replace("{{requesterName}}",n)}:r);return p.createElement(t,{fields:u,onSubmit:l})}i(b,"AdditionalDetailsForm");export{b as a};
|
|
2
|
+
//# sourceMappingURL=chunk-X7BVA4MH.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as w,b as B,c as I}from"./chunk-CVGR3FDH.js";import{a as R,b as M,c as A,f as N,g as U,h as J,i as x,j as H,l as j}from"./chunk-A36XQBXQ.js";import{a as f}from"./chunk-JRQSZHUU.js";import{a as L}from"./chunk-2URGWNSM.js";import{c as u,d as p}from"./chunk-N25EBX6R.js";import{a}from"./chunk-AYDF3IFZ.js";import{useRef as _e,useState as v}from"react";import ge from"lodash/mergeWith";var be={employment_basic_information:"basic_information",contract_details:"contract_details"},Ee={select_country:null,basic_information:"employment_basic_information",contract_details:"contract_details",benefits:null,review:null},Le=a(({employmentId:_,companyId:W,countryCode:g,type:q,options:y})=>{let b=_e({}),[n,D]=v(_),[r,K]=v(g||null),{data:i,isLoading:Y}=R(_),{data:z,isLoading:G}=A(n),{data:E,isLoading:Q}=M(W),X=g?B:w,{fieldValues:l,stepState:e,setFieldValues:Z,previousStep:$,nextStep:ee,goToStep:te}=L(X),{selectCountryForm:S,isLoading:ne}=j(y),F=J(),h=x(),P=H(),{mutateAsync:oe}=f(F),{mutateAsync:T}=f(h),{mutateAsync:ae}=f(P),O=Ee[e.currentStep.name]||"employment_basic_information",re=be[O],se=i?.data?.data?.employment?.[re]||{},{data:s,isLoading:ie}=N({countryCode:r,form:O,fieldValues:Object.keys(l).length>0?{...e.values?.[e.currentStep.name],...l}:se,options:y,enabled:!!(e.currentStep.name!=="select_country"&&r)}),{data:d,isLoading:me}=U(n,l,y),ce={...e.values?.[e.currentStep.name],...l},le=e.currentStep.name==="benefits"?ge({},z,ce):{},m={select_country:S?.fields||[],basic_information:s?.fields||[],contract_details:s?.fields||[],benefits:d?.fields||[],review:[]},de={select_country:p(m[e.currentStep.name],{country:r||i?.data.data.employment?.country.code||""}),basic_information:p(m[e.currentStep.name],i?.data?.data.employment?.basic_information||{}),contract_details:p(m[e.currentStep.name],i?.data?.data.employment?.contract_details||{}),benefits:le||{}};function V(t){return S&&e.currentStep.name==="select_country"?t:s&&e.currentStep.name!=="select_country"?u(t,s?.fields,{isPartialValidation:!0}):{}}a(V,"parseFormValues");async function ue(t){b.current[e.currentStep.name]=I(t,m[e.currentStep.name]);let o=V(t);switch(e.currentStep.name){case"select_country":return K(o.country),Promise.resolve({data:{countryCode:o.country}});case"basic_information":{let C=!n&&r,Se=n&&r&&i?.data?.data?.employment?.country&&i?.data?.data?.employment?.country.code!==r;if(C||Se){let k={basic_information:o,type:q,country_code:r};try{console.log("Creating employment with payload:",k);let c=await oe(k);return D(c.data?.data?.employment?.id),c}catch(c){throw console.error("Error creating onboarding:",c),c}}else if(n)return T({employmentId:n,basic_information:o,pricing_plan_details:{frequency:"monthly"}});return}case"contract_details":return T({employmentId:n,...{contract_details:o}});case"benefits":return ae({employmentId:n,...t})}}a(ue,"onSubmit");function pe(){$()}a(pe,"back");function fe(){ee()}a(fe,"next");function ye(t){te(t)}return a(ye,"goTo"),{employmentId:n,creditRiskStatus:E?.default_legal_entity_credit_risk_status,owner_id:E?.company_owner_user_id,stepState:e,fields:m[e.currentStep.name],isLoading:ie||Y||me||G||Q||ne,isSubmitting:F.isPending||h.isPending||P.isPending,initialValues:de,handleValidation:a(t=>{if(e.currentStep.name==="select_country")return S.handleValidation(t);if(e.currentStep.name==="benefits"&&d){let o=u(t,d?.fields);return d?.handleValidation(o)}if(s){let o=u(t,s?.fields);return s?.handleValidation(o)}return null},"handleValidation"),checkFieldUpdates:Z,parseFormValues:V,onSubmit:ue,back:pe,next:fe,goTo:ye,meta:{fields:b.current}}},"useOnboarding");export{Le as a};
|
|
2
|
+
//# sourceMappingURL=chunk-Y4RTK2VE.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/flows/Onboarding/hooks.ts"],"sourcesContent":["import {\n Employment,\n EmploymentCreateParams,\n EmploymentFullParams,\n} from '@/src/client';\nimport { Fields } from '@remoteoss/json-schema-form';\n\nimport { useStepState, Step } from '@/src/flows/useStepState';\nimport {\n prettifyFormValues,\n STEPS,\n STEPS_WITHOUT_SELECT_COUNTRY,\n} from '@/src/flows/Onboarding/utils';\nimport {\n getInitialValues,\n parseJSFToValidate,\n} from '@/src/components/form/utils';\nimport { mutationToPromise } from '@/src/lib/mutations';\nimport { FieldValues } from 'react-hook-form';\nimport { OnboardingFlowParams } from '@/src/flows/Onboarding/types';\nimport { useRef, useState } from 'react';\nimport mergeWith from 'lodash/mergeWith';\nimport {\n useBenefitOffers,\n useBenefitOffersSchema,\n useCompany,\n useCountriesSchemaField,\n useCreateEmployment,\n useEmployment,\n useJSONSchemaForm,\n useUpdateBenefitsOffers,\n useUpdateEmployment,\n} from '@/src/flows/Onboarding/api';\nimport { JSONSchemaFormType } from '@/src/flows/types';\n\ntype OnboardingHookProps = OnboardingFlowParams;\n\nconst jsonSchemaToEmployment: Partial<\n Record<JSONSchemaFormType, keyof Employment>\n> = {\n employment_basic_information: 'basic_information',\n contract_details: 'contract_details',\n};\n\nconst stepToFormSchemaMap: Record<\n keyof typeof STEPS,\n JSONSchemaFormType | null\n> = {\n select_country: null,\n basic_information: 'employment_basic_information',\n contract_details: 'contract_details',\n benefits: null,\n review: null,\n};\n\nexport const useOnboarding = ({\n employmentId,\n companyId,\n countryCode,\n type,\n options,\n}: OnboardingHookProps) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const fieldsMetaRef = useRef<Record<string, any>>({});\n const [internalEmploymentId, setInternalEmploymentId] = useState<\n string | undefined\n >(employmentId);\n const [internalCountryCode, setInternalCountryCode] = useState<string | null>(\n countryCode || null,\n );\n const { data: employment, isLoading: isLoadingEmployment } =\n useEmployment(employmentId);\n\n const { data: benefitOffers, isLoading: isLoadingBenefitOffers } =\n useBenefitOffers(internalEmploymentId);\n const { data: company, isLoading: isLoadingCompany } = useCompany(companyId);\n const stepsToUse = countryCode ? STEPS_WITHOUT_SELECT_COUNTRY : STEPS;\n\n const {\n fieldValues,\n stepState,\n setFieldValues,\n previousStep,\n nextStep,\n goToStep,\n } = useStepState(\n stepsToUse as Record<keyof typeof STEPS, Step<keyof typeof STEPS>>,\n );\n\n const { selectCountryForm, isLoading: isLoadingCountries } =\n useCountriesSchemaField(options);\n\n const createEmploymentMutation = useCreateEmployment();\n const updateEmploymentMutation = useUpdateEmployment();\n const updateBenefitsOffersMutation = useUpdateBenefitsOffers();\n const { mutateAsync: createEmploymentMutationAsync } = mutationToPromise(\n createEmploymentMutation,\n );\n const { mutateAsync: updateEmploymentMutationAsync } = mutationToPromise(\n updateEmploymentMutation,\n );\n const { mutateAsync: updateBenefitsOffersMutationAsync } = mutationToPromise(\n updateBenefitsOffersMutation,\n );\n\n const formType =\n stepToFormSchemaMap[stepState.currentStep.name] ||\n 'employment_basic_information';\n const employmentKey = jsonSchemaToEmployment[formType] as keyof Employment;\n const serverEmploymentData = (employment?.data?.data?.employment?.[\n employmentKey\n ] || {}) as Record<string, unknown>;\n\n const { data: onboardingForm, isLoading: isLoadingBasicInformation } =\n useJSONSchemaForm({\n countryCode: internalCountryCode as string,\n form: formType,\n fieldValues:\n Object.keys(fieldValues).length > 0\n ? {\n ...stepState.values?.[stepState.currentStep.name], // Restore values for the current step\n ...fieldValues,\n }\n : serverEmploymentData,\n options: options,\n enabled: Boolean(\n stepState.currentStep.name !== 'select_country' && internalCountryCode,\n ),\n });\n\n const {\n data: benefitOffersSchema,\n isLoading: isLoadingBenefitsOffersSchema,\n } = useBenefitOffersSchema(\n internalEmploymentId as string,\n fieldValues,\n options,\n );\n\n const benefitsFormValues = {\n ...stepState.values?.[stepState.currentStep.name as keyof typeof STEPS], // Restore values for the current step\n ...fieldValues,\n };\n\n const initialValuesBenefitOffers =\n stepState.currentStep.name === 'benefits'\n ? mergeWith({}, benefitOffers, benefitsFormValues)\n : {};\n\n const stepFields: Record<keyof typeof STEPS, Fields> = {\n select_country: selectCountryForm?.fields || [],\n basic_information: onboardingForm?.fields || [],\n contract_details: onboardingForm?.fields || [],\n benefits: benefitOffersSchema?.fields || [],\n review: [],\n };\n\n const initialValues = {\n select_country: getInitialValues(stepFields[stepState.currentStep.name], {\n country:\n internalCountryCode ||\n employment?.data.data.employment?.country.code ||\n '',\n }),\n basic_information: getInitialValues(\n stepFields[stepState.currentStep.name],\n employment?.data?.data.employment?.basic_information || {},\n ),\n contract_details: getInitialValues(\n stepFields[stepState.currentStep.name],\n employment?.data?.data.employment?.contract_details || {},\n ),\n benefits: initialValuesBenefitOffers || {},\n };\n\n function parseFormValues(values: FieldValues) {\n if (selectCountryForm && stepState.currentStep.name === 'select_country') {\n return values;\n }\n if (onboardingForm && stepState.currentStep.name !== 'select_country') {\n return parseJSFToValidate(values, onboardingForm?.fields, {\n isPartialValidation: true,\n });\n }\n return {};\n }\n\n async function onSubmit(values: FieldValues) {\n // Prettify values for the current step\n fieldsMetaRef.current[stepState.currentStep.name] = prettifyFormValues(\n values,\n stepFields[stepState.currentStep.name],\n );\n\n const parsedValues = parseFormValues(values);\n switch (stepState.currentStep.name) {\n case 'select_country': {\n setInternalCountryCode(parsedValues.country);\n return Promise.resolve({ data: { countryCode: parsedValues.country } });\n }\n case 'basic_information': {\n const isEmploymentNotLoaded =\n !internalEmploymentId && internalCountryCode;\n const hasChangedCountry =\n internalEmploymentId &&\n internalCountryCode &&\n employment?.data?.data?.employment?.country &&\n employment?.data?.data?.employment?.country.code !==\n internalCountryCode;\n if (isEmploymentNotLoaded || hasChangedCountry) {\n const payload: EmploymentCreateParams = {\n basic_information: parsedValues,\n type: type,\n country_code: internalCountryCode,\n };\n try {\n console.log('Creating employment with payload:', payload);\n const response = await createEmploymentMutationAsync(payload);\n setInternalEmploymentId(\n // @ts-expect-error the types from the response are not matching\n response.data?.data?.employment?.id,\n );\n return response;\n } catch (error) {\n console.error('Error creating onboarding:', error);\n throw error;\n }\n } else if (internalEmploymentId) {\n return updateEmploymentMutationAsync({\n employmentId: internalEmploymentId,\n basic_information: parsedValues,\n pricing_plan_details: {\n frequency: 'monthly',\n },\n });\n }\n\n return;\n }\n case 'contract_details': {\n const payload: EmploymentFullParams = {\n contract_details: parsedValues,\n };\n return updateEmploymentMutationAsync({\n employmentId: internalEmploymentId as string,\n ...payload,\n });\n }\n\n case 'benefits': {\n return updateBenefitsOffersMutationAsync({\n employmentId: internalEmploymentId as string,\n ...values,\n });\n }\n }\n return;\n }\n\n function back() {\n previousStep();\n }\n\n function next() {\n nextStep();\n }\n\n function goTo(step: keyof typeof STEPS) {\n goToStep(step);\n }\n\n return {\n /**\n * Employment id passed useful to be used between components\n */\n employmentId: internalEmploymentId,\n\n /**\n * Credit risk status of the company, useful to know what to to show in the review step\n * The possible values are:\n * - not_started\n * - ready\n * - in_progress\n * - referred\n * - fail\n * - deposit_required\n * - no_deposit_required\n */\n\n creditRiskStatus: company?.default_legal_entity_credit_risk_status,\n\n owner_id: company?.company_owner_user_id,\n /**\n * Current step state containing the current step and total number of steps\n */\n stepState,\n /**\n * Array of form fields from the onboarding schema\n */\n fields: stepFields[stepState.currentStep.name],\n /**\n * Loading state indicating if the onboarding schema is being fetched\n */\n isLoading:\n isLoadingBasicInformation ||\n isLoadingEmployment ||\n isLoadingBenefitsOffersSchema ||\n isLoadingBenefitOffers ||\n isLoadingCompany ||\n isLoadingCountries,\n /**\n * Loading state indicating if the onboarding mutation is in progress\n */\n isSubmitting:\n createEmploymentMutation.isPending ||\n updateEmploymentMutation.isPending ||\n updateBenefitsOffersMutation.isPending,\n /**\n * Initial form values\n */\n initialValues,\n /**\n * Function to validate form values against the onboarding schema\n * @param values - Form values to validate\n * @returns Validation result or null if no schema is available\n */\n handleValidation: (values: FieldValues) => {\n if (stepState.currentStep.name === 'select_country') {\n return selectCountryForm.handleValidation(values);\n }\n if (stepState.currentStep.name === 'benefits' && benefitOffersSchema) {\n const parsedValues = parseJSFToValidate(\n values,\n benefitOffersSchema?.fields,\n );\n\n return benefitOffersSchema?.handleValidation(parsedValues);\n }\n if (onboardingForm) {\n const parsedValues = parseJSFToValidate(values, onboardingForm?.fields);\n return onboardingForm?.handleValidation(parsedValues);\n }\n return null;\n },\n /**\n * Function to update the current form field values\n * @param values - New form values to set\n */\n checkFieldUpdates: setFieldValues,\n\n /**\n * Function to parse form values before submission\n * @param values - Form values to parse\n * @returns Parsed form values\n */\n parseFormValues,\n\n /**\n * Function to handle form submission\n * @param values - Form values to submit\n * @returns Promise resolving to the mutation result\n */\n onSubmit,\n\n /**\n * Function to handle going back to the previous step\n * @returns {void}\n */\n back,\n\n /**\n * Function to handle going to the next step\n * @returns {void}\n */\n next,\n\n /**\n * Function to handle going to a specific step\n * @param step The step to go to.\n * @returns {void}\n */\n goTo,\n\n /**\n * Fields metadata for each step\n */\n meta: {\n fields: fieldsMetaRef.current,\n },\n };\n};\n"],"mappings":"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","names":["useRef","useState","mergeWith","jsonSchemaToEmployment","stepToFormSchemaMap","useOnboarding","__name","employmentId","companyId","countryCode","type","options","fieldsMetaRef","useRef","internalEmploymentId","setInternalEmploymentId","useState","internalCountryCode","setInternalCountryCode","employment","isLoadingEmployment","useEmployment","benefitOffers","isLoadingBenefitOffers","useBenefitOffers","company","isLoadingCompany","useCompany","stepsToUse","STEPS_WITHOUT_SELECT_COUNTRY","STEPS","fieldValues","stepState","setFieldValues","previousStep","nextStep","goToStep","useStepState","selectCountryForm","isLoadingCountries","useCountriesSchemaField","createEmploymentMutation","useCreateEmployment","updateEmploymentMutation","useUpdateEmployment","updateBenefitsOffersMutation","useUpdateBenefitsOffers","createEmploymentMutationAsync","mutationToPromise","updateEmploymentMutationAsync","updateBenefitsOffersMutationAsync","formType","employmentKey","serverEmploymentData","onboardingForm","isLoadingBasicInformation","useJSONSchemaForm","benefitOffersSchema","isLoadingBenefitsOffersSchema","useBenefitOffersSchema","benefitsFormValues","initialValuesBenefitOffers","mergeWith","stepFields","initialValues","getInitialValues","parseFormValues","values","parseJSFToValidate","onSubmit","prettifyFormValues","parsedValues","isEmploymentNotLoaded","hasChangedCountry","payload","response","error","back","next","goTo","step"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-FQLSGKCJ.js";import{b as i}from"./chunk-DZYFSFZ7.js";import{a as o}from"./chunk-AYDF3IFZ.js";import e from"react";function l({onSubmit:r}){let{terminationBag:m}=i();return e.createElement(n,{onSubmit:o(async t=>{await r?.(m?.parseFormValues(t)),m?.next()},"handleSubmit")})}o(l,"EmployeeCommunicationForm");export{l as a};
|
|
2
|
+
//# sourceMappingURL=chunk-Y4ZFQBM3.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m}from"./chunk-FQLSGKCJ.js";import{b as r}from"./chunk-DZYFSFZ7.js";import{a as o}from"./chunk-AYDF3IFZ.js";import a from"react";function p({onSubmit:n}){let{terminationBag:i}=r();return a.createElement(m,{onSubmit:o(async t=>{await n?.(i?.parseFormValues(t)),i?.next()},"handleSubmit")})}o(p,"TerminationDetailsForm");export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-ZKZDAXNJ.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as PostCreateContractAmendmentError, a as ContractAmendmentResponse } from '../../types.gen-
|
|
1
|
+
import { b as PostCreateContractAmendmentError, a as ContractAmendmentResponse } from '../../types.gen-CAOUvsW-.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { FieldValues } from 'react-hook-form';
|
|
4
4
|
|
|
@@ -5,7 +5,7 @@ import { ContractAmendmentForm } from './ContractAmendmentForm.js';
|
|
|
5
5
|
import { ContractAmendmentSubmit } from './ContractAmendmentSubmit.js';
|
|
6
6
|
import { useContractAmendment } from './hooks.js';
|
|
7
7
|
import { ContractAmendmentParams } from './types.js';
|
|
8
|
-
import '../../types.gen-
|
|
8
|
+
import '../../types.gen-CAOUvsW-.js';
|
|
9
9
|
import 'react-hook-form';
|
|
10
10
|
import '../../mutations-v9H353tz.js';
|
|
11
11
|
import '@remoteoss/json-schema-form';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-NJPLL3RR.js";import"../../chunk-XLFHHYVS.js";import"../../chunk-VT2PJJC7.js";import"../../chunk-3PH5E6CZ.js";import"../../chunk-JRQSZHUU.js";import"../../chunk-NVMRRBRE.js";import"../../chunk-GMU3QGAR.js";import"../../chunk-2URGWNSM.js";import"../../chunk-FMT2OTOL.js";import"../../chunk-BLPOQIGB.js";import"../../chunk-EAB7VHAW.js";import"../../chunk-3EQND6W7.js";import"../../chunk-GFBF55NR.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-56BNVYTD.js";import"../../chunk-IDSJI7KQ.js";import"../../chunk-N25EBX6R.js";import"../../chunk-6HGUGIYJ.js";import"../../chunk-5ETXP2QF.js";import"../../chunk-AYDF3IFZ.js";export{a as ContractAmendmentFlow};
|
|
2
2
|
//# sourceMappingURL=ContractAmendmentFlow.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PostAutomatableContractAmendmentError, C as ContractAmendmentAutomatableResponse } from '../../types.gen-
|
|
1
|
+
import { P as PostAutomatableContractAmendmentError, C as ContractAmendmentAutomatableResponse } from '../../types.gen-CAOUvsW-.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { FieldValues } from 'react-hook-form';
|
|
4
4
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-EAB7VHAW.js";import"../../chunk-3EQND6W7.js";import"../../chunk-GFBF55NR.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-56BNVYTD.js";import"../../chunk-IDSJI7KQ.js";import"../../chunk-N25EBX6R.js";import"../../chunk-6HGUGIYJ.js";import"../../chunk-5ETXP2QF.js";import"../../chunk-AYDF3IFZ.js";export{a as ContractAmendmentForm};
|
|
2
2
|
//# sourceMappingURL=ContractAmendmentForm.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { S as SuccessResponse, E as ErrorResponse } from '../../mutations-v9H353tz.js';
|
|
2
|
-
import { C as ContractAmendmentAutomatableResponse, P as PostAutomatableContractAmendmentError, a as ContractAmendmentResponse, b as PostCreateContractAmendmentError } from '../../types.gen-
|
|
2
|
+
import { C as ContractAmendmentAutomatableResponse, P as PostAutomatableContractAmendmentError, a as ContractAmendmentResponse, b as PostCreateContractAmendmentError } from '../../types.gen-CAOUvsW-.js';
|
|
3
3
|
import * as _remoteoss_json_schema_form from '@remoteoss/json-schema-form';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import * as react_hook_form from 'react-hook-form';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { S as SuccessResponse, E as ErrorResponse } from '../../mutations-v9H353tz.js';
|
|
2
|
-
import { C as ContractAmendmentAutomatableResponse, P as PostAutomatableContractAmendmentError, a as ContractAmendmentResponse, b as PostCreateContractAmendmentError } from '../../types.gen-
|
|
2
|
+
import { C as ContractAmendmentAutomatableResponse, P as PostAutomatableContractAmendmentError, a as ContractAmendmentResponse, b as PostCreateContractAmendmentError } from '../../types.gen-CAOUvsW-.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as _remoteoss_json_schema_form from '@remoteoss/json-schema-form';
|
|
5
5
|
import { Step } from '../useStepState.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-VT2PJJC7.js";import"../../chunk-3PH5E6CZ.js";import"../../chunk-JRQSZHUU.js";import"../../chunk-NVMRRBRE.js";import"../../chunk-GMU3QGAR.js";import"../../chunk-2URGWNSM.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-N25EBX6R.js";import"../../chunk-AYDF3IFZ.js";export{a as useContractAmendment};
|
|
2
2
|
//# sourceMappingURL=hooks.js.map
|
|
@@ -3,7 +3,7 @@ export { ContractAmendmentFlow, ContractAmendmentRenderProps } from './ContractA
|
|
|
3
3
|
export { ContractAmendmentForm } from './ContractAmendmentForm.js';
|
|
4
4
|
export { ContractAmendmentSubmit } from './ContractAmendmentSubmit.js';
|
|
5
5
|
export { useContractAmendment } from './hooks.js';
|
|
6
|
-
import '../../types.gen-
|
|
6
|
+
import '../../types.gen-CAOUvsW-.js';
|
|
7
7
|
import 'react';
|
|
8
8
|
import 'react-hook-form';
|
|
9
9
|
import './ContractAmendmentBack.js';
|
|
@@ -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-NJPLL3RR.js";import{a as c}from"../../chunk-XLFHHYVS.js";import{a as d}from"../../chunk-VT2PJJC7.js";import"../../chunk-3PH5E6CZ.js";import"../../chunk-JRQSZHUU.js";import"../../chunk-NVMRRBRE.js";import"../../chunk-GMU3QGAR.js";import"../../chunk-2URGWNSM.js";import"../../chunk-FMT2OTOL.js";import{a}from"../../chunk-BLPOQIGB.js";import{a as b}from"../../chunk-EAB7VHAW.js";import"../../chunk-3EQND6W7.js";import"../../chunk-GFBF55NR.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-56BNVYTD.js";import"../../chunk-IDSJI7KQ.js";import"../../chunk-N25EBX6R.js";import"../../chunk-6HGUGIYJ.js";import"../../chunk-5ETXP2QF.js";import"../../chunk-AYDF3IFZ.js";export{a as ContractAmendmentConfirmationForm,e as ContractAmendmentFlow,b as ContractAmendmentForm,c as ContractAmendmentSubmit,d as useContractAmendment};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -3,7 +3,7 @@ import { CostCalculatorEstimationOptions, JSFModify } from './types.js';
|
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
import 'yup';
|
|
5
5
|
import '@tanstack/react-query';
|
|
6
|
-
import '../../types.gen-
|
|
6
|
+
import '../../types.gen-CAOUvsW-.js';
|
|
7
7
|
import '../types.js';
|
|
8
8
|
import '@remoteoss/json-schema-form';
|
|
9
9
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-PX72OIDO.js";import"../../chunk-OLJ2S6A6.js";import"../../chunk-7CP4PNU4.js";import"../../chunk-UPRUP24B.js";import"../../chunk-GMU3QGAR.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-N25EBX6R.js";import"../../chunk-AYDF3IFZ.js";export{a as CostCalculatorFlow};
|
|
2
2
|
//# sourceMappingURL=CostCalculatorFlow.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as CostCalculatorEstimateResponse } from '../../types.gen-
|
|
1
|
+
import { c as CostCalculatorEstimateResponse } from '../../types.gen-CAOUvsW-.js';
|
|
2
2
|
import { EstimationError } from './hooks.js';
|
|
3
3
|
import { CostCalculatorEstimationFormValues } from './types.js';
|
|
4
4
|
import React__default from 'react';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-KDRQW7SO.js";import"../../chunk-OLJ2S6A6.js";import"../../chunk-3EQND6W7.js";import"../../chunk-GFBF55NR.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-56BNVYTD.js";import"../../chunk-IDSJI7KQ.js";import"../../chunk-5ETXP2QF.js";import"../../chunk-AYDF3IFZ.js";export{a as CostCalculatorForm};
|
|
2
2
|
//# sourceMappingURL=CostCalculatorForm.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { c as CostCalculatorEstimateResponse } from '../../../types.gen-
|
|
2
|
+
import { c as CostCalculatorEstimateResponse } from '../../../types.gen-CAOUvsW-.js';
|
|
3
3
|
|
|
4
4
|
interface CostCalculatorResultProps {
|
|
5
5
|
employmentData: CostCalculatorEstimateResponse['data'];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../../chunk-
|
|
1
|
+
import{a}from"../../../chunk-TICIER55.js";import"../../../chunk-J55S4SEH.js";import"../../../chunk-6A3F6JG6.js";import"../../../chunk-GMGKIQLI.js";import"../../../chunk-WQHKB5T7.js";import"../../../chunk-KH6QS5OU.js";import"../../../chunk-3FVI5JIC.js";import"../../../chunk-MESREYTZ.js";import"../../../chunk-GFBF55NR.js";import"../../../chunk-56BNVYTD.js";import"../../../chunk-5ETXP2QF.js";import"../../../chunk-AYDF3IFZ.js";export{a as CostCalculatorResults};
|
|
2
2
|
//# sourceMappingURL=CostCalculatorResults.js.map
|
|
@@ -2,7 +2,7 @@ import { Result } from '../types.js';
|
|
|
2
2
|
import { useCostCalculator, EstimationError } from './hooks.js';
|
|
3
3
|
import { CostCalculatorEstimationFormValues } from './types.js';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import { c as CostCalculatorEstimateResponse } from '../../types.gen-
|
|
5
|
+
import { c as CostCalculatorEstimateResponse } from '../../types.gen-CAOUvsW-.js';
|
|
6
6
|
import { $TSFixMe } from '@remoteoss/json-schema-form';
|
|
7
7
|
import * as yup from 'yup';
|
|
8
8
|
import { UseFormReturn } from 'react-hook-form';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
2
|
import { ValidationError } from 'yup';
|
|
3
3
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
4
|
-
import { c as CostCalculatorEstimateResponse, d as PostCreateEstimationError, e as CostCalculatorEstimatePdfResponse, f as PostCreateEstimationPdfError, g as CostCalculatorEstimateParams } from '../../types.gen-
|
|
4
|
+
import { c as CostCalculatorEstimateResponse, d as PostCreateEstimationError, e as CostCalculatorEstimatePdfResponse, f as PostCreateEstimationPdfError, g as CostCalculatorEstimateParams } from '../../types.gen-CAOUvsW-.js';
|
|
5
5
|
import { CostCalculatorEstimationOptions, JSFModify, CostCalculatorEstimationFormValues } from './types.js';
|
|
6
6
|
import { Result } from '../types.js';
|
|
7
7
|
import '@remoteoss/json-schema-form';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{c as a,d as b,e as c}from"../../chunk-
|
|
1
|
+
import{c as a,d as b,e as c}from"../../chunk-7CP4PNU4.js";import"../../chunk-UPRUP24B.js";import"../../chunk-GMU3QGAR.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-N25EBX6R.js";import"../../chunk-AYDF3IFZ.js";export{b as defaultEstimationOptions,c as useCostCalculator,a as useCostCalculatorEstimationPdf};
|
|
2
2
|
//# sourceMappingURL=hooks.js.map
|
|
@@ -8,7 +8,7 @@ export { disclaimerData } from './disclaimerUtils.js';
|
|
|
8
8
|
export { CostCalculatorResults } from './Results/CostCalculatorResults.js';
|
|
9
9
|
export { buildPayload as buildCostCalculatorEstimationPayload } from './utils.js';
|
|
10
10
|
import './types.js';
|
|
11
|
-
import '../../types.gen-
|
|
11
|
+
import '../../types.gen-CAOUvsW-.js';
|
|
12
12
|
import '@remoteoss/json-schema-form';
|
|
13
13
|
import 'react';
|
|
14
14
|
import 'yup';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../chunk-FGBEOUQK.js";import{a as j}from"../../chunk-
|
|
1
|
+
import"../../chunk-FGBEOUQK.js";import{a as j}from"../../chunk-TICIER55.js";import"../../chunk-J55S4SEH.js";import"../../chunk-6A3F6JG6.js";import"../../chunk-GMGKIQLI.js";import"../../chunk-WQHKB5T7.js";import"../../chunk-KH6QS5OU.js";import"../../chunk-3FVI5JIC.js";import"../../chunk-MESREYTZ.js";import{a as e}from"../../chunk-KDRQW7SO.js";import{a as g}from"../../chunk-7CYG2RHP.js";import{a as f}from"../../chunk-EAAIAMTY.js";import{a as i}from"../../chunk-DGPRFQYK.js";import{a as h}from"../../chunk-DYB3RWP7.js";import{a as d}from"../../chunk-PX72OIDO.js";import"../../chunk-OLJ2S6A6.js";import{b as a,c as b,e as c}from"../../chunk-7CP4PNU4.js";import"../../chunk-UPRUP24B.js";import"../../chunk-GMU3QGAR.js";import"../../chunk-3EQND6W7.js";import"../../chunk-GFBF55NR.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-56BNVYTD.js";import"../../chunk-IDSJI7KQ.js";import"../../chunk-N25EBX6R.js";import"../../chunk-5ETXP2QF.js";import"../../chunk-AYDF3IFZ.js";export{i as CostCalculatorDisclaimer,d as CostCalculatorFlow,e as CostCalculatorForm,g as CostCalculatorResetButton,j as CostCalculatorResults,f as CostCalculatorSubmitButton,a as buildCostCalculatorEstimationPayload,h as disclaimerData,c as useCostCalculator,b as useCostCalculatorEstimationPdf};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as CostCalculatorEstimateParams } from '../../types.gen-
|
|
1
|
+
import { g as CostCalculatorEstimateParams } from '../../types.gen-CAOUvsW-.js';
|
|
2
2
|
import { $TSFixMe } from '@remoteoss/json-schema-form';
|
|
3
3
|
import { AnyObjectSchema } from 'yup';
|
|
4
4
|
import { CostCalculatorEstimationFormValues, CostCalculatorEstimationOptions } from './types.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b}from"../../chunk-
|
|
1
|
+
import{a,b}from"../../chunk-7CP4PNU4.js";import"../../chunk-UPRUP24B.js";import"../../chunk-GMU3QGAR.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-N25EBX6R.js";import"../../chunk-AYDF3IFZ.js";export{b as buildPayload,a as buildValidationSchema};
|
|
2
2
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { BasicInformationFormPayload } from './types.js';
|
|
3
|
-
import { k as EmploymentCreationResponse } from '../../types.gen-
|
|
3
|
+
import { k as EmploymentCreationResponse } from '../../types.gen-CAOUvsW-.js';
|
|
4
4
|
import '../types.js';
|
|
5
5
|
import '../CostCalculator/types.js';
|
|
6
6
|
import '@remoteoss/json-schema-form';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-LRVJ53MM.js";import"../../chunk-66UY5UHP.js";import"../../chunk-WS3C3WIJ.js";import"../../chunk-3EQND6W7.js";import"../../chunk-GFBF55NR.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-56BNVYTD.js";import"../../chunk-IDSJI7KQ.js";import"../../chunk-5ETXP2QF.js";import"../../chunk-AYDF3IFZ.js";export{a as BasicInformationStep};
|
|
2
2
|
//# sourceMappingURL=BasicInformationStep.js.map
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { C as Components } from '../../remoteFlows-
|
|
3
|
-
import { S as SuccessResponse } from '../../types.gen-
|
|
2
|
+
import { C as Components } from '../../remoteFlows-DgAmG_TD.js';
|
|
3
|
+
import { S as SuccessResponse } from '../../types.gen-CAOUvsW-.js';
|
|
4
4
|
import { BenefitsFormPayload } from './types.js';
|
|
5
5
|
import 'react-hook-form';
|
|
6
6
|
import 'yup';
|
|
7
|
+
import '../../types-CxSFjQw5.js';
|
|
7
8
|
import '../types.js';
|
|
8
9
|
import '../CostCalculator/types.js';
|
|
9
10
|
import '@remoteoss/json-schema-form';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-CIGSCITX.js";import"../../chunk-66UY5UHP.js";import"../../chunk-WS3C3WIJ.js";import"../../chunk-3EQND6W7.js";import"../../chunk-GFBF55NR.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-56BNVYTD.js";import"../../chunk-IDSJI7KQ.js";import"../../chunk-N25EBX6R.js";import"../../chunk-5ETXP2QF.js";import"../../chunk-AYDF3IFZ.js";export{a as BenefitsStep};
|
|
2
2
|
//# sourceMappingURL=BenefitsStep.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { m as EmploymentResponse } from '../../types.gen-
|
|
2
|
+
import { m as EmploymentResponse } from '../../types.gen-CAOUvsW-.js';
|
|
3
3
|
import { ContractDetailsFormPayload } from './types.js';
|
|
4
4
|
import '../types.js';
|
|
5
5
|
import '../CostCalculator/types.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-PZKA77DU.js";import"../../chunk-66UY5UHP.js";import"../../chunk-WS3C3WIJ.js";import"../../chunk-3EQND6W7.js";import"../../chunk-GFBF55NR.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-56BNVYTD.js";import"../../chunk-IDSJI7KQ.js";import"../../chunk-5ETXP2QF.js";import"../../chunk-AYDF3IFZ.js";export{a as ContractDetailsStep};
|
|
2
2
|
//# sourceMappingURL=ContractDetailsStep.js.map
|
|
@@ -7,17 +7,18 @@ import { OnboardingFlowParams } from './types.js';
|
|
|
7
7
|
import { OnboardingInvite } from './OnboardingInvite.js';
|
|
8
8
|
import { ContractDetailsStep } from './ContractDetailsStep.js';
|
|
9
9
|
import { BenefitsStep } from './BenefitsStep.js';
|
|
10
|
+
import { SelectCountryStep } from './SelectCountryStep.js';
|
|
11
|
+
import '../../types.gen-CAOUvsW-.js';
|
|
10
12
|
import '../../mutations-v9H353tz.js';
|
|
11
13
|
import '@remoteoss/json-schema-form';
|
|
12
14
|
import '../useStepState.js';
|
|
13
15
|
import 'react-hook-form';
|
|
14
|
-
import '@tanstack/react-query';
|
|
15
|
-
import '../../types.gen-D5alruJJ.js';
|
|
16
16
|
import './utils.js';
|
|
17
17
|
import '../types.js';
|
|
18
18
|
import '../CostCalculator/types.js';
|
|
19
|
-
import '../../remoteFlows-
|
|
19
|
+
import '../../remoteFlows-DgAmG_TD.js';
|
|
20
20
|
import 'yup';
|
|
21
|
+
import '../../types-CxSFjQw5.js';
|
|
21
22
|
|
|
22
23
|
type OnboardingRenderProps = {
|
|
23
24
|
/**
|
|
@@ -35,6 +36,8 @@ type OnboardingRenderProps = {
|
|
|
35
36
|
* @see {@link OnboardingBack}
|
|
36
37
|
* @see {@link OnboardingInvite}
|
|
37
38
|
* @see {@link BenefitsStep}
|
|
39
|
+
* @see {@link OnboardingCreateReserve}
|
|
40
|
+
* @see {@link InvitationSection}
|
|
38
41
|
*/
|
|
39
42
|
components: {
|
|
40
43
|
SubmitButton: typeof OnboardingSubmit;
|
|
@@ -43,11 +46,12 @@ type OnboardingRenderProps = {
|
|
|
43
46
|
OnboardingInvite: typeof OnboardingInvite;
|
|
44
47
|
ContractDetailsStep: typeof ContractDetailsStep;
|
|
45
48
|
BenefitsStep: typeof BenefitsStep;
|
|
49
|
+
SelectCountryStep: typeof SelectCountryStep;
|
|
46
50
|
};
|
|
47
51
|
};
|
|
48
52
|
type OnboardingFlowProps = OnboardingFlowParams & {
|
|
49
53
|
render: ({ onboardingBag, components, }: OnboardingRenderProps) => React__default.ReactNode;
|
|
50
54
|
};
|
|
51
|
-
declare const OnboardingFlow: ({ employmentId, countryCode, type, render, options, }: OnboardingFlowProps) => React__default.JSX.Element;
|
|
55
|
+
declare const OnboardingFlow: ({ employmentId, companyId, countryCode, type, render, options, }: OnboardingFlowProps) => React__default.JSX.Element;
|
|
52
56
|
|
|
53
57
|
export { OnboardingFlow, type OnboardingRenderProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-6UHKKHB6.js";import"../../chunk-2SDJ4PZ5.js";import"../../chunk-MHKNAQLP.js";import"../../chunk-4B7QPI2R.js";import"../../chunk-Y4RTK2VE.js";import"../../chunk-CVGR3FDH.js";import"../../chunk-A36XQBXQ.js";import"../../chunk-WVJDCDGZ.js";import"../../chunk-LRVJ53MM.js";import"../../chunk-CIGSCITX.js";import"../../chunk-PZKA77DU.js";import"../../chunk-M7WCW7WD.js";import"../../chunk-66UY5UHP.js";import"../../chunk-WS3C3WIJ.js";import"../../chunk-G7BISHWK.js";import"../../chunk-JRQSZHUU.js";import"../../chunk-GMU3QGAR.js";import"../../chunk-2URGWNSM.js";import"../../chunk-3EQND6W7.js";import"../../chunk-GFBF55NR.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-56BNVYTD.js";import"../../chunk-IDSJI7KQ.js";import"../../chunk-N25EBX6R.js";import"../../chunk-5ETXP2QF.js";import"../../chunk-AYDF3IFZ.js";export{a as OnboardingFlow};
|
|
2
2
|
//# sourceMappingURL=OnboardingFlow.js.map
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { Fields } from '@remoteoss/json-schema-form';
|
|
3
3
|
import { BasicInformationFormPayload, BenefitsFormPayload, ContractDetailsFormPayload } from './types.js';
|
|
4
|
-
import { C as Components } from '../../remoteFlows-
|
|
5
|
-
import '../../types.gen-
|
|
4
|
+
import { C as Components } from '../../remoteFlows-DgAmG_TD.js';
|
|
5
|
+
import '../../types.gen-CAOUvsW-.js';
|
|
6
6
|
import '../types.js';
|
|
7
7
|
import '../CostCalculator/types.js';
|
|
8
8
|
import 'react-hook-form';
|
|
9
9
|
import 'yup';
|
|
10
|
+
import '../../types-CxSFjQw5.js';
|
|
10
11
|
|
|
11
12
|
type OnboardingFormProps = {
|
|
12
13
|
onSubmit: (payload: BasicInformationFormPayload | BenefitsFormPayload | ContractDetailsFormPayload) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-66UY5UHP.js";import"../../chunk-WS3C3WIJ.js";import"../../chunk-3EQND6W7.js";import"../../chunk-GFBF55NR.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-56BNVYTD.js";import"../../chunk-IDSJI7KQ.js";import"../../chunk-5ETXP2QF.js";import"../../chunk-AYDF3IFZ.js";export{a as OnboardingForm};
|
|
2
2
|
//# sourceMappingURL=OnboardingForm.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default, { PropsWithChildren, ButtonHTMLAttributes } from 'react';
|
|
2
|
-
import { S as SuccessResponse } from '../../types.gen-
|
|
2
|
+
import { S as SuccessResponse } from '../../types.gen-CAOUvsW-.js';
|
|
3
3
|
|
|
4
4
|
type OnboardingInviteProps = PropsWithChildren<ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
5
5
|
onSuccess?: (data: SuccessResponse) => void | Promise<void>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-2SDJ4PZ5.js";import"../../chunk-A36XQBXQ.js";import"../../chunk-WVJDCDGZ.js";import"../../chunk-WS3C3WIJ.js";import"../../chunk-G7BISHWK.js";import"../../chunk-JRQSZHUU.js";import"../../chunk-GMU3QGAR.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-56BNVYTD.js";import"../../chunk-N25EBX6R.js";import"../../chunk-5ETXP2QF.js";import"../../chunk-AYDF3IFZ.js";export{a as OnboardingInvite};
|
|
2
2
|
//# sourceMappingURL=OnboardingInvite.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { SelectCountryFormPayload, SelectCountrySuccess } from './types.js';
|
|
3
|
+
import '../../types.gen-CAOUvsW-.js';
|
|
4
|
+
import '../types.js';
|
|
5
|
+
import '../CostCalculator/types.js';
|
|
6
|
+
import '@remoteoss/json-schema-form';
|
|
7
|
+
|
|
8
|
+
type SelectCountryStepProps = {
|
|
9
|
+
onSubmit?: (payload: SelectCountryFormPayload) => void | Promise<void>;
|
|
10
|
+
onSuccess?: (data: SelectCountrySuccess) => void | Promise<void>;
|
|
11
|
+
onError?: (error: Error) => void;
|
|
12
|
+
};
|
|
13
|
+
declare function SelectCountryStep({ onSubmit, onSuccess, onError, }: SelectCountryStepProps): React__default.JSX.Element;
|
|
14
|
+
|
|
15
|
+
export { SelectCountryStep };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a}from"../../chunk-4B7QPI2R.js";import"../../chunk-66UY5UHP.js";import"../../chunk-WS3C3WIJ.js";import"../../chunk-3EQND6W7.js";import"../../chunk-GFBF55NR.js";import"../../chunk-A4RX3KRZ.js";import"../../chunk-WRDKLT4N.js";import"../../chunk-56BNVYTD.js";import"../../chunk-IDSJI7KQ.js";import"../../chunk-5ETXP2QF.js";import"../../chunk-AYDF3IFZ.js";export{a as SelectCountryStep};
|
|
2
|
+
//# sourceMappingURL=SelectCountryStep.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|