@remoteoss/remote-flows 0.27.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-ZIPHLBX4.js → chunk-2FKEF3OG.js} +2 -2
- package/dist/{chunk-N3EIN72T.js → chunk-53KVZ4BP.js} +2 -2
- package/dist/{chunk-XP7UEI56.js → chunk-5MYWJJBQ.js} +2 -2
- package/dist/{chunk-4ZGIL6OE.js → chunk-6KIQIVKA.js} +2 -2
- package/dist/{chunk-WZAWPSKS.js → chunk-6LJRRFK2.js} +2 -2
- package/dist/{chunk-746ELT2W.js → chunk-7AC3W7WD.js} +2 -2
- package/dist/{chunk-SB3IYODL.js → chunk-AODV6HT2.js} +2 -2
- package/dist/{chunk-LRNSFLHR.js → chunk-AUZWLETL.js} +2 -2
- package/dist/{chunk-R64X3EJF.js → chunk-AWDGLK2T.js} +2 -2
- package/dist/{chunk-E3JFQ7PH.js → chunk-BOTWQMOJ.js} +2 -2
- package/dist/chunk-DB7ITLRX.js +2 -0
- package/dist/chunk-DB7ITLRX.js.map +1 -0
- package/dist/{chunk-DZ67OJVF.js → chunk-DZ7FZ4L2.js} +2 -2
- package/dist/{chunk-GD5556B2.js → chunk-FFMKAMWP.js} +2 -2
- package/dist/{chunk-AYLYOLVG.js → chunk-GWLOE7WJ.js} +2 -2
- package/dist/{chunk-YXWBSRKS.js → chunk-HMNHKZGD.js} +2 -2
- package/dist/{chunk-FEHSJUZJ.js → chunk-IQKZWU7I.js} +2 -2
- package/dist/{chunk-QLNFHOLH.js → chunk-JO4722R7.js} +2 -2
- package/dist/{chunk-VLLLNIMN.js → chunk-MGVP76ZI.js} +2 -2
- package/dist/{chunk-7Y46DL2U.js → chunk-MRPXDND2.js} +2 -2
- package/dist/chunk-NP4G3N5P.js +2 -0
- package/dist/{chunk-LDJT7TII.js → chunk-OU4Y73FX.js} +2 -2
- package/dist/{chunk-SA74WAVS.js → chunk-PYKEYPGA.js} +2 -2
- package/dist/{chunk-TUFTB5UD.js → chunk-QDYWPG2R.js} +2 -2
- package/dist/{chunk-PFT7KJ65.js → chunk-QPTO4XXU.js} +2 -2
- package/dist/{chunk-L6FZRTSN.js → chunk-QTYDDIVO.js} +2 -2
- package/dist/chunk-R3DJNVHR.js +2 -0
- package/dist/chunk-R3DJNVHR.js.map +1 -0
- package/dist/{chunk-NRW33IP5.js → chunk-TM7Q7RHH.js} +2 -2
- package/dist/{chunk-R3LY6TV5.js → chunk-UQOWSJ2B.js} +2 -2
- package/dist/chunk-VDRNNOVA.js +2 -0
- package/dist/chunk-VDRNNOVA.js.map +1 -0
- package/dist/{chunk-A2SWQS2N.js → chunk-WCIJHQMP.js} +2 -2
- package/dist/chunk-XPKVRYIU.js +2 -0
- package/dist/chunk-XPKVRYIU.js.map +1 -0
- package/dist/{chunk-BO6OKTIG.js → chunk-Z42H2QEW.js} +2 -2
- package/dist/{chunk-WNTOQYRY.js → chunk-ZWZJ4XOY.js} +2 -2
- package/dist/flows/ContractAmendment/ContractAmendmentFlow.js +1 -1
- package/dist/flows/ContractAmendment/ContractAmendmentForm.js +1 -1
- package/dist/flows/ContractAmendment/index.js +1 -1
- package/dist/flows/ContractorOnboarding/ContractorOnboarding.js +1 -1
- package/dist/flows/ContractorOnboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractPreviewStep.js +1 -1
- package/dist/flows/ContractorOnboarding/components/ContractorOnboardingForm.js +1 -1
- package/dist/flows/ContractorOnboarding/components/PricingPlan.js +1 -1
- package/dist/flows/ContractorOnboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/ContractorOnboarding/index.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorFlow.js +1 -1
- package/dist/flows/CostCalculator/CostCalculatorForm.js +1 -1
- package/dist/flows/CostCalculator/hooks.js +1 -1
- package/dist/flows/CostCalculator/index.js +1 -1
- package/dist/flows/CostCalculator/utils.js +1 -1
- package/dist/flows/Onboarding/OnboardingFlow.js +1 -1
- package/dist/flows/Onboarding/components/BasicInformationStep.js +1 -1
- package/dist/flows/Onboarding/components/BenefitsStep.js +1 -1
- package/dist/flows/Onboarding/components/ContractDetailsStep.js +1 -1
- package/dist/flows/Onboarding/components/OnboardingForm.js +1 -1
- package/dist/flows/Onboarding/components/SelectCountryStep.js +1 -1
- package/dist/flows/Onboarding/index.js +1 -1
- package/dist/flows/Termination/AdditionalDetailsForm.js +1 -1
- package/dist/flows/Termination/EmployeeComunicationForm.js +1 -1
- package/dist/flows/Termination/PaidTimeOffForm.js +1 -1
- package/dist/flows/Termination/TerminationDetailsForm.js +1 -1
- package/dist/flows/Termination/TerminationFlow.js +1 -1
- package/dist/flows/Termination/TerminationForm.js +1 -1
- package/dist/flows/Termination/hooks.js +1 -1
- package/dist/flows/Termination/index.js +1 -1
- package/dist/flows/Termination/json-schemas/jsonSchema.d.ts +2 -0
- package/dist/flows/Termination/json-schemas/jsonSchema.js +1 -1
- package/dist/flows/Termination/json-schemas/paidTimeOff.d.ts +1 -0
- package/dist/flows/Termination/json-schemas/paidTimeOff.js +1 -1
- package/dist/flows/Termination/json-schemas/schema.js +1 -1
- package/dist/flows/Termination/json-schemas/terminationDetails.d.ts +1 -0
- package/dist/flows/Termination/json-schemas/terminationDetails.js +1 -1
- package/dist/flows/api.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-4T6PRR6R.js +0 -2
- package/dist/chunk-4T6PRR6R.js.map +0 -1
- package/dist/chunk-GC23RRCI.js +0 -2
- package/dist/chunk-GC23RRCI.js.map +0 -1
- package/dist/chunk-KOIHMAAP.js +0 -2
- package/dist/chunk-OXCEJQFC.js +0 -2
- package/dist/chunk-OXCEJQFC.js.map +0 -1
- /package/dist/{chunk-ZIPHLBX4.js.map → chunk-2FKEF3OG.js.map} +0 -0
- /package/dist/{chunk-N3EIN72T.js.map → chunk-53KVZ4BP.js.map} +0 -0
- /package/dist/{chunk-XP7UEI56.js.map → chunk-5MYWJJBQ.js.map} +0 -0
- /package/dist/{chunk-4ZGIL6OE.js.map → chunk-6KIQIVKA.js.map} +0 -0
- /package/dist/{chunk-WZAWPSKS.js.map → chunk-6LJRRFK2.js.map} +0 -0
- /package/dist/{chunk-746ELT2W.js.map → chunk-7AC3W7WD.js.map} +0 -0
- /package/dist/{chunk-SB3IYODL.js.map → chunk-AODV6HT2.js.map} +0 -0
- /package/dist/{chunk-LRNSFLHR.js.map → chunk-AUZWLETL.js.map} +0 -0
- /package/dist/{chunk-R64X3EJF.js.map → chunk-AWDGLK2T.js.map} +0 -0
- /package/dist/{chunk-E3JFQ7PH.js.map → chunk-BOTWQMOJ.js.map} +0 -0
- /package/dist/{chunk-DZ67OJVF.js.map → chunk-DZ7FZ4L2.js.map} +0 -0
- /package/dist/{chunk-GD5556B2.js.map → chunk-FFMKAMWP.js.map} +0 -0
- /package/dist/{chunk-AYLYOLVG.js.map → chunk-GWLOE7WJ.js.map} +0 -0
- /package/dist/{chunk-YXWBSRKS.js.map → chunk-HMNHKZGD.js.map} +0 -0
- /package/dist/{chunk-FEHSJUZJ.js.map → chunk-IQKZWU7I.js.map} +0 -0
- /package/dist/{chunk-QLNFHOLH.js.map → chunk-JO4722R7.js.map} +0 -0
- /package/dist/{chunk-VLLLNIMN.js.map → chunk-MGVP76ZI.js.map} +0 -0
- /package/dist/{chunk-7Y46DL2U.js.map → chunk-MRPXDND2.js.map} +0 -0
- /package/dist/{chunk-KOIHMAAP.js.map → chunk-NP4G3N5P.js.map} +0 -0
- /package/dist/{chunk-LDJT7TII.js.map → chunk-OU4Y73FX.js.map} +0 -0
- /package/dist/{chunk-SA74WAVS.js.map → chunk-PYKEYPGA.js.map} +0 -0
- /package/dist/{chunk-TUFTB5UD.js.map → chunk-QDYWPG2R.js.map} +0 -0
- /package/dist/{chunk-PFT7KJ65.js.map → chunk-QPTO4XXU.js.map} +0 -0
- /package/dist/{chunk-L6FZRTSN.js.map → chunk-QTYDDIVO.js.map} +0 -0
- /package/dist/{chunk-NRW33IP5.js.map → chunk-TM7Q7RHH.js.map} +0 -0
- /package/dist/{chunk-R3LY6TV5.js.map → chunk-UQOWSJ2B.js.map} +0 -0
- /package/dist/{chunk-A2SWQS2N.js.map → chunk-WCIJHQMP.js.map} +0 -0
- /package/dist/{chunk-BO6OKTIG.js.map → chunk-Z42H2QEW.js.map} +0 -0
- /package/dist/{chunk-WNTOQYRY.js.map → chunk-ZWZJ4XOY.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-MRPXDND2.js";import{b as m}from"./chunk-MRYRNB7Y.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as e}from"react/jsx-runtime";function f({onSubmit:n}){let{terminationBag:i}=m();return e(r,{onSubmit:o(async a=>{await n?.(i?.parseFormValues(a)),i?.next()},"handleSubmit")})}o(f,"PaidTimeOffForm");export{f as a};
|
|
2
|
+
//# sourceMappingURL=chunk-2FKEF3OG.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as n}from"./chunk-MRPXDND2.js";import{b as m}from"./chunk-MRYRNB7Y.js";import{a as o}from"./chunk-P37U34EQ.js";import{jsx as r}from"react/jsx-runtime";function p({onSubmit:e}){let{terminationBag:i}=m();return r(n,{onSubmit:o(async t=>{await e?.(i?.parseFormValues(t)),i?.next()},"handleSubmit")})}o(p,"EmployeeCommunicationForm");export{p as a};
|
|
2
|
+
//# sourceMappingURL=chunk-53KVZ4BP.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as y}from"./chunk-PGWKJ6FK.js";import{b as c}from"./chunk-CFIJKJXD.js";import{a as F}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as y}from"./chunk-PGWKJ6FK.js";import{b as c}from"./chunk-CFIJKJXD.js";import{a as F}from"./chunk-JO4722R7.js";import{b as u}from"./chunk-2YTBWEC7.js";import{f,g as p}from"./chunk-CNDSIADP.js";import{a as m}from"./chunk-P37U34EQ.js";import{useEffect as S}from"react";import{jsx as b}from"react/jsx-runtime";import{createElement as V}from"react";function U({defaultValues:d,onSubmit:g,components:E}){let{formId:k,onboardingBag:o}=y(),w=c(o.handleValidation),r=f({resolver:w,defaultValues:d,shouldUnregister:!1,mode:"onBlur"});S(()=>{o.employmentId&&o?.checkFieldUpdates(r.getValues())},[]),S(()=>{let t=r?.watch(e=>{Object.keys(e).some(i=>e[i]!==d[i])&&o?.checkFieldUpdates(e)});return()=>t?.unsubscribe()},[]);let h=m(async(t,e)=>{let s=e?.nativeEvent;if(s?.isDraftSubmission){let{onSuccess:i,onError:l}=s.draftCallbacks;try{if(!await r.trigger())return;let n=await o.onSubmit(t);if(n?.data)i?.();else if(n?.error){let B=o.stepState.currentStep.name,P=o.meta?.fields?.[B],O=u(n?.fieldErrors||[],P);l?.({error:n.error,rawError:n.rawError,fieldErrors:O})}}catch(a){l?.({error:a,rawError:a,fieldErrors:[]})}}else g(t)},"handleSubmit");return V(p,{...r,key:`form-${o.stepState.currentStep.name}`},b("form",{id:k,onSubmit:r.handleSubmit(h),className:"space-y-4 RemoteFlows__OnboardingForm",children:b(F,{components:E,fields:o.fields,fieldsets:o.meta.fieldsets,fieldValues:o.fieldValues})}))}m(U,"OnboardingForm");export{U as a};
|
|
2
|
+
//# sourceMappingURL=chunk-5MYWJJBQ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as u}from"./chunk-CFIJKJXD.js";import{a as F}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{b as u}from"./chunk-CFIJKJXD.js";import{a as F}from"./chunk-JO4722R7.js";import{f as l,g as p}from"./chunk-CNDSIADP.js";import{c as f}from"./chunk-PAQW5BFW.js";import{b as _}from"./chunk-TVZAFTPT.js";import{a as r}from"./chunk-P37U34EQ.js";import{useEffect as R}from"react";import{jsx as a}from"react/jsx-runtime";var w=["effective_date","reason_for_change","reason_for_change_description","additional_comments","additional_comments_toggle"];function x({onSubmit:b,onError:m,onSuccess:A}){let{formId:C,contractAmendment:{checkFieldUpdates:h,fields:s,onSubmit:S,stepState:g,initialValues:i,handleValidation:y}}=_(),V=u(y),e=l({resolver:V,defaultValues:g.values?.form||i,shouldUnregister:!0,mode:"onBlur"});R(()=>{let t=e?.watch(o=>{(Object.keys(e.formState.dirtyFields).length>0||e.formState.isDirty)&&h(o)});return()=>t?.unsubscribe()},[]);let v=r(async t=>{let o=!1;for(let[c,P]of Object.entries(t))if(!w.includes(c)&&i[c]!==P){o=!0;break}if(!o)return m?.({message:"no_changes_detected_contract_details"});let d=f(t,s,{isPartialValidation:!1});await b?.(d);let n=await S(t);n.error?m?.(n.error):await A?.(n.data)},"handleSubmit");return a(p,{...e,children:a("form",{id:C,"data-testid":"contract-amendment-form",onSubmit:e.handleSubmit(v),className:"space-y-4 RemoteFlows__ContractAmendmentForm",children:a(F,{fields:s})})})}r(x,"ContractAmendmentForm");export{x as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6KIQIVKA.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-MRPXDND2.js";import{b as a}from"./chunk-MRYRNB7Y.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as p}from"react/jsx-runtime";function F({requesterName:n,onSubmit:s,onSuccess:m,onError:d}){let{terminationBag:e}=a(),l=i(async o=>{await s?.(e?.parseFormValues(o));let r=await e?.onSubmit(o);r?.error?d?.(r.error):r?.data&&await m?.(r.data)},"handleSubmit"),u=e?.fields.map(o=>o.name==="acknowledge_termination_procedure"?{...o,label:o.label.replace("{{requesterName}}",n)}:o);return p(t,{fields:u,onSubmit:l})}i(F,"AdditionalDetailsForm");export{F as a};
|
|
2
|
+
//# sourceMappingURL=chunk-6LJRRFK2.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as P}from"./chunk-6IL4TB7S.js";import{a as v}from"./chunk-IWA5B4U6.js";import{a as $}from"./chunk-7VOQAVM4.js";import{a as N}from"./chunk-VM2DQCZO.js";import{a as C}from"./chunk-SLMJEZJ7.js";import{a as w}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as P}from"./chunk-6IL4TB7S.js";import{a as v}from"./chunk-IWA5B4U6.js";import{a as $}from"./chunk-7VOQAVM4.js";import{a as N}from"./chunk-VM2DQCZO.js";import{a as C}from"./chunk-SLMJEZJ7.js";import{a as w}from"./chunk-BOTWQMOJ.js";import{a as x}from"./chunk-S4XU4SE7.js";import{a as k}from"./chunk-KDUM4EZJ.js";import{a as M}from"./chunk-2YTBWEC7.js";import{a as l,b as S}from"./chunk-ANQ4HVVK.js";import{a as V,b as h}from"./chunk-DZ7FZ4L2.js";import{a as j}from"./chunk-PJBAQZ6G.js";import{a as F}from"./chunk-Z5WMKCRJ.js";import{c as f}from"./chunk-PAQW5BFW.js";import{a as s}from"./chunk-43WMZDDH.js";import{a as n}from"./chunk-P37U34EQ.js";import{createHeadlessForm as W}from"@remoteoss/json-schema-form";import G from"lodash.omitby";import X from"lodash.isnull";import{format as Y}from"date-fns";import{useMemo as I}from"react";import ee from"lodash.omit";import{jsx as b,jsxs as U}from"react/jsx-runtime";function y(t,e,_){return{"x-jsf-presentation":{inputType:"hidden",Component:n(()=>U("div",{className:s("RemoteFlows__InformationStatement",_?.className),children:[b("h3",{className:s("RemoteFlows__InformationStatement__Title"),children:t}),b("p",{className:s("RemoteFlows__InformationStatement__Description"),children:e})]}),"Component")}}}n(y,"createInformationField");import{Fragment as oe,jsx as r,jsxs as ne}from"react/jsx-runtime";function ie(t){return{confidential:"",customer_informed_employee:"",customer_informed_employee_date:"",customer_informed_employee_description:"",personal_email:"",termination_reason:void 0,reason_description:"",termination_reason_files:[],will_challenge_termination:"",will_challenge_termination_description:null,agrees_to_pto_amount:"",agrees_to_pto_amount_notes:null,acknowledge_termination_procedure:!1,additional_comments:"",proposed_termination_date:"",risk_assessment_reasons:[],timesheet_file:void 0,...t}}n(ie,"buildInitialValues");var be=n(({employmentId:t,options:e,initialValues:_})=>{let{fieldValues:T,setFieldValues:R,stepState:a,previousStep:D,nextStep:E}=j(x),{data:p}=k({employmentId:t}),c=ie({...a.values?.employee_communication,...a.values?.termination_details,...a.values?.paid_time_off,...a.values?.additional_information,..._}),u=I(()=>({...a.values?.[a.currentStep.name],...c,...T}),[a.values,a.currentStep.name,T,c]),O=I(()=>({fields:{risk_assesment_info:y("Offboarding risk assessment","Employees may be protected from termination if they fall into certain categories. To help avoid claims from employees, let us know if the employee is part of one or more of these categories. Select all that apply.",{className:e?.jsfModify?.fields?.risk_assesment_info?.["x-jsf-presentation"]?.className}),proposed_termination_date_info:y("Proposed termination date",ne(oe,{children:["In most cases, we must provide notice to the employee before termination. The required notice period depends on local labor laws, the employment agreement, and other factors. We'll use those factors to determine the required notice period.",r(S,{external:!0,zendeskId:l.terminationNoticePeriods,className:s("text-sm",e?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.zendeskTriggerButtonClassName),children:"Learn about notice periods"})]}),{className:e?.jsfModify?.fields?.proposed_termination_date_info?.["x-jsf-presentation"]?.className}),proposed_termination_date:{...e?.jsfModify?.fields?.proposed_termination_date,"x-jsf-presentation":{...e?.jsfModify?.fields?.proposed_termination_date?.["x-jsf-presentation"],minDate:Y(new Date,"yyyy-MM-dd")}},paid_time_off_info:{...e?.jsfModify?.fields?.paid_time_off_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.paid_time_off_info?.["x-jsf-presentation"],Component:n(()=>{let o=e?.jsfModify?.fields?.paid_time_off_info?.["x-jsf-presentation"]?.Component;return r(P,{employeeName:p?.basic_information?.name,proposedTerminationDate:u.proposed_termination_date,employmentId:t,employment:p,render:i=>o?r(o,{...i}):r(C,{...i})})},"Component")}},acknowledge_termination_procedure_info:{...e?.jsfModify?.fields?.acknowledge_termination_procedure_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.acknowledge_termination_procedure_info?.["x-jsf-presentation"],Component:n(()=>{let o=e?.jsfModify?.fields?.acknowledge_termination_procedure_info?.["x-jsf-presentation"]?.Component;return r(v,{render:i=>o?r(o,{...i}):r($,{...i})})},"Component")}},acknowledge_termination_procedure_fees_info:{...e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info,"x-jsf-presentation":{...e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info?.["x-jsf-presentation"],Component:n(()=>{let o={involuntaryOffboardingServiceChargeZendeskId:l.involuntaryOffboardingServiceCharge,reconciliationInvoiceZendeskId:l.reconciliationInvoice},i=e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info?.["x-jsf-presentation"]?.Component;return i?r(i,{...o}):r(N,{...o})},"Component")}}}}),[e?.jsfModify?.fields?.risk_assesment_info,e?.jsfModify?.fields?.proposed_termination_date_info,e?.jsfModify?.fields?.proposed_termination_date,e?.jsfModify?.fields?.paid_time_off_info,e?.jsfModify?.fields?.acknowledge_termination_procedure_info,e?.jsfModify?.fields?.acknowledge_termination_procedure_fees_info,p,u.proposed_termination_date,t]),{data:m,isLoading:A}=h({formValues:u,jsfModify:{...e?.jsfModify,fields:{...e?.jsfModify?.fields,...O?.fields}},step:a.currentStep.name}),d=W(w.data.schema),g=V(),{mutateAsync:z}=M(g);async function J(o){if(!t)throw new Error("Employment id is missing");if(m){let i=f(o,d.fields,{isPartialValidation:!0}),{customer_informed_employee:L}=i,Z=L==="yes"?{employee_awareness:{date:i.customer_informed_employee_date,note:i.customer_informed_employee_description}}:void 0,q=F(i,["agrees_to_pto_amount","confidential","customer_informed_employee","will_challenge_termination"]),K=ee(q,"customer_informed_employee_date","customer_informed_employee_description"),Q=G({...K,...Z},X);return z({employment_id:t,termination_details:Q,type:"termination"})}}n(J,"onSubmit");function B(){D()}n(B,"back");function H(){E()}return n(H,"next"),{employmentId:t,stepState:a,fields:m?.fields||[],isLoading:A,isSubmitting:g.isPending,initialValues:c,handleValidation:n(o=>{if(m){let i=f(o,m?.fields);return m?.handleValidation(i)}return null},"handleValidation"),checkFieldUpdates:n(o=>{if(d){let i=f(o,d?.fields,{isPartialValidation:!0});R(i)}},"checkFieldUpdates"),parseFormValues:n(o=>f(o,d.fields,{isPartialValidation:!0}),"parseFormValues"),onSubmit:J,back:B,next:H}},"useTermination");export{be as a};
|
|
2
|
+
//# sourceMappingURL=chunk-7AC3W7WD.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-5MYWJJBQ.js";import{b as t}from"./chunk-PGWKJ6FK.js";import{b as e}from"./chunk-2YTBWEC7.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as c}from"react/jsx-runtime";function S({onSubmit:m,onSuccess:d,onError:a}){let{onboardingBag:o}=t(),l=i(async n=>{try{await m?.(o.parseFormValues(n));let r=await o.onSubmit(n);if(r?.data){await d?.(r?.data),o?.next();return}if(r?.error){let p=e(r?.fieldErrors||[],o.meta?.fields?.basic_information);a?.({error:r?.error,rawError:r?.rawError,fieldErrors:p})}}catch(r){a?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),f=o.stepState.values?.basic_information||o.initialValues.basic_information;return c(s,{defaultValues:f,onSubmit:l})}i(S,"BasicInformationStep");export{S as a};
|
|
2
|
+
//# sourceMappingURL=chunk-AODV6HT2.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-TM7Q7RHH.js";import{b as e}from"./chunk-TOA3JILU.js";import{b as t}from"./chunk-2YTBWEC7.js";import{a as i}from"./chunk-P37U34EQ.js";import{jsx as p}from"react/jsx-runtime";function S({onSubmit:m,onSuccess:d,onError:a}){let{contractorOnboardingBag:o}=e(),l=i(async n=>{try{await m?.(o.parseFormValues(n));let r=await o.onSubmit(n);if(r?.data){await d?.(r?.data),o?.next();return}if(r?.error){let f=t(r?.fieldErrors||[],o.meta?.fields?.basic_information);a?.({error:r?.error,rawError:r?.rawError,fieldErrors:f})}}catch(r){a?.({error:r,rawError:r,fieldErrors:[]})}},"handleSubmit"),c=o.stepState.values?.basic_information||o.initialValues.basic_information;return p(s,{defaultValues:c,onSubmit:l})}i(S,"BasicInformationStep");export{S as a};
|
|
2
|
+
//# sourceMappingURL=chunk-AUZWLETL.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as b}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as b}from"./chunk-TM7Q7RHH.js";import{b as P}from"./chunk-TOA3JILU.js";import{b as g}from"./chunk-2YTBWEC7.js";import{b as m}from"./chunk-WVDTHFGS.js";import{a}from"./chunk-P37U34EQ.js";import{useState as f,useMemo as S}from"react";import{Document as k,Page as C,pdfjs as x}from"react-pdf";import{jsx as r,jsxs as i}from"react/jsx-runtime";x.GlobalWorkerOptions.workerSrc=`//unpkg.com/pdfjs-dist@${x.version}/build/pdf.worker.min.mjs`;function N({base64Data:c,fileName:l="document.pdf"}){let[n,t]=f(0),[s,u]=f(1),[p,o]=f(!0),[d,w]=f(""),v=S(()=>{if(!c)return"";let e=c.trim();return e.startsWith("data:application/pdf;base64,")||e.startsWith("data:")?e:`data:application/pdf;base64,${e}`},[c]),h=a(({numPages:e})=>{t(e),o(!1),w("")},"onDocumentLoadSuccess"),y=a(e=>{console.error("Error loading PDF:",e),w("Failed to load PDF document"),o(!1)},"onDocumentLoadError"),E=a(()=>{u(e=>Math.max(1,e-1))},"goToPrevPage"),D=a(()=>{u(e=>Math.min(n,e+1))},"goToNextPage");return v?i("div",{className:"w-full space-y-4",children:[i("div",{children:[i("div",{className:"flex justify-center items-center min-h-[600px] p-4 bg-gray-50",children:[p&&i("div",{className:"text-center",children:[r("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-gray-900 mx-auto mb-4"}),r("p",{className:"text-gray-600",children:"Loading PDF..."})]}),d&&i("div",{className:"text-center space-y-4",children:[r("p",{className:"text-red-600",children:d}),r(m,{asChild:!0,children:r("a",{href:v,download:l,children:"Download PDF Instead"})})]}),!d&&r(k,{file:v,onLoadSuccess:h,onLoadError:y,loading:"",className:"flex flex-col items-center",children:r(C,{pageNumber:s,renderTextLayer:!0,renderAnnotationLayer:!0,className:"shadow-lg",width:Math.min(window.innerWidth-100,800)})})]}),n>0&&!d&&r("div",{className:"border-t bg-white px-4 py-3",children:i("div",{className:"flex items-center justify-between",children:[r(m,{onClick:E,disabled:s<=1,variant:"outline",size:"sm",children:"\u2190 Previous"}),i("div",{className:"text-sm text-gray-600",children:["Page ",s," of ",n]}),r(m,{onClick:D,disabled:s>=n,variant:"outline",size:"sm",children:"Next \u2192"})]})})]}),i("div",{className:"flex justify-between items-center text-sm",children:[r("p",{className:"text-gray-600",children:l}),r(m,{variant:"link",size:"link",asChild:!0,children:i("a",{href:v,download:l,className:"flex items-center gap-1",children:[r("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Download PDF"]})})]})]}):r("div",{className:"w-full border rounded p-8 text-center bg-gray-50",children:r("p",{className:"text-gray-500",children:"No PDF data available"})})}a(N,"PDFPreview");import{jsx as F,jsxs as L}from"react/jsx-runtime";function I({onSubmit:c,onSuccess:l,onError:n}){let{contractorOnboardingBag:t}=P(),s=a(async p=>{try{await c?.(t.parseFormValues(p));let o=await t.onSubmit(p);if(o?.data){await l?.(o?.data),t?.next();return}if(o?.error){let d=g(o?.fieldErrors||[],t.meta?.fields?.contract_preview);n?.({error:o?.error,rawError:o?.rawError,fieldErrors:d})}}catch(o){n?.({error:o,rawError:o,fieldErrors:[]})}},"handleSubmit"),u=t.stepState.values?.contract_preview||t.initialValues.contract_preview;return L("div",{className:"space-y-4",children:[F(N,{base64Data:t.documentPreviewPdf?.contract_document.content}),F(b,{defaultValues:u,onSubmit:s})]})}a(I,"ContractPreviewStep");export{I as a};
|
|
2
|
+
//# sourceMappingURL=chunk-AWDGLK2T.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as t}from"./chunk-R3DJNVHR.js";import{a}from"./chunk-LMYJ6V44.js";import{a as e}from"./chunk-N6G4VZXF.js";import{a as r}from"./chunk-XPKVRYIU.js";var i={data:{version:7,schema:{additionalProperties:!1,allOf:[...e.data.schema.allOf,...t.data.schema.allOf,...r.data.schema.allOf,...a.data.schema.allOf],properties:{...e.data.schema.properties,...t.data.schema.properties,...r.data.schema.properties,...a.data.schema.properties},required:[...e.data.schema.required,...t.data.schema.required,...r.data.schema.required,...a.data.schema.required],type:"object","x-jsf-order":[...e.data.schema["x-jsf-order"],...t.data.schema["x-jsf-order"],...r.data.schema["x-jsf-order"],...a.data.schema["x-jsf-order"]]}}};export{i as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BOTWQMOJ.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as A}from"./chunk-BV3PGYSH.js";import{a as ve,b as Ge,c as Je,d as qe,e as je,f as Ke,g as Ye,h as Ze,i as Xe,j as xe,k as et,l as be,m as Se,o as ke,q as tt,r as ot,s as rt}from"./chunk-D6X2WCEG.js";import{b as Qe}from"./chunk-HPHWQU34.js";import{b as ye}from"./chunk-ANQ4HVVK.js";import{a as Ce,b as I}from"./chunk-WVDTHFGS.js";import{b as S}from"./chunk-3ZWDIEEM.js";import{a as ne,b as ae,c as b,d as Ae,e as Oe,f as ze,g as Ue,h as k,i as w,j as N,k as R,l as P,m as D}from"./chunk-CNDSIADP.js";import{g as Ve}from"./chunk-PAQW5BFW.js";import{a as y,e as oe}from"./chunk-43WMZDDH.js";import{a as r}from"./chunk-P37U34EQ.js";import{Fragment as Do,useEffect as To,useRef as Lt}from"react";import{Fragment as Ot,jsx as O,jsxs as se}from"react/jsx-runtime";function le({name:e,defaultValue:t,description:o,label:n,onChange:a,multiple:c,options:d,component:F,...f}){let{components:u}=S(),{control:s}=b(),i=r((m,l,g)=>{let p=g.value?[...g.value]:[];l?p.includes(m)||g.onChange([...p,m]):g.onChange(p.filter(h=>h!==m))},"handleCheckboxChange");return O(k,{control:s,name:e,defaultValue:t,render:({field:m,fieldState:l})=>{let g=F||u?.checkbox;if(g){let p={name:e,description:o,label:n,defaultValue:t,multiple:c,options:d,...f};return O(g,{field:{...m,onChange:r(h=>{if(c){let{checked:x,value:C}=h.target;i(C,x,m),a?.(x);return}m.onChange(h),a?.(h)},"onChange")},fieldState:l,fieldData:p})}return se(w,{"data-field":e,className:y(`RemoteFlows__CheckBoxField__Item__${e}`),children:[O(R,{children:se(Ot,{children:[d&&c?O(N,{children:n}):null,d&&c?d.map(p=>se("div",{className:"flex space-x-2",children:[O(ve,{id:p.value,onCheckedChange:h=>{i(p.value,h===!0,m),a?.(h,p.value)},checked:m.value?.includes(p.value),className:"RemoteFlows__CheckBox__Input"}),O(N,{htmlFor:p.value,className:"mb-0 RemoteFlows__CheckBox__Label",children:p.label})]},p.value)):se("div",{className:"flex space-x-2",children:[O(ve,{id:e,onCheckedChange:p=>{m.onChange(p),a?.(p)},checked:m.value,className:"RemoteFlows__CheckBox__Input"}),O(N,{htmlFor:e,className:"mb-0 RemoteFlows__CheckBox__Label",children:n})]})]})}),o&&O(P,{children:o}),l.error&&O(D,{})]})}})}r(le,"CheckBoxField");import{CalendarIcon as Gt}from"lucide-react";import{PopoverClose as Jt}from"@radix-ui/react-popover";import{ChevronLeft as zt,ChevronRight as Vt}from"lucide-react";import{DayPicker as Ut}from"react-day-picker";import{jsx as Ne}from"react/jsx-runtime";function nt({className:e,classNames:t,showOutsideDays:o=!0,...n}){return Ne(Ut,{showOutsideDays:o,className:y("p-3",e),classNames:{months:"flex flex-col sm:flex-row gap-2",month:"flex flex-col gap-4",caption:"flex justify-center pt-1 relative items-center w-full",caption_label:"text-sm font-medium",nav:"flex items-center gap-1",nav_button:y(Ce({variant:"outline"}),"size-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-x-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:y("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-range-end)]:rounded-r-md",n.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:y(Ce({variant:"ghost"}),"size-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start aria-selected:bg-primary aria-selected:text-primary-foreground",day_range_end:"day-range-end aria-selected:bg-primary aria-selected:text-primary-foreground",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{IconLeft:r(({className:a,...c})=>Ne(zt,{className:y("size-4",a),...c}),"IconLeft"),IconRight:r(({className:a,...c})=>Ne(Vt,{className:y("size-4",a),...c}),"IconRight")},...n})}r(nt,"Calendar");import*as z from"@radix-ui/react-popover";import{jsx as ie}from"react/jsx-runtime";function me({...e}){return ie(z.Root,{"data-slot":"popover",...e})}r(me,"Popover");function de({...e}){return ie(z.Trigger,{"data-slot":"popover-trigger",...e})}r(de,"PopoverTrigger");function ce({className:e,align:t="center",sideOffset:o=4,...n}){return ie(z.Portal,{children:ie(z.Content,{"data-slot":"popover-content",align:t,sideOffset:o,className:y("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...n})})}r(ce,"PopoverContent");import{format as at,parse as qt}from"date-fns";import{Fragment as jt,jsx as M,jsxs as we}from"react/jsx-runtime";function st({description:e,label:t,name:o,minDate:n,onChange:a,component:c,...d}){let{components:F}=S(),{control:f}=b(),u;return d.meta?.mot&&typeof d.meta.mot=="number"?u=Ve(d.meta.mot):n&&(u=qt(n,"yyyy-MM-dd",new Date)),M(k,{control:f,name:o,render:({field:s,fieldState:i})=>{let m=c||F?.date;if(m){let l={description:e,label:t,name:o,onChange:a,...u&&{minDate:u.toISOString()},...d};return M(m,{field:{...s,onChange:r(g=>{s.onChange(g),a?.(g)},"onChange")},fieldState:i,fieldData:l})}return we(w,{"data-field":o,className:`flex flex-col RemoteFlows__DatePickerField__Item__${o}`,children:[M(N,{className:"RemoteFlows__DatePickerField__Label",children:t}),we(me,{children:[M(de,{asChild:!0,children:M(R,{children:M("div",{children:we(I,{type:"button",variant:"outline",className:y("w-full pl-3 text-left font-normal",!s.value&&"text-muted-foreground"),"data-testid":`date-picker-button-${o}`,children:[s.value&&M(jt,{children:at(s.value,"yyyy-MM-dd")}),M(Gt,{className:"ml-auto h-4 w-4 opacity-50"})]})})})}),M(ce,{className:"w-auto p-0 RemoteFlows__DatepickerField__PopoverContent",align:"start",children:M(nt,{mode:"single",className:"RemoteFlows__DatepickerField__Calendar",selected:s.value?new Date(s.value):void 0,onSelect:l=>{s.onChange(l?at(l,"yyyy-MM-dd"):null),a?.(l)},defaultMonth:u,components:{DayContent:r(l=>M(Jt,{children:l.date.getDate()}),"DayContent")},...u&&{disabled:r(l=>l<u,"disabled")}})})]}),e?M(P,{children:e}):null,i.error&&M(D,{className:"RemoteFlows__DatePickerField__Error"})]})}})}r(st,"DatePickerField");import{useState as Kt,useRef as Yt}from"react";import{Upload as Zt,X as Xt}from"lucide-react";import{jsx as V,jsxs as ue}from"react/jsx-runtime";var Qt=r(e=>e?e.split(",").map(t=>t.trim().toUpperCase()).join(", "):null,"getAcceptedFormats");function lt({onChange:e,className:t,multiple:o,accept:n}){let[a,c]=Kt([]),d=Yt(null),F=r(i=>{i.preventDefault(),d.current?.click()},"handleClick"),f=r(i=>{if(i.target.files&&i.target.files.length>0){let m=Array.from(i.target.files);c(m),e(i)}},"handleChange"),u=r(i=>{c(m=>m.filter(l=>l!==i))},"onRemoveFile"),s=Qt(n);return ue("div",{className:y("flex flex-col items-start gap-4",t),children:[V("input",{type:"file",ref:d,onChange:f,className:"hidden","aria-label":"File upload",multiple:o,accept:n}),ue(I,{type:"button",onClick:F,className:"gap-2",children:[V(Zt,{className:"h-4 w-4"}),"Choose File"]}),s&&ue("div",{className:"text-sm text-gray-600",children:["Accepted formats:"," ",V("span",{className:"font-medium",children:s})]}),a.length===0&&V("div",{className:"text-sm",children:o?V("span",{className:"font-medium",children:"No files selected. You can select multiple files"}):V("span",{className:"font-medium",children:"No file selected."})}),a.length>0&&a.map((i,m)=>ue("div",{className:"text-sm flex items-center gap-2",children:["Selected file: ",V("span",{className:"font-medium",children:i.name})," (",Math.round(i.size/1024)," KB)",V(I,{variant:"ghost",onClick:()=>u(i),children:V(Xt,{})})]},m))]})}r(lt,"FileUploader");import{jsx as U,jsxs as ro}from"react/jsx-runtime";var eo=r(e=>new Promise((t,o)=>{let n=new FileReader;n.readAsDataURL(e),n.onload=()=>t(n.result),n.onerror=a=>o(a)}),"toBase64"),to=r(async e=>await Promise.all(e.map(async o=>{let n=await eo(o);return{name:o.name,content:n.split(",")[1]}})),"convertFilesToBase64"),oo=r((e,t)=>{if(!t)return null;for(let o of e)if(o.size>t){let n=Math.round(t/1048576),a=Math.round(o.size/(1024*1024));return`File "${o.name}" exceeds maximum size of ${n}MB (file is ${a}MB)`}return null},"validateFileSize");function it({name:e,description:t,label:o,multiple:n,onChange:a,component:c,accept:d,maxSize:F,...f}){let{components:u}=S(),{control:s,setError:i,clearErrors:m}=b(),l=r(async(g,p)=>{let h=g.target.files?Array.from(g.target.files):[],x=oo(h,F);if(x){i(e,{message:x});return}m(e);let C=await to(h);p.onChange(C),a?.(C)},"handleOnChange");return U(k,{control:s,name:e,render:({field:g,fieldState:p})=>{let h=c||u?.file;if(h){let x={name:e,description:t,label:o,multiple:n,accept:d,maxFileSize:F,...f};return U(h,{field:{...g,value:null,onChange:r(async C=>l(C,g),"onChange")},fieldState:p,fieldData:x})}return ro(w,{"data-field":e,className:`RemoteFlows__FileUpload__Item__${e}`,children:[U(N,{className:"RemoteFlows__FileUpload__Label",children:o}),U(R,{children:U(lt,{onChange:x=>l(x,g),multiple:n,className:y("RemoteFlows__FileUpload__Input"),accept:d})}),t&&U("div",{className:"flex items-center justify-between",children:U(P,{className:"RemoteFlows__FileUpload__Description",children:t})}),p.error&&U(D,{className:"RemoteFlows__FileUpload__Error"})]})}})}r(it,"FileUploadField");import{jsx as Re}from"react/jsx-runtime";function pe(e){let{components:t}=S(),{control:o}=b(),n=e.component||t?.number;return n?Re(k,{control:o,name:e.name,render:({field:a,fieldState:c})=>Re(n,{field:{...a,onChange:r(d=>{a.onChange(d),e.onChange?.(d)},"onChange")},fieldState:c,fieldData:e})}):Re(A,{...e,type:"text",inputMode:"decimal",pattern:"^[0-9.]*$"})}r(pe,"NumberField");import{Fragment as no}from"react";import{jsx as W,jsxs as Pe}from"react/jsx-runtime";function mt({name:e,defaultValue:t,description:o,label:n,options:a,onChange:c,component:d,...F}){let{components:f}=S(),{control:u}=b();return W(k,{control:u,name:e,defaultValue:t,render:({field:s,fieldState:i})=>{let m=d||f?.radio;if(m){let l={name:e,defaultValue:t,description:o,label:n,options:a,...F};return W(m,{field:{...s,onChange:r(g=>{s.onChange(g),c?.(g)},"onChange")},fieldState:i,fieldData:l})}return Pe(w,{className:y("space-y-3",`RemoteFlows__RadioGroupField__Item__${e}`),"data-field":e,children:[W(N,{children:n}),W(R,{children:W(Ge,{"aria-label":n||e,onValueChange:l=>{s.onChange(l),c?.(l)},value:s.value,className:"flex flex-col space-y-3",children:a?.map(l=>W(no,{children:Pe(w,{"data-field":e,className:"flex items-start space-x-3 space-y-0 gap-0 RemoteFlows__RadioField__Item",children:[W(R,{children:W(Je,{value:l.value,className:"RemoteFlows__RadioField__Input",disabled:l.disabled})}),Pe("div",{children:[W(N,{className:"font-normal mb-0 RemoteFlows__RadioField__Label",children:l.label}),l.description&&W(P,{className:"mt-2",children:l.description})]})]})},l.value))})}),o&&W(P,{children:o}),i.error&&W(D,{})]})}})}r(mt,"RadioGroupField");import{jsx as E,jsxs as dt}from"react/jsx-runtime";function ct({label:e,name:t,options:o,defaultValue:n,description:a,onChange:c,component:d,...F}){let{control:f}=b(),{components:u}=S();return E(k,{defaultValue:n,control:f,name:t,render:({field:s,fieldState:i})=>{let m=d||u?.select;if(m){let l={label:e,name:t,options:o,defaultValue:n,description:a,onChange:c,...F};return E(m,{field:{...s,onChange:r(g=>{let p=F.jsonType==="number"?Number(g):g;s.onChange(p),c?.(p)},"onChange")},fieldState:i,fieldData:l})}return dt(w,{"data-field":t,className:`RemoteFlows__SelectField__Item__${t}`,children:[E(N,{className:"RemoteFlows__SelectField__Label",children:e}),E(R,{children:E("div",{className:"relative",children:dt(qe,{value:s.value||"",onValueChange:l=>{let g=F.jsonType==="number"?Number(l):l;s.onChange(g),c?.(g)},children:[E(Ye,{className:"RemoteFlows__SelectField__Trigger","aria-invalid":!!i.error,"aria-label":e,children:E("span",{className:"absolute",children:E(Ke,{placeholder:e})})}),E(Ze,{className:"RemoteFlows__SelectField__Content",children:E(je,{className:"RemoteFlows__SelectField__Group",children:o.map(l=>E(Xe,{value:l.value,className:"RemoteFlows__SelectField__SelectItem",disabled:l.disabled,children:l.label},l.value))})})]})})}),a&&E(P,{children:a}),i.error&&E(D,{})]})}})}r(ct,"SelectField");import{useState as co}from"react";import{Fragment as ao,useState as so}from"react";import{Check as lo,ChevronDownIcon as io,X as mo}from"lucide-react";import{Command as K}from"cmdk";import{SearchIcon as sn}from"lucide-react";import{jsx as Y,jsxs as cn}from"react/jsx-runtime";function ut({className:e,...t}){return Y(K,{"data-slot":"command",className:y("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}r(ut,"Command");function pt({className:e,...t}){return Y(K.List,{"data-slot":"command-list",className:y("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}r(pt,"CommandList");function ft({...e}){return Y(K.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}r(ft,"CommandEmpty");function Ft({className:e,...t}){return Y(K.Group,{"data-slot":"command-group",className:y("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}r(Ft,"CommandGroup");function gt({className:e,...t}){return Y(K.Separator,{"data-slot":"command-separator",className:y("bg-border -mx-1 h-px",e),...t})}r(gt,"CommandSeparator");function ht({className:e,...t}){return Y(K.Item,{"data-slot":"command-item",className:y("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}r(ht,"CommandItem");import{jsx as L,jsxs as Z}from"react/jsx-runtime";function fe({options:e,selected:t,onChange:o,placeholder:n,...a}){let[c,d]=so(!1),F=r(s=>{o(t.filter(i=>i.value!==s.value))},"handleUnselect"),f=e.some(s=>s.category),u=e.reduce((s,i)=>{let m=i.category||"Uncategorized";return s[m]||(s[m]=[]),s[m].push(i),s},{});return Z(me,{open:c,onOpenChange:d,...a,children:[L(de,{children:Z(I,{variant:"outline",role:"combobox","aria-expanded":c,className:"w-full justify-between font-normal",type:"button",children:[L("div",{className:"flex gap-1 flex-wrap overflow-x-auto max-h-[2.5rem] items-center",children:t.length>0?t.map(s=>Z(Qe,{variant:"secondary",className:"mr-1 mb-1",children:[s.label,L("div",{role:"button",tabIndex:0,"aria-label":`remove ${s.label}`,className:"ml-1 ring-offset-background rounded-full outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 cursor-pointer",onKeyDown:i=>{i.key==="Enter"&&F(s)},onMouseDown:i=>{i.preventDefault(),i.stopPropagation()},onClick:()=>F(s),children:L(mo,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},s.label)):L("span",{className:"text-foreground",children:n})}),L(io,{className:"size-4"})]})}),L(ce,{align:"start",className:"w-full p-0",children:L(ut,{children:Z(pt,{children:[L(ft,{children:"No item found."}),Object.entries(u).map(([s,i],m)=>Z(ao,{children:[m>0&&L(gt,{}),L(Ft,{heading:f?s:void 0,children:i.map(l=>{let g=t.some(p=>p.value===l.value);return Z(ht,{onSelect:()=>{o(g?t.filter(p=>p.value!==l.value):[...t,l])},children:[L(lo,{className:y("mr-2 h-4 w-4",g?"opacity-100":"opacity-0")}),l.label]},l.label)})})]},s))]})})})]})}r(fe,"MultiSelect");import{jsx as G,jsxs as uo}from"react/jsx-runtime";function _t({label:e,name:t,options:o,defaultValue:n,description:a,onChange:c,$meta:d,component:F,...f}){let{control:u}=b(),{components:s}=S(),[i,m]=co([]);return G(k,{defaultValue:n,control:u,name:t,render:({field:l,fieldState:g})=>{let p=F||s?.countries;if(p){let C={label:e,name:t,options:o,defaultValue:n,description:a,onChange:c,$meta:d,...f};return G(p,{field:{...l,onChange:r(T=>{l.onChange(T),c?.(T)},"onChange")},fieldState:g,fieldData:C})}let h=[...Object.entries(d?.regions||{}).map(([C,T])=>({value:T,label:C,category:"Regions"})),...Object.entries(d?.subregions||{}).map(([C,T])=>({value:T,label:C,category:"Subregions"})),...o.map(C=>({...C,value:C.value,label:C.label,category:"Countries"}))],x=r(C=>{let T=C.map(({value:j})=>j);l.onChange(T),c?.(T),m(C)},"handleChange");return uo(w,{"data-field":t,className:`RemoteFlows__CountryField__Item__${t}`,children:[G(N,{className:"RemoteFlows__CountryField__Label",children:e}),G(R,{children:G(fe,{options:h,selected:i,onChange:x,...f})}),a&&G(P,{children:a}),g.error&&G(D,{})]})}})}r(_t,"CountryField");import*as yt from"react";import{jsx as po}from"react/jsx-runtime";var De=yt.forwardRef(({className:e,...t},o)=>po("textarea",{className:y("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:o,...t}));De.displayName="Textarea";import{jsx as J,jsxs as Te}from"react/jsx-runtime";function vt({name:e,description:t,label:o,onChange:n,maxLength:a,component:c,...d}){let{components:F}=S(),{control:f}=b();return J(k,{control:f,name:e,render:({field:u,fieldState:s})=>{let i=c||F?.textarea;if(i){let l={name:e,description:t,label:o,maxLength:a,...d};return J(i,{field:{...u,onChange:r(g=>{u.onChange(g),n?.(g)},"onChange")},fieldState:s,fieldData:l})}let m=u.value?.length??0;return Te(w,{"data-field":e,className:`RemoteFlows__TextArea__Item__${e}`,children:[J(N,{className:"RemoteFlows__TextArea__Label",children:o}),J(R,{children:J(De,{...u,value:u.value??"",onChange:l=>{u.onChange(l),n?.(l)},className:y(s.error&&"border-red-500 focus-visible:ring-red-500","RemoteFlows__TextArea__Input"),placeholder:o})}),(t||a)&&Te("div",{className:"flex items-center justify-between",children:[t&&J(P,{className:"RemoteFlows__TextArea__Description",children:t}),a&&Te("span",{className:"text-sm ml-auto RemoteFlows__TextArea__MaxLength",children:[m,"/",a]})]}),s.error&&J(D,{className:"RemoteFlows__TextArea__Error"})]})}})}r(vt,"TextAreaField");import{jsx as $e}from"react/jsx-runtime";function Ct(e){let{components:t}=S(),{control:o}=b(),n=e.component||t?.email;return n?$e(k,{control:o,name:e.name,render:({field:a,fieldState:c})=>$e(n,{field:{...a,onChange:r(d=>{a.onChange(d),e.onChange?.(d)},"onChange")},fieldState:c,fieldData:e})}):$e(A,{...e,type:"email"})}r(Ct,"EmailField");import{jsx as xt}from"react/jsx-runtime";function bt(e){let{control:t}=b();return xt(k,{control:t,name:e.name,render:({field:o})=>xt("input",{...o,type:"hidden"})})}r(bt,"HiddenField");import vo,{useEffect as Co,useState as $t}from"react";var St=r((e,t,o)=>{if(e&&"reportValidity"in e){let n=ne(o,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},"r"),Ie=r((e,t)=>{for(let o in t.fields){let n=t.fields[o];n&&n.ref&&"reportValidity"in n.ref?St(n.ref,o,e):n&&n.refs&&n.refs.forEach(a=>St(a,o,e))}},"o"),Nt=r((e,t)=>{t.shouldUseNativeValidation&&Ie(e,t);let o={};for(let n in e){let a=ne(t.fields,n),c=Object.assign(e[n]||{},{ref:a&&a.ref});if(fo(t.names||Object.keys(e),n)){let d=Object.assign({},ne(o,n));ae(d,"root",c),ae(o,n,d)}else ae(o,n,c)}return o},"s"),fo=r((e,t)=>{let o=kt(t);return e.some(n=>kt(n).match(`^${o}\\.\\d+`))},"i");function kt(e){return e.replace(/\]|\[/g,"")}r(kt,"n");function wt(e,t,o){return t===void 0&&(t={}),o===void 0&&(o={}),function(n,a,c){try{return Promise.resolve(function(d,F){try{var f=(t.context&&process.env.NODE_ENV==="development"&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(e[o.mode==="sync"?"validateSync":"validate"](n,Object.assign({abortEarly:!1},t,{context:a}))).then(function(u){return c.shouldUseNativeValidation&&Ie({},c),{values:o.raw?Object.assign({},n):u,errors:{}}}))}catch(u){return F(u)}return f&&f.then?f.then(void 0,F):f}(0,function(d){if(!d.inner)throw d;return{values:{},errors:Nt((F=d,f=!c.shouldUseNativeValidation&&c.criteriaMode==="all",(F.inner||[]).reduce(function(u,s){if(u[s.path]||(u[s.path]={message:s.message,type:s.type}),f){var i=u[s.path].types,m=i&&i[s.type];u[s.path]=Ae(s.path,f,u,s.type,m?[].concat(m,s.message):s.message)}return u},{})),c)};var F,f}))}catch(d){return Promise.reject(d)}}}r(wt,"o");import*as $ from"yup";import Rt from"lodash.groupby";import X from"lodash.capitalize";var Pt=60,Fe=["monday","tuesday","wednesday","thursday","friday","saturday","sunday"];function Fo(e){if(e<60)return`${e}m`;let t=Math.floor(e/Pt),o=e%Pt;return o>0?`${t}h${o}m`:`${t}h`}r(Fo,"convertBreakDurationToHours");function Dt(e){let t=e.reduce((o,n)=>n.hours+o,0);return Number(t.toFixed(2))}r(Dt,"calculateTotalWorkHours");function go(e,t){let o=t.map(({day:c})=>c.toLowerCase()),n=o.indexOf(e),a=null;for(;n<o.length&&!a;){let c=o[n],d=o[n+1],F=Fe.indexOf(c)+1;Fe[F]===d||(a=c),n+=1}return a}r(go,"findLastConsecutiveDay");function ho(e){return e.start_time&&e.end_time&&(typeof e.hours=="number"?e.hours:Number.parseInt(e.hours))>0}r(ho,"shouldSummarizeSchedule");function _o(e){return Number.parseInt(e.break_duration_minutes)>0}r(_o,"shouldSummarizeBreaks");function Tt(e){let t=e.filter(ho),o=Rt(t,F=>`${F.start_time}|${F.end_time}`),n=e.filter(_o),a=Rt(n,"break_duration_minutes"),c=Object.keys(o).map(F=>{let f=o[F],u=f[0].day,[s,i]=F.split("|"),m=`from <span>${s.replace(":","h")}</span> to <span>${i.replace(":","h")}</span>`,l=go(u,f),p=(l?f.findIndex(h=>h.day===l):-1)===f.length-1;return f.length===1?`${X(u)}, ${m}`:!p||!l?f.reduce((h,x,C)=>{let T=X(x.day);return C===f.length-1?`${h}and ${T}, ${m}`:`${h}<span>${T}</span>, `},""):`<span>${X(u)}</span> to <span>${X(l)}</span>, ${m}`}),d=Object.keys(a).reverse().map((F,f)=>{let u=f===0,s=a[F],i=Fo(parseInt(F,10));if(Object.keys(a).length===1)return`With ${i} daily breaks`;if(s.length===1){let m=`${i} break on ${X(s[0].day)}.`;return u?`With ${m}`:m}return s.reduce((m,l,g)=>{let p=X(l.day);return g===0?`${m} ${p}`:g===s.length-1?`${m}, and ${p}.`:`${m}, ${p}`},u?`With ${i} break on`:`${i} break on`)});return{workHoursSummary:c,breakSummary:d}}r(Tt,"buildWorkScheduleSummary");function Me(e){let{checked:t,start_time:o,end_time:n,break_duration_minutes:a}=e;if(!t)return 0;let[c,d]=o.split(":").map(Number),[F,f]=n.split(":").map(Number),u=c*60+d,m=(F*60+f-u-Number.parseInt(a||"0"))/60;return m===Math.floor(m)?m:Number(m.toFixed(2))}r(Me,"calculateHours");var yo={monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat",sunday:"Sun"};function ge(e){return yo[e]}r(ge,"getShortWeekday");import{jsx as v,jsxs as B}from"react/jsx-runtime";var xo=$.object({day:$.string().required(),checked:$.boolean().required(),start_time:$.string().matches(/^([01]\d|2[0-3]):([0-5]\d)$/,"Invalid time format (HH:mm)").when("checked",{is:!0,then:r(e=>e.required("Required"),"then"),otherwise:r(e=>e.optional().nullable(),"otherwise")}),end_time:$.string().matches(/^([01]\d|2[0-3]):([0-5]\d)$/,"Invalid time format (HH:mm)").when("checked",{is:!0,then:r(e=>e.required("Required"),"then"),otherwise:r(e=>e.optional().nullable(),"otherwise")}),hours:$.number().default(0),break_duration_minutes:$.string().default("0")}),bo=$.object({schedule:$.array(xo)});function So({defaultSchedule:e,onSubmit:t}){let[o,n]=$t(!1),a=Fe.map(p=>{let h=e.find(x=>x.day.toLowerCase()===ge(p).toLowerCase()||x.day.toLowerCase()===p.toLowerCase());return h?{...h,day:ge(p),checked:!0}:{...e[0],checked:!1,day:ge(p)}}),c=ze({defaultValues:{schedule:a},resolver:wt(bo)}),{handleSubmit:d,watch:F,reset:f,control:u,formState:s}=c,{fields:i}=Oe({name:"schedule",control:u}),m=F("schedule");function l(p){let h=p.schedule.filter(({checked:x})=>x).map(x=>({...x,hours:Me(x)}));t(h),n(!1)}r(l,"handleSubmitWorkingHours");function g(){f(),n(!1)}return r(g,"handleCancel"),v("div",{className:"flex items-center justify-between",children:B(xe,{open:o,onOpenChange:n,children:[v(et,{asChild:!0,children:v(I,{variant:"link",className:"flex items-center p-0 RemoteFlows__WorkScheduleSelectionForm__Trigger",children:"Edit Schedule"})}),B(be,{className:"max-w-5xl max-h-[90vh] overflow-y-auto px-8 py-4 RemoteFlows__WorkScheduleSelectionForm__Content",children:[v(Se,{children:v(ke,{className:"RemoteFlows__WorkScheduleSelectionForm__Title",children:"Edit employee working hours"})}),v(Ue,{...c,children:B("form",{className:"space-y-4 RemoteFlows__WorkScheduleSelectionForm__Form",children:[B("div",{className:"rounded-lg",children:[v("p",{className:"text-gray-600 text-sm mb-4 RemoteFlows__WorkScheduleSelectionForm__Description",children:"The times displayed are in the employee's time zone in the 24-hour format."}),B("div",{className:"grid grid-cols-12 gap-4 text-sm font-medium text-gray-500 uppercase tracking-wide RemoteFlows__WorkScheduleSelectionForm__Header",children:[v("div",{className:"col-span-2"}),v("div",{className:"col-span-3 text-center",children:"START"}),v("div",{className:"col-span-1 text-center"}),v("div",{className:"col-span-3 text-center",children:"END"}),v("div",{className:"col-span-2 text-center",children:"HOURS"})]}),v("div",{className:"RemoteFlows__WorkScheduleSelectionForm__Rows",children:i.map((p,h)=>{let x=m[h],C=Me(x);return B(vo.Fragment,{children:[B("div",{className:"grid grid-cols-12 gap-4 items-center py-2 RemoteFlows__WorkScheduleSelectionForm__Row-Hours",children:[v("div",{className:"col-span-2 flex items-center gap-3",children:v(le,{label:p.day,name:`schedule.${h}.checked`})}),v("div",{className:"col-span-3",children:v(A,{name:`schedule.${h}.start_time`,includeErrorMessage:!1})}),v("div",{className:"col-span-1 text-center text-gray-500",children:"to"}),v("div",{className:"col-span-3",children:v(A,{name:`schedule.${h}.end_time`,includeErrorMessage:!1})}),v("div",{className:"col-span-2 text-center text-gray-600",children:isNaN(C)?"-":`${C} hours`})]}),B("div",{className:"grid grid-cols-12 gap-4 items-center py-2 RemoteFlows__WorkScheduleSelectionForm__Row-Break",children:[v("div",{className:"col-span-2 text-gray-500",children:"Break"}),v("div",{className:"col-span-2",children:v(A,{name:`schedule.${h}.break_duration_minutes`,includeErrorMessage:!1})}),v("div",{className:"col-span-2 text-gray-500",children:"minutes"}),v("div",{className:"col-span-4"})]})]},p.id)})})]}),Object.keys(s.errors).length>0&&v("p",{className:"text-destructive text-sm mb-0",children:"Invalid time format (HH:mm)"}),B("div",{className:"flex gap-4 pt-4",children:[v(I,{type:"button",className:"reset-button",variant:"outline",onClick:g,children:"Cancel"}),v(I,{type:"button",className:"submit-button",onClick:d(l),children:"Save Schedule"})]})]})})]})]})})}r(So,"WorkScheduleSelectionForm");function It(e){let{components:t}=S(),{setValue:o,control:n,watch:a}=b(),c=a(e.name),[d,F]=$t(c),{workHoursSummary:f,breakSummary:u}=Tt(d),s=Dt(d);Co(()=>{o(e.name,d)},[d,e.name,o]);function i(l){F(l)}r(i,"onSubmit");let m=e.component||t?.["work-schedule"];return m?v(k,{control:n,name:e.name,render:({field:l,fieldState:g})=>v(m,{field:{...l,onChange:r(p=>{l.onChange(p),e.onChange?.(p)},"onChange")},fieldState:g,fieldData:{...e,defaultFormattedValue:{workHoursSummary:f,breakSummary:u,totalWorkHours:s}}})}):B("div",{className:"flex flex-col gap-3 RemoteFlows__WorkScheduleField",children:[v("p",{className:"text-sm RemoteFlows__WorkScheduleField__Title",children:"Work hours"}),B("div",{className:"flex flex-col gap-1 RemoteFlows__WorkScheduleField__Summary",children:[v("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__WorkHours",dangerouslySetInnerHTML:{__html:f.join(", ")}}),v("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__Break",children:u.join()}),B("p",{className:"text-sm text-gray-500 RemoteFlows__WorkScheduleField__Summary__Total",children:["Total of ",v("span",{children:s})," hours per week"]}),v(So,{defaultSchedule:d,onSubmit:i})]})]})}r(It,"WorkScheduleField");import{useState as ko}from"react";import{jsx as q,jsxs as No}from"react/jsx-runtime";function Mt({label:e,name:t,options:o,defaultValue:n,description:a,onChange:c,component:d,...F}){let{control:f}=b(),{components:u}=S(),[s,i]=ko();return q(k,{defaultValue:n,control:f,name:t,render:({field:m,fieldState:l})=>{let g=d||u?.["multi-select"];if(g){let h={label:e,name:t,options:o,defaultValue:n,description:a,onChange:c,...F};return q(g,{field:{...m,onChange:r(x=>{m.onChange(x),c?.(x)},"onChange")},fieldState:l,fieldData:h})}let p=s||o.filter(h=>m.value.includes(h.value));return No(w,{"data-field":t,className:`RemoteFlows__SelectField__Item__${t}`,children:[q(N,{className:"RemoteFlows__SelectField__Label",children:e}),q(R,{children:q(fe,{options:o,selected:p,onChange:h=>{let x=h.map(({value:C})=>C);m.onChange(x),c?.(x),i(h)},...F})}),a&&q(P,{children:a}),l.error&&q(D,{})]})}})}r(Mt,"MultiSelectField");import{jsx as wo}from"react/jsx-runtime";var Et=r(e=>wo(pe,{maxLength:15,...e}),"MoneyField");var Ee={checkbox:le,text:A,email:Ct,money:Et,select:ct,"multi-select":Mt,radio:mt,number:pe,file:it,date:st,textarea:vt,countries:_t,hidden:bt,"work-schedule":It};import{AlertCircle as Ro}from"lucide-react";import{jsx as he,jsxs as Po}from"react/jsx-runtime";function Wt({title:e,description:t,severity:o}){let{components:n}=S();if(n?.statement){let a=n?.statement;return he(a,{data:{title:e,description:oe(t),severity:o}})}return Po(tt,{variant:"warning",children:[he(Ro,{className:"h-4 w-4"}),e&&he(ot,{children:e}),t&&he(rt,{dangerouslySetInnerHTML:{__html:oe(t)}})]})}r(Wt,"Statement");import{Fragment as Io,jsx as H,jsxs as Q}from"react/jsx-runtime";var $o=r(({isExpanded:e,onToggle:t,className:o,...n})=>H(I,{type:"button",className:y("RemoteFlows__Button RemoteFlows__FieldSetField__ToggleButton",o),variant:"default",onClick:t,...n,children:e?"Remove":"Define"}),"DefaultToggleButton");function Bt({label:e,name:t,fields:o,description:n,components:a,statement:c,isFlatFieldset:d,extra:F,variant:f="outset",features:u,meta:s}){let{helpCenter:i}=s||{},{watch:m,setValue:l,trigger:g,formState:p}=b(),{components:h}=S(),x=u?.toggle?.stateField,C=x?m(x):u?.toggle?.defaultExpanded??!0,T=o.map(({name:_})=>`${t}.${_}`),j=m(T),We=Lt(j),ee=Lt(null),Ht=r(()=>{x&&l(x,!C)},"toggleExpanded");To(()=>{let _=j,re=We.current,_e=p.isSubmitted||p.submitCount>0,He=!1;for(let te=0;te<_.length;te++)if(_[te]!==void 0&&re[te]!==_[te]){He=!0;break}return He&&_e&&(ee.current&&clearTimeout(ee.current),ee.current=setTimeout(()=>{g()},50)),We.current=[..._],()=>{ee.current&&clearTimeout(ee.current)}},[j,g,p.isSubmitted,p.submitCount]);let At=h?.fieldsetToggle||$o,Le=`${t}-content`,Be=`${t}-header`;return Q("fieldset",{className:y("border-1 border-input p-4 rounded-xl","RemoteFlows__FieldSetField",`RemoteFlows__FieldSetField__${t}`),children:[H("legend",{className:y("text-sm font-semibold px-2",f==="inset"&&"hidden"),children:e}),i?.callToAction&&i?.id&&f==="outset"&&H(ye,{className:"RemoteFlows__FieldSetField__HelpCenterLink mb-3",zendeskId:i.id,children:i.callToAction}),f==="inset"&&Q(Io,{children:[Q("div",{className:"RemoteFlows__FieldSetField__Header",id:Be,"data-state":C?"expanded":"collapsed","aria-expanded":C,children:[H("h3",{className:y("RemoteFlows__FieldSetField__Title"),children:e}),u?.toggle?.enabled&&H(At,{isExpanded:C,onToggle:Ht,"aria-expanded":C,"aria-controls":Le,"aria-label":`${C?"Hide":"Show"} ${e}`,className:y("RemoteFlows__FieldSetField__Toggle",u.toggle?.className),children:C?u.toggle.labels?.collapse??"Remove":u.toggle.labels?.expand??"Define"})]}),i?.callToAction&&i?.id&&H(ye,{className:"RemoteFlows__FieldSetField__HelpCenterLink mb-3",zendeskId:i.id,children:i.callToAction})]}),C&&Q("div",{id:Le,"aria-labelledby":Be,role:"region",children:[n?H("div",{className:"mb-5 RemoteFlows__FieldSetField__Description",dangerouslySetInnerHTML:{__html:oe(n)}}):null,Q("div",{className:"grid gap-4",children:[o.map(_=>{if(_.calculateDynamicProperties&&(_={..._,..._.calculateDynamicProperties(j,_)||{}}),_.isVisible===!1||_.deprecated)return null;if(_.Component){let{Component:_e}=_;return H(_e,{..._},_.name)}if(_.type==="fieldset")return H(Bt,{..._,name:`${d?_.name:`${t}.${_.name}`}`,components:a},`${d?_.name:`${t}.${_.name}`}`);if(_.type==="fieldset-flat")return H(Bt,{..._,name:`${d?_.name:`${t}.${_.name}`}`,components:a,isFlatFieldset:!0},`${d?_.name:`${t}.${_.name}`}`);let re=Ee[_.type];return _.type==="select"&&_.multiple&&(re=Ee["multi-select"]),Q(Do,{children:[H(re,{..._,name:`${d?_.name:`${t}.${_.name}`}`,component:a?.[_.type]}),_.extra?_.extra:null]},`${d?_.name:`${t}.${_.name}`}`)}),F||null,c?H(Wt,{...c}):null]})]})]})}r(Bt,"FieldSetField");export{Ee as a,Wt as b,Bt as c};
|
|
2
|
+
//# sourceMappingURL=chunk-DB7ITLRX.js.map
|