@justifi/webcomponents 6.12.1-rc.1 → 6.12.1-rc.2

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.
Files changed (97) hide show
  1. package/dist/cjs/{Analytics-D72yBqoQ.js → Analytics-DN1vWC6J.js} +1 -1
  2. package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
  3. package/dist/cjs/card-form.cjs.entry.js +2 -2
  4. package/dist/cjs/{check-pkg-version-EI9MxE9j.js → check-pkg-version-DKEv2rPI.js} +1 -1
  5. package/dist/cjs/hidden-input_2.cjs.entry.js +1 -1
  6. package/dist/cjs/justifi-apple-pay_11.cjs.entry.js +4 -3
  7. package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +3 -3
  8. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +3 -3
  9. package/dist/cjs/justifi-business-details.cjs.entry.js +3 -3
  10. package/dist/cjs/justifi-business-form.cjs.entry.js +3 -3
  11. package/dist/cjs/justifi-card-form.cjs.entry.js +3 -3
  12. package/dist/cjs/justifi-checkout.cjs.entry.js +3 -3
  13. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +3 -3
  14. package/dist/cjs/justifi-dispute-management.cjs.entry.js +3 -3
  15. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +3 -3
  16. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +3 -3
  17. package/dist/cjs/justifi-order-terminals.cjs.entry.js +3 -3
  18. package/dist/cjs/justifi-payment-details.cjs.entry.js +3 -3
  19. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +3 -3
  20. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +3 -3
  21. package/dist/cjs/justifi-payments-list.cjs.entry.js +3 -3
  22. package/dist/cjs/justifi-payout-details.cjs.entry.js +3 -3
  23. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +3 -3
  24. package/dist/cjs/justifi-payouts-list.cjs.entry.js +3 -3
  25. package/dist/cjs/justifi-refund-payment.cjs.entry.js +3 -3
  26. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +3 -3
  27. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +3 -3
  28. package/dist/cjs/justifi-terminals-list.cjs.entry.js +3 -3
  29. package/dist/cjs/{package-U1Mz5_qn.js → package-EwQYAMPH.js} +1 -1
  30. package/dist/collection/components/modular-checkout/sub-components/justifi-apple-pay.js +1 -0
  31. package/dist/docs.json +1 -1
  32. package/dist/esm/{Analytics-BLWnbxJY.js → Analytics-Ds-ogIwt.js} +1 -1
  33. package/dist/esm/bank-account-form.entry.js +2 -2
  34. package/dist/esm/card-form.entry.js +2 -2
  35. package/dist/esm/{check-pkg-version-D9dGqUmC.js → check-pkg-version-Bd_MOwNP.js} +1 -1
  36. package/dist/esm/hidden-input_2.entry.js +1 -1
  37. package/dist/esm/justifi-apple-pay_11.entry.js +4 -3
  38. package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +3 -3
  39. package/dist/esm/justifi-bank-account-form.entry.js +3 -3
  40. package/dist/esm/justifi-business-details.entry.js +3 -3
  41. package/dist/esm/justifi-business-form.entry.js +3 -3
  42. package/dist/esm/justifi-card-form.entry.js +3 -3
  43. package/dist/esm/justifi-checkout.entry.js +3 -3
  44. package/dist/esm/justifi-checkouts-list.entry.js +3 -3
  45. package/dist/esm/justifi-dispute-management.entry.js +3 -3
  46. package/dist/esm/justifi-dispute-notification_3.entry.js +3 -3
  47. package/dist/esm/justifi-gross-payment-chart.entry.js +3 -3
  48. package/dist/esm/justifi-order-terminals.entry.js +3 -3
  49. package/dist/esm/justifi-payment-details.entry.js +3 -3
  50. package/dist/esm/justifi-payment-provisioning.entry.js +3 -3
  51. package/dist/esm/justifi-payment-transactions-list.entry.js +3 -3
  52. package/dist/esm/justifi-payments-list.entry.js +3 -3
  53. package/dist/esm/justifi-payout-details.entry.js +3 -3
  54. package/dist/esm/justifi-payout-transactions-list.entry.js +3 -3
  55. package/dist/esm/justifi-payouts-list.entry.js +3 -3
  56. package/dist/esm/justifi-refund-payment.entry.js +3 -3
  57. package/dist/esm/justifi-season-interruption-insurance.entry.js +3 -3
  58. package/dist/esm/justifi-terminal-orders-list.entry.js +3 -3
  59. package/dist/esm/justifi-terminals-list.entry.js +3 -3
  60. package/dist/esm/{package-BW1eeDYQ.js → package-B5w1e9rb.js} +1 -1
  61. package/dist/module/justifi-apple-pay2.js +1 -0
  62. package/dist/module/package.js +1 -1
  63. package/dist/types/api/ApplePay.d.ts +1 -0
  64. package/dist/webcomponents/{p-f8f8ee4e.entry.js → p-0ee11ceb.entry.js} +1 -1
  65. package/dist/webcomponents/{p-72886d0a.entry.js → p-15377f17.entry.js} +1 -1
  66. package/dist/webcomponents/{p-020d9c38.entry.js → p-17fb6153.entry.js} +1 -1
  67. package/dist/webcomponents/{p-c76dc4dd.entry.js → p-1f2129ec.entry.js} +1 -1
  68. package/dist/webcomponents/{p-183bb9e2.entry.js → p-3c59fe06.entry.js} +1 -1
  69. package/dist/webcomponents/{p-2d68e1ea.entry.js → p-45212820.entry.js} +1 -1
  70. package/dist/webcomponents/{p-d6cfda12.entry.js → p-46d8145c.entry.js} +1 -1
  71. package/dist/webcomponents/{p-5a384a9a.entry.js → p-707e1e27.entry.js} +1 -1
  72. package/dist/webcomponents/p-70a7c529.entry.js +1 -0
  73. package/dist/webcomponents/{p-c4264f99.entry.js → p-799e1a2f.entry.js} +1 -1
  74. package/dist/webcomponents/{p-df75468d.entry.js → p-80a9216a.entry.js} +1 -1
  75. package/dist/webcomponents/{p-e6c66cdb.entry.js → p-8d88556f.entry.js} +1 -1
  76. package/dist/webcomponents/{p-a21cef71.entry.js → p-8dc0e73a.entry.js} +1 -1
  77. package/dist/webcomponents/{p-1fad5340.entry.js → p-90d106c7.entry.js} +1 -1
  78. package/dist/webcomponents/{p-f2d7498d.entry.js → p-99f3e1e0.entry.js} +1 -1
  79. package/dist/webcomponents/{p-eb64c229.entry.js → p-9a00cde1.entry.js} +1 -1
  80. package/dist/webcomponents/p-B5w1e9rb.js +1 -0
  81. package/dist/webcomponents/{p-DELK4IgY.js → p-DKzki_Iz.js} +1 -1
  82. package/dist/webcomponents/{p-ac83cf45.entry.js → p-a511a246.entry.js} +1 -1
  83. package/dist/webcomponents/{p-8c484a70.entry.js → p-a9edf63a.entry.js} +1 -1
  84. package/dist/webcomponents/p-afe956d9.entry.js +1 -0
  85. package/dist/webcomponents/{p-68c16230.entry.js → p-c4d50650.entry.js} +1 -1
  86. package/dist/webcomponents/{p-972e724c.entry.js → p-c7ecb7d3.entry.js} +1 -1
  87. package/dist/webcomponents/{p-e6e9b381.entry.js → p-ce8de71b.entry.js} +1 -1
  88. package/dist/webcomponents/{p-b95c1e00.entry.js → p-e204efea.entry.js} +1 -1
  89. package/dist/webcomponents/{p-7e6c9362.entry.js → p-e70602bd.entry.js} +1 -1
  90. package/dist/webcomponents/{p-ab0f9e11.entry.js → p-e751e2c3.entry.js} +1 -1
  91. package/dist/webcomponents/{p-d34b09b2.entry.js → p-f7522364.entry.js} +1 -1
  92. package/dist/webcomponents/{p-CXLV6LjG.js → p-x7WGc-xR.js} +1 -1
  93. package/dist/webcomponents/webcomponents.esm.js +1 -1
  94. package/package.json +1 -1
  95. package/dist/webcomponents/p-56ad08cf.entry.js +0 -1
  96. package/dist/webcomponents/p-BW1eeDYQ.js +0 -1
  97. package/dist/webcomponents/p-acca580a.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{h as i,r as s,c as t}from"./p-CV0Pyo1O.js";import{a9 as e,a8 as r,a3 as l,t as o}from"./p-D50Rx76J.js";import{S as d}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{c as n}from"./p-DELK4IgY.js";import{J as a}from"./p-CXLV6LjG.js";import{m as h,C as c,l as v,d as u,a as p}from"./p-g6a7Gl9y.js";import{B as m}from"./p-lFx33NDk.js";import{B as f}from"./p-BcNb9bVO.js";import{m as w}from"./p-CASlE7cE.js";import{S as x}from"./p-BrO0HEFJ.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import"./p-CLHwhyvu.js";import"./p-BH0Xfn-F.js";import{g,a as y}from"./p-C-Uj-u5r.js";import{T as j}from"./p-DtDYtwHR.js";import{l as b}from"./p-CTwm3w6I.js";import"./p-BW1eeDYQ.js";import"./p-CEnTtUmd.js";import"./p-D8GTwl9v.js";const C=()=>i("div",{class:"row gap-3"},i("div",{class:"col-12"},i(x,{width:"25%"})),i("div",{class:"col-12"},i(x,{width:"100%"})),i("div",{class:"col-12 d-flex gap-3"},i(x,{width:"50%"}),i(x,{width:"50%"})),i("div",{class:"col-12 d-flex gap-3"},i(x,{width:"65%"}),i(x,{width:"35%"}))),S=()=>i("div",{class:"row gap-5"},i("div",{class:"col-12"},i(x,{width:"40%",height:"40px"})),i(C,null)),k=()=>i("div",{class:"terminal-selector-skeleton mt-4 rounded shadow-sm"},i("div",{class:"d-flex align-items-center gap-3"},i(x,{width:"125px",height:"125px",styles:{borderRadius:"8px"}}),i("div",{class:"flex-grow-1"},i("div",{class:"d-flex row flex-row"},i("div",{class:"col-6 flex-column"},i(x,null),i(x,{width:"60%"})),i("div",{class:"d-flex justify-content-end align-items-center gap-2 col-6"},i(x,{width:"32px",height:"32px",styles:{borderRadius:"50%"}}),i(x,{width:"80px",height:"32px"}),i(x,{width:"32px",height:"32px",styles:{borderRadius:"50%"}}))),i("div",{class:"mt-4"},i("div",{class:"d-flex flex-column gap-2"},i(x,null),i(x,null)))))),E=class{constructor(i){s(this,i),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 i;null===(i=this.analytics)||void 0===i||i.cleanup()}handleError(i,s,t){this.error={message:i,code:s,severity:t},this.errorEvent.emit({errorCode:s,message:i,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:i})=>{this.business=new f(i),this.loading.business=!1},onError:({error:i,code:s,severity:t})=>{this.handleError(i,s,t),this.loading.business=!1}})}initializeGetTerminalModels(){(({id:i,authToken:s,service:t})=>async({onSuccess:e,onError:r})=>{var l,o,d,n;try{const a=await t.fetchTerminalModels(i,s);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===(o=null===(l=a.data)||void 0===l?void 0:l.terminal_order_models)||void 0===o?void 0:o.map((i=>new h(i))))||[],orderLimit:null===(d=a.data)||void 0===d?void 0:d.order_limit})}catch(i){const s=g(null==i?void 0:i.code);return r({error:i.message||i,code:s,severity:c.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new j})({onSuccess:({terminals:i,orderLimit:s})=>{this.terminalModels=i,this.orderLimit=s,this.loading.terminals=!1},onError:({error:i,code:s,severity:t})=>{this.handleError(i,s,t),this.loading.terminals=!1}})}submitOrder(){const i=(({authToken:i,service:s,apiOrigin:t="https://wc-proxy.justifi.ai"})=>async({terminalOrder:e,onSuccess:r,onError:l})=>{var o;try{const d=await s.orderTerminals(i,e,t);if(d.error)return l({error:y(d.error),code:g(null===(o=d.error)||void 0===o?void 0:o.code),severity:c.ERROR});{const{data:i}=d;r({data:i})}}catch(i){const s=g(null==i?void 0:i.code);return l({error:i.message||i,code:s,severity:c.ERROR})}})({authToken:this.authToken,service:new j});this.submitting=!0,i({terminalOrder:this.order.payload,onSuccess:({data:i})=>{this.submitted.emit(i),this.submitting=!1},onError:({error:i,code:s,severity:t})=>{this.handleError(i,s,t),this.submitting=!1}})}onSelectedQuantityChange(i){this.order.updateTerminal(i.detail.modelName,i.detail.quantity),this.totalQuantity=this.order.totalQuantity}renderLoading(){return i("div",null,this.loading.business&&i(S,null),this.loading.terminals&&i("div",{class:"mt-5"},i(k,null),i(k,null),i(k,null)))}renderBusinessDetails(){var s,t,l,o,d,n,a,h;if(!this.loading.business&&this.business)return i("div",{class:"d-flex flex-column gap-4 mb-5 pt-5"},i("div",{class:"row"},i("div",{class:"col-12"},i("h2",{part:r},this.business.legal_name))),i("div",{class:"row"},i("div",{class:"col-6"},i("h5",{part:e},"Representative:"),i("div",null,i("div",null,null===(t=null===(s=this.business)||void 0===s?void 0:s.representative)||void 0===t?void 0:t.name),i("div",null,null===(o=null===(l=this.business)||void 0===l?void 0:l.representative)||void 0===o?void 0:o.title),i("div",null,null===(n=null===(d=this.business)||void 0===d?void 0:d.representative)||void 0===n?void 0:n.email),i("div",null,b(null===(h=null===(a=this.business)||void 0===a?void 0:a.representative)||void 0===h?void 0:h.phone)))),i("div",{class:"col-6"},i("h5",{part:e},this.shipping?"Shipping Address:":"Business Address:"),i("div",null,this.business.legal_address.line1,this.business.legal_address.line2?`, ${this.business.legal_address.line2}`:"",i("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 i("div",{class:"d-flex flex-column gap-2 mt-5"},this.terminalModels.map((s=>i("terminal-quantity-selector",{modelName:s.model_name,description:s.description,imageUrl:s.image_url,helpUrl:s.help_url,limit:this.orderLimit-this.order.totalQuantity,onSelectedQuantityChange:this.onSelectedQuantityChange.bind(this)}))))}renderOrderSection(){return i("div",{class:"mt-3"},i("div",{class:"text-end"},"Order limit: ",this.orderLimit),i("div",{class:"d-flex justify-content-end mt-3"},i("button",{class:"btn btn-primary submit-btn",onClick:this.submitOrder.bind(this),disabled:0===this.order.totalQuantity||this.submitting,part:l},this.submitting?"Submitting...":this.submitButtonText)))}render(){return i(d,{key:"383551442ee3c73ff4df3ffcca06f9c98519ee1a"},i("div",{key:"acc977cf9e43949c0c33c25ee9a4d449c5ece404",part:o},this.renderLoading(),this.renderBusinessDetails(),this.renderTerminals(),this.renderOrderSection()))}};export{E as justifi_order_terminals}
