@justifi/webcomponents 6.7.3 → 6.8.0

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 (287) hide show
  1. package/dist/cjs/{Business-uoeKyW_a.js → Business-CB8EVrhD.js} +1 -0
  2. package/dist/cjs/{GooglePay-CbKCUEfb.js → Plaid-DxPvVu0H.js} +53 -0
  3. package/dist/cjs/{bank-account-document-form-inputs_8.cjs.entry.js → bank-account-document-form-inputs_9.cjs.entry.js} +330 -8
  4. package/dist/cjs/{business-additional-questions-schema-BtOuMq_U.js → business-additional-questions-schema-Cnh6AXQU.js} +3 -3
  5. package/dist/cjs/{business-form-options-D1r-wJpo.js → business-form-options-B3CbEmdc.js} +1 -1
  6. package/dist/cjs/{business-identity-schema-CMvq6f8m.js → business-identity-schema-0jg2Thn9.js} +2 -2
  7. package/dist/cjs/{business.service-DR4Ce5XV.js → business.service-zGEitIbP.js} +2 -2
  8. package/dist/cjs/{check-pkg-version-Bs_9oZb4.js → check-pkg-version-DKH70uPq.js} +11 -10
  9. package/dist/cjs/{checkout.service-CQqd4X4y.js → checkout.service-DT13pWxH.js} +2 -2
  10. package/dist/cjs/checkouts-list-core.cjs.entry.js +2 -2
  11. package/dist/cjs/{country-config-DGi9t3Ma.js → country-config-ETD-7Wb7.js} +1 -1
  12. package/dist/cjs/custom-popper_2.cjs.entry.js +48 -17
  13. package/dist/cjs/{dispute.service-aok1_zRv.js → dispute.service-GDUl1Wjs.js} +2 -2
  14. package/dist/cjs/form-alert_5.cjs.entry.js +3 -3
  15. package/dist/cjs/form-control-number-masked_3.cjs.entry.js +2 -2
  16. package/dist/cjs/form-control-number_3.cjs.entry.js +6 -6
  17. package/dist/cjs/{get-business-CtsxSYA6.js → get-business-CP0ALW9n.js} +1 -1
  18. package/dist/cjs/{get-payment-details-tCICJHBb.js → get-payment-details-IA5Toi7Z.js} +3 -3
  19. package/dist/cjs/{get-subaccounts-BcsCQAVN.js → get-subaccounts-DNMZjAyT.js} +3 -3
  20. package/dist/cjs/hidden-input_2.cjs.entry.js +1 -1
  21. package/dist/cjs/{input-handlers-DaRKFvGI.js → input-handlers-gV1LyFy3.js} +1 -1
  22. package/dist/cjs/internal-tokenize-payment-method_7.cjs.entry.js +15 -15
  23. package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +31 -18
  24. package/dist/cjs/justifi-apple-pay_8.cjs.entry.js +220 -290
  25. package/dist/cjs/justifi-bank-account-billing-form-simple_3.cjs.entry.js +4 -4
  26. package/dist/cjs/justifi-business-details.cjs.entry.js +6 -6
  27. package/dist/cjs/justifi-business-form.cjs.entry.js +10 -10
  28. package/dist/cjs/justifi-checkout.cjs.entry.js +12 -12
  29. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +9 -9
  30. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +7 -7
  31. package/dist/cjs/justifi-dispute-management.cjs.entry.js +5 -5
  32. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +5 -5
  33. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +4 -4
  34. package/dist/cjs/justifi-order-terminals.cjs.entry.js +10 -10
  35. package/dist/cjs/justifi-payment-details.cjs.entry.js +6 -6
  36. package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +1 -1
  37. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +5 -5
  38. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +6 -6
  39. package/dist/cjs/justifi-payments-list.cjs.entry.js +6 -6
  40. package/dist/cjs/justifi-payout-details.cjs.entry.js +6 -6
  41. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +6 -6
  42. package/dist/cjs/justifi-payouts-list.cjs.entry.js +7 -7
  43. package/dist/cjs/justifi-refund-payment.cjs.entry.js +10 -10
  44. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +7 -7
  45. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +10 -10
  46. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +6 -6
  47. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +7 -7
  48. package/dist/cjs/justifi-terminals-list.cjs.entry.js +7 -7
  49. package/dist/cjs/loader.cjs.js +1 -1
  50. package/dist/cjs/{package-DcGEg97O.js → package-B4vs5j7c.js} +1 -1
  51. package/dist/cjs/payment-details-core.cjs.entry.js +3 -3
  52. package/dist/cjs/{payment.service-B4ACB8Q3.js → payment.service-QODfB293.js} +2 -2
  53. package/dist/cjs/payments-list-core.cjs.entry.js +2 -2
  54. package/dist/cjs/{payout.service-qVbNnemO.js → payout.service-k7GBuYzk.js} +2 -2
  55. package/dist/cjs/payouts-list-core.cjs.entry.js +2 -2
  56. package/dist/cjs/plaid-icon-DTpONc_Q.js +46 -0
  57. package/dist/cjs/{schema-validations-DYYDrVol.js → schema-validations-BakyfJpE.js} +3 -3
  58. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +3 -3
  59. package/dist/cjs/{terminal-orders-table-C2jG4WQa.js → terminal-orders-table-C6j6Mx_r.js} +4 -4
  60. package/dist/cjs/{terminal.service-D1ohedi-.js → terminal.service-A90K3XNq.js} +2 -2
  61. package/dist/cjs/terminals-list-core.cjs.entry.js +2 -2
  62. package/dist/cjs/webcomponents.cjs.js +1 -1
  63. package/dist/collection/api/Analytics.js +8 -7
  64. package/dist/collection/api/Business.js +1 -0
  65. package/dist/collection/api/Plaid.js +50 -0
  66. package/dist/collection/api/index.js +1 -0
  67. package/dist/collection/api/services/plaid.service.js +13 -0
  68. package/dist/collection/collection-manifest.json +1 -0
  69. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +20 -5
  70. package/dist/collection/components/business-forms/payment-provisioning/plaid-verification/plaid-verification.js +433 -0
  71. package/dist/collection/components/modular-checkout/sub-components/plaid-payment-method.js +4 -51
  72. package/dist/collection/ui-components/custom-popper/custom-popper.js +52 -18
  73. package/dist/docs.json +145 -4
  74. package/dist/esm/{Business-CHJTjG_5.js → Business-GgW1g7FQ.js} +1 -0
  75. package/dist/esm/{GooglePay-5EiPffHy.js → Plaid-CBrksnBN.js} +52 -1
  76. package/dist/esm/{bank-account-document-form-inputs_8.entry.js → bank-account-document-form-inputs_9.entry.js} +329 -8
  77. package/dist/esm/{business-additional-questions-schema-DQb10ehS.js → business-additional-questions-schema-CQ8CuEfQ.js} +3 -3
  78. package/dist/esm/{business-form-options-Bm89rMmk.js → business-form-options-DamBLV7N.js} +1 -1
  79. package/dist/esm/{business-identity-schema-CaMnpPqx.js → business-identity-schema-BTyJz7M9.js} +2 -2
  80. package/dist/esm/{business.service-C7smiL6_.js → business.service-BWm7Kqs4.js} +2 -2
  81. package/dist/esm/{check-pkg-version-DIZ2yD72.js → check-pkg-version-CioeuqLV.js} +11 -10
  82. package/dist/esm/{checkout.service-CYq6KXZv.js → checkout.service-D4Mljqjr.js} +2 -2
  83. package/dist/esm/checkouts-list-core.entry.js +2 -2
  84. package/dist/esm/{country-config-CQxaTFuP.js → country-config-D-9YmU94.js} +1 -1
  85. package/dist/esm/custom-popper_2.entry.js +48 -17
  86. package/dist/esm/{dispute.service-D7Dv8LTn.js → dispute.service-ZpqfPDC0.js} +2 -2
  87. package/dist/esm/form-alert_5.entry.js +3 -3
  88. package/dist/esm/form-control-number-masked_3.entry.js +2 -2
  89. package/dist/esm/form-control-number_3.entry.js +6 -6
  90. package/dist/esm/{get-business-BAmwId14.js → get-business-BMB2IxN_.js} +1 -1
  91. package/dist/esm/{get-payment-details-CPJZp31y.js → get-payment-details-B71Qi6mF.js} +2 -2
  92. package/dist/esm/{get-subaccounts-CqMFocN0.js → get-subaccounts-DXJdRbWg.js} +2 -2
  93. package/dist/esm/hidden-input_2.entry.js +1 -1
  94. package/dist/esm/{input-handlers-AgwQ-yKX.js → input-handlers-CzWCJ849.js} +1 -1
  95. package/dist/esm/internal-tokenize-payment-method_7.entry.js +4 -4
  96. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +25 -12
  97. package/dist/esm/justifi-apple-pay_8.entry.js +6 -76
  98. package/dist/esm/justifi-bank-account-billing-form-simple_3.entry.js +4 -4
  99. package/dist/esm/justifi-business-details.entry.js +6 -6
  100. package/dist/esm/justifi-business-form.entry.js +10 -10
  101. package/dist/esm/justifi-checkout.entry.js +4 -4
  102. package/dist/esm/justifi-checkouts-list-filters.entry.js +2 -2
  103. package/dist/esm/justifi-checkouts-list.entry.js +6 -6
  104. package/dist/esm/justifi-dispute-management.entry.js +5 -5
  105. package/dist/esm/justifi-dispute-notification_3.entry.js +5 -5
  106. package/dist/esm/justifi-gross-payment-chart.entry.js +4 -4
  107. package/dist/esm/justifi-order-terminals.entry.js +7 -7
  108. package/dist/esm/justifi-payment-details.entry.js +6 -6
  109. package/dist/esm/justifi-payment-provisioning-core.entry.js +1 -1
  110. package/dist/esm/justifi-payment-provisioning.entry.js +5 -5
  111. package/dist/esm/justifi-payment-transactions-list.entry.js +5 -5
  112. package/dist/esm/justifi-payments-list.entry.js +5 -5
  113. package/dist/esm/justifi-payout-details.entry.js +5 -5
  114. package/dist/esm/justifi-payout-transactions-list.entry.js +5 -5
  115. package/dist/esm/justifi-payouts-list.entry.js +6 -6
  116. package/dist/esm/justifi-refund-payment.entry.js +6 -6
  117. package/dist/esm/justifi-season-interruption-insurance.entry.js +4 -4
  118. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +2 -2
  119. package/dist/esm/justifi-terminal-orders-list.entry.js +5 -5
  120. package/dist/esm/justifi-terminals-list-filters.entry.js +2 -2
  121. package/dist/esm/justifi-terminals-list.entry.js +6 -6
  122. package/dist/esm/loader.js +1 -1
  123. package/dist/esm/{package-ZkBwsSuI.js → package-CekpA_KC.js} +1 -1
  124. package/dist/esm/payment-details-core.entry.js +2 -2
  125. package/dist/esm/{payment.service-BGf8F56_.js → payment.service-C2lFq1yV.js} +2 -2
  126. package/dist/esm/payments-list-core.entry.js +2 -2
  127. package/dist/esm/{payout.service-Co3xg-7j.js → payout.service-ChupMPKT.js} +2 -2
  128. package/dist/esm/payouts-list-core.entry.js +2 -2
  129. package/dist/esm/plaid-icon-wJLd-2NX.js +43 -0
  130. package/dist/esm/{schema-validations-jBrJ0mYI.js → schema-validations-CfHWzMvr.js} +3 -3
  131. package/dist/esm/terminal-orders-list-core.entry.js +3 -3
  132. package/dist/esm/{terminal-orders-table-uNYLd8i5.js → terminal-orders-table-B4_RAxxx.js} +2 -2
  133. package/dist/esm/{terminal.service-Cxs-IO0Z.js → terminal.service-DqibXFHt.js} +2 -2
  134. package/dist/esm/terminals-list-core.entry.js +2 -2
  135. package/dist/esm/webcomponents.js +1 -1
  136. package/dist/module/Analytics.js +9 -8
  137. package/dist/module/Business.js +1 -0
  138. package/dist/module/{Refund.js → Plaid.js} +51 -1
  139. package/dist/module/bank-account-document-inputs.js +1 -1
  140. package/dist/module/business-additional-questions-form-step.js +1 -1
  141. package/dist/module/business-bank-account-form-step.js +46 -25
  142. package/dist/module/business-core-info-form-step.js +1 -1
  143. package/dist/module/business-owners-form-step.js +1 -1
  144. package/dist/module/business-representative-form-step.js +1 -1
  145. package/dist/module/business-terms-conditions-form-step.js +1 -1
  146. package/dist/module/business.service.js +1 -1
  147. package/dist/module/checkout.service.js +1 -1
  148. package/dist/module/checkout.store.js +1 -1
  149. package/dist/module/checkouts-list-core2.js +1 -1
  150. package/dist/module/custom-popper2.js +50 -17
  151. package/dist/module/dispute-management-core.js +1 -1
  152. package/dist/module/dispute-response-actions.js +1 -1
  153. package/dist/module/dispute-response.js +1 -1
  154. package/dist/module/get-business.js +1 -1
  155. package/dist/module/get-payment-details.js +1 -1
  156. package/dist/module/get-payout-csv.js +1 -1
  157. package/dist/module/get-subaccounts.js +1 -1
  158. package/dist/module/google-pay.js +1 -1
  159. package/dist/module/internal-tokenize-payment-method2.js +1 -1
  160. package/dist/module/justifi-business-details.js +1 -1
  161. package/dist/module/justifi-business-form.js +1 -1
  162. package/dist/module/justifi-checkouts-list-filters.js +1 -1
  163. package/dist/module/justifi-checkouts-list.js +1 -1
  164. package/dist/module/justifi-dispute-management.js +1 -1
  165. package/dist/module/justifi-gross-payment-chart.js +1 -1
  166. package/dist/module/justifi-order-terminals.js +1 -1
  167. package/dist/module/justifi-payment-details.js +1 -1
  168. package/dist/module/justifi-payment-provisioning.js +69 -63
  169. package/dist/module/justifi-payment-transactions-list.js +1 -1
  170. package/dist/module/justifi-payments-list.js +1 -1
  171. package/dist/module/justifi-payout-details.js +1 -1
  172. package/dist/module/justifi-payout-transactions-list.js +1 -1
  173. package/dist/module/justifi-payouts-list.js +1 -1
  174. package/dist/module/justifi-refund-payment.js +1 -1
  175. package/dist/module/justifi-season-interruption-insurance.js +1 -1
  176. package/dist/module/justifi-terminal-orders-list-filters.js +1 -1
  177. package/dist/module/justifi-terminal-orders-list.js +1 -1
  178. package/dist/module/justifi-terminals-list-filters.js +1 -1
  179. package/dist/module/justifi-terminals-list.js +1 -1
  180. package/dist/module/legal-address-form-step.js +1 -1
  181. package/dist/module/modular-checkout.js +2 -2
  182. package/dist/module/package.js +1 -1
  183. package/dist/module/payment-details-core2.js +1 -1
  184. package/dist/module/payment-provisioning-actions.js +1 -1
  185. package/dist/module/payment-provisioning-core.js +67 -61
  186. package/dist/module/payment-provisioning-form-steps.js +62 -56
  187. package/dist/module/payment.service.js +1 -1
  188. package/dist/module/payments-list-core2.js +1 -1
  189. package/dist/module/payout.service.js +1 -1
  190. package/dist/module/payouts-list-core2.js +1 -1
  191. package/dist/module/plaid-icon.js +3 -0
  192. package/dist/module/plaid-payment-method.js +3 -53
  193. package/dist/module/plaid-verification.d.ts +11 -0
  194. package/dist/module/plaid-verification.js +6 -0
  195. package/dist/module/plaid-verification2.js +358 -0
  196. package/dist/module/plaid.service.js +14 -1
  197. package/dist/module/terminal-orders-list-core2.js +1 -1
  198. package/dist/module/terminal.service.js +1 -1
  199. package/dist/module/terminals-list-core2.js +1 -1
  200. package/dist/module/utils4.js +1 -1
  201. package/dist/types/api/Analytics.d.ts +1 -0
  202. package/dist/types/api/BankAccount.d.ts +1 -0
  203. package/dist/types/api/Business.d.ts +2 -0
  204. package/dist/types/api/Plaid.d.ts +54 -0
  205. package/dist/types/api/index.d.ts +1 -0
  206. package/dist/types/api/services/plaid.service.d.ts +8 -0
  207. package/dist/types/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.d.ts +2 -0
  208. package/dist/types/components/business-forms/payment-provisioning/plaid-verification/plaid-verification.d.ts +36 -0
  209. package/dist/types/components/modular-checkout/sub-components/plaid-payment-method.d.ts +1 -25
  210. package/dist/types/components.d.ts +40 -1
  211. package/dist/types/ui-components/custom-popper/custom-popper.d.ts +4 -0
  212. package/dist/webcomponents/{p-BXdZKjdB.js → p--cI8fPJx.js} +1 -1
  213. package/dist/webcomponents/{p-66e8b443.entry.js → p-02f360c5.entry.js} +1 -1
  214. package/dist/webcomponents/{p-d0d6d1cc.entry.js → p-073ca03f.entry.js} +1 -1
  215. package/dist/webcomponents/{p-e9daf75f.entry.js → p-0eb97b54.entry.js} +1 -1
  216. package/dist/webcomponents/p-0fcb7ebb.entry.js +1 -0
  217. package/dist/webcomponents/{p-b2371f43.entry.js → p-110bec2e.entry.js} +1 -1
  218. package/dist/webcomponents/{p-931ea171.entry.js → p-1ec3d1e7.entry.js} +1 -1
  219. package/dist/webcomponents/{p-86db9040.entry.js → p-20cab5fe.entry.js} +1 -1
  220. package/dist/webcomponents/{p-a9b493c1.entry.js → p-238ba771.entry.js} +1 -1
  221. package/dist/webcomponents/{p-e11c7df0.entry.js → p-2454c140.entry.js} +1 -1
  222. package/dist/webcomponents/{p-5af4bb01.entry.js → p-25666afe.entry.js} +1 -1
  223. package/dist/webcomponents/{p-f5f46f2d.entry.js → p-26430bfe.entry.js} +1 -1
  224. package/dist/webcomponents/p-33ab9174.entry.js +1 -0
  225. package/dist/webcomponents/{p-f13c4a88.entry.js → p-3a254390.entry.js} +1 -1
  226. package/dist/webcomponents/p-4a802f82.entry.js +1 -0
  227. package/dist/webcomponents/p-4b928d2e.entry.js +1 -0
  228. package/dist/webcomponents/{p-252bd81d.entry.js → p-4d3e4e56.entry.js} +1 -1
  229. package/dist/webcomponents/{p-7184c2f8.entry.js → p-5ae3401d.entry.js} +1 -1
  230. package/dist/webcomponents/{p-4165281d.entry.js → p-7068c2ad.entry.js} +1 -1
  231. package/dist/webcomponents/{p-4786d1ea.entry.js → p-785e8ef7.entry.js} +1 -1
  232. package/dist/webcomponents/{p-50f16cca.entry.js → p-81bbd944.entry.js} +1 -1
  233. package/dist/webcomponents/{p-3d2495df.entry.js → p-8ac883e4.entry.js} +1 -1
  234. package/dist/webcomponents/{p-6ed0be7f.entry.js → p-8e6f2dc8.entry.js} +1 -1
  235. package/dist/webcomponents/{p-53be30e9.entry.js → p-8ed4f485.entry.js} +1 -1
  236. package/dist/webcomponents/p-922ddfb4.entry.js +1 -0
  237. package/dist/webcomponents/p-9643fe36.entry.js +1 -0
  238. package/dist/webcomponents/{p-Ce785aMx.js → p-B1AMrMly.js} +1 -1
  239. package/dist/webcomponents/{p-DDjKoqh6.js → p-BRPbLfCN.js} +1 -1
  240. package/dist/webcomponents/{p-BAu40WfT.js → p-BZbvHgMz.js} +1 -1
  241. package/dist/webcomponents/{p-APob2Eta.js → p-Bj9n56jK.js} +1 -1
  242. package/dist/webcomponents/p-By-Mu1IX.js +1 -0
  243. package/dist/webcomponents/p-C0dMwnDO.js +1 -0
  244. package/dist/webcomponents/p-C3RQHKL5.js +1 -0
  245. package/dist/webcomponents/{p-DBOsYeYk.js → p-CWyW004b.js} +1 -1
  246. package/dist/webcomponents/p-CekpA_KC.js +1 -0
  247. package/dist/webcomponents/p-CkYB1zGe.js +1 -0
  248. package/dist/webcomponents/p-D-07jgNC.js +1 -0
  249. package/dist/webcomponents/{p-C-LV3hNf.js → p-DCwnBXF7.js} +1 -1
  250. package/dist/webcomponents/p-DKemQxaE.js +1 -0
  251. package/dist/webcomponents/{p-CHJTjG_5.js → p-GgW1g7FQ.js} +1 -1
  252. package/dist/webcomponents/{p-NO0z-S2W.js → p-MVBgKFOv.js} +1 -1
  253. package/dist/webcomponents/{p-mhEMV8M-.js → p-Y-EhaLdV.js} +1 -1
  254. package/dist/webcomponents/{p-e5651bb1.entry.js → p-aa02e3d7.entry.js} +1 -1
  255. package/dist/webcomponents/p-adbe280f.entry.js +1 -0
  256. package/dist/webcomponents/{p-ea0cd47d.entry.js → p-af11ac6a.entry.js} +1 -1
  257. package/dist/webcomponents/{p-73b9cc29.entry.js → p-bbffb17f.entry.js} +1 -1
  258. package/dist/webcomponents/{p-782ccafb.entry.js → p-c0829d61.entry.js} +1 -1
  259. package/dist/webcomponents/{p-001ce9f8.entry.js → p-c2db5db6.entry.js} +1 -1
  260. package/dist/webcomponents/{p-79d1d6b3.entry.js → p-d4535236.entry.js} +1 -1
  261. package/dist/webcomponents/{p-e1a8785d.entry.js → p-d5827cb2.entry.js} +1 -1
  262. package/dist/webcomponents/{p-1eefdd41.entry.js → p-ed9db5b2.entry.js} +1 -1
  263. package/dist/webcomponents/{p-c11512e7.entry.js → p-f1e012f6.entry.js} +1 -1
  264. package/dist/webcomponents/{p-1dbf3473.entry.js → p-f1f0f100.entry.js} +1 -1
  265. package/dist/webcomponents/{p-7c4fa66f.entry.js → p-f5b7c322.entry.js} +1 -1
  266. package/dist/webcomponents/{p-bc56446a.entry.js → p-f9475bb0.entry.js} +1 -1
  267. package/dist/webcomponents/{p-4d7a2565.entry.js → p-ff1cff1d.entry.js} +1 -1
  268. package/dist/webcomponents/{p-D81X4BBI.js → p-g0kDRH6Z.js} +1 -1
  269. package/dist/webcomponents/{p-Bz97Ujvk.js → p-m_Ly-YPk.js} +1 -1
  270. package/dist/webcomponents/p-wSi5d4-j.js +1 -0
  271. package/dist/webcomponents/{p-BhvkOTYA.js → p-ygekUw3Q.js} +1 -1
  272. package/dist/webcomponents/webcomponents.esm.js +1 -1
  273. package/package.json +2 -1
  274. package/dist/webcomponents/p-0fb3fd77.entry.js +0 -1
  275. package/dist/webcomponents/p-198d2941.entry.js +0 -1
  276. package/dist/webcomponents/p-52203b01.entry.js +0 -1
  277. package/dist/webcomponents/p-639e5ce9.entry.js +0 -1
  278. package/dist/webcomponents/p-7ec771bc.entry.js +0 -1
  279. package/dist/webcomponents/p-D0PhRMmy.js +0 -1
  280. package/dist/webcomponents/p-DLLFAj4z.js +0 -1
  281. package/dist/webcomponents/p-DpkIbI5R.js +0 -1
  282. package/dist/webcomponents/p-MBH9QO2m.js +0 -1
  283. package/dist/webcomponents/p-ZkBwsSuI.js +0 -1
  284. package/dist/webcomponents/p-_LSWCi-4.js +0 -1
  285. package/dist/webcomponents/p-c5afb831.entry.js +0 -1
  286. package/dist/webcomponents/p-d55c348b.entry.js +0 -1
  287. package/dist/webcomponents/p-y-FoILTI.js +0 -1
