@justifi/webcomponents 6.12.4 → 6.13.0-rc.1
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-BERGweGK.js → Analytics-Be2I_aiS.js} +2 -2
- package/dist/cjs/{Plaid-BRSyOOuw.js → Plaid-Aw35bhCX.js} +2 -2
- package/dist/cjs/additional-questions-form-step_14.cjs.entry.js +5 -5
- package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
- package/dist/cjs/{business.service-Z9OACEQL.js → business.service-CylI3Qrg.js} +1 -1
- package/dist/cjs/card-form.cjs.entry.js +2 -2
- package/dist/cjs/{check-pkg-version-ByKpJklZ.js → check-pkg-version-BLLLh6v-.js} +1 -1
- package/dist/cjs/checkout-actions-8-MUczKw.js +62 -0
- package/dist/cjs/{checkout.service-BZOyqXgW.js → checkout.service-BYpinbSR.js} +1 -1
- package/dist/cjs/dispute-notification_2.cjs.entry.js +6 -6
- package/dist/cjs/{event-types-AU1B76Vm.js → event-types-DptNnCEP.js} +1 -1
- package/dist/cjs/{get-business-aR-C83KX.js → get-business-D10Tmct1.js} +2 -2
- package/dist/cjs/{get-payment-details-dwhA02Zl.js → get-payment-details-BB5aa48u.js} +2 -2
- package/dist/cjs/{get-subaccounts-B1jmSa2d.js → get-subaccounts-CSD2nAqD.js} +2 -2
- package/dist/cjs/hidden-input_2.cjs.entry.js +1 -1
- package/dist/cjs/justifi-apple-pay_11.cjs.entry.js +10 -64
- package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +4 -4
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +4 -4
- package/dist/cjs/justifi-business-details.cjs.entry.js +7 -7
- package/dist/cjs/justifi-business-form.cjs.entry.js +7 -7
- package/dist/cjs/justifi-card-form.cjs.entry.js +4 -4
- package/dist/cjs/justifi-checkout-qr-code.cjs.entry.js +3141 -0
- package/dist/cjs/justifi-checkout.cjs.entry.js +4 -4
- 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 +8 -8
- package/dist/cjs/justifi-payment-details.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +7 -7
- package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +6 -6
- package/dist/cjs/justifi-payments-list.cjs.entry.js +6 -6
- package/dist/cjs/justifi-payout-details.cjs.entry.js +7 -7
- 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 +8 -8
- package/dist/cjs/justifi-qr-terminal.cjs.entry.js +208 -0
- package/dist/cjs/justifi-refund-payment.cjs.entry.js +7 -7
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +5 -5
- 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/loader.cjs.js +1 -1
- package/dist/cjs/{package-B6L3zyfG.js → package-gx36QXN1.js} +1 -1
- package/dist/cjs/{payment-provisioning-actions-BiSpysjW.js → payment-provisioning-actions-DimM0KGV.js} +2 -2
- package/dist/cjs/{payment.service-ByrgA_QZ.js → payment.service-fy5bXXmA.js} +1 -1
- package/dist/cjs/{payout.service-CnQm_BpU.js → payout.service-hp3PTXWI.js} +1 -1
- package/dist/cjs/{payouts-status-AuS3Mp0V.js → payouts-status-CF1YT_RL.js} +2 -2
- package/dist/cjs/{plaid.service-Dlb8EUR8.js → plaid.service-9PmS4X0g.js} +1 -1
- package/dist/cjs/{terminal.service-BdwHQ3Vv.js → terminal.service-D5D76Cnn.js} +1 -1
- package/dist/cjs/{utils-FVGp6se3.js → utils-Dcde8Zpt.js} +1 -1
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/checkout-qr-code/justifi-checkout-qr-code.js +128 -0
- package/dist/collection/components/qr-terminal/justifi-qr-terminal.js +349 -0
- package/dist/docs.json +283 -1
- package/dist/esm/{Analytics-B1bQP71R.js → Analytics-DZWGizAK.js} +2 -2
- package/dist/esm/{Plaid-l6nNIjab.js → Plaid-fhlY0CIN.js} +1 -1
- package/dist/esm/additional-questions-form-step_14.entry.js +5 -5
- package/dist/esm/bank-account-form.entry.js +2 -2
- package/dist/esm/{business.service-C31wbMVs.js → business.service-Crs-0Mdy.js} +1 -1
- package/dist/esm/card-form.entry.js +2 -2
- package/dist/esm/{check-pkg-version-CNwUC4SV.js → check-pkg-version-CVyuA8aH.js} +1 -1
- package/dist/esm/checkout-actions-BMnp3uHK.js +59 -0
- package/dist/esm/{checkout.service-cVdOGDuI.js → checkout.service-BMAQVmHa.js} +1 -1
- package/dist/esm/dispute-notification_2.entry.js +6 -6
- package/dist/esm/{event-types-DalU_6SB.js → event-types-CVVB5p_Q.js} +1 -1
- package/dist/esm/{get-business-Gg6qn5on.js → get-business-B9ZS1tVq.js} +2 -2
- package/dist/esm/{get-payment-details-BiWgSJau.js → get-payment-details-CiR6FrkO.js} +2 -2
- package/dist/esm/{get-subaccounts-CkjZeR9U.js → get-subaccounts-VpDr7yN4.js} +2 -2
- package/dist/esm/hidden-input_2.entry.js +1 -1
- package/dist/esm/justifi-apple-pay_11.entry.js +8 -62
- package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +4 -4
- package/dist/esm/justifi-bank-account-form.entry.js +4 -4
- package/dist/esm/justifi-business-details.entry.js +7 -7
- package/dist/esm/justifi-business-form.entry.js +7 -7
- package/dist/esm/justifi-card-form.entry.js +4 -4
- package/dist/esm/justifi-checkout-qr-code.entry.js +3139 -0
- package/dist/esm/justifi-checkout.entry.js +4 -4
- 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 +8 -8
- package/dist/esm/justifi-payment-details.entry.js +7 -7
- package/dist/esm/justifi-payment-provisioning.entry.js +7 -7
- package/dist/esm/justifi-payment-transactions-list.entry.js +6 -6
- package/dist/esm/justifi-payments-list.entry.js +6 -6
- package/dist/esm/justifi-payout-details.entry.js +7 -7
- 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 +8 -8
- package/dist/esm/justifi-qr-terminal.entry.js +206 -0
- package/dist/esm/justifi-refund-payment.entry.js +7 -7
- package/dist/esm/justifi-season-interruption-insurance.entry.js +5 -5
- 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/loader.js +1 -1
- package/dist/esm/{package-OGt0dCJl.js → package-CZa-hHhJ.js} +1 -1
- package/dist/esm/{payment-provisioning-actions-cl5xIYnF.js → payment-provisioning-actions-CcDadiRe.js} +2 -2
- package/dist/esm/{payment.service-5_u-UzTY.js → payment.service-BiKQPL4M.js} +1 -1
- package/dist/esm/{payout.service-D2zS5y8N.js → payout.service-B9_cyUiU.js} +1 -1
- package/dist/esm/{payouts-status-DCjCGTaa.js → payouts-status-xOa5tT66.js} +2 -2
- package/dist/esm/{plaid.service-BiJ65YG8.js → plaid.service-bU3qIoKd.js} +1 -1
- package/dist/esm/{terminal.service-CIxDfM7V.js → terminal.service-BM6BvevW.js} +1 -1
- package/dist/esm/{utils-C1B2hVAB.js → utils-BogmBHgt.js} +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/Plaid.js +1 -1
- package/dist/module/business-bank-account-form-step2.js +1 -1
- package/dist/module/checkout-actions.js +59 -0
- package/dist/module/get-payment-details.js +1 -1
- package/dist/module/justifi-checkout-qr-code.d.ts +11 -0
- package/dist/module/justifi-checkout-qr-code.js +6 -0
- package/dist/module/justifi-checkout-qr-code2.js +3154 -0
- package/dist/module/justifi-checkouts-list.js +1 -1
- package/dist/module/justifi-dispute-management.js +1 -1
- package/dist/module/justifi-modular-checkout2.js +2 -57
- package/dist/module/justifi-order-terminals.js +1 -1
- package/dist/module/justifi-payment-details.js +1 -1
- package/dist/module/justifi-payment-transactions-list.js +1 -1
- package/dist/module/justifi-payments-list.js +1 -1
- package/dist/module/justifi-payout-details.js +1 -1
- package/dist/module/justifi-payout-transactions-list.js +1 -1
- package/dist/module/justifi-payouts-list.js +1 -1
- package/dist/module/justifi-qr-terminal.d.ts +11 -0
- package/dist/module/justifi-qr-terminal.js +234 -0
- package/dist/module/justifi-refund-payment.js +1 -1
- package/dist/module/justifi-terminal-orders-list-filters.js +1 -1
- package/dist/module/justifi-terminal-orders-list.js +1 -1
- package/dist/module/justifi-terminals-list-filters.js +1 -1
- package/dist/module/justifi-terminals-list.js +1 -1
- package/dist/module/package.js +1 -1
- package/dist/types/api/Checkout.d.ts +1 -2
- package/dist/types/components/checkout-qr-code/justifi-checkout-qr-code.d.ts +18 -0
- package/dist/types/components/qr-terminal/justifi-qr-terminal.d.ts +42 -0
- package/dist/types/components.d.ts +92 -0
- package/dist/webcomponents/{p-ea0d7a98.entry.js → p-06e8df55.entry.js} +1 -1
- package/dist/webcomponents/{p-daaa2a99.entry.js → p-07f2f1bf.entry.js} +1 -1
- package/dist/webcomponents/p-0fb8fb8c.entry.js +1 -0
- package/dist/webcomponents/p-10087a53.entry.js +1 -0
- package/dist/webcomponents/{p-45c0fb53.entry.js → p-1d7b8c21.entry.js} +1 -1
- package/dist/webcomponents/{p-d24240a5.entry.js → p-21c89e22.entry.js} +1 -1
- package/dist/webcomponents/{p-d79c5ee4.entry.js → p-2ec7cd88.entry.js} +1 -1
- package/dist/webcomponents/p-2qotS5d_.js +1 -0
- package/dist/webcomponents/{p-69fdd137.entry.js → p-355a5c8d.entry.js} +1 -1
- package/dist/webcomponents/{p-8964f4ca.entry.js → p-37b95a11.entry.js} +1 -1
- package/dist/webcomponents/p-37fd1862.entry.js +1 -0
- package/dist/webcomponents/{p-c8f3656f.entry.js → p-392f0c1c.entry.js} +1 -1
- package/dist/webcomponents/{p-9d021e10.entry.js → p-44cf13ac.entry.js} +1 -1
- package/dist/webcomponents/{p-cde76bf8.entry.js → p-55fdab4e.entry.js} +1 -1
- package/dist/webcomponents/p-5ccb46ee.entry.js +1 -0
- package/dist/webcomponents/{p-8d173a7c.entry.js → p-5f8dfa8d.entry.js} +1 -1
- package/dist/webcomponents/{p-07236291.entry.js → p-70cd2808.entry.js} +1 -1
- package/dist/webcomponents/{p-3f5e9afb.entry.js → p-769d3d93.entry.js} +1 -1
- package/dist/webcomponents/{p-f30069ea.entry.js → p-79bd744e.entry.js} +1 -1
- package/dist/webcomponents/{p-49a4123c.entry.js → p-7a4cd292.entry.js} +1 -1
- package/dist/webcomponents/p-8d602e60.entry.js +1 -0
- package/dist/webcomponents/p-94f14640.entry.js +1 -0
- package/dist/webcomponents/p-98f399ec.entry.js +1 -0
- package/dist/webcomponents/{p-7119fddd.entry.js → p-9fca25fc.entry.js} +1 -1
- package/dist/webcomponents/{p-Ba8jdOkX.js → p-BGvaX-lJ.js} +1 -1
- package/dist/webcomponents/{p-NZS8uCtH.js → p-CSgcCWLS.js} +1 -1
- package/dist/webcomponents/p-CZa-hHhJ.js +1 -0
- package/dist/webcomponents/p-Cg_3KsGO.js +1 -0
- package/dist/webcomponents/p-CqPcl9v7.js +1 -0
- package/dist/webcomponents/p-CvgL8YaH.js +1 -0
- package/dist/webcomponents/{p-oTtn8xDw.js → p-D4E9P7df.js} +1 -1
- package/dist/webcomponents/{p-Dk26hk5T.js → p-DD-_8sbs.js} +1 -1
- package/dist/webcomponents/{p-mF5zKtkx.js → p-DHFQtPCq.js} +1 -1
- package/dist/webcomponents/p-DMqJWUK2.js +1 -0
- package/dist/webcomponents/{p-fE5A37L5.js → p-DZAMzLxa.js} +1 -1
- package/dist/webcomponents/{p-Cz_7BuGW.js → p-DbOUuBHs.js} +1 -1
- package/dist/webcomponents/{p-BxKbnILQ.js → p-Eb1f86_V.js} +1 -1
- package/dist/webcomponents/{p-av6jyzyC.js → p-XxG-t-Sl.js} +1 -1
- package/dist/webcomponents/{p-7ebed752.entry.js → p-aee2295b.entry.js} +1 -1
- package/dist/webcomponents/p-b20b8805.entry.js +1 -0
- package/dist/webcomponents/p-bb5de874.entry.js +1 -0
- package/dist/webcomponents/p-bd678d4a.entry.js +1 -0
- package/dist/webcomponents/{p-f3ff7e00.entry.js → p-c8ee1e4c.entry.js} +1 -1
- package/dist/webcomponents/p-ce1dde85.entry.js +1 -0
- package/dist/webcomponents/{p-8aa53ef2.entry.js → p-d620d4b4.entry.js} +1 -1
- package/dist/webcomponents/{p-ae91fc9b.entry.js → p-dcd600ca.entry.js} +1 -1
- package/dist/webcomponents/p-e6b9dfe1.entry.js +1 -0
- package/dist/webcomponents/p-eCeOsPHx.js +1 -0
- package/dist/webcomponents/{p-BJu1-9kE.js → p-eK8hZOMg.js} +1 -1
- package/dist/webcomponents/{p-a1dcdc8b.entry.js → p-ff5c5499.entry.js} +4 -4
- package/dist/webcomponents/{p-BXyADlAH.js → p-qju4tNG1.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +16 -14
- package/LICENSE +0 -21
- package/dist/webcomponents/p-215c6b6b.entry.js +0 -1
- package/dist/webcomponents/p-31452258.entry.js +0 -1
- package/dist/webcomponents/p-35dd1fc0.entry.js +0 -1
- package/dist/webcomponents/p-4ec433f4.entry.js +0 -1
- package/dist/webcomponents/p-58b5e08e.entry.js +0 -1
- package/dist/webcomponents/p-5G1OMxZz.js +0 -1
- package/dist/webcomponents/p-6220a384.entry.js +0 -1
- package/dist/webcomponents/p-91aef5bf.entry.js +0 -1
- package/dist/webcomponents/p-APOabprT.js +0 -1
- package/dist/webcomponents/p-Aacb4jqT.js +0 -1
- package/dist/webcomponents/p-Cm9f5fyh.js +0 -1
- package/dist/webcomponents/p-OGt0dCJl.js +0 -1
- package/dist/webcomponents/p-b272a29d.entry.js +0 -1
- package/dist/webcomponents/p-c9fe4f33.entry.js +0 -1
- package/dist/webcomponents/p-ef85717f.entry.js +0 -1
- package/dist/webcomponents/p-nb_LhbJq.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as i,r as e}from"./p-CV0Pyo1O.js";import{S as a}from"./p-uZ5KAseb.js";import{w as t,c}from"./p-DVJaoI_m.js";import{e as s}from"./p-BRnBHsdq.js";import{c as d}from"./p-
|
|
1
|
+
import{h as i,r as e}from"./p-CV0Pyo1O.js";import{S as a}from"./p-uZ5KAseb.js";import{w as t,c}from"./p-DVJaoI_m.js";import{e as s}from"./p-BRnBHsdq.js";import{c as d}from"./p-DHFQtPCq.js";import"./p-CPKMvyV_.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";import"./p-CZa-hHhJ.js";const n=e=>{const{isReady:t}=e;return t?null:i("div",{class:"container-fluid p-0"},i("div",{class:"mb-3"},i(a,{height:"18px",width:"100px"}),i(a,{height:"36px"})),i("div",{class:"row"},i("div",{class:"col-4 align-content-end"},i(a,{height:"18px",width:"80px"}),i(a,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(a,{height:"36px"})),i("div",{class:"col-4 align-content-end"},i(a,{height:"18px",width:"30px"}),i(a,{height:"36px"}))))},r=class{constructor(i){e(this,i),this.isReady=!1}async componentWillLoad(){await t(),this.iframeOrigin=c.iframeOrigin,this.tabId=s(),d()}componentDidRender(){Promise.all([this.cardNumberIframeElement,this.expirationMonthIframeElement,this.expirationYearIframeElement,this.cvvIframeElement].map((i=>new Promise((e=>{i.addEventListener("iframeLoaded",(()=>{e()}))}))))).then((()=>{this.isReady=!0}))}async validate(){const i=await this.cardNumberIframeElement.validate(),e=await this.expirationMonthIframeElement.validate(),a=await this.expirationYearIframeElement.validate(),t=await this.cvvIframeElement.validate();return i&&e&&a&&t}async tokenize({clientId:i,paymentMethodMetadata:e,account:a}){return await this.cardNumberIframeElement.tokenize(i,e,a)}render(){return i("div",{key:"cef558344c088e6e0bccb49b99c8a47c76200467"},i(n,{key:"f35bad214bc4d7657b7ab8a097a76602df877bcf",isReady:this.isReady}),i("hidden-input",{key:"d3791651ad279e2e0ad169012f4d066a44bbfa66"}),i("div",{key:"37318e633f9ab08bfbc95750466c054158e5e4ff",class:"container-fluid p-0",style:{opacity:this.isReady?"1":"0",height:this.isReady?"auto":"0"}},i("div",{key:"d5eccc9c8a496f3f264a1bd01bb065e823aa01b5",class:"mb-3"},i("iframe-input",{key:"2ec07c9bf1ea18ed354cd036e2c7876f974a30ed",inputId:"cardNumber",ref:i=>this.cardNumberIframeElement=i,label:"Card Number",iframeOrigin:`${this.iframeOrigin}/v2/cardNumber?tabId=${this.tabId}`})),i("div",{key:"2959894ab0721d9bffccb0c16ecfb71bd3488518",class:"row"},i("div",{key:"dea7afd2515c4faa4927fd6cb32678fc782b9b5a",class:"col-4 align-content-end"},i("iframe-input",{key:"7d95eff6c6765ff996c1c497866ad01216b2cc4f",inputId:"expirationMonth",ref:i=>this.expirationMonthIframeElement=i,label:"Expiration",iframeOrigin:`${this.iframeOrigin}/v2/expirationMonth?tabId=${this.tabId}`})),i("div",{key:"00b02deefe877431409ef584662fc07e4a20cc3c",class:"col-4 align-content-end"},i("iframe-input",{key:"4860f042f29eb1d3db0e5ad4cb7c9471b8536ce6",inputId:"expirationYear",ref:i=>this.expirationYearIframeElement=i,label:"",iframeOrigin:`${this.iframeOrigin}/v2/expirationYear?tabId=${this.tabId}`})),i("div",{key:"c69f9be6e581e683b757e89000ef1ba385c5f57b",class:"col-4 align-content-end"},i("iframe-input",{key:"e5fbb8e78af5c8c6ed74db18aeb226bfba5d083f",inputId:"CVV",ref:i=>this.cvvIframeElement=i,label:"CVV",iframeOrigin:`${this.iframeOrigin}/v2/CVV?tabId=${this.tabId}`})))))}};export{r as card_form}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{h as s,r as i,c as t}from"./p-CV0Pyo1O.js";import{a9 as e,a8 as r,a1 as o,t as l}from"./p-CPKMvyV_.js";import{S as d}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{c as n}from"./p-DHFQtPCq.js";import{J as a}from"./p-DbOUuBHs.js";import{o as h,C as c,p as v,f as u,b as p}from"./p-CSgcCWLS.js";import{B as m}from"./p-eK8hZOMg.js";import{B as f}from"./p-BcNb9bVO.js";import{m as w}from"./p-2qotS5d_.js";import{S as b}from"./p-uZ5KAseb.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import"./p-CLHwhyvu.js";import{g,a as y}from"./p-Cg_3KsGO.js";import{T as x}from"./p-BGvaX-lJ.js";import{l as j}from"./p-BRnBHsdq.js";import"./p-CZa-hHhJ.js";import"./p-CYQvLgSs.js";import"./p-D8GTwl9v.js";const C=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(b,{width:"25%"})),s("div",{class:"col-12"},s(b,{width:"100%"})),s("div",{class:"col-12 d-flex gap-3"},s(b,{width:"50%"}),s(b,{width:"50%"})),s("div",{class:"col-12 d-flex gap-3"},s(b,{width:"65%"}),s(b,{width:"35%"}))),S=()=>s("div",{class:"row gap-5"},s("div",{class:"col-12"},s(b,{width:"40%",height:"40px"})),s(C,null)),O=()=>s("div",{class:"terminal-selector-skeleton mt-4 rounded shadow-sm"},s("div",{class:"d-flex align-items-center gap-3"},s(b,{width:"125px",height:"125px",styles:{borderRadius:"8px"}}),s("div",{class:"flex-grow-1"},s("div",{class:"d-flex row flex-row"},s("div",{class:"col-6 flex-column"},s(b,null),s(b,{width:"60%"})),s("div",{class:"d-flex justify-content-end align-items-center gap-2 col-6"},s(b,{width:"32px",height:"32px",styles:{borderRadius:"50%"}}),s(b,{width:"80px",height:"32px"}),s(b,{width:"32px",height:"32px",styles:{borderRadius:"50%"}}))),s("div",{class:"mt-4"},s("div",{class:"d-flex flex-column gap-2"},s(b,null),s(b,null)))))),k=class{constructor(s){i(this,s),this.errorEvent=t(this,"error-event",7),this.submitted=t(this,"submit-event",7),this.shipping=!1,this.submitButtonText="Submit Order",this.loading={business:!0,terminals:!0},this.submitting=!1,this.error=null,this.totalQuantity=0}componentWillLoad(){this.order=new v({business_id:this.businessId,sub_account_id:this.accountId,order_type:this.shipping?u.boardingShipping:u.boardingOnly}),n(),this.analytics=new a(this),this.loadData()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}handleError(s,i,t){this.error={message:s,code:i,severity:t},this.errorEvent.emit({errorCode:i,message:s,severity:t})}loadData(){this.businessId&&this.authToken?(this.initializeGetBusiness(),this.initializeGetTerminalModels()):this.handleError("Invalid business id or auth token",p.MISSING_PROPS,c.ERROR)}initializeGetBusiness(){w({id:this.businessId,authToken:this.authToken,service:new m})({onSuccess:({business:s})=>{this.business=new f(s)},onError:({error:s,code:i,severity:t})=>{this.handleError(s,i,t)},final:()=>{this.loading.business=!1}})}initializeGetTerminalModels(){(({id:s,authToken:i,service:t})=>async({onSuccess:e,onError:r})=>{var o,l,d,n;try{const a=await t.fetchTerminalModels(s,i);if(a.error)return r({error:y(a.error),code:g(null===(n=a.error)||void 0===n?void 0:n.code),severity:c.ERROR});e({terminals:(null===(l=null===(o=a.data)||void 0===o?void 0:o.terminal_order_models)||void 0===l?void 0:l.map((s=>new h(s))))||[],orderLimit:null===(d=a.data)||void 0===d?void 0:d.order_limit})}catch(s){const i=g(null==s?void 0:s.code);return r({error:s.message||s,code:i,severity:c.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new x})({onSuccess:({terminals:s,orderLimit:i})=>{this.terminalModels=s,this.orderLimit=i,this.loading.terminals=!1},onError:({error:s,code:i,severity:t})=>{this.handleError(s,i,t),this.loading.terminals=!1}})}submitOrder(){const s=(({authToken:s,service:i,apiOrigin:t="https://wc-proxy.justifi.ai"})=>async({terminalOrder:e,onSuccess:r,onError:o})=>{var l;try{const d=await i.orderTerminals(s,e,t);if(d.error)return o({error:y(d.error),code:g(null===(l=d.error)||void 0===l?void 0:l.code),severity:c.ERROR});{const{data:s}=d;r({data:s})}}catch(s){const i=g(null==s?void 0:s.code);return o({error:s.message||s,code:i,severity:c.ERROR})}})({authToken:this.authToken,service:new x});this.submitting=!0,s({terminalOrder:this.order.payload,onSuccess:({data:s})=>{this.submitted.emit(s),this.submitting=!1},onError:({error:s,code:i,severity:t})=>{this.handleError(s,i,t),this.submitting=!1}})}onSelectedQuantityChange(s){this.order.updateTerminal(s.detail.modelName,s.detail.quantity),this.totalQuantity=this.order.totalQuantity}renderLoading(){return s("div",null,this.loading.business&&s(S,null),this.loading.terminals&&s("div",{class:"mt-5"},s(O,null),s(O,null),s(O,null)))}renderBusinessDetails(){var i,t,o,l,d,n,a,h;if(!this.loading.business&&this.business)return s("div",{class:"d-flex flex-column gap-4 mb-5 pt-5"},s("div",{class:"row"},s("div",{class:"col-12"},s("h2",{part:r},this.business.legal_name))),s("div",{class:"row"},s("div",{class:"col-6"},s("h5",{part:e},"Representative:"),s("div",null,s("div",null,null===(t=null===(i=this.business)||void 0===i?void 0:i.representative)||void 0===t?void 0:t.name),s("div",null,null===(l=null===(o=this.business)||void 0===o?void 0:o.representative)||void 0===l?void 0:l.title),s("div",null,null===(n=null===(d=this.business)||void 0===d?void 0:d.representative)||void 0===n?void 0:n.email),s("div",null,j(null===(h=null===(a=this.business)||void 0===a?void 0:a.representative)||void 0===h?void 0:h.phone)))),s("div",{class:"col-6"},s("h5",{part:e},this.shipping?"Shipping Address:":"Business Address:"),s("div",null,this.business.legal_address.line1,this.business.legal_address.line2?`, ${this.business.legal_address.line2}`:"",s("br",null),this.business.legal_address.city,", ",this.business.legal_address.state," ",this.business.legal_address.postal_code))))}renderTerminals(){if(!this.loading.terminals&&this.terminalModels)return s("div",{class:"d-flex flex-column gap-2 mt-5"},this.terminalModels.map((i=>s("terminal-quantity-selector",{modelName:i.model_name,description:i.description,imageUrl:i.image_url,helpUrl:i.help_url,limit:this.orderLimit-this.order.totalQuantity,onSelectedQuantityChange:this.onSelectedQuantityChange.bind(this)}))))}renderOrderSection(){return s("div",{class:"mt-3"},s("div",{class:"text-end"},"Order limit: ",this.orderLimit),s("div",{class:"d-flex justify-content-end mt-3"},s("button",{class:"btn btn-primary submit-btn",onClick:this.submitOrder.bind(this),disabled:0===this.order.totalQuantity||this.submitting,part:o},this.submitting?"Submitting...":this.submitButtonText)))}render(){return s(d,{key:"a6d128c8f7075ba4bf6dc033e357dac187cdb965"},s("div",{key:"9e726c70efc7e9b9163ded2ca1e88dc4303b2f21",part:l},this.renderLoading(),this.renderBusinessDetails(),this.renderTerminals(),this.renderOrderSection()))}};export{k as justifi_order_terminals}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as r}from"./p-CSgcCWLS.js";import{g as e,a as o}from"./p-Cg_3KsGO.js";const n=({authToken:n,businessId:t,service:s})=>async({onSuccess:a,onError:i,final:c=()=>{}})=>{var u;try{const c=await s.fetchBusiness(t,n);if(c.error){return i({error:o(c.error),code:e(null===(u=c.error)||void 0===u?void 0:u.code),severity:r.ERROR})}a(c)}catch(o){const n=e(null==o?void 0:o.code);return i({error:o.message||o,code:n,severity:r.ERROR})}finally{return c()}},t=({authToken:n,businessId:t,service:s})=>async({payload:a,onSuccess:i,onError:c,final:u=()=>{}})=>{var l;try{const u=await s.patchBusiness(n,t,a);if(u.error){return c({error:o(u.error),code:e(null===(l=u.error)||void 0===l?void 0:l.code),severity:r.ERROR,rawError:u.error})}i(u)}catch(o){const n=e(null==o?void 0:o.code);return c({error:o.message||o,code:n,severity:r.ERROR,rawError:o})}finally{return u()}},s=({authToken:n,businessId:t,product:s,service:a})=>async({onSuccess:i,onError:c})=>{var u;try{const l=await a.postProvisioning(n,t,s);if(l.error){return c({error:o(l.error),code:e(null===(u=l.error)||void 0===u?void 0:u.code),severity:r.ERROR})}i(l)}catch(o){const n=e(null==o?void 0:o.code);return c({error:o.message||o,code:n,severity:r.ERROR})}},a=({authToken:n,identityId:t,service:s})=>async({onSuccess:a,onError:i,final:c=()=>{}})=>{var u;try{const c=await s.fetchIdentity(t,n);if(c.error){return i({error:o(c.error),code:e(null===(u=c.error)||void 0===u?void 0:u.code),severity:r.ERROR})}a(c)}catch(o){const n=e(null==o?void 0:o.code);return i({error:o.message||o,code:n,severity:r.ERROR})}finally{return c()}},i=({authToken:n,identityId:t,service:s})=>async({payload:a,onSuccess:i,onError:c,final:u=()=>{}})=>{var l;try{const u=await s.patchIdentity(n,t,a);if(u.error){return c({error:o(u.error),code:e(null===(l=u.error)||void 0===l?void 0:l.code),severity:r.ERROR})}i(u)}catch(o){const n=e(null==o?void 0:o.code);return c({error:o.message||o,code:n,severity:r.ERROR})}finally{return u()}},c=({authToken:n,service:t})=>async({payload:s,onSuccess:a,onError:i,final:c=()=>{}})=>{var u;try{const c=await t.postIdentity(n,s);if(c.error){return i({error:o(c.error),code:e(null===(u=c.error)||void 0===u?void 0:u.code),severity:r.ERROR})}a(c)}catch(o){const n=e(null==o?void 0:o.code);return i({error:o.message||o,code:n,severity:r.ERROR})}finally{return c()}},u=({authToken:n,service:t})=>async({payload:s,onSuccess:a,onError:i,final:c=()=>{}})=>{var u;try{const c=await t.postBankAccount(n,s);if(c.error){return i({error:o(c.error),code:e(null===(u=c.error)||void 0===u?void 0:u.code),severity:r.ERROR})}a(c)}catch(o){const n=e(null==o?void 0:o.code);return i({error:o.message||o,code:n,severity:r.ERROR})}finally{return c()}},l=({authToken:n,service:t})=>async({payload:s,onSuccess:a,onError:i,final:c=()=>{}})=>{var u;try{const c=await t.postDocumentRecord(n,s);if(c.error){return i({error:o(c.error),code:e(null===(u=c.error)||void 0===u?void 0:u.code),severity:r.ERROR})}a(c)}catch(o){const n=e(null==o?void 0:o.code);return i({error:o.message||o,code:n,severity:r.ERROR})}finally{return c()}};export{t as a,s as b,u as c,l as d,a as e,i as f,c as g,n as m}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as t}from"./p-CYQvLgSs.js";import"./p-
|
|
1
|
+
import{A as t}from"./p-CYQvLgSs.js";import"./p-CSgcCWLS.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.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}
|