@mercoa/react 0.0.39-rc3 → 0.0.39-rc4
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/components/Card.d.ts +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -205,5 +205,5 @@ License: MIT
|
|
|
205
205
|
${o==="right"?"mercoa-text-right":""}
|
|
206
206
|
${o==="center"?"mercoa-text-center":""}
|
|
207
207
|
mercoa-ring-inset mercoa-ring-gray-300 mercoa-border-0 mercoa-outline-0
|
|
208
|
-
focus:mercoa-ring-1 focus:mercoa-ring-mercoa-primary focus:mercoa-border-0 focus:mercoa-outline-0 mercoa-overflow-hidden`}function da({label:e,name:r}){return l.jsx("div",{className:"mercoa-flex mercoa-justify-between",children:l.jsx("label",{htmlFor:r,className:"mercoa-block mercoa-text-sm mercoa-font-medium mercoa-leading-6 mercoa-text-gray-900 mercoa-whitespace-nowrap",children:e})})}function Le({type:e,label:r,onChange:t,onBlur:n,required:o,readOnly:a,ref:i,register:s,control:c,disabled:d,placeholder:f,optional:p,name:m,className:y,leadingIcon:h,trailingIcon:v,errors:g,dateOptions:_,min:P,max:x,step:U,noBorder:M,inputMask:z}){var R,N,I;const D=A=>{const[Q,W]=b.useState(0);return b.useLayoutEffect(()=>{var Z,ne;W(((ne=(Z=A==null?void 0:A.current)==null?void 0:Z.getBoundingClientRect())==null?void 0:ne.width)??0)},[A]),jN(A,Z=>W(Z.contentRect.width)),Q},S=b.useRef(null),E=D(S),C=ot({leadingIcon:!!h,trailingIcon:!!v,noBorder:!!M,leadingIconSize:E<10?"sm":"md"});let j={type:e,placeholder:f,disabled:d,name:m,onChange:t,onBlur:n,readOnly:a,required:o,ref:i,className:C,min:P,max:x,step:U};s&&m&&(j={...j,...s(m,{setValueAs:A=>A!=null&&A.trim?A.trim():A})});let F=l.jsx("input",{...j});e==="date"&&c&&m?F=l.jsx(Zu,{control:c,name:m,render:({field:A})=>l.jsx(fx,{className:C,placeholderText:f,onChange:Q=>A.onChange(Q),selected:A.value,minDate:_==null?void 0:_.minDate,maxDate:_==null?void 0:_.maxDate,filterDate:_==null?void 0:_.filterDate,readOnly:a,required:o})}):z&&c&&m?F=l.jsx(Zu,{control:c,name:m,render:({field:{onChange:A,name:Q,value:W}})=>l.jsx(ej,{format:z,allowEmptyFormatting:!0,mask:"_",name:Q,value:W,onChange:A,placeholder:f,className:C})}):e==="currency"&&c&&m?F=l.jsx(Zu,{control:c,name:m,render:({field:{onChange:A,name:Q,value:W}})=>l.jsx(vde,{decimalScale:2,fixedDecimalScale:!0,name:Q,value:W,onChange:A,placeholder:f,className:C})}):e==="currency"&&(e="text");const V=l.jsxs("div",{className:"mercoa-relative",children:[h&&l.jsx("div",{className:"mercoa-pointer-events-none mercoa-absolute mercoa-inset-y-0 mercoa-left-0 mercoa-flex mercoa-items-center mercoa-pl-2",ref:S,children:h}),F,v&&l.jsx("div",{className:"mercoa-absolute mercoa-inset-y-0 mercoa-right-0 mercoa-flex mercoa-items-center",children:v})]});return r?l.jsxs("div",{className:y,children:[l.jsx(da,{label:r,name:m}),l.jsx("div",{className:"mercoa-mt-1",children:V}),m&&((R=g==null?void 0:g[m])==null?void 0:R.message)&&l.jsx("p",{className:"mercoa-text-sm mercoa-text-red-500 mercoa-text-left",children:(I=(N=g==null?void 0:g[m])==null?void 0:N.message)==null?void 0:I.toString()})]}):y?l.jsx("div",{className:y,children:V}):V}function Sx({count:e,selected:r}){return l.jsxs("span",{className:`${r?"mercoa-bg-mercoa-primary mercoa-text-mercoa-primary-text-invert":"mercoa-bg-gray-100 mercoa-text-gray-800"} mercoa-inline-flex mercoa-items-center mercoa-rounded-full mercoa-px-2.5 mercoa-py-0.5 mercoa-text-xs mercoa-font-medium`,children:[" ",e]})}async function zge(e,r){const t=[];let n=!0;for(;n;){const o=await(e==null?void 0:e.entity.user.find(r,{limit:100,startingAfter:t.length>0?t[t.length-1].id:void 0}));o?(t.push(...o.data),n=o.hasMore):n=!1}return t}function Qe({componentName:e}){return l.jsxs("div",{className:"mercoa-text-red-700",children:["ERROR: The ",l.jsx("pre",{className:"mercoa-inline mercoa-text-red-900",children:e})," component needs to be wrapped in a ",l.jsx("pre",{className:"mercoa-inline mercoa-text-red-900",children:"MercoaSession"}),". See"," ",l.jsx("a",{href:"https://docs.mercoa.com/sdks/react#usage",target:"_blank",className:"mercoa-text-blue-300 mercoa-underline",children:"documentation"})," ","for more information."]})}pe.AcceptToSButton=EI,pe.AcceptTosForm=lj,pe.AccountTypeRadioBlock=Sde,pe.AccountTypeSelectBlock=yg,pe.AddBankAccount=wC,pe.AddBankAccountDialog=VO,pe.AddBankAccountForm=_C,pe.AddBankViaPlaidOrManual=KO,pe.AddCard=MC,pe.AddCheck=XO,pe.AddCheckDialog=PC,pe.AddCheckForm=SC,pe.AddCounterpartyModal=BC,pe.AddCustomPaymentMethod=ZC,pe.AddCustomPaymentMethodForm=kC,pe.AddDialog=Fc,pe.AddressBlock=fg,pe.ApprovalPolicies=qT,pe.BankAccount=js,pe.BankAccounts=gC,pe.BusinessTypeBlock=vI,pe.
|
|
208
|
+
focus:mercoa-ring-1 focus:mercoa-ring-mercoa-primary focus:mercoa-border-0 focus:mercoa-outline-0 mercoa-overflow-hidden`}function da({label:e,name:r}){return l.jsx("div",{className:"mercoa-flex mercoa-justify-between",children:l.jsx("label",{htmlFor:r,className:"mercoa-block mercoa-text-sm mercoa-font-medium mercoa-leading-6 mercoa-text-gray-900 mercoa-whitespace-nowrap",children:e})})}function Le({type:e,label:r,onChange:t,onBlur:n,required:o,readOnly:a,ref:i,register:s,control:c,disabled:d,placeholder:f,optional:p,name:m,className:y,leadingIcon:h,trailingIcon:v,errors:g,dateOptions:_,min:P,max:x,step:U,noBorder:M,inputMask:z}){var R,N,I;const D=A=>{const[Q,W]=b.useState(0);return b.useLayoutEffect(()=>{var Z,ne;W(((ne=(Z=A==null?void 0:A.current)==null?void 0:Z.getBoundingClientRect())==null?void 0:ne.width)??0)},[A]),jN(A,Z=>W(Z.contentRect.width)),Q},S=b.useRef(null),E=D(S),C=ot({leadingIcon:!!h,trailingIcon:!!v,noBorder:!!M,leadingIconSize:E<10?"sm":"md"});let j={type:e,placeholder:f,disabled:d,name:m,onChange:t,onBlur:n,readOnly:a,required:o,ref:i,className:C,min:P,max:x,step:U};s&&m&&(j={...j,...s(m,{setValueAs:A=>A!=null&&A.trim?A.trim():A})});let F=l.jsx("input",{...j});e==="date"&&c&&m?F=l.jsx(Zu,{control:c,name:m,render:({field:A})=>l.jsx(fx,{className:C,placeholderText:f,onChange:Q=>A.onChange(Q),selected:A.value,minDate:_==null?void 0:_.minDate,maxDate:_==null?void 0:_.maxDate,filterDate:_==null?void 0:_.filterDate,readOnly:a,required:o})}):z&&c&&m?F=l.jsx(Zu,{control:c,name:m,render:({field:{onChange:A,name:Q,value:W}})=>l.jsx(ej,{format:z,allowEmptyFormatting:!0,mask:"_",name:Q,value:W,onChange:A,placeholder:f,className:C})}):e==="currency"&&c&&m?F=l.jsx(Zu,{control:c,name:m,render:({field:{onChange:A,name:Q,value:W}})=>l.jsx(vde,{decimalScale:2,fixedDecimalScale:!0,name:Q,value:W,onChange:A,placeholder:f,className:C})}):e==="currency"&&(e="text");const V=l.jsxs("div",{className:"mercoa-relative",children:[h&&l.jsx("div",{className:"mercoa-pointer-events-none mercoa-absolute mercoa-inset-y-0 mercoa-left-0 mercoa-flex mercoa-items-center mercoa-pl-2",ref:S,children:h}),F,v&&l.jsx("div",{className:"mercoa-absolute mercoa-inset-y-0 mercoa-right-0 mercoa-flex mercoa-items-center",children:v})]});return r?l.jsxs("div",{className:y,children:[l.jsx(da,{label:r,name:m}),l.jsx("div",{className:"mercoa-mt-1",children:V}),m&&((R=g==null?void 0:g[m])==null?void 0:R.message)&&l.jsx("p",{className:"mercoa-text-sm mercoa-text-red-500 mercoa-text-left",children:(I=(N=g==null?void 0:g[m])==null?void 0:N.message)==null?void 0:I.toString()})]}):y?l.jsx("div",{className:y,children:V}):V}function Sx({count:e,selected:r}){return l.jsxs("span",{className:`${r?"mercoa-bg-mercoa-primary mercoa-text-mercoa-primary-text-invert":"mercoa-bg-gray-100 mercoa-text-gray-800"} mercoa-inline-flex mercoa-items-center mercoa-rounded-full mercoa-px-2.5 mercoa-py-0.5 mercoa-text-xs mercoa-font-medium`,children:[" ",e]})}async function zge(e,r){const t=[];let n=!0;for(;n;){const o=await(e==null?void 0:e.entity.user.find(r,{limit:100,startingAfter:t.length>0?t[t.length-1].id:void 0}));o?(t.push(...o.data),n=o.hasMore):n=!1}return t}function Qe({componentName:e}){return l.jsxs("div",{className:"mercoa-text-red-700",children:["ERROR: The ",l.jsx("pre",{className:"mercoa-inline mercoa-text-red-900",children:e})," component needs to be wrapped in a ",l.jsx("pre",{className:"mercoa-inline mercoa-text-red-900",children:"MercoaSession"}),". See"," ",l.jsx("a",{href:"https://docs.mercoa.com/sdks/react#usage",target:"_blank",className:"mercoa-text-blue-300 mercoa-underline",children:"documentation"})," ","for more information."]})}pe.AcceptToSButton=EI,pe.AcceptTosForm=lj,pe.AccountTypeRadioBlock=Sde,pe.AccountTypeSelectBlock=yg,pe.AddBankAccount=wC,pe.AddBankAccountDialog=VO,pe.AddBankAccountForm=_C,pe.AddBankViaPlaidOrManual=KO,pe.AddCard=MC,pe.AddCheck=XO,pe.AddCheckDialog=PC,pe.AddCheckForm=SC,pe.AddCounterpartyModal=BC,pe.AddCustomPaymentMethod=ZC,pe.AddCustomPaymentMethodForm=kC,pe.AddDialog=Fc,pe.AddressBlock=fg,pe.ApprovalPolicies=qT,pe.BankAccount=js,pe.BankAccounts=gC,pe.BusinessTypeBlock=vI,pe.Card=up,pe.Cards=xC,pe.Check=cc,pe.CountPill=Sx,pe.Counterparties=RC,pe.CounterpartyDetails=VC,pe.CounterpartySearch=GO,pe.CustomPaymentMethod=QC,pe.CustomPaymentMethodComponent=fc,pe.DateOfBirthBlock=tj,pe.DebouncedSearch=hw,pe.DefaultPaymentMethodIndicator=Vp,pe.DescriptionBlock=xI,pe.DisbursementMethods=rI,pe.DoingBusinessAsBlock=sj,pe.EINBlock=wI,pe.EditBankAccount=OC,pe.EditPayableForm=$A,pe.EmailBlock=Ps,pe.EntityCreation=Ude,pe.EntityDetails=Jle,pe.EntityEmailLogs=aI,pe.EntityInboxEmail=oI,pe.EntityOnboarding=Tde,pe.EntityOnboardingButton=zde,pe.EntityOnboardingForm=wg,pe.EntityPortal=UI,pe.EntityStatus=Qle,pe.EntityUserNotificationTable=TI,pe.EntityUsersTable=Ade,pe.FormationDateBlock=PI,pe.InvoiceComments=CI,pe.InvoiceDocuments=NA,pe.InvoiceMetrics=xx,pe.InvoiceStatusPill=fw,pe.LegalBusinessNameBlock=bg,pe.LoadingSpinner=Ac,pe.LoadingSpinnerIcon=oo,pe.ManageExternalAccountingSystem=Fde,pe.MercoaButton=ze,pe.MercoaCombobox=Xn,pe.MercoaInput=Le,pe.MercoaInputLabel=da,pe.MercoaSession=RI,pe.MetadataSelection=dw,pe.NameBlock=dp,pe.NoSession=Qe,pe.PayableDetails=IA,pe.Payables=XA,pe.PayablesTable=KA,pe.PaymentMethodList=mw,pe.PaymentMethods=HA,pe.PhoneBlock=hg,pe.PlaidPopup=LO,pe.ReceivableDetails=jge,pe.Receivables=Mge,pe.RepresentativeComponent=uj,pe.RepresentativeOnboardingForm=SI,pe.Representatives=gg,pe.SSNBlock=oj,pe.SSNSchema=nj,pe.SelectPaymentMethod=Bp,pe.Skeleton=$c,pe.StatCard=yw,pe.StatusDropdown=pw,pe.StatusTabs=Mx,pe.Switch=Pge,pe.TableNavigation=Nc,pe.TableOrderHeader=Ic,pe.TokenVerification=Sge,pe.Tooltip=_t,pe.VerifyOwnersButton=cj,pe.WebsiteBlock=OI,pe.accountTypeSchema=aj,pe.addressBlockSchema=dg,pe.createOrUpdateEntity=vg,pe.dateOfBirthSchema=rj,pe.descriptionSchema=jI,pe.doingBusinessAsSchema=Ede,pe.einSchema=gI,pe.emailSchema=fp,pe.entityDetailsForMercoaPaymentsCompleted=zI,pe.filterApproverOptions=_x,pe.findCustomPaymentMethodAccountNameAndNumber=eI,pe.formationDateSchema=MI,pe.getAllUsers=zge,pe.inputClassName=ot,pe.isUpstreamPolicyAssigned=RA,pe.legalBusinessNameSchema=ij,pe.nameBlockSchema=pg,pe.phoneSchema=mg,pe.propagateApprovalPolicy=Ox,pe.stopPropagate=Px,pe.useDebounce=Ege,pe.useMercoaSession=Re,pe.websiteSchema=_I,Object.defineProperty(pe,Symbol.toStringTag,{value:"Module"})});
|
|
209
209
|
//# sourceMappingURL=index.umd.js.map
|