@justifi/webcomponents 4.19.0 → 4.19.1-rc
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/cjs/{Analytics-ff013cbc.js → Analytics-0b3db49d.js} +2 -2
- package/dist/cjs/{business.service-f63650f5.js → business.service-c384784d.js} +1 -1
- package/dist/cjs/{config-ff2dda66.js → config-037e67d0.js} +2 -2
- package/dist/cjs/{get-payout-csv-f3aee6d0.js → get-payout-csv-51a02be7.js} +1 -1
- package/dist/cjs/justifi-additional-questions-form-step_10.cjs.entry.js +2 -2
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +3 -3
- package/dist/cjs/justifi-business-details.cjs.entry.js +4 -4
- package/dist/cjs/justifi-business-form.cjs.entry.js +3 -3
- package/dist/cjs/justifi-card-form.cjs.entry.js +3 -3
- package/dist/cjs/justifi-checkout-core.cjs.entry.js +1 -1
- package/dist/cjs/justifi-checkout.cjs.entry.js +3 -3
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +3 -3
- package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +1 -1
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-details.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payment-form.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payments-list.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payout-details.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +4 -4
- package/dist/cjs/justifi-refund-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +3 -3
- package/dist/cjs/{package-cb0f8cb1.js → package-39dc73ed.js} +1 -1
- package/dist/cjs/{payment.service-0a64f9cd.js → payment.service-2dbfb83d.js} +1 -1
- package/dist/config.js +2 -2
- package/dist/docs.json +1 -1
- package/dist/esm/{Analytics-33b8fa8d.js → Analytics-37556050.js} +2 -2
- package/dist/esm/{business.service-74bd1212.js → business.service-eee46ab1.js} +1 -1
- package/dist/esm/{config-476c7241.js → config-58e393e2.js} +2 -2
- package/dist/esm/{get-payout-csv-b494abfe.js → get-payout-csv-4d6b29d8.js} +1 -1
- package/dist/esm/justifi-additional-questions-form-step_10.entry.js +2 -2
- package/dist/esm/justifi-bank-account-form.entry.js +3 -3
- package/dist/esm/justifi-business-details.entry.js +4 -4
- package/dist/esm/justifi-business-form.entry.js +3 -3
- package/dist/esm/justifi-card-form.entry.js +3 -3
- package/dist/esm/justifi-checkout-core.entry.js +1 -1
- package/dist/esm/justifi-checkout.entry.js +3 -3
- package/dist/esm/justifi-gross-payment-chart.entry.js +3 -3
- package/dist/esm/justifi-new-payment-method_4.entry.js +1 -1
- package/dist/esm/justifi-owner-form_3.entry.js +2 -2
- package/dist/esm/justifi-payment-details.entry.js +4 -4
- package/dist/esm/justifi-payment-form.entry.js +3 -3
- package/dist/esm/justifi-payment-method-form.entry.js +1 -1
- package/dist/esm/justifi-payment-provisioning.entry.js +4 -4
- package/dist/esm/justifi-payments-list.entry.js +4 -4
- package/dist/esm/justifi-payout-details.entry.js +4 -4
- package/dist/esm/justifi-payouts-list.entry.js +4 -4
- package/dist/esm/justifi-refund-form.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance.entry.js +3 -3
- package/dist/esm/{package-3e407c6d.js → package-e2a7aa3f.js} +1 -1
- package/dist/esm/{payment.service-3ca4a492.js → payment.service-9005a501.js} +1 -1
- package/dist/module/config.js +2 -2
- package/dist/module/package.js +1 -1
- package/dist/webcomponents/{p-bc92235c.entry.js → p-023779ee.entry.js} +1 -1
- package/dist/webcomponents/{p-27981600.entry.js → p-037763f4.entry.js} +1 -1
- package/dist/webcomponents/{p-d1fbeae5.entry.js → p-1f6afff9.entry.js} +1 -1
- package/dist/webcomponents/{p-8c1e981b.entry.js → p-246a6c6a.entry.js} +1 -1
- package/dist/webcomponents/{p-195f92e9.entry.js → p-2d3b1692.entry.js} +1 -1
- package/dist/webcomponents/{p-63acf322.js → p-32286934.js} +1 -1
- package/dist/webcomponents/{p-8603348a.js → p-3f5e7e86.js} +1 -1
- package/dist/webcomponents/p-57e1f2fd.js +1 -0
- package/dist/webcomponents/{p-c4b87db2.entry.js → p-5f095525.entry.js} +1 -1
- package/dist/webcomponents/{p-60a370fc.entry.js → p-69faef3f.entry.js} +1 -1
- package/dist/webcomponents/p-6c078cd1.js +1 -0
- package/dist/webcomponents/{p-623a4479.entry.js → p-8f325782.entry.js} +1 -1
- package/dist/webcomponents/{p-99022846.entry.js → p-987b5de2.entry.js} +1 -1
- package/dist/webcomponents/{p-96b42e7d.entry.js → p-a63fc384.entry.js} +1 -1
- package/dist/webcomponents/{p-23014988.entry.js → p-a8220709.entry.js} +1 -1
- package/dist/webcomponents/{p-301e0493.entry.js → p-ae530971.entry.js} +1 -1
- package/dist/webcomponents/{p-e7067ef2.entry.js → p-b7cf49f4.entry.js} +1 -1
- package/dist/webcomponents/{p-d101c5db.js → p-b87b27ba.js} +1 -1
- package/dist/webcomponents/{p-75b4daef.js → p-c28db166.js} +1 -1
- package/dist/webcomponents/{p-25dba252.entry.js → p-edac2b43.entry.js} +1 -1
- package/dist/webcomponents/{p-b16dfd5d.entry.js → p-ef23c091.entry.js} +1 -1
- package/dist/webcomponents/{p-304dd644.entry.js → p-f06910aa.entry.js} +1 -1
- package/dist/webcomponents/{p-cd7105dd.entry.js → p-f0a06884.entry.js} +1 -1
- package/dist/webcomponents/{p-9279aa49.entry.js → p-f2f94d9f.entry.js} +1 -1
- package/dist/webcomponents/{p-6f03b35a.entry.js → p-f49b7170.entry.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/webcomponents/p-4b4580dd.js +0 -1
- package/dist/webcomponents/p-ae263544.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as s}from"./p-fad19d75.js";import{c as i,d as a,e as r}from"./p-5968ff8a.js";import{I as d}from"./p-
|
|
1
|
+
import{r as t,c as e,h as s}from"./p-fad19d75.js";import{c as i,d as a,e as r}from"./p-5968ff8a.js";import{I as d}from"./p-c28db166.js";import{F as o}from"./p-2eab3c90.js";import{O as h}from"./p-af244664.js";import{a as c}from"./p-d89bad72.js";import{c as n,i as f}from"./p-85fc69e5.js";import{B as b}from"./p-9c9c7dac.js";import{S as l,P as m}from"./p-525db3e8.js";import{u,a as p,b as v}from"./p-7d85af5c.js";import"./p-14c91ffd.js";import"./p-8115b2f4.js";import"./p-57e1f2fd.js";import"./p-29c0b182.js";import"./p-1ff8810b.js";import"./p-6078a370.js";import"./p-89887332.js";import"./p-ba5fae28.js";const y=class{constructor(s){t(this,s),this.errorEvent=e(this,"error-event",7),this.getOwner=void 0,this.patchOwner=void 0,this.postOwner=void 0,this.authToken=void 0,this.ownerId=void 0,this.businessId=void 0,this.allowOptionalFields=void 0,this.removeOwner=void 0,this.newFormOpen=void 0,this.ownersLength=void 0}async validate(){return this.coreComponent.validate()}async submit(){return this.coreComponent.submit()}async validateAndSubmit({onSuccess:t}){this.coreComponent.validateAndSubmit({onSuccess:t})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&(this.getOwner=i({authToken:this.authToken,identityId:this.ownerId,service:new d}),this.patchOwner=a({authToken:this.authToken,identityId:this.ownerId,service:new d}),this.postOwner=r({authToken:this.authToken,service:new d}))}render(){return s("owner-form-core",{key:"332d1e77d01886f13aba09b32b2d5f2199131619",ownerId:this.ownerId,businessId:this.businessId,getOwner:this.getOwner,patchOwner:this.patchOwner,postOwner:this.postOwner,allowOptionalFields:this.allowOptionalFields,removeOwner:this.removeOwner,newFormOpen:this.newFormOpen,ownersLength:this.ownersLength,ref:t=>this.coreComponent=t})}},k=class{loadingWatcher(){this.formLoading.emit(this.isLoading)}constructor(s){t(this,s),this.submitted=e(this,"submitted",7),this.ownerSubmitted=e(this,"ownerSubmitted",7),this.clickEvent=e(this,"click-event",7),this.formLoading=e(this,"formLoading",7),this.errorEvent=e(this,"error-event",7),this.getData=()=>{this.isLoading=!0,this.getOwner({onSuccess:t=>{this.instantiateOwner(t.data)},onError:({error:t,code:e,severity:s})=>{this.errorEvent.emit({message:t,errorCode:e,severity:s})},final:()=>this.isLoading=!1})},this.sendData=()=>(this.isLoading=!0,new Promise((t=>{this.ownerId?this.patchOwner({payload:this.payload,onSuccess:e=>{this.submitted.emit({data:e,metadata:{ownerID:e.data.id}}),this.ownerSubmitted.emit({id:e.data.id}),this.instantiateOwner(e.data),t(!0)},onError:({error:e,code:s,severity:i})=>{this.submitted.emit({data:{error:e}}),this.errorEvent.emit({message:e,errorCode:s,severity:i}),t(!1)},final:()=>this.isLoading=!1}):this.postOwner({payload:this.payload,onSuccess:e=>{this.submitted.emit({data:e,metadata:{ownerID:e.data.id}}),this.ownerSubmitted.emit({id:e.data.id}),this.instantiateOwner(e.data),t(!0)},onError:({error:e,code:s,severity:i})=>{this.submitted.emit({data:{error:e}}),this.errorEvent.emit({message:e,errorCode:s,severity:i}),t(!1)},final:()=>this.isLoading=!1})}))),this.instantiateOwner=async t=>{this.owner=Object.assign({},new h(t)),await this.formController.setInitialValues(this.owner)},this.handleAddOwner=()=>{this.clickEvent.emit({name:this.ownerId?c.updateOwner:c.addOwner})},this.handleRemoveOwner=()=>{this.removeOwner(this.ownerId),this.clickEvent.emit({name:c.removeOwner})},this.isLoading=!1,this.formController=void 0,this.errors={},this.owner={},this.ownerId=void 0,this.businessId=void 0,this.getOwner=void 0,this.patchOwner=void 0,this.postOwner=void 0,this.allowOptionalFields=void 0,this.removeOwner=void 0,this.newFormOpen=void 0,this.ownersLength=void 0,this.validate=this.validate.bind(this),this.submit=this.submit.bind(this),this.validateAndSubmit=this.validateAndSubmit.bind(this)}async returnOwnerData(){return this.ownerId}async validate(){return this.formController.validate()}async submit(){if(await this.validate())return this.sendData()}async validateAndSubmit(t){t.preventDefault(),await this.validate()&&this.submit()}get payload(){let t=n(this.formController.values.getValue());return this.ownerId?JSON.stringify(t):JSON.stringify(Object.assign(Object.assign({},t),{business_id:this.businessId}))}get formTitle(){return this.ownerId?"Edit Business Owner":"Add Business Owner"}get submitButtonText(){return this.ownerId?"Update":"Add"}get showRemoveButton(){return!(this.ownersLength<=1)&&(!(this.ownerId||!this.newFormOpen)||!(!this.ownerId||this.newFormOpen)||void 0)}componentWillLoad(){this.formController=new o(f("owner",this.allowOptionalFields)),this.ownerId?this.getData():this.instantiateOwner({})}componentDidLoad(){this.formController.errors.subscribe((t=>this.errors=Object.assign({},t)))}render(){return s("form",{key:"b2e2aaced859260e9d2ef59bc3f8a0763d05872c",onSubmit:this.validateAndSubmit},s("fieldset",{key:"2a93ddb4c945be0ec081ce31d6d9eff4b302d622"},s("legend",{key:"ea9859e55099e3f8263024d884edfb48b3666eaa",class:"fw-semibold fs-5"},this.formTitle),s("br",{key:"f646c1ecc544c358d87e701aba8e151fcb96c54e"}),s("div",{key:"874bf4ebd7cef0afbdee96fa4d5679b6d683b0f0",class:"row gy-3"},s("owner-form-inputs",{key:"866dbf0002ec1ac70d7942c6011c67f8cd144960",ownerDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController}),s("div",{key:"15d907270ecf3d16769cedea39ba279d7ffb0748",class:"d-flex gap-2 justify-content-start"},s(b,{key:"84c09ef594e7fa387e64a09014de81ed713cc765",variant:"secondary",type:"button",onClick:this.handleRemoveOwner,hidden:!this.showRemoveButton},"Remove"),s(b,{key:"1dafd97aa7b84644c9d011224a152ad7f99ce620",variant:"primary",type:"submit",onClick:this.handleAddOwner,disabled:this.isLoading},this.submitButtonText))),s("hr",{key:"f1f31da4d147afcd01ef96acd01d63ee9497dd6b"})))}static get watchers(){return{isLoading:["loadingWatcher"]}}},w=class{constructor(e){t(this,e),this.inputHandler=(t,e)=>{u(this.formController,{[t]:e})},this.onAddressFormUpdate=t=>{p(this.formController,Object.assign(Object.assign({},this.formController.values.getValue().address),t))},this.ownerDefaultValue=void 0,this.errors=void 0,this.formController=void 0}render(){return s("div",{key:"6fcc165d4bc75b92403d9031ad98f05f6b1dcd34",class:"row gy-3"},s("div",{key:"74f1e42a13892e95497a99684ba9de64719edb72",class:"col-12 col-md-6"},s("form-control-text",{key:"29caea2b0b0a62822cc20c99e697f3db7c22a541",name:"name",label:"Full Name",defaultValue:this.ownerDefaultValue.name,errorText:this.errors.name,inputHandler:this.inputHandler})),s("div",{key:"5b0f8da9a0512de70558baa9cb188b4d5e773dc2",class:"col-12 col-md-4"},s("form-control-text",{key:"5967094f115a64876f8dc943a273f5a22b193f1c",name:"title",label:"Title",defaultValue:this.ownerDefaultValue.title,errorText:this.errors.title,inputHandler:this.inputHandler})),s("div",{key:"6c05fec9b87f8ba5e3be9ce74ef727a1e4b14905",class:"col-12 col-md-6"},s("form-control-text",{key:"8c5b2839b6de605915d8e7c14a0ba22d3f440bda",name:"email",label:"Email Address",defaultValue:this.ownerDefaultValue.email,errorText:this.errors.email,inputHandler:this.inputHandler})),s("div",{key:"d7eae882aea84b8562e459e66bc1ba885c4be3c7",class:"col-12 col-md-6"},s("form-control-number-masked",{key:"2d6b33f47e4008745fd65c5ef3cb60dd92b85eba",name:"phone",label:"Phone Number",defaultValue:this.ownerDefaultValue.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:m.US})),s("div",{key:"92b825163aedf052bdb89721397da69c717e595d",class:"col-12 col-md-4"},s("form-control-date",{key:"cd884b773ef0eb60effc61e8cfbf42b21620cd1c",name:"dob_full",label:"Birth Date",defaultValue:this.ownerDefaultValue.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:t=>v(t,this.formController)})),s("div",{key:"614ba65972946645ba5c7a299c00efd0e85abf5e",class:"col-12 col-md-8"},s("form-control-number-masked",{key:"7cd9fe7a1b56d351942a0b962f3c7227459406ae",name:"identification_number",label:"SSN",defaultValue:this.ownerDefaultValue.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:l})),s("div",{key:"ce08f35a16de4b9be65377cde0a9daa5b4cbe876",class:"col-12"},s("justifi-identity-address-form",{key:"79a7f5e8c08fc57383c1975145a6b06bd4e615dd",errors:this.errors.address,defaultValues:this.ownerDefaultValue.address,handleFormUpdate:this.onAddressFormUpdate})))}};export{y as justifi_owner_form,k as owner_form_core,w as owner_form_inputs}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as i}from"./p-fad19d75.js";import{C as s,a as o}from"./p-14c91ffd.js";import{g as r,a as c}from"./p-8115b2f4.js";import{A as a}from"./p-29c0b182.js";import"./p-56f6ce4c.js";import"./p-df21aaad.js";import"./p-e3fab0e2.js";import{c as h}from"./p-
|
|
1
|
+
import{r as e,c as t,h as i}from"./p-fad19d75.js";import{C as s,a as o}from"./p-14c91ffd.js";import{g as r,a as c}from"./p-8115b2f4.js";import{A as a}from"./p-29c0b182.js";import"./p-56f6ce4c.js";import"./p-df21aaad.js";import"./p-e3fab0e2.js";import{c as h}from"./p-57e1f2fd.js";import{J as n}from"./p-32286934.js";import"./p-6c078cd1.js";class d{async fetchCheckout(e,t){const i=`checkouts/${t}`;return a({authToken:e,apiOrigin:h.proxyApiOrigin}).get(i)}async complete(e,t,i){const s=`checkouts/${t}/complete`,o={payment_mode:i.payment_mode};return i.payment_token&&(o.payment_token=i.payment_token),a({authToken:e,apiOrigin:h.proxyApiOrigin}).post(s,JSON.stringify(o))}}const u=class{constructor(i){e(this,i),this.errorEvent=t(this,"error-event",7),this.loadedEvent=t(this,"loaded",7),this.iframeOrigin=void 0,this.authToken=void 0,this.checkoutId=void 0,this.disableCreditCard=void 0,this.disableBankAccount=void 0,this.disableBnpl=void 0,this.disablePaymentMethodGroup=void 0,this.getCheckout=void 0,this.complete=void 0,this.errorMessage=""}componentWillLoad(){this.analytics=new n(this),this.initializeGetCheckout()}disconnectedCallback(){this.analytics.cleanup()}initializeGetCheckout(){this.authToken&&this.checkoutId?(this.getCheckout=(({authToken:e,checkoutId:t,service:i})=>async({onSuccess:o,onError:a})=>{var h;try{const n=await i.fetchCheckout(e,t);if(n.error)return a({error:r(n.error),code:c(null===(h=n.error)||void 0===h?void 0:h.code),severity:s.ERROR});o({checkout:n.data})}catch(e){const t=c(null==e?void 0:e.code);return a({error:e.message||e,code:t,severity:s.ERROR})}})({authToken:this.authToken,checkoutId:this.checkoutId,service:new d}),this.complete=(({authToken:e,checkoutId:t,service:i})=>async({payment:o,onSuccess:a,onError:h})=>{var n;try{const d=await i.complete(e,t,o);if(d.error)return h({error:r(d.error),code:c(null===(n=d.error)||void 0===n?void 0:n.code),severity:s.ERROR});a(d)}catch(e){const t=c(null==e?void 0:e.code);return h({error:e.message||e,code:t,severity:s.ERROR})}})({authToken:this.authToken,checkoutId:this.checkoutId,service:new d})):this.errorEvent.emit({message:"auth-token and checkout-id are required",errorCode:o.MISSING_PROPS,severity:s.ERROR})}propChanged(){this.initializeGetCheckout()}async fillBillingForm(e){this.checkoutCoreRef.fillBillingForm(e)}render(){return i("justifi-checkout-core",{key:"d2f6bfed1be767edcf4ba21cddc503ff5efbec1a",getCheckout:this.getCheckout,authToken:this.authToken,complete:this.complete,disableCreditCard:this.disableCreditCard,disableBankAccount:this.disableBankAccount,disableBnpl:this.disableBnpl,disablePaymentMethodGroup:this.disablePaymentMethodGroup,ref:e=>{e&&(this.checkoutCoreRef=e)}},i("div",{key:"45ac1bea74ca8ef7999211b51fe7791225d61f00",slot:"insurance"},i("slot",{key:"13e051844cc7cb4aed98076ccd64954b2dd68228",name:"insurance"})))}static get watchers(){return{authToken:["propChanged"],checkoutId:["propChanged"]}}};export{u as justifi_checkout}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,H as r}from"./p-fad19d75.js";import{t as o}from"./p-2b6c9c4f.js";import{m as e,P as a}from"./p-
|
|
1
|
+
import{r as t,c as s,h as i,H as r}from"./p-fad19d75.js";import{t as o}from"./p-2b6c9c4f.js";import{m as e,P as a}from"./p-3f5e7e86.js";import"./p-56f6ce4c.js";import"./p-df21aaad.js";import{P as n}from"./p-e3fab0e2.js";import{C as c,a as p}from"./p-14c91ffd.js";import{g as h,a as d}from"./p-8115b2f4.js";import{E as u}from"./p-dce846bf.js";import{J as m}from"./p-32286934.js";import"./p-29c0b182.js";import"./p-57e1f2fd.js";import"./p-6c078cd1.js";const f=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.handleOnError=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.accountId=void 0,this.authToken=void 0,this.getPayouts=void 0,this.getPayoutCSV=void 0,this.errorMessage=null}componentWillLoad(){this.analytics=new m(this),this.initializeServices()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeServices()}initializeServices(){if(this.accountId&&this.authToken){const t={id:this.accountId,authToken:this.authToken,service:new a};this.getPayouts=(({id:t,authToken:s,service:i})=>async({params:r,onSuccess:o,onError:e})=>{var a,p;try{const u=await i.fetchPayouts(t,s,r);if(u.error)return e({error:h(u.error),code:d(null===(p=u.error)||void 0===p?void 0:p.code),severity:c.ERROR});{const t=Object.assign({},u.page_info);o({payouts:(null===(a=u.data)||void 0===a?void 0:a.map((t=>new n(t))))||[],pagingInfo:t})}}catch(t){return e({error:h(t),code:d(null==t?void 0:t.code),severity:c.ERROR})}})(t),this.getPayoutCSV=e(t)}else this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:p.MISSING_PROPS,message:"Account ID and Auth Token are required"})}render(){return this.errorMessage?u(this.errorMessage):i(r,{exportedparts:o},i("payouts-list-core",{getPayouts:this.getPayouts,getPayoutCSV:this.getPayoutCSV,"onError-event":this.handleOnError}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{f as justifi_payouts_list}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as a}from"./p-29c0b182.js";import"./p-56f6ce4c.js";import"./p-df21aaad.js";import"./p-e3fab0e2.js";import{c as t}from"./p-
|
|
1
|
+
import{A as a}from"./p-29c0b182.js";import"./p-56f6ce4c.js";import"./p-df21aaad.js";import"./p-e3fab0e2.js";import{c as t}from"./p-57e1f2fd.js";class s{async fetchPayments(s,e,p){return a({authToken:e,apiOrigin:t.proxyApiOrigin}).get(`account/${s}/payments`,p)}async fetchPayment(s,e){const p=`payments/${s}`;return a({authToken:e,apiOrigin:t.proxyApiOrigin}).get(p)}}export{s as P}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as t}from"./p-
|
|
1
|
+
import{c as t}from"./p-57e1f2fd.js";import{A as i}from"./p-29c0b182.js";class n{async fetchBusiness(n,s){const e=`entities/business/${n}`;return i({authToken:s,apiOrigin:t.proxyApiOrigin}).get(e)}async patchBusiness(n,s,e){const a=`entities/business/${s}`;return i({authToken:n,apiOrigin:t.proxyApiOrigin}).patch(a,e)}}class s{async fetchIdentity(n,s){const e=`entities/identity/${n}`;return i({authToken:s,apiOrigin:t.proxyApiOrigin}).get(e)}async patchIdentity(n,s,e){const a=`entities/identity/${s}`;return i({authToken:n,apiOrigin:t.proxyApiOrigin}).patch(a,e)}async postIdentity(n,s){return i({authToken:n,apiOrigin:t.proxyApiOrigin}).post("entities/identity",s)}}export{n as B,s as I}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as e}from"./p-fad19d75.js";import{A as s}from"./p-29c0b182.js";import"./p-56f6ce4c.js";import"./p-df21aaad.js";import"./p-e3fab0e2.js";import{c as r}from"./p-
|
|
1
|
+
import{r as t,c as i,h as e}from"./p-fad19d75.js";import{A as s}from"./p-29c0b182.js";import"./p-56f6ce4c.js";import"./p-df21aaad.js";import"./p-e3fab0e2.js";import{c as r}from"./p-57e1f2fd.js";import{g as o,a}from"./p-8115b2f4.js";import{C as n,a as d}from"./p-14c91ffd.js";import{J as c}from"./p-32286934.js";import"./p-6c078cd1.js";class h{async fetchQuote(t,i){return s({authToken:t,apiOrigin:r.proxyApiOrigin}).post("insurance/quotes",JSON.stringify(i))}async toggleCoverage(t,i,e){const o=`insurance/quotes/${i}/toggle`;return s({authToken:t,apiOrigin:r.proxyApiOrigin}).post(o,JSON.stringify(e))}}const u=class{constructor(e){t(this,e),this.errorEvent=i(this,"error-event",7),this.authToken=void 0,this.checkoutId=void 0,this.primaryIdentityFirstName=void 0,this.primaryIdentityLastName=void 0,this.primaryIdentityState=void 0,this.primaryIdentityPostalCode=void 0,this.primaryIdentityCountry=void 0,this.primaryIdentityEmailAddress=void 0,this.policyAttributesInsurableAmount=void 0,this.policyAttributesStartDate=void 0,this.policyAttributesEndDate=void 0,this.coveredIdentityFirstName=void 0,this.coveredIdentityLastName=void 0,this.getQuote=void 0,this.toggleCoverage=void 0,this.quote=void 0}async validate(){return this.seasonInterruptionCoreRef.validate()}componentWillLoad(){this.analytics=new c(this),this.initializeServiceMethods()}disconnectedCallback(){this.analytics.cleanup()}initializeServiceMethods(){this.authToken?(this.getQuote=(({authToken:t,service:i})=>async({payload:e,onSuccess:s,onError:r})=>{var d;try{const c=await i.fetchQuote(t,e);if(c.error)return r({error:o(c.error),code:a(null===(d=c.error)||void 0===d?void 0:d.code),severity:n.ERROR});s({quote:c.data})}catch(t){const i=a(null==t?void 0:t.code);return r({error:t.message||t,code:i,severity:n.ERROR})}})({authToken:this.authToken,service:new h}),this.toggleCoverage=(({authToken:t,service:i})=>async({quoteId:e,payload:s,onSuccess:r,onError:d})=>{var c;try{const h=await i.toggleCoverage(t,e,s);if(h.error)return d({error:o(h.error),code:a(null===(c=h.error)||void 0===c?void 0:c.code),severity:n.ERROR});r({quote:h.data})}catch(t){const i=a(null==t?void 0:t.code);return d({error:t.message||t,code:i,severity:n.ERROR})}})({authToken:this.authToken,service:new h})):this.errorEvent.emit({errorCode:d.MISSING_PROPS,message:"Missing authToken",severity:n.ERROR})}render(){return e("justifi-season-interruption-insurance-core",{key:"256d45d39c5d297abb7f955229b0e0e9fbc9504a",ref:t=>this.seasonInterruptionCoreRef=t,"checkout-id":this.checkoutId,getQuote:this.getQuote,toggleCoverage:this.toggleCoverage,"primary-identity-first-name":this.primaryIdentityFirstName,"primary-identity-last-name":this.primaryIdentityLastName,"primary-identity-state":this.primaryIdentityState,"primary-identity-postal-code":this.primaryIdentityPostalCode,"primary-identity-country":this.primaryIdentityCountry,"primary-identity-email-address":this.primaryIdentityEmailAddress,"policy-attributes-insurable-amount":this.policyAttributesInsurableAmount,"policy-attributes-start-date":this.policyAttributesStartDate,"policy-attributes-end-date":this.policyAttributesEndDate,"covered-identity-first-name":this.coveredIdentityFirstName,"covered-identity-last-name":this.coveredIdentityLastName})}};export{u as justifi_season_interruption_insurance}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,H as o,F as s}from"./p-fad19d75.js";import{c as d}from"./p-ae263544.js";import{a}from"./p-df21aaad.js";import{g as h,f as n}from"./p-83125497.js";const r={bankAccount:"New bank account",card:"New credit or debit card"},c=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected",7),this.onPaymentMethodOptionClick=()=>{this.paymentMethodOptionSelected.emit(this.paymentMethodOption)},this.iframeOrigin=d.iframeOrigin,this.authToken=void 0,this.accountId=void 0,this.paymentMethodOption=void 0,this.paymentMethodGroupId=void 0,this.isSelected=void 0,this.saveNewPaymentMethodChecked=!1}handleCheckboxChanged(t){this.saveNewPaymentMethodChecked=t.detail}async fillBillingForm(t){this.billingFormRef.fill(t)}async resolvePaymentMethod(t){var i,e;if(!this.paymentMethodFormRef||!this.billingFormRef)return;if(!await this.validate()||!t.isValid)return{validationError:!0};const o=await this.tokenize();if(o.error)return{error:o.error};{const t=o.data;return{token:(null===(i=t.card)||void 0===i?void 0:i.token)||(null===(e=t.bank_account)||void 0===e?void 0:e.token)}}}async validate(){const t=await this.billingFormRef.validate(),i=await this.paymentMethodFormRef.validate();return t.isValid&&i.isValid}async tokenize(){try{const t=await this.billingFormRef.getValues();let i;i=this.saveNewPaymentMethodChecked?Object.assign(Object.assign({},t),{payment_method_group_id:this.paymentMethodGroupId}):Object.assign({},t);const e=this.authToken;return await this.paymentMethodFormRef.tokenize(e,i,this.accountId)}catch(t){return t}}showNewPaymentMethodForm(){var t;return e("div",{class:"mt-2 pb-4 border-bottom"},e("div",{class:"mb-3"},e("justifi-payment-method-form",{ref:t=>this.paymentMethodFormRef=t,"payment-method-form-type":null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,"iframe-origin":this.iframeOrigin})),e("h3",{class:"fs-6 fw-bold lh-lg mb-4"},"Billing address"),e("justifi-billing-form",{ref:t=>this.billingFormRef=t}),e("justifi-save-new-payment-method",{hidden:!this.paymentMethodGroupId}))}render(){var t,i,o,s;return e("div",{key:"93c3e6d38d1e18be54006bf82cd6c8148df3518d",class:"payment-method"},e("div",{key:"6dbb687fbd3e33a6095be7c39ec0974bcc4809b8",class:"payment-method-header p-3",onClick:()=>this.onPaymentMethodOptionClick()},e("input",{key:"6c5be962cf5d357211c6716b53d0d8dd3fcf0bb0",type:"radio",name:"paymentMethodType",id:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,value:null===(i=this.paymentMethodOption)||void 0===i?void 0:i.id,onClick:t=>t.preventDefault(),checked:this.isSelected,class:"form-check-input me-2"}),e("label",{key:"796868afd192703a81d94897872dd9c0504cbc1e",htmlFor:null===(o=this.paymentMethodOption)||void 0===o?void 0:o.id,class:"form-check-label"},r[null===(s=this.paymentMethodOption)||void 0===s?void 0:s.id])),this.isSelected?this.showNewPaymentMethodForm():null)}};class l{constructor(t){this.id=t.id,this.brand=t.brand,this.acct_last_four=t.acct_last_four,this.type=h(t.type)}}var v;!function(t){t.american_express="American Express",t.diners_club="Diners Club",t.discover="Discover",t.jcb="JCB",t.mastercard="Mastercard",t.china_unionpay="UnionPay",t.visa="Visa",t.unknown="Unknown"}(v||(v={}));const u=class{constructor(e){t(this,e),this.toggleCreatingNewPaymentMethod=i(this,"toggleCreatingNewPaymentMethod",7),this.showCard=void 0,this.showAch=void 0,this.showBnpl=void 0,this.showSavedPaymentMethods=void 0,this.paymentMethodGroupId=void 0,this.bnpl=void 0,this.insuranceToggled=void 0,this.authToken=void 0,this.accountId=void 0,this.iframeOrigin=d.iframeOrigin,this.savedPaymentMethods=[],this.paymentAmount=void 0,this.selectedPaymentMethodId=void 0,this.paymentMethodOptions=[]}async fillBillingForm(t){const i=this.selectedPaymentMethodOptionRef;i.fillBillingForm&&i.fillBillingForm(t)}connectedCallback(){this.paymentMethodsChanged()}paymentMethodsChanged(){var t,i;this.paymentMethodOptions=this.savedPaymentMethods.map((t=>new l(t))).filter((t=>(this.showCard||t.type!==a.card)&&(this.showAch||t.type!==a.bankAccount))),this.showBnpl&&"sezzle"===(null===(t=this.bnpl)||void 0===t?void 0:t.provider)&&!this.insuranceToggled&&this.paymentMethodOptions.push(new l({id:a.sezzle})),this.showCard&&this.paymentMethodOptions.push(new l({id:a.card})),this.showAch&&this.paymentMethodOptions.push(new l({id:a.bankAccount})),this.selectedPaymentMethodId||(this.selectedPaymentMethodId=null===(i=this.paymentMethodOptions[0])||void 0===i?void 0:i.id)}paymentMethodOptionSelected(t){this.selectedPaymentMethodId=t.detail.id}async resolvePaymentMethod(t){var i;return await(null===(i=this.selectedPaymentMethodOptionRef)||void 0===i?void 0:i.resolvePaymentMethod(t))}render(){var t;return e(o,{key:"86e309b90ab00f530dd803b00e5aab511f92300f"},null===(t=this.paymentMethodOptions)||void 0===t?void 0:t.map((t=>{const i=this.selectedPaymentMethodId===t.id,o=t.id===a.sezzle;return t.id===a.card||t.id===a.bankAccount?e("justifi-new-payment-method",{paymentMethodOption:t,authToken:this.authToken,"account-id":this.accountId,"is-selected":i,paymentMethodGroupId:this.paymentMethodGroupId,ref:t=>{i&&(this.selectedPaymentMethodOptionRef=t)}}):o?e("justifi-sezzle-payment-method",{paymentMethodOption:t,"is-selected":i,paymentAmount:this.paymentAmount,bnpl:this.bnpl,ref:t=>{i&&(this.selectedPaymentMethodOptionRef=t)}}):this.showSavedPaymentMethods?e("justifi-saved-payment-method",{paymentMethodOption:t,"is-selected":i,ref:t=>{i&&(this.selectedPaymentMethodOptionRef=t)}}):void 0})))}static get watchers(){return{savedPaymentMethods:["paymentMethodsChanged"]}}};u.style=":host{display:block}.payment-method-header{cursor:pointer;color:var(--jfi-radio-button-group-color);background-color:var(--jfi-radio-button-group-background-color);border-bottom:var(--jfi-radio-button-group-divider)}.payment-method-header:hover{color:var(--jfi-radio-button-group-color-hover);background-color:var(--jfi-radio-button-group-background-color-hover)}.form-check-input,label{cursor:pointer}.form-check-input{background-color:var(--jfi-radio-button-background-color);border-color:var(--jfi-radio-button-border-color)}.form-check-input:checked,.form-check-input:checked:focus{background-color:var(--jfi-radio-button-background-color-selected);border-color:var(--jfi-radio-button-border-color-selected)}.form-check-input:focus{border-color:var(--jfi-radio-button-border-color-focus);box-shadow:var(--jfi-radio-button-box-shadow-focus)}";const b=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected",7),this.onPaymentMethodOptionClick=()=>{this.paymentMethodOptionSelected.emit(this.paymentMethodOption)},this.iframeOrigin=d.iframeOrigin,this.paymentMethodOption=void 0,this.isSelected=void 0}async resolvePaymentMethod(t){var i;return t.isValid?{token:null===(i=this.paymentMethodOption)||void 0===i?void 0:i.id}:{validationError:!0}}render(){var t,i,o,d,a;return e(s,{key:"9c2174123f1675d60bc48d8109821c0bc2ad7682"},e("div",{key:"07bffce2603110d44f38ffb2f57a60f07faddb3b",class:"payment-method"},e("div",{key:"f489d3a05db45c2b2581bc8f0fc093afed453d91",class:"payment-method-header p-3",onClick:()=>this.onPaymentMethodOptionClick()},e("input",{key:"70681612520aa621c39a017b72b25a7dd3211282",type:"radio",name:"paymentMethodType",id:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,value:null===(i=this.paymentMethodOption)||void 0===i?void 0:i.id,onClick:t=>t.preventDefault(),checked:this.isSelected,class:"form-check-input me-2"}),e("label",{key:"a58e14ae9d199b0e0eb01b4c0a4a8bd9c8fec41d",htmlFor:null===(o=this.paymentMethodOption)||void 0===o?void 0:o.id,class:"form-check-label"},v[null===(d=this.paymentMethodOption)||void 0===d?void 0:d.brand]," *",null===(a=this.paymentMethodOption)||void 0===a?void 0:a.acct_last_four))))}},m=e("img",{class:"sezzle-smart-button-logo-img",src:"https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg",alt:"Sezzle",style:{display:"inline",width:"80px",marginLeft:"5px",marginTop:"-5px"}}),f=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected",7),this.onPaymentMethodOptionClick=()=>{this.paymentMethodOptionSelected.emit(this.paymentMethodOption)},this.initializeSezzleCheckout=()=>{let t;this.sezzlePromise=new Promise((i=>{t=i}));const i=this.bnpl,e=+this.paymentAmount,o=new(0,window.Checkout)({mode:"popup",publicKey:i.provider_client_id,apiMode:i.provider_mode,apiVersion:i.provider_api_version});o.sezzleButtonElement=this.sezzleButtonRef,o.init({onClick:function(t){t.preventDefault(),o.startCheckout({checkout_url:i.provider_checkout_url})},onComplete:i=>t({bnpl:i.data}),onCancel:i=>t({bnpl:i.data}),onFailure:i=>t({bnpl:i.data})}),this.sezzleCheckout=o,this.installmentPlan=this.sezzleCheckout.getInstallmentPlan(e)},this.iframeOrigin=d.iframeOrigin,this.bnpl=void 0,this.clientId=void 0,this.accountId=void 0,this.paymentMethodOption=void 0,this.isSelected=void 0,this.paymentAmount=void 0,this.installmentPlan=void 0,this.sezzleCheckout=void 0,this.sezzlePromise=void 0}componentDidRender(){this.scriptRef.onload=()=>{this.sezzleButtonRef=document.createElement("button"),this.initializeSezzleCheckout()}}async resolvePaymentMethod(t){return t.isValid?(this.sezzleButtonRef.click(),this.sezzlePromise):{validationError:!0}}render(){var t,i,o,s,d;return e("div",{key:"4deca512311cd98d358c7099141b15538857a4e5",class:"payment-method"},e("script",{key:"94b232291153bba85efebb101e7e6e816857da96",src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:t=>this.scriptRef=t}),e("div",{key:"7cd9052ae6613fe7f187f3a51b7d6ac7087fdeb1",class:"payment-method-header p-3",onClick:()=>this.onPaymentMethodOptionClick()},e("input",{key:"1e15e6c2ddced23b049e2559da27532f9be94fb5",type:"radio",name:"paymentMethodType",id:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,value:null===(i=this.paymentMethodOption)||void 0===i?void 0:i.id,onClick:t=>t.preventDefault(),checked:this.isSelected,class:"form-check-input me-2"}),e("label",{key:"0a3637002ef373c05424d6769b070d9db0e66ce8",htmlFor:null===(o=this.paymentMethodOption)||void 0===o?void 0:o.id,class:"form-check-label"},e("div",{key:"6398e2f00088edf8a1a3699e149760744dda4cb1"},"Buy now, pay later with ",m),this.installmentPlan&&e("small",{key:"bfd33da875aa5e9f5b649ac8fc7aa5758393b6e8"},e("span",{key:"c07fd5d32fe897a45a67140e2cb81b1f4d537c4a"},null===(s=this.installmentPlan)||void 0===s?void 0:s.installments.length)," ",e("span",{key:"2b11e4aa6389a4b98cd003c031aed8f01ec8a4df"},this.installmentPlan.schedule," payments of")," ",e("span",{key:"90cf3bfa1f0d36c8d4719f164d436407d7fc692b",class:"fw-bold"},n(null===(d=this.installmentPlan)||void 0===d?void 0:d.installments[0].amountInCents))))))}};export{c as justifi_new_payment_method,u as justifi_payment_method_options,b as justifi_saved_payment_method,f as justifi_sezzle_payment_method}
|
|
1
|
+
import{r as t,c as i,h as e,H as o,F as s}from"./p-fad19d75.js";import{c as d}from"./p-57e1f2fd.js";import{a}from"./p-df21aaad.js";import{g as h,f as n}from"./p-83125497.js";const r={bankAccount:"New bank account",card:"New credit or debit card"},c=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected",7),this.onPaymentMethodOptionClick=()=>{this.paymentMethodOptionSelected.emit(this.paymentMethodOption)},this.iframeOrigin=d.iframeOrigin,this.authToken=void 0,this.accountId=void 0,this.paymentMethodOption=void 0,this.paymentMethodGroupId=void 0,this.isSelected=void 0,this.saveNewPaymentMethodChecked=!1}handleCheckboxChanged(t){this.saveNewPaymentMethodChecked=t.detail}async fillBillingForm(t){this.billingFormRef.fill(t)}async resolvePaymentMethod(t){var i,e;if(!this.paymentMethodFormRef||!this.billingFormRef)return;if(!await this.validate()||!t.isValid)return{validationError:!0};const o=await this.tokenize();if(o.error)return{error:o.error};{const t=o.data;return{token:(null===(i=t.card)||void 0===i?void 0:i.token)||(null===(e=t.bank_account)||void 0===e?void 0:e.token)}}}async validate(){const t=await this.billingFormRef.validate(),i=await this.paymentMethodFormRef.validate();return t.isValid&&i.isValid}async tokenize(){try{const t=await this.billingFormRef.getValues();let i;i=this.saveNewPaymentMethodChecked?Object.assign(Object.assign({},t),{payment_method_group_id:this.paymentMethodGroupId}):Object.assign({},t);const e=this.authToken;return await this.paymentMethodFormRef.tokenize(e,i,this.accountId)}catch(t){return t}}showNewPaymentMethodForm(){var t;return e("div",{class:"mt-2 pb-4 border-bottom"},e("div",{class:"mb-3"},e("justifi-payment-method-form",{ref:t=>this.paymentMethodFormRef=t,"payment-method-form-type":null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,"iframe-origin":this.iframeOrigin})),e("h3",{class:"fs-6 fw-bold lh-lg mb-4"},"Billing address"),e("justifi-billing-form",{ref:t=>this.billingFormRef=t}),e("justifi-save-new-payment-method",{hidden:!this.paymentMethodGroupId}))}render(){var t,i,o,s;return e("div",{key:"93c3e6d38d1e18be54006bf82cd6c8148df3518d",class:"payment-method"},e("div",{key:"6dbb687fbd3e33a6095be7c39ec0974bcc4809b8",class:"payment-method-header p-3",onClick:()=>this.onPaymentMethodOptionClick()},e("input",{key:"6c5be962cf5d357211c6716b53d0d8dd3fcf0bb0",type:"radio",name:"paymentMethodType",id:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,value:null===(i=this.paymentMethodOption)||void 0===i?void 0:i.id,onClick:t=>t.preventDefault(),checked:this.isSelected,class:"form-check-input me-2"}),e("label",{key:"796868afd192703a81d94897872dd9c0504cbc1e",htmlFor:null===(o=this.paymentMethodOption)||void 0===o?void 0:o.id,class:"form-check-label"},r[null===(s=this.paymentMethodOption)||void 0===s?void 0:s.id])),this.isSelected?this.showNewPaymentMethodForm():null)}};class l{constructor(t){this.id=t.id,this.brand=t.brand,this.acct_last_four=t.acct_last_four,this.type=h(t.type)}}var v;!function(t){t.american_express="American Express",t.diners_club="Diners Club",t.discover="Discover",t.jcb="JCB",t.mastercard="Mastercard",t.china_unionpay="UnionPay",t.visa="Visa",t.unknown="Unknown"}(v||(v={}));const u=class{constructor(e){t(this,e),this.toggleCreatingNewPaymentMethod=i(this,"toggleCreatingNewPaymentMethod",7),this.showCard=void 0,this.showAch=void 0,this.showBnpl=void 0,this.showSavedPaymentMethods=void 0,this.paymentMethodGroupId=void 0,this.bnpl=void 0,this.insuranceToggled=void 0,this.authToken=void 0,this.accountId=void 0,this.iframeOrigin=d.iframeOrigin,this.savedPaymentMethods=[],this.paymentAmount=void 0,this.selectedPaymentMethodId=void 0,this.paymentMethodOptions=[]}async fillBillingForm(t){const i=this.selectedPaymentMethodOptionRef;i.fillBillingForm&&i.fillBillingForm(t)}connectedCallback(){this.paymentMethodsChanged()}paymentMethodsChanged(){var t,i;this.paymentMethodOptions=this.savedPaymentMethods.map((t=>new l(t))).filter((t=>(this.showCard||t.type!==a.card)&&(this.showAch||t.type!==a.bankAccount))),this.showBnpl&&"sezzle"===(null===(t=this.bnpl)||void 0===t?void 0:t.provider)&&!this.insuranceToggled&&this.paymentMethodOptions.push(new l({id:a.sezzle})),this.showCard&&this.paymentMethodOptions.push(new l({id:a.card})),this.showAch&&this.paymentMethodOptions.push(new l({id:a.bankAccount})),this.selectedPaymentMethodId||(this.selectedPaymentMethodId=null===(i=this.paymentMethodOptions[0])||void 0===i?void 0:i.id)}paymentMethodOptionSelected(t){this.selectedPaymentMethodId=t.detail.id}async resolvePaymentMethod(t){var i;return await(null===(i=this.selectedPaymentMethodOptionRef)||void 0===i?void 0:i.resolvePaymentMethod(t))}render(){var t;return e(o,{key:"86e309b90ab00f530dd803b00e5aab511f92300f"},null===(t=this.paymentMethodOptions)||void 0===t?void 0:t.map((t=>{const i=this.selectedPaymentMethodId===t.id,o=t.id===a.sezzle;return t.id===a.card||t.id===a.bankAccount?e("justifi-new-payment-method",{paymentMethodOption:t,authToken:this.authToken,"account-id":this.accountId,"is-selected":i,paymentMethodGroupId:this.paymentMethodGroupId,ref:t=>{i&&(this.selectedPaymentMethodOptionRef=t)}}):o?e("justifi-sezzle-payment-method",{paymentMethodOption:t,"is-selected":i,paymentAmount:this.paymentAmount,bnpl:this.bnpl,ref:t=>{i&&(this.selectedPaymentMethodOptionRef=t)}}):this.showSavedPaymentMethods?e("justifi-saved-payment-method",{paymentMethodOption:t,"is-selected":i,ref:t=>{i&&(this.selectedPaymentMethodOptionRef=t)}}):void 0})))}static get watchers(){return{savedPaymentMethods:["paymentMethodsChanged"]}}};u.style=":host{display:block}.payment-method-header{cursor:pointer;color:var(--jfi-radio-button-group-color);background-color:var(--jfi-radio-button-group-background-color);border-bottom:var(--jfi-radio-button-group-divider)}.payment-method-header:hover{color:var(--jfi-radio-button-group-color-hover);background-color:var(--jfi-radio-button-group-background-color-hover)}.form-check-input,label{cursor:pointer}.form-check-input{background-color:var(--jfi-radio-button-background-color);border-color:var(--jfi-radio-button-border-color)}.form-check-input:checked,.form-check-input:checked:focus{background-color:var(--jfi-radio-button-background-color-selected);border-color:var(--jfi-radio-button-border-color-selected)}.form-check-input:focus{border-color:var(--jfi-radio-button-border-color-focus);box-shadow:var(--jfi-radio-button-box-shadow-focus)}";const b=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected",7),this.onPaymentMethodOptionClick=()=>{this.paymentMethodOptionSelected.emit(this.paymentMethodOption)},this.iframeOrigin=d.iframeOrigin,this.paymentMethodOption=void 0,this.isSelected=void 0}async resolvePaymentMethod(t){var i;return t.isValid?{token:null===(i=this.paymentMethodOption)||void 0===i?void 0:i.id}:{validationError:!0}}render(){var t,i,o,d,a;return e(s,{key:"9c2174123f1675d60bc48d8109821c0bc2ad7682"},e("div",{key:"07bffce2603110d44f38ffb2f57a60f07faddb3b",class:"payment-method"},e("div",{key:"f489d3a05db45c2b2581bc8f0fc093afed453d91",class:"payment-method-header p-3",onClick:()=>this.onPaymentMethodOptionClick()},e("input",{key:"70681612520aa621c39a017b72b25a7dd3211282",type:"radio",name:"paymentMethodType",id:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,value:null===(i=this.paymentMethodOption)||void 0===i?void 0:i.id,onClick:t=>t.preventDefault(),checked:this.isSelected,class:"form-check-input me-2"}),e("label",{key:"a58e14ae9d199b0e0eb01b4c0a4a8bd9c8fec41d",htmlFor:null===(o=this.paymentMethodOption)||void 0===o?void 0:o.id,class:"form-check-label"},v[null===(d=this.paymentMethodOption)||void 0===d?void 0:d.brand]," *",null===(a=this.paymentMethodOption)||void 0===a?void 0:a.acct_last_four))))}},m=e("img",{class:"sezzle-smart-button-logo-img",src:"https://media.sezzle.com/branding/2.0/Sezzle_Logo_FullColor.svg",alt:"Sezzle",style:{display:"inline",width:"80px",marginLeft:"5px",marginTop:"-5px"}}),f=class{constructor(e){t(this,e),this.paymentMethodOptionSelected=i(this,"paymentMethodOptionSelected",7),this.onPaymentMethodOptionClick=()=>{this.paymentMethodOptionSelected.emit(this.paymentMethodOption)},this.initializeSezzleCheckout=()=>{let t;this.sezzlePromise=new Promise((i=>{t=i}));const i=this.bnpl,e=+this.paymentAmount,o=new(0,window.Checkout)({mode:"popup",publicKey:i.provider_client_id,apiMode:i.provider_mode,apiVersion:i.provider_api_version});o.sezzleButtonElement=this.sezzleButtonRef,o.init({onClick:function(t){t.preventDefault(),o.startCheckout({checkout_url:i.provider_checkout_url})},onComplete:i=>t({bnpl:i.data}),onCancel:i=>t({bnpl:i.data}),onFailure:i=>t({bnpl:i.data})}),this.sezzleCheckout=o,this.installmentPlan=this.sezzleCheckout.getInstallmentPlan(e)},this.iframeOrigin=d.iframeOrigin,this.bnpl=void 0,this.clientId=void 0,this.accountId=void 0,this.paymentMethodOption=void 0,this.isSelected=void 0,this.paymentAmount=void 0,this.installmentPlan=void 0,this.sezzleCheckout=void 0,this.sezzlePromise=void 0}componentDidRender(){this.scriptRef.onload=()=>{this.sezzleButtonRef=document.createElement("button"),this.initializeSezzleCheckout()}}async resolvePaymentMethod(t){return t.isValid?(this.sezzleButtonRef.click(),this.sezzlePromise):{validationError:!0}}render(){var t,i,o,s,d;return e("div",{key:"4deca512311cd98d358c7099141b15538857a4e5",class:"payment-method"},e("script",{key:"94b232291153bba85efebb101e7e6e816857da96",src:"https://checkout-sdk.sezzle.com/checkout.min.js",async:!0,ref:t=>this.scriptRef=t}),e("div",{key:"7cd9052ae6613fe7f187f3a51b7d6ac7087fdeb1",class:"payment-method-header p-3",onClick:()=>this.onPaymentMethodOptionClick()},e("input",{key:"1e15e6c2ddced23b049e2559da27532f9be94fb5",type:"radio",name:"paymentMethodType",id:null===(t=this.paymentMethodOption)||void 0===t?void 0:t.id,value:null===(i=this.paymentMethodOption)||void 0===i?void 0:i.id,onClick:t=>t.preventDefault(),checked:this.isSelected,class:"form-check-input me-2"}),e("label",{key:"0a3637002ef373c05424d6769b070d9db0e66ce8",htmlFor:null===(o=this.paymentMethodOption)||void 0===o?void 0:o.id,class:"form-check-label"},e("div",{key:"6398e2f00088edf8a1a3699e149760744dda4cb1"},"Buy now, pay later with ",m),this.installmentPlan&&e("small",{key:"bfd33da875aa5e9f5b649ac8fc7aa5758393b6e8"},e("span",{key:"c07fd5d32fe897a45a67140e2cb81b1f4d537c4a"},null===(s=this.installmentPlan)||void 0===s?void 0:s.installments.length)," ",e("span",{key:"2b11e4aa6389a4b98cd003c031aed8f01ec8a4df"},this.installmentPlan.schedule," payments of")," ",e("span",{key:"90cf3bfa1f0d36c8d4719f164d436407d7fc692b",class:"fw-bold"},n(null===(d=this.installmentPlan)||void 0===d?void 0:d.installments[0].amountInCents))))))}};export{c as justifi_new_payment_method,u as justifi_payment_method_options,b as justifi_saved_payment_method,f as justifi_sezzle_payment_method}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o,c as r,h as t}from"./p-fad19d75.js";import"./p-56f6ce4c.js";import{a as i}from"./p-df21aaad.js";import"./p-e3fab0e2.js";import{l as a}from"./p-83125497.js";import{c as e}from"./p-
|
|
1
|
+
import{r as o,c as r,h as t}from"./p-fad19d75.js";import"./p-56f6ce4c.js";import{a as i}from"./p-df21aaad.js";import"./p-e3fab0e2.js";import{l as a}from"./p-83125497.js";import{c as e}from"./p-57e1f2fd.js";import{a as s,C as f}from"./p-14c91ffd.js";import{g as c}from"./p-8115b2f4.js";import{J as d}from"./p-32286934.js";import{B as b}from"./p-9c9c7dac.js";import{S as n}from"./p-ba4bae6f.js";import"./p-6c078cd1.js";import"./p-29c0b182.js";const l=class{constructor(t){o(this,t),this.submitted=r(this,"submitted",7),this.errorEvent=r(this,"error-event",7),this.bankAccount=void 0,this.card=void 0,this.email=void 0,this.clientId=void 0,this.authToken=void 0,this.accountId=void 0,this.submitButtonText=void 0,this.submitButtonEnabled=!0,this.isLoading=!1,this.selectedPaymentMethodType=i.card}componentWillLoad(){this.analytics=new d(this),this.validateProps()||(this.errorEvent.emit({errorCode:s.MISSING_PROPS,message:"clientId or authToken is required",severity:f.ERROR}),this.submitButtonEnabled=!1)}connectedCallback(){a()}disconnectedCallback(){this.analytics.cleanup()}async fillBillingForm(o){this.billingFormRef.fill(o)}async enableSubmitButton(){this.submitButtonEnabled=!0}async disableSubmitButton(){this.submitButtonEnabled=!1}showPaymentMethodTypeSelector(){return this.card&&this.bankAccount}getSelectedPaymentMethodType(){return this.showPaymentMethodTypeSelector()?this.selectedPaymentMethodType:this.card?i.card:this.bankAccount?i.bankAccount:i.card}paymentMethodSelectedHandler(o){this.selectedPaymentMethodType=o.detail}validateProps(){return!(!this.clientId&&!this.authToken)}getToken(){return this.authToken||this.clientId}async submit(o){if(o.preventDefault(),!this.paymentMethodFormRef||!this.billingFormRef)return;const r=await this.billingFormRef.validate(),t=await this.paymentMethodFormRef.validate();if(r.isValid&&t.isValid){this.isLoading=!0;try{const o=await this.billingFormRef.getValues(),r=Object.assign({email:this.email},o),t=await this.paymentMethodFormRef.tokenize(this.getToken(),r,this.accountId);t.error&&this.errorEvent.emit({errorCode:s.TOKENIZE_ERROR,message:t.error.message,severity:f.ERROR}),this.submitted.emit(t)}catch(o){this.errorEvent.emit({errorCode:s.UNKNOWN_ERROR,message:c(o),severity:f.ERROR})}finally{this.isLoading=!1}}}render(){return t(n,{key:"38bd6cca38d9068fa9277a8568a98f261a4cc616"},t("form",{key:"fec19f5e2f11934e6783124c4c437a2d3947f596",class:"row gy-3"},this.showPaymentMethodTypeSelector()&&t("div",{key:"18001f78e03336d01de8473a57e3e228e9fce201",class:"col-12"},t("justifi-payment-method-selector",{key:"260ac1ade3ccfe6baf518eb856bdf4d380025620",selectedPaymentMethodType:this.getSelectedPaymentMethodType(),onPaymentMethodSelected:o=>this.paymentMethodSelectedHandler(o)})),t("div",{key:"f6ade2336314e05f2bdce75df8577939efe33e3b",class:"col-12"},t("justifi-payment-method-form",{key:"ad8e5b121b8425175f7ac7f38ab24dfba1801a28","payment-method-form-type":this.getSelectedPaymentMethodType(),iframeOrigin:e.iframeOrigin,ref:o=>{o&&(this.paymentMethodFormRef=o)}})),t("div",{key:"29f15f1cece3e07a569e514d08bf9996405699c6",class:"col-12"},t("justifi-billing-form",{key:"9928924cc29bfa5c5e46ada294cb26da0c1d222b",legend:"Billing Info",ref:o=>{o&&(this.billingFormRef=o)}})),t("slot",{key:"c36583ab34bc105b506df27aec02898455855cec",name:"insurance"}),t("div",{key:"cc38292ae8a59bc6f4624a8535e8b7c93e6f3a35",class:"col-12"},t(b,{key:"e5fe0f50ee2322ab2a199a6229015c9daa198cc0",variant:"primary",type:"submit",onClick:o=>this.submit(o),disabled:!this.submitButtonEnabled||this.isLoading,isLoading:this.isLoading,"data-testid":"submit-button",style:{width:"100%"}},this.submitButtonText||"Submit"))))}};l.style=":host{display:block}justifi-payment-method-form{display:block;margin-left:calc(var(--jfi-layout-padding) * -1);margin-right:calc(var(--jfi-layout-padding) * -1)}*::part(label){color:var(--jfi-form-label-color);font-family:var(--jfi-form-label-font-family);font-weight:var(--jfi-form-label-font-weight);font-size:var(--jfi-form-label-font-size);margin:var(--jfi-form-label-margin)}*::part(input){font-family:var(--jfi-layout-font-family);background-color:var(--jfi-form-control-background-color);border-color:var(--jfi-form-control-border-color);border-width:var(--jfi-form-control-border-width);border-bottom-width:var(--jfi-form-control-border-bottom-width);border-left-width:var(--jfi-form-control-border-left-width);border-right-width:var(--jfi-form-control-border-right-width);border-top-width:var(--jfi-form-control-border-top-width);border-radius:var(--jfi-form-control-border-radius);border-style:var(--jfi-form-control-border-style);box-shadow:var(--jfi-form-control-box-shadow);color:var(--jfi-form-control-color);font-size:var(--jfi-form-control-font-size);font-weight:var(--jfi-form-control-font-weight);line-height:var(--jfi-form-control-line-height);margin:var(--jfi-form-control-margin);padding:var(--jfi-form-control-padding)}*::part(input):focus{color:var(--jfi-form-control-color-focus);border-color:var(--jfi-form-control-border-color-focus);box-shadow:var(--jfi-form-control-box-shadow-focus)}*::part(input-invalid){border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error)}*::part(input-invalid):focus{border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error-focus)}.jfi-submit-button{font-family:var(--jfi-layout-font-family);color:var(--jfi-submit-button-color);background-color:var(--jfi-submit-button-background-color);border-color:var(--jfi-submit-button-border-color);padding:var(--jfi-submit-button-padding);font-size:var(--jfi-submit-button-font-size);border-radius:var(--jfi-submit-button-border-radius);width:var(--jfi-submit-button-width);box-shadow:var(--jfi-submit-button-box-shadow)}.jfi-submit-button:hover{color:var(--jfi-submit-button-color-hover);background-color:var(--jfi-submit-button-background-color-hover);border-color:var(--jfi-submit-button-border-color-hover)}.jfi-submit-button:focus{color:var(--jfi-submit-button-color-focus);background-color:var(--jfi-submit-button-background-color-focus);border-color:var(--jfi-submit-button-border-color-focus)}.btn.jfi-submit-button:active{color:var(--jfi-submit-button-color-active);background-color:var(--jfi-submit-button-background-color-active);border-color:var(--jfi-submit-button-border-color-active)}.btn.jfi-submit-button-loading{min-width:75px;color:var(--jfi-submit-button-color-loading);background-color:var(--jfi-submit-button-background-color-loading);border-color:var(--jfi-submit-button-border-color-loading)}.btn.jfi-submit-button-loading .spinner-border{border-top-color:var(--jfi-submit-button-color-loading);border-bottom-color:var(--jfi-submit-button-color-loading);border-left-color:var(--jfi-submit-button-color-loading)}";export{l as justifi_payment_form}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i}from"./p-fad19d75.js";import{P as r}from"./p-
|
|
1
|
+
import{r as t,c as s,h as i}from"./p-fad19d75.js";import{P as r}from"./p-b87b27ba.js";import"./p-56f6ce4c.js";import{P as e}from"./p-df21aaad.js";import"./p-e3fab0e2.js";import{C as o,a}from"./p-14c91ffd.js";import{g as n,a as p}from"./p-8115b2f4.js";import{E as c}from"./p-dce846bf.js";import{J as h}from"./p-32286934.js";import"./p-29c0b182.js";import"./p-57e1f2fd.js";import"./p-6c078cd1.js";const d=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.accountId=void 0,this.authToken=void 0,this.getPayments=void 0,this.errorMessage=null}componentWillLoad(){this.analytics=new h(this),this.initializeGetPayments()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeGetPayments()}initializeGetPayments(){this.accountId&&this.authToken?this.getPayments=(({id:t,authToken:s,service:i})=>async({params:r,onSuccess:a,onError:c})=>{var h,d;try{const m=await i.fetchPayments(t,s,r);if(m.error)return c({error:n(m.error),code:p(null===(d=m.error)||void 0===d?void 0:d.code),severity:o.ERROR});{const t=Object.assign({},m.page_info);a({payments:(null===(h=m.data)||void 0===h?void 0:h.map((t=>new e(t))))||[],pagingInfo:t})}}catch(t){const s=p(null==t?void 0:t.code);return c({error:t.message||t,code:s,severity:o.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new r}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:a.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}render(){return this.errorMessage?c(this.errorMessage):i("payments-list-core",{getPayments:this.getPayments,"onError-event":this.handleErrorEvent})}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{d as justifi_payments_list}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,c as i,h as t}from"./p-fad19d75.js";import{J as e}from"./p-
|
|
1
|
+
import{r as s,c as i,h as t}from"./p-fad19d75.js";import{J as e}from"./p-32286934.js";import{a as o,C as r}from"./p-14c91ffd.js";import{m as n,a}from"./p-5968ff8a.js";import{B as h}from"./p-c28db166.js";import{c as p}from"./p-57e1f2fd.js";import{A as d}from"./p-29c0b182.js";import"./p-6c078cd1.js";import"./p-8115b2f4.js";class c{async postProvisioning(s,i,t){const e={business_id:i,product_category:t};return d({authToken:s,apiOrigin:p.proxyApiOrigin}).post("entities/provisioning",JSON.stringify(e))}}const m=class{constructor(t){s(this,t),this.errorEvent=i(this,"error-event",7),this.postProvisioning=void 0,this.getBusiness=void 0,this.businessId=void 0,this.authToken=void 0,this.allowOptionalFields=!1,this.formTitle="Business Information"}propChanged(){this.initializeApi()}componentWillLoad(){this.analytics=new e(this),this.initializeApi()}disconnectedCallback(){this.analytics.cleanup()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=n({authToken:this.authToken,businessId:this.businessId,service:new h}),this.postProvisioning=a({authToken:this.authToken,businessId:this.businessId,product:"payment",service:new c})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:o.MISSING_PROPS,severity:r.ERROR})}render(){return t("justifi-payment-provisioning-core",{key:"a93ee23fabf4bdeb381e924bfdf684ddd183075a",businessId:this.businessId,authToken:this.authToken,allowOptionalFields:this.allowOptionalFields,formTitle:this.formTitle,getBusiness:this.getBusiness,postProvisioning:this.postProvisioning})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}};export{m as justifi_payment_provisioning}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,c as t,h as e,H as i}from"./p-fad19d75.js";import{a,C as n}from"./p-14c91ffd.js";import{m as o,b as r}from"./p-5968ff8a.js";import{B as h}from"./p-75b4daef.js";import{c as d,F as c,e as u}from"./p-2eab3c90.js";import{b,a as l}from"./p-d89bad72.js";import{z as f,A as p,i as m,B as v,C as y,D as g,E as k,F as _,G as w,H as j,I as C,J as O,K as T,L as S,M as I}from"./p-89887332.js";import{c as x}from"./p-ba5fae28.js";import{A as L}from"./p-29c0b182.js";import"./p-56f6ce4c.js";import"./p-df21aaad.js";import"./p-e3fab0e2.js";import{c as A}from"./p-ae263544.js";import{n as F}from"./p-8df7bde8.js";import{B}from"./p-af244664.js";import{S as E}from"./p-08b0fb31.js";import{B as H}from"./p-9c9c7dac.js";import"./p-8115b2f4.js";import"./p-6078a370.js";import"./p-1ff8810b.js";const D=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new h}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new h})):this.errorEvent.emit({message:"Missing required props",errorCode:a.MISSING_PROPS,severity:n.ERROR})}render(){return e("justifi-additional-questions-form-step-core",{key:"ede8f1336c69d47c651a5b4b95ee2746aae3aa52",getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}};class N{constructor(s){this.id=s.id,this.account_owner_name=s.account_owner_name,this.full_name=s.full_name,this.account_type=s.account_type,this.acct_last_four=s.acct_last_four,this.account_number_last4=s.account_number_last4,this.routing_number=s.routing_number,this.bank_name=s.bank_name,this.country=s.country,this.currency=s.currency,this.nickname=s.nickname,this.metadata=s.metadata,this.business_id=s.business_id,this.platform_account_id=s.platform_account_id,this.created_at=s.created_at,this.updated_at=s.updated_at}}const P=class{constructor(e){s(this,e),this.submitted=t(this,"submitted",7),this.formLoading=t(this,"formLoading",7),this.errorEvent=t(this,"error-event",7),this.fetchData=async()=>{this.formLoading.emit(!0);try{const s=await this.api.get(this.businessEndpoint);this.bankAccount=Object.assign({},new N(s.data.bank_accounts.length>0?s.data.bank_accounts[0]:{})),this.formController.setInitialValues(Object.assign({},this.bankAccount))}catch(s){this.errorEvent.emit({errorCode:a.FETCH_ERROR,message:s.message,severity:n.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.sendData=async s=>{this.formLoading.emit(!0);try{const t=this.formController.values.getValue(),e=Object.assign(Object.assign({},t),{business_id:this.businessId}),i=await this.api.post(this.bankAccountEndpoint,JSON.stringify(e));this.handleResponse(i,s)}catch(s){this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.message,severity:n.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.formController=void 0,this.errors={},this.bankAccount=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}get businessEndpoint(){return`entities/business/${this.businessId}`}get bankAccountEndpoint(){return"entities/bank_accounts"}get formDisabled(){var s;return!!(null===(s=this.bankAccount)||void 0===s?void 0:s.id)}handleResponse(s,t){s.error?this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.error.message,severity:n.ERROR,data:s.error}):t(),this.submitted.emit({data:s,metadata:{completedStep:b.bankAccount}})}async validateAndSubmit({onSuccess:s}){this.formDisabled?s():this.formController.validateAndSubmit((()=>this.sendData(s)))}componentWillLoad(){this.formController=new c((s=>{const t=d({bank_name:f.required("Enter bank name"),nickname:p.required("Enter nickname"),account_owner_name:m.required("Enter account owner name"),account_type:v.required("Select account type"),account_number:y.required("Enter account number"),routing_number:g.required("Enter routing number")}),e=d({bank_name:f.nullable(),nickname:p.nullable(),account_owner_name:m.nullable(),account_type:v.nullable(),account_number:y.nullable(),routing_number:g.nullable()});return s?e:t})(this.allowOptionalFields)),this.api=L({authToken:this.authToken,apiOrigin:A.proxyApiOrigin}),this.businessId&&this.authToken&&this.fetchData()}componentDidLoad(){this.formController.values.subscribe((s=>this.bankAccount=Object.assign({},s))),this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}render(){const s=this.formController.getInitialValues();return e("form",{key:"b2e106437693b667376fb8091117bc04899cce13"},e("fieldset",{key:"c6fc0e5b39278a4618abe0aeba8593b4800f23fa"},e("legend",{key:"f07c520e32491dd506f7ac16b03b0eb82a451035"},"Bank Account Info"),e("hr",{key:"43845af4ec6f143653154e301a49c870c688e8cb"}),e("div",{key:"911f450a0e81a7fcf6afb8b54be910da36b068d6",class:"row gy-3"},e("div",{key:"afe5dd40139f1098e69736cd08f00792916657b1",class:"col-12"},e("form-control-text",{key:"c590065940b5ef4ab5a125962e114d3bb99161e8",name:"bank_name",label:"Bank Name",defaultValue:s.bank_name,errorText:this.errors.bank_name,inputHandler:this.inputHandler,disabled:this.formDisabled})),e("div",{key:"ad7ac99fdae7bb0108675cf4ea522ae7b0c7b340",class:"col-12"},e("form-control-text",{key:"4e69debe8b184272c788f0ba206b7e983bb6bba5",name:"nickname",label:"Nickname",defaultValue:s.nickname,errorText:this.errors.nickname,inputHandler:this.inputHandler,disabled:this.formDisabled})),e("div",{key:"a478bb2330e48935b65d22a42287ab89f94b4808",class:"col-12"},e("form-control-text",{key:"c20531fb2c5e903eefeeb62fca5a831cf2542867",name:"account_owner_name",label:"Account Owner Name",defaultValue:s.account_owner_name,errorText:this.errors.account_owner_name,inputHandler:this.inputHandler,disabled:this.formDisabled})),e("div",{key:"63325c985d0341888ad9ce34fec48c623e275f55",class:"col-12"},e("form-control-select",{key:"b9fc86477dada5413e4a6e18b10e77de620996d9",name:"account_type",label:"Account Type",options:x,defaultValue:s.account_type,errorText:this.errors.account_type,inputHandler:this.inputHandler,disabled:this.formDisabled})),e("div",{key:"7d2849185532bb21c85cf8227749469e28fdc102",class:"col-12"},e("form-control-text",{key:"466a38e94ed054788596ec63bed4b4ffe646dc63",name:"account_number",label:"Account Number",defaultValue:s.account_number,maxLength:17,errorText:this.errors.account_number,inputHandler:this.inputHandler,keyDownHandler:F,disabled:this.formDisabled})),e("div",{key:"1162fae41dfc767cd038a37d7a7581b54dee1a1d",class:"col-12"},e("form-control-text",{key:"47ffb34b6523d34df02739231b5764418f162fe6",name:"routing_number",label:"Routing Number",defaultValue:s.routing_number,maxLength:9,errorText:this.errors.routing_number,inputHandler:this.inputHandler,keyDownHandler:F,disabled:this.formDisabled})))))}},q=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new h}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new h})):this.errorEvent.emit({message:"Missing required props",errorCode:a.MISSING_PROPS,severity:n.ERROR})}render(){return e("justifi-business-core-info-form-step-core",{key:"4ee53046d16fd42df4e09b10c338a740c22184ef",businessId:this.businessId,getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},V=class{constructor(e){s(this,e),this.submitted=t(this,"submitted",7),this.formLoading=t(this,"formLoading",7),this.errorEvent=t(this,"error-event",7),this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.fetchData=async()=>{this.renderState="loading",this.formLoading.emit(!0);try{const s=await this.api.get(this.businessEndpoint);this.business=Object.assign({},new B(s.data)),this.existingDocuments=s.data.documents,this.paymentVolume=s.data.additional_questions.business_payment_volume}catch(s){this.errorEvent.emit({errorCode:a.FETCH_ERROR,message:s.message,severity:n.ERROR,data:s}),this.renderState="error"}finally{this.initializeFormController(),this.formLoading.emit(!1),this.renderState="success"}},this.initializeFormController=()=>{this.formController=new c(((s,t,e)=>{const i=d({voided_check:k(t,e),government_id:_.nullable(),ss4:w.nullable(),other:j.nullable(),balance_sheet:C(s,t,e),bank_statement:O(s,t,e),profit_and_loss_statement:T(s,t,e)}),a=d({voided_check:k(t,e),government_id:_.nullable(),ss4:w.nullable(),other:j.nullable(),balance_sheet:C(s,t,e),bank_statement:O(s,t,e),profit_and_loss_statement:T(s,t,e)});return e?a:i})(this.paymentVolume,this.existingDocuments,this.allowOptionalFields)),this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))},this.createDocumentRecord=async s=>{this.formLoading.emit(!0);const t=s.record_data;try{const e=await this.api.post(this.documentEndpoint,JSON.stringify(t));return this.handleDocRecordResponse(s,e)}catch(s){return this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.message,severity:n.ERROR,data:s}),!1}},this.handleDocRecordResponse=(s,t)=>t.error?(this.errorEvent.emit({errorCode:a.POST_ERROR,message:t.error.message,severity:n.ERROR,data:t.error}),!1):(s.setPresignedUrl(t.data.presigned_url),!0),this.uploadDocument=async s=>{if(!s.presigned_url)throw new Error("Presigned URL is not set");const t=await fetch(s.presigned_url,{method:"PUT",body:s.fileString});return this.handleUploadResponse(t)},this.handleUploadResponse=s=>s.error?(this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.error.message,severity:n.ERROR,data:s.error}),!1):(this.submitted.emit({data:s,metadata:{completedStep:b.documentUpload}}),!0),this.storeFiles=s=>{const t=Array.from(s.detail.fileList),e=s.detail.document_type,i=t.map((s=>new S({file:s,document_type:e},this.businessId)));this.documentData[e]=i},this.sendData=async s=>{try{const t=Object.values(this.documentData).flat();if(!t.length)return s();const e=t.map((s=>this.createDocumentRecord(s)));if(!await Promise.all(e))return;const i=t.map((s=>this.uploadDocument(s)));if(!await Promise.all(i))return;await s()}finally{this.formLoading.emit(!1)}},this.formController=void 0,this.errors={},this.existingDocuments=[],this.paymentVolume=void 0,this.business=void 0,this.documentData=new I,this.renderState="loading",this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}get businessEndpoint(){return`entities/business/${this.businessId}`}get documentEndpoint(){return"entities/document"}componentWillLoad(){this.api=L({authToken:this.authToken,apiOrigin:A.proxyApiOrigin}),this.businessId&&this.authToken&&this.fetchData()}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get isLoading(){return"loading"===this.renderState}get isError(){return"error"===this.renderState}get documentsOnFile(){return this.isError?null:this.isLoading?e(E,{variant:"rounded",height:"50px"}):e("justifi-business-documents-on-file",{documents:this.existingDocuments})}get formInputs(){return this.isError?null:this.isLoading?e(E,{variant:"rounded",height:"350px"}):e("justifi-business-document-upload-input-group",{paymentVolume:this.paymentVolume,inputHandler:this.inputHandler,storeFiles:this.storeFiles,errors:this.errors})}render(){return e("form",{key:"8f2e1d262cd5050b315019a1947b1474eaf995de"},e("fieldset",{key:"d022b1c294835e456a9067fcfdbf2b93a33c8ca8"},e("legend",{key:"522ecbab0489efa6d4294f38f792a28770010f1e"},"Document Uploads"),e("p",{key:"b49a6b3a4a7c79b368b20455b4ed4a943f08ec51"},"Various file formats such as PDF, DOC, DOCX, JPEG, and others are accepted. Multiple files can be uploaded for each document category."),e("hr",{key:"3d8c2f7f5b128b99ceaa501166ae60c490b12378"}),this.documentsOnFile,e("div",{key:"d2627185483e1be43c0b34d80b1fcfa850decd28",class:"d-flex flex-column"},this.formInputs)))}},W=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new h}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new h})):this.errorEvent.emit({message:"Missing required props",errorCode:a.MISSING_PROPS,severity:n.ERROR})}render(){return e(i,{key:"213a68fd3543eb912c6fed376128ba877ba75871"},e("justifi-business-owners-form-step-core",{key:"5acee797bd35f5b60cadc5ddd50f560532dfe8b1",authToken:this.authToken,businessId:this.businessId,getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s}))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},M=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new h}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new h})):this.errorEvent.emit({message:"Missing required props",errorCode:a.MISSING_PROPS,severity:n.ERROR})}render(){return e("justifi-business-representative-form-step-core",{key:"866d8cf33d53eff562dac1d36898b4c5695bf39b",getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},z=class{constructor(e){s(this,e),this.submitted=t(this,"submitted",7),this.formLoading=t(this,"formLoading",7),this.errorEvent=t(this,"error-event",7),this.fetchData=async()=>{this.formLoading.emit(!0);try{const s=await this.api.get(this.businessEndpoint);this.acceptedTermsBefore=s.data.terms_conditions_accepted}catch(s){this.errorEvent.emit({errorCode:a.FETCH_ERROR,message:s.message,severity:n.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.sendData=async s=>{this.formLoading.emit(!0);try{const t=JSON.stringify(this.termsPayload),e=await this.api.post(this.termsConditionsEndpoint,t);this.handleResponse(e,s)}catch(s){this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.message,severity:n.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.formController=void 0,this.errors={},this.acceptedTermsBefore=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}get businessEndpoint(){return`entities/business/${this.businessId}`}get termsConditionsEndpoint(){return"entities/terms_and_conditions"}get formHelperText(){return this.acceptedTermsBefore?"You have already accepted the terms and conditions.":null}get termsPayload(){return{business_id:this.businessId,accepted:this.formController.values.getValue().accepted,user_agent:window.navigator.userAgent}}async componentWillLoad(){this.api=L({authToken:this.authToken,apiOrigin:A.proxyApiOrigin}),this.formController=new c((s=>{const t=d({accepted:u().oneOf([!0],"You must agree to the terms and conditions to continue").required("You must agree to the terms and conditions to continue")}),e=d({accepted:u().nullable()});return s?e:t})(this.allowOptionalFields)),this.businessId&&this.authToken&&this.fetchData()}handleResponse(s,t){s.error?this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.error.message,severity:n.ERROR,data:s.error}):t(),this.submitted.emit({data:s,metadata:{completedStep:b.termsAndConditions}})}async validateAndSubmit({onSuccess:s}){this.acceptedTermsBefore?(this.submitted.emit({metadata:{completedStep:b.termsAndConditions}}),s()):this.formController.validateAndSubmit((()=>this.sendData(s)))}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}render(){return e("form",{key:"29b946b553d7a8011bee8f1997888f04b51897b3"},e("fieldset",{key:"c6e6c2577a66e58de8aabaac572cd7dab0a609b2"},e("legend",{key:"4cf7e19049ee60807ffc5cbecbc8b87e9725590a"},"Terms and Conditions"),e("hr",{key:"b0d0bb46987a864a20a419eb0b2338fd57d07765"}),e("justifi-business-terms-conditions-text",{key:"c936f2205bf123266d8eed2f12194eb2d8feb056"}),e("br",{key:"e4f38ba5341c5fcf5938c3637905612e02bc7077"}),e("div",{key:"163401aaaee6e037d94182e5005625055bda66c5",class:"row-gy-3"},e("div",{key:"3925d9b802f62e16cc41407170593b4b9a676bd9",class:"col-12"},e("form-control-checkbox",{key:"d86e00bfebe915d84a41486be34cec3555598d92",name:"accepted",label:"I agree to the terms and conditions",inputHandler:this.inputHandler,errorText:this.errors.accepted,disabled:this.acceptedTermsBefore,helpText:this.formHelperText})))))}},J=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new h}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new h})):this.errorEvent.emit({message:"Missing required props",errorCode:a.MISSING_PROPS,severity:n.ERROR})}render(){return e("justifi-legal-address-form-step-core",{key:"7455b4950e2ca1121004943ad81537c583438738",getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},R=class{constructor(t){s(this,t),this.currentStep=void 0,this.totalSteps=void 0,this.formLoading=void 0,this.formDisabled=void 0,this.previousStepButtonOnClick=void 0,this.nextStepButtonOnClick=void 0}get showPreviousStepButton(){return this.currentStep>0}get showNextStepButton(){return this.currentStep<this.totalSteps}get showSubmitButton(){return this.currentStep===this.totalSteps}render(){return e("div",{key:"3df3796f2bb35819373564c0002e35d14c85e360",class:"d-flex gap-2"},e(H,{key:"3f8fd4e288b2eed6776c77b44dda816e8a0580cd",variant:"secondary",type:"button",onClick:()=>this.previousStepButtonOnClick(),disabled:this.formDisabled,hidden:!this.showPreviousStepButton},"Previous"),e(H,{key:"83c7d2405d6e4f88f721a95250aa847a6999a211",variant:"primary",type:"button",onClick:s=>this.nextStepButtonOnClick(s,l.nextStep),disabled:this.formDisabled,isLoading:this.formLoading,hidden:!this.showNextStepButton},"Next"),e(H,{key:"d87bcdc9bea52b11307e31bd1d99636be05d7156",variant:"primary",type:"submit",onClick:s=>this.nextStepButtonOnClick(s,l.submit),disabled:this.formDisabled,isLoading:this.formLoading,hidden:!this.showSubmitButton},"Submit"))}},U=class{constructor(i){s(this,i),this.formCompleted=t(this,"formCompleted",7),this.componentStepMapping={0:()=>e("justifi-business-core-info-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[0]=s,allowOptionalFields:this.allowOptionalFields}),1:()=>e("justifi-legal-address-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[1]=s,allowOptionalFields:this.allowOptionalFields}),2:()=>e("justifi-additional-questions-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[2]=s,allowOptionalFields:this.allowOptionalFields}),3:()=>e("justifi-business-representative-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[3]=s,allowOptionalFields:this.allowOptionalFields}),4:()=>e("justifi-business-owners-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[4]=s,allowOptionalFields:this.allowOptionalFields}),5:()=>e("justifi-business-bank-account-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[5]=s,onFormLoading:this.handleFormLoading,allowOptionalFields:this.allowOptionalFields}),6:()=>e("justifi-business-document-upload-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[6]=s,onFormLoading:this.handleFormLoading,allowOptionalFields:this.allowOptionalFields}),7:()=>e("justifi-business-terms-conditions-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[7]=s,onFormLoading:this.handleFormLoading,allowOptionalFields:this.allowOptionalFields,onSubmitted:()=>this.formCompleted.emit()})},this.businessId=void 0,this.authToken=void 0,this.refs=void 0,this.currentStep=void 0,this.allowOptionalFields=!1,this.handleFormLoading=void 0}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}render(){return e("div",{key:"8f02aa3223e38cda70319c127f60e5d2f3c5abe5",class:"col-12 mb-4"},this.currentStepComponent)}};export{D as justifi_additional_questions_form_step,P as justifi_business_bank_account_form_step,q as justifi_business_core_info_form_step,V as justifi_business_document_upload_form_step,W as justifi_business_owners_form_step,M as justifi_business_representative_form_step,z as justifi_business_terms_conditions_form_step,J as justifi_legal_address_form_step,R as justifi_payment_provisioning_form_buttons,U as justifi_payment_provisioning_form_steps}
|
|
1
|
+
import{r as s,c as t,h as e,H as i}from"./p-fad19d75.js";import{a,C as n}from"./p-14c91ffd.js";import{m as o,b as r}from"./p-5968ff8a.js";import{B as h}from"./p-c28db166.js";import{c as d,F as c,e as u}from"./p-2eab3c90.js";import{b,a as l}from"./p-d89bad72.js";import{z as f,A as p,i as m,B as v,C as y,D as g,E as k,F as _,G as w,H as j,I as C,J as O,K as T,L as S,M as I}from"./p-89887332.js";import{c as x}from"./p-ba5fae28.js";import{A as L}from"./p-29c0b182.js";import"./p-56f6ce4c.js";import"./p-df21aaad.js";import"./p-e3fab0e2.js";import{c as A}from"./p-57e1f2fd.js";import{n as F}from"./p-8df7bde8.js";import{B}from"./p-af244664.js";import{S as E}from"./p-08b0fb31.js";import{B as H}from"./p-9c9c7dac.js";import"./p-8115b2f4.js";import"./p-6078a370.js";import"./p-1ff8810b.js";const D=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new h}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new h})):this.errorEvent.emit({message:"Missing required props",errorCode:a.MISSING_PROPS,severity:n.ERROR})}render(){return e("justifi-additional-questions-form-step-core",{key:"ede8f1336c69d47c651a5b4b95ee2746aae3aa52",getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}};class N{constructor(s){this.id=s.id,this.account_owner_name=s.account_owner_name,this.full_name=s.full_name,this.account_type=s.account_type,this.acct_last_four=s.acct_last_four,this.account_number_last4=s.account_number_last4,this.routing_number=s.routing_number,this.bank_name=s.bank_name,this.country=s.country,this.currency=s.currency,this.nickname=s.nickname,this.metadata=s.metadata,this.business_id=s.business_id,this.platform_account_id=s.platform_account_id,this.created_at=s.created_at,this.updated_at=s.updated_at}}const P=class{constructor(e){s(this,e),this.submitted=t(this,"submitted",7),this.formLoading=t(this,"formLoading",7),this.errorEvent=t(this,"error-event",7),this.fetchData=async()=>{this.formLoading.emit(!0);try{const s=await this.api.get(this.businessEndpoint);this.bankAccount=Object.assign({},new N(s.data.bank_accounts.length>0?s.data.bank_accounts[0]:{})),this.formController.setInitialValues(Object.assign({},this.bankAccount))}catch(s){this.errorEvent.emit({errorCode:a.FETCH_ERROR,message:s.message,severity:n.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.sendData=async s=>{this.formLoading.emit(!0);try{const t=this.formController.values.getValue(),e=Object.assign(Object.assign({},t),{business_id:this.businessId}),i=await this.api.post(this.bankAccountEndpoint,JSON.stringify(e));this.handleResponse(i,s)}catch(s){this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.message,severity:n.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.formController=void 0,this.errors={},this.bankAccount=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}get businessEndpoint(){return`entities/business/${this.businessId}`}get bankAccountEndpoint(){return"entities/bank_accounts"}get formDisabled(){var s;return!!(null===(s=this.bankAccount)||void 0===s?void 0:s.id)}handleResponse(s,t){s.error?this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.error.message,severity:n.ERROR,data:s.error}):t(),this.submitted.emit({data:s,metadata:{completedStep:b.bankAccount}})}async validateAndSubmit({onSuccess:s}){this.formDisabled?s():this.formController.validateAndSubmit((()=>this.sendData(s)))}componentWillLoad(){this.formController=new c((s=>{const t=d({bank_name:f.required("Enter bank name"),nickname:p.required("Enter nickname"),account_owner_name:m.required("Enter account owner name"),account_type:v.required("Select account type"),account_number:y.required("Enter account number"),routing_number:g.required("Enter routing number")}),e=d({bank_name:f.nullable(),nickname:p.nullable(),account_owner_name:m.nullable(),account_type:v.nullable(),account_number:y.nullable(),routing_number:g.nullable()});return s?e:t})(this.allowOptionalFields)),this.api=L({authToken:this.authToken,apiOrigin:A.proxyApiOrigin}),this.businessId&&this.authToken&&this.fetchData()}componentDidLoad(){this.formController.values.subscribe((s=>this.bankAccount=Object.assign({},s))),this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}render(){const s=this.formController.getInitialValues();return e("form",{key:"b2e106437693b667376fb8091117bc04899cce13"},e("fieldset",{key:"c6fc0e5b39278a4618abe0aeba8593b4800f23fa"},e("legend",{key:"f07c520e32491dd506f7ac16b03b0eb82a451035"},"Bank Account Info"),e("hr",{key:"43845af4ec6f143653154e301a49c870c688e8cb"}),e("div",{key:"911f450a0e81a7fcf6afb8b54be910da36b068d6",class:"row gy-3"},e("div",{key:"afe5dd40139f1098e69736cd08f00792916657b1",class:"col-12"},e("form-control-text",{key:"c590065940b5ef4ab5a125962e114d3bb99161e8",name:"bank_name",label:"Bank Name",defaultValue:s.bank_name,errorText:this.errors.bank_name,inputHandler:this.inputHandler,disabled:this.formDisabled})),e("div",{key:"ad7ac99fdae7bb0108675cf4ea522ae7b0c7b340",class:"col-12"},e("form-control-text",{key:"4e69debe8b184272c788f0ba206b7e983bb6bba5",name:"nickname",label:"Nickname",defaultValue:s.nickname,errorText:this.errors.nickname,inputHandler:this.inputHandler,disabled:this.formDisabled})),e("div",{key:"a478bb2330e48935b65d22a42287ab89f94b4808",class:"col-12"},e("form-control-text",{key:"c20531fb2c5e903eefeeb62fca5a831cf2542867",name:"account_owner_name",label:"Account Owner Name",defaultValue:s.account_owner_name,errorText:this.errors.account_owner_name,inputHandler:this.inputHandler,disabled:this.formDisabled})),e("div",{key:"63325c985d0341888ad9ce34fec48c623e275f55",class:"col-12"},e("form-control-select",{key:"b9fc86477dada5413e4a6e18b10e77de620996d9",name:"account_type",label:"Account Type",options:x,defaultValue:s.account_type,errorText:this.errors.account_type,inputHandler:this.inputHandler,disabled:this.formDisabled})),e("div",{key:"7d2849185532bb21c85cf8227749469e28fdc102",class:"col-12"},e("form-control-text",{key:"466a38e94ed054788596ec63bed4b4ffe646dc63",name:"account_number",label:"Account Number",defaultValue:s.account_number,maxLength:17,errorText:this.errors.account_number,inputHandler:this.inputHandler,keyDownHandler:F,disabled:this.formDisabled})),e("div",{key:"1162fae41dfc767cd038a37d7a7581b54dee1a1d",class:"col-12"},e("form-control-text",{key:"47ffb34b6523d34df02739231b5764418f162fe6",name:"routing_number",label:"Routing Number",defaultValue:s.routing_number,maxLength:9,errorText:this.errors.routing_number,inputHandler:this.inputHandler,keyDownHandler:F,disabled:this.formDisabled})))))}},q=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new h}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new h})):this.errorEvent.emit({message:"Missing required props",errorCode:a.MISSING_PROPS,severity:n.ERROR})}render(){return e("justifi-business-core-info-form-step-core",{key:"4ee53046d16fd42df4e09b10c338a740c22184ef",businessId:this.businessId,getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},V=class{constructor(e){s(this,e),this.submitted=t(this,"submitted",7),this.formLoading=t(this,"formLoading",7),this.errorEvent=t(this,"error-event",7),this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.fetchData=async()=>{this.renderState="loading",this.formLoading.emit(!0);try{const s=await this.api.get(this.businessEndpoint);this.business=Object.assign({},new B(s.data)),this.existingDocuments=s.data.documents,this.paymentVolume=s.data.additional_questions.business_payment_volume}catch(s){this.errorEvent.emit({errorCode:a.FETCH_ERROR,message:s.message,severity:n.ERROR,data:s}),this.renderState="error"}finally{this.initializeFormController(),this.formLoading.emit(!1),this.renderState="success"}},this.initializeFormController=()=>{this.formController=new c(((s,t,e)=>{const i=d({voided_check:k(t,e),government_id:_.nullable(),ss4:w.nullable(),other:j.nullable(),balance_sheet:C(s,t,e),bank_statement:O(s,t,e),profit_and_loss_statement:T(s,t,e)}),a=d({voided_check:k(t,e),government_id:_.nullable(),ss4:w.nullable(),other:j.nullable(),balance_sheet:C(s,t,e),bank_statement:O(s,t,e),profit_and_loss_statement:T(s,t,e)});return e?a:i})(this.paymentVolume,this.existingDocuments,this.allowOptionalFields)),this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))},this.createDocumentRecord=async s=>{this.formLoading.emit(!0);const t=s.record_data;try{const e=await this.api.post(this.documentEndpoint,JSON.stringify(t));return this.handleDocRecordResponse(s,e)}catch(s){return this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.message,severity:n.ERROR,data:s}),!1}},this.handleDocRecordResponse=(s,t)=>t.error?(this.errorEvent.emit({errorCode:a.POST_ERROR,message:t.error.message,severity:n.ERROR,data:t.error}),!1):(s.setPresignedUrl(t.data.presigned_url),!0),this.uploadDocument=async s=>{if(!s.presigned_url)throw new Error("Presigned URL is not set");const t=await fetch(s.presigned_url,{method:"PUT",body:s.fileString});return this.handleUploadResponse(t)},this.handleUploadResponse=s=>s.error?(this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.error.message,severity:n.ERROR,data:s.error}),!1):(this.submitted.emit({data:s,metadata:{completedStep:b.documentUpload}}),!0),this.storeFiles=s=>{const t=Array.from(s.detail.fileList),e=s.detail.document_type,i=t.map((s=>new S({file:s,document_type:e},this.businessId)));this.documentData[e]=i},this.sendData=async s=>{try{const t=Object.values(this.documentData).flat();if(!t.length)return s();const e=t.map((s=>this.createDocumentRecord(s)));if(!await Promise.all(e))return;const i=t.map((s=>this.uploadDocument(s)));if(!await Promise.all(i))return;await s()}finally{this.formLoading.emit(!1)}},this.formController=void 0,this.errors={},this.existingDocuments=[],this.paymentVolume=void 0,this.business=void 0,this.documentData=new I,this.renderState="loading",this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}get businessEndpoint(){return`entities/business/${this.businessId}`}get documentEndpoint(){return"entities/document"}componentWillLoad(){this.api=L({authToken:this.authToken,apiOrigin:A.proxyApiOrigin}),this.businessId&&this.authToken&&this.fetchData()}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get isLoading(){return"loading"===this.renderState}get isError(){return"error"===this.renderState}get documentsOnFile(){return this.isError?null:this.isLoading?e(E,{variant:"rounded",height:"50px"}):e("justifi-business-documents-on-file",{documents:this.existingDocuments})}get formInputs(){return this.isError?null:this.isLoading?e(E,{variant:"rounded",height:"350px"}):e("justifi-business-document-upload-input-group",{paymentVolume:this.paymentVolume,inputHandler:this.inputHandler,storeFiles:this.storeFiles,errors:this.errors})}render(){return e("form",{key:"8f2e1d262cd5050b315019a1947b1474eaf995de"},e("fieldset",{key:"d022b1c294835e456a9067fcfdbf2b93a33c8ca8"},e("legend",{key:"522ecbab0489efa6d4294f38f792a28770010f1e"},"Document Uploads"),e("p",{key:"b49a6b3a4a7c79b368b20455b4ed4a943f08ec51"},"Various file formats such as PDF, DOC, DOCX, JPEG, and others are accepted. Multiple files can be uploaded for each document category."),e("hr",{key:"3d8c2f7f5b128b99ceaa501166ae60c490b12378"}),this.documentsOnFile,e("div",{key:"d2627185483e1be43c0b34d80b1fcfa850decd28",class:"d-flex flex-column"},this.formInputs)))}},W=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new h}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new h})):this.errorEvent.emit({message:"Missing required props",errorCode:a.MISSING_PROPS,severity:n.ERROR})}render(){return e(i,{key:"213a68fd3543eb912c6fed376128ba877ba75871"},e("justifi-business-owners-form-step-core",{key:"5acee797bd35f5b60cadc5ddd50f560532dfe8b1",authToken:this.authToken,businessId:this.businessId,getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s}))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},M=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new h}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new h})):this.errorEvent.emit({message:"Missing required props",errorCode:a.MISSING_PROPS,severity:n.ERROR})}render(){return e("justifi-business-representative-form-step-core",{key:"866d8cf33d53eff562dac1d36898b4c5695bf39b",getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},z=class{constructor(e){s(this,e),this.submitted=t(this,"submitted",7),this.formLoading=t(this,"formLoading",7),this.errorEvent=t(this,"error-event",7),this.fetchData=async()=>{this.formLoading.emit(!0);try{const s=await this.api.get(this.businessEndpoint);this.acceptedTermsBefore=s.data.terms_conditions_accepted}catch(s){this.errorEvent.emit({errorCode:a.FETCH_ERROR,message:s.message,severity:n.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.sendData=async s=>{this.formLoading.emit(!0);try{const t=JSON.stringify(this.termsPayload),e=await this.api.post(this.termsConditionsEndpoint,t);this.handleResponse(e,s)}catch(s){this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.message,severity:n.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.formController=void 0,this.errors={},this.acceptedTermsBefore=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}get businessEndpoint(){return`entities/business/${this.businessId}`}get termsConditionsEndpoint(){return"entities/terms_and_conditions"}get formHelperText(){return this.acceptedTermsBefore?"You have already accepted the terms and conditions.":null}get termsPayload(){return{business_id:this.businessId,accepted:this.formController.values.getValue().accepted,user_agent:window.navigator.userAgent}}async componentWillLoad(){this.api=L({authToken:this.authToken,apiOrigin:A.proxyApiOrigin}),this.formController=new c((s=>{const t=d({accepted:u().oneOf([!0],"You must agree to the terms and conditions to continue").required("You must agree to the terms and conditions to continue")}),e=d({accepted:u().nullable()});return s?e:t})(this.allowOptionalFields)),this.businessId&&this.authToken&&this.fetchData()}handleResponse(s,t){s.error?this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.error.message,severity:n.ERROR,data:s.error}):t(),this.submitted.emit({data:s,metadata:{completedStep:b.termsAndConditions}})}async validateAndSubmit({onSuccess:s}){this.acceptedTermsBefore?(this.submitted.emit({metadata:{completedStep:b.termsAndConditions}}),s()):this.formController.validateAndSubmit((()=>this.sendData(s)))}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}render(){return e("form",{key:"29b946b553d7a8011bee8f1997888f04b51897b3"},e("fieldset",{key:"c6e6c2577a66e58de8aabaac572cd7dab0a609b2"},e("legend",{key:"4cf7e19049ee60807ffc5cbecbc8b87e9725590a"},"Terms and Conditions"),e("hr",{key:"b0d0bb46987a864a20a419eb0b2338fd57d07765"}),e("justifi-business-terms-conditions-text",{key:"c936f2205bf123266d8eed2f12194eb2d8feb056"}),e("br",{key:"e4f38ba5341c5fcf5938c3637905612e02bc7077"}),e("div",{key:"163401aaaee6e037d94182e5005625055bda66c5",class:"row-gy-3"},e("div",{key:"3925d9b802f62e16cc41407170593b4b9a676bd9",class:"col-12"},e("form-control-checkbox",{key:"d86e00bfebe915d84a41486be34cec3555598d92",name:"accepted",label:"I agree to the terms and conditions",inputHandler:this.inputHandler,errorText:this.errors.accepted,disabled:this.acceptedTermsBefore,helpText:this.formHelperText})))))}},J=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new h}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new h})):this.errorEvent.emit({message:"Missing required props",errorCode:a.MISSING_PROPS,severity:n.ERROR})}render(){return e("justifi-legal-address-form-step-core",{key:"7455b4950e2ca1121004943ad81537c583438738",getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},R=class{constructor(t){s(this,t),this.currentStep=void 0,this.totalSteps=void 0,this.formLoading=void 0,this.formDisabled=void 0,this.previousStepButtonOnClick=void 0,this.nextStepButtonOnClick=void 0}get showPreviousStepButton(){return this.currentStep>0}get showNextStepButton(){return this.currentStep<this.totalSteps}get showSubmitButton(){return this.currentStep===this.totalSteps}render(){return e("div",{key:"3df3796f2bb35819373564c0002e35d14c85e360",class:"d-flex gap-2"},e(H,{key:"3f8fd4e288b2eed6776c77b44dda816e8a0580cd",variant:"secondary",type:"button",onClick:()=>this.previousStepButtonOnClick(),disabled:this.formDisabled,hidden:!this.showPreviousStepButton},"Previous"),e(H,{key:"83c7d2405d6e4f88f721a95250aa847a6999a211",variant:"primary",type:"button",onClick:s=>this.nextStepButtonOnClick(s,l.nextStep),disabled:this.formDisabled,isLoading:this.formLoading,hidden:!this.showNextStepButton},"Next"),e(H,{key:"d87bcdc9bea52b11307e31bd1d99636be05d7156",variant:"primary",type:"submit",onClick:s=>this.nextStepButtonOnClick(s,l.submit),disabled:this.formDisabled,isLoading:this.formLoading,hidden:!this.showSubmitButton},"Submit"))}},U=class{constructor(i){s(this,i),this.formCompleted=t(this,"formCompleted",7),this.componentStepMapping={0:()=>e("justifi-business-core-info-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[0]=s,allowOptionalFields:this.allowOptionalFields}),1:()=>e("justifi-legal-address-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[1]=s,allowOptionalFields:this.allowOptionalFields}),2:()=>e("justifi-additional-questions-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[2]=s,allowOptionalFields:this.allowOptionalFields}),3:()=>e("justifi-business-representative-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[3]=s,allowOptionalFields:this.allowOptionalFields}),4:()=>e("justifi-business-owners-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[4]=s,allowOptionalFields:this.allowOptionalFields}),5:()=>e("justifi-business-bank-account-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[5]=s,onFormLoading:this.handleFormLoading,allowOptionalFields:this.allowOptionalFields}),6:()=>e("justifi-business-document-upload-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[6]=s,onFormLoading:this.handleFormLoading,allowOptionalFields:this.allowOptionalFields}),7:()=>e("justifi-business-terms-conditions-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[7]=s,onFormLoading:this.handleFormLoading,allowOptionalFields:this.allowOptionalFields,onSubmitted:()=>this.formCompleted.emit()})},this.businessId=void 0,this.authToken=void 0,this.refs=void 0,this.currentStep=void 0,this.allowOptionalFields=!1,this.handleFormLoading=void 0}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}render(){return e("div",{key:"8f02aa3223e38cda70319c127f60e5d2f3c5abe5",class:"col-12 mb-4"},this.currentStepComponent)}};export{D as justifi_additional_questions_form_step,P as justifi_business_bank_account_form_step,q as justifi_business_core_info_form_step,V as justifi_business_document_upload_form_step,W as justifi_business_owners_form_step,M as justifi_business_representative_form_step,z as justifi_business_terms_conditions_form_step,J as justifi_legal_address_form_step,R as justifi_payment_provisioning_form_buttons,U as justifi_payment_provisioning_form_steps}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-fad19d75.js";export{s as setNonce}from"./p-fad19d75.js";import{g as a}from"./p-e1255160.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((async e=>(await a(),t(JSON.parse('[["p-9279aa49",[[0,"justifi-payment-provisioning",{"businessId":[1,"business-id"],"authToken":[1,"auth-token"],"allowOptionalFields":[4,"allow-optional-fields"],"formTitle":[1,"form-title"],"postProvisioning":[32],"getBusiness":[32]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}]]],["p-623a4479",[[1,"justifi-business-form",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"hideErrors":[4,"hide-errors"],"formTitle":[1,"form-title"],"removeTitle":[4,"remove-title"],"isLoading":[32],"errorMessage":[32]}]]],["p-301e0493",[[4,"justifi-checkout",{"iframeOrigin":[1,"iframe-origin"],"authToken":[1,"auth-token"],"checkoutId":[1,"checkout-id"],"disableCreditCard":[4,"disable-credit-card"],"disableBankAccount":[4,"disable-bank-account"],"disableBnpl":[4,"disable-bnpl"],"disablePaymentMethodGroup":[4,"disable-payment-method-group"],"getCheckout":[32],"complete":[32],"errorMessage":[32],"fillBillingForm":[64]},null,{"authToken":["propChanged"],"checkoutId":["propChanged"]}]]],["p-304dd644",[[1,"justifi-payment-form",{"bankAccount":[4,"bank-account"],"card":[4],"email":[1],"clientId":[1,"client-id"],"authToken":[1,"auth-token"],"accountId":[1,"account-id"],"submitButtonText":[1,"submit-button-text"],"submitButtonEnabled":[32],"isLoading":[32],"selectedPaymentMethodType":[32],"fillBillingForm":[64],"enableSubmitButton":[64],"disableSubmitButton":[64]}]]],["p-27981600",[[1,"justifi-business-details",{"businessId":[1,"business-id"],"authToken":[1,"auth-token"],"errorMessage":[32],"getBusiness":[32]}]]],["p-cd7105dd",[[1,"justifi-payments-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"getPayments":[32],"errorMessage":[32]},null,{"accountId":["propChanged"],"authToken":["propChanged"]}]]],["p-e7067ef2",[[1,"justifi-payouts-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"getPayouts":[32],"getPayoutCSV":[32],"errorMessage":[32]},null,{"accountId":["propChanged"],"authToken":["propChanged"]}]]],["p-bc92235c",[[1,"justifi-refund-form",{"authToken":[1,"auth-token"],"paymentId":[1,"payment-id"],"amount":[2],"submitButtonText":[1,"submit-button-text"],"withButton":[4,"with-button"],"refundInfoText":[1,"refund-info-text"],"errors":[32],"isSubmitting":[32]}]]],["p-e31f0f3e",[[0,"form-control-number",{"label":[1],"name":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[1,"default-value"],"inputHandler":[16],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}]]],["p-195f92e9",[[1,"justifi-payment-details",{"paymentId":[1,"payment-id"],"authToken":[1,"auth-token"],"getPaymentDetails":[32],"errorMessage":[32]},null,{"paymentId":["propChanged"],"authToken":["propChanged"]}]]],["p-c4b87db2",[[1,"justifi-payout-details",{"payoutId":[1,"payout-id"],"authToken":[1,"auth-token"],"getPayout":[32],"getPayoutCSV":[32],"errorMessage":[32]},null,{"payoutId":["propChanged"],"authToken":["propChanged"]}]]],["p-d1fbeae5",[[0,"justifi-bank-account-form",{"validationMode":[1025,"validation-mode"],"iframeOrigin":[1025,"iframe-origin"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64],"resize":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenized","tokenizeHandler"],[0,"paymentMethodFormValidated","validateHandler"]]]]],["p-8c1e981b",[[0,"justifi-card-form",{"validationMode":[1025,"validation-mode"],"iframeOrigin":[1025,"iframe-origin"],"singleLine":[4,"single-line"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64],"resize":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenized","tokenizeHandler"],[0,"paymentMethodFormValidated","validateHandler"]]]]],["p-1a43e355",[[0,"gross-payment-chart-core",{"getGrossPayment":[16],"grossVolumeReport":[32],"loading":[32],"errorMessage":[32]},null,{"getGrossPayment":["propChanged"],"grossVolumeReport":["grossVolumeReportChanged"]}]]],["p-99022846",[[1,"justifi-gross-payment-chart",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"getGrossPayment":[32],"errorMessage":[32]},null,{"accountId":["propChanged"],"authToken":["propChanged"]}]]],["p-25dba252",[[1,"justifi-season-interruption-insurance",{"authToken":[1,"auth-token"],"checkoutId":[1,"checkout-id"],"primaryIdentityFirstName":[1,"primary-identity-first-name"],"primaryIdentityLastName":[1,"primary-identity-last-name"],"primaryIdentityState":[1,"primary-identity-state"],"primaryIdentityPostalCode":[1,"primary-identity-postal-code"],"primaryIdentityCountry":[1,"primary-identity-country"],"primaryIdentityEmailAddress":[1,"primary-identity-email-address"],"policyAttributesInsurableAmount":[2,"policy-attributes-insurable-amount"],"policyAttributesStartDate":[1,"policy-attributes-start-date"],"policyAttributesEndDate":[1,"policy-attributes-end-date"],"coveredIdentityFirstName":[1,"covered-identity-first-name"],"coveredIdentityLastName":[1,"covered-identity-last-name"],"getQuote":[32],"toggleCoverage":[32],"quote":[32],"validate":[64]}]]],["p-07109641",[[0,"form-control-select",{"label":[1],"name":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[1,"default-value"],"inputHandler":[16],"options":[16],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}],[0,"form-control-text",{"label":[1],"name":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[1,"default-value"],"maxLength":[2,"max-length"],"inputHandler":[16],"keyDownHandler":[16],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}],[0,"form-control-error-text",{"errorText":[1,"error-text"],"name":[1]}],[0,"form-control-help-text",{"helpText":[1,"help-text"],"name":[1]}]]],["p-bbed6107",[[0,"justifi-business-representative-form-inputs",{"representativeDefaultValue":[8,"representative-default-value"],"errors":[8],"formController":[16]}]]],["p-f0866375",[[0,"form-control-file",{"label":[1],"name":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"multiple":[4],"documentType":[1,"document-type"],"inputHandler":[16],"disabled":[4],"files":[32],"fileString":[32]}]]],["p-d8355f91",[[0,"form-control-monetary",{"label":[1],"name":[1],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[1,"default-value"],"inputHandler":[16],"maskOptions":[8,"mask-options"],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}]]],["p-c9f8f7ec",[[0,"justifi-identity-address-form",{"handleFormUpdate":[16],"errors":[8],"defaultValues":[8,"default-values"],"address":[32]},null,{"address":["handleAddressChange"]}],[0,"form-control-number-masked",{"label":[1],"name":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[1,"default-value"],"inputHandler":[16],"mask":[1],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}],[0,"form-control-date",{"label":[1],"name":[1],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[1,"default-value"],"inputHandler":[8,"input-handler"],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}]]],["p-be39c802",[[1,"justifi-payment-provisioning-core",{"businessId":[1,"business-id"],"authToken":[1,"auth-token"],"allowOptionalFields":[4,"allow-optional-fields"],"formTitle":[1,"form-title"],"getBusiness":[16],"postProvisioning":[16],"loading":[32],"businessProvisioned":[32],"currentStep":[32],"errorMessage":[32]},[[0,"formLoading","handleFormLoading"]]]]],["p-60a370fc",[[1,"justifi-checkout-core",{"iframeOrigin":[1025,"iframe-origin"],"authToken":[1,"auth-token"],"getCheckout":[16],"complete":[16],"checkoutId":[1,"checkout-id"],"disableCreditCard":[4,"disable-credit-card"],"disableBankAccount":[4,"disable-bank-account"],"disableBnpl":[4,"disable-bnpl"],"disablePaymentMethodGroup":[4,"disable-payment-method-group"],"hasLoadedFonts":[32],"checkout":[32],"serverError":[32],"renderState":[32],"creatingNewPaymentMethod":[32],"insuranceToggled":[32],"fillBillingForm":[64]}]]],["p-fb58feb5",[[0,"business-details-core",{"getBusiness":[16],"business":[32],"renderState":[32],"errorMessage":[32]}]]],["p-52021fa1",[[0,"payments-list-core",{"getPayments":[16],"payments":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]},null,{"params":["updateOnPropChange"],"getPayments":["updateOnPropChange"]}]]],["p-fe33151d",[[0,"payouts-list-core",{"getPayouts":[16],"getPayoutCSV":[16],"payouts":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]},null,{"params":["updateOnPropChange"],"getPayouts":["updateOnPropChange"]}]]],["p-462dc522",[[0,"payment-details-core",{"getPaymentDetails":[16],"payment":[32],"loading":[32],"errorMessage":[32]},null,{"getPaymentDetails":["updateOnPropChange"]}]]],["p-53e64f15",[[0,"payout-details-core",{"getPayout":[16],"getPayoutCSV":[16],"payout":[32],"loading":[32],"errorMessage":[32]},null,{"getPayout":["getPayoutWatcher"]}]]],["p-e2c88817",[[0,"justifi-payment-method-selector",{"selectedPaymentMethodType":[1,"selected-payment-method-type"]}]]],["p-62b32c4c",[[1,"justifi-season-interruption-insurance-core",{"checkoutId":[1,"checkout-id"],"getQuote":[16],"toggleCoverage":[16],"primaryIdentityFirstName":[1,"primary-identity-first-name"],"primaryIdentityLastName":[1,"primary-identity-last-name"],"primaryIdentityState":[1,"primary-identity-state"],"primaryIdentityPostalCode":[1,"primary-identity-postal-code"],"primaryIdentityCountry":[1,"primary-identity-country"],"primaryIdentityEmailAddress":[1,"primary-identity-email-address"],"policyAttributesInsurableAmount":[2,"policy-attributes-insurable-amount"],"policyAttributesStartDate":[1,"policy-attributes-start-date"],"policyAttributesEndDate":[1,"policy-attributes-end-date"],"coveredIdentityFirstName":[1,"covered-identity-first-name"],"coveredIdentityLastName":[1,"covered-identity-last-name"],"quote":[32],"isLoading":[32],"accepted":[32],"validate":[64]}]]],["p-487b72a8",[[1,"justifi-details",{"errorMessage":[1,"error-message"]}]]],["p-0f7b9555",[[0,"pagination-menu",{"paging":[16],"params":[16]}]]],["p-8e541a32",[[0,"justifi-business-representative",{"formController":[16],"errors":[32],"representative":[32]}],[0,"justifi-business-core-info",{"formController":[16],"errors":[32],"coreInfo":[32]}],[0,"justifi-additional-questions",{"formController":[16],"errors":[32],"additional_questions":[32]}],[0,"justifi-legal-address-form",{"formController":[16],"errors":[32],"legal_address":[32]}],[0,"form-alert",{"text":[1],"hideAlert":[4,"hide-alert"]}]]],["p-96b42e7d",[[0,"justifi-payment-method-form",{"paymentMethodFormType":[1,"payment-method-form-type"],"paymentMethodFormValidationMode":[1025,"payment-method-form-validation-mode"],"iframeOrigin":[1,"iframe-origin"],"singleLine":[4,"single-line"],"resize":[64],"tokenize":[64],"validate":[64]}]]],["p-17e4246f",[[0,"justifi-save-new-payment-method",{"isChecked":[32]}],[1,"justifi-billing-form",{"legend":[1025],"formController":[32],"billingInfo":[32],"errors":[32],"getValues":[64],"fill":[64],"validate":[64]}]]],["p-4abc17f0",[[0,"additional-questions-details",{"additionalQuestions":[16]}],[0,"generic-info-details",{"business":[16]}],[0,"legal-address-details",{"legalAddress":[16]}],[0,"owner-details",{"owners":[16]}],[0,"representative-details",{"representative":[16]}]]],["p-b16dfd5d",[[0,"justifi-payment-method-options",{"showCard":[4,"show-card"],"showAch":[4,"show-ach"],"showBnpl":[4,"show-bnpl"],"showSavedPaymentMethods":[4,"show-saved-payment-methods"],"paymentMethodGroupId":[1,"payment-method-group-id"],"bnpl":[16],"insuranceToggled":[4,"insurance-toggled"],"authToken":[1,"auth-token"],"accountId":[1,"account-id"],"iframeOrigin":[1025,"iframe-origin"],"savedPaymentMethods":[16],"paymentAmount":[2,"payment-amount"],"selectedPaymentMethodId":[32],"paymentMethodOptions":[32],"fillBillingForm":[64],"resolvePaymentMethod":[64]},[[0,"paymentMethodOptionSelected","paymentMethodOptionSelected"]],{"savedPaymentMethods":["paymentMethodsChanged"]}],[0,"justifi-new-payment-method",{"iframeOrigin":[1025,"iframe-origin"],"authToken":[1,"auth-token"],"accountId":[1,"account-id"],"paymentMethodOption":[16],"paymentMethodGroupId":[1,"payment-method-group-id"],"isSelected":[4,"is-selected"],"saveNewPaymentMethodChecked":[32],"fillBillingForm":[64],"resolvePaymentMethod":[64]},[[0,"checkboxChanged","handleCheckboxChanged"]]],[0,"justifi-saved-payment-method",{"iframeOrigin":[1025,"iframe-origin"],"paymentMethodOption":[16],"isSelected":[4,"is-selected"],"resolvePaymentMethod":[64]}],[0,"justifi-sezzle-payment-method",{"iframeOrigin":[1025,"iframe-origin"],"bnpl":[8],"clientId":[1,"client-id"],"accountId":[1,"account-id"],"paymentMethodOption":[16],"isSelected":[4,"is-selected"],"paymentAmount":[2,"payment-amount"],"installmentPlan":[32],"sezzleCheckout":[32],"sezzlePromise":[32],"resolvePaymentMethod":[64]}]]],["p-23014988",[[0,"justifi-owner-form",{"authToken":[1,"auth-token"],"ownerId":[1,"owner-id"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"removeOwner":[16],"newFormOpen":[4,"new-form-open"],"ownersLength":[2,"owners-length"],"getOwner":[32],"patchOwner":[32],"postOwner":[32],"validate":[64],"submit":[64],"validateAndSubmit":[64]}],[0,"owner-form-core",{"ownerId":[1,"owner-id"],"businessId":[1,"business-id"],"getOwner":[16],"patchOwner":[16],"postOwner":[16],"allowOptionalFields":[4,"allow-optional-fields"],"removeOwner":[16],"newFormOpen":[4,"new-form-open"],"ownersLength":[2,"owners-length"],"isLoading":[32],"formController":[32],"errors":[32],"owner":[32],"returnOwnerData":[64],"validate":[64],"submit":[64],"validateAndSubmit":[64]},null,{"isLoading":["loadingWatcher"]}],[0,"owner-form-inputs",{"ownerDefaultValue":[8,"owner-default-value"],"errors":[8],"formController":[16]}]]],["p-30a493cd",[[0,"justifi-business-owners-form-step-core",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"getBusiness":[16],"patchBusiness":[16],"allowOptionalFields":[4,"allow-optional-fields"],"ownersPayload":[32],"refs":[32],"newFormOpen":[32],"validateAndSubmit":[64]},[[0,"ownerSubmitted","handleOwnerSubmit"]],{"ownersPayload":["ownersWatcher"]}],[0,"justifi-business-representative-form-step-core",{"getBusiness":[16],"patchBusiness":[16],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"representative":[32],"validateAndSubmit":[64]}],[0,"justifi-business-core-info-form-step-core",{"businessId":[1,"business-id"],"getBusiness":[16],"patchBusiness":[16],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"coreInfo":[32],"validateAndSubmit":[64]}],[0,"justifi-additional-questions-form-step-core",{"getBusiness":[16],"patchBusiness":[16],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"additional_questions":[32],"validateAndSubmit":[64]}],[0,"justifi-legal-address-form-step-core",{"getBusiness":[16],"patchBusiness":[16],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"legal_address":[32],"validateAndSubmit":[64]}],[0,"justifi-business-document-upload-input-group",{"paymentVolume":[1,"payment-volume"],"inputHandler":[16],"storeFiles":[16],"errors":[8]}],[0,"form-control-checkbox",{"label":[1],"name":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[4,"default-value"],"inputHandler":[16],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}],[0,"justifi-business-documents-on-file",{"documents":[8]}],[0,"justifi-business-terms-conditions-text"]]],["p-6f03b35a",[[0,"justifi-payment-provisioning-form-steps",{"businessId":[1,"business-id"],"authToken":[1,"auth-token"],"refs":[16],"currentStep":[2,"current-step"],"allowOptionalFields":[4,"allow-optional-fields"],"handleFormLoading":[16]}],[0,"justifi-payment-provisioning-form-buttons",{"currentStep":[2,"current-step"],"totalSteps":[2,"total-steps"],"formLoading":[4,"form-loading"],"formDisabled":[4,"form-disabled"],"previousStepButtonOnClick":[16],"nextStepButtonOnClick":[16]}],[0,"justifi-business-owners-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"getBusiness":[32],"patchBusiness":[32],"validateAndSubmit":[64]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}],[0,"justifi-business-representative-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"getBusiness":[32],"patchBusiness":[32],"validateAndSubmit":[64]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}],[0,"justifi-business-core-info-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"getBusiness":[32],"patchBusiness":[32],"validateAndSubmit":[64]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}],[0,"justifi-additional-questions-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"getBusiness":[32],"patchBusiness":[32],"validateAndSubmit":[64]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}],[0,"justifi-business-document-upload-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"existingDocuments":[32],"paymentVolume":[32],"business":[32],"documentData":[32],"renderState":[32],"validateAndSubmit":[64]}],[0,"justifi-legal-address-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"getBusiness":[32],"patchBusiness":[32],"validateAndSubmit":[64]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}],[0,"justifi-business-bank-account-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"bankAccount":[32],"validateAndSubmit":[64]}],[0,"justifi-business-terms-conditions-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"acceptedTermsBefore":[32],"validateAndSubmit":[64]}]]]]'),e))));
|
|
1
|
+
import{p as e,b as t}from"./p-fad19d75.js";export{s as setNonce}from"./p-fad19d75.js";import{g as a}from"./p-e1255160.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((async e=>(await a(),t(JSON.parse('[["p-f2f94d9f",[[0,"justifi-payment-provisioning",{"businessId":[1,"business-id"],"authToken":[1,"auth-token"],"allowOptionalFields":[4,"allow-optional-fields"],"formTitle":[1,"form-title"],"postProvisioning":[32],"getBusiness":[32]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}]]],["p-8f325782",[[1,"justifi-business-form",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"hideErrors":[4,"hide-errors"],"formTitle":[1,"form-title"],"removeTitle":[4,"remove-title"],"isLoading":[32],"errorMessage":[32]}]]],["p-ae530971",[[4,"justifi-checkout",{"iframeOrigin":[1,"iframe-origin"],"authToken":[1,"auth-token"],"checkoutId":[1,"checkout-id"],"disableCreditCard":[4,"disable-credit-card"],"disableBankAccount":[4,"disable-bank-account"],"disableBnpl":[4,"disable-bnpl"],"disablePaymentMethodGroup":[4,"disable-payment-method-group"],"getCheckout":[32],"complete":[32],"errorMessage":[32],"fillBillingForm":[64]},null,{"authToken":["propChanged"],"checkoutId":["propChanged"]}]]],["p-f06910aa",[[1,"justifi-payment-form",{"bankAccount":[4,"bank-account"],"card":[4],"email":[1],"clientId":[1,"client-id"],"authToken":[1,"auth-token"],"accountId":[1,"account-id"],"submitButtonText":[1,"submit-button-text"],"submitButtonEnabled":[32],"isLoading":[32],"selectedPaymentMethodType":[32],"fillBillingForm":[64],"enableSubmitButton":[64],"disableSubmitButton":[64]}]]],["p-037763f4",[[1,"justifi-business-details",{"businessId":[1,"business-id"],"authToken":[1,"auth-token"],"errorMessage":[32],"getBusiness":[32]}]]],["p-f0a06884",[[1,"justifi-payments-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"getPayments":[32],"errorMessage":[32]},null,{"accountId":["propChanged"],"authToken":["propChanged"]}]]],["p-b7cf49f4",[[1,"justifi-payouts-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"getPayouts":[32],"getPayoutCSV":[32],"errorMessage":[32]},null,{"accountId":["propChanged"],"authToken":["propChanged"]}]]],["p-023779ee",[[1,"justifi-refund-form",{"authToken":[1,"auth-token"],"paymentId":[1,"payment-id"],"amount":[2],"submitButtonText":[1,"submit-button-text"],"withButton":[4,"with-button"],"refundInfoText":[1,"refund-info-text"],"errors":[32],"isSubmitting":[32]}]]],["p-e31f0f3e",[[0,"form-control-number",{"label":[1],"name":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[1,"default-value"],"inputHandler":[16],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}]]],["p-2d3b1692",[[1,"justifi-payment-details",{"paymentId":[1,"payment-id"],"authToken":[1,"auth-token"],"getPaymentDetails":[32],"errorMessage":[32]},null,{"paymentId":["propChanged"],"authToken":["propChanged"]}]]],["p-5f095525",[[1,"justifi-payout-details",{"payoutId":[1,"payout-id"],"authToken":[1,"auth-token"],"getPayout":[32],"getPayoutCSV":[32],"errorMessage":[32]},null,{"payoutId":["propChanged"],"authToken":["propChanged"]}]]],["p-1f6afff9",[[0,"justifi-bank-account-form",{"validationMode":[1025,"validation-mode"],"iframeOrigin":[1025,"iframe-origin"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64],"resize":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenized","tokenizeHandler"],[0,"paymentMethodFormValidated","validateHandler"]]]]],["p-246a6c6a",[[0,"justifi-card-form",{"validationMode":[1025,"validation-mode"],"iframeOrigin":[1025,"iframe-origin"],"singleLine":[4,"single-line"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64],"resize":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenized","tokenizeHandler"],[0,"paymentMethodFormValidated","validateHandler"]]]]],["p-1a43e355",[[0,"gross-payment-chart-core",{"getGrossPayment":[16],"grossVolumeReport":[32],"loading":[32],"errorMessage":[32]},null,{"getGrossPayment":["propChanged"],"grossVolumeReport":["grossVolumeReportChanged"]}]]],["p-987b5de2",[[1,"justifi-gross-payment-chart",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"getGrossPayment":[32],"errorMessage":[32]},null,{"accountId":["propChanged"],"authToken":["propChanged"]}]]],["p-edac2b43",[[1,"justifi-season-interruption-insurance",{"authToken":[1,"auth-token"],"checkoutId":[1,"checkout-id"],"primaryIdentityFirstName":[1,"primary-identity-first-name"],"primaryIdentityLastName":[1,"primary-identity-last-name"],"primaryIdentityState":[1,"primary-identity-state"],"primaryIdentityPostalCode":[1,"primary-identity-postal-code"],"primaryIdentityCountry":[1,"primary-identity-country"],"primaryIdentityEmailAddress":[1,"primary-identity-email-address"],"policyAttributesInsurableAmount":[2,"policy-attributes-insurable-amount"],"policyAttributesStartDate":[1,"policy-attributes-start-date"],"policyAttributesEndDate":[1,"policy-attributes-end-date"],"coveredIdentityFirstName":[1,"covered-identity-first-name"],"coveredIdentityLastName":[1,"covered-identity-last-name"],"getQuote":[32],"toggleCoverage":[32],"quote":[32],"validate":[64]}]]],["p-07109641",[[0,"form-control-select",{"label":[1],"name":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[1,"default-value"],"inputHandler":[16],"options":[16],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}],[0,"form-control-text",{"label":[1],"name":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[1,"default-value"],"maxLength":[2,"max-length"],"inputHandler":[16],"keyDownHandler":[16],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}],[0,"form-control-error-text",{"errorText":[1,"error-text"],"name":[1]}],[0,"form-control-help-text",{"helpText":[1,"help-text"],"name":[1]}]]],["p-bbed6107",[[0,"justifi-business-representative-form-inputs",{"representativeDefaultValue":[8,"representative-default-value"],"errors":[8],"formController":[16]}]]],["p-f0866375",[[0,"form-control-file",{"label":[1],"name":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"multiple":[4],"documentType":[1,"document-type"],"inputHandler":[16],"disabled":[4],"files":[32],"fileString":[32]}]]],["p-d8355f91",[[0,"form-control-monetary",{"label":[1],"name":[1],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[1,"default-value"],"inputHandler":[16],"maskOptions":[8,"mask-options"],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}]]],["p-c9f8f7ec",[[0,"justifi-identity-address-form",{"handleFormUpdate":[16],"errors":[8],"defaultValues":[8,"default-values"],"address":[32]},null,{"address":["handleAddressChange"]}],[0,"form-control-number-masked",{"label":[1],"name":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[1,"default-value"],"inputHandler":[16],"mask":[1],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}],[0,"form-control-date",{"label":[1],"name":[1],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[1,"default-value"],"inputHandler":[8,"input-handler"],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}]]],["p-be39c802",[[1,"justifi-payment-provisioning-core",{"businessId":[1,"business-id"],"authToken":[1,"auth-token"],"allowOptionalFields":[4,"allow-optional-fields"],"formTitle":[1,"form-title"],"getBusiness":[16],"postProvisioning":[16],"loading":[32],"businessProvisioned":[32],"currentStep":[32],"errorMessage":[32]},[[0,"formLoading","handleFormLoading"]]]]],["p-69faef3f",[[1,"justifi-checkout-core",{"iframeOrigin":[1025,"iframe-origin"],"authToken":[1,"auth-token"],"getCheckout":[16],"complete":[16],"checkoutId":[1,"checkout-id"],"disableCreditCard":[4,"disable-credit-card"],"disableBankAccount":[4,"disable-bank-account"],"disableBnpl":[4,"disable-bnpl"],"disablePaymentMethodGroup":[4,"disable-payment-method-group"],"hasLoadedFonts":[32],"checkout":[32],"serverError":[32],"renderState":[32],"creatingNewPaymentMethod":[32],"insuranceToggled":[32],"fillBillingForm":[64]}]]],["p-fb58feb5",[[0,"business-details-core",{"getBusiness":[16],"business":[32],"renderState":[32],"errorMessage":[32]}]]],["p-52021fa1",[[0,"payments-list-core",{"getPayments":[16],"payments":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]},null,{"params":["updateOnPropChange"],"getPayments":["updateOnPropChange"]}]]],["p-fe33151d",[[0,"payouts-list-core",{"getPayouts":[16],"getPayoutCSV":[16],"payouts":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]},null,{"params":["updateOnPropChange"],"getPayouts":["updateOnPropChange"]}]]],["p-462dc522",[[0,"payment-details-core",{"getPaymentDetails":[16],"payment":[32],"loading":[32],"errorMessage":[32]},null,{"getPaymentDetails":["updateOnPropChange"]}]]],["p-53e64f15",[[0,"payout-details-core",{"getPayout":[16],"getPayoutCSV":[16],"payout":[32],"loading":[32],"errorMessage":[32]},null,{"getPayout":["getPayoutWatcher"]}]]],["p-e2c88817",[[0,"justifi-payment-method-selector",{"selectedPaymentMethodType":[1,"selected-payment-method-type"]}]]],["p-62b32c4c",[[1,"justifi-season-interruption-insurance-core",{"checkoutId":[1,"checkout-id"],"getQuote":[16],"toggleCoverage":[16],"primaryIdentityFirstName":[1,"primary-identity-first-name"],"primaryIdentityLastName":[1,"primary-identity-last-name"],"primaryIdentityState":[1,"primary-identity-state"],"primaryIdentityPostalCode":[1,"primary-identity-postal-code"],"primaryIdentityCountry":[1,"primary-identity-country"],"primaryIdentityEmailAddress":[1,"primary-identity-email-address"],"policyAttributesInsurableAmount":[2,"policy-attributes-insurable-amount"],"policyAttributesStartDate":[1,"policy-attributes-start-date"],"policyAttributesEndDate":[1,"policy-attributes-end-date"],"coveredIdentityFirstName":[1,"covered-identity-first-name"],"coveredIdentityLastName":[1,"covered-identity-last-name"],"quote":[32],"isLoading":[32],"accepted":[32],"validate":[64]}]]],["p-487b72a8",[[1,"justifi-details",{"errorMessage":[1,"error-message"]}]]],["p-0f7b9555",[[0,"pagination-menu",{"paging":[16],"params":[16]}]]],["p-8e541a32",[[0,"justifi-business-representative",{"formController":[16],"errors":[32],"representative":[32]}],[0,"justifi-business-core-info",{"formController":[16],"errors":[32],"coreInfo":[32]}],[0,"justifi-additional-questions",{"formController":[16],"errors":[32],"additional_questions":[32]}],[0,"justifi-legal-address-form",{"formController":[16],"errors":[32],"legal_address":[32]}],[0,"form-alert",{"text":[1],"hideAlert":[4,"hide-alert"]}]]],["p-a63fc384",[[0,"justifi-payment-method-form",{"paymentMethodFormType":[1,"payment-method-form-type"],"paymentMethodFormValidationMode":[1025,"payment-method-form-validation-mode"],"iframeOrigin":[1,"iframe-origin"],"singleLine":[4,"single-line"],"resize":[64],"tokenize":[64],"validate":[64]}]]],["p-17e4246f",[[0,"justifi-save-new-payment-method",{"isChecked":[32]}],[1,"justifi-billing-form",{"legend":[1025],"formController":[32],"billingInfo":[32],"errors":[32],"getValues":[64],"fill":[64],"validate":[64]}]]],["p-4abc17f0",[[0,"additional-questions-details",{"additionalQuestions":[16]}],[0,"generic-info-details",{"business":[16]}],[0,"legal-address-details",{"legalAddress":[16]}],[0,"owner-details",{"owners":[16]}],[0,"representative-details",{"representative":[16]}]]],["p-ef23c091",[[0,"justifi-payment-method-options",{"showCard":[4,"show-card"],"showAch":[4,"show-ach"],"showBnpl":[4,"show-bnpl"],"showSavedPaymentMethods":[4,"show-saved-payment-methods"],"paymentMethodGroupId":[1,"payment-method-group-id"],"bnpl":[16],"insuranceToggled":[4,"insurance-toggled"],"authToken":[1,"auth-token"],"accountId":[1,"account-id"],"iframeOrigin":[1025,"iframe-origin"],"savedPaymentMethods":[16],"paymentAmount":[2,"payment-amount"],"selectedPaymentMethodId":[32],"paymentMethodOptions":[32],"fillBillingForm":[64],"resolvePaymentMethod":[64]},[[0,"paymentMethodOptionSelected","paymentMethodOptionSelected"]],{"savedPaymentMethods":["paymentMethodsChanged"]}],[0,"justifi-new-payment-method",{"iframeOrigin":[1025,"iframe-origin"],"authToken":[1,"auth-token"],"accountId":[1,"account-id"],"paymentMethodOption":[16],"paymentMethodGroupId":[1,"payment-method-group-id"],"isSelected":[4,"is-selected"],"saveNewPaymentMethodChecked":[32],"fillBillingForm":[64],"resolvePaymentMethod":[64]},[[0,"checkboxChanged","handleCheckboxChanged"]]],[0,"justifi-saved-payment-method",{"iframeOrigin":[1025,"iframe-origin"],"paymentMethodOption":[16],"isSelected":[4,"is-selected"],"resolvePaymentMethod":[64]}],[0,"justifi-sezzle-payment-method",{"iframeOrigin":[1025,"iframe-origin"],"bnpl":[8],"clientId":[1,"client-id"],"accountId":[1,"account-id"],"paymentMethodOption":[16],"isSelected":[4,"is-selected"],"paymentAmount":[2,"payment-amount"],"installmentPlan":[32],"sezzleCheckout":[32],"sezzlePromise":[32],"resolvePaymentMethod":[64]}]]],["p-a8220709",[[0,"justifi-owner-form",{"authToken":[1,"auth-token"],"ownerId":[1,"owner-id"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"removeOwner":[16],"newFormOpen":[4,"new-form-open"],"ownersLength":[2,"owners-length"],"getOwner":[32],"patchOwner":[32],"postOwner":[32],"validate":[64],"submit":[64],"validateAndSubmit":[64]}],[0,"owner-form-core",{"ownerId":[1,"owner-id"],"businessId":[1,"business-id"],"getOwner":[16],"patchOwner":[16],"postOwner":[16],"allowOptionalFields":[4,"allow-optional-fields"],"removeOwner":[16],"newFormOpen":[4,"new-form-open"],"ownersLength":[2,"owners-length"],"isLoading":[32],"formController":[32],"errors":[32],"owner":[32],"returnOwnerData":[64],"validate":[64],"submit":[64],"validateAndSubmit":[64]},null,{"isLoading":["loadingWatcher"]}],[0,"owner-form-inputs",{"ownerDefaultValue":[8,"owner-default-value"],"errors":[8],"formController":[16]}]]],["p-30a493cd",[[0,"justifi-business-owners-form-step-core",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"getBusiness":[16],"patchBusiness":[16],"allowOptionalFields":[4,"allow-optional-fields"],"ownersPayload":[32],"refs":[32],"newFormOpen":[32],"validateAndSubmit":[64]},[[0,"ownerSubmitted","handleOwnerSubmit"]],{"ownersPayload":["ownersWatcher"]}],[0,"justifi-business-representative-form-step-core",{"getBusiness":[16],"patchBusiness":[16],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"representative":[32],"validateAndSubmit":[64]}],[0,"justifi-business-core-info-form-step-core",{"businessId":[1,"business-id"],"getBusiness":[16],"patchBusiness":[16],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"coreInfo":[32],"validateAndSubmit":[64]}],[0,"justifi-additional-questions-form-step-core",{"getBusiness":[16],"patchBusiness":[16],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"additional_questions":[32],"validateAndSubmit":[64]}],[0,"justifi-legal-address-form-step-core",{"getBusiness":[16],"patchBusiness":[16],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"legal_address":[32],"validateAndSubmit":[64]}],[0,"justifi-business-document-upload-input-group",{"paymentVolume":[1,"payment-volume"],"inputHandler":[16],"storeFiles":[16],"errors":[8]}],[0,"form-control-checkbox",{"label":[1],"name":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[4,"default-value"],"inputHandler":[16],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}],[0,"justifi-business-documents-on-file",{"documents":[8]}],[0,"justifi-business-terms-conditions-text"]]],["p-f49b7170",[[0,"justifi-payment-provisioning-form-steps",{"businessId":[1,"business-id"],"authToken":[1,"auth-token"],"refs":[16],"currentStep":[2,"current-step"],"allowOptionalFields":[4,"allow-optional-fields"],"handleFormLoading":[16]}],[0,"justifi-payment-provisioning-form-buttons",{"currentStep":[2,"current-step"],"totalSteps":[2,"total-steps"],"formLoading":[4,"form-loading"],"formDisabled":[4,"form-disabled"],"previousStepButtonOnClick":[16],"nextStepButtonOnClick":[16]}],[0,"justifi-business-owners-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"getBusiness":[32],"patchBusiness":[32],"validateAndSubmit":[64]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}],[0,"justifi-business-representative-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"getBusiness":[32],"patchBusiness":[32],"validateAndSubmit":[64]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}],[0,"justifi-business-core-info-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"getBusiness":[32],"patchBusiness":[32],"validateAndSubmit":[64]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}],[0,"justifi-additional-questions-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"getBusiness":[32],"patchBusiness":[32],"validateAndSubmit":[64]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}],[0,"justifi-business-document-upload-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"existingDocuments":[32],"paymentVolume":[32],"business":[32],"documentData":[32],"renderState":[32],"validateAndSubmit":[64]}],[0,"justifi-legal-address-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"getBusiness":[32],"patchBusiness":[32],"validateAndSubmit":[64]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}],[0,"justifi-business-bank-account-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"bankAccount":[32],"validateAndSubmit":[64]}],[0,"justifi-business-terms-conditions-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"acceptedTermsBefore":[32],"validateAndSubmit":[64]}]]]]'),e))));
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e={name:"@justifi/webcomponents",version:"4.19.0",description:"JustiFi Web Components",collection:"dist/collection/collection-manifest.json",main:"dist/index.cjs.js",module:"dist/module/index.js",types:"dist/module/index.d.ts",repository:{type:"git",url:"git+https://github.com/justifi-tech/web-component-library.git"},homepage:"https://storybook.justifi.ai/?path=/docs/introduction--docs",publishConfig:{registry:"https://registry.npmjs.org"},files:["dist/"],scripts:{build:"stencil build --docs",dev:"stencil build --watch",lint:"eslint . --max-warnings 0",clean:"rm -rf .turbo && rm -rf node_modules && rm -rf dist",generate:"stencil generate",test:"TZ=utc stencil test --spec","test:watch":"TZ=utc stencil test --spec --watchAll","test:e2e":"stencil test --e2e","test:file":"stencil test --spec --watch --"},dependencies:{"@stencil/core":"^4.0.5","@stencil/store":"^2.0.8",bootstrap:"^5.2.3","chart.js":"^4.4.1","date-fns":"^2.29.3","dinero.js":"^1.9.1","iframe-resizer":"^4.3.7",imask:"^7.6.0",rxjs:"^7.8.1","ts-dedent":"^2.2.0",uuid:"^9.0.0",yup:"^1.0.0"},devDependencies:{"@babel/preset-env":"^7.21.5","@babel/preset-react":"^7.18.6","@babel/preset-typescript":"^7.21.5","@stencil/sass":"^3.0.1","@types/jest":"27.0.3","@types/node":"^20.1.4","@types/react":"^18.0.37","@types/react-dom":"^18.0.11",dotenv:"^16.3.1",jest:"^29.7.0","jest-cli":"^29.7.0","jest-environment-node":"^29.7.0",puppeteer:"^21.0.0","ts-jest":"^29.1.2"},license:"MIT",gitHead:"507bac1d941eae6e1f56e185ecd9bc9d22637783"};export{e as p}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const i={iframeOrigin:"https://js.justifi.ai/v2",proxyApiOrigin:"https://wc-proxy.justifi.ai",proxyAuthToken:"eyJraWQiOiJqdXN0aWZpLWUyNDgyMmU3ODE1MmEzZjRkMjU1IiwidHlwIjoiSldUIiwiYWxnIjoiUlMyNTYifQ.eyJpc3MiOiJodHRwczovL2F1dGguanVzdGlmaS5haS8iLCJhenAiOiJvYXNfMmlsWHBqOHQ2WVlEQ0xWU0FiVFczMiIsInN1YiI6Im9hc18yaWxYcGo4dDZZWURDTFZTQWJUVzMyQHNlc3Npb25zIiwiYXVkIjoiaHR0cHM6Ly9hcGkuanVzdGlmaS5haS92MSIsImd0eSI6ImNsaWVudC1jcmVkZW50aWFscyIsInBlcm1pc3Npb25zIjpbeyJyb2xlIjoicmVhZDphY2NvdW50IiwicmVzb3VyY2VfaWQiOiJhY2NfNUV0OWlYclNTQVpSMktTb3VRR0FXaSJ9LHsicm9sZSI6InJlYWQ6YnVzaW5lc3MiLCJyZXNvdXJjZV9pZCI6ImJpel8zYmg2OWJxMXJrM2RtWE5vQUtWb251In1dLCJleHAiOjE3MTE1NTk0MTQsImlhdCI6MTcwMzc4MzQxNCwicGxhdGZvcm1fYWNjb3VudF9pZCI6ImFjY18zcmVOYjRhTll5MmlXRFpRVmN6bXg0In0.oPOoDYxzrnpE8PRUaz-FCU4KqnSuNbFTeDkl3AtMscjUkIctP1OIFh-ZGBjbH5eVH5noXCbaiin0j92dS7jx4gLpxuYT2Q8gpZbuIsT7fa58elvGeRkUUJ-AC5ueZxlv90yPWMm0OIbyrV7XZhuwYyKbV-ZczEbl2JpvBMe40CM-LdClQV66d_-Kw9a23SabBVfYgP5V-5OsagOIESvzZoO-27tGlNkV2a-hxqddDCOZv0HvRYAtp5S7EQrmRdEBu5gCNbf1eRFG424hxZUFVr2LdetYuKQLxJjDdUjf86ZwEUecrEaDSupiN1VC3CitdOwBVf6-R_N0VpN4VLVD5g",exampleAccountId:"acc_5Et9iXrSSAZR2KSouQGAWi",exampleBusinessId:"biz_3bh69bq1rk3dmXNoAKVonu",examplePaymentId:"py_1NNeEnf4FbelxDCQN2RHcE",examplePayoutId:"po_17745yESnHyEgWNeunmhmR",privateApiOrigin:"",privateAuthToken:""};export{i as c}
|