@@ -0,0 +1,36 @@
1
+ import { EventEmitter } from '../../../../stencil-public-runtime';
2
+ import { PlaidError } from '../../../../api/Plaid';
3
+ export declare class PlaidVerification {
4
+ authToken: string;
5
+ accountId: string;
6
+ businessId: string;
7
+ linkToken: string | null;
8
+ linkTokenId: string | null;
9
+ plaidLink: any;
10
+ isAuthenticating: boolean;
11
+ isSuccess: boolean;
12
+ error: PlaidError | null;
13
+ isLoading: boolean;
14
+ private scriptRef;
15
+ private plaidService;
16
+ private abortController;
17
+ private timeoutId;
18
+ plaidVerificationSuccess: EventEmitter<{
19
+ publicToken: string;
20
+ bankAccount: any;
21
+ }>;
22
+ plaidVerificationError: EventEmitter<PlaidError>;
23
+ componentDidRender(): void;
24
+ initializePlaidLink: () => Promise<void>;
25
+ getLinkToken: () => Promise<void>;
26
+ openPlaidLink: () => void;
27
+ handlePlaidSuccess: (publicToken: string, _metadata: any) => Promise<void>;
28
+ handlePlaidExit: (err: any, _metadata: any) => void;
29
+ handlePlaidEvent: (eventName: string, metadata: any) => void;
30
+ handlePlaidLoad: () => void;
31
+ handlePlaidError: (error: any) => void;
32
+ handleError: (plaidError: PlaidError) => void;
33
+ clearError: () => void;
34
+ disconnectedCallback(): void;
35
+ render(): any;
36
+ }
@@ -1,29 +1,6 @@
1
1
  import { EventEmitter } from '../../../stencil-public-runtime';
2
2
  import { PaymentMethodPayload } from '../../checkout/payment-method-payload';
