@justifi/webcomponents 4.19.1-rc-5 → 4.19.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-8949ea18.js → Analytics-f870b3ee.js} +3 -2
- package/dist/cjs/{business-additional-questions-schema-cf545610.js → business-additional-questions-schema-11ce0005.js} +1 -1
- package/dist/cjs/{business-form-options-582467fe.js → business-form-options-26f9900c.js} +1 -1
- package/dist/cjs/{business.service-6bb7ac82.js → business.service-f63650f5.js} +6 -5
- package/dist/cjs/config-ff2dda66.js +15 -0
- package/dist/cjs/form-alert_5.cjs.entry.js +1 -1
- package/dist/cjs/form-control-checkbox_9.cjs.entry.js +4 -4
- package/dist/cjs/{get-payout-csv-1391ff3e.js → get-payout-csv-f3aee6d0.js} +4 -3
- package/dist/cjs/justifi-additional-questions-form-step_10.cjs.entry.js +10 -9
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +5 -4
- package/dist/cjs/justifi-billing-form_2.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-details.cjs.entry.js +4 -3
- package/dist/cjs/justifi-business-form.cjs.entry.js +9 -8
- package/dist/cjs/justifi-card-form.cjs.entry.js +5 -4
- package/dist/cjs/justifi-checkout-core.cjs.entry.js +3 -3
- package/dist/cjs/justifi-checkout.cjs.entry.js +5 -4
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +4 -3
- package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +9 -11
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +5 -4
- package/dist/cjs/justifi-payment-details.cjs.entry.js +4 -3
- package/dist/cjs/justifi-payment-form.cjs.entry.js +6 -5
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +6 -5
- package/dist/cjs/justifi-payments-list.cjs.entry.js +4 -3
- package/dist/cjs/justifi-payout-details.cjs.entry.js +4 -3
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +4 -3
- package/dist/cjs/justifi-refund-form.cjs.entry.js +3 -2
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +5 -4
- package/dist/cjs/{package-a3cbc925.js → package-1321b070.js} +4 -2
- package/dist/cjs/{payload-parsers-1cbc3b57.js → payload-parsers-969ab9b6.js} +1 -1
- package/dist/cjs/{payment.service-dfcfa19b.js → payment.service-0a64f9cd.js} +3 -2
- package/dist/cjs/{schema-validations-2733de42.js → schema-validations-f3db892c.js} +1 -1
- package/dist/collection/api/services/analytics.service.js +2 -1
- package/dist/collection/api/services/business.service.js +6 -5
- package/dist/collection/api/services/checkout.service.js +3 -2
- package/dist/collection/api/services/insurance.service.js +3 -2
- package/dist/collection/api/services/payment.service.js +3 -2
- package/dist/collection/api/services/payout.service.js +4 -3
- package/dist/collection/api/services/provision.service.js +4 -2
- package/dist/collection/api/services/reports.service.js +2 -1
- package/dist/collection/components/bank-account-form/bank-account-form.js +4 -3
- package/dist/collection/components/business-forms/business-form/business-form.js +3 -2
- package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +3 -2
- package/dist/collection/components/business-forms/payment-provisioning/document-uploads/business-document-upload-form-step.js +3 -2
- package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +3 -2
- package/dist/collection/components/business-forms/utils/business-form-options.js +1 -1
- package/dist/collection/components/card-form/card-form.js +4 -3
- package/dist/collection/components/checkout/checkout-core.js +4 -4
- package/dist/collection/components/checkout/new-payment-method.js +4 -6
- package/dist/collection/components/checkout/payment-method-options.js +4 -3
- package/dist/collection/components/checkout/saved-payment-method.js +4 -3
- package/dist/collection/components/checkout/sezzle-payment-method.js +4 -3
- package/dist/collection/components/payment-form/payment-form.js +4 -3
- package/dist/collection/components/refund-form/refund-form.js +3 -2
- package/dist/config.js +11 -0
- package/dist/docs.json +8 -8
- package/dist/esm/{Analytics-38d3bafb.js → Analytics-262cdde5.js} +3 -2
- package/dist/esm/{business-additional-questions-schema-956e3caf.js → business-additional-questions-schema-e39bc781.js} +1 -1
- package/dist/esm/{business-form-options-7a9a74fc.js → business-form-options-0b08e08c.js} +1 -1
- package/dist/esm/{business.service-f45decfc.js → business.service-74bd1212.js} +6 -5
- package/dist/esm/config-476c7241.js +13 -0
- package/dist/esm/form-alert_5.entry.js +1 -1
- package/dist/esm/form-control-checkbox_9.entry.js +4 -4
- package/dist/esm/{get-payout-csv-e784a2ab.js → get-payout-csv-b494abfe.js} +4 -3
- package/dist/esm/justifi-additional-questions-form-step_10.entry.js +10 -9
- package/dist/esm/justifi-bank-account-form.entry.js +5 -4
- package/dist/esm/justifi-billing-form_2.entry.js +2 -2
- package/dist/esm/justifi-business-details.entry.js +4 -3
- package/dist/esm/justifi-business-form.entry.js +9 -8
- package/dist/esm/justifi-card-form.entry.js +5 -4
- package/dist/esm/justifi-checkout-core.entry.js +3 -3
- package/dist/esm/justifi-checkout.entry.js +5 -4
- package/dist/esm/justifi-gross-payment-chart.entry.js +4 -3
- package/dist/esm/justifi-new-payment-method_4.entry.js +9 -11
- package/dist/esm/justifi-owner-form_3.entry.js +5 -4
- package/dist/esm/justifi-payment-details.entry.js +4 -3
- package/dist/esm/justifi-payment-form.entry.js +6 -5
- package/dist/esm/justifi-payment-method-form.entry.js +1 -1
- package/dist/esm/justifi-payment-provisioning.entry.js +6 -5
- package/dist/esm/justifi-payments-list.entry.js +4 -3
- package/dist/esm/justifi-payout-details.entry.js +4 -3
- package/dist/esm/justifi-payouts-list.entry.js +4 -3
- package/dist/esm/justifi-refund-form.entry.js +3 -2
- package/dist/esm/justifi-season-interruption-insurance.entry.js +5 -4
- package/dist/esm/{package-89734008.js → package-d88677e9.js} +4 -2
- package/dist/esm/{payload-parsers-acb719d1.js → payload-parsers-62f443e1.js} +1 -1
- package/dist/esm/{payment.service-dad5153b.js → payment.service-3ca4a492.js} +3 -2
- package/dist/esm/{schema-validations-a83ff220.js → schema-validations-2f4fdebb.js} +1 -1
- package/dist/module/Analytics.js +2 -1
- package/dist/module/business-bank-account-form-step.js +3 -2
- package/dist/module/business-document-upload-form-step.js +3 -2
- package/dist/module/business-form-options.js +1 -1
- package/dist/module/business-terms-conditions-form-step.js +3 -2
- package/dist/module/business.service.js +6 -5
- package/dist/module/checkout-core.js +3 -3
- package/dist/module/config.js +13 -0
- package/dist/module/get-payout-csv.js +4 -3
- package/dist/module/justifi-bank-account-form.js +3 -2
- package/dist/module/justifi-business-form.js +3 -2
- package/dist/module/justifi-card-form.js +3 -2
- package/dist/module/justifi-checkout.js +3 -2
- package/dist/module/justifi-gross-payment-chart.js +2 -1
- package/dist/module/justifi-payment-form.js +4 -3
- package/dist/module/justifi-payment-provisioning.js +3 -2
- package/dist/module/justifi-refund-form.js +3 -2
- package/dist/module/justifi-season-interruption-insurance.js +3 -2
- package/dist/module/new-payment-method.js +3 -5
- package/dist/module/package.js +4 -2
- package/dist/module/payment-method-options.js +3 -2
- package/dist/module/payment.service.js +3 -2
- package/dist/module/saved-payment-method.js +3 -2
- package/dist/module/sezzle-payment-method.js +3 -2
- package/dist/types/components/checkout/new-payment-method.d.ts +0 -1
- package/dist/types/home/runner/work/web-component-library/web-component-library/packages/webcomponents/.stencil/packages/webcomponents/config.d.ts +11 -0
- package/dist/webcomponents/index.esm.js +0 -1
- package/dist/webcomponents/p-04a0dbb6.js +1 -0
- package/dist/webcomponents/p-061dcb79.entry.js +1 -0
- package/dist/webcomponents/p-07109641.entry.js +1 -0
- package/dist/webcomponents/p-08b0fb31.js +1 -41
- package/dist/webcomponents/p-0f7b9555.entry.js +1 -0
- package/dist/webcomponents/p-14c91ffd.js +1 -20
- package/dist/webcomponents/p-198994c0.entry.js +1 -0
- package/dist/webcomponents/p-1a43e355.entry.js +19 -0
- package/dist/webcomponents/p-1ad5995e.js +1 -3599
- package/dist/webcomponents/p-1f70fa27.entry.js +1 -0
- package/dist/webcomponents/p-1ff8810b.js +1 -29
- package/dist/webcomponents/p-2338affa.js +1 -213
- package/dist/webcomponents/p-241b0ed9.js +1 -0
- package/dist/webcomponents/p-2799383d.entry.js +1 -0
- package/dist/webcomponents/p-29c0b182.js +1 -114
- package/dist/webcomponents/p-2b6c9c4f.js +1 -7
- package/dist/webcomponents/p-2eab3c90.js +1 -3052
- package/dist/webcomponents/p-3affadfc.entry.js +1 -0
- package/dist/webcomponents/p-3d4d566d.entry.js +1 -0
- package/dist/webcomponents/p-3dd4c6c3.entry.js +1 -0
- package/dist/webcomponents/p-462dc522.entry.js +1 -0
- package/dist/webcomponents/p-46f679a9.js +1 -0
- package/dist/webcomponents/p-487b72a8.entry.js +1 -0
- package/dist/webcomponents/p-48ae16e0.entry.js +1 -0
- package/dist/webcomponents/p-4abc17f0.entry.js +1 -0
- package/dist/webcomponents/p-4bac636e.entry.js +1 -0
- package/dist/webcomponents/p-52021fa1.entry.js +1 -0
- package/dist/webcomponents/p-525db3e8.js +1 -22
- package/dist/webcomponents/p-53948ff8.entry.js +1 -0
- package/dist/webcomponents/p-53e64f15.entry.js +1 -0
- package/dist/webcomponents/p-554a3c18.js +1 -0
- package/dist/webcomponents/p-56f6ce4c.js +1 -10
- package/dist/webcomponents/p-5968ff8a.js +1 -178
- package/dist/webcomponents/p-6078a370.js +1 -244
- package/dist/webcomponents/p-60a370fc.entry.js +1 -0
- package/dist/webcomponents/p-62b32c4c.entry.js +1 -0
- package/dist/webcomponents/p-65b561da.entry.js +1 -0
- package/dist/webcomponents/p-72c9e6b3.entry.js +1 -0
- package/dist/webcomponents/p-75b4daef.js +1 -0
- package/dist/webcomponents/p-7d85af5c.js +1 -16
- package/dist/webcomponents/p-8115b2f4.js +1 -28
- package/dist/webcomponents/p-83125497.js +1 -4027
- package/dist/webcomponents/p-8603348a.js +1 -0
- package/dist/webcomponents/p-890b3254.entry.js +1 -0
- package/dist/webcomponents/p-8df7bde8.js +1 -27
- package/dist/webcomponents/p-92bb1e5f.entry.js +1 -0
- package/dist/webcomponents/p-9c9c7dac.js +1 -24
- package/dist/webcomponents/p-9ccfa1c9.entry.js +1 -0
- package/dist/webcomponents/p-9dc36f76.entry.js +1 -0
- package/dist/webcomponents/p-ad41c8c7.entry.js +1 -0
- package/dist/webcomponents/p-ae263544.js +1 -0
- package/dist/webcomponents/p-af244664.js +1 -126
- package/dist/webcomponents/p-b16dfd5d.entry.js +1 -0
- package/dist/webcomponents/p-ba4bae6f.js +1 -12
- package/dist/webcomponents/p-bbed6107.entry.js +1 -0
- package/dist/webcomponents/p-bc92235c.entry.js +1 -0
- package/dist/webcomponents/p-be39c802.entry.js +1 -0
- package/dist/webcomponents/p-c9f8f7ec.entry.js +1 -0
- package/dist/webcomponents/p-d101c5db.js +1 -0
- package/dist/webcomponents/p-d1c8d794.entry.js +1 -0
- package/dist/webcomponents/p-d25c2f12.js +1 -0
- package/dist/webcomponents/p-d2a5054f.entry.js +1 -0
- package/dist/webcomponents/p-d765d638.js +1 -0
- package/dist/webcomponents/p-d8355f91.entry.js +1 -0
- package/dist/webcomponents/p-d89bad72.js +1 -39
- package/dist/webcomponents/p-dce846bf.js +1 -27
- package/dist/webcomponents/p-df21aaad.js +1 -120
- package/dist/webcomponents/p-e1255160.js +1 -3
- package/dist/webcomponents/p-e2c88817.entry.js +1 -0
- package/dist/webcomponents/p-e31f0f3e.entry.js +1 -0
- package/dist/webcomponents/p-e333620e.js +1 -34
- package/dist/webcomponents/p-e3fab0e2.js +1 -43
- package/dist/webcomponents/p-f0866375.entry.js +1 -0
- package/dist/webcomponents/p-fad19d75.js +2 -1638
- package/dist/webcomponents/p-fb58feb5.entry.js +1 -0
- package/dist/webcomponents/p-fe33151d.entry.js +1 -0
- package/dist/webcomponents/webcomponents.css +4 -362
- package/dist/webcomponents/webcomponents.esm.js +1 -20
- package/package.json +4 -2
- package/dist/globals.d.ts +0 -2
- package/dist/webcomponents/p-0179fbb2.entry.js +0 -1684
- package/dist/webcomponents/p-01a404ca.entry.js +0 -44
- package/dist/webcomponents/p-03d35880.entry.js +0 -130
- package/dist/webcomponents/p-06ff0429.entry.js +0 -65
- package/dist/webcomponents/p-220fc2cc.entry.js +0 -98
- package/dist/webcomponents/p-258b1ee2.entry.js +0 -149
- package/dist/webcomponents/p-25d8cd65.entry.js +0 -102
- package/dist/webcomponents/p-2988ac56.js +0 -79
- package/dist/webcomponents/p-2e405359.entry.js +0 -73
- package/dist/webcomponents/p-3e9ef4a8.js +0 -28
- package/dist/webcomponents/p-3fd13ca3.js +0 -52
- package/dist/webcomponents/p-5482d030.entry.js +0 -21
- package/dist/webcomponents/p-576826b1.entry.js +0 -43
- package/dist/webcomponents/p-5cb3f0b2.entry.js +0 -261
- package/dist/webcomponents/p-5f835b89.entry.js +0 -606
- package/dist/webcomponents/p-6fed319e.entry.js +0 -99
- package/dist/webcomponents/p-70a2aa74.entry.js +0 -76
- package/dist/webcomponents/p-74d0d0e1.entry.js +0 -75
- package/dist/webcomponents/p-7582b554.entry.js +0 -18
- package/dist/webcomponents/p-79646550.entry.js +0 -61
- package/dist/webcomponents/p-7b0400cd.entry.js +0 -131
- package/dist/webcomponents/p-800d31fe.entry.js +0 -162
- package/dist/webcomponents/p-85fc69e5.js +0 -90
- package/dist/webcomponents/p-890088fc.entry.js +0 -298
- package/dist/webcomponents/p-89887332.js +0 -301
- package/dist/webcomponents/p-8eb774df.entry.js +0 -54
- package/dist/webcomponents/p-9f94bbb6.entry.js +0 -118
- package/dist/webcomponents/p-a2da97f2.entry.js +0 -145
- package/dist/webcomponents/p-a5a225d9.entry.js +0 -125
- package/dist/webcomponents/p-a5c5821e.entry.js +0 -101
- package/dist/webcomponents/p-a5fb51dc.entry.js +0 -131
- package/dist/webcomponents/p-a6d04afc.js +0 -44
- package/dist/webcomponents/p-ac086069.entry.js +0 -58
- package/dist/webcomponents/p-ad5cfa9d.js +0 -77
- package/dist/webcomponents/p-b82c146f.entry.js +0 -111
- package/dist/webcomponents/p-b9a41ec2.entry.js +0 -74
- package/dist/webcomponents/p-ba5fae28.js +0 -90
- package/dist/webcomponents/p-c636f563.entry.js +0 -791
- package/dist/webcomponents/p-c64abefc.entry.js +0 -117
- package/dist/webcomponents/p-cb26f708.js +0 -18
- package/dist/webcomponents/p-cbf2437a.entry.js +0 -80
- package/dist/webcomponents/p-d17aee2b.entry.js +0 -26
- package/dist/webcomponents/p-d894aed2.entry.js +0 -133
- package/dist/webcomponents/p-e356f280.entry.js +0 -29
- package/dist/webcomponents/p-e837a453.entry.js +0 -94
- package/dist/webcomponents/p-e84a2dcb.entry.js +0 -97
- package/dist/webcomponents/p-ec2bd24f.entry.js +0 -94
- package/dist/webcomponents/p-ec854a3e.entry.js +0 -11053
- package/dist/webcomponents/p-f02b75dc.entry.js +0 -96
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,c as r,h as t}from"./p-fad19d75.js";import"./p-56f6ce4c.js";import{a as i}from"./p-df21aaad.js";import"./p-e3fab0e2.js";import{l as a}from"./p-83125497.js";import{c as e}from"./p-ae263544.js";import{a as s,C as c}from"./p-14c91ffd.js";import{g as f}from"./p-8115b2f4.js";import{J as d}from"./p-554a3c18.js";import{B as b}from"./p-9c9c7dac.js";import{S as n}from"./p-ba4bae6f.js";import"./p-d765d638.js";import"./p-29c0b182.js";const l=class{constructor(t){o(this,t),this.submitted=r(this,"submitted",7),this.errorEvent=r(this,"error-event",7),this.bankAccount=void 0,this.card=void 0,this.email=void 0,this.clientId=void 0,this.authToken=void 0,this.accountId=void 0,this.submitButtonText=void 0,this.submitButtonEnabled=!0,this.isLoading=!1,this.selectedPaymentMethodType=i.card}componentWillLoad(){this.analytics=new d(this),this.validateProps()||(this.errorEvent.emit({errorCode:s.MISSING_PROPS,message:"clientId or authToken is required",severity:c.ERROR}),this.submitButtonEnabled=!1)}connectedCallback(){a()}disconnectedCallback(){this.analytics.cleanup()}async fillBillingForm(o){this.billingFormRef.fill(o)}async enableSubmitButton(){this.submitButtonEnabled=!0}async disableSubmitButton(){this.submitButtonEnabled=!1}showPaymentMethodTypeSelector(){return this.card&&this.bankAccount}getSelectedPaymentMethodType(){return this.showPaymentMethodTypeSelector()?this.selectedPaymentMethodType:this.card?i.card:this.bankAccount?i.bankAccount:i.card}paymentMethodSelectedHandler(o){this.selectedPaymentMethodType=o.detail}validateProps(){return!(!this.clientId&&!this.authToken)}getToken(){return this.authToken||this.clientId}async submit(o){if(o.preventDefault(),!this.paymentMethodFormRef||!this.billingFormRef)return;const r=await this.billingFormRef.validate(),t=await this.paymentMethodFormRef.validate();if(r.isValid&&t.isValid){this.isLoading=!0;try{const o=await this.billingFormRef.getValues(),r=Object.assign({email:this.email},o),t=await this.paymentMethodFormRef.tokenize(this.getToken(),r,this.accountId);t.error&&this.errorEvent.emit({errorCode:s.TOKENIZE_ERROR,message:t.error.message,severity:c.ERROR}),this.submitted.emit(t)}catch(o){this.errorEvent.emit({errorCode:s.UNKNOWN_ERROR,message:f(o),severity:c.ERROR})}finally{this.isLoading=!1}}}render(){return t(n,{key:"38bd6cca38d9068fa9277a8568a98f261a4cc616"},t("form",{key:"fec19f5e2f11934e6783124c4c437a2d3947f596",class:"row gy-3"},this.showPaymentMethodTypeSelector()&&t("div",{key:"18001f78e03336d01de8473a57e3e228e9fce201",class:"col-12"},t("justifi-payment-method-selector",{key:"260ac1ade3ccfe6baf518eb856bdf4d380025620",selectedPaymentMethodType:this.getSelectedPaymentMethodType(),onPaymentMethodSelected:o=>this.paymentMethodSelectedHandler(o)})),t("div",{key:"f6ade2336314e05f2bdce75df8577939efe33e3b",class:"col-12"},t("justifi-payment-method-form",{key:"ad8e5b121b8425175f7ac7f38ab24dfba1801a28","payment-method-form-type":this.getSelectedPaymentMethodType(),iframeOrigin:e.iframeOrigin,ref:o=>{o&&(this.paymentMethodFormRef=o)}})),t("div",{key:"29f15f1cece3e07a569e514d08bf9996405699c6",class:"col-12"},t("justifi-billing-form",{key:"9928924cc29bfa5c5e46ada294cb26da0c1d222b",legend:"Billing Info",ref:o=>{o&&(this.billingFormRef=o)}})),t("slot",{key:"c36583ab34bc105b506df27aec02898455855cec",name:"insurance"}),t("div",{key:"cc38292ae8a59bc6f4624a8535e8b7c93e6f3a35",class:"col-12"},t(b,{key:"e5fe0f50ee2322ab2a199a6229015c9daa198cc0",variant:"primary",type:"submit",onClick:o=>this.submit(o),disabled:!this.submitButtonEnabled||this.isLoading,isLoading:this.isLoading,"data-testid":"submit-button",style:{width:"100%"}},this.submitButtonText||"Submit"))))}};l.style=":host{display:block}justifi-payment-method-form{display:block;margin-left:calc(var(--jfi-layout-padding) * -1);margin-right:calc(var(--jfi-layout-padding) * -1)}*::part(label){color:var(--jfi-form-label-color);font-family:var(--jfi-form-label-font-family);font-weight:var(--jfi-form-label-font-weight);font-size:var(--jfi-form-label-font-size);margin:var(--jfi-form-label-margin)}*::part(input){font-family:var(--jfi-layout-font-family);background-color:var(--jfi-form-control-background-color);border-color:var(--jfi-form-control-border-color);border-width:var(--jfi-form-control-border-width);border-bottom-width:var(--jfi-form-control-border-bottom-width);border-left-width:var(--jfi-form-control-border-left-width);border-right-width:var(--jfi-form-control-border-right-width);border-top-width:var(--jfi-form-control-border-top-width);border-radius:var(--jfi-form-control-border-radius);border-style:var(--jfi-form-control-border-style);box-shadow:var(--jfi-form-control-box-shadow);color:var(--jfi-form-control-color);font-size:var(--jfi-form-control-font-size);font-weight:var(--jfi-form-control-font-weight);line-height:var(--jfi-form-control-line-height);margin:var(--jfi-form-control-margin);padding:var(--jfi-form-control-padding)}*::part(input):focus{color:var(--jfi-form-control-color-focus);border-color:var(--jfi-form-control-border-color-focus);box-shadow:var(--jfi-form-control-box-shadow-focus)}*::part(input-invalid){border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error)}*::part(input-invalid):focus{border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error-focus)}.jfi-submit-button{font-family:var(--jfi-layout-font-family);color:var(--jfi-submit-button-color);background-color:var(--jfi-submit-button-background-color);border-color:var(--jfi-submit-button-border-color);padding:var(--jfi-submit-button-padding);font-size:var(--jfi-submit-button-font-size);border-radius:var(--jfi-submit-button-border-radius);width:var(--jfi-submit-button-width);box-shadow:var(--jfi-submit-button-box-shadow)}.jfi-submit-button:hover{color:var(--jfi-submit-button-color-hover);background-color:var(--jfi-submit-button-background-color-hover);border-color:var(--jfi-submit-button-border-color-hover)}.jfi-submit-button:focus{color:var(--jfi-submit-button-color-focus);background-color:var(--jfi-submit-button-background-color-focus);border-color:var(--jfi-submit-button-border-color-focus)}.btn.jfi-submit-button:active{color:var(--jfi-submit-button-color-active);background-color:var(--jfi-submit-button-background-color-active);border-color:var(--jfi-submit-button-border-color-active)}.btn.jfi-submit-button-loading{min-width:75px;color:var(--jfi-submit-button-color-loading);background-color:var(--jfi-submit-button-background-color-loading);border-color:var(--jfi-submit-button-border-color-loading)}.btn.jfi-submit-button-loading .spinner-border{border-top-color:var(--jfi-submit-button-color-loading);border-bottom-color:var(--jfi-submit-button-color-loading);border-left-color:var(--jfi-submit-button-color-loading)}";export{l as justifi_payment_form}
|
|
@@ -1,29 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
function getStateAbbreviation(stateName) {
|
|
4
|
-
const state = StateOptions.find(s => s.label === stateName);
|
|
5
|
-
return state ? state.value : stateName;
|
|
6
|
-
}
|
|
7
|
-
// filterNumber is intended to be used to format a string that contains a single digit to a two digit string.
|
|
8
|
-
function filterNumber(num) {
|
|
9
|
-
if (/^\d$/.test(num)) {
|
|
10
|
-
return '0' + num;
|
|
11
|
-
}
|
|
12
|
-
return num;
|
|
13
|
-
}
|
|
14
|
-
function constructDate(year, month, day) {
|
|
15
|
-
if (!year || !month || !day) {
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
return `${year}-${filterNumber(month)}-${filterNumber(day)}`;
|
|
19
|
-
}
|
|
20
|
-
function deconstructDate(formInput) {
|
|
21
|
-
const dateString = formInput.value;
|
|
22
|
-
const [dob_year, dob_month, dob_day] = dateString.split('-');
|
|
23
|
-
return { dob_year, dob_month, dob_day };
|
|
24
|
-
}
|
|
25
|
-
function checkProvisioningStatus(business) {
|
|
26
|
-
return business.associated_accounts.length > 0;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export { checkProvisioningStatus as a, constructDate as c, deconstructDate as d, filterNumber as f, getStateAbbreviation as g };
|
|
1
|
+
import{S as n}from"./p-6078a370.js";function t(t){const o=n.find((n=>n.label===t));return o?o.value:t}function o(n){return/^\d$/.test(n)?"0"+n:n}function r(n,t,r){if(n&&t&&r)return`${n}-${o(t)}-${o(r)}`}function a(n){const t=n.value,[o,r,a]=t.split("-");return{dob_year:o,dob_month:r,dob_day:a}}function u(n){return n.associated_accounts.length>0}export{u as a,r as c,a as d,o as f,t as g}
|
|
@@ -1,213 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
const appendToMap = (map, propName, value) => {
|
|
4
|
-
const items = map.get(propName);
|
|
5
|
-
if (!items) {
|
|
6
|
-
map.set(propName, [value]);
|
|
7
|
-
}
|
|
8
|
-
else if (!items.includes(value)) {
|
|
9
|
-
items.push(value);
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
const debounce = (fn, ms) => {
|
|
13
|
-
let timeoutId;
|
|
14
|
-
return (...args) => {
|
|
15
|
-
if (timeoutId) {
|
|
16
|
-
clearTimeout(timeoutId);
|
|
17
|
-
}
|
|
18
|
-
timeoutId = setTimeout(() => {
|
|
19
|
-
timeoutId = 0;
|
|
20
|
-
fn(...args);
|
|
21
|
-
}, ms);
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Check if a possible element isConnected.
|
|
27
|
-
* The property might not be there, so we check for it.
|
|
28
|
-
*
|
|
29
|
-
* We want it to return true if isConnected is not a property,
|
|
30
|
-
* otherwise we would remove these elements and would not update.
|
|
31
|
-
*
|
|
32
|
-
* Better leak in Edge than to be useless.
|
|
33
|
-
*/
|
|
34
|
-
const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
|
|
35
|
-
const cleanupElements = debounce((map) => {
|
|
36
|
-
for (let key of map.keys()) {
|
|
37
|
-
map.set(key, map.get(key).filter(isConnected));
|
|
38
|
-
}
|
|
39
|
-
}, 2000);
|
|
40
|
-
const stencilSubscription = () => {
|
|
41
|
-
if (typeof getRenderingRef !== 'function') {
|
|
42
|
-
// If we are not in a stencil project, we do nothing.
|
|
43
|
-
// This function is not really exported by @stencil/core.
|
|
44
|
-
return {};
|
|
45
|
-
}
|
|
46
|
-
const elmsToUpdate = new Map();
|
|
47
|
-
return {
|
|
48
|
-
dispose: () => elmsToUpdate.clear(),
|
|
49
|
-
get: (propName) => {
|
|
50
|
-
const elm = getRenderingRef();
|
|
51
|
-
if (elm) {
|
|
52
|
-
appendToMap(elmsToUpdate, propName, elm);
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
set: (propName) => {
|
|
56
|
-
const elements = elmsToUpdate.get(propName);
|
|
57
|
-
if (elements) {
|
|
58
|
-
elmsToUpdate.set(propName, elements.filter(forceUpdate));
|
|
59
|
-
}
|
|
60
|
-
cleanupElements(elmsToUpdate);
|
|
61
|
-
},
|
|
62
|
-
reset: () => {
|
|
63
|
-
elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));
|
|
64
|
-
cleanupElements(elmsToUpdate);
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
const unwrap = (val) => (typeof val === 'function' ? val() : val);
|
|
70
|
-
const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
|
|
71
|
-
const unwrappedState = unwrap(defaultState);
|
|
72
|
-
let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));
|
|
73
|
-
const handlers = {
|
|
74
|
-
dispose: [],
|
|
75
|
-
get: [],
|
|
76
|
-
set: [],
|
|
77
|
-
reset: [],
|
|
78
|
-
};
|
|
79
|
-
const reset = () => {
|
|
80
|
-
var _a;
|
|
81
|
-
// When resetting the state, the default state may be a function - unwrap it to invoke it.
|
|
82
|
-
// otherwise, the state won't be properly reset
|
|
83
|
-
states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));
|
|
84
|
-
handlers.reset.forEach((cb) => cb());
|
|
85
|
-
};
|
|
86
|
-
const dispose = () => {
|
|
87
|
-
// Call first dispose as resetting the state would
|
|
88
|
-
// cause less updates ;)
|
|
89
|
-
handlers.dispose.forEach((cb) => cb());
|
|
90
|
-
reset();
|
|
91
|
-
};
|
|
92
|
-
const get = (propName) => {
|
|
93
|
-
handlers.get.forEach((cb) => cb(propName));
|
|
94
|
-
return states.get(propName);
|
|
95
|
-
};
|
|
96
|
-
const set = (propName, value) => {
|
|
97
|
-
const oldValue = states.get(propName);
|
|
98
|
-
if (shouldUpdate(value, oldValue, propName)) {
|
|
99
|
-
states.set(propName, value);
|
|
100
|
-
handlers.set.forEach((cb) => cb(propName, value, oldValue));
|
|
101
|
-
}
|
|
102
|
-
};
|
|
103
|
-
const state = (typeof Proxy === 'undefined'
|
|
104
|
-
? {}
|
|
105
|
-
: new Proxy(unwrappedState, {
|
|
106
|
-
get(_, propName) {
|
|
107
|
-
return get(propName);
|
|
108
|
-
},
|
|
109
|
-
ownKeys(_) {
|
|
110
|
-
return Array.from(states.keys());
|
|
111
|
-
},
|
|
112
|
-
getOwnPropertyDescriptor() {
|
|
113
|
-
return {
|
|
114
|
-
enumerable: true,
|
|
115
|
-
configurable: true,
|
|
116
|
-
};
|
|
117
|
-
},
|
|
118
|
-
has(_, propName) {
|
|
119
|
-
return states.has(propName);
|
|
120
|
-
},
|
|
121
|
-
set(_, propName, value) {
|
|
122
|
-
set(propName, value);
|
|
123
|
-
return true;
|
|
124
|
-
},
|
|
125
|
-
}));
|
|
126
|
-
const on = (eventName, callback) => {
|
|
127
|
-
handlers[eventName].push(callback);
|
|
128
|
-
return () => {
|
|
129
|
-
removeFromArray(handlers[eventName], callback);
|
|
130
|
-
};
|
|
131
|
-
};
|
|
132
|
-
const onChange = (propName, cb) => {
|
|
133
|
-
const unSet = on('set', (key, newValue) => {
|
|
134
|
-
if (key === propName) {
|
|
135
|
-
cb(newValue);
|
|
136
|
-
}
|
|
137
|
-
});
|
|
138
|
-
// We need to unwrap the defaultState because it might be a function.
|
|
139
|
-
// Otherwise we might not be sending the right reset value.
|
|
140
|
-
const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));
|
|
141
|
-
return () => {
|
|
142
|
-
unSet();
|
|
143
|
-
unReset();
|
|
144
|
-
};
|
|
145
|
-
};
|
|
146
|
-
const use = (...subscriptions) => {
|
|
147
|
-
const unsubs = subscriptions.reduce((unsubs, subscription) => {
|
|
148
|
-
if (subscription.set) {
|
|
149
|
-
unsubs.push(on('set', subscription.set));
|
|
150
|
-
}
|
|
151
|
-
if (subscription.get) {
|
|
152
|
-
unsubs.push(on('get', subscription.get));
|
|
153
|
-
}
|
|
154
|
-
if (subscription.reset) {
|
|
155
|
-
unsubs.push(on('reset', subscription.reset));
|
|
156
|
-
}
|
|
157
|
-
if (subscription.dispose) {
|
|
158
|
-
unsubs.push(on('dispose', subscription.dispose));
|
|
159
|
-
}
|
|
160
|
-
return unsubs;
|
|
161
|
-
}, []);
|
|
162
|
-
return () => unsubs.forEach((unsub) => unsub());
|
|
163
|
-
};
|
|
164
|
-
const forceUpdate = (key) => {
|
|
165
|
-
const oldValue = states.get(key);
|
|
166
|
-
handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
|
|
167
|
-
};
|
|
168
|
-
return {
|
|
169
|
-
state,
|
|
170
|
-
get,
|
|
171
|
-
set,
|
|
172
|
-
on,
|
|
173
|
-
onChange,
|
|
174
|
-
use,
|
|
175
|
-
dispose,
|
|
176
|
-
reset,
|
|
177
|
-
forceUpdate,
|
|
178
|
-
};
|
|
179
|
-
};
|
|
180
|
-
const removeFromArray = (array, item) => {
|
|
181
|
-
const index = array.indexOf(item);
|
|
182
|
-
if (index >= 0) {
|
|
183
|
-
array[index] = array[array.length - 1];
|
|
184
|
-
array.length--;
|
|
185
|
-
}
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
const createStore = (defaultState, shouldUpdate) => {
|
|
189
|
-
const map = createObservableMap(defaultState, shouldUpdate);
|
|
190
|
-
map.use(stencilSubscription());
|
|
191
|
-
return map;
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
const insuranceValuesStore = createStore({});
|
|
195
|
-
const { state: insuranceValues, on: insuranceValuesOn } = insuranceValuesStore;
|
|
196
|
-
const insuranceErrorsStore = createStore({});
|
|
197
|
-
const { state: insuranceErrors } = insuranceErrorsStore;
|
|
198
|
-
const validateInsuranceValues = () => {
|
|
199
|
-
let valid = true;
|
|
200
|
-
Object.keys(insuranceValues).forEach((key) => {
|
|
201
|
-
const noSelection = insuranceValues[key] === null;
|
|
202
|
-
if (noSelection) {
|
|
203
|
-
insuranceErrors[key] = true;
|
|
204
|
-
valid = false;
|
|
205
|
-
}
|
|
206
|
-
else {
|
|
207
|
-
insuranceErrors[key] = false;
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
return { isValid: valid };
|
|
211
|
-
};
|
|
212
|
-
|
|
213
|
-
export { insuranceValues as a, insuranceErrors as b, insuranceValuesOn as i, validateInsuranceValues as v };
|
|
1
|
+
import{a as e,f as t}from"./p-fad19d75.js";const s=e=>!("isConnected"in e)||e.isConnected,n=(()=>{let e;return(...t)=>{e&&clearTimeout(e),e=setTimeout((()=>{e=0,(e=>{for(let t of e.keys())e.set(t,e.get(t).filter(s))})(...t)}),2e3)}})(),o=e=>"function"==typeof e?e():e,r=(s,r)=>{const a=((e,t=((e,t)=>e!==t))=>{const s=o(e);let n=new Map(Object.entries(null!=s?s:{}));const r={dispose:[],get:[],set:[],reset:[]},a=()=>{var t;n=new Map(Object.entries(null!==(t=o(e))&&void 0!==t?t:{})),r.reset.forEach((e=>e()))},c=e=>(r.get.forEach((t=>t(e))),n.get(e)),i=(e,s)=>{const o=n.get(e);t(s,o,e)&&(n.set(e,s),r.set.forEach((t=>t(e,s,o))))},u="undefined"==typeof Proxy?{}:new Proxy(s,{get:(e,t)=>c(t),ownKeys:()=>Array.from(n.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(e,t)=>n.has(t),set:(e,t,s)=>(i(t,s),!0)}),p=(e,t)=>(r[e].push(t),()=>{((e,t)=>{const s=e.indexOf(t);s>=0&&(e[s]=e[e.length-1],e.length--)})(r[e],t)});return{state:u,get:c,set:i,on:p,onChange:(t,s)=>{const n=p("set",((e,n)=>{e===t&&s(n)})),r=p("reset",(()=>s(o(e)[t])));return()=>{n(),r()}},use:(...e)=>{const t=e.reduce(((e,t)=>(t.set&&e.push(p("set",t.set)),t.get&&e.push(p("get",t.get)),t.reset&&e.push(p("reset",t.reset)),t.dispose&&e.push(p("dispose",t.dispose)),e)),[]);return()=>t.forEach((e=>e()))},dispose:()=>{r.dispose.forEach((e=>e())),a()},reset:a,forceUpdate:e=>{const t=n.get(e);r.set.forEach((s=>s(e,t,t)))}}})(s,r);return a.use((()=>{if("function"!=typeof e)return{};const s=new Map;return{dispose:()=>s.clear(),get:t=>{const n=e();n&&((e,t,s)=>{const n=e.get(t);n?n.includes(s)||n.push(s):e.set(t,[s])})(s,t,n)},set:e=>{const o=s.get(e);o&&s.set(e,o.filter(t)),n(s)},reset:()=>{s.forEach((e=>e.forEach(t))),n(s)}}})()),a},a=r({}),{state:c,on:i}=a,u=r({}),{state:p}=u,f=()=>{let e=!0;return Object.keys(c).forEach((t=>{null===c[t]?(p[t]=!0,e=!1):p[t]=!1})),{isValid:e}};export{c as a,p as b,i,f as v}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,b as s}from"./p-2eab3c90.js";import{S as t}from"./p-6078a370.js";import{b as a,a as r,r as n,s as i,c as l}from"./p-d25c2f12.js";const c=e=>""===e?null:e,o=/^(?!^\s+$)[a-zA-Z0-9\s,&.-]*$/,d=/^(?!^\s+$)[a-zA-Z\s]*$/,u=/^\d+$/,m=/^(?!^\s+$)[a-zA-Z0-9\s,&.-]*$/,h=/P\.?\s?O\.?\s?Box|Postal\sBox/i;var b,v;!function(e){e.voidedCheck="voided_check",e.balanceSheet="balance_sheet",e.bankStatement="bank_statement",e.governmentId="government_id",e.profitAndLossStatement="profit_and_loss_statement",e.taxReturn="tax_return",e.other="other"}(b||(b={})),function(e){e.pending="pending",e.uploaded="uploaded",e.canceled="canceled",e.needed="needed"}(v||(v={}));class E{constructor(){this.voided_check=[],this.balance_sheet=[],this.bank_statement=[],this.government_id=[],this.profit_and_loss_statement=[],this.tax_return=[],this.other=[]}}class p{constructor(e,s){this.file=e.file,this.fileString=this.getFileString(),this.document_type=e.document_type,this.presigned_url=null,this.record_data={business_id:s,document_type:this.document_type,file_name:this.file.name,file_type:this.file.type}}getFileString(){let e=new FileReader;return e.onload=e=>{this.fileString=e.target.result},e.readAsDataURL(this.file),this.fileString}setPresignedUrl(e){this.presigned_url=e}}const S=e().email("Enter valid email").transform(c),N=e().matches(/^\d{10}$/,"Enter valid phone number").transform(c),g=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").matches(o,"Enter valid business name").transform(c),f=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").matches(o,"Enter valid doing business as").transform(c),y=e().matches(/^(?:http(s)?:\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/,"Enter valid website url").transform(c),_=e().oneOf(a.map((e=>e.value)),"Select business classification").transform(c),$=e().min(2,"Industry must be at least 2 characters").max(50,"Industry must be less than 50 characters").matches(d,"Enter valid industry").transform(c),w=e().matches(u,"Enter valid tax id, SSN, or EIN").test("not-repeat","Enter valid tax id, SSN, or EIN",(e=>!/^(\d)\1+$/.test(e))).test("not-seq","Enter valid tax id, SSN, or EIN",(e=>"123456789"!==e)).transform(c),A=e().test("not-future","Date of incorporation cannot be in the future",(e=>new Date(e)<=new Date)).transform(c),x=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").matches(d,"Enter valid name").transform(c),I=e().min(2,"Title must be at least 2 characters").max(50,"Title must be less than 50 characters").matches(d,"Enter valid title").transform(c),P=s=>e().test("min","Enter a valid date",(e=>new Date(e)>=new Date("1902-01-01"))).test("age",`${s} must be at least 18 years old`,(e=>{const s=new Date(e),t=new Date;return t.setFullYear(t.getFullYear()-18),s<=t})).transform(c),D=e().matches(/^(?!000|666|9\d{2})\d{3}(?!00)\d{2}(?!0000)\d{4}$/,"Enter valid SSN").when("ssn_last4",{is:e=>!e||0===e.length,then:e=>e.required("Enter SSN"),otherwise:e=>e.nullable()}).test("not-repeat","Enter valid SSN",(e=>!/^(\d)\1+$/.test(e))).test("not-seq","Enter valid SSN",(e=>"123456789"!==e)).transform(c),z=e().min(5,"Address must be at least 5 characters").max(100,"Address must be less than 100 characters").matches(m,"Enter valid address line 1").test("not-po-box","A PO Box is not a valid address entry",(e=>!h.test(e))).transform(c),k=e().max(100,"Address must be less than 100 characters").matches(m,"Enter valid address line 2").test("not-po-box","A PO Box is not a valid address entry",(e=>!h.test(e))).transform(c),B=e().min(2,"City must be at least 2 characters").max(50,"City must be less than 50 characters").matches(d,"Enter valid city").transform(c),Z=e().oneOf(t.map((e=>e.value)),"Select state").transform(c),j=e().matches(/^[0-9]{5}$/,"Enter valid postal code").transform(c),q=e().matches(u,"Enter valid revenue").transform(c),C=e().matches(u,"Enter valid payment volume").transform(c),F=e().oneOf(r.map((e=>e.value)),"Select when service is received").transform(c),O=e().oneOf(n.map((e=>e.value)),"Select recurring payments").transform(c),R=e().when("business_recurring_payments",{is:e=>"Yes"===e,then:e=>e.required("Enter recurring payments percentage"),otherwise:e=>e.nullable()}).transform(c),T=e().oneOf(i.map((e=>e.value)),"Select seasonal business").transform(c),G=e().transform(c),H=e().min(2,"Name must be at least 2 characters").max(50,"Name must be less than 50 characters").matches(d,"Enter valid bank name").transform(c),J=e().min(2,"Name must be at least 2 characters").max(50,"Name must be less than 50 characters").matches(d,"Enter valid nickname").transform(c),K=e().oneOf(l.map((e=>e.value)),"Select account type").transform(c),L=e().min(8,"Account number must be at least 8 digits").max(17,"Account number must be less than 17 digits").matches(u,"Enter valid account number").test("not-repeat","Enter valid account number",(e=>!/^(\d)\1+$/.test(e))).transform(c),M=e().length(9,"Routing number must be 9 digits").matches(u,"Enter valid routing number").test("not-repeat","Enter valid routing number",(e=>!/^(\d)\1+$/.test(e))).test("valid","Enter valid routing number",(e=>(e=>{if(!e)return!1;const s=Array.from(String(e),Number);return 9===s.length&&0==(3*(s[0]+s[3]+s[6])+7*(s[1]+s[4]+s[7])+(s[2]+s[5]+s[8]))%10})(e))).transform(c),U=s(),Y=U,Q=U,V=U,W=(e,s)=>e.some((e=>e.document_type===b.voidedCheck))||s?U.nullable():U.required("Please select one or more files"),X=(e,s,t)=>{const a=parseInt(e);return s.some((e=>e.document_type===b.bankStatement))||t?U.nullable():a>=25e4&&!t?U.required("Please select one or more files"):void 0},ee=(e,s,t)=>{const a=parseInt(e);return s.some((e=>e.document_type===b.balanceSheet))||t?U.nullable():a>=1e6&&!t?U.required("Please select one or more files"):void 0},se=(e,s,t)=>{const a=parseInt(e);return s.some((e=>e.document_type===b.profitAndLossStatement))||t?U.nullable():a>=1e6&&!t?U.required("Please select one or more files"):void 0};export{J as A,K as B,L as C,M as D,W as E,Q as F,Y as G,V as H,ee as I,X as J,se as K,p as L,E as M,b as N,k as a,I as b,B as c,N as d,S as e,P as f,D as g,g as h,x as i,f as j,_ as k,z as l,$ as m,A as n,C as o,j as p,F as q,q as r,Z as s,w as t,O as u,R as v,y as w,T as x,G as y,H as z}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as r,c as o}from"./p-fad19d75.js";import{c as a,F as t}from"./p-2eab3c90.js";import{i as d,l as i,a as c,c as f,s,p as l}from"./p-241b0ed9.js";import{S as n}from"./p-6078a370.js";import{n as b}from"./p-8df7bde8.js";import{S as h}from"./p-ba4bae6f.js";import"./p-d25c2f12.js";import"./p-af244664.js";import"./p-1ff8810b.js";const m=a({name:d.required("Enter full name"),address_line1:i.required("Enter street address"),address_line2:c.nullable(),address_city:f.required("Enter city"),address_state:s.required("Select state"),address_postal_code:l.required("Enter postal code")}),p=class{constructor(r){e(this,r),this.inputHandler=(e,r)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:r}))},this.legend=void 0,this.formController=void 0,this.billingInfo=void 0,this.errors={}}componentWillLoad(){this.formController=new t(m)}componentDidLoad(){this.formController.values.subscribe((e=>this.billingInfo=Object.assign({},e))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}async getValues(){return this.formController.values.getValue()}async fill(e){this.formController.setInitialValues(e)}async validate(){return{isValid:await this.formController.validate()}}render(){const e=this.formController.getInitialValues();return r(h,{key:"b08094d3c44d35cdb3c21b4bc360dbbee19d7d15",exportparts:"label,input,input-invalid"},r("form",{key:"392538a781ffa2ac299cbc4203bab5efd10e77cc"},r("fieldset",{key:"f4b5a5ec9a91e9f50a3847c5eb16635c4f9d569a"},this.legend&&r("legend",{key:"eb75e22f9df33c13e3851ece784d237b8973e2c5"},this.legend),r("div",{key:"d7ffdc1cfeda5568ad003a4d3bbe94765de04605",class:"row gy-3"},r("div",{key:"c22f9e7b2f33b5c298bb5f0a5c7bcaa709c231a0",class:"col-12"},r("form-control-text",{key:"d6eb4d2f4d1a2a709e0f29bf18b5d9700bd91a13",name:"name",label:"Full Name",defaultValue:e.name,errorText:this.errors.name,inputHandler:this.inputHandler})),r("div",{key:"8494ee3c14f8923d18d8708077e030c2f141a251",class:"col-12"},r("form-control-text",{key:"63266eb0e2b2b006a3c914a68703ee1cdf848f83",name:"address_line1",label:"Street Address",defaultValue:e.address_line1,errorText:this.errors.address_line1,inputHandler:this.inputHandler})),r("div",{key:"0a19fcf5c172d2539f23e147f39461d84dfd9d37",class:"col-12"},r("form-control-text",{key:"0e5fae5d65d5ea195de0227d1e4f79cee7c7a0fb",name:"address_line2",label:"Apartment, Suite, etc. (optional)",defaultValue:e.address_line2,errorText:this.errors.address_line2,inputHandler:this.inputHandler})),r("div",{key:"13104554e8247cb0534c3dc9e6a16b2f44397795",class:"col-12"},r("form-control-text",{key:"430e59713ec66ff7a6f735ca24640c27b05cbeee",name:"address_city",label:"City",defaultValue:e.address_city,errorText:this.errors.address_city,inputHandler:this.inputHandler})),r("div",{key:"5b81499717f67d5f499f4ebfc585056ef5bd3d56",class:"col-12"},r("form-control-select",{key:"726c724eda5f25a92bad7e549ff7845ece7b41e1",name:"address_state",label:"State",options:n,defaultValue:e.address_state,errorText:this.errors.address_state,inputHandler:this.inputHandler})),r("div",{key:"5d5a6e0949c5ad93da5bc1837dadf88c2128212d",class:"col-12"},r("form-control-text",{key:"ebb4e77126d86011d9a1ed5d118461198b399092",name:"address_postal_code",label:"ZIP",defaultValue:e.address_postal_code,errorText:this.errors.address_postal_code,inputHandler:this.inputHandler,maxLength:5,keyDownHandler:b}))))))}};p.style=":host{display:block}justifi-billing-form{margin-left:calc(var(--jfi-layout-padding) * -1);margin-right:calc(var(--jfi-layout-padding) * -1)}*::part(label){color:var(--jfi-form-label-color);font-family:var(--jfi-form-label-font-family);font-weight:var(--jfi-form-label-font-weight);font-size:var(--jfi-form-label-font-size);margin:var(--jfi-form-label-margin)}*::part(input){background-color:var(--jfi-form-control-background-color);border-color:var(--jfi-form-control-border-color);border-width:var(--jfi-form-control-border-width);border-bottom-width:var(--jfi-form-control-border-bottom-width);border-left-width:var(--jfi-form-control-border-left-width);border-right-width:var(--jfi-form-control-border-right-width);border-top-width:var(--jfi-form-control-border-top-width);border-radius:var(--jfi-form-control-border-radius);border-style:var(--jfi-form-control-border-style);box-shadow:var(--jfi-form-control-box-shadow);color:var(--jfi-form-control-color);font-size:var(--jfi-form-control-font-size);font-weight:var(--jfi-form-control-font-weight);line-height:var(--jfi-form-control-line-height);margin:var(--jfi-form-control-margin);padding:var(--jfi-form-control-padding)}*::part(input):focus{color:var(--jfi-form-control-color-focus);border-color:var(--jfi-form-control-border-color-focus);box-shadow:var(--jfi-form-control-box-shadow-focus)}*::part(input-invalid){border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error)}*::part(input-invalid):focus{border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error-focus)}";const u=class{constructor(r){e(this,r),this.checkboxChanged=o(this,"checkboxChanged",7),this.isChecked=!1}handleCheckboxChange(e){this.isChecked=e.target.checked,this.checkboxChanged.emit(this.isChecked)}render(){return r("div",{key:"f22a132a518a98786c8486e08c9a65050f3c5ea0",class:"mt-4 form-check"},r("input",{key:"6f1392f9dd29a9761f5942b0a40e05a899858ada",type:"checkbox",checked:this.isChecked,onChange:e=>this.handleCheckboxChange(e),class:"form-check-input"}),r("label",{key:"e6e5908ba70ece8ea19370a04104d88d17237fc7",class:"form-check-label"},"Save new payment method"))}};export{p as justifi_billing_form,u as justifi_save_new_payment_method}
|
|
@@ -1,114 +1 @@
|
|
|
1
|
-
|
|
2
|
-
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
3
|
-
// generators (like Math.random()).
|
|
4
|
-
let getRandomValues;
|
|
5
|
-
const rnds8 = new Uint8Array(16);
|
|
6
|
-
function rng() {
|
|
7
|
-
// lazy load so that environments that need to polyfill have a chance to do so
|
|
8
|
-
if (!getRandomValues) {
|
|
9
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
|
10
|
-
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
|
11
|
-
|
|
12
|
-
if (!getRandomValues) {
|
|
13
|
-
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return getRandomValues(rnds8);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Convert array of 16 byte values to UUID string format of the form:
|
|
22
|
-
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
const byteToHex = [];
|
|
26
|
-
|
|
27
|
-
for (let i = 0; i < 256; ++i) {
|
|
28
|
-
byteToHex.push((i + 0x100).toString(16).slice(1));
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function unsafeStringify(arr, offset = 0) {
|
|
32
|
-
// Note: Be careful editing this code! It's been tuned for performance
|
|
33
|
-
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
34
|
-
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
38
|
-
const native = {
|
|
39
|
-
randomUUID
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
function v4(options, buf, offset) {
|
|
43
|
-
if (native.randomUUID && !buf && !options) {
|
|
44
|
-
return native.randomUUID();
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
options = options || {};
|
|
48
|
-
const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
49
|
-
|
|
50
|
-
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
51
|
-
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
52
|
-
|
|
53
|
-
if (buf) {
|
|
54
|
-
offset = offset || 0;
|
|
55
|
-
|
|
56
|
-
for (let i = 0; i < 16; ++i) {
|
|
57
|
-
buf[offset + i] = rnds[i];
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return buf;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
return unsafeStringify(rnds);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const Api = ({ authToken, apiOrigin }) => {
|
|
67
|
-
async function getAuthorizationHeader() {
|
|
68
|
-
if (!authToken) {
|
|
69
|
-
return {
|
|
70
|
-
'Content-Type': 'application/json',
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
return {
|
|
74
|
-
Authorization: `Bearer ${authToken}`,
|
|
75
|
-
'Idempotency-Key': v4(),
|
|
76
|
-
'Content-Type': 'application/json',
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
async function makeRequest(endpoint, method, params, body, signal) {
|
|
80
|
-
const url = `${apiOrigin}/v1/${endpoint}`;
|
|
81
|
-
const requestUrl = params ? `${url}?${new URLSearchParams(params)}` : url;
|
|
82
|
-
const response = await fetch(requestUrl, {
|
|
83
|
-
method: method,
|
|
84
|
-
headers: await getAuthorizationHeader(),
|
|
85
|
-
body: body,
|
|
86
|
-
signal: signal,
|
|
87
|
-
});
|
|
88
|
-
if (response) {
|
|
89
|
-
return response.status === 204 ? {} : response.json();
|
|
90
|
-
}
|
|
91
|
-
handleError(requestUrl);
|
|
92
|
-
}
|
|
93
|
-
async function get(endpoint, params, signal) {
|
|
94
|
-
return makeRequest(endpoint, 'GET', params, null, signal);
|
|
95
|
-
}
|
|
96
|
-
async function post(endpoint, body, params, signal) {
|
|
97
|
-
return makeRequest(endpoint, 'POST', params, body, signal);
|
|
98
|
-
}
|
|
99
|
-
async function put(endpoint, body, params, signal) {
|
|
100
|
-
return makeRequest(endpoint, 'PUT', params, body, signal);
|
|
101
|
-
}
|
|
102
|
-
async function patch(endpoint, body, params, signal) {
|
|
103
|
-
return makeRequest(endpoint, 'PATCH', params, body, signal);
|
|
104
|
-
}
|
|
105
|
-
async function destroy(endpoint, params, signal) {
|
|
106
|
-
return makeRequest(endpoint, 'DELETE', params, null, signal);
|
|
107
|
-
}
|
|
108
|
-
return { get, post, put, patch, destroy };
|
|
109
|
-
};
|
|
110
|
-
function handleError(requestUrl) {
|
|
111
|
-
console.error(`Error fetching from ${requestUrl}`);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export { Api as A };
|
|
1
|
+
let n;const t=new Uint8Array(16);function r(){if(!n&&(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!n))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(t)}const o=[];for(let n=0;n<256;++n)o.push((n+256).toString(16).slice(1));const e={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function c(n,t,c){if(e.randomUUID&&!t&&!n)return e.randomUUID();const u=(n=n||{}).random||(n.rng||r)();if(u[6]=15&u[6]|64,u[8]=63&u[8]|128,t){c=c||0;for(let n=0;n<16;++n)t[c+n]=u[n];return t}return function(n,t=0){return o[n[t+0]]+o[n[t+1]]+o[n[t+2]]+o[n[t+3]]+"-"+o[n[t+4]]+o[n[t+5]]+"-"+o[n[t+6]]+o[n[t+7]]+"-"+o[n[t+8]]+o[n[t+9]]+"-"+o[n[t+10]]+o[n[t+11]]+o[n[t+12]]+o[n[t+13]]+o[n[t+14]]+o[n[t+15]]}(u)}const u=({authToken:n,apiOrigin:t})=>{async function r(){return n?{Authorization:`Bearer ${n}`,"Idempotency-Key":c(),"Content-Type":"application/json"}:{"Content-Type":"application/json"}}async function o(n,o,e,c,u){const i=`${t}/v1/${n}`,a=e?`${i}?${new URLSearchParams(e)}`:i,p=await fetch(a,{method:o,headers:await r(),body:c,signal:u});if(p)return 204===p.status?{}:p.json();!function(n){console.error(`Error fetching from ${n}`)}(a)}return{get:async function(n,t,r){return o(n,"GET",t,null,r)},post:async function(n,t,r,e){return o(n,"POST",r,t,e)},put:async function(n,t,r,e){return o(n,"PUT",r,t,e)},patch:async function(n,t,r,e){return o(n,"PATCH",r,t,e)},destroy:async function(n,t,r){return o(n,"DELETE",t,null,r)}}};export{u as A}
|
|
@@ -1,7 +1 @@
|
|
|
1
|
-
const
|
|
2
|
-
table-head,table-head-row,table-head-cell,table-body,table-row,table-row-even,
|
|
3
|
-
table-row-odd,table-cell,loading-state-cell,loading-state-spinner,error-state,
|
|
4
|
-
empty-state,pagination-bar,page-arrow,page-button,page-button-disabled,page-button-text
|
|
5
|
-
`;
|
|
6
|
-
|
|
7
|
-
export { tableExportedParts as t };
|
|
1
|
+
const e="\ntable-head,table-head-row,table-head-cell,table-body,table-row,table-row-even,\ntable-row-odd,table-cell,loading-state-cell,loading-state-spinner,error-state,\nempty-state,pagination-bar,page-arrow,page-button,page-button-disabled,page-button-text\n";export{e as t}
|