@justifi/webcomponents 6.13.3 → 6.13.4-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.
Files changed (197) hide show
  1. package/dist/cjs/{Analytics-DusgFP9U.js → Analytics-HPx5iT8j.js} +2 -2
  2. package/dist/cjs/{Api-BioDE5he.js → Api-DiVnyVMc.js} +19 -3
  3. package/dist/cjs/additional-questions-form-step_15.cjs.entry.js +4 -4
  4. package/dist/cjs/bank-account-form.cjs.entry.js +2 -2
  5. package/dist/cjs/{business.service-DOGeb2O6.js → business.service-xyk3nSbS.js} +1 -1
  6. package/dist/cjs/card-form.cjs.entry.js +2 -2
  7. package/dist/cjs/{check-pkg-version-DD7fjCqn.js → check-pkg-version-Cl4hjRLt.js} +1 -1
  8. package/dist/cjs/{checkout.service-Bdr5qUHj.js → checkout.service-BvQmucoL.js} +1 -1
  9. package/dist/cjs/dispute-notification_2.cjs.entry.js +5 -5
  10. package/dist/cjs/{event-types-DWDQKDv4.js → event-types-Dzra0qB3.js} +1 -1
  11. package/dist/cjs/{get-subaccounts-Dgl7ECtg.js → get-subaccounts-h69ubhBi.js} +1 -1
  12. package/dist/cjs/hidden-input_2.cjs.entry.js +1 -1
  13. package/dist/cjs/justifi-apple-pay_11.cjs.entry.js +11 -6
  14. package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +4 -4
  15. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +4 -4
  16. package/dist/cjs/justifi-business-details.cjs.entry.js +5 -5
  17. package/dist/cjs/justifi-business-form.cjs.entry.js +6 -6
  18. package/dist/cjs/justifi-card-form.cjs.entry.js +4 -4
  19. package/dist/cjs/justifi-checkout-qr-code.cjs.entry.js +4 -4
  20. package/dist/cjs/justifi-checkout.cjs.entry.js +4 -4
  21. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +6 -6
  22. package/dist/cjs/justifi-dispute-management.cjs.entry.js +5 -5
  23. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +4 -4
  24. package/dist/cjs/justifi-order-terminals.cjs.entry.js +6 -6
  25. package/dist/cjs/justifi-payment-details.cjs.entry.js +5 -5
  26. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +15 -6
  27. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +5 -5
  28. package/dist/cjs/justifi-payments-list.cjs.entry.js +5 -5
  29. package/dist/cjs/justifi-payout-details.cjs.entry.js +5 -5
  30. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +5 -5
  31. package/dist/cjs/justifi-payouts-list.cjs.entry.js +6 -6
  32. package/dist/cjs/justifi-qr-terminal.cjs.entry.js +5 -5
  33. package/dist/cjs/justifi-refund-payment.cjs.entry.js +5 -5
  34. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +4 -4
  35. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +4 -4
  36. package/dist/cjs/justifi-terminals-list.cjs.entry.js +6 -6
  37. package/dist/cjs/loader.cjs.js +1 -1
  38. package/dist/cjs/{package-DeCbZvnG.js → package-12FrJVUb.js} +1 -1
  39. package/dist/cjs/{payment-provisioning-actions-B4x7lnyF.js → payment-provisioning-actions-DwgI9weK.js} +5 -4
  40. package/dist/cjs/{payment.service-a5EL3s2d.js → payment.service-BdK_wsu2.js} +1 -1
  41. package/dist/cjs/{payout.service-BJtGBHsQ.js → payout.service-CVSqMmCW.js} +1 -1
  42. package/dist/cjs/{plaid.service-DpiLY-5D.js → plaid.service-Dj-AZOjk.js} +1 -1
  43. package/dist/cjs/{terminal.service-DN2A-bNx.js → terminal.service-Dzukw0o7.js} +1 -1
  44. package/dist/cjs/webcomponents.cjs.js +1 -1
  45. package/dist/collection/api/Api.js +19 -3
  46. package/dist/collection/components/business-forms/payment-provisioning/justifi-payment-provisioning.js +7 -0
  47. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-actions.js +5 -4
  48. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-submission-failed.js +6 -0
  49. package/dist/collection/components/modular-checkout/sub-components/justifi-google-pay.js +25 -0
  50. package/dist/docs.json +30 -1
  51. package/dist/esm/{Analytics-CtVZmAya.js → Analytics-HXE2X5RU.js} +3 -3
  52. package/dist/esm/{Api-DjAL73GZ.js → Api-CTkszAxp.js} +20 -4
  53. package/dist/esm/{Plaid-C8qoMZLV.js → Plaid-XJ1Wi_Qy.js} +1 -1
  54. package/dist/esm/additional-questions-details_5.entry.js +1 -1
  55. package/dist/esm/additional-questions-form-step_15.entry.js +7 -7
  56. package/dist/esm/bank-account-document-form-inputs.entry.js +2 -2
  57. package/dist/esm/bank-account-form.entry.js +3 -3
  58. package/dist/esm/{business.service-BGXqAyxu.js → business.service-CJrHGJHW.js} +2 -2
  59. package/dist/esm/card-form.entry.js +3 -3
  60. package/dist/esm/{check-pkg-version-DcFIDA70.js → check-pkg-version-joJTtrkx.js} +1 -1
  61. package/dist/esm/{checkout-actions-D8JS2l5e.js → checkout-actions-CheVrS18.js} +2 -2
  62. package/dist/esm/{checkout.service-sHKaW-M0.js → checkout.service-fPRUtr9H.js} +2 -2
  63. package/dist/esm/dispute-notification_2.entry.js +8 -8
  64. package/dist/esm/{event-types-ynZLear3.js → event-types-BtWMbtaC.js} +2 -2
  65. package/dist/esm/form-control-monetary.entry.js +1 -1
  66. package/dist/esm/{get-business-DAv_b3vf.js → get-business-DTNQJoh_.js} +2 -2
  67. package/dist/esm/{get-payment-details-Bipad3jX.js → get-payment-details-CSX5fwOG.js} +2 -2
  68. package/dist/esm/{get-subaccounts-FqCT2s3S.js → get-subaccounts-Cy2mYsaE.js} +3 -3
  69. package/dist/esm/hidden-input_2.entry.js +1 -1
  70. package/dist/esm/justifi-apple-pay_11.entry.js +15 -10
  71. package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +6 -6
  72. package/dist/esm/justifi-bank-account-form.entry.js +6 -6
  73. package/dist/esm/justifi-business-details.entry.js +9 -9
  74. package/dist/esm/justifi-business-form.entry.js +9 -9
  75. package/dist/esm/justifi-card-form.entry.js +6 -6
  76. package/dist/esm/justifi-checkout-qr-code.entry.js +6 -6
  77. package/dist/esm/justifi-checkout.entry.js +6 -6
  78. package/dist/esm/justifi-checkouts-list-filters.entry.js +2 -2
  79. package/dist/esm/justifi-checkouts-list.entry.js +9 -9
  80. package/dist/esm/justifi-dispute-management.entry.js +8 -8
  81. package/dist/esm/justifi-gross-payment-chart.entry.js +7 -7
  82. package/dist/esm/justifi-order-terminals.entry.js +10 -10
  83. package/dist/esm/justifi-payment-details.entry.js +9 -9
  84. package/dist/esm/justifi-payment-provisioning.entry.js +18 -9
  85. package/dist/esm/justifi-payment-transactions-list.entry.js +8 -8
  86. package/dist/esm/justifi-payments-list-filters.entry.js +1 -1
  87. package/dist/esm/justifi-payments-list.entry.js +8 -8
  88. package/dist/esm/justifi-payout-details.entry.js +9 -9
  89. package/dist/esm/justifi-payout-transactions-list.entry.js +8 -8
  90. package/dist/esm/justifi-payouts-list-filters.entry.js +2 -2
  91. package/dist/esm/justifi-payouts-list.entry.js +10 -10
  92. package/dist/esm/justifi-qr-terminal.entry.js +9 -9
  93. package/dist/esm/justifi-refund-payment.entry.js +9 -9
  94. package/dist/esm/justifi-season-interruption-insurance.entry.js +7 -7
  95. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +2 -2
  96. package/dist/esm/justifi-terminal-orders-list.entry.js +7 -7
  97. package/dist/esm/justifi-terminals-list-filters.entry.js +2 -2
  98. package/dist/esm/justifi-terminals-list.entry.js +9 -9
  99. package/dist/esm/loader.js +1 -1
  100. package/dist/esm/{package-Bx2_PW91.js → package-Bzbt5VX9.js} +1 -1
  101. package/dist/esm/{payment-provisioning-actions-DI3QUsjh.js → payment-provisioning-actions-DjjVhIsC.js} +7 -6
  102. package/dist/esm/{payment.service-wSNYSRyl.js → payment.service-DqqhXGIA.js} +2 -2
  103. package/dist/esm/{payout.service-CTAksNmD.js → payout.service-pXbxWGPO.js} +2 -2
  104. package/dist/esm/{payouts-status-CeZoirpf.js → payouts-status-Ch05ZKVP.js} +2 -2
  105. package/dist/esm/{plaid.service-5EpJEdwX.js → plaid.service-Bb_mVHR9.js} +2 -2
  106. package/dist/esm/{terminal.service-xjfU0mJT.js → terminal.service-AK9uBpcb.js} +2 -2
  107. package/dist/esm/{utils-myniydlM.js → utils-ByihSvdD.js} +1 -1
  108. package/dist/esm/{utils-CcA8Y5hs.js → utils-UkIEdf2x.js} +1 -1
  109. package/dist/esm/webcomponents.js +1 -1
  110. package/dist/module/Api.js +19 -3
  111. package/dist/module/justifi-google-pay2.js +6 -0
  112. package/dist/module/justifi-order-terminals.js +1 -1
  113. package/dist/module/justifi-payment-provisioning.js +11 -1
  114. package/dist/module/justifi-season-interruption-insurance.js +1 -1
  115. package/dist/module/justifi-terminals-list.js +1 -1
  116. package/dist/module/package.js +1 -1
  117. package/dist/module/payment-provisioning-actions.js +5 -4
  118. package/dist/module/utils2.js +1 -1
  119. package/dist/types/components/business-forms/payment-provisioning/justifi-payment-provisioning.d.ts +1 -0
  120. package/dist/types/components/business-forms/payment-provisioning/payment-provisioning-submission-failed.d.ts +1 -0
  121. package/dist/types/components/modular-checkout/sub-components/justifi-google-pay.d.ts +4 -0
  122. package/dist/types/components.d.ts +10 -0
  123. package/dist/webcomponents/{p-f4baf684.entry.js → p-0ff0e0d8.entry.js} +1 -1
  124. package/dist/webcomponents/{p-291b9a48.entry.js → p-1da4a104.entry.js} +1 -1
  125. package/dist/webcomponents/{p-7b6cf400.entry.js → p-36b16db2.entry.js} +1 -1
  126. package/dist/webcomponents/{p-dde22375.entry.js → p-39d2bad2.entry.js} +4 -4
  127. package/dist/webcomponents/{p-CfIGO7TJ.js → p-3EVeuNqR.js} +1 -1
  128. package/dist/webcomponents/{p-2a0ab07f.entry.js → p-579b40c1.entry.js} +1 -1
  129. package/dist/webcomponents/{p-98bbdf10.entry.js → p-57ca7af1.entry.js} +1 -1
  130. package/dist/webcomponents/{p-db17a828.entry.js → p-58550e43.entry.js} +1 -1
  131. package/dist/webcomponents/p-607d7841.entry.js +1 -0
  132. package/dist/webcomponents/{p-4383dfdc.entry.js → p-64b98974.entry.js} +1 -1
  133. package/dist/webcomponents/{p-c8bcc54f.entry.js → p-67da2742.entry.js} +1 -1
  134. package/dist/webcomponents/{p-4fab9314.entry.js → p-6d52cdd4.entry.js} +1 -1
  135. package/dist/webcomponents/{p-c6eea99e.entry.js → p-6edf887c.entry.js} +1 -1
  136. package/dist/webcomponents/{p-9d11aaf2.entry.js → p-73bb7d58.entry.js} +1 -1
  137. package/dist/webcomponents/{p-708aee06.entry.js → p-746097a2.entry.js} +1 -1
  138. package/dist/webcomponents/{p-4a30693b.entry.js → p-7776b52e.entry.js} +1 -1
  139. package/dist/webcomponents/{p-ebee139f.entry.js → p-7f5798e0.entry.js} +1 -1
  140. package/dist/webcomponents/{p-8fce7a9c.entry.js → p-87cc4aef.entry.js} +1 -1
  141. package/dist/webcomponents/{p-84b643f7.entry.js → p-93d65fae.entry.js} +1 -1
  142. package/dist/webcomponents/{p-f6d49f21.entry.js → p-9e63d60b.entry.js} +1 -1
  143. package/dist/webcomponents/{p-C7hX61pS.js → p-B7wfdVBf.js} +1 -1
  144. package/dist/webcomponents/{p-BSs-2JKu.js → p-BM88Upl5.js} +1 -1
  145. package/dist/webcomponents/p-BaZTheg9.js +1 -0
  146. package/dist/webcomponents/p-Bzbt5VX9.js +1 -0
  147. package/dist/webcomponents/p-CI-XifDo.js +1 -0
  148. package/dist/webcomponents/{p-CqOzVXGL.js → p-CL9rrHjP.js} +1 -1
  149. package/dist/webcomponents/p-CP0Y19co.js +1 -0
  150. package/dist/webcomponents/p-CWook735.js +1 -0
  151. package/dist/webcomponents/{p-DXTa04jn.js → p-Cl5FLD11.js} +1 -1
  152. package/dist/webcomponents/{p-zZn1OXja.js → p-CykiDks3.js} +1 -1
  153. package/dist/webcomponents/p-DGsgQXco.js +1 -0
  154. package/dist/webcomponents/{p-CO8ZGkfN.js → p-DItiYtAy.js} +1 -1
  155. package/dist/webcomponents/p-DWdj6UhE.js +1 -0
  156. package/dist/webcomponents/{p-CxBrydeX.js → p-D_MQLfzf.js} +1 -1
  157. package/dist/webcomponents/{p-R_0S69Pr.js → p-D_ULdupf.js} +1 -1
  158. package/dist/webcomponents/{p-CdwzNfP1.js → p-IFhZFB4v.js} +1 -1
  159. package/dist/webcomponents/p-UEdJ7AYc.js +1 -0
  160. package/dist/webcomponents/p-a0f2ab72.entry.js +1 -0
  161. package/dist/webcomponents/{p-f01fd4ff.entry.js → p-a30af70b.entry.js} +1 -1
  162. package/dist/webcomponents/{p-65908b5f.entry.js → p-a5443425.entry.js} +1 -1
  163. package/dist/webcomponents/p-b171711f.entry.js +1 -0
  164. package/dist/webcomponents/{p-8771e52a.entry.js → p-b2472d61.entry.js} +1 -1
  165. package/dist/webcomponents/p-b3da9fb0.entry.js +1 -0
  166. package/dist/webcomponents/{p-b89a5053.entry.js → p-b70b4904.entry.js} +1 -1
  167. package/dist/webcomponents/{p-e3f8541c.entry.js → p-b73bbc07.entry.js} +1 -1
  168. package/dist/webcomponents/p-baf0a483.entry.js +1 -0
  169. package/dist/webcomponents/p-c58dbd91.entry.js +1 -0
  170. package/dist/webcomponents/{p-7495aa96.entry.js → p-c64b73bb.entry.js} +1 -1
  171. package/dist/webcomponents/{p-a62ef857.entry.js → p-cc7a40b9.entry.js} +1 -1
  172. package/dist/webcomponents/p-cfb6d114.entry.js +1 -0
  173. package/dist/webcomponents/{p-67364f1d.entry.js → p-e033ced2.entry.js} +1 -1
  174. package/dist/webcomponents/{p-3918fb44.entry.js → p-e9ab82cf.entry.js} +1 -1
  175. package/dist/webcomponents/{p-dfe66300.entry.js → p-f16e4457.entry.js} +1 -1
  176. package/dist/webcomponents/{p-9c0760b9.entry.js → p-f805c9ac.entry.js} +1 -1
  177. package/dist/webcomponents/{p-1fced37f.entry.js → p-ff386db4.entry.js} +1 -1
  178. package/dist/webcomponents/{p-Cn7z5L7J.js → p-ph646MSj.js} +1 -1
  179. package/dist/webcomponents/{p-B62JX_Dh.js → p-rhS9V7qg.js} +1 -1
  180. package/dist/webcomponents/webcomponents.esm.js +1 -1
  181. package/package.json +14 -14
  182. package/LICENSE +0 -21
  183. package/dist/webcomponents/p-0b9263f3.entry.js +0 -1
  184. package/dist/webcomponents/p-17f8c3e7.entry.js +0 -1
  185. package/dist/webcomponents/p-2b64659a.entry.js +0 -1
  186. package/dist/webcomponents/p-2c798125.entry.js +0 -1
  187. package/dist/webcomponents/p-5ea486b6.entry.js +0 -1
  188. package/dist/webcomponents/p-6f71bf5f.entry.js +0 -1
  189. package/dist/webcomponents/p-BB8Ce9rp.js +0 -1
  190. package/dist/webcomponents/p-BUHsyQpA.js +0 -1
  191. package/dist/webcomponents/p-Bx2_PW91.js +0 -1
  192. package/dist/webcomponents/p-CPJC6tlj.js +0 -1
  193. package/dist/webcomponents/p-DP9ysr2K.js +0 -1
  194. package/dist/webcomponents/p-Da3fPDxu.js +0 -1
  195. package/dist/webcomponents/p-De4Pig-y.js +0 -1
  196. package/dist/webcomponents/p-NzPaWKbY.js +0 -1
  197. package/dist/webcomponents/p-e9494d8f.entry.js +0 -1
