@justifi/webcomponents 6.4.1 → 6.4.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 (92) hide show
  1. package/dist/cjs/{check-pkg-version-BVyea38i.js → check-pkg-version-goSFbVFL.js} +1 -1
  2. package/dist/cjs/hidden-input_2.cjs.entry.js +1 -1
  3. package/dist/cjs/internal-tokenize-payment-method_7.cjs.entry.js +2 -2
  4. package/dist/cjs/justifi-apple-pay_7.cjs.entry.js +2 -2
  5. package/dist/cjs/justifi-business-details.cjs.entry.js +2 -2
  6. package/dist/cjs/justifi-business-form.cjs.entry.js +2 -2
  7. package/dist/cjs/justifi-checkout.cjs.entry.js +2 -2
  8. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +2 -2
  9. package/dist/cjs/justifi-dispute-management.cjs.entry.js +2 -2
  10. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +2 -2
  11. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +2 -2
  12. package/dist/cjs/justifi-order-terminals.cjs.entry.js +2 -2
  13. package/dist/cjs/justifi-payment-details.cjs.entry.js +2 -2
  14. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +2 -2
  15. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +2 -2
  16. package/dist/cjs/justifi-payments-list.cjs.entry.js +2 -2
  17. package/dist/cjs/justifi-payout-details.cjs.entry.js +2 -2
  18. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +2 -2
  19. package/dist/cjs/justifi-payouts-list.cjs.entry.js +2 -2
  20. package/dist/cjs/justifi-refund-payment.cjs.entry.js +2 -2
  21. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +2 -2
  22. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +2 -2
  23. package/dist/cjs/justifi-terminals-list.cjs.entry.js +2 -2
  24. package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +10 -1
  25. package/dist/cjs/loader.cjs.js +1 -1
  26. package/dist/cjs/{package-keJMf4WX.js → package-jZDXnKmY.js} +1 -1
  27. package/dist/cjs/webcomponents.cjs.js +1 -1
  28. package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +91 -1
  29. package/dist/docs.json +116 -2
  30. package/dist/esm/{check-pkg-version-BZb5Z6DW.js → check-pkg-version-CPDwCVPS.js} +1 -1
  31. package/dist/esm/hidden-input_2.entry.js +1 -1
  32. package/dist/esm/internal-tokenize-payment-method_7.entry.js +2 -2
  33. package/dist/esm/justifi-apple-pay_7.entry.js +2 -2
  34. package/dist/esm/justifi-business-details.entry.js +2 -2
  35. package/dist/esm/justifi-business-form.entry.js +2 -2
  36. package/dist/esm/justifi-checkout.entry.js +2 -2
  37. package/dist/esm/justifi-checkouts-list.entry.js +2 -2
  38. package/dist/esm/justifi-dispute-management.entry.js +2 -2
  39. package/dist/esm/justifi-dispute-notification_3.entry.js +2 -2
  40. package/dist/esm/justifi-gross-payment-chart.entry.js +2 -2
  41. package/dist/esm/justifi-order-terminals.entry.js +2 -2
  42. package/dist/esm/justifi-payment-details.entry.js +2 -2
  43. package/dist/esm/justifi-payment-provisioning.entry.js +2 -2
  44. package/dist/esm/justifi-payment-transactions-list.entry.js +2 -2
  45. package/dist/esm/justifi-payments-list.entry.js +2 -2
  46. package/dist/esm/justifi-payout-details.entry.js +2 -2
  47. package/dist/esm/justifi-payout-transactions-list.entry.js +2 -2
  48. package/dist/esm/justifi-payouts-list.entry.js +2 -2
  49. package/dist/esm/justifi-refund-payment.entry.js +2 -2
  50. package/dist/esm/justifi-season-interruption-insurance.entry.js +2 -2
  51. package/dist/esm/justifi-terminal-orders-list.entry.js +2 -2
  52. package/dist/esm/justifi-terminals-list.entry.js +2 -2
  53. package/dist/esm/justifi-tokenize-payment-method.entry.js +10 -1
  54. package/dist/esm/loader.js +1 -1
  55. package/dist/esm/{package-C19Xk7z3.js → package-B3SPy-II.js} +1 -1
  56. package/dist/esm/webcomponents.js +1 -1
  57. package/dist/module/justifi-tokenize-payment-method.js +14 -2
  58. package/dist/module/package.js +1 -1
  59. package/dist/types/components/tokenize-payment-method/tokenize-payment-method.d.ts +6 -0
  60. package/dist/types/components.d.ts +5 -2
  61. package/dist/webcomponents/p-0082f428.entry.js +1 -0
  62. package/dist/webcomponents/{p-95593721.entry.js → p-01c9c76c.entry.js} +1 -1
  63. package/dist/webcomponents/{p-37a55eaf.entry.js → p-0389ea61.entry.js} +1 -1
  64. package/dist/webcomponents/{p-d182f489.entry.js → p-05351f0d.entry.js} +1 -1
  65. package/dist/webcomponents/{p-54facfdc.entry.js → p-07e85954.entry.js} +1 -1
  66. package/dist/webcomponents/{p-5464b902.entry.js → p-1b94c32d.entry.js} +1 -1
  67. package/dist/webcomponents/{p-6b6003d2.entry.js → p-24c22851.entry.js} +1 -1
  68. package/dist/webcomponents/p-4488378e.entry.js +1 -0
  69. package/dist/webcomponents/{p-1eae32ac.entry.js → p-44e021e3.entry.js} +1 -1
  70. package/dist/webcomponents/p-4ed1fc3b.entry.js +1 -0
  71. package/dist/webcomponents/{p-5f81a3d6.entry.js → p-6550b836.entry.js} +1 -1
  72. package/dist/webcomponents/{p-87a2a830.entry.js → p-6d06ea25.entry.js} +1 -1
  73. package/dist/webcomponents/{p-fda2d53b.entry.js → p-8bfd15af.entry.js} +1 -1
  74. package/dist/webcomponents/p-B3SPy-II.js +1 -0
  75. package/dist/webcomponents/{p-DV4RaYYL.js → p-BiizzRhw.js} +1 -1
  76. package/dist/webcomponents/p-a793d1bd.entry.js +1 -0
  77. package/dist/webcomponents/{p-00e0a745.entry.js → p-ad8b9fba.entry.js} +1 -1
  78. package/dist/webcomponents/{p-d86b8ce7.entry.js → p-ae62e01d.entry.js} +1 -1
  79. package/dist/webcomponents/{p-c31fe838.entry.js → p-b3e0c981.entry.js} +1 -1
  80. package/dist/webcomponents/{p-5d1fb433.entry.js → p-bd10429d.entry.js} +1 -1
  81. package/dist/webcomponents/{p-dfe68bf0.entry.js → p-d2bb462e.entry.js} +1 -1
  82. package/dist/webcomponents/{p-c0198eef.entry.js → p-d3e4697f.entry.js} +1 -1
  83. package/dist/webcomponents/{p-696a5c8e.entry.js → p-d89c166f.entry.js} +1 -1
  84. package/dist/webcomponents/{p-2cd5733e.entry.js → p-e3f6c3c4.entry.js} +1 -1
  85. package/dist/webcomponents/{p-a6e37d4a.entry.js → p-ebb73921.entry.js} +1 -1
  86. package/dist/webcomponents/webcomponents.esm.js +1 -1
  87. package/package.json +1 -1
  88. package/dist/webcomponents/p-40d3a480.entry.js +0 -1
  89. package/dist/webcomponents/p-56a8e07d.entry.js +0 -1
  90. package/dist/webcomponents/p-C19Xk7z3.js +0 -1
  91. package/dist/webcomponents/p-b07470fa.entry.js +0 -1
  92. package/dist/webcomponents/p-b2f969a6.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{h as s,r as i,c as t}from"./p-DwYM91AU.js";import{ao as e,am as r,af as o,D as l}from"./p-wtuY7MT2.js";import{S as d}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{c as n,J as a}from"./p-DV4RaYYL.js";import{C as h,a as c}from"./p-Cjcsf8ku.js";import{B as u}from"./p-wYnnDDuR.js";import{B as v}from"./p-B5rtFhtR.js";import{m as p}from"./p-sCHf--Vc.js";import{S as m}from"./p-c7MCfTgE.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{j as f,i as w,b as g}from"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import"./p-BH0Xfn-F.js";import{g as x,a as y}from"./p-D2muobcE.js";import{T as j}from"./p-ZrJKEEoy.js";import{k as b}from"./p-BS7OgSQe.js";import"./p-C19Xk7z3.js";import"./p-C8yN3uBj.js";import"./p-BYsgavgS.js";const S=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(m,{width:"25%"})),s("div",{class:"col-12"},s(m,{width:"100%"})),s("div",{class:"col-12 d-flex gap-3"},s(m,{width:"50%"}),s(m,{width:"50%"})),s("div",{class:"col-12 d-flex gap-3"},s(m,{width:"65%"}),s(m,{width:"35%"}))),k=()=>s("div",{class:"row gap-5"},s("div",{class:"col-12"},s(m,{width:"40%",height:"40px"})),s(S,null)),C=()=>s("div",{class:"terminal-selector-skeleton mt-4 rounded shadow-sm"},s("div",{class:"d-flex align-items-center gap-3"},s(m,{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(m,null),s(m,{width:"60%"})),s("div",{class:"d-flex justify-content-end align-items-center gap-2 col-6"},s(m,{width:"32px",height:"32px",styles:{borderRadius:"50%"}}),s(m,{width:"80px",height:"32px"}),s(m,{width:"32px",height:"32px",styles:{borderRadius:"50%"}}))),s("div",{class:"mt-4"},s("div",{class:"d-flex flex-column gap-2"},s(m,null),s(m,null)))))),B=class{constructor(s){i(this,s),this.errorEvent=t(this,"error-event"),this.submitted=t(this,"submit-event"),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 w({business_id:this.businessId,sub_account_id:this.accountId,order_type:this.shipping?g.boardingShipping:g.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",c.MISSING_PROPS,h.ERROR)}initializeGetBusiness(){p({id:this.businessId,authToken:this.authToken,service:new u})({onSuccess:({business:s})=>{this.business=new v(s),this.loading.business=!1},onError:({error:s,code:i,severity:t})=>{this.handleError(s,i,t),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:x(null===(n=a.error)||void 0===n?void 0:n.code),severity:h.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 f(s))))||[],orderLimit:null===(d=a.data)||void 0===d?void 0:d.order_limit})}catch(s){const i=x(null==s?void 0:s.code);return r({error:s.message||s,code:i,severity:h.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new j})({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:x(null===(l=d.error)||void 0===l?void 0:l.code),severity:h.ERROR});{const{data:s}=d;r({data:s})}}catch(s){const i=x(null==s?void 0:s.code);return o({error:s.message||s,code:i,severity:h.ERROR})}})({authToken:this.authToken,service:new j});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(k,null),this.loading.terminals&&s("div",{class:"mt-5"},s(C,null),s(C,null),s(C,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,b(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:"f9c515ea3cf3dd616d894cef2cc64789663608e8"},s("div",{key:"6b3d49555fe21563c251896300d313bed336f9fd",part:l},this.renderLoading(),this.renderBusinessDetails(),this.renderTerminals(),this.renderOrderSection()))}};export{B as justifi_order_terminals}
@@ -1 +0,0 @@
1
- var e={name:"@justifi/webcomponents",version:"6.4.1"};export{e as p}
@@ -1 +0,0 @@
1
- import{h as s,r as t,c as i}from"./p-DwYM91AU.js";import{c as e,F as r}from"./p-DiJD6Iqx.js";import{b as o,a,c as h}from"./p-dgG_o6wN.js";import{i as n,a as p,b as l,c as m}from"./p-D1WQG4I7.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as c,a as d}from"./p-Cjcsf8ku.js";import"./p-CPKSE7M4.js";import"./p-CLHwhyvu.js";import{C as u,B as j,b as f}from"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{c as v,J as b}from"./p-DV4RaYYL.js";import{B as g}from"./p-Bqlcv3ZV.js";import{S as w}from"./p-BP2sTIQV.js";import{H as C}from"./p-zNSPsvs3.js";import"./p-CZfYo5-1.js";import{S as y}from"./p-c7MCfTgE.js";import{B as S}from"./p-XYgDHrVL.js";import{m as B,b as x}from"./p-5aA7gjr5.js";import{B as D}from"./p-wYnnDDuR.js";import"./p-BFTU3MAI.js";import"./p-avgjSJ1d.js";import"./p-DfKxeSrC.js";import"./p-CPpUGsw5.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-C19Xk7z3.js";import"./p-C8yN3uBj.js";import"./p-wtuY7MT2.js";import"./p-D2muobcE.js";const Y=e(Object.assign(Object.assign({},o().fields),{legal_address:p(),additional_questions:a(),representative:n("representative")}));e(Object.assign(Object.assign({},h().fields),{legal_address:m(),additional_questions:a(),representative:l("representative")}));const k=Y,O=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(y,{width:"25%"})),s("div",{class:"col-12"},s(y,{width:"100%"})),s("div",{class:"col-12 d-flex gap-3"},s(y,{width:"50%"}),s(y,{width:"50%"})),s("div",{class:"col-12 d-flex gap-3"},s(y,{width:"65%"}),s(y,{width:"35%"}))),I=()=>s("div",{class:"row gap-5"},s("div",{class:"col-12"},s(y,{width:"40%",height:"40px"})),s(O,null),s(O,null),s(O,null)),_=class{constructor(s){t(this,s),this.submitEvent=i(this,"submit-event"),this.clickEvent=i(this,"click-event"),this.errorEvent=i(this,"error-event"),this.isLoading=!1,this.isSaving=!1,this.country=u.USA,this.hideErrors=!1,this.formTitle="Business Information",this.removeTitle=!1,this.instantiateBusiness=s=>{const t=new j(s);this.country=t.country_of_establishment,this.formController.setInitialValues(Object.assign({},t))},this.sendData=async()=>{this.isSaving=!0;const s=this.formController.values.getValue(),t=this.formController.getInitialValues(),i=new j(Object.assign(Object.assign({},t),s)).payload;this.patchBusiness({payload:i,onSuccess:s=>{this.handleReponse(s)},onError:({error:s,code:t,severity:i})=>{this.errorMessage=s.message,this.errorEvent.emit({errorCode:t,message:s.message,severity:i})},final:()=>{this.isSaving=!1}})},this.validateAndSubmit=s=>{s.preventDefault(),this.formController.validateAndSubmit(this.sendData)}}componentWillLoad(){v(),this.analytics=new b(this),this.formController=new r(k),this.initializeApi()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}get title(){return this.removeTitle?"":this.formTitle}get disabledState(){return this.isSaving}get businessEndpoint(){return`entities/business/${this.businessId}`}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=B({authToken:this.authToken,businessId:this.businessId,service:new D}),this.patchBusiness=x({authToken:this.authToken,businessId:this.businessId,service:new D}),this.getBusiness({onSuccess:s=>{this.instantiateBusiness(s.data)},onError:({error:s,code:t,severity:i})=>{this.errorMessage=s.message,this.errorEvent.emit({errorCode:t,message:s.message,severity:i})},final:()=>{this.isLoading=!1}})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:d.MISSING_PROPS,severity:c.ERROR})}handleReponse(s){s.error&&(this.errorMessage=f.patchData),this.submitEvent.emit({response:s}),this.instantiateBusiness(s.data)}render(){return s(w,null,this.isLoading?s(I,null):s("form",{onSubmit:this.validateAndSubmit},s("div",{class:"row gap-3"},s(C,{text:this.title}),s("form-alert",{text:this.errorMessage,hideAlert:this.hideErrors}),s("div",{class:"col-12 mb-4"},s("justifi-business-core-info",{formController:this.formController,country:this.country})),s("div",{class:"col-12 mb-4"},s("justifi-legal-address-form",{formController:this.formController,country:this.country})),s("div",{class:"col-12 mb-4"},s("justifi-additional-questions",{formController:this.formController})),s("div",{class:"col-12 mb-4"},s("justifi-business-representative",{formController:this.formController,country:this.country})),s("div",{class:"col-12 d-flex flex-row-reverse"},s(g,{type:"submit",disabled:this.disabledState,variant:"primary",onClick:()=>this.clickEvent.emit({name:S.submit}),isLoading:this.isSaving},"Submit")))))}};export{_ as justifi_business_form}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as i}from"./p-DwYM91AU.js";import{P as e}from"./p-C9_8N76_.js";import{m as r}from"./p-Do561C8g.js";import{E as o}from"./p-BNqo3kt0.js";import{C as p,a}from"./p-Cjcsf8ku.js";import{c as h,J as n}from"./p-DV4RaYYL.js";import"./p-C8yN3uBj.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-HXpYMWUU.js";import"./p-CPKSE7M4.js";import"./p-BH0Xfn-F.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-D2muobcE.js";import"./p-wtuY7MT2.js";import"./p-C19Xk7z3.js";const m=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.recordClickEvent=s(this,"record-click-event"),this.errorMessage=null,this.paymentService=new e,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.handleRecordClickEvent=t=>{this.recordClickEvent.emit({id:t.detail.id,type:t.detail.type})}}componentWillLoad(){h(),this.analytics=new n(this),this.initializeGetPaymentDetails()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetPaymentDetails()}initializeGetPaymentDetails(){this.paymentId&&this.authToken?this.getPaymentDetails=r({id:this.paymentId,authToken:this.authToken,service:new e}):(this.errorMessage="Payment ID and Auth Token are required",this.errorEvent.emit({message:this.errorMessage,errorCode:a.MISSING_PROPS,severity:p.ERROR}))}render(){return this.errorMessage?o(this.errorMessage):i("payment-details-core",{getPaymentDetails:this.getPaymentDetails,"onError-event":this.handleErrorEvent,"onRecord-click-event":this.handleRecordClickEvent,"enable-record-click":"true"})}static get watchers(){return{paymentId:["propChanged"],authToken:["propChanged"]}}};export{m as justifi_payment_details}