3
- import { ComponentErrorSeverity } from '../../../api/ComponentError';
4
- export declare enum PlaidErrorCodes {
5
- PLAID_SDK_LOAD_FAILED = "plaid-sdk-load-failed",
6
- PLAID_LINK_INIT_FAILED = "plaid-link-init-failed",
7
- PLAID_LINK_TOKEN_FAILED = "plaid-link-token-failed",
8
- PLAID_AUTHENTICATION_FAILED = "plaid-authentication-failed",
9
- PLAID_BANK_NOT_SUPPORTED = "plaid-bank-not-supported",
10
- PLAID_TOKEN_EXPIRED = "plaid-token-expired",
11
- PLAID_NETWORK_ERROR = "plaid-network-error",
12
- PLAID_USER_CANCELLED = "plaid-user-cancelled",
13
- PLAID_TIMEOUT = "plaid-timeout",
14
- PLAID_INVALID_CREDENTIALS = "plaid-invalid-credentials",
15
- PLAID_ACCOUNT_LOCKED = "plaid-account-locked",
16
- PLAID_MAINTENANCE = "plaid-maintenance",
17
- PLAID_RATE_LIMITED = "plaid-rate-limited"
18
- }
19
- interface PlaidError {
20
- code: PlaidErrorCodes;
21
- message: string;
22
- severity: ComponentErrorSeverity;
23
- originalError?: any;
24
- retryable: boolean;
25
- userAction?: string;
26
- }
3
+ import { PlaidErrorCodes, PlaidError } from '../../../api/Plaid';
27
4
  export declare class PlaidPaymentMethod {
28
5
  isAuthenticating: boolean;
29
6
  publicToken: string | null;
@@ -76,4 +53,3 @@ export declare class PlaidPaymentMethod {
76
53
  disconnectedCallback(): void;
77
54
  render(): any;
78
55
  }
79
- export {};
@@ -23,6 +23,7 @@ import { CheckoutChangedEventDetail, Hook, SelectedPaymentMethod } from "./compo
23
23
  import { CheckoutState } from "./store/checkout.store";
24
24
  import { Dispute, IDispute } from "./api/Dispute";
25
25
  import { GooglePayButtonSizeMode, GooglePayButtonStyle, GooglePayButtonType, GooglePayEnvironment, IGooglePayError, IGooglePayPaymentData } from "./api/GooglePay";
26
+ import { PlaidError } from "./api/Plaid";
26
27
  import { PaymentMethodOption } from "./components/checkout/payment-method-option-utils";
27
28
  import { Identity } from "./api/Identity";
28
29
  import { PaginationProps } from "./ui-components/pagination-menu/pagination-menu";
@@ -44,6 +45,7 @@ export { CheckoutChangedEventDetail, Hook, SelectedPaymentMethod } from "./compo
44
45
  export { CheckoutState } from "./store/checkout.store";
45
46
  export { Dispute, IDispute } from "./api/Dispute";
46
47
  export { GooglePayButtonSizeMode, GooglePayButtonStyle, GooglePayButtonType, GooglePayEnvironment, IGooglePayError, IGooglePayPaymentData } from "./api/GooglePay";
48
+ export { PlaidError } from "./api/Plaid";
47
49
  export { PaymentMethodOption } from "./components/checkout/payment-method-option-utils";
48
50
  export { Identity } from "./api/Identity";
49
51
  export { PaginationProps } from "./ui-components/pagination-menu/pagination-menu";
@@ -1130,6 +1132,11 @@ export namespace Components {
1130
1132
  "getPayouts": Function;
1131
1133
  "getSubAccounts": Function;
1132
1134
  }
1135
+ interface PlaidVerification {
1136
+ "accountId": string;
1137
+ "authToken": string;
1138
+ "businessId": string;
1139
+ }
1133
1140
  interface RepresentativeDetails {
1134
1141
  "representative": Identity;
1135
1142
  }
@@ -1405,6 +1412,10 @@ export interface PayoutsListCoreCustomEvent<T> extends CustomEvent<T> {
1405
1412
  detail: T;
1406
1413
  target: HTMLPayoutsListCoreElement;
1407
1414
  }
1415
+ export interface PlaidVerificationCustomEvent<T> extends CustomEvent<T> {
1416
+ detail: T;
1417
+ target: HTMLPlaidVerificationElement;
1418
+ }
1408
1419
  export interface TerminalOrdersListCoreCustomEvent<T> extends CustomEvent<T> {
1409
1420
  detail: T;
1410
1421
  target: HTMLTerminalOrdersListCoreElement;
@@ -2875,6 +2886,24 @@ declare global {
2875
2886
  prototype: HTMLPayoutsListCoreElement;
2876
2887
  new (): HTMLPayoutsListCoreElement;
2877
2888
  };
2889
+ interface HTMLPlaidVerificationElementEventMap {
2890
+ "plaidVerificationSuccess": { publicToken: string, bankAccount: any };
2891
+ "plaidVerificationError": PlaidError;
2892
+ }
2893
+ interface HTMLPlaidVerificationElement extends Components.PlaidVerification, HTMLStencilElement {
2894
+ addEventListener<K extends keyof HTMLPlaidVerificationElementEventMap>(type: K, listener: (this: HTMLPlaidVerificationElement, ev: PlaidVerificationCustomEvent<HTMLPlaidVerificationElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
2895
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2896
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2897
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2898
+ removeEventListener<K extends keyof HTMLPlaidVerificationElementEventMap>(type: K, listener: (this: HTMLPlaidVerificationElement, ev: PlaidVerificationCustomEvent<HTMLPlaidVerificationElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
2899
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2900
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2901
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2902
+ }
2903
+ var HTMLPlaidVerificationElement: {
2904
+ prototype: HTMLPlaidVerificationElement;
2905
+ new (): HTMLPlaidVerificationElement;
2906
+ };
2878
2907
  interface HTMLRepresentativeDetailsElement extends Components.RepresentativeDetails, HTMLStencilElement {
2879
2908
  }
2880
2909
  var HTMLRepresentativeDetailsElement: {
@@ -3057,6 +3086,7 @@ declare global {
3057
3086
  "payments-list-core": HTMLPaymentsListCoreElement;
3058
3087
  "payout-details-core": HTMLPayoutDetailsCoreElement;
3059
3088
  "payouts-list-core": HTMLPayoutsListCoreElement;
3089
+ "plaid-verification": HTMLPlaidVerificationElement;
3060
3090
  "representative-details": HTMLRepresentativeDetailsElement;
3061
3091
  "table-filters-menu": HTMLTableFiltersMenuElement;
3062
3092
  "terminal-orders-list-core": HTMLTerminalOrdersListCoreElement;
@@ -3118,7 +3148,7 @@ declare namespace LocalJSX {
3118
3148
  "business": Business;
3119
3149
  }
3120
3150
  interface CustomPopper {
3121
- "anchorRef": HTMLElement | SVGElement;
3151
+ "anchorRef"?: HTMLElement | SVGElement;
3122
3152
  /**
3123
3153
  * @default [0, 10]
3124
3154
  */
@@ -4192,6 +4222,13 @@ declare namespace LocalJSX {
4192
4222
  "onClick-event"?: (event: PayoutsListCoreCustomEvent<ComponentClickEvent>) => void;
4193
4223
  "onError-event"?: (event: PayoutsListCoreCustomEvent<ComponentErrorEvent>) => void;
4194
4224
  }
4225
+ interface PlaidVerification {
4226
+ "accountId"?: string;
4227
+ "authToken"?: string;
4228
+ "businessId"?: string;
4229
+ "onPlaidVerificationError"?: (event: PlaidVerificationCustomEvent<PlaidError>) => void;
4230
+ "onPlaidVerificationSuccess"?: (event: PlaidVerificationCustomEvent<{ publicToken: string, bankAccount: any }>) => void;
4231
+ }
4195
4232
  interface RepresentativeDetails {
4196
4233
  "representative": Identity;
4197
4234
  }
@@ -4340,6 +4377,7 @@ declare namespace LocalJSX {
4340
4377
  "payments-list-core": PaymentsListCore;
4341
4378
  "payout-details-core": PayoutDetailsCore;
4342
4379
  "payouts-list-core": PayoutsListCore;
4380
+ "plaid-verification": PlaidVerification;
4343
4381
  "representative-details": RepresentativeDetails;
4344
4382
  "table-filters-menu": TableFiltersMenu;
4345
4383
  "terminal-orders-list-core": TerminalOrdersListCore;
@@ -4472,6 +4510,7 @@ declare module "@stencil/core" {
4472
4510
  "payments-list-core": LocalJSX.PaymentsListCore & JSXBase.HTMLAttributes<HTMLPaymentsListCoreElement>;
4473
4511
  "payout-details-core": LocalJSX.PayoutDetailsCore & JSXBase.HTMLAttributes<HTMLPayoutDetailsCoreElement>;
4474
4512
  "payouts-list-core": LocalJSX.PayoutsListCore & JSXBase.HTMLAttributes<HTMLPayoutsListCoreElement>;
4513
+ "plaid-verification": LocalJSX.PlaidVerification & JSXBase.HTMLAttributes<HTMLPlaidVerificationElement>;
4475
4514
  "representative-details": LocalJSX.RepresentativeDetails & JSXBase.HTMLAttributes<HTMLRepresentativeDetailsElement>;
4476
4515
  "table-filters-menu": LocalJSX.TableFiltersMenu & JSXBase.HTMLAttributes<HTMLTableFiltersMenuElement>;
4477
4516
  "terminal-orders-list-core": LocalJSX.TerminalOrdersListCore & JSXBase.HTMLAttributes<HTMLTerminalOrdersListCoreElement>;
@@ -11,7 +11,11 @@ export declare class CustomPopper {
11
11
  hideEvent: EventEmitter;
12
12
  private popperInstance;
13
13
  private popperContentRef;
14
+ private initialized;
15
+ private boundHandlers;
16
+ onAnchorRefChange(newValue: HTMLElement | SVGElement): void;
14
17
  componentDidLoad(): void;
18
+ private initPopper;
15
19
  disconnectedCallback(): void;
16
20
  handleClick(event: MouseEvent): void;
17
21
  private get popperOptions();
@@ -1 +1 @@
1
- import{A as e}from"./p-y8av3w9x.js";import"./p-Cjcsf8ku.js";import"./p-DpkIbI5R.js";import"./p-CLHwhyvu.js";import"./p-CHJTjG_5.js";import"./p-BH0Xfn-F.js";const s=e();class t{async fetchDispute(e,t){return s.get({endpoint:`disputes/${e}`,authToken:t})}async updateDisputeResponse(e,t,p){return s.patch({endpoint:`disputes/${e}/response`,body:p,authToken:t})}async submitDisputeResponse(e,t,p){return s.post({endpoint:`disputes/${e}/response`,body:p,authToken:t})}async createDisputeEvidence(e,t,p){return s.put({endpoint:`disputes/${e}/evidence`,body:p,authToken:t})}}export{t as D}
1
+ import{A as e}from"./p-y8av3w9x.js";import"./p-Cjcsf8ku.js";import"./p-C0dMwnDO.js";import"./p-CLHwhyvu.js";import"./p-GgW1g7FQ.js";import"./p-BH0Xfn-F.js";const s=e();class t{async fetchDispute(e,t){return s.get({endpoint:`disputes/${e}`,authToken:t})}async updateDisputeResponse(e,t,p){return s.patch({endpoint:`disputes/${e}/response`,body:p,authToken:t})}async submitDisputeResponse(e,t,p){return s.post({endpoint:`disputes/${e}/response`,body:p,authToken:t})}async createDisputeEvidence(e,t,p){return s.put({endpoint:`disputes/${e}/evidence`,body:p,authToken:t})}}export{t as D}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i}from"./p-CV0Pyo1O.js";import{C as r,a as o}from"./p-Cjcsf8ku.js";import{c as e,J as a}from"./p-DLLFAj4z.js";import{T as p}from"./p-MBH9QO2m.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{f as n}from"./p-DpkIbI5R.js";import"./p-CLHwhyvu.js";import"./p-CHJTjG_5.js";import"./p-BH0Xfn-F.js";import{g as c,a as h}from"./p-D2muobcE.js";import{m,S as u}from"./p-_LSWCi-4.js";import{S as f}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{d as j}from"./p-Bhk8tHxs.js";import"./p-ZkBwsSuI.js";import"./p-y8av3w9x.js";import"./p-B09GVew-.js";import"./p-D8GTwl9v.js";import"./p-DkoufM1t.js";import"./p-BZ4YUsyP.js";import"./p-DrquDBSk.js";const l=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.errorMessage=null,this.columns=j,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){e(),this.analytics=new a(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetTerminals(),this.initializeGetSubAccounts()}initializeGetTerminals(){this.accountId&&this.authToken?this.getTerminals=(({id:t,authToken:s,service:i})=>async({params:o,onSuccess:e,onError:a})=>{var p,m;try{const u=await i.fetchTerminals(t,s,o);if(u.error)return a({error:h(u.error),code:c(null===(m=u.error)||void 0===m?void 0:m.code),severity:r.ERROR});{const t=Object.assign({},u.page_info);e({terminals:(null===(p=u.data)||void 0===p?void 0:p.map((t=>new n(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return a({error:t.message||t,code:s,severity:r.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new p}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:this.errorMessage,severity:r.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({accountId:this.accountId,authToken:this.authToken,service:new u}))}render(){return i(f,{key:"77cb67def2cb91b1fbf00059d13a255eae014b12"},i("terminals-list-core",{key:"697cafa1c343e20f36dff0404209c4832fa6a2ff",getTerminals:this.getTerminals,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{l as justifi_terminals_list}
1
+ import{r as t,c as s,h as i}from"./p-CV0Pyo1O.js";import{C as r,a as o}from"./p-Cjcsf8ku.js";import{c as e,J as a}from"./p-C3RQHKL5.js";import{T as n}from"./p-CkYB1zGe.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{f as p}from"./p-C0dMwnDO.js";import"./p-CLHwhyvu.js";import"./p-GgW1g7FQ.js";import"./p-BH0Xfn-F.js";import{g as c,a as h}from"./p-D2muobcE.js";import{m,S as u}from"./p-D-07jgNC.js";import{S as d}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{d as f}from"./p-Bhk8tHxs.js";import"./p-CekpA_KC.js";import"./p-y8av3w9x.js";import"./p-B09GVew-.js";import"./p-D8GTwl9v.js";import"./p-DkoufM1t.js";import"./p-BZ4YUsyP.js";import"./p-DrquDBSk.js";const l=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.errorMessage=null,this.columns=f,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){e(),this.analytics=new a(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetTerminals(),this.initializeGetSubAccounts()}initializeGetTerminals(){this.accountId&&this.authToken?this.getTerminals=(({id:t,authToken:s,service:i})=>async({params:o,onSuccess:e,onError:a})=>{var n,m;try{const u=await i.fetchTerminals(t,s,o);if(u.error)return a({error:h(u.error),code:c(null===(m=u.error)||void 0===m?void 0:m.code),severity:r.ERROR});{const t=Object.assign({},u.page_info);e({terminals:(null===(n=u.data)||void 0===n?void 0:n.map((t=>new p(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return a({error:t.message||t,code:s,severity:r.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new n}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:this.errorMessage,severity:r.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({accountId:this.accountId,authToken:this.authToken,service:new u}))}render(){return i(d,{key:"77cb67def2cb91b1fbf00059d13a255eae014b12"},i("terminals-list-core",{key:"697cafa1c343e20f36dff0404209c4832fa6a2ff",getTerminals:this.getTerminals,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{l as justifi_terminals_list}
@@ -1 +1 @@
1
- import{h as t,r as e,c as s}from"./p-CV0Pyo1O.js";import{c as r,a as i,F as n}from"./p-DiJD6Iqx.js";import{f as o}from"./p-B09GVew-.js";import"./p-DVJaoI_m.js";import{C as a,a as u}from"./p-Cjcsf8ku.js";import{R as h,l}from"./p-DpkIbI5R.js";import"./p-CLHwhyvu.js";import"./p-CHJTjG_5.js";import"./p-BH0Xfn-F.js";import{B as c}from"./p-BqL4QuAa.js";import{S as m}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{P as d}from"./p-y-FoILTI.js";import{m as p}from"./p-D0PhRMmy.js";import{c as f,J as y}from"./p-DLLFAj4z.js";import{g as v,a as j}from"./p-D2muobcE.js";import{A as w}from"./p-y8av3w9x.js";import{S as b}from"./p-DaZF_q9T.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-D8GTwl9v.js";import"./p-DkoufM1t.js";import"./p-DrquDBSk.js";import"./p-ZkBwsSuI.js";const I=t=>{const e=+t;return i().required("Amount is required").test("max-amount",`Refund amount cannot be more than payment amount: ${o(e)}`,(function(t){return+t<=+e})).test("min-amount","Refund amount must be greater than 0",(function(t){return+t>0}))},T=t=>{if(t)return r({amount:I(t),description:i().optional(),reason:i().optional().oneOf([h.customerRequest,h.duplicate,h.fraudulent],"Select a reason")})},k=[{label:"Select a reason",value:""},{label:"Customer requested a refund",value:"customer_request"},{label:"Customer was double-charged",value:"duplicate"},{label:"Payment was reported as fraud",value:"fraudulent"}],D=w();class C{async postRefund(t,e,s,r){return D.post({endpoint:`payments/${t}/refunds`,headers:{"Sub-Account":e},body:r,authToken:s})}}const S=w();class g{async postVoid(t,e,s){return S.post({endpoint:`payments/${t}/void`,headers:{"Sub-Account":e},authToken:s})}}const x=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(b,{width:"100%",height:"40px"}))),A=()=>t(m,null,t("div",{class:"row gap-5"},t(x,null),t(x,null),t(x,null))),R=class{constructor(t){e(this,t),this.errorEvent=s(this,"error-event",7),this.submitEvent=s(this,"submit-event",7),this.refundPayload={},this.displayAmount="",this.errors={},this.paymentLoading=!0,this.refundLoading=!1,this.hideSubmitButton=!1,this.inputHandler=(t,e)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}componentWillLoad(){f(),this.analytics=new y(this),this.initializeApi(),this.formController=new n(T())}handleError(t,e,s){this.errorEvent.emit({errorCode:t,message:e,severity:s})}checkAmount(t){return t>0}handleInvalidAmount(){this.submitDisabled=!0,this.handleError(u.INVALID_REFUND_AMOUNT,"Refund amount must be greater than 0",a.ERROR)}isPaymentCreatedWithin25Minutes(){var t;if(!this.payment||!(null===(t=this.payment)||void 0===t?void 0:t.created_at))return!1;const e=new Date(this.payment.created_at);return((new Date).getTime()-e.getTime())/6e4<=25}initializeFormController(){const t=this.refundPayload.amount,e=t?t.toString():"0";this.formController=new n(T(e)),this.formController.setInitialValues({amount:e}),this.formController.values.subscribe((t=>{this.refundPayload=Object.assign({},t)})),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.paymentId&&this.authToken?p({id:this.paymentId,authToken:this.authToken,service:new d})({onSuccess:({payment:t})=>{this.payment=t,this.refundPayload=new l({amount:t.amount_refundable})},onError:({error:t,code:e,severity:s})=>{this.handleError(e,t,s)},final:()=>{this.checkAmount(this.refundPayload.amount)?this.initializeFormController():this.handleInvalidAmount(),this.paymentLoading=!1}}):this.handleError(u.MISSING_PROPS,"Payment ID and Auth Token are required",a.ERROR)}async refundPayment(t){if(t&&t.preventDefault(),!await this.formController.validate())return;const e=this.formController.values.getValue();return this.refundLoading=!0,this.isPaymentCreatedWithin25Minutes()?this.tryVoidPayment():this.processRefund(e)}async tryVoidPayment(){const t=(({authToken:t,accountId:e,paymentId:s,service:r})=>async({onSuccess:i,onError:n,final:o})=>{var u;try{const o=await r.postVoid(s,e,t);if(o.error)return n({error:j(o.error),code:v(null===(u=o.error)||void 0===u?void 0:u.code),severity:a.ERROR});i(o)}catch(t){const e=v(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:a.ERROR})}finally{return o()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new g});return new Promise((e=>{let s,r=!1;const i=this.formController.values.getValue();t({onSuccess:t=>{s=t,r=!0},onError:({error:t,code:s,severity:n})=>{r=!0,this.handleError(t,s,n),this.processRefund(i).then(e)},final:()=>{s&&!s.error&&r&&(this.submitEvent.emit({response:s}),this.submitDisabled=!0,this.refundLoading=!1,e(s.data))}})}))}async processRefund(t){const e=(({authToken:t,accountId:e,paymentId:s,service:r})=>async({refundBody:i,onSuccess:n,onError:o,final:u})=>{var h;try{const u=await r.postRefund(s,e,t,i);if(u.error)return o({error:j(u.error),code:v(null===(h=u.error)||void 0===h?void 0:h.code),severity:a.ERROR});n(u)}catch(t){const e=v(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:a.ERROR})}finally{return u()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new C});return new Promise((s=>{let r;e({refundBody:t,onSuccess:t=>{r=t},onError:({error:t,code:e,severity:s})=>{r=t,this.handleError(t,e,s)},final:()=>{this.submitEvent.emit({response:r}),this.submitDisabled=!0,this.refundLoading=!1,s(r.data)}})}))}render(){if(this.paymentLoading)return t(A,null);const e=this.formController.getInitialValues(),s=this.refundPayload.amount;return t(m,null,t("form",null,t("fieldset",null,t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-monetary",{name:"amount",label:"Refund Amount",defaultValue:e.amount,inputHandler:this.inputHandler,errorText:this.errors.amount})),t("div",{class:"col-12"},t("form-control-select",{name:"reason",label:"Reason for refund (optional)",defaultValue:e.reason,inputHandler:this.inputHandler,options:k,errorText:this.errors.reason})),t("div",{class:"col-12"},t("form-control-textarea",{name:"description",label:"Note (optional)",defaultValue:e.description,inputHandler:this.inputHandler,maxLength:250,errorText:this.errors.description})),t("div",{class:"form-group d-flex flex-row-reverse"},t(c,{variant:"primary",type:"submit",onClick:this.refundPayment.bind(this),isLoading:this.paymentLoading||this.refundLoading,hidden:this.hideSubmitButton,disabled:this.submitDisabled},`Refund ${o(+s)}`))))))}};export{R as justifi_refund_payment}
1
+ import{h as t,r as e,c as s}from"./p-CV0Pyo1O.js";import{c as r,a as i,F as n}from"./p-DiJD6Iqx.js";import{f as o}from"./p-B09GVew-.js";import"./p-DVJaoI_m.js";import{C as a,a as u}from"./p-Cjcsf8ku.js";import{R as h,l}from"./p-C0dMwnDO.js";import"./p-CLHwhyvu.js";import"./p-GgW1g7FQ.js";import"./p-BH0Xfn-F.js";import{B as c}from"./p-BqL4QuAa.js";import{S as m}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{P as d}from"./p-DKemQxaE.js";import{m as p}from"./p-By-Mu1IX.js";import{c as f,J as v}from"./p-C3RQHKL5.js";import{g as y,a as j}from"./p-D2muobcE.js";import{A as w}from"./p-y8av3w9x.js";import{S as b}from"./p-DaZF_q9T.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-D8GTwl9v.js";import"./p-DkoufM1t.js";import"./p-DrquDBSk.js";import"./p-CekpA_KC.js";const C=t=>{const e=+t;return i().required("Amount is required").test("max-amount",`Refund amount cannot be more than payment amount: ${o(e)}`,(function(t){return+t<=+e})).test("min-amount","Refund amount must be greater than 0",(function(t){return+t>0}))},g=t=>{if(t)return r({amount:C(t),description:i().optional(),reason:i().optional().oneOf([h.customerRequest,h.duplicate,h.fraudulent],"Select a reason")})},k=[{label:"Select a reason",value:""},{label:"Customer requested a refund",value:"customer_request"},{label:"Customer was double-charged",value:"duplicate"},{label:"Payment was reported as fraud",value:"fraudulent"}],D=w();class I{async postRefund(t,e,s,r){return D.post({endpoint:`payments/${t}/refunds`,headers:{"Sub-Account":e},body:r,authToken:s})}}const T=w();class x{async postVoid(t,e,s){return T.post({endpoint:`payments/${t}/void`,headers:{"Sub-Account":e},authToken:s})}}const A=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(b,{width:"100%",height:"40px"}))),S=()=>t(m,null,t("div",{class:"row gap-5"},t(A,null),t(A,null),t(A,null))),q=class{constructor(t){e(this,t),this.errorEvent=s(this,"error-event",7),this.submitEvent=s(this,"submit-event",7),this.refundPayload={},this.displayAmount="",this.errors={},this.paymentLoading=!0,this.refundLoading=!1,this.hideSubmitButton=!1,this.inputHandler=(t,e)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}componentWillLoad(){f(),this.analytics=new v(this),this.initializeApi(),this.formController=new n(g())}handleError(t,e,s){this.errorEvent.emit({errorCode:t,message:e,severity:s})}checkAmount(t){return t>0}handleInvalidAmount(){this.submitDisabled=!0,this.handleError(u.INVALID_REFUND_AMOUNT,"Refund amount must be greater than 0",a.ERROR)}isPaymentCreatedWithin25Minutes(){var t;if(!this.payment||!(null===(t=this.payment)||void 0===t?void 0:t.created_at))return!1;const e=new Date(this.payment.created_at);return((new Date).getTime()-e.getTime())/6e4<=25}initializeFormController(){const t=this.refundPayload.amount,e=t?t.toString():"0";this.formController=new n(g(e)),this.formController.setInitialValues({amount:e}),this.formController.values.subscribe((t=>{this.refundPayload=Object.assign({},t)})),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.paymentId&&this.authToken?p({id:this.paymentId,authToken:this.authToken,service:new d})({onSuccess:({payment:t})=>{this.payment=t,this.refundPayload=new l({amount:t.amount_refundable})},onError:({error:t,code:e,severity:s})=>{this.handleError(e,t,s)},final:()=>{this.checkAmount(this.refundPayload.amount)?this.initializeFormController():this.handleInvalidAmount(),this.paymentLoading=!1}}):this.handleError(u.MISSING_PROPS,"Payment ID and Auth Token are required",a.ERROR)}async refundPayment(t){if(t&&t.preventDefault(),!await this.formController.validate())return;const e=this.formController.values.getValue();return this.refundLoading=!0,this.isPaymentCreatedWithin25Minutes()?this.tryVoidPayment():this.processRefund(e)}async tryVoidPayment(){const t=(({authToken:t,accountId:e,paymentId:s,service:r})=>async({onSuccess:i,onError:n,final:o})=>{var u;try{const o=await r.postVoid(s,e,t);if(o.error)return n({error:j(o.error),code:y(null===(u=o.error)||void 0===u?void 0:u.code),severity:a.ERROR});i(o)}catch(t){const e=y(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:a.ERROR})}finally{return o()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new x});return new Promise((e=>{let s,r=!1;const i=this.formController.values.getValue();t({onSuccess:t=>{s=t,r=!0},onError:({error:t,code:s,severity:n})=>{r=!0,this.handleError(t,s,n),this.processRefund(i).then(e)},final:()=>{s&&!s.error&&r&&(this.submitEvent.emit({response:s}),this.submitDisabled=!0,this.refundLoading=!1,e(s.data))}})}))}async processRefund(t){const e=(({authToken:t,accountId:e,paymentId:s,service:r})=>async({refundBody:i,onSuccess:n,onError:o,final:u})=>{var h;try{const u=await r.postRefund(s,e,t,i);if(u.error)return o({error:j(u.error),code:y(null===(h=u.error)||void 0===h?void 0:h.code),severity:a.ERROR});n(u)}catch(t){const e=y(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:a.ERROR})}finally{return u()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new I});return new Promise((s=>{let r;e({refundBody:t,onSuccess:t=>{r=t},onError:({error:t,code:e,severity:s})=>{r=t,this.handleError(t,e,s)},final:()=>{this.submitEvent.emit({response:r}),this.submitDisabled=!0,this.refundLoading=!1,s(r.data)}})}))}render(){if(this.paymentLoading)return t(S,null);const e=this.formController.getInitialValues(),s=this.refundPayload.amount;return t(m,null,t("form",null,t("fieldset",null,t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-monetary",{name:"amount",label:"Refund Amount",defaultValue:e.amount,inputHandler:this.inputHandler,errorText:this.errors.amount})),t("div",{class:"col-12"},t("form-control-select",{name:"reason",label:"Reason for refund (optional)",defaultValue:e.reason,inputHandler:this.inputHandler,options:k,errorText:this.errors.reason})),t("div",{class:"col-12"},t("form-control-textarea",{name:"description",label:"Note (optional)",defaultValue:e.description,inputHandler:this.inputHandler,maxLength:250,errorText:this.errors.description})),t("div",{class:"form-group d-flex flex-row-reverse"},t(c,{variant:"primary",type:"submit",onClick:this.refundPayment.bind(this),isLoading:this.paymentLoading||this.refundLoading,hidden:this.hideSubmitButton,disabled:this.submitDisabled},`Refund ${o(+s)}`))))))}};export{q as justifi_refund_payment}
@@ -1 +1 @@
1
- import{r as t,c as s,h as e}from"./p-CV0Pyo1O.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import"./p-DpkIbI5R.js";import{p as a}from"./p-CLHwhyvu.js";import"./p-CHJTjG_5.js";import"./p-BH0Xfn-F.js";import{T as i,a as r,b as h,c as o,d as c,e as n,f as p,g as d,h as u,i as f,j as m,k as b,l as g}from"./p-CAZzU98o.js";import{T as j}from"./p-CZfYo5-1.js";import{c as k,a as y}from"./p-CruQSM5j.js";import{o as l,g as C}from"./p-CpGEMRkH.js";import"./p-D8GTwl9v.js";import"./p-B09GVew-.js";import"./p-DkoufM1t.js";import"./p-DrquDBSk.js";import"./p-ztF3Y786.js";import"./p-BZ4YUsyP.js";const w=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.checkouts=[],this.subAccounts=[],this.loading=!0,this.paging=a,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:j.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:j.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const e=this.checkouts.find((t=>t.id===s));this.clickEvent.emit({name:j.row,data:e})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.checkoutsTable=new i(this.checkouts,this.columns,k,y),this.getCheckouts&&this.getSubAccounts&&this.fetchData(),l("set",(()=>{this.pagingParams={}})),l("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getCheckouts({params:this.checkoutParams,onSuccess:async({checkouts:t,pagingInfo:s})=>{this.checkouts=t,this.paging=s,this.checkoutsTable.collectionData=this.checkouts,this.checkoutsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.checkouts=this.checkouts.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get checkoutParams(){const t=C();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.checkouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.checkouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.checkoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e(g,{key:"54239d9ac3afe4d4594d523f9b84b5bf852190b7"},e(r,{key:"0c466e435625f08326fc521690c055648a0d3a6e"},e(h,{key:"6ac0b1a9bf3d42eb5bac5910f341c84a75d15eaa"},e(o,{key:"171cc43a933be88dcfe2385414d6368755a66a00"},this.checkoutsTable.columnData.map((t=>t)))),e(c,{key:"238b814cfb2e27fa0ae0aee319da04fb7a9da477"},e(n,{key:"3e73b173a14edea582ee06caa248dd31bf7e8971",columnSpan:this.checkoutsTable.columnKeys.length,isLoading:this.loading}),e(p,{key:"cd2ec244aa3663f4255f245727790c30c28438f7",isEmpty:this.showEmptyState,columnSpan:this.checkoutsTable.columnKeys.length}),e(d,{key:"e2f458e70836a01cca79aa6e43c7d8a89bfa593d",columnSpan:this.checkoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.checkoutsTable.rowData.map(((t,s)=>e(u,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e(f,{key:"97d1c34429fba943a752e9ece7348dd19d742c68"},e(m,{key:"252e8f76070a8a6a531c710cf36117a04625271a"},e(b,{key:"a3fcfa5e6a90cac15348a387f65fa5b7ed2517f8",colSpan:this.checkoutsTable.columnData.length},e("pagination-menu",{key:"e4fa2774647748fd12c3742b3dd078aee8fdf483",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getCheckouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{w as checkouts_list_core}
1
+ import{r as t,c as s,h as e}from"./p-CV0Pyo1O.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import"./p-C0dMwnDO.js";import{p as a}from"./p-CLHwhyvu.js";import"./p-GgW1g7FQ.js";import"./p-BH0Xfn-F.js";import{T as i,a as r,b as h,c as o,d as c,e as n,f as p,g as d,h as u,i as f,j as m,k as b,l as g}from"./p-CAZzU98o.js";import{T as j}from"./p-CZfYo5-1.js";import{c as k,a as y}from"./p-CruQSM5j.js";import{o as l,g as C}from"./p-CpGEMRkH.js";import"./p-D8GTwl9v.js";import"./p-B09GVew-.js";import"./p-DkoufM1t.js";import"./p-DrquDBSk.js";import"./p-ztF3Y786.js";import"./p-BZ4YUsyP.js";const w=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.checkouts=[],this.subAccounts=[],this.loading=!0,this.paging=a,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:j.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:j.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const e=this.checkouts.find((t=>t.id===s));this.clickEvent.emit({name:j.row,data:e})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.checkoutsTable=new i(this.checkouts,this.columns,k,y),this.getCheckouts&&this.getSubAccounts&&this.fetchData(),l("set",(()=>{this.pagingParams={}})),l("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getCheckouts({params:this.checkoutParams,onSuccess:async({checkouts:t,pagingInfo:s})=>{this.checkouts=t,this.paging=s,this.checkoutsTable.collectionData=this.checkouts,this.checkoutsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.checkouts=this.checkouts.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get checkoutParams(){const t=C();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.checkouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.checkouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.checkoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e(g,{key:"54239d9ac3afe4d4594d523f9b84b5bf852190b7"},e(r,{key:"0c466e435625f08326fc521690c055648a0d3a6e"},e(h,{key:"6ac0b1a9bf3d42eb5bac5910f341c84a75d15eaa"},e(o,{key:"171cc43a933be88dcfe2385414d6368755a66a00"},this.checkoutsTable.columnData.map((t=>t)))),e(c,{key:"238b814cfb2e27fa0ae0aee319da04fb7a9da477"},e(n,{key:"3e73b173a14edea582ee06caa248dd31bf7e8971",columnSpan:this.checkoutsTable.columnKeys.length,isLoading:this.loading}),e(p,{key:"cd2ec244aa3663f4255f245727790c30c28438f7",isEmpty:this.showEmptyState,columnSpan:this.checkoutsTable.columnKeys.length}),e(d,{key:"e2f458e70836a01cca79aa6e43c7d8a89bfa593d",columnSpan:this.checkoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.checkoutsTable.rowData.map(((t,s)=>e(u,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e(f,{key:"97d1c34429fba943a752e9ece7348dd19d742c68"},e(m,{key:"252e8f76070a8a6a531c710cf36117a04625271a"},e(b,{key:"a3fcfa5e6a90cac15348a387f65fa5b7ed2517f8",colSpan:this.checkoutsTable.columnData.length},e("pagination-menu",{key:"e4fa2774647748fd12c3742b3dd078aee8fdf483",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getCheckouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{w as checkouts_list_core}
@@ -0,0 +1 @@
1
+ import{h as t,r as e,c as a}from"./p-CV0Pyo1O.js";import{c as i}from"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{C as s,a as o}from"./p-Cjcsf8ku.js";import{i as r}from"./p-C0dMwnDO.js";import{p as c}from"./p-CLHwhyvu.js";import"./p-GgW1g7FQ.js";import"./p-BH0Xfn-F.js";import{c as n,J as p}from"./p-C3RQHKL5.js";import{g as d,a as h}from"./p-D2muobcE.js";import{P as l}from"./p-m_Ly-YPk.js";import{T as f,l as u,a as m,b as y,c as b,d as _,e as w,f as j,g as k,h as v,i as T,j as g,k as C}from"./p-CAZzU98o.js";import{S as D}from"./p-BqNNwq6C.js";import{T as P}from"./p-CZfYo5-1.js";import{a as S}from"./p-B09GVew-.js";import{P as I,Q as q}from"./p-DrquDBSk.js";import"./p-D8GTwl9v.js";import"./p-DkoufM1t.js";import"./p-CekpA_KC.js";import"./p-y8av3w9x.js";import"./p-ztF3Y786.js";const O={id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of each transaction"},"ID"),account_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the account associated with each transaction"},"Account ID"),payout_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the payout associated with each transaction"},"Payout ID"),financial_transaction_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),amount:()=>t("th",{part:I,scope:"col",title:"The dollar amount of each transaction"},"Amount"),fee:()=>t("th",{part:I,scope:"col",title:"The fee associated with each transaction"},"Fee"),net:()=>t("th",{part:I,scope:"col",title:"The net amount of each transaction"},"Net"),currency:()=>t("th",{part:I,scope:"col",title:"The currency of each transaction"},"Currency"),description:()=>t("th",{part:I,scope:"col",title:"The description of each transaction"},"Description"),source_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),txn_type:()=>t("th",{part:I,scope:"col",title:"The type of each transaction"},"Type"),created_at:()=>t("th",{part:I,scope:"col",title:"The date and time each transaction was made"},"Processed On"),available_on:()=>t("th",{part:I,scope:"col",title:"The date and time each transaction will be available"},"Available On"),updated_at:()=>t("th",{part:I,scope:"col",title:"The date and time each transaction was last updated"},"Updated On")},A={fee:"Fee",payment:"Payment",payout:"Payout",seller_payment_refund:"Seller Payment Refund",dispute_amount_collected:"Dispute Amount Collected",dispute_fee_collected:"Dispute Fee Collected",seller_payment:"Seller Payment",transfer:"Transfer",partner_platform_proceeds_credit:"Partner Platform Proceeds Credit"},E={id:e=>t("td",{part:q(e.id)},e.id),account_id:e=>t("td",{part:q(e.account_id)},e.account_id),payout_id:e=>t("td",{part:q(e.payout_id)},e.payout_id),financial_transaction_id:e=>t("td",{part:q(e.financial_transaction_id)},e.financial_transaction_id),amount:e=>t("td",{part:q(e.amount)},e.formattedPaymentAmount(e.amount)),fee:e=>t("td",{part:q(e.fee)},e.formattedPaymentAmount(e.fee)),net:e=>t("td",{part:q(e.net)},e.formattedPaymentAmount(e.net)),currency:e=>t("td",{part:q(e.currency)},e.currency),description:e=>t("td",{part:q(e.description)},e.description),source_id:e=>t("td",{part:q(e.source_id)},e.source_id),txn_type:e=>t("td",{part:q(e.txn_type)},A[e.txn_type]),created_at:e=>t("td",{part:q(e.created_at)},t("div",{class:"fw-bold"},S(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},S(e.created_at,{showTime:!0}))),available_on:e=>t("td",{part:q(e.available_on)},t("div",{class:"fw-bold"},S(e.available_on,{showDisplayDate:!0})),t("div",{class:"fw-bold"},S(e.available_on,{showTime:!0}))),updated_at:e=>t("td",{part:q(e.updated_at)},t("div",{class:"fw-bold"},S(e.updated_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},S(e.updated_at,{showTime:!0})))},F=class{constructor(t){e(this,t),this.clickEvent=a(this,"click-event",7),this.errorEvent=a(this,"error-event",7),this.balanceTransactions=[],this.isLoading=!0,this.errorMessage=null,this.paging=c,this.pagingParams={},this.columns="created_at,txn_type,description,amount,fee,net",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 a=this.balanceTransactions.find((t=>t.id===e));this.clickEvent.emit({name:P.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,O,E),n(),this.analytics=new p(this),this.initializeApi()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeApi()}handleError(t,e,a){this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:e,severity:a})}initializeApi(){this.payoutId&&this.authToken?(({accountId:t,authToken:e,service:a})=>async({params:i,onSuccess:o,onError:c,final:n})=>{var p;try{const n=await a.fetchPayoutTransactions(t,e,i);n.error?c({error:h(n.error),code:d(null===(p=n.error)||void 0===p?void 0:p.code),severity:s.ERROR}):o({balanceTransactions:n.data.map((t=>new r(t))),pagingInfo:Object.assign({},n.page_info)})}catch(t){const e=d(null==t?void 0:t.code);c({error:h(t),code:e,severity:s.ERROR})}finally{n()}})({accountId:i.accountId,authToken:this.authToken,service:new l})({params:this.requestParams,onSuccess:({balanceTransactions:t,pagingInfo:e})=>{this.balanceTransactions=t,this.paging=e,this.transactionsTable.collectionData=this.balanceTransactions},onError:({error:t,code:e,severity:a})=>{this.errorMessage=t.message,this.handleError(t,e,a)},final:()=>{this.isLoading=!1}}):(this.errorMessage="payout-id and auth-token props are required",this.handleError(o.MISSING_PROPS,this.errorMessage,s.ERROR))}get entityId(){return this.balanceTransactions.map((t=>t.id))}get showEmptyState(){return!this.isLoading&&!this.errorMessage&&this.transactionsTable.rowData.length<1}get showErrorState(){return!this.isLoading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.isLoading}get requestParams(){return Object.assign({payout_id:this.payoutId,limit:"15"},this.pagingParams)}render(){return t(D,{key:"0a993aa9157e9ea6f75a4c745dd2751ab22d0623"},t(u,{key:"56a300b72bb39bf9aa4d9829f1634e5a48b71b15"},t(m,{key:"7d3f9fc3159ea7568bd2904ed74a5d90198eecb7"},t(y,{key:"106703b0ed82206aca0b18a1217fbdad9316cca0"},t(b,{key:"3d01490dc673358566747dd3aac4c61d1f8681f9"},this.transactionsTable.columnData.map((t=>t)))),t(_,{key:"a1bf3cc192ef3434ff4626390f33361a984e276f"},t(w,{key:"edaf059907492b9911bfe11f6ae476711db7200f",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(j,{key:"b75807ecc951d0e62993b905246c3e58d676bb7c",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(k,{key:"7d759684cb4f42733028e734479ba2000495dcee",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(v,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(T,{key:"a657e7edf27d011926e2228b7a55ba6fb05f9dff"},t(g,{key:"c1c592833f527432b53d42cca3a70637065b1918"},t(C,{key:"b4dba89aa35e7632a9442ad3e804cdd3946377f7",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"935a7f48b344774fb6058de565a135ae70deb80e",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],payoutId:["propChanged"],authToken:["propChanged"]}}};export{F as justifi_payout_transactions_list}
@@ -1 +1 @@
1
- import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-Bde7dY9t.js";import{f as s,p as i,c as r}from"./p-Dw63wyhO.js";import{w as l,x as d,y as o,z as p}from"./p-DrquDBSk.js";import{S as c}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import{d as n}from"./p-DpkIbI5R.js";import"./p-CLHwhyvu.js";import"./p-CHJTjG_5.js";import"./p-BH0Xfn-F.js";import"./p-BFTU3MAI.js";import"./p-D8GTwl9v.js";import"./p-B09GVew-.js";import"./p-DkoufM1t.js";const m=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{s[e]=a}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({terminal_id:this.terminalId,status:this.terminalStatus,terminal_order_id:this.terminalOrderId}).forEach((([e,a])=>{a&&(i[e]=a)}))}get terminalStatusOptions(){return[{label:"All",value:""},{label:"Connected",value:n.connected},{label:"Disconnected",value:n.disconnected},{label:"Unknown",value:n.unknown},{label:"Pending Configuration",value:n.pending_configuration},{label:"Archived",value:n.archived}]}render(){const e=Object.assign({},s);return a(c,{key:"146cbb4a0639065d7723a263949eedc218d34b63"},a("table-filters-menu",{key:"1b8e6fb88510892460f2abc033ce789873e242ab",params:e,clearParams:r,part:l},a("div",{key:"23fbd301095d1b64e93d0fef917685b93f1217a9",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"c6b956c17ee92cc991cb6adc5011e8039e210f6b",class:"p-2"},a("form-control-text",{key:"fc3df51433901eb7a499941e3ef525401c7cd5ca",name:"terminal_id",label:"Terminal ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalId||s.terminal_id,disabled:!!this.terminalId,part:d})),a("div",{key:"390b8a12e9a381cdf4747562ee4d7607255df3ce",class:"p-2"},a("form-control-text",{key:"92305b137d07d2ee8a351019599bb000d7d32cdd",name:"terminal_order_id",label:"Terminal Order ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalOrderId||s.terminal_order_id,disabled:!!this.terminalOrderId,part:o})),a("div",{key:"3197e7bf6a95621246281898d3e6d66625c30646",class:"p-2"},a("form-control-select",{key:"92dc3fb1ef44a0e9d9a455c5fa7a6fe5ee075395",name:"status",label:"Status",options:this.terminalStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.terminalStatus||s.status||"",disabled:!!this.terminalStatus,part:p})))))}};export{m as justifi_terminals_list_filters}
1
+ import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-Bde7dY9t.js";import{f as s,p as i,c as r}from"./p-Dw63wyhO.js";import{w as l,x as d,y as o,z as p}from"./p-DrquDBSk.js";import{S as c}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import{d as n}from"./p-C0dMwnDO.js";import"./p-CLHwhyvu.js";import"./p-GgW1g7FQ.js";import"./p-BH0Xfn-F.js";import"./p-BFTU3MAI.js";import"./p-D8GTwl9v.js";import"./p-B09GVew-.js";import"./p-DkoufM1t.js";const m=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{s[e]=a}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({terminal_id:this.terminalId,status:this.terminalStatus,terminal_order_id:this.terminalOrderId}).forEach((([e,a])=>{a&&(i[e]=a)}))}get terminalStatusOptions(){return[{label:"All",value:""},{label:"Connected",value:n.connected},{label:"Disconnected",value:n.disconnected},{label:"Unknown",value:n.unknown},{label:"Pending Configuration",value:n.pending_configuration},{label:"Archived",value:n.archived}]}render(){const e=Object.assign({},s);return a(c,{key:"146cbb4a0639065d7723a263949eedc218d34b63"},a("table-filters-menu",{key:"1b8e6fb88510892460f2abc033ce789873e242ab",params:e,clearParams:r,part:l},a("div",{key:"23fbd301095d1b64e93d0fef917685b93f1217a9",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"c6b956c17ee92cc991cb6adc5011e8039e210f6b",class:"p-2"},a("form-control-text",{key:"fc3df51433901eb7a499941e3ef525401c7cd5ca",name:"terminal_id",label:"Terminal ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalId||s.terminal_id,disabled:!!this.terminalId,part:d})),a("div",{key:"390b8a12e9a381cdf4747562ee4d7607255df3ce",class:"p-2"},a("form-control-text",{key:"92305b137d07d2ee8a351019599bb000d7d32cdd",name:"terminal_order_id",label:"Terminal Order ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalOrderId||s.terminal_order_id,disabled:!!this.terminalOrderId,part:o})),a("div",{key:"3197e7bf6a95621246281898d3e6d66625c30646",class:"p-2"},a("form-control-select",{key:"92dc3fb1ef44a0e9d9a455c5fa7a6fe5ee075395",name:"status",label:"Status",options:this.terminalStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.terminalStatus||s.status||"",disabled:!!this.terminalStatus,part:p})))))}};export{m as justifi_terminals_list_filters}
@@ -1 +1 @@
1
- import{r as e,h as t}from"./p-CV0Pyo1O.js";import{c as s,F as a}from"./p-DiJD6Iqx.js";import{y as i,z as r,h as l,l as d,j as c,v as o}from"./p-BhvkOTYA.js";import{an as n}from"./p-DrquDBSk.js";import{S as f}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{H as h}from"./p-C3E-JbVM.js";import{S as b}from"./p-CHJTjG_5.js";import"./p-BFTU3MAI.js";import"./p-Ce785aMx.js";import"./p-BAu40WfT.js";const m=class{constructor(t){e(this,t),this.errors={},this.inputHandler=(e,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:t}))}}componentWillLoad(){this.formController=new a(s({name:o.required("Enter full name"),address_line1:c.nullable(),address_line2:d.nullable(),address_city:l.nullable(),address_state:r.nullable(),address_postal_code:i.nullable()}))}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(),errors:this.formController.errors.getValue()}}render(){const e=this.formController.getInitialValues();return t(f,{key:"1ad536d9f27bdb1cb3da9721c486cd4f1006ecb1"},t("div",{key:"b1589bbc4bba3703c54e6a5651aaad5499c218f4",part:n,class:"mt-4"},t("form",{key:"d60bc906ec293d45c1887c0864ff4c1f28845461"},t("fieldset",{key:"166465d844cbfb0d55dae03d88b52ad202d1616c"},this.legend&&t("legend",{key:"509d5e560791fb6f96a5e755931fd7a363b21e06"},this.legend),t("div",{key:"979e4bae922ff88aae107d921136215474a847ea",class:"row gy-3"},t("div",{key:"4014b6c65739d39077d69f0e649eec0fadab0c87",class:"col-12"},t("form-control-text",{key:"2e9e1dbb43ffdd9848415ceefc8df75ec60a35e0",name:"name",label:"Full Name",defaultValue:e.name,errorText:this.errors.name,inputHandler:this.inputHandler})))))))}},u=class{constructor(t){e(this,t),this.errors={},this.inputHandler=(e,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:t}))}}componentWillLoad(){this.formController=new a(s({name:o.required("Enter full name"),address_line1:c.required("Enter street address"),address_line2:d.nullable(),address_city:l.required("Enter city"),address_state:r.required("Select state"),address_postal_code:i.required("Enter postal code")})),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(),errors:this.formController.errors.getValue()}}render(){if(!this.formController)return null;const e=this.formController.getInitialValues();return t(f,null,t("div",{part:n,class:"mt-4"},t(h,{text:"Billing address",class:"fs-6 fw-bold lh-lg mb-4"}),t("form",null,t("fieldset",null,this.legend&&t("legend",null,this.legend),t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-text",{name:"name",label:"Full Name",defaultValue:e.name,errorText:this.errors.name,inputHandler:this.inputHandler})),t("div",{class:"col-12"},t("form-control-text",{name:"address_line1",label:"Street Address",defaultValue:e.address_line1,errorText:this.errors.address_line1,inputHandler:this.inputHandler})),t("div",{class:"col-12"},t("form-control-text",{name:"address_line2",label:"Apartment, Suite, etc. (optional)",defaultValue:e.address_line2,errorText:this.errors.address_line2,inputHandler:this.inputHandler})),t("div",{class:"col-12"},t("form-control-text",{name:"address_city",label:"City",defaultValue:e.address_city,errorText:this.errors.address_city,inputHandler:this.inputHandler})),t("div",{class:"col-12"},t("form-control-select",{name:"address_state",label:"State",options:b,defaultValue:e.address_state,errorText:this.errors.address_state,inputHandler:this.inputHandler})),t("div",{class:"col-12"},t("form-control-text",{name:"address_postal_code",label:"Postal Code",defaultValue:e.address_postal_code,errorText:this.errors.address_postal_code,inputHandler:this.inputHandler,maxLength:7})))))))}},p=class{constructor(t){e(this,t),this.errors={},this.inputHandler=(e,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:t}))}}componentWillLoad(){this.formController=new a(s({name:o.nullable(),address_line1:c.nullable(),address_line2:d.nullable(),address_city:l.nullable(),address_state:r.nullable(),address_postal_code:i.required("Enter postal code")}))}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(),errors:this.formController.errors.getValue()}}render(){const e=this.formController.getInitialValues();return t(f,{key:"5d685e6a8e7b22780431b4f2315a95c43766242e"},t("div",{key:"c71d5e6b49162ff2c21cd7b9ee0e9951c264034e",part:n},t("form",{key:"a935f2ee1999afe079c13bd3b0e3b2b5225c12d2"},t("fieldset",{key:"1808d8afc17a22d4156534dc7e54af8350d406b4"},this.legend&&t("legend",{key:"c73a35b4311515cf57d6ed5193056a9197cddaa9"},this.legend),t("div",{key:"a36b221db49c567f6fc5e20af2a60fd30eeb4568",class:"row gy-3"},t("div",{key:"907f29bec68ac9d43fd66f28226b87f2003efbaa",class:"col-12"},t("form-control-text",{key:"93024133c94fc8eb2f1a34073ea7945d873420c4",name:"address_postal_code",label:"Postal Code",defaultValue:e.address_postal_code,errorText:this.errors.address_postal_code,inputHandler:this.inputHandler,maxLength:7})))))))}};export{m as justifi_bank_account_billing_form_simple,u as justifi_billing_form_full,p as justifi_card_billing_form_simple}
1
+ import{r as e,h as t}from"./p-CV0Pyo1O.js";import{c as s,F as a}from"./p-DiJD6Iqx.js";import{y as i,z as r,h as l,l as d,j as c,v as o}from"./p-ygekUw3Q.js";import{an as n}from"./p-DrquDBSk.js";import{S as f}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{H as h}from"./p-C3E-JbVM.js";import{S as b}from"./p-GgW1g7FQ.js";import"./p-BFTU3MAI.js";import"./p-B1AMrMly.js";import"./p-BZbvHgMz.js";const m=class{constructor(t){e(this,t),this.errors={},this.inputHandler=(e,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:t}))}}componentWillLoad(){this.formController=new a(s({name:o.required("Enter full name"),address_line1:c.nullable(),address_line2:d.nullable(),address_city:l.nullable(),address_state:r.nullable(),address_postal_code:i.nullable()}))}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(),errors:this.formController.errors.getValue()}}render(){const e=this.formController.getInitialValues();return t(f,{key:"1ad536d9f27bdb1cb3da9721c486cd4f1006ecb1"},t("div",{key:"b1589bbc4bba3703c54e6a5651aaad5499c218f4",part:n,class:"mt-4"},t("form",{key:"d60bc906ec293d45c1887c0864ff4c1f28845461"},t("fieldset",{key:"166465d844cbfb0d55dae03d88b52ad202d1616c"},this.legend&&t("legend",{key:"509d5e560791fb6f96a5e755931fd7a363b21e06"},this.legend),t("div",{key:"979e4bae922ff88aae107d921136215474a847ea",class:"row gy-3"},t("div",{key:"4014b6c65739d39077d69f0e649eec0fadab0c87",class:"col-12"},t("form-control-text",{key:"2e9e1dbb43ffdd9848415ceefc8df75ec60a35e0",name:"name",label:"Full Name",defaultValue:e.name,errorText:this.errors.name,inputHandler:this.inputHandler})))))))}},u=class{constructor(t){e(this,t),this.errors={},this.inputHandler=(e,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:t}))}}componentWillLoad(){this.formController=new a(s({name:o.required("Enter full name"),address_line1:c.required("Enter street address"),address_line2:d.nullable(),address_city:l.required("Enter city"),address_state:r.required("Select state"),address_postal_code:i.required("Enter postal code")})),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(),errors:this.formController.errors.getValue()}}render(){if(!this.formController)return null;const e=this.formController.getInitialValues();return t(f,null,t("div",{part:n,class:"mt-4"},t(h,{text:"Billing address",class:"fs-6 fw-bold lh-lg mb-4"}),t("form",null,t("fieldset",null,this.legend&&t("legend",null,this.legend),t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-text",{name:"name",label:"Full Name",defaultValue:e.name,errorText:this.errors.name,inputHandler:this.inputHandler})),t("div",{class:"col-12"},t("form-control-text",{name:"address_line1",label:"Street Address",defaultValue:e.address_line1,errorText:this.errors.address_line1,inputHandler:this.inputHandler})),t("div",{class:"col-12"},t("form-control-text",{name:"address_line2",label:"Apartment, Suite, etc. (optional)",defaultValue:e.address_line2,errorText:this.errors.address_line2,inputHandler:this.inputHandler})),t("div",{class:"col-12"},t("form-control-text",{name:"address_city",label:"City",defaultValue:e.address_city,errorText:this.errors.address_city,inputHandler:this.inputHandler})),t("div",{class:"col-12"},t("form-control-select",{name:"address_state",label:"State",options:b,defaultValue:e.address_state,errorText:this.errors.address_state,inputHandler:this.inputHandler})),t("div",{class:"col-12"},t("form-control-text",{name:"address_postal_code",label:"Postal Code",defaultValue:e.address_postal_code,errorText:this.errors.address_postal_code,inputHandler:this.inputHandler,maxLength:7})))))))}},p=class{constructor(t){e(this,t),this.errors={},this.inputHandler=(e,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:t}))}}componentWillLoad(){this.formController=new a(s({name:o.nullable(),address_line1:c.nullable(),address_line2:d.nullable(),address_city:l.nullable(),address_state:r.nullable(),address_postal_code:i.required("Enter postal code")}))}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(),errors:this.formController.errors.getValue()}}render(){const e=this.formController.getInitialValues();return t(f,{key:"5d685e6a8e7b22780431b4f2315a95c43766242e"},t("div",{key:"c71d5e6b49162ff2c21cd7b9ee0e9951c264034e",part:n},t("form",{key:"a935f2ee1999afe079c13bd3b0e3b2b5225c12d2"},t("fieldset",{key:"1808d8afc17a22d4156534dc7e54af8350d406b4"},this.legend&&t("legend",{key:"c73a35b4311515cf57d6ed5193056a9197cddaa9"},this.legend),t("div",{key:"a36b221db49c567f6fc5e20af2a60fd30eeb4568",class:"row gy-3"},t("div",{key:"907f29bec68ac9d43fd66f28226b87f2003efbaa",class:"col-12"},t("form-control-text",{key:"93024133c94fc8eb2f1a34073ea7945d873420c4",name:"address_postal_code",label:"Postal Code",defaultValue:e.address_postal_code,errorText:this.errors.address_postal_code,inputHandler:this.inputHandler,maxLength:7})))))))}};export{m as justifi_bank_account_billing_form_simple,u as justifi_billing_form_full,p as justifi_card_billing_form_simple}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i}from"./p-CV0Pyo1O.js";import{P as o}from"./p-Bz97Ujvk.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{C as r,a as e}from"./p-Cjcsf8ku.js";import{e as p}from"./p-DpkIbI5R.js";import"./p-CLHwhyvu.js";import"./p-CHJTjG_5.js";import"./p-BH0Xfn-F.js";import{g as a,a as h}from"./p-D2muobcE.js";import{E as n}from"./p-COcg4_A3.js";import{c as m,J as c}from"./p-DLLFAj4z.js";import{m as u}from"./p-DYGIC0QH.js";import"./p-y8av3w9x.js";import"./p-B09GVew-.js";import"./p-D8GTwl9v.js";import"./p-DkoufM1t.js";import"./p-DrquDBSk.js";import"./p-ZkBwsSuI.js";const d=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.enableRecordClick=!1,this.errorMessage=null,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){m(),this.analytics=new c(this),this.initializeServices()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeServices()}initializeServices(){this.payoutId&&this.authToken?(this.getPayout=(({id:t,authToken:s,service:i})=>async({onSuccess:o,onError:e})=>{var n;try{const m=await i.fetchPayout(t,s);m.error?e({error:h(m.error),code:a(null===(n=m.error)||void 0===n?void 0:n.code),severity:r.ERROR}):o(new p(m.data))}catch(t){e({error:h(t),code:a(null==t?void 0:t.code),severity:r.ERROR})}})({id:this.payoutId,authToken:this.authToken,service:new o}),this.getPayoutCSV=u({authToken:this.authToken,service:new o})):(this.errorMessage="Failed to load payout details. payoutId or authToken is not provided.",this.errorEvent.emit({message:this.errorMessage,errorCode:e.MISSING_PROPS,severity:r.ERROR}))}render(){return this.errorMessage?n(this.errorMessage):i("payout-details-core",{getPayout:this.getPayout,getPayoutCSV:this.getPayoutCSV,"onError-event":this.handleErrorEvent,enableRecordClick:this.enableRecordClick})}static get watchers(){return{payoutId:["propChanged"],authToken:["propChanged"]}}};export{d as justifi_payout_details}
1
+ import{r as t,c as s,h as i}from"./p-CV0Pyo1O.js";import{P as o}from"./p-m_Ly-YPk.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{C as r,a as e}from"./p-Cjcsf8ku.js";import{e as p}from"./p-C0dMwnDO.js";import"./p-CLHwhyvu.js";import"./p-GgW1g7FQ.js";import"./p-BH0Xfn-F.js";import{g as a,a as h}from"./p-D2muobcE.js";import{E as n}from"./p-COcg4_A3.js";import{c as m,J as c}from"./p-C3RQHKL5.js";import{m as d}from"./p-DYGIC0QH.js";import"./p-y8av3w9x.js";import"./p-B09GVew-.js";import"./p-D8GTwl9v.js";import"./p-DkoufM1t.js";import"./p-DrquDBSk.js";import"./p-CekpA_KC.js";const u=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.enableRecordClick=!1,this.errorMessage=null,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){m(),this.analytics=new c(this),this.initializeServices()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeServices()}initializeServices(){this.payoutId&&this.authToken?(this.getPayout=(({id:t,authToken:s,service:i})=>async({onSuccess:o,onError:e})=>{var n;try{const m=await i.fetchPayout(t,s);m.error?e({error:h(m.error),code:a(null===(n=m.error)||void 0===n?void 0:n.code),severity:r.ERROR}):o(new p(m.data))}catch(t){e({error:h(t),code:a(null==t?void 0:t.code),severity:r.ERROR})}})({id:this.payoutId,authToken:this.authToken,service:new o}),this.getPayoutCSV=d({authToken:this.authToken,service:new o})):(this.errorMessage="Failed to load payout details. payoutId or authToken is not provided.",this.errorEvent.emit({message:this.errorMessage,errorCode:e.MISSING_PROPS,severity:r.ERROR}))}render(){return this.errorMessage?n(this.errorMessage):i("payout-details-core",{getPayout:this.getPayout,getPayoutCSV:this.getPayoutCSV,"onError-event":this.handleErrorEvent,enableRecordClick:this.enableRecordClick})}static get watchers(){return{payoutId:["propChanged"],authToken:["propChanged"]}}};export{u as justifi_payout_details}
@@ -1 +1 @@
1
- import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-Bde7dY9t.js";import"./p-DVJaoI_m.js";import{c as s,a as l}from"./p-B09GVew-.js";import"./p-Cjcsf8ku.js";import{I as c,a as i}from"./p-DpkIbI5R.js";import"./p-CLHwhyvu.js";import"./p-CHJTjG_5.js";import"./p-BH0Xfn-F.js";import{f as o,p as r,c as d}from"./p-CpGEMRkH.js";import{a as p,b as f,s as m,p as b,d as u,e as n}from"./p-DrquDBSk.js";import{S as h}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import"./p-BFTU3MAI.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";import"./p-DkoufM1t.js";const k=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{o[e]=a},this.handleDateInput=(e,a)=>{const t=s(a,{setExactTime:!0});this.setParamsOnChange(e,t)}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({status:this.checkoutStatus,payment_mode:this.paymentMode,checkout_id:this.checkoutId,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([e,a])=>{a&&(r[e]=a)}))}get checkoutStatusOptions(){return[{label:"All",value:""},{label:"Created",value:c.created},{label:"Completed",value:c.completed},{label:"Attempted",value:c.attempted},{label:"Expired",value:c.expired}]}get checkoutPaymentModeOptions(){return[{label:"All",value:""},{label:"E-commerce",value:i.ecom},{label:"BNPL",value:i.bnpl},{label:"Apple Pay",value:i.apple_pay}]}render(){const e=Object.assign({},o);return a(h,{key:"026d871e88f893ee2d565b13c72bdafaeedc1f9c"},a("table-filters-menu",{key:"a64b6212c54729cf08d0211720b815837187018b",params:e,clearParams:d,part:p},a("div",{key:"11897ce900abc322fa0107516d350f53a857aa1c",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"9f926a008dc275e53aa1d82c09410e4f65b4221e",class:"p-2"},a("form-control-text",{key:"57020a2320f442a0ee0a6ffa443f88dea855b651",name:"checkout_id",label:"Checkout ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.checkoutId||o.checkout_id,disabled:!!this.checkoutId,part:f})),a("div",{key:"40c6e5e2e342573fcb6e1f34309e324ca2a9ee2c",class:"p-2"},a("form-control-select",{key:"7c70d0d6bdc322fc9682b3c64393778642fe8ad4",name:"status",label:"Status",options:this.checkoutStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.checkoutStatus||o.status||"",disabled:!!this.checkoutStatus,part:m})),a("div",{key:"51eb0d4cf8d3f9643af1f5fb8ef2e0908ebb18d3",class:"p-2"},a("form-control-select",{key:"47352ceaa0f989533c366d68228cc2752ef12fec",name:"payment_mode",label:"Payment Mode",options:this.checkoutPaymentModeOptions,inputHandler:this.setParamsOnChange,defaultValue:this.paymentMode||o.payment_mode||"",disabled:!!this.paymentMode,part:b})),a("div",{key:"cee7d5487e1b4f6dd6c25230c012d69b97326392",class:"p-2"},a("form-control-date",{key:"0b6e3821eda78c9dca9797d965020636ab31c9b9",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:l(this.createdAfter,{showInputDateTime:!0})||l(o.created_after,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdAfter,part:u})),a("div",{key:"d4b38febbc6763c828761bb5eab3594bd3c29f9d",class:"p-2"},a("form-control-date",{key:"3729809c6ec729c2c2887d722e16e29a9f405b09",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:l(this.createdBefore,{showInputDateTime:!0})||l(o.created_before,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdBefore,part:n})))))}};export{k as justifi_checkouts_list_filters}
1
+ import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-Bde7dY9t.js";import"./p-DVJaoI_m.js";import{c as s,a as l}from"./p-B09GVew-.js";import"./p-Cjcsf8ku.js";import{I as c,a as i}from"./p-C0dMwnDO.js";import"./p-CLHwhyvu.js";import"./p-GgW1g7FQ.js";import"./p-BH0Xfn-F.js";import{f as o,p as d,c as r}from"./p-CpGEMRkH.js";import{a as p,b as f,s as m,p as b,d as u,e as n}from"./p-DrquDBSk.js";import{S as h}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import"./p-BFTU3MAI.js";import"./p-D8GTwl9v.js";import"./p-HXpYMWUU.js";import"./p-DkoufM1t.js";const k=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{o[e]=a},this.handleDateInput=(e,a)=>{const t=s(a,{setExactTime:!0});this.setParamsOnChange(e,t)}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({status:this.checkoutStatus,payment_mode:this.paymentMode,checkout_id:this.checkoutId,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([e,a])=>{a&&(d[e]=a)}))}get checkoutStatusOptions(){return[{label:"All",value:""},{label:"Created",value:c.created},{label:"Completed",value:c.completed},{label:"Attempted",value:c.attempted},{label:"Expired",value:c.expired}]}get checkoutPaymentModeOptions(){return[{label:"All",value:""},{label:"E-commerce",value:i.ecom},{label:"BNPL",value:i.bnpl},{label:"Apple Pay",value:i.apple_pay}]}render(){const e=Object.assign({},o);return a(h,{key:"026d871e88f893ee2d565b13c72bdafaeedc1f9c"},a("table-filters-menu",{key:"a64b6212c54729cf08d0211720b815837187018b",params:e,clearParams:r,part:p},a("div",{key:"11897ce900abc322fa0107516d350f53a857aa1c",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"9f926a008dc275e53aa1d82c09410e4f65b4221e",class:"p-2"},a("form-control-text",{key:"57020a2320f442a0ee0a6ffa443f88dea855b651",name:"checkout_id",label:"Checkout ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.checkoutId||o.checkout_id,disabled:!!this.checkoutId,part:f})),a("div",{key:"40c6e5e2e342573fcb6e1f34309e324ca2a9ee2c",class:"p-2"},a("form-control-select",{key:"7c70d0d6bdc322fc9682b3c64393778642fe8ad4",name:"status",label:"Status",options:this.checkoutStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.checkoutStatus||o.status||"",disabled:!!this.checkoutStatus,part:m})),a("div",{key:"51eb0d4cf8d3f9643af1f5fb8ef2e0908ebb18d3",class:"p-2"},a("form-control-select",{key:"47352ceaa0f989533c366d68228cc2752ef12fec",name:"payment_mode",label:"Payment Mode",options:this.checkoutPaymentModeOptions,inputHandler:this.setParamsOnChange,defaultValue:this.paymentMode||o.payment_mode||"",disabled:!!this.paymentMode,part:b})),a("div",{key:"cee7d5487e1b4f6dd6c25230c012d69b97326392",class:"p-2"},a("form-control-date",{key:"0b6e3821eda78c9dca9797d965020636ab31c9b9",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:l(this.createdAfter,{showInputDateTime:!0})||l(o.created_after,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdAfter,part:u})),a("div",{key:"d4b38febbc6763c828761bb5eab3594bd3c29f9d",class:"p-2"},a("form-control-date",{key:"3729809c6ec729c2c2887d722e16e29a9f405b09",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:l(this.createdBefore,{showInputDateTime:!0})||l(o.created_before,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdBefore,part:n})))))}};export{k as justifi_checkouts_list_filters}
@@ -1 +1 @@
1
- import{r as e,c as t,h as s}from"./p-CV0Pyo1O.js";import{f as i}from"./p-B09GVew-.js";import{B as a,am as d}from"./p-DrquDBSk.js";import{B as r}from"./p-BqL4QuAa.js";import{S as o}from"./p-BqNNwq6C.js";import{S as c}from"./p-DaZF_q9T.js";import"./p-CZfYo5-1.js";import{C as n,a as h}from"./p-Cjcsf8ku.js";import{g as p,a as f}from"./p-D2muobcE.js";import{D as u}from"./p-BXdZKjdB.js";import{D as l}from"./p-Bg2SZArf.js";import{c as b,J as y}from"./p-DLLFAj4z.js";import"./p-HXpYMWUU.js";import"./p-y8av3w9x.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-DpkIbI5R.js";import"./p-BH0Xfn-F.js";import"./p-DkoufM1t.js";import"./p-CLHwhyvu.js";import"./p-CHJTjG_5.js";import"./p-ZkBwsSuI.js";const v=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:d,final:r=()=>{}})=>{var o;try{const r=await s.submitDisputeResponse(t,e,i);if(r.error){return d({error:f(r.error),code:p(null===(o=r.error)||void 0===o?void 0:o.code),severity:n.ERROR})}a(r)}catch(e){const t=p(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:n.ERROR})}finally{return r()}},m=class{constructor(s){e(this,s),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.submitEvent=t(this,"submit-event",7)}acceptDispute(){v({disputeId:this.dispute.id,authToken:this.authToken,service:new u})({payload:{forfeit:!0},onSuccess:e=>{this.submitEvent.emit({response:e})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}})}initiateRespondToDispute(){this.clickEvent.emit({name:l.respondToDispute})}isDueDatePassed(){var e;if(!(null===(e=this.dispute)||void 0===e?void 0:e.due_date))return!1;const t=new Date(this.dispute.due_date.replace(/-/g,"/").replace(/T.+/,"")),s=new Date;return s.setHours(0,0,0,0),t.setHours(0,0,0,0),t<s}render(){var e,t,n,h,p,f,u,l,b;return s(o,{key:"f73a27de0f7e01960cfe78a5b81b021b22eaf2c6"},this.isLoading&&s("div",{key:"ca2c47a78d302e09cd60434eb2a0146787f7ac45",style:{marginBottom:"8px"}},s(c,{key:"e7c3318f1ecaae82727ec3620e5ba65f25692552",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(c,{key:"3313a4d5ba47766076e5c13cde8f1500fdcfa4a0",height:"18px",styles:{marginBottom:"8px"}}),s(c,{key:"94d2c92beaf52499cea87b3e04a37284898ce4d9",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&this.isDueDatePassed()&&s("div",{key:"fe66f1d00863607cbb457953c4880e4bdc4442ae",part:a},s("h1",{key:"1cf8c42bdb942391c65e67db8a0da0ff4c618249",class:"h4",part:d},"The due date (",null===(t=this.dispute)||void 0===t?void 0:t.due_date,") for this dispute has passed"),s("p",{key:"18643d72965f197edcf40c2053325df9dedf47fb"},"You can no longer submit evidence to counter this dispute.")),(null===(n=this.dispute)||void 0===n?void 0:n.needsResponse)&&!this.isDueDatePassed()&&s("div",{key:"096b7b976ddebd49a6ab5067ef5b4f07e06e145d",part:a},s("h1",{key:"06010bc9881b4cd9bd91399784ff9169e730784f",class:"h4",part:d},"This payment is disputed"),s("p",{key:"aca40b62cfe60ca69ebecd59d9d1c5c3cfd1b227"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"81f1fe8ec625b44d7bf251f4fbf5a4ac1dea2a41",class:"h5"},"Dispute details"),s("div",{key:"b5269224135805abb32164911ef682ed9524a35b",class:"d-table gap-2"},s("div",{key:"b90a2c3028003119fdb23f6e0cd8a3f965f9d58b",class:"d-table-row gap-2"},s("span",{key:"24967d47583c83333966ad788e8d4d388f32bf3a",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"a1bc338abb575e5dc496bec2f7199d36d3015d68",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(h=this.dispute)||void 0===h?void 0:h.amount))),s("div",{key:"c45e0cc9efcf743d9b981d17d9628b243892d27e",class:"d-table-row gap-2"},s("span",{key:"d326adc2bfe3fbd9d67fc4d9d82e1545490d274a",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"eaa16df97b9fd1b4963c2561bc5b7eb7892dafb4",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(p=this.dispute)||void 0===p?void 0:p.reason)),s("div",{key:"58999fa8fd18509f29d7233ca7255e2a033139b3",class:"d-table-row gap-2"},s("span",{key:"b35f041be173d792e81c3da3992104a0ede2bf91",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Due Date"),s("span",{key:"eea5132a629528830dd6a3c68ca773848c89cb95",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(f=this.dispute)||void 0===f?void 0:f.due_date))),s("div",{key:"f4975381aad6ed61a674e7a907632790e0ecf399",class:"d-flex gap-2 mt-4 justify-content-end"},s(r,{key:"875c8fe451dbf7bb3817be6ab2ab3b919bb6b783",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(r,{key:"a4725c6ee3c18785e91d5ce82c3fbdb35029040a",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(u=this.dispute)||void 0===u?void 0:u.underReview)&&s("div",{key:"d02264536dd7f23a7beea17feb42bd6923551b23"},s("h1",{key:"ed9411ef96ba5aa6f3a84b622c3b8a07990352ef",class:"h4"},"This payment is disputed and under review"),s("p",{key:"6cd2edfa3e2f5cf3beccbb4fcaef09997c1d00fd"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(l=this.dispute)||void 0===l?void 0:l.won)&&s("div",{key:"f1fbf9b5fddf71bde59e76456fda138b306df968"},s("h1",{key:"8763399559fd6ead94c3b20e7ea5a81243eeb19c",class:"h4"},"This payment was disputed"),s("p",{key:"840285c4091a71fc719b3c9184aaffef0ab48be7"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(b=this.dispute)||void 0===b?void 0:b.lost)&&s("div",{key:"b453c75a2fba5e8145c62d0d89b75d7757375ba1"},s("h1",{key:"5d17f60d1e60a001edf80d9f0ded44c41cd394a6",class:"h4"},"This payment was disputed"),s("p",{key:"221cdcd0a330f02dff18dd7f8875ace480be68ed"},"The cardholder disputed this payment and the card issuer has settled it in their favor.")))}},k=class{constructor(s){e(this,s),this.errorEvent=t(this,"error-event",7),this.errorMessage=null,this.apiOrigin="https://wc-proxy.justifi.ai",this.handleErrorEvent=e=>{this.errorMessage=e.detail.message,this.errorEvent.emit(e.detail)}}componentWillLoad(){b(),this.analytics=new y(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeDisputeServiceMethods()}initializeDisputeServiceMethods(){this.disputeId&&this.authToken?(this.updateDisputeResponse=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:d,final:r=()=>{}})=>{var o;try{const r=await s.updateDisputeResponse(t,e,i);if(r.error)return d({error:f(r.error),code:p(null===(o=r.error)||void 0===o?void 0:o.code),severity:n.ERROR});a(r)}catch(e){const t=p(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:n.ERROR})}finally{return r()}})({disputeId:this.disputeId,authToken:this.authToken,service:new u}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:d,final:r=()=>{}})=>{var o;try{const r=await s.createDisputeEvidence(t,e,i);if(r.error)return d({error:f(r.error),code:p(null===(o=r.error)||void 0===o?void 0:o.code),severity:n.ERROR});a(r)}catch(e){const t=p(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:n.ERROR})}finally{return r()}})({disputeId:this.disputeId,authToken:this.authToken,service:new u}),this.submitDisputeResponse=v({disputeId:this.disputeId,authToken:this.authToken,service:new u})):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:h.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return s(o,{key:"68bf041be58383d3df181d84e0773bb71fd4ed96"},s("justifi-dispute-response-core",{key:"76af71dd1a21bedf10406aa2cd6d93bfad5b5746","onError-event":this.handleErrorEvent,"dispute-id":this.disputeId,disputeResponse:this.disputeResponse,createDisputeEvidence:this.createDisputeEvidence,updateDisputeResponse:this.updateDisputeResponse,submitDisputeResponse:this.submitDisputeResponse}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}},w=class{constructor(i){e(this,i),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.submitEvent=t(this,"submit-event",7),this.disputeResponse={},this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.componentStepMapping=[()=>s("justifi-product-or-service",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-customer-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-cancellation-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-refund-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-duplicate-charge",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-electronic-evidence",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-shipping-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-additional-statement",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors})],this.saveData=async(e,t)=>{if(Object.keys(e).length)return this.isLastStep?this.submitDisputeResponse({payload:e,onSuccess:e=>{this.submitEvent.emit({response:e}),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}}):this.updateDisputeResponse({payload:e,onSuccess:e=>{this.disputeResponse=Object.assign({},e.data),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}});this.stepCompleteEvent.emit({response:null,formStep:t})},this.initializeMakePresignedURLs=async()=>{const e=this.documentList.map((e=>this.getPresignedFileUrl(e)));return await Promise.all(e)},this.initializeFileUploads=async()=>{const e=this.documentList.map((e=>this.uploadDocument(e)));return Promise.all(e)},this.getPresignedFileUrl=async e=>this.createDisputeEvidence({payload:{file_name:e.file_name,file_type:e.file_type,dispute_evidence_type:e.dispute_evidence_type},onSuccess:t=>{e.presignedUrl=t.data.presigned_url},onError:({error:t,code:s,severity:i})=>{const a={[e.dispute_evidence_type]:t};this.documentErrors=Object.assign(Object.assign({},this.documentErrors),a),this.errorEvent.emit({errorCode:s,message:t,severity:i})}}),this.uploadDocument=async e=>{const t=await e.getFileString();if(!e.presignedUrl)throw new Error("Presigned URL is not set");return await fetch(e.presignedUrl,{method:"PUT",body:t})},this.handleSubmit=async(e,t,s)=>{if(this.isLoading=!0,t.length){if(this.documentErrors={},this.documentList=t,await this.initializeMakePresignedURLs(),Object.keys(this.documentErrors).length)throw this.isLoading=!1,new Error("Could not presign all documents");await this.initializeFileUploads()}await this.saveData(e,s),this.isLoading=!1},this.onCancel=()=>{this.clickEvent.emit({name:l.cancelDispute})},this.onBack=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.previousStep}),await this.handleSubmit(e,t,s),this.currentStep--}))},this.onNext=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.nextStep}),await this.handleSubmit(e,t,s),this.currentStep++}))},this.onSubmit=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.submit});const i=Object.assign(Object.assign({},e),{forfeit:!1});await this.handleSubmit(i,t,s)}))}}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}get isLastStep(){return this.currentStep===this.componentStepMapping.length-1}get isFirstStep(){return 0===this.currentStep}render(){return s("div",{key:"8b0f0f810ad0bbc57489862ae5159fae8cbad746",class:"row gy-3"},s("div",{key:"ca6e73df82123a344b4a28efae395e8b9c931258",class:"col-12"},s("h1",{key:"bb78dcfd69d0b747cf1b1865bf463518ae18b442",class:"h4",part:d},"Counter dispute")),s("div",{key:"7179e0a6fdb89024d613f897db2cf313255494fd",class:"col-12"},this.currentStepComponent),s("div",{key:"9219e8b3213c494adef926077f35c298588053c0",class:"col-12"},s("div",{key:"73c2fd1a8440c19f468610ec02a7cfa6eddecb7e",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(r,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(r,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(r,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(r,{variant:"primary",onClick:()=>this.onNext(),disabled:this.isLoading,isLoading:this.isLoading},"Next"))))}};export{m as justifi_dispute_notification,k as justifi_dispute_response,w as justifi_dispute_response_core}
1
+ import{r as e,c as t,h as s}from"./p-CV0Pyo1O.js";import{f as i}from"./p-B09GVew-.js";import{B as a,am as d}from"./p-DrquDBSk.js";import{B as r}from"./p-BqL4QuAa.js";import{S as o}from"./p-BqNNwq6C.js";import{S as c}from"./p-DaZF_q9T.js";import"./p-CZfYo5-1.js";import{C as n,a as h}from"./p-Cjcsf8ku.js";import{g as p,a as f}from"./p-D2muobcE.js";import{D as u}from"./p--cI8fPJx.js";import{D as l}from"./p-Bg2SZArf.js";import{c as b,J as y}from"./p-C3RQHKL5.js";import"./p-HXpYMWUU.js";import"./p-y8av3w9x.js";import"./p-DVJaoI_m.js";import"./p-D8GTwl9v.js";import"./p-C0dMwnDO.js";import"./p-BH0Xfn-F.js";import"./p-DkoufM1t.js";import"./p-CLHwhyvu.js";import"./p-GgW1g7FQ.js";import"./p-CekpA_KC.js";const v=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:d,final:r=()=>{}})=>{var o;try{const r=await s.submitDisputeResponse(t,e,i);if(r.error){return d({error:f(r.error),code:p(null===(o=r.error)||void 0===o?void 0:o.code),severity:n.ERROR})}a(r)}catch(e){const t=p(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:n.ERROR})}finally{return r()}},m=class{constructor(s){e(this,s),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.submitEvent=t(this,"submit-event",7)}acceptDispute(){v({disputeId:this.dispute.id,authToken:this.authToken,service:new u})({payload:{forfeit:!0},onSuccess:e=>{this.submitEvent.emit({response:e})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}})}initiateRespondToDispute(){this.clickEvent.emit({name:l.respondToDispute})}isDueDatePassed(){var e;if(!(null===(e=this.dispute)||void 0===e?void 0:e.due_date))return!1;const t=new Date(this.dispute.due_date.replace(/-/g,"/").replace(/T.+/,"")),s=new Date;return s.setHours(0,0,0,0),t.setHours(0,0,0,0),t<s}render(){var e,t,n,h,p,f,u,l,b;return s(o,{key:"f73a27de0f7e01960cfe78a5b81b021b22eaf2c6"},this.isLoading&&s("div",{key:"ca2c47a78d302e09cd60434eb2a0146787f7ac45",style:{marginBottom:"8px"}},s(c,{key:"e7c3318f1ecaae82727ec3620e5ba65f25692552",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(c,{key:"3313a4d5ba47766076e5c13cde8f1500fdcfa4a0",height:"18px",styles:{marginBottom:"8px"}}),s(c,{key:"94d2c92beaf52499cea87b3e04a37284898ce4d9",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&this.isDueDatePassed()&&s("div",{key:"fe66f1d00863607cbb457953c4880e4bdc4442ae",part:a},s("h1",{key:"1cf8c42bdb942391c65e67db8a0da0ff4c618249",class:"h4",part:d},"The due date (",null===(t=this.dispute)||void 0===t?void 0:t.due_date,") for this dispute has passed"),s("p",{key:"18643d72965f197edcf40c2053325df9dedf47fb"},"You can no longer submit evidence to counter this dispute.")),(null===(n=this.dispute)||void 0===n?void 0:n.needsResponse)&&!this.isDueDatePassed()&&s("div",{key:"096b7b976ddebd49a6ab5067ef5b4f07e06e145d",part:a},s("h1",{key:"06010bc9881b4cd9bd91399784ff9169e730784f",class:"h4",part:d},"This payment is disputed"),s("p",{key:"aca40b62cfe60ca69ebecd59d9d1c5c3cfd1b227"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"81f1fe8ec625b44d7bf251f4fbf5a4ac1dea2a41",class:"h5"},"Dispute details"),s("div",{key:"b5269224135805abb32164911ef682ed9524a35b",class:"d-table gap-2"},s("div",{key:"b90a2c3028003119fdb23f6e0cd8a3f965f9d58b",class:"d-table-row gap-2"},s("span",{key:"24967d47583c83333966ad788e8d4d388f32bf3a",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"a1bc338abb575e5dc496bec2f7199d36d3015d68",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(h=this.dispute)||void 0===h?void 0:h.amount))),s("div",{key:"c45e0cc9efcf743d9b981d17d9628b243892d27e",class:"d-table-row gap-2"},s("span",{key:"d326adc2bfe3fbd9d67fc4d9d82e1545490d274a",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"eaa16df97b9fd1b4963c2561bc5b7eb7892dafb4",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(p=this.dispute)||void 0===p?void 0:p.reason)),s("div",{key:"58999fa8fd18509f29d7233ca7255e2a033139b3",class:"d-table-row gap-2"},s("span",{key:"b35f041be173d792e81c3da3992104a0ede2bf91",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Due Date"),s("span",{key:"eea5132a629528830dd6a3c68ca773848c89cb95",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(f=this.dispute)||void 0===f?void 0:f.due_date))),s("div",{key:"f4975381aad6ed61a674e7a907632790e0ecf399",class:"d-flex gap-2 mt-4 justify-content-end"},s(r,{key:"875c8fe451dbf7bb3817be6ab2ab3b919bb6b783",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(r,{key:"a4725c6ee3c18785e91d5ce82c3fbdb35029040a",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(u=this.dispute)||void 0===u?void 0:u.underReview)&&s("div",{key:"d02264536dd7f23a7beea17feb42bd6923551b23"},s("h1",{key:"ed9411ef96ba5aa6f3a84b622c3b8a07990352ef",class:"h4"},"This payment is disputed and under review"),s("p",{key:"6cd2edfa3e2f5cf3beccbb4fcaef09997c1d00fd"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(l=this.dispute)||void 0===l?void 0:l.won)&&s("div",{key:"f1fbf9b5fddf71bde59e76456fda138b306df968"},s("h1",{key:"8763399559fd6ead94c3b20e7ea5a81243eeb19c",class:"h4"},"This payment was disputed"),s("p",{key:"840285c4091a71fc719b3c9184aaffef0ab48be7"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(b=this.dispute)||void 0===b?void 0:b.lost)&&s("div",{key:"b453c75a2fba5e8145c62d0d89b75d7757375ba1"},s("h1",{key:"5d17f60d1e60a001edf80d9f0ded44c41cd394a6",class:"h4"},"This payment was disputed"),s("p",{key:"221cdcd0a330f02dff18dd7f8875ace480be68ed"},"The cardholder disputed this payment and the card issuer has settled it in their favor.")))}},k=class{constructor(s){e(this,s),this.errorEvent=t(this,"error-event",7),this.errorMessage=null,this.apiOrigin="https://wc-proxy.justifi.ai",this.handleErrorEvent=e=>{this.errorMessage=e.detail.message,this.errorEvent.emit(e.detail)}}componentWillLoad(){b(),this.analytics=new y(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeDisputeServiceMethods()}initializeDisputeServiceMethods(){this.disputeId&&this.authToken?(this.updateDisputeResponse=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:d,final:r=()=>{}})=>{var o;try{const r=await s.updateDisputeResponse(t,e,i);if(r.error)return d({error:f(r.error),code:p(null===(o=r.error)||void 0===o?void 0:o.code),severity:n.ERROR});a(r)}catch(e){const t=p(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:n.ERROR})}finally{return r()}})({disputeId:this.disputeId,authToken:this.authToken,service:new u}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:d,final:r=()=>{}})=>{var o;try{const r=await s.createDisputeEvidence(t,e,i);if(r.error)return d({error:f(r.error),code:p(null===(o=r.error)||void 0===o?void 0:o.code),severity:n.ERROR});a(r)}catch(e){const t=p(null==e?void 0:e.code);return d({error:e.message||e,code:t,severity:n.ERROR})}finally{return r()}})({disputeId:this.disputeId,authToken:this.authToken,service:new u}),this.submitDisputeResponse=v({disputeId:this.disputeId,authToken:this.authToken,service:new u})):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:h.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return s(o,{key:"68bf041be58383d3df181d84e0773bb71fd4ed96"},s("justifi-dispute-response-core",{key:"76af71dd1a21bedf10406aa2cd6d93bfad5b5746","onError-event":this.handleErrorEvent,"dispute-id":this.disputeId,disputeResponse:this.disputeResponse,createDisputeEvidence:this.createDisputeEvidence,updateDisputeResponse:this.updateDisputeResponse,submitDisputeResponse:this.submitDisputeResponse}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}},w=class{constructor(i){e(this,i),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.submitEvent=t(this,"submit-event",7),this.disputeResponse={},this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.componentStepMapping=[()=>s("justifi-product-or-service",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-customer-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-cancellation-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-refund-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-duplicate-charge",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-electronic-evidence",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-shipping-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-additional-statement",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors})],this.saveData=async(e,t)=>{if(Object.keys(e).length)return this.isLastStep?this.submitDisputeResponse({payload:e,onSuccess:e=>{this.submitEvent.emit({response:e}),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}}):this.updateDisputeResponse({payload:e,onSuccess:e=>{this.disputeResponse=Object.assign({},e.data),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}});this.stepCompleteEvent.emit({response:null,formStep:t})},this.initializeMakePresignedURLs=async()=>{const e=this.documentList.map((e=>this.getPresignedFileUrl(e)));return await Promise.all(e)},this.initializeFileUploads=async()=>{const e=this.documentList.map((e=>this.uploadDocument(e)));return Promise.all(e)},this.getPresignedFileUrl=async e=>this.createDisputeEvidence({payload:{file_name:e.file_name,file_type:e.file_type,dispute_evidence_type:e.dispute_evidence_type},onSuccess:t=>{e.presignedUrl=t.data.presigned_url},onError:({error:t,code:s,severity:i})=>{const a={[e.dispute_evidence_type]:t};this.documentErrors=Object.assign(Object.assign({},this.documentErrors),a),this.errorEvent.emit({errorCode:s,message:t,severity:i})}}),this.uploadDocument=async e=>{const t=await e.getFileString();if(!e.presignedUrl)throw new Error("Presigned URL is not set");return await fetch(e.presignedUrl,{method:"PUT",body:t})},this.handleSubmit=async(e,t,s)=>{if(this.isLoading=!0,t.length){if(this.documentErrors={},this.documentList=t,await this.initializeMakePresignedURLs(),Object.keys(this.documentErrors).length)throw this.isLoading=!1,new Error("Could not presign all documents");await this.initializeFileUploads()}await this.saveData(e,s),this.isLoading=!1},this.onCancel=()=>{this.clickEvent.emit({name:l.cancelDispute})},this.onBack=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.previousStep}),await this.handleSubmit(e,t,s),this.currentStep--}))},this.onNext=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.nextStep}),await this.handleSubmit(e,t,s),this.currentStep++}))},this.onSubmit=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:l.submit});const i=Object.assign(Object.assign({},e),{forfeit:!1});await this.handleSubmit(i,t,s)}))}}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}get isLastStep(){return this.currentStep===this.componentStepMapping.length-1}get isFirstStep(){return 0===this.currentStep}render(){return s("div",{key:"8b0f0f810ad0bbc57489862ae5159fae8cbad746",class:"row gy-3"},s("div",{key:"ca6e73df82123a344b4a28efae395e8b9c931258",class:"col-12"},s("h1",{key:"bb78dcfd69d0b747cf1b1865bf463518ae18b442",class:"h4",part:d},"Counter dispute")),s("div",{key:"7179e0a6fdb89024d613f897db2cf313255494fd",class:"col-12"},this.currentStepComponent),s("div",{key:"9219e8b3213c494adef926077f35c298588053c0",class:"col-12"},s("div",{key:"73c2fd1a8440c19f468610ec02a7cfa6eddecb7e",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(r,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(r,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(r,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(r,{variant:"primary",onClick:()=>this.onNext(),disabled:this.isLoading,isLoading:this.isLoading},"Next"))))}};export{m as justifi_dispute_notification,k as justifi_dispute_response,w as justifi_dispute_response_core}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i}from"./p-CV0Pyo1O.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{C as o,a as r}from"./p-Cjcsf8ku.js";import{C as e}from"./p-DpkIbI5R.js";import"./p-CLHwhyvu.js";import"./p-CHJTjG_5.js";import"./p-BH0Xfn-F.js";import{g as c,a}from"./p-D2muobcE.js";import{c as p,J as n}from"./p-DLLFAj4z.js";import{C as h}from"./p-NO0z-S2W.js";import{m as u,S as m}from"./p-_LSWCi-4.js";import{S as j}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{d}from"./p-CruQSM5j.js";import"./p-D8GTwl9v.js";import"./p-B09GVew-.js";import"./p-DkoufM1t.js";import"./p-ZkBwsSuI.js";import"./p-y8av3w9x.js";import"./p-BZ4YUsyP.js";import"./p-DrquDBSk.js";const l=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.errorMessage=null,this.columns=d,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){p(),this.analytics=new n(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetCheckouts(),this.initializeGetSubAccounts()}initializeGetCheckouts(){this.accountId&&this.authToken?this.getCheckouts=(({accountId:t,authToken:s,service:i})=>async({params:r,onSuccess:p,onError:n})=>{var h,u;try{const m=await i.fetchCheckouts(t,s,r);if(m.error)return n({error:a(m.error),code:c(null===(u=m.error)||void 0===u?void 0:u.code),severity:o.ERROR});{const t=Object.assign({},m.page_info);p({checkouts:(null===(h=m.data)||void 0===h?void 0:h.map((t=>new e(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return n({error:t.message||t,code:s,severity:o.ERROR})}})({accountId:this.accountId,authToken:this.authToken,service:new h}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=u({accountId:this.accountId,authToken:this.authToken,service:new m}))}render(){return i(j,{key:"ca73ea731c52c9c238223a733492278ccd34078f"},i("checkouts-list-core",{key:"8eb27ccc63e947b0cc0d7e64fa13c242f5f1bac8",getCheckouts:this.getCheckouts,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{l as justifi_checkouts_list}
1
+ import{r as t,c as s,h as i}from"./p-CV0Pyo1O.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{C as o,a as r}from"./p-Cjcsf8ku.js";import{C as e}from"./p-C0dMwnDO.js";import"./p-CLHwhyvu.js";import"./p-GgW1g7FQ.js";import"./p-BH0Xfn-F.js";import{g as c,a}from"./p-D2muobcE.js";import{c as p,J as n}from"./p-C3RQHKL5.js";import{C as h}from"./p-MVBgKFOv.js";import{m as u,S as m}from"./p-D-07jgNC.js";import{S as j}from"./p-BqNNwq6C.js";import"./p-CZfYo5-1.js";import{d}from"./p-CruQSM5j.js";import"./p-D8GTwl9v.js";import"./p-B09GVew-.js";import"./p-DkoufM1t.js";import"./p-CekpA_KC.js";import"./p-y8av3w9x.js";import"./p-BZ4YUsyP.js";import"./p-DrquDBSk.js";const l=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.errorMessage=null,this.columns=d,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){p(),this.analytics=new n(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetCheckouts(),this.initializeGetSubAccounts()}initializeGetCheckouts(){this.accountId&&this.authToken?this.getCheckouts=(({accountId:t,authToken:s,service:i})=>async({params:r,onSuccess:p,onError:n})=>{var h,u;try{const m=await i.fetchCheckouts(t,s,r);if(m.error)return n({error:a(m.error),code:c(null===(u=m.error)||void 0===u?void 0:u.code),severity:o.ERROR});{const t=Object.assign({},m.page_info);p({checkouts:(null===(h=m.data)||void 0===h?void 0:h.map((t=>new e(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return n({error:t.message||t,code:s,severity:o.ERROR})}})({accountId:this.accountId,authToken:this.authToken,service:new h}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=u({accountId:this.accountId,authToken:this.authToken,service:new m}))}render(){return i(j,{key:"ca73ea731c52c9c238223a733492278ccd34078f"},i("checkouts-list-core",{key:"8eb27ccc63e947b0cc0d7e64fa13c242f5f1bac8",getCheckouts:this.getCheckouts,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{l as justifi_checkouts_list}
@@ -1 +1 @@
1
- import{r as e,c as t,h as s,H as a}from"./p-CV0Pyo1O.js";import{I as i}from"./p-Ce_F4E0f.js";import{R as d,S as o,T as r,U as l,V as c}from"./p-DrquDBSk.js";import{F as f}from"./p-CGKWIBVk.js";import"./p-CZfYo5-1.js";import{C as h}from"./p-CHJTjG_5.js";import{n}from"./p-BnjCmwMr.js";import{b,c as u}from"./p-Ce785aMx.js";const m=class{constructor(s){e(this,s),this.formControlInput=t(this,"formControlInput",7),this.formControlBlur=t(this,"formControlBlur",7),this.imask=null,this.isFocused=!1,this.inputHandler=()=>{},this.disabled=!1,this.initializeIMask=()=>{this.textInput&&(this.imask=i(this.textInput,{mask:this.mask}),this.imask.on("accept",(()=>{var e;const t=null===(e=this.imask)||void 0===e?void 0:e.unmaskedValue;void 0!==t&&this.inputHandler(this.name,t)})),this.textInput.addEventListener("blur",(()=>this.formControlBlur.emit())))},this.handleFormControlInput=e=>{var t;const s=e.target,a=s.getAttribute("name"),i=(null===(t=this.imask)||void 0===t?void 0:t.unmaskedValue)||s.value;this.formControlInput.emit({name:a,value:i})},this.updateInput=e=>{this.imask&&e&&(this.imask.value=String(e))}}handleDefaultValueChange(e){this.initializeIMask(),this.updateInput(e)}disconnectedCallback(){var e;null===(e=this.imask)||void 0===e||e.destroy()}componentDidLoad(){this.textInput&&(this.initializeIMask(),this.updateInput(this.defaultValue))}get part(){return this.errorText?d:this.disabled?o:this.isFocused?r:l}render(){return s(a,{key:"b9cd5f622f3473b22f48ee939884199f4102aa02"},s("div",{key:"c7ac55bf53f9b069a0f1997faee9df04b5efc48f",class:"form-group d-flex flex-column"},s("div",{key:"344f29000db4d633073536530f3fd312a7c65000",class:"d-flex align-items-start gap-2"},s("label",{key:"c58e246347c2bb8da3dafa10aeca23290ebdcbd2",part:c,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"7a32bf62aea68cca9a86f07e28ca58a0f386fdf4",helpText:this.helpText})),s("input",{key:"033f6ab25c31f4386733195a281de935b39aa7e5",ref:e=>this.textInput=e,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled}),s(f,{key:"9238f8d110a09bed1f5172991ed951399ea520b3",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}},v=class{constructor(t){e(this,t),this.country=h.USA}render(){var e,t,i,d,o,r,l,c,f,m;const v=u[this.country],p=b[this.country];return s(a,{key:"8dabbee93e0f319db333ada6c20af49ed6131b8d"},s("div",{key:"4b308ca9fa92321e5f60f3e4d9ab1c4e60cbd703",class:"row gy-3"},s("div",{key:"9c25eec2effd7caed70a3f02f6a780513fae930c",class:"col-12"},s("form-control-text",{key:"6c2ae178c2122d1f6085906690adadf98cb0774b",name:"line1",label:"Street Address",inputHandler:this.inputHandler,defaultValue:null===(e=this.defaultValues)||void 0===e?void 0:e.line1,errorText:null===(t=this.errors)||void 0===t?void 0:t.line1,helpText:"No PO Boxes."})),s("div",{key:"eba53a69fc4c869014ef8b7bf6ff9b1d8f5be566",class:"col-12"},s("form-control-text",{key:"11c743ce2388173c41cb16f1865fe58b2015d6bb",name:"line2",label:"Address Line 2 (optional)",inputHandler:this.inputHandler,defaultValue:null===(i=this.defaultValues)||void 0===i?void 0:i.line2,errorText:null===(d=this.errors)||void 0===d?void 0:d.line2})),s("div",{key:"2025c9bb15286f5c3e4693b596372a7dff730ce8",class:"col-12"},s("form-control-text",{key:"5e0e40fd028d12b88cb15a38906738320e30aeca",name:"city",label:"City",inputHandler:this.inputHandler,defaultValue:null===(o=this.defaultValues)||void 0===o?void 0:o.city,errorText:null===(r=this.errors)||void 0===r?void 0:r.city})),s("div",{key:"5ec53f357907749c9abdcf568c027b71faad19fa",class:"col-12"},s("form-control-select",{key:"b9eef22eb507ffbd58c26bffa41b5b225925297c",name:"state",label:v.stateLabel,options:p.stateOptions,inputHandler:this.inputHandler,defaultValue:null===(l=this.defaultValues)||void 0===l?void 0:l.state,errorText:null===(c=this.errors)||void 0===c?void 0:c.state})),s("div",{key:"7456cd4f6b62b59bc9289ca3721440083e9aa4f3",class:"col-12"},s("form-control-text",{key:"c483c93d0f09d5ded3c11145216273ba75822009",name:"postal_code",label:v.postalLabel,inputHandler:this.inputHandler,defaultValue:null===(f=this.defaultValues)||void 0===f?void 0:f.postal_code,errorText:null===(m=this.errors)||void 0===m?void 0:m.postal_code,maxLength:this.country===h.USA?5:7,keyDownHandler:this.country===h.USA?n:void 0}))))}},p=class{constructor(t){e(this,t),this.address={},this.inputHandler=(e,t)=>{this.address[e]=t,this.address=Object.assign({},this.address)}}handleAddressChange(e){this.handleFormUpdate(e)}render(){return s(a,{key:"1b644425472c68880a9be150d52029a64d75ea26"},s("justifi-form-address-fields",{key:"d5e95bc81c654d00a0fcac4760705bd21b3b8c8d",country:this.country,errors:this.errors,defaultValues:this.defaultValues,inputHandler:this.inputHandler}))}static get watchers(){return{address:["handleAddressChange"]}}};export{m as form_control_number_masked,v as justifi_form_address_fields,p as justifi_identity_address_form}
1
+ import{r as e,c as t,h as s,H as a}from"./p-CV0Pyo1O.js";import{I as i}from"./p-Ce_F4E0f.js";import{R as d,S as o,T as r,U as l,V as c}from"./p-DrquDBSk.js";import{F as f}from"./p-CGKWIBVk.js";import"./p-CZfYo5-1.js";import{C as h}from"./p-GgW1g7FQ.js";import{n}from"./p-BnjCmwMr.js";import{b,c as u}from"./p-B1AMrMly.js";const m=class{constructor(s){e(this,s),this.formControlInput=t(this,"formControlInput",7),this.formControlBlur=t(this,"formControlBlur",7),this.imask=null,this.isFocused=!1,this.inputHandler=()=>{},this.disabled=!1,this.initializeIMask=()=>{this.textInput&&(this.imask=i(this.textInput,{mask:this.mask}),this.imask.on("accept",(()=>{var e;const t=null===(e=this.imask)||void 0===e?void 0:e.unmaskedValue;void 0!==t&&this.inputHandler(this.name,t)})),this.textInput.addEventListener("blur",(()=>this.formControlBlur.emit())))},this.handleFormControlInput=e=>{var t;const s=e.target,a=s.getAttribute("name"),i=(null===(t=this.imask)||void 0===t?void 0:t.unmaskedValue)||s.value;this.formControlInput.emit({name:a,value:i})},this.updateInput=e=>{this.imask&&e&&(this.imask.value=String(e))}}handleDefaultValueChange(e){this.initializeIMask(),this.updateInput(e)}disconnectedCallback(){var e;null===(e=this.imask)||void 0===e||e.destroy()}componentDidLoad(){this.textInput&&(this.initializeIMask(),this.updateInput(this.defaultValue))}get part(){return this.errorText?d:this.disabled?o:this.isFocused?r:l}render(){return s(a,{key:"b9cd5f622f3473b22f48ee939884199f4102aa02"},s("div",{key:"c7ac55bf53f9b069a0f1997faee9df04b5efc48f",class:"form-group d-flex flex-column"},s("div",{key:"344f29000db4d633073536530f3fd312a7c65000",class:"d-flex align-items-start gap-2"},s("label",{key:"c58e246347c2bb8da3dafa10aeca23290ebdcbd2",part:c,class:"form-label",htmlFor:this.name},this.label),s("form-control-tooltip",{key:"7a32bf62aea68cca9a86f07e28ca58a0f386fdf4",helpText:this.helpText})),s("input",{key:"033f6ab25c31f4386733195a281de935b39aa7e5",ref:e=>this.textInput=e,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled}),s(f,{key:"9238f8d110a09bed1f5172991ed951399ea520b3",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}},v=class{constructor(t){e(this,t),this.country=h.USA}render(){var e,t,i,d,o,r,l,c,f,m;const v=u[this.country],p=b[this.country];return s(a,{key:"8dabbee93e0f319db333ada6c20af49ed6131b8d"},s("div",{key:"4b308ca9fa92321e5f60f3e4d9ab1c4e60cbd703",class:"row gy-3"},s("div",{key:"9c25eec2effd7caed70a3f02f6a780513fae930c",class:"col-12"},s("form-control-text",{key:"6c2ae178c2122d1f6085906690adadf98cb0774b",name:"line1",label:"Street Address",inputHandler:this.inputHandler,defaultValue:null===(e=this.defaultValues)||void 0===e?void 0:e.line1,errorText:null===(t=this.errors)||void 0===t?void 0:t.line1,helpText:"No PO Boxes."})),s("div",{key:"eba53a69fc4c869014ef8b7bf6ff9b1d8f5be566",class:"col-12"},s("form-control-text",{key:"11c743ce2388173c41cb16f1865fe58b2015d6bb",name:"line2",label:"Address Line 2 (optional)",inputHandler:this.inputHandler,defaultValue:null===(i=this.defaultValues)||void 0===i?void 0:i.line2,errorText:null===(d=this.errors)||void 0===d?void 0:d.line2})),s("div",{key:"2025c9bb15286f5c3e4693b596372a7dff730ce8",class:"col-12"},s("form-control-text",{key:"5e0e40fd028d12b88cb15a38906738320e30aeca",name:"city",label:"City",inputHandler:this.inputHandler,defaultValue:null===(o=this.defaultValues)||void 0===o?void 0:o.city,errorText:null===(r=this.errors)||void 0===r?void 0:r.city})),s("div",{key:"5ec53f357907749c9abdcf568c027b71faad19fa",class:"col-12"},s("form-control-select",{key:"b9eef22eb507ffbd58c26bffa41b5b225925297c",name:"state",label:v.stateLabel,options:p.stateOptions,inputHandler:this.inputHandler,defaultValue:null===(l=this.defaultValues)||void 0===l?void 0:l.state,errorText:null===(c=this.errors)||void 0===c?void 0:c.state})),s("div",{key:"7456cd4f6b62b59bc9289ca3721440083e9aa4f3",class:"col-12"},s("form-control-text",{key:"c483c93d0f09d5ded3c11145216273ba75822009",name:"postal_code",label:v.postalLabel,inputHandler:this.inputHandler,defaultValue:null===(f=this.defaultValues)||void 0===f?void 0:f.postal_code,errorText:null===(m=this.errors)||void 0===m?void 0:m.postal_code,maxLength:this.country===h.USA?5:7,keyDownHandler:this.country===h.USA?n:void 0}))))}},p=class{constructor(t){e(this,t),this.address={},this.inputHandler=(e,t)=>{this.address[e]=t,this.address=Object.assign({},this.address)}}handleAddressChange(e){this.handleFormUpdate(e)}render(){return s(a,{key:"1b644425472c68880a9be150d52029a64d75ea26"},s("justifi-form-address-fields",{key:"d5e95bc81c654d00a0fcac4760705bd21b3b8c8d",country:this.country,errors:this.errors,defaultValues:this.defaultValues,inputHandler:this.inputHandler}))}static get watchers(){return{address:["handleAddressChange"]}}};export{m as form_control_number_masked,v as justifi_form_address_fields,p as justifi_identity_address_form}
@@ -0,0 +1 @@
1
+ import{r as e,h as t,H as a,c as i,g as s}from"./p-CV0Pyo1O.js";import"./p-DVJaoI_m.js";import"./p-HXpYMWUU.js";import{C as l}from"./p-Cjcsf8ku.js";import{E as o,m as r,n,o as c}from"./p-C0dMwnDO.js";import"./p-CLHwhyvu.js";import"./p-GgW1g7FQ.js";import"./p-BH0Xfn-F.js";import{a as d}from"./p-BZbvHgMz.js";import"./p-XYgDHrVL.js";import{n as h}from"./p-BnjCmwMr.js";import{B as u,$ as f,D as b,ap as m,P as p,ay as v,U as y,V as k,R as g,S as x,T,ag as w}from"./p-DrquDBSk.js";import{s as _,e as j,d as A}from"./p-B09GVew-.js";import{S as N}from"./p-DaZF_q9T.js";import"./p-CZfYo5-1.js";import{F as C}from"./p-CGKWIBVk.js";import{u as H,a as V,b as D}from"./p-DCwnBXF7.js";import{P as E,I}from"./p-CVaOFfrI.js";import{c as O}from"./p-B1AMrMly.js";import{c as B,d as F,e as L}from"./p-5aA7gjr5.js";import{I as P}from"./p-CWyW004b.js";import{B as S}from"./p-BqL4QuAa.js";import{S as R}from"./p-BqNNwq6C.js";import{P as M,p as q}from"./p-wSi5d4-j.js";import"./p-D8GTwl9v.js";import"./p-DkoufM1t.js";import"./p-D2muobcE.js";import"./p-y8av3w9x.js";const U=class{constructor(t){e(this,t)}render(){return t("div",{key:"7f9ea576aad16f3c2ea45c987a38878ea65f2df2",class:"row gy-3"},t("div",{key:"316fe3f20df7c7dce2b8903e6073e0fe7920e5e8",class:"col-12"},t("form-control-file",{key:"320d6b7f3de2cfeeb30eb1e08ca4122123854ffd",name:"voided_check",label:"Voided Check",documentType:o.voidedCheck,inputHandler:this.inputHandler,onFileSelected:this.storeFiles,errorText:this.errors.voided_check,multiple:!0})),t("div",{key:"f33a936c61c14c701e40d375e4dfc4c554b8293c",class:"col-12"},t("form-control-file",{key:"1e160d8211a71175d6a45b10590fb2c8774f61e1",name:"bank_statement",label:"Bank Statement",documentType:o.bankStatement,inputHandler:this.inputHandler,onFileSelected:this.storeFiles,errorText:this.errors.bank_statement,multiple:!0})))}},G=class{constructor(t){e(this,t)}render(){var e,a,i,s,l,o;return t("div",{key:"5dc7139f54d11979410d0d67ca29e65b02f30200",class:"row gy-3"},t("div",{key:"118f15bf02855b24baec5ce2a2c3cf5b241b3da4",class:"col-12"},this.formDisabled?t("bank-account-read-only-value",{label:"Bank Name",value:null===(e=this.defaultValue)||void 0===e?void 0:e.bank_name}):t("form-control-text",{name:"bank_name",label:"Bank Name",defaultValue:this.defaultValue.bank_name,errorText:this.errors.bank_name,inputHandler:this.inputHandler})),t("div",{key:"db03eccee03ec4b7d0de637306315982a2cd770d",class:"col-12"},this.formDisabled?t("bank-account-read-only-value",{label:"Nickname",value:null===(a=this.defaultValue)||void 0===a?void 0:a.nickname}):t("form-control-text",{name:"nickname",label:"Nickname",defaultValue:this.defaultValue.nickname,errorText:this.errors.nickname,inputHandler:this.inputHandler})),t("div",{key:"217120e0052b8ee41cac8f901ac4d9742b0c6ea9",class:"col-12"},this.formDisabled?t("bank-account-read-only-value",{label:"Account Owner Name",value:null===(i=this.defaultValue)||void 0===i?void 0:i.account_owner_name}):t("form-control-text",{name:"account_owner_name",label:"Account Owner Name",defaultValue:this.defaultValue.account_owner_name,errorText:this.errors.account_owner_name,inputHandler:this.inputHandler})),t("div",{key:"f589511545d6262966a6fa2888cb78babacfb770",class:"col-12"},this.formDisabled?t("bank-account-read-only-value",{label:"Account Type",value:null===(s=this.defaultValue)||void 0===s?void 0:s.account_type}):t("form-control-select",{name:"account_type",label:"Account Type",options:d,defaultValue:this.defaultValue.account_type,errorText:this.errors.account_type,inputHandler:this.inputHandler})),t("div",{key:"24df83bb2666cee381c266608c43f3fd729db4cf",class:"col-6"},this.formDisabled?t("bank-account-read-only-value",{label:"Account Number",value:(null===(l=this.defaultValue)||void 0===l?void 0:l.account_number_last4)?`**** ${this.defaultValue.account_number_last4}`:""}):t("form-control-text",{name:"account_number",label:"Account Number",defaultValue:this.defaultValue.account_number,maxLength:17,errorText:this.errors.account_number,inputHandler:this.inputHandler,keyDownHandler:h,helpText:"Please copy the account number as shown on your statement/check. Do not include spaces or dashes."})),t("div",{key:"75fe11d71e57707d088f8a90a250621fce82647f",class:"col-6"},this.formDisabled?t("bank-account-read-only-value",{label:"Routing Number",value:(null===(o=this.defaultValue)||void 0===o?void 0:o.routing_number)||""}):t("form-control-text",{name:"routing_number",label:"Routing Number",defaultValue:this.defaultValue.routing_number,maxLength:9,errorText:this.errors.routing_number,inputHandler:this.inputHandler,keyDownHandler:h,helpText:"A valid routing number is nine digits. Please include any leading or trailing zeroes."})))}},W=class{constructor(t){e(this,t)}render(){var e,a,i,s,l,o,r;return t("div",{key:"34cbf10449df73748095fd7122d0ae1355a83e13",class:"row gy-3"},t("div",{key:"607cc5cbc70fdd2d5a325bef7002a44740394282",class:"col-12"},this.formDisabled?t("bank-account-read-only-value",{label:"Bank Name",value:null===(e=this.defaultValue)||void 0===e?void 0:e.bank_name}):t("form-control-text",{name:"bank_name",label:"Bank Name",defaultValue:this.defaultValue.bank_name,errorText:this.errors.bank_name,inputHandler:this.inputHandler})),t("div",{key:"f57f4cd733f2dd439d6d83f32078371618f5fa06",class:"col-12"},this.formDisabled?t("bank-account-read-only-value",{label:"Nickname",value:null===(a=this.defaultValue)||void 0===a?void 0:a.nickname}):t("form-control-text",{name:"nickname",label:"Nickname",defaultValue:this.defaultValue.nickname,errorText:this.errors.nickname,inputHandler:this.inputHandler})),t("div",{key:"b92dface0116321ea990bfcaf1b036b5629385db",class:"col-12"},this.formDisabled?t("bank-account-read-only-value",{label:"Account Owner Name",value:null===(i=this.defaultValue)||void 0===i?void 0:i.account_owner_name}):t("form-control-text",{name:"account_owner_name",label:"Account Owner Name",defaultValue:this.defaultValue.account_owner_name,errorText:this.errors.account_owner_name,inputHandler:this.inputHandler})),t("div",{key:"45d68efa47de76ee420cedfb97e82f498a2de97b",class:"col-12"},this.formDisabled?t("bank-account-read-only-value",{label:"Account Type",value:null===(s=this.defaultValue)||void 0===s?void 0:s.account_type}):t("form-control-select",{name:"account_type",label:"Account Type",options:d,defaultValue:this.defaultValue.account_type,errorText:this.errors.account_type,inputHandler:this.inputHandler})),t("div",{key:"8419925e8470d63d506e1f7e82ccdf1a1132ecc0",class:"col-3"},this.formDisabled?t("bank-account-read-only-value",{label:"Transit Number",value:(null===(l=this.defaultValue)||void 0===l?void 0:l.transit_number)||""}):t("form-control-text",{name:"transit_number",label:"Transit Number",defaultValue:this.defaultValue.transit_number,maxLength:5,errorText:this.errors.transit_number,inputHandler:this.inputHandler,keyDownHandler:h,helpText:"5 digits"})),t("div",{key:"aa6e83c409e0cf93f1903394f63c0b719ec8808e",class:"col-3"},this.formDisabled?t("bank-account-read-only-value",{label:"Institution Number",value:(null===(o=this.defaultValue)||void 0===o?void 0:o.institution_number)||""}):t("form-control-text",{name:"institution_number",label:"Institution Number",defaultValue:this.defaultValue.institution_number,maxLength:3,errorText:this.errors.institution_number,inputHandler:this.inputHandler,keyDownHandler:h,helpText:"3 digits"})),t("div",{key:"029058c023daca9d0488f45478af6edafe359df7",class:"col-6"},this.formDisabled?t("bank-account-read-only-value",{label:"Account Number",value:(null===(r=this.defaultValue)||void 0===r?void 0:r.account_number_last4)?`**** ${this.defaultValue.account_number_last4}`:""}):t("form-control-text",{name:"account_number",label:"Account Number",defaultValue:this.defaultValue.account_number,maxLength:17,errorText:this.errors.account_number,inputHandler:this.inputHandler,keyDownHandler:h,helpText:"Please copy the account number as shown on your statement. Do not include spaces or dashes."})))}},$=class{constructor(t){e(this,t)}render(){return t("div",{key:"ad9eadcf49dbc67e51cd814d3ded334a587cc17c"},t("label",{key:"b8ba3d8b7ef9fc33e0e0870f71b7df5dbfae4759",class:"form-label",part:u},this.label),t("div",{key:"1839bdadb96b3c814c73991530497f9a7be6a10d",part:u},this.value||""))}},z=class{constructor(t){e(this,t),this.documents=[],this.isLoading=!1}render(){return this.isLoading?t(N,{height:"50px"}):this.documents.length?t(a,null,t("div",{class:"card",part:f},t("div",{class:"card-body"},t("h5",{class:"card-title",part:b},"Documents Already on File"),t("div",{class:"table-responsive"},t("table",{class:"table table-sm table-borderless",part:m},t("thead",null,t("tr",null,t("th",{style:{width:"25%"},part:p,scope:"col"},"File Name"),t("th",{style:{width:"25%"},part:p,scope:"col"},"File Type"),t("th",{style:{width:"25%"},part:p,scope:"col"},"Document Type"),t("th",{style:{width:"25%"},part:p,scope:"col"},"Date Uploaded"))),t("tbody",null,this.documents.sort(((e,t)=>e.document_type.localeCompare(t.document_type))).map(((e,a)=>t("tr",{class:0===a?"border-bottom border-top":"border-bottom"},t("td",{part:v},e.file_name),t("td",{part:v},e.file_type),t("td",{part:v},_(e.document_type)),t("td",{part:v},`${j(e.created_at)} - ${A(e.created_at)}`))))))))),t("hr",null)):null}},X=class{constructor(t){e(this,t),this.formControlInput=i(this,"formControlInput",7),this.formControlBlur=i(this,"formControlBlur",7),this.fileSelected=i(this,"fileSelected",7),this.isFocused=!1,this.errorText="",this.inputHandler=()=>{},this.disabled=!1,this.handleFormControlInput=e=>{const t=e.target,a=t.getAttribute("name");this.inputHandler(a,t.value),this.formControlInput.emit({name:a,value:t.value})},this.changeHandler=()=>{const e=this.fileInput.files;e&&this.fileSelected.emit({fileList:e,document_type:this.documentType})}}componentDidLoad(){this.fileInput=this.el.querySelector("input")}get part(){let e=y;return this.errorText&&(e=g),this.disabled&&(e=x),this.isFocused&&(e=T),e}render(){return t(a,{key:"430da302c06fb83a93c10bbf8d9b62ff89fc9e5e"},t("div",{key:"2235fd7e9ef83839a5c9644828580cb1727cb3cc",class:"form-group d-flex flex-column"},t("div",{key:"e899430b50cd692e76b4992d01df4ab5ef754ff4",class:"d-flex align-items-start gap-2"},t("label",{key:"41a257c0c9064ababe2167522690678627d574ec",part:k,class:"form-label",htmlFor:this.name},this.label),t("form-control-tooltip",{key:"734a6dbf61d1f04920b01e8d9024c29bc8cf0967",helpText:this.helpText})),t("input",{key:"6bbe60077bbff7c427cb84883f91489ae58abbd1",ref:e=>this.fileInput=e,type:"file",name:this.name,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",multiple:this.multiple,disabled:this.disabled,onChange:this.changeHandler,onInput:this.handleFormControlInput,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()}}),t(C,{key:"4b0ed448a2f7fd8e76d21abdaa47662f847bca7f",errorText:this.errorText,name:this.name})))}get el(){return s(this)}},Y=class{constructor(t){e(this,t),this.isEditingIdentification=!1,this.inputHandler=(e,t)=>{H(this.formController,{[e]:t})},this.onAddressFormUpdate=e=>{V(this.formController,Object.assign(Object.assign({},this.formController.values.getValue().address),e))}}render(){var e,a,i,s,l,o,r,n,c;return t("form",{key:"a9c0f6332bf302d5eb9f93c4ca045d572a40468f"},t("fieldset",{key:"115c564826335a9c7b670bbc0409912c3eb7a4aa"},t("div",{key:"6de8909b4b2f3c7d8ec4665aad77ef59cdf035b4",class:"d-flex align-items-center gap-2"},t("legend",{key:"bb8b5a3775eae450a866356a9e149a0bf57b5699",class:"mb-0",part:b},"Representative"),t("form-control-tooltip",{key:"a0296d4a3c35a039525f39501e117ee6fdd12257",helpText:"The representative for your business needs to be someone who has significant control over managing your business’s finance. You will have an opportunity to add owners later in the form."})),t("hr",{key:"abbee22f5664275f27dd8eeb2b12c87b059ff024",class:"mt-2"}),t("div",{key:"e165ff125df62dc1d22b7329fe7fe2ff200cbbb3",class:"row gy-3"},t("div",{key:"114ff752eeda3ffa90529ff6bc675b874f543336",class:"col-12 col-md-8"},t("form-control-text",{key:"8b6ce9f4a327ca5282aa32c226f671945aa10404",name:"name",label:"Full Name",defaultValue:null===(e=this.representativeDefaultValue)||void 0===e?void 0:e.name,errorText:this.errors.name,inputHandler:this.inputHandler})),t("div",{key:"bce864367883c6bbf7bd0841114a3dbb39db692b",class:"col-12 col-md-4"},t("form-control-text",{key:"ec3e72dc3f84c0daee2c6509f7dbf2bad22f5db6",name:"title",label:"Title",defaultValue:null===(a=this.representativeDefaultValue)||void 0===a?void 0:a.title,errorText:this.errors.title,inputHandler:this.inputHandler,helpText:"Role at your business, e.g. President, CEO, Treasurer."})),t("div",{key:"200ae959d897d9d22016553d3c586cf3f0438dd9",class:"col-12 col-md-6"},t("form-control-text",{key:"4f77d6ca6c3c85edabc11af6f5703ab1327f05e7",name:"email",label:"Email Address",defaultValue:null===(i=this.representativeDefaultValue)||void 0===i?void 0:i.email,errorText:this.errors.email,inputHandler:this.inputHandler})),t("div",{key:"cf642ee73f7ae8b254920a3f781c23dc456f16ae",class:"col-12 col-md-6"},t("form-control-number-masked",{key:"df609213bec728f17b2527a2e99ff3e0e69604aa",name:"phone",label:"Phone Number",defaultValue:null===(s=this.representativeDefaultValue)||void 0===s?void 0:s.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:E.US})),t("div",{key:"2e4565c06976723ae4e497a5305cea7468bac2f4",class:"col-12 col-md-4"},t("form-control-date",{key:"ca7d4bf05c32d1d9983df430d338cc3433015957",name:"dob_full",label:"Birth Date",defaultValue:null===(l=this.representativeDefaultValue)||void 0===l?void 0:l.dob_full,errorText:this.errors.dob_full,inputHandler:this.inputHandler,onFormControlInput:e=>D(e,this.formController),helpText:"Must be 18 or older."})),t("div",{key:"f6cbe1b7f4e5575f626e6d73f31b4a1a09ac33e3",class:"col-12 col-md-8"},!(null===(o=this.representativeDefaultValue)||void 0===o?void 0:o.ssn_last4)||this.isEditingIdentification?t("form-control-number-masked",{name:"identification_number",label:O[this.country].idNumberLabel,defaultValue:this.isEditingIdentification?"":null===(r=this.representativeDefaultValue)||void 0===r?void 0:r.identification_number,errorText:this.errors.identification_number,inputHandler:this.inputHandler,mask:I[this.country],helpText:O[this.country].identityHelpText}):t("div",null,t("label",{class:"form-label",part:k},O[this.country].idNumberLabel),t("div",{class:"input-group mb-3"},t("input",{type:"text",class:"form-control",part:x,value:`****${null===(n=this.representativeDefaultValue)||void 0===n?void 0:n.ssn_last4}`,disabled:!0}),t("button",{class:"btn btn-secondary",type:"button",part:w,onClick:()=>{this.isEditingIdentification=!0,H(this.formController,{identification_number:"",ssn_last4:null})}},"Change")))),t("div",{key:"e3fa556dece2feaf5eb175ae3734c2319777ef48",class:"col-12"},t("justifi-identity-address-form",{key:"fe3d349371d11b8a246b9c31aebd7d9c84e03f8e",errors:this.errors.address,defaultValues:null===(c=this.representativeDefaultValue)||void 0===c?void 0:c.address,handleFormUpdate:this.onAddressFormUpdate,country:this.country})))))}},Q=class{constructor(t){e(this,t),this.errorEvent=i(this,"error-event",7)}async validate(){return this.coreComponent.validate()}async submit(){return this.coreComponent.submit()}async validateAndSubmit({onSuccess:e}){this.coreComponent.validateAndSubmit({onSuccess:e})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&(this.getOwner=B({authToken:this.authToken,identityId:this.ownerId,service:new P}),this.patchOwner=F({authToken:this.authToken,identityId:this.ownerId,service:new P}),this.postOwner=L({authToken:this.authToken,service:new P}))}render(){return t("owner-form-core",{key:"47c36dfc76ac8a108950e17770d1a0fb06fe4e42",ownerId:this.ownerId,businessId:this.businessId,getOwner:this.getOwner,patchOwner:this.patchOwner,postOwner:this.postOwner,allowOptionalFields:this.allowOptionalFields,removeOwner:this.removeOwner,newFormOpen:this.newFormOpen,ownersLength:this.ownersLength,country:this.country,ref:e=>this.coreComponent=e})}},Z=class{constructor(t){e(this,t),this.plaidVerificationSuccess=i(this,"plaidVerificationSuccess",7),this.plaidVerificationError=i(this,"plaidVerificationError",7),this.linkToken=null,this.linkTokenId=null,this.plaidLink=null,this.isAuthenticating=!1,this.isSuccess=!1,this.error=null,this.isLoading=!1,this.plaidService=new M,this.abortController=null,this.timeoutId=null,this.initializePlaidLink=async()=>{try{if(void 0===window.Plaid)return void this.handleError({code:c.PLAID_SDK_LOAD_FAILED,message:n[c.PLAID_SDK_LOAD_FAILED],severity:r[c.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"});if(await this.getLinkToken(),!this.linkToken)return void this.handleError({code:c.PLAID_LINK_TOKEN_FAILED,message:n[c.PLAID_LINK_TOKEN_FAILED],severity:r[c.PLAID_LINK_TOKEN_FAILED],retryable:!0,userAction:"Click to try again"});const e=window.Plaid;this.plaidLink=e.create({token:this.linkToken,onSuccess:this.handlePlaidSuccess,onExit:this.handlePlaidExit,onEvent:this.handlePlaidEvent,onLoad:this.handlePlaidLoad})}catch(e){this.handleError({code:c.PLAID_LINK_INIT_FAILED,message:n[c.PLAID_LINK_INIT_FAILED],severity:r[c.PLAID_LINK_INIT_FAILED],originalError:e,retryable:!0,userAction:"Click to try again"})}},this.getLinkToken=async()=>{var e,t,a,i;try{if(!this.authToken||!this.accountId)return void this.handleError({code:c.PLAID_LINK_TOKEN_FAILED,message:"Missing authentication. Please provide authToken and accountId.",severity:l.ERROR,retryable:!1,userAction:"Provide required props"});this.abortController=new AbortController,this.timeoutId=setTimeout((()=>{var e;null===(e=this.abortController)||void 0===e||e.abort()}),3e4);const e=await this.plaidService.getLinkTokenForVerification(this.authToken,this.businessId,this.abortController.signal);if(this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null),e.error)throw new Error("string"==typeof e.error?e.error:e.error.message||"Failed to get link token");this.linkToken=e.data.link_token,this.linkTokenId=e.data.id}catch(s){this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null);let l=c.PLAID_LINK_TOKEN_FAILED,o=n[l],d=!0;"AbortError"===s.name?(l=c.PLAID_TIMEOUT,o=n[l],d=!0):(null===(e=s.message)||void 0===e?void 0:e.includes("network"))||(null===(t=s.message)||void 0===t?void 0:t.includes("fetch"))?(l=c.PLAID_NETWORK_ERROR,o=n[l],d=!0):((null===(a=s.message)||void 0===a?void 0:a.includes("401"))||(null===(i=s.message)||void 0===i?void 0:i.includes("unauthorized")))&&(l=c.PLAID_INVALID_CREDENTIALS,o="Authentication failed. Please check your credentials.",d=!1),this.handleError({code:l,message:o,severity:r[l],originalError:s,retryable:d,userAction:d?"Click to try again":"Check your credentials"})}},this.openPlaidLink=()=>{this.plaidLink&&this.linkToken&&(this.isAuthenticating=!0,this.clearError(),this.plaidLink.open())},this.handlePlaidSuccess=async e=>{var t;this.isAuthenticating=!1,this.isLoading=!0,this.clearError();try{const a=await this.plaidService.postPlaidVerifiedBankAccountData(this.authToken,this.businessId,{public_token:e,link_token_id:this.linkTokenId},null===(t=this.abortController)||void 0===t?void 0:t.signal);if(a.error)throw new Error("string"==typeof a.error?a.error:a.error.message||"Failed to verify bank account");this.isSuccess=!0,this.isLoading=!1,this.plaidVerificationSuccess.emit({publicToken:e,bankAccount:a.data})}catch(e){this.isLoading=!1,this.handleError({code:c.PLAID_AUTHENTICATION_FAILED,message:(null==e?void 0:e.message)||"Failed to verify bank account",severity:r[c.PLAID_AUTHENTICATION_FAILED],originalError:e,retryable:!0,userAction:"Click to try again"})}},this.handlePlaidExit=e=>{this.isAuthenticating=!1,e&&this.handlePlaidError(e)},this.handlePlaidEvent=(e,t)=>{switch(e){case"OPEN":this.isAuthenticating=!0;break;case"CLOSE":this.isAuthenticating=!1;break;case"ERROR":this.handlePlaidError(t)}},this.handlePlaidLoad=()=>{},this.handlePlaidError=e=>{let t=c.PLAID_AUTHENTICATION_FAILED,a=n[t],i=!0,s="Click to try again";if(e.error_code)switch(e.error_code){case"INVALID_CREDENTIALS":t=c.PLAID_INVALID_CREDENTIALS,a=n[t],i=!0;break;case"ITEM_LOGIN_REQUIRED":t=c.PLAID_INVALID_CREDENTIALS,a="Your bank requires re-authentication. Please try again.",i=!0;break;case"ITEM_LOCKED":t=c.PLAID_ACCOUNT_LOCKED,a=n[t],i=!1,s="Contact your bank";break;case"INSTITUTION_NOT_RESPONDING":t=c.PLAID_MAINTENANCE,a=n[t],i=!0;break;case"RATE_LIMIT_EXCEEDED":t=c.PLAID_RATE_LIMITED,a=n[t],i=!0;break;default:e.error_message&&(a=e.error_message)}this.handleError({code:t,message:a,severity:r[t],originalError:e,retryable:i,userAction:s}),this.isAuthenticating=!1},this.handleError=e=>{this.error=e,this.isLoading=!1,this.plaidVerificationError.emit(e),console.error("Plaid verification error:",e)},this.clearError=()=>{this.error&&(this.error=null)}}componentDidRender(){this.scriptRef&&(this.scriptRef.onload=()=>{this.initializePlaidLink()},this.scriptRef.onerror=()=>{this.handleError({code:c.PLAID_SDK_LOAD_FAILED,message:n[c.PLAID_SDK_LOAD_FAILED],severity:r[c.PLAID_SDK_LOAD_FAILED],retryable:!0,userAction:"Refresh the page and try again"})})}disconnectedCallback(){this.timeoutId&&clearTimeout(this.timeoutId),this.abortController&&this.abortController.abort()}render(){const e=t("img",{class:"plaid-logo-img",src:q,alt:"Plaid",title:"Plaid",style:{display:"inline",width:"20px",height:"20px",marginLeft:"5px",marginTop:"-2px"}});return t(R,null,t("script",{src:"https://cdn.plaid.com/link/v2/stable/link-initialize.js",async:!0,ref:e=>this.scriptRef=e}),t("div",null,t("div",{class:"mb-3"},t(S,{variant:"secondary",type:"button",onClick:e=>{e.preventDefault(),this.openPlaidLink()},disabled:this.isLoading,part:w},"Link Bank Account with ",e)),(()=>this.error?t("div",{class:(this.error.severity===l.ERROR?"text-danger":this.error.severity===l.WARNING?"text-warning":"text-info")+" mt-2"},t("small",null,this.error.message),t("br",null),this.error.userAction&&t("small",{class:"text-muted"},this.error.userAction)):null)(),(()=>this.error?null:this.isLoading?t("div",{class:"text-info mt-2"},t("small",null,"Verifying bank account...")):this.isSuccess?t("div",{class:"text-success mt-2"},t("small",null,"✓ Bank account verified successfully")):this.isAuthenticating?t("div",{class:"text-info mt-2"},t("small",null,"Connecting to your bank...")):null)()))}};export{U as bank_account_document_form_inputs,G as bank_account_form_inputs,W as bank_account_form_inputs_canada,$ as bank_account_read_only_value,z as business_documents_on_file,X as form_control_file,Y as justifi_business_representative_form_inputs,Q as justifi_owner_form,Z as plaid_verification}