@@ -1 +0,0 @@
1
- var e={name:"@justifi/webcomponents",version:"6.12.1-rc.1"};export{e as p}
@@ -1 +0,0 @@
1
- import{h as s,r as t,c as i}from"./p-CV0Pyo1O.js";import{J as e}from"./p-CXLV6LjG.js";import{C as r,a as o}from"./p-g6a7Gl9y.js";import{m as n,b as h}from"./p-B2OPgLr1.js";import{B as a}from"./p-lFx33NDk.js";import{A as p}from"./p-CEnTtUmd.js";import"./p-CLHwhyvu.js";import{C as m,B as l,c as d}from"./p-BcNb9bVO.js";import"./p-BH0Xfn-F.js";import{c as u}from"./p-DELK4IgY.js";import{j as c}from"./p-CTwm3w6I.js";import{t as v}from"./p-D50Rx76J.js";import{S as f}from"./p-BqNNwq6C.js";import{H as g}from"./p-DB_pqjwH.js";import"./p-CZfYo5-1.js";import{B as y}from"./p-XYgDHrVL.js";import{P as j}from"./p-CbM9cuX_.js";import"./p-BW1eeDYQ.js";import"./p-C-Uj-u5r.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";import"./p-BrO0HEFJ.js";const b=p();class w{async postProvisioning(s,t,i){return b.post({endpoint:"entities/provisioning",body:{business_id:t,product_category:i},authToken:s})}}const C=()=>s("div",{class:"row gap-3 p-5"},s("div",{class:"col-12"},s(g,{text:"Business Already Provisioned"})),s("div",{class:"col-12",part:v},s("p",null,"We have already received the onboarding information for this business."))),k=()=>s("div",{class:"row gap-3 p5"},s("div",{class:"col-12"},s(g,{text:"You're all set for now"})),s("div",{class:"col-12",part:v},s("p",null,"We're reviewing your information and working on your approval. We'll be in touch to let you know once you've been approved (or if we find anything that needs fixing). Have a good one!"))),B=class{constructor(s){t(this,s),this.clickEvent=i(this,"click-event",7),this.errorEvent=i(this,"error-event",7),this.submitEvent=i(this,"submit-event",7),this.loading=!1,this.businessLoading=!0,this.businessProvisioned=!1,this.formSubmitted=!1,this.currentStep=0,this.country=m.USA,this.allowOptionalFields=!1,this.formTitle="Business Information",this.refs=[],this.setBusinessProvisioned=()=>new Promise((s=>{this.getBusiness({onSuccess:t=>{const i=new l(t.data);this.businessProvisioned=d(i),this.country=i.country_of_establishment,this.businessProvisioned&&this.errorEvent.emit({message:"A request to provision payments for this business has already been submitted.",errorCode:o.PROVISIONING_REQUESTED,severity:r.INFO}),this.businessLoading=!1,s()},onError:({error:t,code:i,severity:e})=>{this.errorEvent.emit({message:t,errorCode:i,severity:e}),this.businessLoading=!1,s()}})})),this.postProvisioningData=()=>{this.postProvisioning({onSuccess:s=>{this.formSubmitted=!0,this.submitEvent.emit({response:s})},onError:({error:s,code:t,severity:i})=>{this.submitEvent.emit({response:{error:s}}),this.errorEvent.emit({message:s,errorCode:t,severity:i})}})},this.incrementSteps=()=>{if(this.currentStep<this.totalSteps)return this.currentStep++},this.decrementSteps=()=>this.currentStep--,this.previousStepButtonOnClick=()=>{this.clickEvent.emit({name:y.previousStep}),this.decrementSteps()},this.nextStepButtonOnClick=(s,t)=>{s.preventDefault(),this.clickEvent.emit({name:t}),this.refs[this.currentStep].validateAndSubmit({onSuccess:this.incrementSteps})}}propChanged(){this.initializeApi()}handleFormCompleted(){this.postProvisioningData()}handleFormLoading(s){this.loading=s.detail}async componentWillLoad(){u(),this.analytics=new e(this),this.initializeApi(),this.getBusiness?await this.setBusinessProvisioned():this.businessLoading=!1,this.refs=new Array(7)}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeApi(){this.authToken&&this.businessId?c(this.authToken)?this.errorEvent.emit({message:"auth-token is expired",errorCode:o.NOT_AUTHENTICATED,severity:r.ERROR}):(this.getBusiness=n({authToken:this.authToken,businessId:this.businessId,service:new a}),this.postProvisioning=h({authToken:this.authToken,businessId:this.businessId,product:"payment",service:new w})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:o.MISSING_PROPS,severity:r.ERROR})}get formDisabled(){return this.loading||this.businessProvisioned}get totalSteps(){return this.refs.length-1}get stepCounter(){return`Step ${this.currentStep+1} of ${this.totalSteps+1}`}render(){return s(f,null,this.businessLoading?s(j,null):this.businessProvisioned?s(C,null):this.formSubmitted?s(k,null):s("div",{class:"row gap-3"},s(g,{text:this.formTitle}),s("payment-provisioning-form-steps",{businessId:this.businessId,authToken:this.authToken,refs:this.refs,currentStep:this.currentStep,allowOptionalFields:this.allowOptionalFields,country:this.country,handleFormLoading:this.handleFormLoading}),s("div",{class:"d-flex justify-content-between align-items-center"},s("div",{class:"d-flex align-items-center",part:v},this.stepCounter),s("payment-provisioning-form-buttons",{currentStep:this.currentStep,totalSteps:this.totalSteps,formLoading:this.loading,formDisabled:this.formDisabled,previousStepButtonOnClick:this.previousStepButtonOnClick,nextStepButtonOnClick:this.nextStepButtonOnClick}))))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}};export{B as justifi_payment_provisioning}