@justifi/webcomponents 6.16.0-rc.2 → 6.16.0-rc.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-CDE3KpL6.js → Analytics-C1FDYwxD.js} +2 -2
- package/dist/cjs/{Api-CaEn8pKs.js → Api-DzRWrqRx.js} +1 -1
- package/dist/cjs/additional-questions-form-step_15.cjs.entry.js +5 -5
- package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
- package/dist/cjs/{business.service-DIspRonp.js → business.service-D2D8ABMT.js} +1 -1
- package/dist/cjs/card-form.cjs.entry.js +2 -2
- package/dist/cjs/{checkout.service-CM1Duar4.js → checkout.service-CVpXCi8z.js} +1 -1
- package/dist/cjs/{detect-duplicate-version-DyHHkx4J.js → detect-duplicate-version-Bd2jUlYF.js} +1 -1
- package/dist/cjs/dispute-notification_2.cjs.entry.js +5 -5
- package/dist/cjs/{event-types-DNCxVTir.js → event-types-DptyH3kd.js} +1 -1
- package/dist/cjs/form-alert_3.cjs.entry.js +1 -1
- package/dist/cjs/{get-subaccounts-8LeFCTm6.js → get-subaccounts-CgzPwTgf.js} +1 -1
- package/dist/cjs/justifi-apple-pay_12.cjs.entry.js +36 -18
- package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +5 -5
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +5 -5
- package/dist/cjs/justifi-billing-form-full.cjs.entry.js +1 -1
- package/dist/cjs/justifi-billing-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-business-details.cjs.entry.js +6 -6
- package/dist/cjs/justifi-business-form.cjs.entry.js +6 -6
- package/dist/cjs/justifi-card-billing-form-simple.cjs.entry.js +1 -1
- package/dist/cjs/justifi-card-form.cjs.entry.js +5 -5
- package/dist/cjs/justifi-checkout-qr-code.cjs.entry.js +4 -4
- package/dist/cjs/justifi-checkout.cjs.entry.js +5 -5
- package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +7 -7
- package/dist/cjs/justifi-dispute-management.cjs.entry.js +6 -6
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +5 -5
- package/dist/cjs/justifi-order-terminals.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payment-details.cjs.entry.js +6 -6
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +6 -6
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +6 -6
- package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payments-list.cjs.entry.js +6 -6
- package/dist/cjs/justifi-payout-details.cjs.entry.js +6 -6
- package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +6 -6
- package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +7 -7
- package/dist/cjs/justifi-qr-terminal.cjs.entry.js +5 -5
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +6 -6
- package/dist/cjs/justifi-save-new-payment-method.cjs.entry.js +1 -1
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +5 -5
- package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +5 -5
- package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +1 -1
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +7 -7
- package/dist/cjs/{package-DGrVUpde.js → package-45W01-Af.js} +1 -1
- package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
- package/dist/cjs/{payment.service-By7aeVkC.js → payment.service-Cbs38oOx.js} +1 -1
- package/dist/cjs/{payout.service-Dn0rXkmg.js → payout.service-DGEinO-8.js} +1 -1
- package/dist/cjs/{plaid.service-CjaugrzX.js → plaid.service-JISYtGYD.js} +1 -1
- package/dist/cjs/styled-host-BxbU-bI7.js +20 -0
- package/dist/cjs/{terminal.service-C0_r_A60.js → terminal.service-9sdCsY2z.js} +1 -1
- package/dist/collection/components/modular-checkout/sub-components/justifi-plaid-payment-method.js +12 -8
- package/dist/collection/components/tokenize-payment-method/justifi-tokenize-payment-method.js +18 -2
- package/dist/collection/ui-components/styled-host/styled-host.js +10 -1
- package/dist/docs.json +1 -1
- package/dist/esm/{Analytics-tBzmPsnT.js → Analytics-C9VVBFjO.js} +2 -2
- package/dist/esm/{Api-BH6Wa9CT.js → Api-BSUerPjV.js} +1 -1
- package/dist/esm/additional-questions-form-step_15.entry.js +5 -5
- package/dist/esm/bank-account-form.entry.js +2 -2
- package/dist/esm/{business.service-XOnczlAa.js → business.service-DRzTONqj.js} +1 -1
- package/dist/esm/card-form.entry.js +2 -2
- package/dist/esm/{checkout.service-DvSxk9EZ.js → checkout.service-8sMLHuiA.js} +1 -1
- package/dist/esm/{detect-duplicate-version-BD3-8NL2.js → detect-duplicate-version-Dtfd-S4Z.js} +1 -1
- package/dist/esm/dispute-notification_2.entry.js +5 -5
- package/dist/esm/{event-types-CM5AGGBD.js → event-types-Dix82sNv.js} +1 -1
- package/dist/esm/form-alert_3.entry.js +1 -1
- package/dist/esm/{get-subaccounts-P-x_RqL5.js → get-subaccounts-DjD2utKp.js} +1 -1
- package/dist/esm/justifi-apple-pay_12.entry.js +37 -19
- package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +5 -5
- package/dist/esm/justifi-bank-account-form.entry.js +5 -5
- package/dist/esm/justifi-billing-form-full.entry.js +1 -1
- package/dist/esm/justifi-billing-form.entry.js +1 -1
- package/dist/esm/justifi-business-details.entry.js +6 -6
- package/dist/esm/justifi-business-form.entry.js +6 -6
- package/dist/esm/justifi-card-billing-form-simple.entry.js +1 -1
- package/dist/esm/justifi-card-form.entry.js +5 -5
- package/dist/esm/justifi-checkout-qr-code.entry.js +4 -4
- package/dist/esm/justifi-checkout.entry.js +5 -5
- package/dist/esm/justifi-checkouts-list-filters.entry.js +1 -1
- package/dist/esm/justifi-checkouts-list.entry.js +7 -7
- package/dist/esm/justifi-dispute-management.entry.js +6 -6
- package/dist/esm/justifi-gross-payment-chart.entry.js +5 -5
- package/dist/esm/justifi-order-terminals.entry.js +7 -7
- package/dist/esm/justifi-payment-details.entry.js +6 -6
- package/dist/esm/justifi-payment-provisioning.entry.js +6 -6
- package/dist/esm/justifi-payment-transactions-list.entry.js +6 -6
- package/dist/esm/justifi-payments-list-filters.entry.js +1 -1
- package/dist/esm/justifi-payments-list.entry.js +6 -6
- package/dist/esm/justifi-payout-details.entry.js +6 -6
- package/dist/esm/justifi-payout-transactions-list.entry.js +6 -6
- package/dist/esm/justifi-payouts-list-filters.entry.js +1 -1
- package/dist/esm/justifi-payouts-list.entry.js +7 -7
- package/dist/esm/justifi-qr-terminal.entry.js +5 -5
- package/dist/esm/justifi-refund-payment.entry.js +6 -6
- package/dist/esm/justifi-save-new-payment-method.entry.js +1 -1
- package/dist/esm/justifi-season-interruption-insurance.entry.js +5 -5
- package/dist/esm/justifi-skeleton.entry.js +1 -1
- package/dist/esm/justifi-terminal-orders-list-filters.entry.js +1 -1
- package/dist/esm/justifi-terminal-orders-list.entry.js +5 -5
- package/dist/esm/justifi-terminals-list-filters.entry.js +1 -1
- package/dist/esm/justifi-terminals-list.entry.js +7 -7
- package/dist/esm/{package-DhrQechy.js → package-C04splpj.js} +1 -1
- package/dist/esm/payment-method-option.entry.js +1 -1
- package/dist/esm/{payment.service-CBUnE4bP.js → payment.service-CLLAQ4ht.js} +1 -1
- package/dist/esm/{payout.service-DUYaYbeJ.js → payout.service-BZgKgDDq.js} +1 -1
- package/dist/esm/{plaid.service-Umm80G4q.js → plaid.service-CUoMQV-m.js} +1 -1
- package/dist/esm/styled-host-CXEpP1m_.js +18 -0
- package/dist/esm/{terminal.service-DeunLqmo.js → terminal.service-De58ZPM6.js} +1 -1
- package/dist/module/badge.js +1 -1
- package/dist/module/justifi-plaid-payment-method2.js +12 -9
- package/dist/module/justifi-tokenize-payment-method2.js +18 -2
- package/dist/module/package.js +1 -1
- package/dist/module/pagination-menu2.js +1 -1
- package/dist/module/parts.js +1 -1
- package/dist/module/spinner.js +1 -1
- package/dist/module/styled-host.js +11 -2
- package/dist/module/terminal-quantity-selector2.js +1 -1
- package/dist/types/components/tokenize-payment-method/justifi-tokenize-payment-method.d.ts +1 -0
- package/dist/webcomponents/p-12ee2546.entry.js +1 -0
- package/dist/webcomponents/{p-e5feca94.entry.js → p-1336c977.entry.js} +1 -1
- package/dist/webcomponents/p-1411a042.entry.js +1 -0
- package/dist/webcomponents/{p-51238f79.entry.js → p-19e638a1.entry.js} +1 -1
- package/dist/webcomponents/{p-e1fbadea.entry.js → p-2603928d.entry.js} +1 -1
- package/dist/webcomponents/p-266b3cf4.entry.js +1 -0
- package/dist/webcomponents/{p-b39c7414.entry.js → p-2a54e5d1.entry.js} +1 -1
- package/dist/webcomponents/{p-abebb03c.entry.js → p-303f8ffd.entry.js} +1 -1
- package/dist/webcomponents/{p-adaa1c98.entry.js → p-3c835c5d.entry.js} +1 -1
- package/dist/webcomponents/{p-511bc0b2.entry.js → p-599816a1.entry.js} +1 -1
- package/dist/webcomponents/p-5b9315b6.entry.js +1 -0
- package/dist/webcomponents/{p-ff67c8f7.entry.js → p-5de3f411.entry.js} +1 -1
- package/dist/webcomponents/{p-06ed3518.entry.js → p-73800780.entry.js} +1 -1
- package/dist/webcomponents/{p-d19d7d41.entry.js → p-8bb301a0.entry.js} +1 -1
- package/dist/webcomponents/{p-bd4d2924.entry.js → p-8de46fd1.entry.js} +1 -1
- package/dist/webcomponents/{p-5f20b0da.entry.js → p-92970d9d.entry.js} +1 -1
- package/dist/webcomponents/{p-5be775e8.entry.js → p-99111cd2.entry.js} +1 -1
- package/dist/webcomponents/p-9Lrj4zm8.js +1 -0
- package/dist/webcomponents/{p-357d14ee.entry.js → p-9a6ce4ed.entry.js} +1 -1
- package/dist/webcomponents/p-B-LmgMK4.js +1 -0
- package/dist/webcomponents/p-B1u-Iegl.js +1 -0
- package/dist/webcomponents/p-B8UcvRjv.js +1 -0
- package/dist/webcomponents/{p-DF7oFWnO.js → p-BJUSJGPP.js} +1 -1
- package/dist/webcomponents/p-C04splpj.js +1 -0
- package/dist/webcomponents/p-CZuwNeL1.js +1 -0
- package/dist/webcomponents/{p-CEHwp4sh.js → p-DON5-wIV.js} +1 -1
- package/dist/webcomponents/p-DTnmhThV.js +1 -0
- package/dist/webcomponents/{p-BKrZL95i.js → p-DWjkuM6f.js} +1 -1
- package/dist/webcomponents/{p-DCpGH4xL.js → p-Da0IToMr.js} +1 -1
- package/dist/webcomponents/{p-Bo7ndXwR.js → p-DgKsNl4p.js} +1 -1
- package/dist/webcomponents/{p-6f7756b7.entry.js → p-a19c4d51.entry.js} +1 -1
- package/dist/webcomponents/{p-12f5fdc0.entry.js → p-a3da15b6.entry.js} +1 -1
- package/dist/webcomponents/{p-2b5533a1.entry.js → p-a65ab079.entry.js} +1 -1
- package/dist/webcomponents/{p-fd1718e0.entry.js → p-a6b98663.entry.js} +1 -1
- package/dist/webcomponents/{p-b2b0303d.entry.js → p-ad842c42.entry.js} +1 -1
- package/dist/webcomponents/{p-a8f1c9b3.entry.js → p-ae41697b.entry.js} +1 -1
- package/dist/webcomponents/{p-deff4422.entry.js → p-aea1e9e4.entry.js} +1 -1
- package/dist/webcomponents/{p-6bfdc443.entry.js → p-b54c0942.entry.js} +1 -1
- package/dist/webcomponents/{p-521c534c.entry.js → p-b699d24b.entry.js} +1 -1
- package/dist/webcomponents/{p-3d02cb78.entry.js → p-b76b8634.entry.js} +1 -1
- package/dist/webcomponents/{p-2272a65b.entry.js → p-bebd8879.entry.js} +1 -1
- package/dist/webcomponents/{p-5331e011.entry.js → p-c96e25f9.entry.js} +1 -1
- package/dist/webcomponents/{p-5e196140.entry.js → p-d0a40e88.entry.js} +1 -1
- package/dist/webcomponents/p-d1361e3c.entry.js +1 -0
- package/dist/webcomponents/{p-d59d6c23.entry.js → p-d46ebc1c.entry.js} +1 -1
- package/dist/webcomponents/{p-a1ef7674.entry.js → p-dad1f6b9.entry.js} +1 -1
- package/dist/webcomponents/{p-91358854.entry.js → p-db854b84.entry.js} +1 -1
- package/dist/webcomponents/{p-28fb6b50.entry.js → p-dec8952b.entry.js} +1 -1
- package/dist/webcomponents/p-e3914845.entry.js +1 -0
- package/dist/webcomponents/{p-aba3b0dc.entry.js → p-e3f57bb1.entry.js} +1 -1
- package/dist/webcomponents/{p-89ed2d99.entry.js → p-e7c13d73.entry.js} +1 -1
- package/dist/webcomponents/{p-9c4ac3c5.entry.js → p-ee605f62.entry.js} +1 -1
- package/dist/webcomponents/{p-B6kC9tX2.js → p-rYB3onzC.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/styled-host-CW1WUnUq.js +0 -11
- package/dist/esm/styled-host-RvPhw8Gu.js +0 -9
- package/dist/webcomponents/p-05AWudQe.js +0 -1
- package/dist/webcomponents/p-4dabcfd6.entry.js +0 -1
- package/dist/webcomponents/p-63e02d42.entry.js +0 -1
- package/dist/webcomponents/p-80177bcb.entry.js +0 -1
- package/dist/webcomponents/p-9b930446.entry.js +0 -1
- package/dist/webcomponents/p-C8J9uVEs.js +0 -1
- package/dist/webcomponents/p-CEGSQXGU.js +0 -1
- package/dist/webcomponents/p-CKL24GQA.js +0 -1
- package/dist/webcomponents/p-CRaiEpKf.js +0 -1
- package/dist/webcomponents/p-DEfLsy2W.js +0 -1
- package/dist/webcomponents/p-DhrQechy.js +0 -1
- package/dist/webcomponents/p-e75d1756.entry.js +0 -1
- package/dist/webcomponents/p-f2c99647.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as t}from"./p-
|
|
1
|
+
import{A as t}from"./p-Da0IToMr.js";import"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";const e=t();class o{async fetchCheckout(t,o){return e.get({endpoint:`checkouts/${o}`,authToken:t})}async fetchCheckouts(t,o,c){return e.get({endpoint:"checkouts",params:c,headers:{Account:t},authToken:o})}async complete(t,o,c){const s=`checkouts/${o}/complete`,n={payment_mode:c.payment_mode};return c.payment_token&&(n.payment_token=c.payment_token),e.post({endpoint:s,body:n,authToken:t})}}export{o as C}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{w as n,c as o}from"./p-B4vLfYnZ.js";import{g as t}from"./p-Ds_P-dB8.js";import{p as a}from"./p-
|
|
1
|
+
import{w as n,c as o}from"./p-B4vLfYnZ.js";import{g as t}from"./p-Ds_P-dB8.js";import{p as a}from"./p-C04splpj.js";const e=()=>{async function e(e){var s,i;const{authToken:r,endpoint:d,method:p,params:u,body:c,signal:l,headers:h}=e;await n();const m=`${o.apiOrigin}/v1/${d}`,f=u?`${m}?${new URLSearchParams(u)}`:m,y=await async function(n){return n?{Authorization:`Bearer ${n}`,"Idempotency-Key":t(),"Content-Type":"application/json","Justifi-Web-Component-Version":a.version}:{"Content-Type":"application/json","Justifi-Web-Component-Version":a.version}}(r),T=Object.assign(Object.assign({},y),h),g=await fetch(f,{method:p,headers:T,body:c,signal:l});if(!g)return void function(n){console.error(`Error fetching from ${n}`)}(f);if(204===g.status)return{};const b=await g.json().catch((()=>({})));if(!g.ok){const n=new Error((null===(s=null==b?void 0:b.error)||void 0===s?void 0:s.message)||("string"==typeof(null==b?void 0:b.error)?b.error:null)||(null==b?void 0:b.message)||`Request failed: ${g.status}`);throw n.code=null===(i=null==b?void 0:b.error)||void 0===i?void 0:i.code,n.status=g.status,n.body=b,n}return b}return{get:async function(n){const{authToken:o,endpoint:t,params:a,signal:s,headers:i}=n;return e({authToken:o,endpoint:t,method:"GET",params:a,signal:s,headers:i})},post:async function(n){const{authToken:o,endpoint:t,body:a,params:s,signal:i,headers:r}=n;return e({authToken:o,endpoint:t,method:"POST",params:s,body:JSON.stringify(a),signal:i,headers:r})},put:async function(n){const{authToken:o,endpoint:t,body:a,params:s,signal:i}=n;return e({authToken:o,endpoint:t,method:"PUT",params:s,body:JSON.stringify(a),signal:i})},patch:async function(n){const{authToken:o,endpoint:t,body:a,params:s,signal:i}=n;return e({authToken:o,endpoint:t,method:"PATCH",params:s,body:JSON.stringify(a),signal:i})},destroy:async function(n){const{authToken:o,endpoint:t,params:a,signal:s}=n;return e({authToken:o,endpoint:t,method:"DELETE",params:a,signal:s})}}};export{e as A}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as t}from"./p-
|
|
1
|
+
import{A as t}from"./p-Da0IToMr.js";import"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";const n=t();class e{async fetchBusiness(t,e){return n.get({endpoint:`entities/business/${t}`,authToken:e})}async patchBusiness(t,e,s){return n.patch({endpoint:`entities/business/${e}`,body:s,authToken:t})}}class s{async fetchIdentity(t,e){return n.get({endpoint:`entities/identity/${t}`,authToken:e})}async patchIdentity(t,e,s){return n.patch({endpoint:`entities/identity/${e}`,body:s,authToken:t})}async postIdentity(t,e){return n.post({endpoint:"entities/identity",body:e,authToken:t})}}class i{async postBankAccount(t,e){return n.post({endpoint:"entities/bank_accounts",body:e,authToken:t})}}class o{async postDocumentRecord(t,e){return n.post({endpoint:"entities/document",body:e,authToken:t})}}export{e as B,o as D,s as I,i as a}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as r}from"./p-CV0Pyo1O.js";import{J as s}from"./p-
|
|
1
|
+
import{r as t,h as r}from"./p-CV0Pyo1O.js";import{J as s}from"./p-DON5-wIV.js";import{d as a}from"./p-BJUSJGPP.js";import{w as o}from"./p-B4vLfYnZ.js";import{S as p}from"./p-DTnmhThV.js";import"./p-CZfYo5-1.js";import{c as i}from"./p-FsWkrvEF.js";import"./p-C04splpj.js";import"./p-Da0IToMr.js";import"./p-Ds_P-dB8.js";import"./p-HXpYMWUU.js";import"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import"./p-DgTOxu8x.js";import"./p-DEx8fQeW.js";const m=class{constructor(r){t(this,r)}async componentWillLoad(){await o(),a(),this.analytics=new s(this)}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}async validate(){return this.cardFormElement.validate()}async tokenize({clientId:t,paymentMethodMetadata:r,account:s}){return this.cardFormElement.tokenize({clientId:t,paymentMethodMetadata:r,account:s})}render(){var t;return r(p,{key:"49cf4f202b0f327bd8ca4b4b3c892ae6df4a81f6"},r("card-form",{key:"480abf1238ed4b5bb1edd5362a432639fc9a7fb9",ref:t=>this.cardFormElement=t,maskCardNumber:null!==(t=this.maskCardNumber)&&void 0!==t?t:i.maskCardNumber}))}};export{m as justifi_card_form}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as a}from"./p-CV0Pyo1O.js";import{d as o}from"./p-
|
|
1
|
+
import{r as t,h as a}from"./p-CV0Pyo1O.js";import{d as o}from"./p-BJUSJGPP.js";import{J as s}from"./p-DON5-wIV.js";import{w as i}from"./p-B4vLfYnZ.js";import{S as r}from"./p-DTnmhThV.js";import"./p-CZfYo5-1.js";import"./p-C04splpj.js";import"./p-Da0IToMr.js";import"./p-Ds_P-dB8.js";import"./p-HXpYMWUU.js";import"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import"./p-DgTOxu8x.js";const c=class{constructor(a){t(this,a),this.showAccountNumberConfirmation=!1}async componentWillLoad(){await i(),o(),this.analytics=new s(this)}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}async validate(){return this.bankAccountFormElement?this.bankAccountFormElement.validate():{isValid:!1}}async tokenize({clientId:t,paymentMethodMetadata:a,account:o}){return this.bankAccountFormElement?this.bankAccountFormElement.tokenize({clientId:t,paymentMethodMetadata:a,account:o}):{error:{message:"Bank account form is not available."}}}render(){return a(r,{key:"3ac1f01cffa56e4ce30214c6290af227dc21fd6f"},a("bank-account-form",{key:"d6c194dd830d1ea2cfcbdc0af2c3427aaa7652aa",ref:t=>this.bankAccountFormElement=t,showAccountNumberConfirmation:this.showAccountNumberConfirmation}))}};export{c as justifi_bank_account_form}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,h as e}from"./p-CV0Pyo1O.js";import{S as t}from"./p-
|
|
1
|
+
import{r as s,h as e}from"./p-CV0Pyo1O.js";import{S as t}from"./p-DTnmhThV.js";import{S as r}from"./p-eBK-iWrz.js";import"./p-Bu7gdOaV.js";const i=class{constructor(e){s(this,e)}render(){return e(t,{key:"aae82594ed1833982d7bb06ea0808e56e06b11f8"},e(r,{key:"52c5680b1dc298b75646e5409b9c5c5b83f53eae",component:this.component,height:this.height,width:this.width,className:this.class,styles:this.customStyle}))}};export{i as justifi_skeleton}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,c as i,h as e}from"./p-CV0Pyo1O.js";import{A as s}from"./p-
|
|
1
|
+
import{r as t,c as i,h as e}from"./p-CV0Pyo1O.js";import{A as s}from"./p-Da0IToMr.js";import{C as n,b as r}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{g as o,a as h}from"./p-BhpaUYtS.js";import{E as a}from"./p-Bh6Q8AqQ.js";import{J as c}from"./p-DON5-wIV.js";import{d as l}from"./p-BJUSJGPP.js";import{f as u,o as f}from"./p-Ds_P-dB8.js";import{S as d}from"./p-MPer3Rw7.js";import{S as p}from"./p-DTnmhThV.js";import"./p-CZfYo5-1.js";import"./p-B4vLfYnZ.js";import"./p-DgTOxu8x.js";import"./p-C04splpj.js";import"./p-Bu7gdOaV.js";import"./p-HXpYMWUU.js";
|
|
2
2
|
/*!
|
|
3
3
|
* @kurkle/color v0.3.4
|
|
4
4
|
* https://github.com/kurkle/color#readme
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as s,c as e}from"./p-CV0Pyo1O.js";import{k as a,C as i,b as o}from"./p-Dqxyi-uK.js";import{J as r}from"./p-
|
|
1
|
+
import{h as t,r as s,c as e}from"./p-CV0Pyo1O.js";import{k as a,C as i,b as o}from"./p-Dqxyi-uK.js";import{J as r}from"./p-DON5-wIV.js";import{d as h}from"./p-BJUSJGPP.js";import{P as c}from"./p-B1u-Iegl.js";import"./p-B4vLfYnZ.js";import"./p-HXpYMWUU.js";import{p as n}from"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{g as p,a as d}from"./p-BhpaUYtS.js";import{M as u,m as f}from"./p-Bxc0NRj8.js";import{m,S as l}from"./p-B8UcvRjv.js";import{S as y}from"./p-DTnmhThV.js";import{T as b,a as g,b as v,c as j,d as _,e as w,f as C,g as k,h as S,i as T,j as P,k as D,l as O}from"./p-DZr0wLGh.js";import{T as A}from"./p-CZfYo5-1.js";import{a as I}from"./p-Ds_P-dB8.js";import{a6 as B,a7 as E}from"./p-Bu7gdOaV.js";import{o as V,g as x}from"./p-CGnRD4wF.js";import"./p-C04splpj.js";import"./p-Da0IToMr.js";import"./p-DgTOxu8x.js";import"./p-Dz8KJn2G.js";import"./p-MPer3Rw7.js";const G={created_at:()=>t("th",{part:B,scope:"col",title:"The date the payout was deposited"},"Created"),sub_account_name:()=>t("th",{part:B,scope:"col",title:"The sub account associated with the payout"},"Sub Account"),payments_total:()=>t("th",{part:B,scope:"col",title:"The total payments amount associated with the payout"},"Payments"),refunds_total:()=>t("th",{part:B,scope:"col",title:"The total refunds amount associated with the payout"},"Refunds"),fees_total:()=>t("th",{part:B,scope:"col",title:"The total fees amount associated with the payout"},"Fees"),other_total:()=>t("th",{part:B,scope:"col",title:"The total other amount"},"Other"),amount:()=>t("th",{part:B,scope:"col",title:"The total amount of the payout"},"Amount"),status:()=>t("th",{part:B,scope:"col",title:"The real-time status of each payout"},"Status"),csv:()=>t("th",{part:B,scope:"col",title:"Export CSV"})},R=class{constructor(t){s(this,t),this.errorEvent=e(this,"error-event",7),this.clickEvent=e(this,"click-event",7),this.errorMessage=null,this.payouts=[],this.subAccounts=[],this.loading=!0,this.paging=n,this.pagingParams={},this.columns="created_at,amount,status,payments_total,refunds_total,fees_total,other_total,csv",this.downloadCSV=t=>{this.getPayoutCSV({payoutId:t,onError:()=>{this.errorEvent.emit({errorCode:o.FETCH_ERROR,message:"Failed to download CSV",severity:i.ERROR})}})},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:A.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:A.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr"),e=s.dataset.rowEntityId;if(!e)return;if(s.querySelector("a")===t.target)return;const a=this.payouts.find((t=>t.id===e));this.clickEvent.emit({name:A.row,data:a})}}componentWillLoad(){var s;h(),this.analytics=new r(this),this.initializeGetData(),this.payoutsTable=new b(this.payouts,this.columns,G,(s=this.downloadCSV,{created_at:(s,e)=>t("td",{part:E(e)},t("div",{class:"fw-bold"},I(s.created_at,{showDisplayDate:!0}))),sub_account_name:(s,e)=>t("td",{part:E(e)},s.sub_account_name),payments_total:(s,e)=>t("td",{part:E(e)},s.formattedPaymentAmount(s.payments_total)),refunds_total:(s,e)=>t("td",{part:E(e)},s.formattedPaymentAmount(s.refunds_total)),fees_total:(s,e)=>t("td",{part:E(e)},s.formattedPaymentAmount(s.fees_total)),other_total:(s,e)=>t("td",{part:E(e)},s.formattedPaymentAmount(s.other_total)),amount:(s,e)=>t("td",{part:E(e)},s.formattedPaymentAmount(s.amount)),status:(s,e)=>t("td",{part:E(e)},u(s.status)),csv:(e,a)=>t("td",{part:E(a)},t("a",{href:"#",onClick:t=>{t.preventDefault(),s(e.id)}},"CSV"))})),this.getPayouts&&this.getSubAccounts&&this.fetchData(),V("set",(()=>{this.pagingParams={}})),V("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}updateOnPropChange(){this.fetchData()}initializeGetData(){this.initializePayoutsServices(),this.initializeGetSubAccounts()}initializePayoutsServices(){if(this.accountId&&this.authToken){const t={id:this.accountId,authToken:this.authToken,service:new c};this.getPayouts=(({id:t,authToken:s,service:e})=>async({params:o,onSuccess:r,onError:h})=>{var c,n;try{const u=await e.fetchPayouts(t,s,o);if(u.error)return h({error:d(u.error),code:p(null===(n=u.error)||void 0===n?void 0:n.code),severity:i.ERROR});{const t=Object.assign({},u.page_info);r({payouts:(null===(c=u.data)||void 0===c?void 0:c.map((t=>new a(t))))||[],pagingInfo:t})}}catch(t){const s=p(null==t?void 0:t.code);return h({error:t.message||t,code:s,severity:i.ERROR})}})(t),this.getPayoutCSV=f(t)}else this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:this.errorMessage,severity:i.ERROR})}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({primaryAccountId:this.accountId,authToken:this.authToken,service:new l}))}fetchData(){this.loading=!0,this.getPayouts({params:this.payoutParams,onSuccess:({payouts:t,pagingInfo:s})=>{this.payouts=t,this.paging=s,this.payoutsTable.collectionData=this.payouts,this.payoutsTable.columnKeys.includes("sub_account_name")?this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.payouts=this.payouts.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get payoutParams(){const t=x();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){const t=this.payouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.payouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.payoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return t(y,{key:"531a4da740faf612ead2c67abc761c341f01d2e4"},t(g,{key:"cdcf7085fa6d7339584c931113713d4c152f0984"},t(v,{key:"dc05d4c2705b88460a8ab5d40314185ffc024af9"},t(j,{key:"0f5c2ec1572c66ed4e5c27cf317aef188c0cd6f9"},t(_,{key:"81b89dc4fd7d3ffc4228b306f7594c5fe1a0e4c2"},this.payoutsTable.columnData.map((t=>t)))),t(w,{key:"a7a13c91b22604fc65aad9d8e2b0fbf13c2cf875"},t(C,{key:"3a1d17552ab2654e1d4c3477190b154f24a381e2",columnSpan:this.payoutsTable.columnKeys.length,isLoading:this.loading}),t(k,{key:"635893cfcbc007920e49ac3848eefe06a09fbd55",isEmpty:this.showEmptyState,columnSpan:this.payoutsTable.columnKeys.length}),t(S,{key:"f32b5cca86e7a92b9c20e68d6223317df728378e",columnSpan:this.payoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.payoutsTable.rowData.map(((s,e)=>t(T,{"data-test-id":"table-row","data-row-entity-id":this.entityId[e],onClick:this.rowClickHandler},s)))),this.paging&&t(P,{key:"0dc67dfef55f13322f24f2229457a1cf243c6e6a"},t(D,{key:"798a33a4bcf04e7e2235647dad1c5c14782b483b"},t(O,{key:"f7974d08e6d8e8cd8d0e2955cc8df31ebbecdcec",colSpan:this.payoutsTable.columnData.length},t("pagination-menu",{key:"e91069e7423733dcb4f7c87c8933f1fd554ce398",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"],pagingParams:["updateOnPropChange"],getPayouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"]}}};export{R as justifi_payouts_list}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-OeJ-3w3l.js";import"./p-B4vLfYnZ.js";import{c as s,a as l}from"./p-Ds_P-dB8.js";import{I as d,a as i}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{f as c,p as r,c as o}from"./p-CArdj6i_.js";import{f,a as p}from"./p-Bu7gdOaV.js";import{S as b}from"./p-
|
|
1
|
+
import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-OeJ-3w3l.js";import"./p-B4vLfYnZ.js";import{c as s,a as l}from"./p-Ds_P-dB8.js";import{I as d,a as i}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{f as c,p as r,c as o}from"./p-CArdj6i_.js";import{f,a as p}from"./p-Bu7gdOaV.js";import{S as b}from"./p-DTnmhThV.js";import"./p-CZfYo5-1.js";import"./p-BFTU3MAI.js";import"./p-DgTOxu8x.js";import"./p-HXpYMWUU.js";const m=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{c[e]=a},this.handleDateInput=(e,a)=>{const t=s(a,{setExactTime:!0});this.setParamsOnChange(e,t)}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({status:this.checkoutStatus,payment_mode:this.paymentMode,checkout_id:this.checkoutId,successful_payment_id:this.successfulPaymentId,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([e,a])=>{a&&(r[e]=a)}))}get checkoutStatusOptions(){return[{label:"All",value:""},{label:"Created",value:d.created},{label:"Completed",value:d.completed},{label:"Attempted",value:d.attempted},{label:"Expired",value:d.expired}]}get checkoutPaymentModeOptions(){return[{label:"All",value:""},{label:"E-commerce",value:i.ecom},{label:"BNPL",value:i.bnpl},{label:"Apple Pay",value:i.apple_pay},{label:"Paypal",value:i.paypal},{label:"Venmo",value:i.venmo}]}render(){const e=Object.assign({},c);return a(b,{key:"a84f587608b49683633b26d23e548b576c5daba3"},a("table-filters-menu",{key:"d7a43576bb803d706755ce9deafda5f8732540c1",params:e,clearParams:o,part:f},a("div",{key:"6ce5861f974a8d2c7bc5bcb03b7b0df60e10d780",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"492714a0263fb27222e17794a640e3855c9ba6e1",class:"p-2"},a("form-control-text",{key:"357b10f4f290c9500fb5fe24e4bc97ea80511e2c",name:"checkout_id",label:"Checkout ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.checkoutId||c.checkout_id,disabled:!!this.checkoutId,part:p})),a("div",{key:"cc8535898de01f417080c984ed53f1582848fd74",class:"p-2"},a("form-control-text",{key:"37aa831598c6496af4fd358f94c54a118f309d82",name:"successful_payment_id",label:"Successful Payment ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.successfulPaymentId||c.successful_payment_id,disabled:!!this.successfulPaymentId,part:p})),a("div",{key:"751c3f3b60b0140b9eb954de3a0e94f5feb6075f",class:"p-2"},a("form-control-select",{key:"afa69abd4be56a27d0cafce1508a7edeb119d7b0",name:"status",label:"Status",options:this.checkoutStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.checkoutStatus||c.status||"",disabled:!!this.checkoutStatus,part:p})),a("div",{key:"86c4e7121a67e4ef1bb96fcb6ccbe9a900378556",class:"p-2"},a("form-control-select",{key:"eaa9e1b1214fb3955de0f0421760da4bf1a773a2",name:"payment_mode",label:"Payment Mode",options:this.checkoutPaymentModeOptions,inputHandler:this.setParamsOnChange,defaultValue:this.paymentMode||c.payment_mode||"",disabled:!!this.paymentMode,part:p})),a("div",{key:"8f28caa07d711135223507f1864343531d451a15",class:"p-2"},a("form-control-date",{key:"038141b8b8fc669cca8c849d23cba1a7e2f1d5aa",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:l(this.createdAfter,{showInputDateTime:!0})||l(c.created_after,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdAfter,part:p})),a("div",{key:"ddb442863d596de25c392d14b8fb364db3afdaec",class:"p-2"},a("form-control-date",{key:"cee1d9337dd5f6f9c258892f89573a2b07c2180c",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:l(this.createdBefore,{showInputDateTime:!0})||l(c.created_before,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdBefore,part:p})))))}};export{m as justifi_checkouts_list_filters}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,h as i}from"./p-CV0Pyo1O.js";import{S as s}from"./p-
|
|
1
|
+
import{r,h as i}from"./p-CV0Pyo1O.js";import{S as s}from"./p-DTnmhThV.js";import"./p-CZfYo5-1.js";const a=class{constructor(i){r(this,i)}async getValues(){var r,i;return null!==(i=null===(r=this.cardBillingFormSimpleRef)||void 0===r?void 0:r.getValues())&&void 0!==i?i:{}}async validate(){var r,i;return null!==(i=null===(r=this.cardBillingFormSimpleRef)||void 0===r?void 0:r.validate())&&void 0!==i?i:{isValid:!1,errors:{}}}render(){return i(s,{key:"f8cdac6b006bbaf15d7e6b92db8f781afa40899f"},i("card-billing-form-simple",{key:"b0973b5459109da5eac937fd0aefbff1c924924c",legend:this.legend,ref:r=>this.cardBillingFormSimpleRef=r}))}};export{a as justifi_card_billing_form_simple}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-OeJ-3w3l.js";import{f as d,p as s,c as l}from"./p-BLhz_ggG.js";import{f as c,a as i}from"./p-Bu7gdOaV.js";import{S as r}from"./p-
|
|
1
|
+
import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-OeJ-3w3l.js";import{f as d,p as s,c as l}from"./p-BLhz_ggG.js";import{f as c,a as i}from"./p-Bu7gdOaV.js";import{S as r}from"./p-DTnmhThV.js";import"./p-CZfYo5-1.js";import{c as o,a as f}from"./p-Ds_P-dB8.js";import"./p-BFTU3MAI.js";import"./p-DgTOxu8x.js";import"./p-HXpYMWUU.js";const n=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{d[e]=a},this.handleDateInput=(e,a)=>{const t=o(a,{setExactTime:!0});this.setParamsOnChange(e,t)}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({payment_id:this.paymentId,terminal_id:this.terminalId,payment_status:this.paymentStatus,payment_mode:this.paymentMode,checkout_id:this.checkoutId,account_holder:this.accountHolder,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([e,a])=>{a&&(s[e]=a)}))}get paymentStatusOptions(){return[{label:"All",value:""},{label:"Pending",value:"pending"},{label:"Authorized",value:"authorized"},{label:"Succeeded",value:"succeeded"},{label:"Failed",value:"failed"},{label:"Disputed",value:"disputed"},{label:"Refunded",value:"refunded"}]}get paymentModeOptions(){return[{label:"All",value:""},{label:"E-commerce",value:"ecom"},{label:"ACH",value:"ach"},{label:"Card Present",value:"card_present"}]}render(){const e=Object.assign({},d);return a(r,{key:"fd6a6c240ed15d7d28d4d58db57085d9789e055c"},a("table-filters-menu",{key:"bc1524c293cc12f9d5976d1a7f888c4d35096b5a",params:e,clearParams:l,part:c},a("div",{key:"5180f595ac0d5c36e16fbcb8a6751c48ac88d166",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"2771ebb890c0a9f469e02f22523cb7cfb418d513",class:"p-2"},a("form-control-text",{key:"3c93cc523f8e5e2d9e63c1b6265e8e03c08377fa",name:"payment_id",label:"Payment ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.paymentId||d.payment_id,disabled:!!this.paymentId,part:i})),a("div",{key:"66e985568825d8992c4081f0d459807a7773fd49",class:"p-2"},a("form-control-text",{key:"63efc9b447218119d90a0601eb85528117197b42",name:"terminal_id",label:"Terminal ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalId||d.terminal_id,disabled:!!this.terminalId,part:i})),a("div",{key:"0147be1acda5af7b2ddd3ae76e61e0e2ec33ddcd",class:"p-2"},a("form-control-select",{key:"786ab3d3205d2feda8c11840a9c5429915f6ab4c",name:"payment_status",label:"Status",options:this.paymentStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.paymentStatus||d.payment_status||"",disabled:!!this.paymentStatus,part:i})),a("div",{key:"e08cee43b808e3246989c277d1b5b870799b602d",class:"p-2"},a("form-control-select",{key:"b2edc5a654ad50a00ee8171f673c48a2f0b10699",name:"payment_mode",label:"Payment Mode",options:this.paymentModeOptions,inputHandler:this.setParamsOnChange,defaultValue:this.paymentMode||d.payment_mode||"",disabled:!!this.paymentMode,part:i})),a("div",{key:"9c393aed8075c68fa21e919fad3e66a75bf0801b",class:"p-2"},a("form-control-text",{key:"40967dca09780e59a096f117068c1f49dc7f68fb",name:"checkout_id",label:"Checkout ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.checkoutId||d.checkout_id,disabled:!!this.checkoutId,part:i})),a("div",{key:"4c5177f35cd58c1e465f5750bdf92559119bbffa",class:"p-2"},a("form-control-text",{key:"4a905f81a07c1a10df4d72ba85657baad464cc87",name:"account_holder",label:"Account Holder",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.accountHolder||d.account_holder,disabled:!!this.accountHolder,part:i})),a("div",{key:"272f47c23883018d4fda9a215738b6b81764b99e",class:"p-2"},a("form-control-date",{key:"40f7c019ec33378c42b7093c9023eb80df7f787f",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:f(this.createdAfter,{showInputDateTime:!0})||f(d.created_after,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdAfter,part:i})),a("div",{key:"b714a400679ed1f4bcf96afe44e9100c6e52cef7",class:"p-2"},a("form-control-date",{key:"361a3d52c4f2c78aec9727cf6cfdd5b8d900bd3d",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:f(this.createdBefore,{showInputDateTime:!0})||f(d.created_before,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdBefore,part:i})))))}};export{n as justifi_payments_list_filters}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as a}from"./p-CV0Pyo1O.js";import{r as t}from"./p-Bu7gdOaV.js";import{S as o}from"./p-
|
|
1
|
+
import{r as e,h as a}from"./p-CV0Pyo1O.js";import{r as t}from"./p-Bu7gdOaV.js";import{S as o}from"./p-DTnmhThV.js";import"./p-CZfYo5-1.js";const s=class{constructor(a){e(this,a)}render(){return a(o,{key:"45a24177da27e09c500054f09e8d5a432fc790d6",class:"payment-method"},a("div",{key:"2d5cdef6c196b9be0c09ed109f20b44cd94eac8c",class:"radio-list-item p-3",part:t,onClick:this.clickHandler,hidden:this.radioButtonHidden},a("form-control-radio",{key:"4cc39aae8c3a1ad7dadd385e99ff854643172b38",name:"paymentMethodType",value:this.paymentMethodOptionId,checked:this.isSelected,label:this.label})))}};export{s as payment_method_option}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as e,c as i}from"./p-CV0Pyo1O.js";import{n as s,C as a,b as r}from"./p-Dqxyi-uK.js";import{J as n}from"./p-
|
|
1
|
+
import{h as t,r as e,c as i}from"./p-CV0Pyo1O.js";import{n as s,C as a,b as r}from"./p-Dqxyi-uK.js";import{J as n}from"./p-DON5-wIV.js";import{d as o}from"./p-BJUSJGPP.js";import{T as c}from"./p-9Lrj4zm8.js";import"./p-B4vLfYnZ.js";import"./p-HXpYMWUU.js";import{p as h}from"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{g as d,a as p}from"./p-BhpaUYtS.js";import{m,S as u}from"./p-B8UcvRjv.js";import{S as l}from"./p-DTnmhThV.js";import{T as f,a as b,b as v,c as g,d as j,e as k,f as y,g as T,h as w,i as _,j as C,k as S,l as D}from"./p-DZr0wLGh.js";import{T as P}from"./p-CZfYo5-1.js";import{B as O,a as I}from"./p-Dz8KJn2G.js";import{a6 as x,a7 as A}from"./p-Bu7gdOaV.js";import{j as B}from"./p-Ds_P-dB8.js";import{o as G,g as z}from"./p-BzjgvHHT.js";import"./p-C04splpj.js";import"./p-Da0IToMr.js";import"./p-DgTOxu8x.js";import"./p-MPer3Rw7.js";const E={nickname:()=>t("th",{part:x,scope:"col",title:"The nickname associated with the terminal"},"Nickname"),model_name:()=>t("th",{part:x,scope:"col",title:"The model name of the terminal"},"Model Name"),id:()=>t("th",{part:x,scope:"col",title:"The ID of the terminal"},"ID"),provider:()=>t("th",{part:x,scope:"col",title:"The provider of the terminal"},"Provider"),provider_serial_number:()=>t("th",{part:x,scope:"col",title:"The serial number of the terminal"},"Serial Number"),device_id:()=>t("th",{part:x,scope:"col",title:"The device/provider ID of the terminal"},"Device ID"),sub_account_name:()=>t("th",{part:x,scope:"col",title:"The sub account associated with the terminal"},"Sub Account"),status:()=>t("th",{part:x,scope:"col",title:"The current status of each terminal"},"Status")},L={nickname:(e,i)=>t("td",{part:A(i)},e.nickname),model_name:(e,i)=>t("td",{part:A(i)},e.model_name),id:(e,i)=>t("td",{part:A(i)},e.id),provider:(e,i)=>t("td",{part:A(i)},B(e.provider)),provider_serial_number:(e,i)=>t("td",{part:A(i)},e.provider_serial_number),device_id:(e,i)=>t("td",{part:A(i)},e.provider_id),sub_account_name:(e,i)=>t("td",{part:A(i)},e.sub_account_name),status:(e,i)=>t("td",{part:A(i)},t(I,Object.assign({},{connected:{variant:O.SUCCESS,title:"This terminal is connected",text:"Connected"},disconnected:{variant:O.DANGER,title:"This terminal is disconnected",text:"Disconnected"},unknown:{variant:O.SECONDARY,title:"The status of this terminal is unknown",text:"Unknown"},pending_configuration:{variant:O.WARNING,title:"This terminal is pending configuration",text:"Pending configuration"},archived:{variant:O.SECONDARY,title:"This terminal is archived",text:"Archived"}}[e.status])))},U=class{constructor(t){e(this,t),this.clickEvent=i(this,"click-event",7),this.errorEvent=i(this,"error-event",7),this.terminals=[],this.subAccounts=[],this.loading=!0,this.paging=h,this.pagingParams={},this.columns="nickname,provider_serial_number,status",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:P.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:P.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const i=this.terminals.find((t=>t.id===e));this.clickEvent.emit({name:P.row,data:i})}}componentWillLoad(){o(),this.analytics=new n(this),this.terminalsTable=new f(this.terminals,this.columns,E,L),this.initializeGetData(),this.getTerminals&&this.getSubAccounts&&this.fetchData(),G("set",(()=>{this.pagingParams={}})),G("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}updateOnPropChange(){this.fetchData()}initializeGetData(){this.initializeGetTerminals(),this.initializeGetSubAccounts()}initializeGetTerminals(){this.accountId&&this.authToken?this.getTerminals=(({id:t,authToken:e,service:i})=>async({params:r,onSuccess:n,onError:o})=>{var c,h;try{const m=await i.fetchTerminals(t,e,r);if(m.error)return o({error:p(m.error),code:d(null===(h=m.error)||void 0===h?void 0:h.code),severity:a.ERROR});{const t=Object.assign({},m.page_info);n({terminals:(null===(c=m.data)||void 0===c?void 0:c.map((t=>new s(t))))||[],pagingInfo:t})}}catch(t){const e=d(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:a.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new c}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:a.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({primaryAccountId:this.accountId,authToken:this.authToken,service:new u}))}fetchData(){this.loading=!0,this.getTerminals({params:this.terminalParams,onSuccess:async({terminals:t,pagingInfo:e})=>{this.terminals=t,this.paging=e,this.terminalsTable.collectionData=this.terminals,this.terminalsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:e,severity:i})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:i}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.terminals=this.terminals.map((t=>{var e;return t.sub_account_name=null===(e=this.subAccounts.find((e=>e.id===t.account_id)))||void 0===e?void 0:e.name,t})),this.loading=!1},onError:({error:t,code:e,severity:i})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:i}),this.loading=!1}})}get terminalParams(){const t=z();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){const t=this.terminals.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.terminals.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return t(l,{key:"7aff8b07dcd19216c714f2318c1af5dbebc54147"},t(b,{key:"7daec7f4553f687b3ebbeb7d561fbf904049841b"},t(v,{key:"2f67e873333800bdd78d8c60f9db218c349097d0"},t(g,{key:"61499a69253f0add24f5e60c385b14fc3e6ba90f"},t(j,{key:"fcd5d3287d6dd3dbf4e20837ca06d9f6dcc74a16"},this.terminalsTable.columnData.map((t=>t)))),t(k,{key:"664b70934aae39f8ccceeaaf012e1933a4c27c95"},t(y,{key:"3d5e79192be7a6a8e2611d9ac7d551e15a4a4207",columnSpan:this.terminalsTable.columnKeys.length,isLoading:this.loading}),t(T,{key:"60d4263bd934af2c6d204a3d2f0aee6639043d80",isEmpty:this.showEmptyState,columnSpan:this.terminalsTable.columnKeys.length}),t(w,{key:"2d3340153f20d7a057e31f3eb2b570ec1d7c4e9f",columnSpan:this.terminalsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalsTable.rowData.map(((e,i)=>t(_,{"data-test-id":"table-row","data-row-entity-id":this.entityId[i],onClick:this.rowClickHandler},e)))),this.paging&&t(C,{key:"b893b1cd12d3c0440b1c5cb015503aa8309a84e1"},t(S,{key:"532462ef72bc8c9fbbf8cae69c1f7ebd60b403b4"},t(D,{key:"c18d2a8f05cbc17f7dc21a18a814a7eb8c83d6ea",colSpan:this.terminalsTable.columnData.length},t("pagination-menu",{key:"fd1aef3373787dfb79f517a69e2d771d61d5dee3",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"],pagingParams:["updateOnPropChange"],getTerminals:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{U as justifi_terminals_list}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as s}from"./p-CV0Pyo1O.js";import{S as a}from"./p-
|
|
1
|
+
import{r as e,c as t,h as s}from"./p-CV0Pyo1O.js";import{S as a}from"./p-DTnmhThV.js";import"./p-CZfYo5-1.js";const h=class{constructor(s){e(this,s),this.checkboxChanged=t(this,"checkboxChanged",7),this.label="Save New Payment Method"}render(){return s(a,{key:"e5792a56b3a21bcf3d5fb0604fbf487ce536b498"},s("save-new-payment-method",{key:"f01b1546e90db73bc8da8edcab4a3d384e4f742e",label:this.label,hidden:this.hidden,onCheckboxChanged:e=>this.checkboxChanged.emit(e.detail)}))}};export{h as justifi_save_new_payment_method}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as e,c as s}from"./p-CV0Pyo1O.js";import{c as r,a as i,F as n}from"./p-D9sqTVmd.js";import{f as o}from"./p-Ds_P-dB8.js";import"./p-B4vLfYnZ.js";import{R as a,C as u,b as h,q as l}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{B as c}from"./p-CU2Dwa94.js";import{S as d}from"./p-
|
|
1
|
+
import{h as t,r as e,c as s}from"./p-CV0Pyo1O.js";import{c as r,a as i,F as n}from"./p-D9sqTVmd.js";import{f as o}from"./p-Ds_P-dB8.js";import"./p-B4vLfYnZ.js";import{R as a,C as u,b as h,q as l}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{B as c}from"./p-CU2Dwa94.js";import{S as d}from"./p-DTnmhThV.js";import"./p-CZfYo5-1.js";import{P as m}from"./p-CZuwNeL1.js";import{m as p}from"./p-C9p1gWAC.js";import{J as f}from"./p-DON5-wIV.js";import{d as v}from"./p-BJUSJGPP.js";import{g as y,a as j}from"./p-BhpaUYtS.js";import{A as w}from"./p-Da0IToMr.js";import{S as b}from"./p-eBK-iWrz.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-DgTOxu8x.js";import"./p-Bu7gdOaV.js";import"./p-C04splpj.js";const T=t=>{const e=+t;return i().required("Amount is required").test("max-amount",`Refund amount cannot be more than payment amount: ${o(e)}`,(function(t){return+t<=+e})).test("min-amount","Refund amount must be greater than 0",(function(t){return+t>0}))},C=t=>{if(t)return r({amount:T(t),description:i().optional(),reason:i().optional().oneOf([a.customerRequest,a.duplicate,a.fraudulent],"Select a reason")})},g=[{label:"Select a reason",value:""},{label:"Customer requested a refund",value:"customer_request"},{label:"Customer was double-charged",value:"duplicate"},{label:"Payment was reported as fraud",value:"fraudulent"}],x=w();class I{async postRefund(t,e,s,r){return x.post({endpoint:`payments/${t}/refunds`,headers:{"Sub-Account":e},body:r,authToken:s})}}const S=w();class P{async postVoid(t,e,s){return S.post({endpoint:`payments/${t}/void`,headers:{"Sub-Account":e},authToken:s})}}const A=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(b,{width:"100%",height:"40px"}))),D=()=>t(d,null,t("div",{class:"row gap-5"},t(A,null),t(A,null),t(A,null))),V=class{constructor(t){e(this,t),this.errorEvent=s(this,"error-event",7),this.submitEvent=s(this,"submit-event",7),this.refundPayload={},this.displayAmount="",this.errors={},this.paymentLoading=!0,this.refundLoading=!1,this.hideSubmitButton=!1,this.inputHandler=(t,e)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}componentWillLoad(){v(),this.analytics=new f(this),this.initializeApi(),this.formController=new n(C())}handleError(t,e,s){this.errorEvent.emit({errorCode:t,message:e,severity:s})}checkAmount(t){return t>0}handleInvalidAmount(){this.submitDisabled=!0,this.handleError(h.INVALID_REFUND_AMOUNT,"Refund amount must be greater than 0",u.ERROR)}isPaymentCreatedWithin25Minutes(){var t;if(!this.payment||!(null===(t=this.payment)||void 0===t?void 0:t.created_at))return!1;const e=new Date(this.payment.created_at);return((new Date).getTime()-e.getTime())/6e4<=25}initializeFormController(){const t=this.refundPayload.amount,e=t?t.toString():"0";this.formController=new n(C(e)),this.formController.setInitialValues({amount:e}),this.formController.values.subscribe((t=>{this.refundPayload=Object.assign({},t)})),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.paymentId&&this.authToken?p({id:this.paymentId,authToken:this.authToken,service:new m})({onSuccess:({payment:t})=>{this.payment=t,this.refundPayload=new l({amount:t.amount_refundable})},onError:({error:t,code:e,severity:s})=>{this.handleError(e,t,s)},final:()=>{this.checkAmount(this.refundPayload.amount)?this.initializeFormController():this.handleInvalidAmount(),this.paymentLoading=!1}}):this.handleError(h.MISSING_PROPS,"Payment ID and Auth Token are required",u.ERROR)}async refundPayment(t){if(t&&t.preventDefault(),!await this.formController.validate())return;const e=this.formController.values.getValue();return this.refundLoading=!0,this.isPaymentCreatedWithin25Minutes()?this.tryVoidPayment():this.processRefund(e)}async tryVoidPayment(){const t=(({authToken:t,accountId:e,paymentId:s,service:r})=>async({onSuccess:i,onError:n,final:o})=>{var a;try{const o=await r.postVoid(s,e,t);if(o.error)return n({error:j(o.error),code:y(null===(a=o.error)||void 0===a?void 0:a.code),severity:u.ERROR});i(o)}catch(t){const e=y(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:u.ERROR})}finally{o()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new P});return new Promise((e=>{let s,r=!1;const i=this.formController.values.getValue();t({onSuccess:t=>{s=t,r=!0},onError:({error:t,code:s,severity:n})=>{r=!0,this.handleError(s,t,n),this.processRefund(i).then(e)},final:()=>{s&&!s.error&&r&&(this.submitEvent.emit({response:s}),this.submitDisabled=!0,this.refundLoading=!1,e(s.data))}})}))}async processRefund(t){const e=(({authToken:t,accountId:e,paymentId:s,service:r})=>async({refundBody:i,onSuccess:n,onError:o,final:a})=>{var h;try{const a=await r.postRefund(s,e,t,i);if(a.error)return o({error:j(a.error),code:y(null===(h=a.error)||void 0===h?void 0:h.code),severity:u.ERROR});n(a)}catch(t){const e=y(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:u.ERROR})}finally{a()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new I});return new Promise((s=>{let r;e({refundBody:t,onSuccess:t=>{r=t},onError:({error:t,code:e,severity:s})=>{r=t,this.handleError(e,t,s)},final:()=>{this.submitEvent.emit({response:r}),this.submitDisabled=!0,this.refundLoading=!1,s(r.data)}})}))}render(){if(this.paymentLoading)return t(D,null);const e=this.formController.getInitialValues(),s=this.refundPayload.amount;return t(d,null,t("form",null,t("fieldset",null,t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-monetary",{name:"amount",label:"Refund Amount",defaultValue:e.amount,inputHandler:this.inputHandler,errorText:this.errors.amount})),t("div",{class:"col-12"},t("form-control-select",{name:"reason",label:"Reason for refund (optional)",defaultValue:e.reason,inputHandler:this.inputHandler,options:g,errorText:this.errors.reason})),t("div",{class:"col-12"},t("form-control-textarea",{name:"description",label:"Note (optional)",defaultValue:e.description,inputHandler:this.inputHandler,maxLength:250,errorText:this.errors.description})),t("div",{class:"form-group d-flex flex-row-reverse"},t(c,{variant:"primary",type:"submit",onClick:this.refundPayment.bind(this),isLoading:this.paymentLoading||this.refundLoading,hidden:this.hideSubmitButton,disabled:this.submitDisabled},`Refund ${o(+s)}`))))))}};export{V as justifi_refund_payment}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as s,r as t,c as i}from"./p-CV0Pyo1O.js";import{A as e}from"./p-
|
|
1
|
+
import{h as s,r as t,c as i}from"./p-CV0Pyo1O.js";import{A as e}from"./p-Da0IToMr.js";import{C as r,b as o}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{g as a,a as n}from"./p-BhpaUYtS.js";import{J as c}from"./p-DON5-wIV.js";import{d as h}from"./p-BJUSJGPP.js";import{c as l}from"./p-FsWkrvEF.js";import{p as d,f as p,r as u,i as v}from"./p-Ds_P-dB8.js";import{v as m,i as y,a as f,H as j}from"./p-x2oNTAWh.js";import{t as _,z as g}from"./p-Bu7gdOaV.js";import{S as T}from"./p-DTnmhThV.js";import"./p-CZfYo5-1.js";import{S as k}from"./p-eBK-iWrz.js";import"./p-B4vLfYnZ.js";import"./p-DgTOxu8x.js";import"./p-C04splpj.js";import"./p-DEx8fQeW.js";import"./p-HXpYMWUU.js";const w=e();class b{async fetchQuote(s,t){return w.post({endpoint:"insurance/quotes",body:t,authToken:s})}async toggleCoverage(s,t,i){return w.post({endpoint:`insurance/quotes/${t}/toggle`,body:i,authToken:s})}}const C=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(k,{width:"35%",height:"30px"})),s("div",{class:"col-12"},s(k,{width:"70%"})),s("div",{class:"col-12"},s(k,{width:"40%"})),s("div",{class:"col-12"},s(k,{width:"40%"})),s("div",{class:"col-12"},s(k,{width:"100%"})),s("div",{class:"col-12"},s(k,{width:"80%"}))),x=class{constructor(s){t(this,s),this.insuranceUpdated=i(this,"insurance-updated",7),this.errorEvent=i(this,"error-event",7),this.isLoading=!0}async validate(){return m()}processHTMLContent(s){return d(s,[s=>u(s,"style"),s=>v(s,"a","part",_),s=>v(s,"p","part",_)])}componentWillLoad(){h(),this.analytics=new c(this),this.initializeServiceMethods(),this.getQuote&&this.fetchData()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeServiceMethods(){const s=this.authToken||l.authToken;if(!s)return void this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:"Missing authToken",severity:r.ERROR});const t={authToken:s,service:new b};this.getQuote=(({authToken:s,service:t})=>async({payload:i,onSuccess:e,onError:o})=>{var c;try{const h=await t.fetchQuote(s,i);if(h.error)return o({error:n(h.error),code:a(null===(c=h.error)||void 0===c?void 0:c.code),severity:r.ERROR});e({quote:h.data})}catch(s){const t=a(null==s?void 0:s.code);return o({error:s.message||s,code:t,severity:r.ERROR})}})(t),this.toggleCoverage=(({authToken:s,service:t})=>async({quoteId:i,payload:e,onSuccess:o,onError:c})=>{var h;try{const l=await t.toggleCoverage(s,i,e);if(l.error)return c({error:n(l.error),code:a(null===(h=l.error)||void 0===h?void 0:h.code),severity:r.ERROR});o({quote:l.data})}catch(s){const t=a(null==s?void 0:s.code);return c({error:s.message||s,code:t,severity:r.ERROR})}})(t)}fetchData(){this.isLoading=!0,this.getQuote({payload:{checkout_id:this.checkoutId||l.checkoutId,policy_type:"season_interruption",primary_identity:{state:this.primaryIdentityState,email:this.primaryIdentityEmailAddress,first_name:this.primaryIdentityFirstName,last_name:this.primaryIdentityLastName,postal_code:this.primaryIdentityPostalCode,country:this.primaryIdentityCountry},policy_attributes:{insurable_amount:this.policyAttributesInsurableAmount,start_date:this.policyAttributesStartDate,end_date:this.policyAttributesEndDate,covered_identity:{first_name:this.coveredIdentityFirstName,last_name:this.coveredIdentityLastName}}},onSuccess:({quote:s})=>{this.quote=s,this.quote.product.description=this.processHTMLContent(this.quote.product.description),this.quote.product.legal_disclaimer=this.processHTMLContent(this.quote.product.legal_disclaimer),y[s.policy_type]=s.accepted,this.isLoading=!1},onError:({error:s,code:t,severity:i})=>{this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}onChangeHandler(s,t){this.accepted=t,f[this.quote.policy_type]=!1,this.toggleCoverage({quoteId:this.quote.id,payload:{accepted:this.accepted},onSuccess:()=>{this.insuranceUpdated.emit(),y[this.quote.policy_type]=this.accepted},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}get error(){var s;return f[null===(s=this.quote)||void 0===s?void 0:s.policy_type]}render(){var t,i,e,r;return l&&!1===l.insuranceEnabled?(console.warn("[justifi-season-interruption-insurance] Insurance is disabled for this checkout (payment_settings.insurance_payments=false)."),null):s(T,null,this.isLoading?s(C,null):s("div",null,s(j,{text:null===(t=this.quote)||void 0===t?void 0:t.product.title,class:"fs-5 fw-bold pb-3"}),s("small",{part:_,innerHTML:null===(i=this.quote)||void 0===i?void 0:i.product.description}),s("form-control-radio",{label:`Accept coverage for ${p(null===(e=this.quote)||void 0===e?void 0:e.total_cents)}`,name:"opt-in",value:"true",checked:"true"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("form-control-radio",{label:"Decline coverage",name:"opt-in",value:"false",checked:"false"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("div",{class:"invalid-feedback",style:{display:this.error?"block":"none"},part:g},"Please select an option"),s("small",{part:_,innerHTML:null===(r=this.quote)||void 0===r?void 0:r.product.legal_disclaimer})))}};export{x as justifi_season_interruption_insurance}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as e}from"./p-CV0Pyo1O.js";import{m as i}from"./p-D7nyPi2Q.js";import{C as h}from"./p-DWjkuM6f.js";import{C as r,b as o,I as a,c as l,d as n}from"./p-Dqxyi-uK.js";import{J as d}from"./p-DON5-wIV.js";import{d as c}from"./p-BJUSJGPP.js";import"./p-BhpaUYtS.js";import"./p-Da0IToMr.js";import"./p-B4vLfYnZ.js";import"./p-DgTOxu8x.js";import"./p-Ds_P-dB8.js";import"./p-HXpYMWUU.js";import"./p-C04splpj.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";const u=class{constructor(e){t(this,e),this.checkoutCompleted=s(this,"checkout-completed",7),this.checkoutExpired=s(this,"checkout-expired",7),this.errorEvent=s(this,"error-event",7),this.pollIntervalMs=3e3,this.pollTimeoutMs=6e5,this.terminalState="loading",this.paymentStatus="",this.errorMessage="",this.pollIntervalHandle=null,this.pollTimeoutHandle=null,this.failedDismissHandle=null,this.seenCompletionCreatedAts=new Set,this.inFlight=!1}componentWillLoad(){c(),this.analytics=new d(this),this.initialize()}disconnectedCallback(){var t;this.stopAll(),null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.stopAll(),this.initialize()}suppressInnerErrors(t){t.stopPropagation()}get effectivePollInterval(){return Math.max(1e3,this.pollIntervalMs)}initialize(){this.authToken&&this.checkoutId?(this.terminalState="loading",this.getCheckout=i({authToken:this.authToken,checkoutId:this.checkoutId,service:new h}),this.getCheckout({onSuccess:({checkout:t})=>this.handleInitialLoad(t),onError:({error:t,code:s,severity:e})=>{this.terminalState="error",this.errorMessage=t,this.errorEvent.emit({message:t,errorCode:s,severity:e})}})):this.errorEvent.emit({message:"authToken and checkoutId are required",errorCode:o.MISSING_PROPS,severity:r.ERROR})}handleInitialLoad(t){var s;switch(t.status){case a.expired:this.terminalState="expired",this.checkoutExpired.emit({checkoutId:this.checkoutId}),this.errorEvent.emit({message:l.CHECKOUT_EXPIRED,errorCode:o.CHECKOUT_EXPIRED,severity:r.ERROR});break;case a.completed:this.terminalState="completed",this.paymentStatus=this.resolvePaymentStatus(t),this.checkoutCompleted.emit({checkoutId:this.checkoutId,paymentStatus:this.paymentStatus});break;default:(null!==(s=t.completions)&&void 0!==s?s:[]).forEach((t=>this.seenCompletionCreatedAts.add(t.created_at))),this.terminalState="ready",this.startPolling()}}startPolling(){this.pollTimeoutHandle=setTimeout((()=>{this.stopAll(),this.terminalState="error",this.errorMessage="Checkout polling timed out",this.errorEvent.emit({message:"Checkout polling timed out",errorCode:o.FETCH_ERROR,severity:r.ERROR})}),this.pollTimeoutMs),this.pollIntervalHandle=setInterval((()=>this.tick()),this.effectivePollInterval)}tick(){this.inFlight||(this.inFlight=!0,this.getCheckout({onSuccess:({checkout:t})=>{this.inFlight=!1,this.handlePollResult(t)},onError:({error:t,code:s,severity:e})=>{this.inFlight=!1,this.stopAll(),this.terminalState="error",this.errorMessage=t,this.errorEvent.emit({message:t,errorCode:s,severity:e})}}))}handlePollResult(t){var s;const e=(null!==(s=t.completions)&&void 0!==s?s:[]).filter((t=>!this.seenCompletionCreatedAts.has(t.created_at)&&"failed"===t.payment_status));if(e.forEach((t=>this.seenCompletionCreatedAts.add(t.created_at))),e.length>0&&(this.terminalState="payment-failed",this.failedDismissHandle&&clearTimeout(this.failedDismissHandle),this.failedDismissHandle=setTimeout((()=>{"payment-failed"===this.terminalState&&(this.terminalState="ready")}),3e3)),t.status===a.completed)return this.stopAll(),this.terminalState="completed",this.paymentStatus=this.resolvePaymentStatus(t),void this.checkoutCompleted.emit({checkoutId:this.checkoutId,paymentStatus:this.paymentStatus});t.status===a.expired&&(this.stopAll(),this.terminalState="expired",this.checkoutExpired.emit({checkoutId:this.checkoutId}),this.errorEvent.emit({message:l.CHECKOUT_EXPIRED,errorCode:o.CHECKOUT_EXPIRED,severity:r.ERROR}))}resolvePaymentStatus(t){var s,e;const i=null===(e=[...null!==(s=t.completions)&&void 0!==s?s:[]].sort(((t,s)=>new Date(s.updated_at).getTime()-new Date(t.updated_at).getTime()))[0])||void 0===e?void 0:e.payment_status;return i===n.succeeded||null==i&&t.successful_payment_id?"succeeded":"pending"}stopAll(){this.pollIntervalHandle&&(clearInterval(this.pollIntervalHandle),this.pollIntervalHandle=null),this.pollTimeoutHandle&&(clearTimeout(this.pollTimeoutHandle),this.pollTimeoutHandle=null),this.failedDismissHandle&&(clearTimeout(this.failedDismissHandle),this.failedDismissHandle=null),this.inFlight=!1}render(){return this.authToken&&this.checkoutId?e("div",null,"loading"===this.terminalState&&null,("ready"===this.terminalState||"payment-failed"===this.terminalState)&&e("div",null,e("justifi-checkout-qr-code",{checkoutId:this.checkoutId}),"payment-failed"===this.terminalState&&e("p",null,"Payment failed. Please try again."),"ready"===this.terminalState&&e("p",null,"Scan to pay")),"completed"===this.terminalState&&e("div",null,e("p",null,"succeeded"===this.paymentStatus?"Payment received":"Payment pending")),"expired"===this.terminalState&&e("p",null,"Checkout expired. Please create a new checkout."),"error"===this.terminalState&&e("p",null,this.errorMessage)):null}static get watchers(){return{authToken:["propChanged"],checkoutId:["propChanged"]}}};export{u as justifi_qr_terminal}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as e,r as t,c as
|
|
1
|
+
import{h as e,r as t,c as i}from"./p-CV0Pyo1O.js";import{P as s}from"./p-B1u-Iegl.js";import"./p-B4vLfYnZ.js";import"./p-HXpYMWUU.js";import{k as a,C as d,b as c}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{g as o,a as r}from"./p-BhpaUYtS.js";import{h,b as l,d as f}from"./p-Ds_P-dB8.js";import{a as b,b as n,D as p,c as u,C as v,E as y}from"./p-Bh6Q8AqQ.js";import{J as m}from"./p-DON5-wIV.js";import{m as k,M as j}from"./p-Bxc0NRj8.js";import{d as g}from"./p-BJUSJGPP.js";import{B as C}from"./p-CU2Dwa94.js";import{S as w}from"./p-DTnmhThV.js";import"./p-CZfYo5-1.js";import{S as x}from"./p-eBK-iWrz.js";import{a as D,B as T}from"./p-Dz8KJn2G.js";import"./p-Da0IToMr.js";import"./p-C04splpj.js";import"./p-DgTOxu8x.js";import"./p-Bu7gdOaV.js";const B=()=>e("div",{class:"row gap-3"},e("div",{class:"col-12"},e(x,{width:"35%",height:"30px"})),e("div",{class:"col-12"},e(x,{width:"70%"})),e("div",{class:"col-12"},e(x,{width:"40%"})),e("div",{class:"col-12"},e(x,{width:"40%"})),e("div",{class:"col-12"},e(x,{width:"100%"})),e("div",{class:"col-12"},e(x,{width:"80%"}))),S=class{constructor(e){t(this,e),this.errorEvent=i(this,"error-event",7),this.recordClickEvent=i(this,"record-click-event",7),this.enableRecordClick=!1,this.loading=!0,this.errorMessage=null,this.downloadCSV=()=>{this.getPayoutCSV({payoutId:this.payout.id,onError:({error:e,code:t,severity:i})=>{this.errorMessage=e,this.errorEvent.emit({message:e,errorCode:t,severity:i})}})},this.handleRecordClick=e=>{this.recordClickEvent.emit({id:e,type:"account"})}}componentWillLoad(){g(),this.analytics=new m(this),this.initializeServices(),this.getPayout&&this.fetchData()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeServices()}getPayoutWatcher(){this.fetchData()}initializeServices(){this.payoutId&&this.authToken?(this.getPayout=(({id:e,authToken:t,service:i})=>async({onSuccess:s,onError:c})=>{var h;try{const l=await i.fetchPayout(e,t);l.error?c({error:r(l.error),code:o(null===(h=l.error)||void 0===h?void 0:h.code),severity:d.ERROR}):s(new a(l.data))}catch(e){c({error:r(e),code:o(null==e?void 0:e.code),severity:d.ERROR})}})({id:this.payoutId,authToken:this.authToken,service:new s}),this.getPayoutCSV=k({authToken:this.authToken,service:new s})):(this.errorMessage="Failed to load payout details. payoutId or authToken is not provided.",this.errorEvent.emit({message:this.errorMessage,errorCode:c.MISSING_PROPS,severity:d.ERROR}))}fetchData(){this.loading=!0,this.getPayout({onSuccess:e=>{this.errorMessage=null,this.payout=e,this.loading=!1},onError:({error:e,code:t,severity:i})=>{this.errorMessage=e,this.errorEvent.emit({message:e,errorCode:t,severity:i}),this.loading=!1}})}formatMethod(e){return"ach"===e?"ACH":h(e)}render(){var t,i,s,a;return e(w,{key:"0e371e863fbde66a5135b7c6789875d7a3266468"},this.loading&&e(B,{key:"44987c4fff48df008edd59702524bd51c3f935d3"}),!this.loading&&this.errorMessage&&y(this.errorMessage),!this.loading&&this.payout&&e("justifi-details",{key:"ef6619ff38da13cb1c744e776f5b2239dcf68d25",errorMessage:this.errorMessage},e(b,{key:"ecbfef1736a2f21819bec8e19fc6a7788fc3343a",slot:"head-info",badge:e("div",{class:"d-flex gap-1"},j(null===(t=this.payout)||void 0===t?void 0:t.status),e(D,"expedited"===this.payout.settlement_priority?{variant:T.WARNING,title:"Expedited",text:"Expedited"}:{variant:T.SECONDARY,title:"Standard",text:"Standard"})),title:this.payout.formattedPaymentAmount(this.payout.amount)},e(n,{key:"398051f5f80dd0c4e6bde71bfbc63ec3a6de6f48",classes:"border-1 border-end",title:"Updated At",value:`${l(this.payout.updated_at)} ${f(this.payout.updated_at)}`}),e(n,{key:"4c2ece5964655d60c5538acd745f74f11e98f4e5",classes:"border-1 border-end",title:"Created At",value:`${l(this.payout.created_at)} ${f(this.payout.created_at)}`}),e(n,{key:"84087a0dc42dc608181bbec1a2af0985813a56ea",title:"ID",value:this.payout.id}),e("div",{key:"9a3ac5b69e20980941b3de36e0715f3e25a01a0e",class:"m-4"},e(C,{key:"c2a122864b0b9cf83683633bf6fcc4c72002367a",variant:"outline-secondary",class:"btn btn-outline-secondary d-flex align-items-center",onClick:this.downloadCSV},"Export CSV"))),e("div",{key:"63e118bc86b7c53388e4f66a4a5a417b48a78e8b",slot:"detail-sections"},e(p,{key:"2401d859d24ad131733365cb092444697d40f789",sectionTitle:"Details"}),e("div",{key:"d236343b8cbd6b6e64968f0fbb26ee895a99fad3",class:"d-flex flex-column gap-2 w-100"},e(u,{key:"fe26f4d1fb16ca68fcc7aca444b5d96278408ae0",title:"Date paid",value:l(this.payout.deposits_at)}),e(u,{key:"83151ee5457ddd9d982289d77cb0478105aadb99",title:"Statement Description",value:this.payout.description}),e(u,{key:"7e56cd9259390ba525df943b990ff5b21faa3d40",title:"Payout Method",value:this.formatMethod(this.payout.delivery_method)}),e(u,{key:"149f67385b9941098e15507d23975fb4b301ec56",title:"Amount",value:this.payout.formattedPaymentAmount(this.payout.amount)}),e(u,{key:"64d7ff8c49d2ea7a0b814aded33307d119655965",title:"Fee",value:this.payout.formattedPaymentAmount(this.payout.fees_total)})),e(p,{key:"b54b9a22b41fd7d816092dd1ee7204888bdb5725",sectionTitle:"Account"}),e("div",{key:"93d60c1e03bd9eec691d1added19357e743d9836",class:"d-flex flex-column gap-2 w-100"},e(u,{key:"e9431f2bac333427342dc4e550c588896ded6944",title:"ID",value:this.payout.account_id,onClick:this.enableRecordClick?()=>this.handleRecordClick(this.payout.account_id):void 0}),e(u,{key:"01a433869e93d9345550bdfbee788c60ee9f8cc3",title:"Account Type",value:null===(i=this.payout.bank_account)||void 0===i?void 0:i.account_type}),e(u,{key:"7e6e2ac81eb77a116b4a5614bc33345dc0e1976c",title:"Institution",value:null===(s=this.payout.bank_account)||void 0===s?void 0:s.account_type}),e(u,{key:"7ab5fa28f98c94dda6a4c7274176d2bb964ca5d2",title:"Routing Number",value:null===(a=this.payout.bank_account)||void 0===a?void 0:a.routing_number}),e(u,{key:"e05a54b74e01312708662e90c8a8b31ccfea4ec4",title:"Account Number",value:this.payout.bank_account?`**** ${this.payout.bank_account.account_number_last4}`:void 0})),this.payout.metadata&&[e(p,{key:"7adb41b7b602ccb4c1bab169401ca51d8e627fc6",sectionTitle:"Metadata"}),e("div",{key:"3a8c3d28a33fcde52acab0d67708c037e85ba6c2",class:"d-table gap-2 w-100"},e(v,{key:"77ec3c4cd674d61cbe94dca31d41fe4b0a888211",metadata:this.payout.metadata}))])))}static get watchers(){return{payoutId:["propChanged"],authToken:["propChanged"],getPayout:["getPayoutWatcher"]}}};export{S as justifi_payout_details}
|