@@ -1 +1 @@
1
- import{h as t,r as e,c as i}from"./p-CV0Pyo1O.js";import{n as s,C as a,b as r}from"./p-DXTa04jn.js";import{J as n}from"./p-CfIGO7TJ.js";import{c as o}from"./p-CqOzVXGL.js";import{T as c}from"./p-CxBrydeX.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{p as h}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import{g as d,a as p}from"./p-CdwzNfP1.js";import{m,S as u}from"./p-BUHsyQpA.js";import{S as l}from"./p-DzEdYT8R.js";import{T as f,a as b,b as v,c as g,d as y,e as k,f as j,g as C,h as T,i as w,j as _,k as S,l as D}from"./p-BICxxa69.js";import{T as O}from"./p-CZfYo5-1.js";import{B as P,a as I}from"./p-CHw7tICr.js";import{a6 as x,a7 as A}from"./p-CPKMvyV_.js";import{k as B}from"./p-BSs-2JKu.js";import{o as E,g as z}from"./p-Dw63wyhO.js";import"./p-Bx2_PW91.js";import"./p-De4Pig-y.js";import"./p-D8GTwl9v.js";import"./p-CqiVXthx.js";const G={nickname:()=>t("th",{part:x,scope:"col",title:"The nickname associated with the terminal"},"Nickname"),model_name:()=>t("th",{part:x,scope:"col",title:"The model name of the terminal"},"Model Name"),id:()=>t("th",{part:x,scope:"col",title:"The ID of the terminal"},"ID"),provider:()=>t("th",{part:x,scope:"col",title:"The provider of the terminal"},"Provider"),provider_serial_number:()=>t("th",{part:x,scope:"col",title:"The serial number of the terminal"},"Serial Number"),device_id:()=>t("th",{part:x,scope:"col",title:"The device/provider ID of the terminal"},"Device ID"),sub_account_name:()=>t("th",{part:x,scope:"col",title:"The sub account associated with the terminal"},"Sub Account"),status:()=>t("th",{part:x,scope:"col",title:"The current status of each terminal"},"Status")},N={nickname:(e,i)=>t("td",{part:A(i)},e.nickname),model_name:(e,i)=>t("td",{part:A(i)},e.model_name),id:(e,i)=>t("td",{part:A(i)},e.id),provider:(e,i)=>t("td",{part:A(i)},B(e.provider)),provider_serial_number:(e,i)=>t("td",{part:A(i)},e.provider_serial_number),device_id:(e,i)=>t("td",{part:A(i)},e.provider_id),sub_account_name:(e,i)=>t("td",{part:A(i)},e.sub_account_name),status:(e,i)=>t("td",{part:A(i)},t(I,Object.assign({},{connected:{variant:P.SUCCESS,title:"This terminal is connected",text:"Connected"},disconnected:{variant:P.DANGER,title:"This terminal is disconnected",text:"Disconnected"},unknown:{variant:P.SECONDARY,title:"The status of this terminal is unknown",text:"Unknown"},pending_configuration:{variant:P.WARNING,title:"This terminal is pending configuration",text:"Pending configuration"},archived:{variant:P.SECONDARY,title:"This terminal is archived",text:"Archived"}}[e.status])))},V=class{constructor(t){e(this,t),this.clickEvent=i(this,"click-event",7),this.errorEvent=i(this,"error-event",7),this.terminals=[],this.subAccounts=[],this.loading=!0,this.paging=h,this.pagingParams={},this.columns="nickname,provider_serial_number,status",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:O.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:O.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const i=this.terminals.find((t=>t.id===e));this.clickEvent.emit({name:O.row,data:i})}}componentWillLoad(){o(),this.analytics=new n(this),this.terminalsTable=new f(this.terminals,this.columns,G,N),this.initializeGetData(),this.getTerminals&&this.getSubAccounts&&this.fetchData(),E("set",(()=>{this.pagingParams={}})),E("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}updateOnPropChange(){this.fetchData()}initializeGetData(){this.initializeGetTerminals(),this.initializeGetSubAccounts()}initializeGetTerminals(){this.accountId&&this.authToken?this.getTerminals=(({id:t,authToken:e,service:i})=>async({params:r,onSuccess:n,onError:o})=>{var c,h;try{const m=await i.fetchTerminals(t,e,r);if(m.error)return o({error:p(m.error),code:d(null===(h=m.error)||void 0===h?void 0:h.code),severity:a.ERROR});{const t=Object.assign({},m.page_info);n({terminals:(null===(c=m.data)||void 0===c?void 0:c.map((t=>new s(t))))||[],pagingInfo:t})}}catch(t){const e=d(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:a.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new c}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:a.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({primaryAccountId:this.accountId,authToken:this.authToken,service:new u}))}fetchData(){this.loading=!0,this.getTerminals({params:this.terminalParams,onSuccess:async({terminals:t,pagingInfo:e})=>{this.terminals=t,this.paging=e,this.terminalsTable.collectionData=this.terminals,this.terminalsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:e,severity:i})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:i}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.terminals=this.terminals.map((t=>{var e;return t.sub_account_name=null===(e=this.subAccounts.find((e=>e.id===t.account_id)))||void 0===e?void 0:e.name,t})),this.loading=!1},onError:({error:t,code:e,severity:i})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:i}),this.loading=!1}})}get terminalParams(){const t=z();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){const t=this.terminals.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.terminals.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return t(l,{key:"69c475e7a428c549a05f21bbd9bd80ce6d77836b"},t(b,{key:"a3d916daff63336299366f27959b8e54134f54c5"},t(v,{key:"412538503e7a212bd7b5723dddad82abe95fc3c2"},t(g,{key:"5501e72fd1931b1ffc17e6bf0d09d692b9cfbe17"},t(y,{key:"e0391a60a807cbdba97ef11f04275eb3072dc40c"},this.terminalsTable.columnData.map((t=>t)))),t(k,{key:"56686e423499aff459fa3d6d93fae0fd7621b10b"},t(j,{key:"0b70b5a0132754b1ce14e8baaeb7a9932c73b0ad",columnSpan:this.terminalsTable.columnKeys.length,isLoading:this.loading}),t(C,{key:"1230c30259de7ad89a1ccf1bb709db5bdda9152f",isEmpty:this.showEmptyState,columnSpan:this.terminalsTable.columnKeys.length}),t(T,{key:"fc5dbeae973d56980e077fa861d0bf95f282cbec",columnSpan:this.terminalsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalsTable.rowData.map(((e,i)=>t(w,{"data-test-id":"table-row","data-row-entity-id":this.entityId[i],onClick:this.rowClickHandler},e)))),this.paging&&t(_,{key:"c68e2cb14c8fa6a56243803e440cc13388ffaaf4"},t(S,{key:"bcc17671c48f5a397dff15333a49305a443aef21"},t(D,{key:"92a690d558b001bb346c2e17fb1e02691ec2a029",colSpan:this.terminalsTable.columnData.length},t("pagination-menu",{key:"2a8233397675c7af4fd95df203eb4438f1c4adbd",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"],pagingParams:["updateOnPropChange"],getTerminals:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{V as justifi_terminals_list}
1
+ import{h as t,r as e,c as i}from"./p-CV0Pyo1O.js";import{n as s,C as a,b as r}from"./p-Cl5FLD11.js";import{J as o}from"./p-3EVeuNqR.js";import{c as n}from"./p-CL9rrHjP.js";import{T as c}from"./p-D_MQLfzf.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{p as h}from"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";import{g as d,a as p}from"./p-IFhZFB4v.js";import{m,S as u}from"./p-UEdJ7AYc.js";import{S as l}from"./p-DzEdYT8R.js";import{T as f,a as b,b as v,c as g,d as y,e as j,f as k,g as C,h as _,i as w,j as T,k as S,l as D}from"./p-BICxxa69.js";import{T as P}from"./p-CZfYo5-1.js";import{B as I,a as O}from"./p-CHw7tICr.js";import{a6 as A,a7 as x}from"./p-CPKMvyV_.js";import{j as E}from"./p-BM88Upl5.js";import{o as V,g as z}from"./p-Dw63wyhO.js";import"./p-Bzbt5VX9.js";import"./p-CP0Y19co.js";import"./p-D8GTwl9v.js";import"./p-CqiVXthx.js";const B={nickname:()=>t("th",{part:A,scope:"col",title:"The nickname associated with the terminal"},"Nickname"),model_name:()=>t("th",{part:A,scope:"col",title:"The model name of the terminal"},"Model Name"),id:()=>t("th",{part:A,scope:"col",title:"The ID of the terminal"},"ID"),provider:()=>t("th",{part:A,scope:"col",title:"The provider of the terminal"},"Provider"),provider_serial_number:()=>t("th",{part:A,scope:"col",title:"The serial number of the terminal"},"Serial Number"),device_id:()=>t("th",{part:A,scope:"col",title:"The device/provider ID of the terminal"},"Device ID"),sub_account_name:()=>t("th",{part:A,scope:"col",title:"The sub account associated with the terminal"},"Sub Account"),status:()=>t("th",{part:A,scope:"col",title:"The current status of each terminal"},"Status")},L={nickname:(e,i)=>t("td",{part:x(i)},e.nickname),model_name:(e,i)=>t("td",{part:x(i)},e.model_name),id:(e,i)=>t("td",{part:x(i)},e.id),provider:(e,i)=>t("td",{part:x(i)},E(e.provider)),provider_serial_number:(e,i)=>t("td",{part:x(i)},e.provider_serial_number),device_id:(e,i)=>t("td",{part:x(i)},e.provider_id),sub_account_name:(e,i)=>t("td",{part:x(i)},e.sub_account_name),status:(e,i)=>t("td",{part:x(i)},t(O,Object.assign({},{connected:{variant:I.SUCCESS,title:"This terminal is connected",text:"Connected"},disconnected:{variant:I.DANGER,title:"This terminal is disconnected",text:"Disconnected"},unknown:{variant:I.SECONDARY,title:"The status of this terminal is unknown",text:"Unknown"},pending_configuration:{variant:I.WARNING,title:"This terminal is pending configuration",text:"Pending configuration"},archived:{variant:I.SECONDARY,title:"This terminal is archived",text:"Archived"}}[e.status])))},M=class{constructor(t){e(this,t),this.clickEvent=i(this,"click-event",7),this.errorEvent=i(this,"error-event",7),this.terminals=[],this.subAccounts=[],this.loading=!0,this.paging=h,this.pagingParams={},this.columns="nickname,provider_serial_number,status",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:P.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:P.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const i=this.terminals.find((t=>t.id===e));this.clickEvent.emit({name:P.row,data:i})}}componentWillLoad(){n(),this.analytics=new o(this),this.terminalsTable=new f(this.terminals,this.columns,B,L),this.initializeGetData(),this.getTerminals&&this.getSubAccounts&&this.fetchData(),V("set",(()=>{this.pagingParams={}})),V("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}updateOnPropChange(){this.fetchData()}initializeGetData(){this.initializeGetTerminals(),this.initializeGetSubAccounts()}initializeGetTerminals(){this.accountId&&this.authToken?this.getTerminals=(({id:t,authToken:e,service:i})=>async({params:r,onSuccess:o,onError:n})=>{var c,h;try{const m=await i.fetchTerminals(t,e,r);if(m.error)return n({error:p(m.error),code:d(null===(h=m.error)||void 0===h?void 0:h.code),severity:a.ERROR});{const t=Object.assign({},m.page_info);o({terminals:(null===(c=m.data)||void 0===c?void 0:c.map((t=>new s(t))))||[],pagingInfo:t})}}catch(t){const e=d(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:a.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new c}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:a.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({primaryAccountId:this.accountId,authToken:this.authToken,service:new u}))}fetchData(){this.loading=!0,this.getTerminals({params:this.terminalParams,onSuccess:async({terminals:t,pagingInfo:e})=>{this.terminals=t,this.paging=e,this.terminalsTable.collectionData=this.terminals,this.terminalsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:e,severity:i})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:i}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.terminals=this.terminals.map((t=>{var e;return t.sub_account_name=null===(e=this.subAccounts.find((e=>e.id===t.account_id)))||void 0===e?void 0:e.name,t})),this.loading=!1},onError:({error:t,code:e,severity:i})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:i}),this.loading=!1}})}get terminalParams(){const t=z();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){const t=this.terminals.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.terminals.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return t(l,{key:"69c475e7a428c549a05f21bbd9bd80ce6d77836b"},t(b,{key:"a3d916daff63336299366f27959b8e54134f54c5"},t(v,{key:"412538503e7a212bd7b5723dddad82abe95fc3c2"},t(g,{key:"5501e72fd1931b1ffc17e6bf0d09d692b9cfbe17"},t(y,{key:"e0391a60a807cbdba97ef11f04275eb3072dc40c"},this.terminalsTable.columnData.map((t=>t)))),t(j,{key:"56686e423499aff459fa3d6d93fae0fd7621b10b"},t(k,{key:"0b70b5a0132754b1ce14e8baaeb7a9932c73b0ad",columnSpan:this.terminalsTable.columnKeys.length,isLoading:this.loading}),t(C,{key:"1230c30259de7ad89a1ccf1bb709db5bdda9152f",isEmpty:this.showEmptyState,columnSpan:this.terminalsTable.columnKeys.length}),t(_,{key:"fc5dbeae973d56980e077fa861d0bf95f282cbec",columnSpan:this.terminalsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalsTable.rowData.map(((e,i)=>t(w,{"data-test-id":"table-row","data-row-entity-id":this.entityId[i],onClick:this.rowClickHandler},e)))),this.paging&&t(T,{key:"c68e2cb14c8fa6a56243803e440cc13388ffaaf4"},t(S,{key:"bcc17671c48f5a397dff15333a49305a443aef21"},t(D,{key:"92a690d558b001bb346c2e17fb1e02691ec2a029",colSpan:this.terminalsTable.columnData.length},t("pagination-menu",{key:"2a8233397675c7af4fd95df203eb4438f1c4adbd",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"],pagingParams:["updateOnPropChange"],getTerminals:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{M as justifi_terminals_list}
@@ -1 +1 @@
1
- import{A as e}from"./p-De4Pig-y.js";import"./p-DXTa04jn.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";const t=e();class s{async fetchDispute(e,s){return t.get({endpoint:`disputes/${e}`,authToken:s})}async updateDisputeResponse(e,s,n){return t.patch({endpoint:`disputes/${e}/response`,body:n,authToken:s})}async submitDisputeResponse(e,s,n){return t.post({endpoint:`disputes/${e}/response`,body:n,authToken:s})}async createDisputeEvidence(e,s,n){return t.put({endpoint:`disputes/${e}/evidence`,body:n,authToken:s})}}var n,i;!function(e){e.nextStep="nextStep",e.previousStep="previousStep",e.cancelDispute="cancelDispute",e.respondToDispute="respondToDispute",e.submit="submit"}(n||(n={})),function(e){e.disputeReason="dispute_reason",e.productOrService="product_or_service",e.customerDetails="customer_details",e.cancellationPolicy="cancellation_policy",e.refundPolicy="refund_policy",e.duplicateCharge="duplicate_charge",e.electronicEvidence="electronic_evidence",e.shippingDetails="shipping_details",e.additionalStatement="additional_statement"}(i||(i={}));export{n as D,s as a}
1
+ import{A as e}from"./p-CP0Y19co.js";import"./p-Cl5FLD11.js";import"./p-CLHwhyvu.js";import"./p-BcNb9bVO.js";const t=e();class s{async fetchDispute(e,s){return t.get({endpoint:`disputes/${e}`,authToken:s})}async updateDisputeResponse(e,s,n){return t.patch({endpoint:`disputes/${e}/response`,body:n,authToken:s})}async submitDisputeResponse(e,s,n){return t.post({endpoint:`disputes/${e}/response`,body:n,authToken:s})}async createDisputeEvidence(e,s,n){return t.put({endpoint:`disputes/${e}/evidence`,body:n,authToken:s})}}var n,i;!function(e){e.nextStep="nextStep",e.previousStep="previousStep",e.cancelDispute="cancelDispute",e.respondToDispute="respondToDispute",e.submit="submit"}(n||(n={})),function(e){e.disputeReason="dispute_reason",e.productOrService="product_or_service",e.customerDetails="customer_details",e.cancellationPolicy="cancellation_policy",e.refundPolicy="refund_policy",e.duplicateCharge="duplicate_charge",e.electronicEvidence="electronic_evidence",e.shippingDetails="shipping_details",e.additionalStatement="additional_statement"}(i||(i={}));export{n as D,s as a}