@justifi/webcomponents 6.13.2 → 6.13.3
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-F9eGV4SU.js → Analytics-DusgFP9U.js} +1 -1
- package/dist/cjs/additional-questions-form-step_15.cjs.entry.js +2 -2
- package/dist/cjs/bank-account-billing-form-simple_4.cjs.entry.js +1 -1
- package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
- package/dist/cjs/{business-identity-schema-BA385xf-.js → business-identity-schema-Da3PJrGG.js} +1 -1
- package/dist/cjs/card-form.cjs.entry.js +2 -2
- package/dist/cjs/{check-pkg-version--A_rGEJu.js → check-pkg-version-DD7fjCqn.js} +1 -1
- package/dist/cjs/dispute-notification_2.cjs.entry.js +3 -3
- package/dist/cjs/hidden-input_2.cjs.entry.js +1 -1
- package/dist/cjs/justifi-apple-pay_11.cjs.entry.js +3 -3
- package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +3 -3
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +3 -3
- package/dist/cjs/justifi-business-details.cjs.entry.js +3 -3
- package/dist/cjs/justifi-business-form.cjs.entry.js +5 -5
- package/dist/cjs/justifi-card-form.cjs.entry.js +3 -3
- package/dist/cjs/justifi-checkout-qr-code.cjs.entry.js +3 -3
- package/dist/cjs/justifi-checkout.cjs.entry.js +3 -3
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +3 -3
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +3 -3
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payment-details.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payments-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payout-details.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-qr-terminal.cjs.entry.js +3 -3
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +3 -3
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +3 -3
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +3 -3
- package/dist/cjs/{package-Cuwhrp-b.js → package-DeCbZvnG.js} +1 -1
- package/dist/cjs/{schema-validations-C2XsZnqK.js → schema-validations-Cs0mSKR7.js} +2 -1
- package/dist/collection/components/business-forms/schemas/schema-validations.js +2 -1
- package/dist/docs.json +1 -1
- package/dist/esm/{Analytics-CQwgYl2v.js → Analytics-CtVZmAya.js} +1 -1
- package/dist/esm/additional-questions-form-step_15.entry.js +2 -2
- package/dist/esm/bank-account-billing-form-simple_4.entry.js +1 -1
- package/dist/esm/bank-account-form.entry.js +2 -2
- package/dist/esm/{business-identity-schema-Csou60ZC.js → business-identity-schema-C1ot9Zas.js} +1 -1
- package/dist/esm/card-form.entry.js +2 -2
- package/dist/esm/{check-pkg-version-2VZtm0yL.js → check-pkg-version-DcFIDA70.js} +1 -1
- package/dist/esm/dispute-notification_2.entry.js +3 -3
- package/dist/esm/hidden-input_2.entry.js +1 -1
- package/dist/esm/justifi-apple-pay_11.entry.js +3 -3
- package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +3 -3
- package/dist/esm/justifi-bank-account-form.entry.js +3 -3
- package/dist/esm/justifi-business-details.entry.js +3 -3
- package/dist/esm/justifi-business-form.entry.js +5 -5
- package/dist/esm/justifi-card-form.entry.js +3 -3
- package/dist/esm/justifi-checkout-qr-code.entry.js +3 -3
- package/dist/esm/justifi-checkout.entry.js +3 -3
- package/dist/esm/justifi-checkouts-list.entry.js +3 -3
- package/dist/esm/justifi-dispute-management.entry.js +3 -3
- package/dist/esm/justifi-gross-payment-chart.entry.js +3 -3
- package/dist/esm/justifi-order-terminals.entry.js +3 -3
- package/dist/esm/justifi-payment-details.entry.js +3 -3
- package/dist/esm/justifi-payment-provisioning.entry.js +3 -3
- package/dist/esm/justifi-payment-transactions-list.entry.js +3 -3
- package/dist/esm/justifi-payments-list.entry.js +3 -3
- package/dist/esm/justifi-payout-details.entry.js +3 -3
- package/dist/esm/justifi-payout-transactions-list.entry.js +3 -3
- package/dist/esm/justifi-payouts-list.entry.js +3 -3
- package/dist/esm/justifi-qr-terminal.entry.js +3 -3
- package/dist/esm/justifi-refund-payment.entry.js +3 -3
- package/dist/esm/justifi-season-interruption-insurance.entry.js +3 -3
- package/dist/esm/justifi-terminal-orders-list.entry.js +3 -3
- package/dist/esm/justifi-terminals-list.entry.js +3 -3
- package/dist/esm/{package-BtzgeLyZ.js → package-Bx2_PW91.js} +1 -1
- package/dist/esm/{schema-validations-CySYE883.js → schema-validations-CHxw3FkH.js} +2 -1
- package/dist/module/package.js +1 -1
- package/dist/module/schema-validations.js +2 -1
- package/dist/webcomponents/{p-9c7bce35.entry.js → p-0b9263f3.entry.js} +1 -1
- package/dist/webcomponents/{p-e4bc8c7c.entry.js → p-17f8c3e7.entry.js} +1 -1
- package/dist/webcomponents/{p-1ac357f9.entry.js → p-1fced37f.entry.js} +1 -1
- package/dist/webcomponents/{p-5111a9f5.entry.js → p-291b9a48.entry.js} +1 -1
- package/dist/webcomponents/{p-9c1a0efc.entry.js → p-2a0ab07f.entry.js} +1 -1
- package/dist/webcomponents/p-2b64659a.entry.js +1 -0
- package/dist/webcomponents/{p-d5197891.entry.js → p-2c798125.entry.js} +1 -1
- package/dist/webcomponents/{p-d93d9d58.entry.js → p-3918fb44.entry.js} +1 -1
- package/dist/webcomponents/{p-d1cbeb65.entry.js → p-4383dfdc.entry.js} +1 -1
- package/dist/webcomponents/{p-49d9c0a4.entry.js → p-46a06ce6.entry.js} +1 -1
- package/dist/webcomponents/p-5ea486b6.entry.js +1 -0
- package/dist/webcomponents/{p-648c6cb1.entry.js → p-6f71bf5f.entry.js} +1 -1
- package/dist/webcomponents/{p-d9fd1c50.entry.js → p-708aee06.entry.js} +1 -1
- package/dist/webcomponents/{p-fa21fe56.entry.js → p-7495aa96.entry.js} +1 -1
- package/dist/webcomponents/{p-b08c76da.entry.js → p-84b643f7.entry.js} +1 -1
- package/dist/webcomponents/{p-ee97795a.entry.js → p-8771e52a.entry.js} +1 -1
- package/dist/webcomponents/{p-4821c092.entry.js → p-8fce7a9c.entry.js} +1 -1
- package/dist/webcomponents/{p-ebf178d2.entry.js → p-98bbdf10.entry.js} +1 -1
- package/dist/webcomponents/{p-a404b995.entry.js → p-9d11aaf2.entry.js} +1 -1
- package/dist/webcomponents/p-Bx2_PW91.js +1 -0
- package/dist/webcomponents/p-BxpXvXn-.js +1 -0
- package/dist/webcomponents/{p-DYL3RR2S.js → p-CfIGO7TJ.js} +1 -1
- package/dist/webcomponents/{p-C_SQBHCI.js → p-CqOzVXGL.js} +1 -1
- package/dist/webcomponents/{p-C1gr32IS.js → p-DK_bjvk1.js} +1 -1
- package/dist/webcomponents/{p-c2de24fe.entry.js → p-a62ef857.entry.js} +1 -1
- package/dist/webcomponents/{p-10f3b8df.entry.js → p-b89a5053.entry.js} +1 -1
- package/dist/webcomponents/{p-f0961751.entry.js → p-c6eea99e.entry.js} +1 -1
- package/dist/webcomponents/{p-85b155b0.entry.js → p-db17a828.entry.js} +1 -1
- package/dist/webcomponents/{p-54e343d3.entry.js → p-dde22375.entry.js} +4 -4
- package/dist/webcomponents/{p-5e59e283.entry.js → p-dfe66300.entry.js} +1 -1
- package/dist/webcomponents/{p-7d04803e.entry.js → p-e9494d8f.entry.js} +1 -1
- package/dist/webcomponents/{p-bd882260.entry.js → p-ebee139f.entry.js} +1 -1
- package/dist/webcomponents/{p-f4de4ac0.entry.js → p-f01fd4ff.entry.js} +1 -1
- package/dist/webcomponents/{p-64840a3d.entry.js → p-f4baf684.entry.js} +1 -1
- package/dist/webcomponents/{p-87427a4f.entry.js → p-f6d49f21.entry.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/webcomponents/p-4bb9d772.entry.js +0 -1
- package/dist/webcomponents/p-BtzgeLyZ.js +0 -1
- package/dist/webcomponents/p-a125318a.entry.js +0 -1
- package/dist/webcomponents/p-z3RFjy9B.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as s}from"./p-CV0Pyo1O.js";import{f as i}from"./p-BSs-2JKu.js";import{t as a,a8 as r}from"./p-CPKMvyV_.js";import{B as d}from"./p-CHo7TfsM.js";import{S as c}from"./p-uZ5KAseb.js";import"./p-CZfYo5-1.js";import{C as o,b as n}from"./p-DXTa04jn.js";import{g as h,a as p}from"./p-CdwzNfP1.js";import{D as f,a as l}from"./p-C7hX61pS.js";import{c as b}from"./p-C_SQBHCI.js";import{J as u}from"./p-DYL3RR2S.js";import"./p-HXpYMWUU.js";import"./p-De4Pig-y.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-BtzgeLyZ.js";const y=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.submitDisputeResponse(t,e,i);if(d.error){return r({error:p(d.error),code:h(null===(c=d.error)||void 0===c?void 0:c.code),severity:o.ERROR})}a(d)}catch(e){const t=h(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:o.ERROR})}finally{d()}},v=class{constructor(s){e(this,s),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.submitEvent=t(this,"submit-event",7)}acceptDispute(){y({disputeId:this.dispute.id,authToken:this.authToken,service:new l})({payload:{forfeit:!0},onSuccess:e=>{this.submitEvent.emit({response:e})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}})}initiateRespondToDispute(){this.clickEvent.emit({name:f.respondToDispute})}isDueDatePassed(){var e;if(!(null===(e=this.dispute)||void 0===e?void 0:e.due_date))return!1;const t=new Date(this.dispute.due_date.replace(/-/g,"/").replace(/T.+/,"")),s=new Date;return s.setHours(0,0,0,0),t.setHours(0,0,0,0),t<s}render(){var e,t,o,n,h,p,f,l,b;return s("div",{key:"325018c414e82b5c1bc7d9c5aa444b5a9d4e83d6",class:"dispute-notification-root"},this.isLoading&&s("div",{key:"deffb8ef248e32962aca084a564e83aa5f222b0a",style:{marginBottom:"8px"}},s(c,{key:"6f6c630b3122b1b2fd480470f5df7683f19de612",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(c,{key:"11f46711fed1094496c64551f084351c08f598be",height:"18px",styles:{marginBottom:"8px"}}),s(c,{key:"fc7e2eac76e1cbc329147f3da39a8c28c51a7b6a",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&this.isDueDatePassed()&&s("div",{key:"0ef159acf9fe5b12dc0dcddab6b7583e5fc9a799",part:a},s("h1",{key:"db263006990c5b4cf178f7f81650ad7602765532",class:"h4",part:r},"The due date (",null===(t=this.dispute)||void 0===t?void 0:t.due_date,") for this dispute has passed"),s("p",{key:"185c6f952ef46e3aec625cab73c943b3046ef6b4"},"You can no longer submit evidence to counter this dispute.")),(null===(o=this.dispute)||void 0===o?void 0:o.needsResponse)&&!this.isDueDatePassed()&&s("div",{key:"d4536104addc500277fbde990b7b33ba8ff54c7e",part:a},s("h1",{key:"198138cc6541c0aeeae458e2de1e3ae0c695328d",class:"h4",part:r},"This payment is disputed"),s("p",{key:"6902ce5e3e94ab7f71ee6d0c6a7604ef97f0e740"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"f49d1ac855365480edc61e0af117230e2f3dbe1f",class:"h5"},"Dispute details"),s("div",{key:"f3868a098dbc4a613d676b8580c053527f9d5fad",class:"d-table gap-2"},s("div",{key:"7699bc619b652ffe1c77cf6e5e0dac967679b1e6",class:"d-table-row gap-2"},s("span",{key:"9de67b45877120f54f724f1efe7b3f4d4b035d30",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"bfd79f86b5b81daf2a34f5874fcff03a05d1e64d",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(n=this.dispute)||void 0===n?void 0:n.amount))),s("div",{key:"0e57d56172859eb5857a1930cb837569157026d9",class:"d-table-row gap-2"},s("span",{key:"0b615bd8f9a9add7d18d50be4f4f644707576de2",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"46288c67be32fe2d95fea88f5b0148f22552a2c9",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(h=this.dispute)||void 0===h?void 0:h.reason)),s("div",{key:"c68280b0f36280804fb6231236d942174c189456",class:"d-table-row gap-2"},s("span",{key:"ed3f145aa0f2c949b80d7033e4ecb818a4a4fa68",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Due Date"),s("span",{key:"4c4530acbc570fb13b5f53947714bd250ff99cab",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(p=this.dispute)||void 0===p?void 0:p.due_date))),s("div",{key:"3244bb6bdbed2b4e28c479c2d4db2d0ae152f2f0",class:"d-flex gap-2 mt-4 justify-content-end"},s(d,{key:"3716a28cec93e70690ad96bfc0c5f3b7b56f8ecb",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(d,{key:"7f326ed6f298c9f1091b160c63e386864329190e",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(f=this.dispute)||void 0===f?void 0:f.underReview)&&s("div",{key:"d705ae48c1f30b904ac31bbdbab9e955868f51e1",part:a},s("h1",{key:"712cebef3699a8c2a97bcb69ae68e0b491090c88",class:"h4",part:r},"This payment is disputed and under review"),s("p",{key:"ca95b2c8bdc6083a3fbb1dd63c6bdaa4699ae2a7"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(l=this.dispute)||void 0===l?void 0:l.won)&&s("div",{key:"c0cb4c8342aa4f022d76e95123a047b7b707f562",part:a},s("h1",{key:"797966d237d4b46eb1b880deb7fa21746f5b3b1e",class:"h4",part:r},"This payment was disputed"),s("p",{key:"2f9eed1a5f34f772206112488af22aa8b35c07b6"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(b=this.dispute)||void 0===b?void 0:b.lost)&&s("div",{key:"9a90af51218ed921e27519363995f12e29713bfd",part:a},s("h1",{key:"736ee5cf8f65d780d4812e24ea9050dcc0d109a4",class:"h4",part:r},"This payment was disputed"),s("p",{key:"9ca83087b028e1078bcc2cd0b552e8f5379932d1"},"The cardholder disputed this payment and the card issuer has settled it in their favor.")))}},m=class{constructor(i){e(this,i),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.submitEvent=t(this,"submit-event",7),this.errorMessage=null,this.disputeResponse={},this.apiOrigin="https://wc-proxy.justifi.ai",this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.componentStepMapping=[()=>s("product-or-service",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("customer-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("cancellation-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("refund-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("duplicate-charge",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("electronic-evidence",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("shipping-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("additional-statement",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors})],this.saveData=async(e,t)=>{if(Object.keys(e).length)return this.isLastStep?this.submitDisputeResponse({payload:e,onSuccess:e=>{this.submitEvent.emit({response:e}),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}}):this.updateDisputeResponse({payload:e,onSuccess:e=>{this.disputeResponse=Object.assign({},e.data),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}});this.stepCompleteEvent.emit({response:null,formStep:t})},this.initializeMakePresignedURLs=async()=>{const e=this.documentList.map((e=>this.getPresignedFileUrl(e)));return await Promise.all(e)},this.initializeFileUploads=async()=>{const e=this.documentList.map((e=>this.uploadDocument(e)));return Promise.all(e)},this.getPresignedFileUrl=async e=>this.createDisputeEvidence({payload:{file_name:e.file_name,file_type:e.file_type,dispute_evidence_type:e.dispute_evidence_type},onSuccess:t=>{e.presignedUrl=t.data.presigned_url},onError:({error:t,code:s,severity:i})=>{const a={[e.dispute_evidence_type]:t};this.documentErrors=Object.assign(Object.assign({},this.documentErrors),a),this.errorEvent.emit({errorCode:s,message:t,severity:i})}}),this.uploadDocument=async e=>{const t=await e.getFileString();if(!e.presignedUrl)throw new Error("Presigned URL is not set");return await fetch(e.presignedUrl,{method:"PUT",body:t})},this.handleSubmit=async(e,t,s)=>{if(this.isLoading=!0,t.length){if(this.documentErrors={},this.documentList=t,await this.initializeMakePresignedURLs(),Object.keys(this.documentErrors).length)throw this.isLoading=!1,new Error("Could not presign all documents");await this.initializeFileUploads()}await this.saveData(e,s),this.isLoading=!1},this.onCancel=()=>{this.clickEvent.emit({name:f.cancelDispute})},this.onBack=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:f.previousStep}),await this.handleSubmit(e,t,s),this.currentStep--}))},this.onNext=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:f.nextStep}),await this.handleSubmit(e,t,s),this.currentStep++}))},this.onSubmit=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:f.submit});const i=Object.assign(Object.assign({},e),{forfeit:!1});await this.handleSubmit(i,t,s)}))}}componentWillLoad(){b(),this.analytics=new u(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeDisputeServiceMethods()}initializeDisputeServiceMethods(){this.disputeId&&this.authToken?(this.updateDisputeResponse=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.updateDisputeResponse(t,e,i);if(d.error)return r({error:p(d.error),code:h(null===(c=d.error)||void 0===c?void 0:c.code),severity:o.ERROR});a(d)}catch(e){const t=h(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:o.ERROR})}finally{d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.createDisputeEvidence(t,e,i);if(d.error)return r({error:p(d.error),code:h(null===(c=d.error)||void 0===c?void 0:c.code),severity:o.ERROR});a(d)}catch(e){const t=h(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:o.ERROR})}finally{d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.submitDisputeResponse=y({disputeId:this.disputeId,authToken:this.authToken,service:new l})):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:n.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}get isLastStep(){return this.currentStep===this.componentStepMapping.length-1}get isFirstStep(){return 0===this.currentStep}render(){return s("div",{key:"7f9c8d56cfb86cea73ab2f299b83ff0de28f5c3e",class:"dispute-response-root"},s("div",{key:"a805bf54df79453127557bf651c3d776a381241f",class:"row gy-3"},s("div",{key:"2e6bc9cbe369e0ea5d200bc0934b4cad50f3c76f",class:"col-12"},s("h1",{key:"9876e9c87c6dfb405e7bad46d64fdb40ad048142",class:"h4",part:r},"Counter dispute")),s("div",{key:"045028232da5331c7041ad222c4e98364674ace3",class:"col-12"},this.currentStepComponent),s("div",{key:"0455c4856a44340ce25c1c4c8f776abb197f919f",class:"col-12"},s("div",{key:"5b990cc1d41b3a7152d727c941e9758ed70f75a1",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(d,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(d,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(d,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(d,{variant:"primary",onClick:()=>this.onNext(),disabled:this.isLoading,isLoading:this.isLoading},"Next")))))}static get watchers(){return{disputeId:["propChanged"],authToken:["propChanged"]}}};export{v as dispute_notification,m as dispute_response}
|
|
1
|
+
import{r as e,c as t,h as s}from"./p-CV0Pyo1O.js";import{f as i}from"./p-BSs-2JKu.js";import{t as a,a8 as r}from"./p-CPKMvyV_.js";import{B as d}from"./p-CHo7TfsM.js";import{S as c}from"./p-uZ5KAseb.js";import"./p-CZfYo5-1.js";import{C as o,b as n}from"./p-DXTa04jn.js";import{g as h,a as p}from"./p-CdwzNfP1.js";import{D as f,a as l}from"./p-C7hX61pS.js";import{c as b}from"./p-CqOzVXGL.js";import{J as u}from"./p-CfIGO7TJ.js";import"./p-HXpYMWUU.js";import"./p-De4Pig-y.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import"./p-Bx2_PW91.js";const y=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.submitDisputeResponse(t,e,i);if(d.error){return r({error:p(d.error),code:h(null===(c=d.error)||void 0===c?void 0:c.code),severity:o.ERROR})}a(d)}catch(e){const t=h(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:o.ERROR})}finally{d()}},v=class{constructor(s){e(this,s),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.submitEvent=t(this,"submit-event",7)}acceptDispute(){y({disputeId:this.dispute.id,authToken:this.authToken,service:new l})({payload:{forfeit:!0},onSuccess:e=>{this.submitEvent.emit({response:e})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}})}initiateRespondToDispute(){this.clickEvent.emit({name:f.respondToDispute})}isDueDatePassed(){var e;if(!(null===(e=this.dispute)||void 0===e?void 0:e.due_date))return!1;const t=new Date(this.dispute.due_date.replace(/-/g,"/").replace(/T.+/,"")),s=new Date;return s.setHours(0,0,0,0),t.setHours(0,0,0,0),t<s}render(){var e,t,o,n,h,p,f,l,b;return s("div",{key:"325018c414e82b5c1bc7d9c5aa444b5a9d4e83d6",class:"dispute-notification-root"},this.isLoading&&s("div",{key:"deffb8ef248e32962aca084a564e83aa5f222b0a",style:{marginBottom:"8px"}},s(c,{key:"6f6c630b3122b1b2fd480470f5df7683f19de612",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(c,{key:"11f46711fed1094496c64551f084351c08f598be",height:"18px",styles:{marginBottom:"8px"}}),s(c,{key:"fc7e2eac76e1cbc329147f3da39a8c28c51a7b6a",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&this.isDueDatePassed()&&s("div",{key:"0ef159acf9fe5b12dc0dcddab6b7583e5fc9a799",part:a},s("h1",{key:"db263006990c5b4cf178f7f81650ad7602765532",class:"h4",part:r},"The due date (",null===(t=this.dispute)||void 0===t?void 0:t.due_date,") for this dispute has passed"),s("p",{key:"185c6f952ef46e3aec625cab73c943b3046ef6b4"},"You can no longer submit evidence to counter this dispute.")),(null===(o=this.dispute)||void 0===o?void 0:o.needsResponse)&&!this.isDueDatePassed()&&s("div",{key:"d4536104addc500277fbde990b7b33ba8ff54c7e",part:a},s("h1",{key:"198138cc6541c0aeeae458e2de1e3ae0c695328d",class:"h4",part:r},"This payment is disputed"),s("p",{key:"6902ce5e3e94ab7f71ee6d0c6a7604ef97f0e740"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"f49d1ac855365480edc61e0af117230e2f3dbe1f",class:"h5"},"Dispute details"),s("div",{key:"f3868a098dbc4a613d676b8580c053527f9d5fad",class:"d-table gap-2"},s("div",{key:"7699bc619b652ffe1c77cf6e5e0dac967679b1e6",class:"d-table-row gap-2"},s("span",{key:"9de67b45877120f54f724f1efe7b3f4d4b035d30",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"bfd79f86b5b81daf2a34f5874fcff03a05d1e64d",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(n=this.dispute)||void 0===n?void 0:n.amount))),s("div",{key:"0e57d56172859eb5857a1930cb837569157026d9",class:"d-table-row gap-2"},s("span",{key:"0b615bd8f9a9add7d18d50be4f4f644707576de2",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"46288c67be32fe2d95fea88f5b0148f22552a2c9",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(h=this.dispute)||void 0===h?void 0:h.reason)),s("div",{key:"c68280b0f36280804fb6231236d942174c189456",class:"d-table-row gap-2"},s("span",{key:"ed3f145aa0f2c949b80d7033e4ecb818a4a4fa68",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Due Date"),s("span",{key:"4c4530acbc570fb13b5f53947714bd250ff99cab",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(p=this.dispute)||void 0===p?void 0:p.due_date))),s("div",{key:"3244bb6bdbed2b4e28c479c2d4db2d0ae152f2f0",class:"d-flex gap-2 mt-4 justify-content-end"},s(d,{key:"3716a28cec93e70690ad96bfc0c5f3b7b56f8ecb",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(d,{key:"7f326ed6f298c9f1091b160c63e386864329190e",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(f=this.dispute)||void 0===f?void 0:f.underReview)&&s("div",{key:"d705ae48c1f30b904ac31bbdbab9e955868f51e1",part:a},s("h1",{key:"712cebef3699a8c2a97bcb69ae68e0b491090c88",class:"h4",part:r},"This payment is disputed and under review"),s("p",{key:"ca95b2c8bdc6083a3fbb1dd63c6bdaa4699ae2a7"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(l=this.dispute)||void 0===l?void 0:l.won)&&s("div",{key:"c0cb4c8342aa4f022d76e95123a047b7b707f562",part:a},s("h1",{key:"797966d237d4b46eb1b880deb7fa21746f5b3b1e",class:"h4",part:r},"This payment was disputed"),s("p",{key:"2f9eed1a5f34f772206112488af22aa8b35c07b6"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(b=this.dispute)||void 0===b?void 0:b.lost)&&s("div",{key:"9a90af51218ed921e27519363995f12e29713bfd",part:a},s("h1",{key:"736ee5cf8f65d780d4812e24ea9050dcc0d109a4",class:"h4",part:r},"This payment was disputed"),s("p",{key:"9ca83087b028e1078bcc2cd0b552e8f5379932d1"},"The cardholder disputed this payment and the card issuer has settled it in their favor.")))}},m=class{constructor(i){e(this,i),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.submitEvent=t(this,"submit-event",7),this.errorMessage=null,this.disputeResponse={},this.apiOrigin="https://wc-proxy.justifi.ai",this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.componentStepMapping=[()=>s("product-or-service",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("customer-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("cancellation-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("refund-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("duplicate-charge",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("electronic-evidence",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("shipping-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("additional-statement",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors})],this.saveData=async(e,t)=>{if(Object.keys(e).length)return this.isLastStep?this.submitDisputeResponse({payload:e,onSuccess:e=>{this.submitEvent.emit({response:e}),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}}):this.updateDisputeResponse({payload:e,onSuccess:e=>{this.disputeResponse=Object.assign({},e.data),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}});this.stepCompleteEvent.emit({response:null,formStep:t})},this.initializeMakePresignedURLs=async()=>{const e=this.documentList.map((e=>this.getPresignedFileUrl(e)));return await Promise.all(e)},this.initializeFileUploads=async()=>{const e=this.documentList.map((e=>this.uploadDocument(e)));return Promise.all(e)},this.getPresignedFileUrl=async e=>this.createDisputeEvidence({payload:{file_name:e.file_name,file_type:e.file_type,dispute_evidence_type:e.dispute_evidence_type},onSuccess:t=>{e.presignedUrl=t.data.presigned_url},onError:({error:t,code:s,severity:i})=>{const a={[e.dispute_evidence_type]:t};this.documentErrors=Object.assign(Object.assign({},this.documentErrors),a),this.errorEvent.emit({errorCode:s,message:t,severity:i})}}),this.uploadDocument=async e=>{const t=await e.getFileString();if(!e.presignedUrl)throw new Error("Presigned URL is not set");return await fetch(e.presignedUrl,{method:"PUT",body:t})},this.handleSubmit=async(e,t,s)=>{if(this.isLoading=!0,t.length){if(this.documentErrors={},this.documentList=t,await this.initializeMakePresignedURLs(),Object.keys(this.documentErrors).length)throw this.isLoading=!1,new Error("Could not presign all documents");await this.initializeFileUploads()}await this.saveData(e,s),this.isLoading=!1},this.onCancel=()=>{this.clickEvent.emit({name:f.cancelDispute})},this.onBack=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:f.previousStep}),await this.handleSubmit(e,t,s),this.currentStep--}))},this.onNext=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:f.nextStep}),await this.handleSubmit(e,t,s),this.currentStep++}))},this.onSubmit=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:f.submit});const i=Object.assign(Object.assign({},e),{forfeit:!1});await this.handleSubmit(i,t,s)}))}}componentWillLoad(){b(),this.analytics=new u(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeDisputeServiceMethods()}initializeDisputeServiceMethods(){this.disputeId&&this.authToken?(this.updateDisputeResponse=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.updateDisputeResponse(t,e,i);if(d.error)return r({error:p(d.error),code:h(null===(c=d.error)||void 0===c?void 0:c.code),severity:o.ERROR});a(d)}catch(e){const t=h(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:o.ERROR})}finally{d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.createDisputeEvidence(t,e,i);if(d.error)return r({error:p(d.error),code:h(null===(c=d.error)||void 0===c?void 0:c.code),severity:o.ERROR});a(d)}catch(e){const t=h(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:o.ERROR})}finally{d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.submitDisputeResponse=y({disputeId:this.disputeId,authToken:this.authToken,service:new l})):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:n.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}get isLastStep(){return this.currentStep===this.componentStepMapping.length-1}get isFirstStep(){return 0===this.currentStep}render(){return s("div",{key:"7f9c8d56cfb86cea73ab2f299b83ff0de28f5c3e",class:"dispute-response-root"},s("div",{key:"a805bf54df79453127557bf651c3d776a381241f",class:"row gy-3"},s("div",{key:"2e6bc9cbe369e0ea5d200bc0934b4cad50f3c76f",class:"col-12"},s("h1",{key:"9876e9c87c6dfb405e7bad46d64fdb40ad048142",class:"h4",part:r},"Counter dispute")),s("div",{key:"045028232da5331c7041ad222c4e98364674ace3",class:"col-12"},this.currentStepComponent),s("div",{key:"0455c4856a44340ce25c1c4c8f776abb197f919f",class:"col-12"},s("div",{key:"5b990cc1d41b3a7152d727c941e9758ed70f75a1",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(d,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(d,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(d,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(d,{variant:"primary",onClick:()=>this.onNext(),disabled:this.isLoading,isLoading:this.isLoading},"Next")))))}static get watchers(){return{disputeId:["propChanged"],authToken:["propChanged"]}}};export{v as dispute_notification,m as dispute_response}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as e,c as a}from"./p-CV0Pyo1O.js";import{c as s}from"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{l as i,C as o,b as r}from"./p-DXTa04jn.js";import{p as n}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import{J as c}from"./p-
|
|
1
|
+
import{h as t,r as e,c as a}from"./p-CV0Pyo1O.js";import{c as s}from"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{l as i,C as o,b as r}from"./p-DXTa04jn.js";import{p as n}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import{J as c}from"./p-CfIGO7TJ.js";import{c as d}from"./p-CqOzVXGL.js";import{g as p,a as h}from"./p-CdwzNfP1.js";import{P as l}from"./p-CO8ZGkfN.js";import{T as f,a as u,b as m,c as b,d as y,e as _,f as w,g,h as T,i as j,j as v,k,l as C}from"./p-BICxxa69.js";import{S as P}from"./p-DzEdYT8R.js";import{T as D}from"./p-CZfYo5-1.js";import{a as I}from"./p-BSs-2JKu.js";import{a6 as S,a7 as O}from"./p-CPKMvyV_.js";import"./p-D8GTwl9v.js";import"./p-Bx2_PW91.js";import"./p-De4Pig-y.js";import"./p-CqiVXthx.js";const F={id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of each transaction"},"ID"),account_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the account associated with each transaction"},"Account ID"),payout_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the payout associated with each transaction"},"Payout ID"),financial_transaction_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),amount:()=>t("th",{part:S,scope:"col",title:"The dollar amount of each transaction"},"Amount"),fee:()=>t("th",{part:S,scope:"col",title:"The fee associated with each transaction"},"Fee"),net:()=>t("th",{part:S,scope:"col",title:"The net amount of each transaction"},"Net"),currency:()=>t("th",{part:S,scope:"col",title:"The currency of each transaction"},"Currency"),description:()=>t("th",{part:S,scope:"col",title:"The description of each transaction"},"Description"),source_id:()=>t("th",{part:S,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),txn_type:()=>t("th",{part:S,scope:"col",title:"The type of each transaction"},"Type"),created_at:()=>t("th",{part:S,scope:"col",title:"The date and time each transaction was made"},"Processed On"),available_on:()=>t("th",{part:S,scope:"col",title:"The date and time each transaction will be available"},"Available On"),updated_at:()=>t("th",{part:S,scope:"col",title:"The date and time each transaction was last updated"},"Updated On")},q={fee:"Fee",payment:"Payment",payout:"Payout",seller_payment_refund:"Seller Payment Refund",dispute_amount_collected:"Dispute Amount Collected",dispute_fee_collected:"Dispute Fee Collected",seller_payment:"Seller Payment",transfer:"Transfer",partner_platform_proceeds_credit:"Partner Platform Proceeds Credit",processing_fee:"Processing Fee",refund_processing_fee:"Refund Processing Fee",fee_rounding_adjustment:"Fee Rounding Adjustment",platform_fee:"Platform Fee",processing_fee_return:"Processing Fee Return",platform_fee_return:"Platform Fee Return"},x={id:e=>t("td",{part:O(e.id)},e.id),account_id:e=>t("td",{part:O(e.account_id)},e.account_id),payout_id:e=>t("td",{part:O(e.payout_id)},e.payout_id),financial_transaction_id:e=>t("td",{part:O(e.financial_transaction_id)},e.financial_transaction_id),amount:e=>t("td",{part:O(e.amount)},e.formattedPaymentAmount(e.amount)),fee:e=>t("td",{part:O(e.fee)},e.formattedPaymentAmount(e.fee)),net:e=>t("td",{part:O(e.net)},e.formattedPaymentAmount(e.net)),currency:e=>t("td",{part:O(e.currency)},e.currency),description:e=>t("td",{part:O(e.description)},e.description),source_id:e=>t("td",{part:O(e.source_id)},e.source_id),txn_type:e=>t("td",{part:O(e.txn_type)},q[e.txn_type]),created_at:e=>t("td",{part:O(e.created_at)},t("div",{class:"fw-bold"},I(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},I(e.created_at,{showTime:!0}))),available_on:e=>t("td",{part:O(e.available_on)},t("div",{class:"fw-bold"},I(e.available_on,{showDisplayDate:!0})),t("div",{class:"fw-bold"},I(e.available_on,{showTime:!0}))),updated_at:e=>t("td",{part:O(e.updated_at)},t("div",{class:"fw-bold"},I(e.updated_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},I(e.updated_at,{showTime:!0})))},E=class{constructor(t){e(this,t),this.clickEvent=a(this,"click-event",7),this.errorEvent=a(this,"error-event",7),this.balanceTransactions=[],this.isLoading=!0,this.errorMessage=null,this.paging=n,this.pagingParams={},this.columns="created_at,txn_type,description,amount,fee,net",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:D.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:D.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const a=this.balanceTransactions.find((t=>t.id===e));this.clickEvent.emit({name:D.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,F,x),d(),this.analytics=new c(this),this.initializeApi()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeApi()}handleError(t,e,a){this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:e,severity:a})}initializeApi(){this.payoutId&&this.authToken?(({accountId:t,authToken:e,service:a})=>async({params:s,onSuccess:r,onError:n,final:c})=>{var d;try{const c=await a.fetchPayoutTransactions(t,e,s);c.error?n({error:h(c.error),code:p(null===(d=c.error)||void 0===d?void 0:d.code),severity:o.ERROR}):r({balanceTransactions:c.data.map((t=>new i(t))),pagingInfo:Object.assign({},c.page_info)})}catch(t){const e=p(null==t?void 0:t.code);n({error:h(t),code:e,severity:o.ERROR})}finally{c()}})({accountId:s.accountId,authToken:this.authToken,service:new l})({params:this.requestParams,onSuccess:({balanceTransactions:t,pagingInfo:e})=>{this.balanceTransactions=t,this.paging=e,this.transactionsTable.collectionData=this.balanceTransactions},onError:({error:t,code:e,severity:a})=>{this.errorMessage=t.message,this.handleError(t,e,a)},final:()=>{this.isLoading=!1}}):(this.errorMessage="payout-id and auth-token props are required",this.handleError(r.MISSING_PROPS,this.errorMessage,o.ERROR))}get entityId(){return this.balanceTransactions.map((t=>t.id))}get showEmptyState(){return!this.isLoading&&!this.errorMessage&&this.transactionsTable.rowData.length<1}get showErrorState(){return!this.isLoading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.isLoading}get requestParams(){return Object.assign({payout_id:this.payoutId,limit:"15"},this.pagingParams)}render(){return t(P,{key:"e7b5b219c34d1c8610fb4113fedd503f0512db2d"},t(u,{key:"97bbe678c90ba115a091db4fac42560c17f557f2"},t(m,{key:"ef90c77cd8f19a80e2b3e2b514aa1bc735a1b783"},t(b,{key:"f5f0a00594f099931f1ac1cd4e359bb8fab11ec8"},t(y,{key:"559648add19e0426d756f71ecb7bbd5cbcf1349e"},this.transactionsTable.columnData.map((t=>t)))),t(_,{key:"49f8da0be5dba34ffbb92805d7b5b0fb3eeb6bf7"},t(w,{key:"1d61dc2157608f38eb34e64452d7089857e6c67d",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(g,{key:"d1f735fdb009740a186a16ea7e15d0320965a286",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(T,{key:"f50ecc151be5c9143fb69d575a1ef14b3aa17b61",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(j,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(v,{key:"560536e623b2437d613169af2980aec13ebb4531"},t(k,{key:"42b82920fdd6056bb654db92acf3741aafb13d99"},t(C,{key:"e2545104fdac51e0ada942138a08714f213bce63",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"6a74b19f3fa02f0e86e00783a06b0dfba2bc0ed8",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],payoutId:["propChanged"],authToken:["propChanged"]}}};export{E as justifi_payout_transactions_list}
|