@justifi/webcomponents 6.7.3 → 6.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (298) 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-BsCYiOlF.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 +10 -10
  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 +10 -6
  39. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +1 -1
  40. package/dist/cjs/justifi-payments-list.cjs.entry.js +6 -6
  41. package/dist/cjs/justifi-payout-details.cjs.entry.js +6 -6
  42. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +6 -6
  43. package/dist/cjs/justifi-payouts-list.cjs.entry.js +7 -7
  44. package/dist/cjs/justifi-refund-payment.cjs.entry.js +10 -10
  45. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +7 -7
  46. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +10 -10
  47. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +6 -6
  48. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +8 -8
  49. package/dist/cjs/justifi-terminals-list.cjs.entry.js +7 -7
  50. package/dist/cjs/loader.cjs.js +1 -1
  51. package/dist/cjs/{lodash-CvSCBJ_8.js → lodash-CxSkBibc.js} +43 -4
  52. package/dist/cjs/{package-DcGEg97O.js → package-Odd17EzW.js} +1 -1
  53. package/dist/cjs/payment-details-core.cjs.entry.js +3 -3
  54. package/dist/cjs/{payment.service-B4ACB8Q3.js → payment.service-QODfB293.js} +2 -2
  55. package/dist/cjs/payments-list-core.cjs.entry.js +2 -2
  56. package/dist/cjs/{payout.service-qVbNnemO.js → payout.service-k7GBuYzk.js} +2 -2
  57. package/dist/cjs/payouts-list-core.cjs.entry.js +2 -2
  58. package/dist/cjs/plaid-icon-DTpONc_Q.js +46 -0
  59. package/dist/cjs/{schema-validations-DYYDrVol.js → schema-validations-BakyfJpE.js} +3 -3
  60. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +3 -3
  61. package/dist/cjs/{terminal-orders-table-C2jG4WQa.js → terminal-orders-table-C6j6Mx_r.js} +4 -4
  62. package/dist/cjs/{terminal.service-D1ohedi-.js → terminal.service-A90K3XNq.js} +2 -2
  63. package/dist/cjs/terminals-list-core.cjs.entry.js +2 -2
  64. package/dist/cjs/webcomponents.cjs.js +1 -1
  65. package/dist/collection/api/Analytics.js +8 -7
  66. package/dist/collection/api/Business.js +1 -0
  67. package/dist/collection/api/Plaid.js +50 -0
  68. package/dist/collection/api/index.js +1 -0
  69. package/dist/collection/api/services/plaid.service.js +13 -0
  70. package/dist/collection/collection-manifest.json +1 -0
  71. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +20 -5
  72. package/dist/collection/components/business-forms/payment-provisioning/plaid-verification/plaid-verification.js +433 -0
  73. package/dist/collection/components/modular-checkout/sub-components/plaid-payment-method.js +4 -51
  74. package/dist/collection/components/payment-transactions-list/payment-transactions-table.js +4 -0
  75. package/dist/collection/ui-components/custom-popper/custom-popper.js +52 -18
  76. package/dist/docs.json +145 -4
  77. package/dist/esm/{Business-CHJTjG_5.js → Business-GgW1g7FQ.js} +1 -0
  78. package/dist/esm/{GooglePay-5EiPffHy.js → Plaid-CBrksnBN.js} +52 -1
  79. package/dist/esm/{bank-account-document-form-inputs_8.entry.js → bank-account-document-form-inputs_9.entry.js} +329 -8
  80. package/dist/esm/{business-additional-questions-schema-DQb10ehS.js → business-additional-questions-schema-CQ8CuEfQ.js} +3 -3
  81. package/dist/esm/{business-form-options-Bm89rMmk.js → business-form-options-DamBLV7N.js} +1 -1
  82. package/dist/esm/{business-identity-schema-CaMnpPqx.js → business-identity-schema-BTyJz7M9.js} +2 -2
  83. package/dist/esm/{business.service-C7smiL6_.js → business.service-BWm7Kqs4.js} +2 -2
  84. package/dist/esm/{check-pkg-version-DIZ2yD72.js → check-pkg-version-BEQSf1m2.js} +11 -10
  85. package/dist/esm/{checkout.service-CYq6KXZv.js → checkout.service-D4Mljqjr.js} +2 -2
  86. package/dist/esm/checkouts-list-core.entry.js +2 -2
  87. package/dist/esm/{country-config-CQxaTFuP.js → country-config-D-9YmU94.js} +1 -1
  88. package/dist/esm/custom-popper_2.entry.js +48 -17
  89. package/dist/esm/{dispute.service-D7Dv8LTn.js → dispute.service-ZpqfPDC0.js} +2 -2
  90. package/dist/esm/form-alert_5.entry.js +3 -3
  91. package/dist/esm/form-control-number-masked_3.entry.js +2 -2
  92. package/dist/esm/form-control-number_3.entry.js +6 -6
  93. package/dist/esm/{get-business-BAmwId14.js → get-business-BMB2IxN_.js} +1 -1
  94. package/dist/esm/{get-payment-details-CPJZp31y.js → get-payment-details-B71Qi6mF.js} +2 -2
  95. package/dist/esm/{get-subaccounts-CqMFocN0.js → get-subaccounts-DXJdRbWg.js} +2 -2
  96. package/dist/esm/hidden-input_2.entry.js +1 -1
  97. package/dist/esm/{input-handlers-AgwQ-yKX.js → input-handlers-CzWCJ849.js} +1 -1
  98. package/dist/esm/internal-tokenize-payment-method_7.entry.js +4 -4
  99. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +25 -12
  100. package/dist/esm/justifi-apple-pay_8.entry.js +6 -76
  101. package/dist/esm/justifi-bank-account-billing-form-simple_3.entry.js +4 -4
  102. package/dist/esm/justifi-business-details.entry.js +6 -6
  103. package/dist/esm/justifi-business-form.entry.js +10 -10
  104. package/dist/esm/justifi-checkout.entry.js +4 -4
  105. package/dist/esm/justifi-checkouts-list-filters.entry.js +3 -3
  106. package/dist/esm/justifi-checkouts-list.entry.js +6 -6
  107. package/dist/esm/justifi-dispute-management.entry.js +5 -5
  108. package/dist/esm/justifi-dispute-notification_3.entry.js +5 -5
  109. package/dist/esm/justifi-gross-payment-chart.entry.js +4 -4
  110. package/dist/esm/justifi-order-terminals.entry.js +7 -7
  111. package/dist/esm/justifi-payment-details.entry.js +6 -6
  112. package/dist/esm/justifi-payment-provisioning-core.entry.js +1 -1
  113. package/dist/esm/justifi-payment-provisioning.entry.js +5 -5
  114. package/dist/esm/justifi-payment-transactions-list.entry.js +9 -5
  115. package/dist/esm/justifi-payments-list-filters.entry.js +1 -1
  116. package/dist/esm/justifi-payments-list.entry.js +5 -5
  117. package/dist/esm/justifi-payout-details.entry.js +5 -5
  118. package/dist/esm/justifi-payout-transactions-list.entry.js +5 -5
  119. package/dist/esm/justifi-payouts-list.entry.js +6 -6
  120. package/dist/esm/justifi-refund-payment.entry.js +6 -6
  121. package/dist/esm/justifi-season-interruption-insurance.entry.js +4 -4
  122. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +2 -2
  123. package/dist/esm/justifi-terminal-orders-list.entry.js +5 -5
  124. package/dist/esm/justifi-terminals-list-filters.entry.js +3 -3
  125. package/dist/esm/justifi-terminals-list.entry.js +6 -6
  126. package/dist/esm/loader.js +1 -1
  127. package/dist/esm/{lodash-BqWxUrkh.js → lodash-CrGKVSPp.js} +43 -4
  128. package/dist/esm/{package-ZkBwsSuI.js → package-C6OQPUis.js} +1 -1
  129. package/dist/esm/payment-details-core.entry.js +2 -2
  130. package/dist/esm/{payment.service-BGf8F56_.js → payment.service-C2lFq1yV.js} +2 -2
  131. package/dist/esm/payments-list-core.entry.js +2 -2
  132. package/dist/esm/{payout.service-Co3xg-7j.js → payout.service-ChupMPKT.js} +2 -2
  133. package/dist/esm/payouts-list-core.entry.js +2 -2
  134. package/dist/esm/plaid-icon-wJLd-2NX.js +43 -0
  135. package/dist/esm/{schema-validations-jBrJ0mYI.js → schema-validations-CfHWzMvr.js} +3 -3
  136. package/dist/esm/terminal-orders-list-core.entry.js +3 -3
  137. package/dist/esm/{terminal-orders-table-uNYLd8i5.js → terminal-orders-table-B4_RAxxx.js} +2 -2
  138. package/dist/esm/{terminal.service-Cxs-IO0Z.js → terminal.service-DqibXFHt.js} +2 -2
  139. package/dist/esm/terminals-list-core.entry.js +2 -2
  140. package/dist/esm/webcomponents.js +1 -1
  141. package/dist/module/Analytics.js +9 -8
  142. package/dist/module/Business.js +1 -0
  143. package/dist/module/{Refund.js → Plaid.js} +51 -1
  144. package/dist/module/bank-account-document-inputs.js +1 -1
  145. package/dist/module/business-additional-questions-form-step.js +1 -1
  146. package/dist/module/business-bank-account-form-step.js +46 -25
  147. package/dist/module/business-core-info-form-step.js +1 -1
  148. package/dist/module/business-owners-form-step.js +1 -1
  149. package/dist/module/business-representative-form-step.js +1 -1
  150. package/dist/module/business-terms-conditions-form-step.js +1 -1
  151. package/dist/module/business.service.js +1 -1
  152. package/dist/module/checkout.service.js +1 -1
  153. package/dist/module/checkout.store.js +1 -1
  154. package/dist/module/checkouts-list-core2.js +1 -1
  155. package/dist/module/custom-popper2.js +50 -17
  156. package/dist/module/dispute-management-core.js +1 -1
  157. package/dist/module/dispute-response-actions.js +1 -1
  158. package/dist/module/dispute-response.js +1 -1
  159. package/dist/module/get-business.js +1 -1
  160. package/dist/module/get-payment-details.js +1 -1
  161. package/dist/module/get-payout-csv.js +1 -1
  162. package/dist/module/get-subaccounts.js +1 -1
  163. package/dist/module/google-pay.js +1 -1
  164. package/dist/module/internal-tokenize-payment-method2.js +1 -1
  165. package/dist/module/justifi-business-details.js +1 -1
  166. package/dist/module/justifi-business-form.js +1 -1
  167. package/dist/module/justifi-checkouts-list-filters.js +1 -1
  168. package/dist/module/justifi-checkouts-list.js +1 -1
  169. package/dist/module/justifi-dispute-management.js +1 -1
  170. package/dist/module/justifi-gross-payment-chart.js +1 -1
  171. package/dist/module/justifi-order-terminals.js +1 -1
  172. package/dist/module/justifi-payment-details.js +1 -1
  173. package/dist/module/justifi-payment-provisioning.js +69 -63
  174. package/dist/module/justifi-payment-transactions-list.js +5 -1
  175. package/dist/module/justifi-payments-list.js +1 -1
  176. package/dist/module/justifi-payout-details.js +1 -1
  177. package/dist/module/justifi-payout-transactions-list.js +1 -1
  178. package/dist/module/justifi-payouts-list.js +1 -1
  179. package/dist/module/justifi-refund-payment.js +1 -1
  180. package/dist/module/justifi-season-interruption-insurance.js +1 -1
  181. package/dist/module/justifi-terminal-orders-list-filters.js +1 -1
  182. package/dist/module/justifi-terminal-orders-list.js +1 -1
  183. package/dist/module/justifi-terminals-list-filters.js +1 -1
  184. package/dist/module/justifi-terminals-list.js +1 -1
  185. package/dist/module/legal-address-form-step.js +1 -1
  186. package/dist/module/lodash.js +43 -4
  187. package/dist/module/modular-checkout.js +2 -2
  188. package/dist/module/package.js +1 -1
  189. package/dist/module/payment-details-core2.js +1 -1
  190. package/dist/module/payment-provisioning-actions.js +1 -1
  191. package/dist/module/payment-provisioning-core.js +67 -61
  192. package/dist/module/payment-provisioning-form-steps.js +62 -56
  193. package/dist/module/payment.service.js +1 -1
  194. package/dist/module/payments-list-core2.js +1 -1
  195. package/dist/module/payout.service.js +1 -1
  196. package/dist/module/payouts-list-core2.js +1 -1
  197. package/dist/module/plaid-icon.js +3 -0
  198. package/dist/module/plaid-payment-method.js +3 -53
  199. package/dist/module/plaid-verification.d.ts +11 -0
  200. package/dist/module/plaid-verification.js +6 -0
  201. package/dist/module/plaid-verification2.js +358 -0
  202. package/dist/module/plaid.service.js +14 -1
  203. package/dist/module/terminal-orders-list-core2.js +1 -1
  204. package/dist/module/terminal.service.js +1 -1
  205. package/dist/module/terminals-list-core2.js +1 -1
  206. package/dist/module/utils4.js +1 -1
  207. package/dist/types/api/Analytics.d.ts +1 -0
  208. package/dist/types/api/BankAccount.d.ts +1 -0
  209. package/dist/types/api/Business.d.ts +2 -0
  210. package/dist/types/api/Plaid.d.ts +54 -0
  211. package/dist/types/api/index.d.ts +1 -0
  212. package/dist/types/api/services/plaid.service.d.ts +8 -0
  213. package/dist/types/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.d.ts +2 -0
  214. package/dist/types/components/business-forms/payment-provisioning/plaid-verification/plaid-verification.d.ts +36 -0
  215. package/dist/types/components/modular-checkout/sub-components/plaid-payment-method.d.ts +1 -25
  216. package/dist/types/components/payment-transactions-list/payment-transactions-table.d.ts +4 -0
  217. package/dist/types/components.d.ts +40 -1
  218. package/dist/types/ui-components/custom-popper/custom-popper.d.ts +4 -0
  219. package/dist/webcomponents/{p-BXdZKjdB.js → p--cI8fPJx.js} +1 -1
  220. package/dist/webcomponents/{p-5af4bb01.entry.js → p-0867211b.entry.js} +1 -1
  221. package/dist/webcomponents/{p-e9daf75f.entry.js → p-0eb97b54.entry.js} +1 -1
  222. package/dist/webcomponents/{p-1eefdd41.entry.js → p-1407a8b0.entry.js} +1 -1
  223. package/dist/webcomponents/{p-931ea171.entry.js → p-1ec3d1e7.entry.js} +1 -1
  224. package/dist/webcomponents/{p-c11512e7.entry.js → p-20105c1d.entry.js} +1 -1
  225. package/dist/webcomponents/{p-4d7a2565.entry.js → p-25322799.entry.js} +1 -1
  226. package/dist/webcomponents/{p-f5f46f2d.entry.js → p-26430bfe.entry.js} +1 -1
  227. package/dist/webcomponents/p-33ab9174.entry.js +1 -0
  228. package/dist/webcomponents/p-47e3fed2.entry.js +1 -0
  229. package/dist/webcomponents/p-4a802f82.entry.js +1 -0
  230. package/dist/webcomponents/{p-7184c2f8.entry.js → p-5ae3401d.entry.js} +1 -1
  231. package/dist/webcomponents/{p-f13c4a88.entry.js → p-5ff13a4c.entry.js} +1 -1
  232. package/dist/webcomponents/{p-e926be0d.entry.js → p-601da5ba.entry.js} +1 -1
  233. package/dist/webcomponents/{p-ea0cd47d.entry.js → p-66c8104f.entry.js} +1 -1
  234. package/dist/webcomponents/p-7e64bf3d.entry.js +1 -0
  235. package/dist/webcomponents/{p-782ccafb.entry.js → p-800d6a1d.entry.js} +1 -1
  236. package/dist/webcomponents/{p-50f16cca.entry.js → p-81bbd944.entry.js} +1 -1
  237. package/dist/webcomponents/{p-53be30e9.entry.js → p-8ed4f485.entry.js} +1 -1
  238. package/dist/webcomponents/p-922ddfb4.entry.js +1 -0
  239. package/dist/webcomponents/{p-Ce785aMx.js → p-B1AMrMly.js} +1 -1
  240. package/dist/webcomponents/{p-DDjKoqh6.js → p-BRPbLfCN.js} +1 -1
  241. package/dist/webcomponents/{p-BAu40WfT.js → p-BZbvHgMz.js} +1 -1
  242. package/dist/webcomponents/{p-APob2Eta.js → p-Bj9n56jK.js} +1 -1
  243. package/dist/webcomponents/p-By-Mu1IX.js +1 -0
  244. package/dist/webcomponents/p-C0dMwnDO.js +1 -0
  245. package/dist/webcomponents/p-C6OQPUis.js +1 -0
  246. package/dist/webcomponents/{p-DBOsYeYk.js → p-CWyW004b.js} +1 -1
  247. package/dist/webcomponents/p-C_ifLmT1.js +9 -0
  248. package/dist/webcomponents/p-CkYB1zGe.js +1 -0
  249. package/dist/webcomponents/p-D-07jgNC.js +1 -0
  250. package/dist/webcomponents/{p-C-LV3hNf.js → p-DCwnBXF7.js} +1 -1
  251. package/dist/webcomponents/p-DKR9kDCI.js +1 -0
  252. package/dist/webcomponents/p-DKemQxaE.js +1 -0
  253. package/dist/webcomponents/{p-CHJTjG_5.js → p-GgW1g7FQ.js} +1 -1
  254. package/dist/webcomponents/{p-NO0z-S2W.js → p-MVBgKFOv.js} +1 -1
  255. package/dist/webcomponents/{p-mhEMV8M-.js → p-Y-EhaLdV.js} +1 -1
  256. package/dist/webcomponents/p-a48ebd78.entry.js +1 -0
  257. package/dist/webcomponents/{p-e5651bb1.entry.js → p-aa02e3d7.entry.js} +1 -1
  258. package/dist/webcomponents/{p-66e8b443.entry.js → p-aa0d7406.entry.js} +1 -1
  259. package/dist/webcomponents/{p-4165281d.entry.js → p-ae958833.entry.js} +1 -1
  260. package/dist/webcomponents/{p-86db9040.entry.js → p-af1c485f.entry.js} +1 -1
  261. package/dist/webcomponents/{p-001ce9f8.entry.js → p-b14a5f0e.entry.js} +1 -1
  262. package/dist/webcomponents/{p-73b9cc29.entry.js → p-bbffb17f.entry.js} +1 -1
  263. package/dist/webcomponents/p-bdb6c1b1.entry.js +1 -0
  264. package/dist/webcomponents/{p-d0d6d1cc.entry.js → p-ccc5149f.entry.js} +1 -1
  265. package/dist/webcomponents/{p-6ed0be7f.entry.js → p-cf0a87f8.entry.js} +1 -1
  266. package/dist/webcomponents/{p-e1a8785d.entry.js → p-d5827cb2.entry.js} +1 -1
  267. package/dist/webcomponents/{p-e11c7df0.entry.js → p-df178a7a.entry.js} +1 -1
  268. package/dist/webcomponents/{p-4786d1ea.entry.js → p-e7466503.entry.js} +1 -1
  269. package/dist/webcomponents/{p-3d2495df.entry.js → p-ec00a303.entry.js} +1 -1
  270. package/dist/webcomponents/{p-79d1d6b3.entry.js → p-edb3973c.entry.js} +1 -1
  271. package/dist/webcomponents/p-eec7be4a.entry.js +1 -0
  272. package/dist/webcomponents/{p-b2371f43.entry.js → p-f09a4d16.entry.js} +1 -1
  273. package/dist/webcomponents/{p-1dbf3473.entry.js → p-f1f0f100.entry.js} +1 -1
  274. package/dist/webcomponents/{p-7c4fa66f.entry.js → p-f5b7c322.entry.js} +1 -1
  275. package/dist/webcomponents/{p-bc56446a.entry.js → p-f9475bb0.entry.js} +1 -1
  276. package/dist/webcomponents/{p-a9b493c1.entry.js → p-f99d3a3e.entry.js} +1 -1
  277. package/dist/webcomponents/{p-D81X4BBI.js → p-g0kDRH6Z.js} +1 -1
  278. package/dist/webcomponents/{p-Bz97Ujvk.js → p-m_Ly-YPk.js} +1 -1
  279. package/dist/webcomponents/p-wSi5d4-j.js +1 -0
  280. package/dist/webcomponents/{p-BhvkOTYA.js → p-ygekUw3Q.js} +1 -1
  281. package/dist/webcomponents/webcomponents.esm.js +1 -1
  282. package/package.json +2 -1
  283. package/dist/webcomponents/p-0fb3fd77.entry.js +0 -1
  284. package/dist/webcomponents/p-198d2941.entry.js +0 -1
  285. package/dist/webcomponents/p-252bd81d.entry.js +0 -1
  286. package/dist/webcomponents/p-52203b01.entry.js +0 -1
  287. package/dist/webcomponents/p-639e5ce9.entry.js +0 -1
  288. package/dist/webcomponents/p-7ec771bc.entry.js +0 -1
  289. package/dist/webcomponents/p-Bde7dY9t.js +0 -9
  290. package/dist/webcomponents/p-D0PhRMmy.js +0 -1
  291. package/dist/webcomponents/p-DLLFAj4z.js +0 -1
  292. package/dist/webcomponents/p-DpkIbI5R.js +0 -1
  293. package/dist/webcomponents/p-MBH9QO2m.js +0 -1
  294. package/dist/webcomponents/p-ZkBwsSuI.js +0 -1
  295. package/dist/webcomponents/p-_LSWCi-4.js +0 -1
  296. package/dist/webcomponents/p-c5afb831.entry.js +0 -1
  297. package/dist/webcomponents/p-d55c348b.entry.js +0 -1
  298. package/dist/webcomponents/p-y-FoILTI.js +0 -1
@@ -498,6 +498,7 @@ class Business {
498
498
  this.website_url = business.website_url;
499
499
  this.date_of_incorporation = business.date_of_incorporation;
500
500
  this.country_of_establishment = normalizeCountry(business.country_of_establishment);
501
+ this.bank_account_verification = business.bank_account_verification;
501
502
  }
502
503
  get payload() {
503
504
  return {
@@ -4,6 +4,7 @@ var utils = require('./utils-D4WPxuzW.js');
4
4
  var Dispute = require('./Dispute-CruQTF6_.js');
5
5
  var index = require('./index-W-zoNiyM.js');
6
6
  var index$1 = require('./index-CajjbB9t.js');
7
+ var ComponentError = require('./ComponentError-D4OLnOkg.js');
7
8
 
8
9
  class Completion {
9
10
  constructor(data) {
@@ -993,6 +994,56 @@ class GooglePayHelpers {
993
994
  }
994
995
  }
995
996
 
997
+ // Plaid-specific error codes
998
+ exports.PlaidErrorCodes = void 0;
999
+ (function (PlaidErrorCodes) {
1000
+ PlaidErrorCodes["PLAID_SDK_LOAD_FAILED"] = "plaid-sdk-load-failed";
1001
+ PlaidErrorCodes["PLAID_LINK_INIT_FAILED"] = "plaid-link-init-failed";
1002
+ PlaidErrorCodes["PLAID_LINK_TOKEN_FAILED"] = "plaid-link-token-failed";
1003
+ PlaidErrorCodes["PLAID_AUTHENTICATION_FAILED"] = "plaid-authentication-failed";
1004
+ PlaidErrorCodes["PLAID_BANK_NOT_SUPPORTED"] = "plaid-bank-not-supported";
1005
+ PlaidErrorCodes["PLAID_TOKEN_EXPIRED"] = "plaid-token-expired";
1006
+ PlaidErrorCodes["PLAID_NETWORK_ERROR"] = "plaid-network-error";
1007
+ PlaidErrorCodes["PLAID_USER_CANCELLED"] = "plaid-user-cancelled";
1008
+ PlaidErrorCodes["PLAID_TIMEOUT"] = "plaid-timeout";
1009
+ PlaidErrorCodes["PLAID_INVALID_CREDENTIALS"] = "plaid-invalid-credentials";
1010
+ PlaidErrorCodes["PLAID_ACCOUNT_LOCKED"] = "plaid-account-locked";
1011
+ PlaidErrorCodes["PLAID_MAINTENANCE"] = "plaid-maintenance";
1012
+ PlaidErrorCodes["PLAID_RATE_LIMITED"] = "plaid-rate-limited";
1013
+ })(exports.PlaidErrorCodes || (exports.PlaidErrorCodes = {}));
1014
+ // Plaid error message mapping
1015
+ const PLAID_ERROR_MESSAGES = {
1016
+ [exports.PlaidErrorCodes.PLAID_SDK_LOAD_FAILED]: 'Unable to load Plaid. Please refresh the page and try again.',
1017
+ [exports.PlaidErrorCodes.PLAID_LINK_INIT_FAILED]: 'Unable to initialize bank connection. Please try again.',
1018
+ [exports.PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED]: 'Unable to connect to bank service. Please try again.',
1019
+ [exports.PlaidErrorCodes.PLAID_AUTHENTICATION_FAILED]: 'Bank authentication failed. Please try again.',
1020
+ [exports.PlaidErrorCodes.PLAID_BANK_NOT_SUPPORTED]: 'Your bank is not currently supported. Please try a different payment method.',
1021
+ [exports.PlaidErrorCodes.PLAID_TOKEN_EXPIRED]: 'Your bank session has expired. Please reconnect your account.',
1022
+ [exports.PlaidErrorCodes.PLAID_NETWORK_ERROR]: 'Network connection issue. Please check your internet connection and try again.',
1023
+ [exports.PlaidErrorCodes.PLAID_USER_CANCELLED]: 'Bank connection was cancelled. Click to try again.',
1024
+ [exports.PlaidErrorCodes.PLAID_TIMEOUT]: 'Bank connection timed out. Please try again.',
1025
+ [exports.PlaidErrorCodes.PLAID_INVALID_CREDENTIALS]: 'Invalid bank credentials. Please check your username and password.',
1026
+ [exports.PlaidErrorCodes.PLAID_ACCOUNT_LOCKED]: 'Your bank account is temporarily locked. Please contact your bank.',
1027
+ [exports.PlaidErrorCodes.PLAID_MAINTENANCE]: 'Bank service is temporarily unavailable. Please try again later.',
1028
+ [exports.PlaidErrorCodes.PLAID_RATE_LIMITED]: 'Too many connection attempts. Please wait a moment and try again.',
1029
+ };
1030
+ // Plaid error severity mapping
1031
+ const PLAID_ERROR_SEVERITY = {
1032
+ [exports.PlaidErrorCodes.PLAID_SDK_LOAD_FAILED]: ComponentError.ComponentErrorSeverity.ERROR,
1033
+ [exports.PlaidErrorCodes.PLAID_LINK_INIT_FAILED]: ComponentError.ComponentErrorSeverity.ERROR,
1034
+ [exports.PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED]: ComponentError.ComponentErrorSeverity.ERROR,
1035
+ [exports.PlaidErrorCodes.PLAID_AUTHENTICATION_FAILED]: ComponentError.ComponentErrorSeverity.ERROR,
1036
+ [exports.PlaidErrorCodes.PLAID_BANK_NOT_SUPPORTED]: ComponentError.ComponentErrorSeverity.WARNING,
1037
+ [exports.PlaidErrorCodes.PLAID_TOKEN_EXPIRED]: ComponentError.ComponentErrorSeverity.WARNING,
1038
+ [exports.PlaidErrorCodes.PLAID_NETWORK_ERROR]: ComponentError.ComponentErrorSeverity.WARNING,
1039
+ [exports.PlaidErrorCodes.PLAID_USER_CANCELLED]: ComponentError.ComponentErrorSeverity.INFO,
1040
+ [exports.PlaidErrorCodes.PLAID_TIMEOUT]: ComponentError.ComponentErrorSeverity.WARNING,
1041
+ [exports.PlaidErrorCodes.PLAID_INVALID_CREDENTIALS]: ComponentError.ComponentErrorSeverity.ERROR,
1042
+ [exports.PlaidErrorCodes.PLAID_ACCOUNT_LOCKED]: ComponentError.ComponentErrorSeverity.ERROR,
1043
+ [exports.PlaidErrorCodes.PLAID_MAINTENANCE]: ComponentError.ComponentErrorSeverity.WARNING,
1044
+ [exports.PlaidErrorCodes.PLAID_RATE_LIMITED]: ComponentError.ComponentErrorSeverity.WARNING,
1045
+ };
1046
+
996
1047
  exports.ApplePayConfig = ApplePayConfig;
997
1048
  exports.ApplePayHelpers = ApplePayHelpers;
998
1049
  exports.ApplePayPaymentRequest = ApplePayPaymentRequest;
@@ -1002,6 +1053,8 @@ exports.EntityDocumentStorage = EntityDocumentStorage;
1002
1053
  exports.GooglePayConfig = GooglePayConfig;
1003
1054
  exports.GooglePayHelpers = GooglePayHelpers;
1004
1055
  exports.GooglePayPaymentDataRequest = GooglePayPaymentDataRequest;
1056
+ exports.PLAID_ERROR_MESSAGES = PLAID_ERROR_MESSAGES;
1057
+ exports.PLAID_ERROR_SEVERITY = PLAID_ERROR_SEVERITY;
1005
1058
  exports.Payment = Payment;
1006
1059
  exports.PaymentBalanceTransaction = PaymentBalanceTransaction;
1007
1060
  exports.Payout = Payout;
@@ -3,12 +3,12 @@
3
3
  var index = require('./index-p7cvUYAE.js');
4
4
  require('./config-state-BIgGhhe9.js');
5
5
  require('./dinero-BwNN_k7x.js');
6
- require('./ComponentError-D4OLnOkg.js');
7
- var GooglePay = require('./GooglePay-CbKCUEfb.js');
6
+ var ComponentError = require('./ComponentError-D4OLnOkg.js');
7
+ var Plaid = require('./Plaid-DxPvVu0H.js');
8
8
  require('./Pagination-Dediz133.js');
9
- require('./Business-uoeKyW_a.js');
9
+ require('./Business-CB8EVrhD.js');
10
10
  require('./Dispute-CruQTF6_.js');
11
- var businessFormOptions = require('./business-form-options-D1r-wJpo.js');
11
+ var businessFormOptions = require('./business-form-options-B3CbEmdc.js');
12
12
  require('./event-types-DNOUef41.js');
13
13
  var utils = require('./utils-DAyWinG2.js');
14
14
  var parts = require('./parts-BsBVknuf.js');
@@ -16,11 +16,14 @@ var utils$1 = require('./utils-D4WPxuzW.js');
16
16
  var skeleton = require('./skeleton-BGGMhPJj.js');
17
17
  require('./event-types-YOY5TKUN.js');
18
18
  var formControlErrorText = require('./form-control-error-text-BC5aRpfl.js');
19
- var inputHandlers = require('./input-handlers-DaRKFvGI.js');
19
+ var inputHandlers = require('./input-handlers-gV1LyFy3.js');
20
20
  var formInputMasks = require('./form-input-masks-BnNFJ3IJ.js');
21
- var countryConfig = require('./country-config-DGi9t3Ma.js');
21
+ var countryConfig = require('./country-config-ETD-7Wb7.js');
22
22
  var paymentProvisioningActions = require('./payment-provisioning-actions-CZVlnRA0.js');
23
- var business_service = require('./business.service-DR4Ce5XV.js');
23
+ var business_service = require('./business.service-zGEitIbP.js');
24
+ var button = require('./button-C2p1BMP-.js');
25
+ var styledHost = require('./styled-host-DAi5SuFa.js');
26
+ var plaidIcon = require('./plaid-icon-DTpONc_Q.js');
24
27
  require('./index-W-zoNiyM.js');
25
28
  require('./index-CajjbB9t.js');
26
29
  require('./utils-DvUQQLmR.js');
@@ -31,7 +34,7 @@ const BankAccountDocumentFormInputs = class {
31
34
  index.registerInstance(this, hostRef);
32
35
  }
33
36
  render() {
34
- return (index.h("div", { key: '7f9ea576aad16f3c2ea45c987a38878ea65f2df2', class: "row gy-3" }, index.h("div", { key: '316fe3f20df7c7dce2b8903e6073e0fe7920e5e8', class: "col-12" }, index.h("form-control-file", { key: '320d6b7f3de2cfeeb30eb1e08ca4122123854ffd', name: "voided_check", label: "Voided Check", documentType: GooglePay.EntityDocumentType.voidedCheck, inputHandler: this.inputHandler, onFileSelected: this.storeFiles, errorText: this.errors["voided_check"], multiple: true })), index.h("div", { key: 'f33a936c61c14c701e40d375e4dfc4c554b8293c', class: "col-12" }, index.h("form-control-file", { key: '1e160d8211a71175d6a45b10590fb2c8774f61e1', name: "bank_statement", label: "Bank Statement", documentType: GooglePay.EntityDocumentType.bankStatement, inputHandler: this.inputHandler, onFileSelected: this.storeFiles, errorText: this.errors["bank_statement"], multiple: true }))));
37
+ return (index.h("div", { key: '7f9ea576aad16f3c2ea45c987a38878ea65f2df2', class: "row gy-3" }, index.h("div", { key: '316fe3f20df7c7dce2b8903e6073e0fe7920e5e8', class: "col-12" }, index.h("form-control-file", { key: '320d6b7f3de2cfeeb30eb1e08ca4122123854ffd', name: "voided_check", label: "Voided Check", documentType: Plaid.EntityDocumentType.voidedCheck, inputHandler: this.inputHandler, onFileSelected: this.storeFiles, errorText: this.errors["voided_check"], multiple: true })), index.h("div", { key: 'f33a936c61c14c701e40d375e4dfc4c554b8293c', class: "col-12" }, index.h("form-control-file", { key: '1e160d8211a71175d6a45b10590fb2c8774f61e1', name: "bank_statement", label: "Bank Statement", documentType: Plaid.EntityDocumentType.bankStatement, inputHandler: this.inputHandler, onFileSelected: this.storeFiles, errorText: this.errors["bank_statement"], multiple: true }))));
35
38
  }
36
39
  };
37
40
 
@@ -200,6 +203,324 @@ const BusinessOwnerForm = class {
200
203
  }
201
204
  };
202
205
 
206
+ const PlaidVerification = class {
207
+ constructor(hostRef) {
208
+ index.registerInstance(this, hostRef);
209
+ this.plaidVerificationSuccess = index.createEvent(this, "plaidVerificationSuccess", 7);
210
+ this.plaidVerificationError = index.createEvent(this, "plaidVerificationError", 7);
211
+ this.linkToken = null;
212
+ this.linkTokenId = null;
213
+ this.plaidLink = null;
214
+ this.isAuthenticating = false;
215
+ this.isSuccess = false;
216
+ this.error = null;
217
+ this.isLoading = false;
218
+ this.plaidService = new plaidIcon.PlaidService();
219
+ this.abortController = null;
220
+ this.timeoutId = null;
221
+ this.initializePlaidLink = async () => {
222
+ try {
223
+ // Check if Plaid is available globally
224
+ if (typeof window.Plaid === 'undefined') {
225
+ this.handleError({
226
+ code: Plaid.PlaidErrorCodes.PLAID_SDK_LOAD_FAILED,
227
+ message: Plaid.PLAID_ERROR_MESSAGES[Plaid.PlaidErrorCodes.PLAID_SDK_LOAD_FAILED],
228
+ severity: Plaid.PLAID_ERROR_SEVERITY[Plaid.PlaidErrorCodes.PLAID_SDK_LOAD_FAILED],
229
+ retryable: true,
230
+ userAction: 'Refresh the page and try again',
231
+ });
232
+ return;
233
+ }
234
+ // Get link token from backend
235
+ await this.getLinkToken();
236
+ if (!this.linkToken) {
237
+ this.handleError({
238
+ code: Plaid.PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED,
239
+ message: Plaid.PLAID_ERROR_MESSAGES[Plaid.PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED],
240
+ severity: Plaid.PLAID_ERROR_SEVERITY[Plaid.PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED],
241
+ retryable: true,
242
+ userAction: 'Click to try again',
243
+ });
244
+ return;
245
+ }
246
+ // Initialize Plaid Link
247
+ const Plaid$1 = window.Plaid;
248
+ this.plaidLink = Plaid$1.create({
249
+ token: this.linkToken,
250
+ onSuccess: this.handlePlaidSuccess,
251
+ onExit: this.handlePlaidExit,
252
+ onEvent: this.handlePlaidEvent,
253
+ onLoad: this.handlePlaidLoad,
254
+ });
255
+ }
256
+ catch (error) {
257
+ this.handleError({
258
+ code: Plaid.PlaidErrorCodes.PLAID_LINK_INIT_FAILED,
259
+ message: Plaid.PLAID_ERROR_MESSAGES[Plaid.PlaidErrorCodes.PLAID_LINK_INIT_FAILED],
260
+ severity: Plaid.PLAID_ERROR_SEVERITY[Plaid.PlaidErrorCodes.PLAID_LINK_INIT_FAILED],
261
+ originalError: error,
262
+ retryable: true,
263
+ userAction: 'Click to try again',
264
+ });
265
+ }
266
+ };
267
+ this.getLinkToken = async () => {
268
+ var _a, _b, _c, _d;
269
+ try {
270
+ if (!this.authToken || !this.accountId) {
271
+ this.handleError({
272
+ code: Plaid.PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED,
273
+ message: 'Missing authentication. Please provide authToken and accountId.',
274
+ severity: ComponentError.ComponentErrorSeverity.ERROR,
275
+ retryable: false,
276
+ userAction: 'Provide required props',
277
+ });
278
+ return;
279
+ }
280
+ // Create abort controller for timeout handling
281
+ this.abortController = new AbortController();
282
+ // Set timeout for the request
283
+ this.timeoutId = setTimeout(() => {
284
+ var _a;
285
+ (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
286
+ }, 30000); // 30 second timeout
287
+ const response = await this.plaidService.getLinkTokenForVerification(this.authToken, this.businessId, this.abortController.signal);
288
+ // Clear timeout
289
+ if (this.timeoutId) {
290
+ clearTimeout(this.timeoutId);
291
+ this.timeoutId = null;
292
+ }
293
+ if (response.error) {
294
+ const errorMessage = typeof response.error === 'string'
295
+ ? response.error
296
+ : response.error.message || 'Failed to get link token';
297
+ throw new Error(errorMessage);
298
+ }
299
+ this.linkToken = response.data.link_token;
300
+ this.linkTokenId = response.data.id;
301
+ }
302
+ catch (error) {
303
+ // Clear timeout
304
+ if (this.timeoutId) {
305
+ clearTimeout(this.timeoutId);
306
+ this.timeoutId = null;
307
+ }
308
+ let errorCode = Plaid.PlaidErrorCodes.PLAID_LINK_TOKEN_FAILED;
309
+ let message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
310
+ let retryable = true;
311
+ // Handle specific error types
312
+ if (error.name === 'AbortError') {
313
+ errorCode = Plaid.PlaidErrorCodes.PLAID_TIMEOUT;
314
+ message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
315
+ retryable = true;
316
+ }
317
+ else if (((_a = error.message) === null || _a === void 0 ? void 0 : _a.includes('network')) || ((_b = error.message) === null || _b === void 0 ? void 0 : _b.includes('fetch'))) {
318
+ errorCode = Plaid.PlaidErrorCodes.PLAID_NETWORK_ERROR;
319
+ message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
320
+ retryable = true;
321
+ }
322
+ else if (((_c = error.message) === null || _c === void 0 ? void 0 : _c.includes('401')) || ((_d = error.message) === null || _d === void 0 ? void 0 : _d.includes('unauthorized'))) {
323
+ errorCode = Plaid.PlaidErrorCodes.PLAID_INVALID_CREDENTIALS;
324
+ message = 'Authentication failed. Please check your credentials.';
325
+ retryable = false;
326
+ }
327
+ this.handleError({
328
+ code: errorCode,
329
+ message: message,
330
+ severity: Plaid.PLAID_ERROR_SEVERITY[errorCode],
331
+ originalError: error,
332
+ retryable,
333
+ userAction: retryable ? 'Click to try again' : 'Check your credentials',
334
+ });
335
+ }
336
+ };
337
+ this.openPlaidLink = () => {
338
+ if (this.plaidLink && this.linkToken) {
339
+ this.isAuthenticating = true;
340
+ this.clearError();
341
+ this.plaidLink.open();
342
+ }
343
+ };
344
+ this.handlePlaidSuccess = async (publicToken, _metadata) => {
345
+ var _a;
346
+ this.isAuthenticating = false;
347
+ this.isLoading = true;
348
+ this.clearError();
349
+ try {
350
+ // Send publicToken to backend
351
+ const response = await this.plaidService.postPlaidVerifiedBankAccountData(this.authToken, this.businessId, { public_token: publicToken, link_token_id: this.linkTokenId }, (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.signal);
352
+ if (response.error) {
353
+ const errorMessage = typeof response.error === 'string'
354
+ ? response.error
355
+ : response.error.message || 'Failed to verify bank account';
356
+ throw new Error(errorMessage);
357
+ }
358
+ // Success - display success message
359
+ this.isSuccess = true;
360
+ this.isLoading = false;
361
+ // Emit success event
362
+ this.plaidVerificationSuccess.emit({ publicToken, bankAccount: response.data });
363
+ }
364
+ catch (error) {
365
+ this.isLoading = false;
366
+ this.handleError({
367
+ code: Plaid.PlaidErrorCodes.PLAID_AUTHENTICATION_FAILED,
368
+ message: (error === null || error === void 0 ? void 0 : error.message) || 'Failed to verify bank account',
369
+ severity: Plaid.PLAID_ERROR_SEVERITY[Plaid.PlaidErrorCodes.PLAID_AUTHENTICATION_FAILED],
370
+ originalError: error,
371
+ retryable: true,
372
+ userAction: 'Click to try again',
373
+ });
374
+ }
375
+ };
376
+ this.handlePlaidExit = (err, _metadata) => {
377
+ this.isAuthenticating = false;
378
+ if (err) {
379
+ this.handlePlaidError(err);
380
+ }
381
+ };
382
+ this.handlePlaidEvent = (eventName, metadata) => {
383
+ // Handle specific events if needed
384
+ switch (eventName) {
385
+ case 'OPEN':
386
+ this.isAuthenticating = true;
387
+ break;
388
+ case 'CLOSE':
389
+ this.isAuthenticating = false;
390
+ break;
391
+ case 'ERROR':
392
+ this.handlePlaidError(metadata);
393
+ break;
394
+ }
395
+ };
396
+ this.handlePlaidLoad = () => {
397
+ // Plaid Link loaded successfully
398
+ };
399
+ this.handlePlaidError = (error) => {
400
+ let errorCode = Plaid.PlaidErrorCodes.PLAID_AUTHENTICATION_FAILED;
401
+ let message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
402
+ let retryable = true;
403
+ let userAction = 'Click to try again';
404
+ // Map Plaid error codes to our error codes
405
+ if (error.error_code) {
406
+ switch (error.error_code) {
407
+ case 'INVALID_CREDENTIALS':
408
+ errorCode = Plaid.PlaidErrorCodes.PLAID_INVALID_CREDENTIALS;
409
+ message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
410
+ retryable = true;
411
+ break;
412
+ case 'ITEM_LOGIN_REQUIRED':
413
+ errorCode = Plaid.PlaidErrorCodes.PLAID_INVALID_CREDENTIALS;
414
+ message = 'Your bank requires re-authentication. Please try again.';
415
+ retryable = true;
416
+ break;
417
+ case 'ITEM_LOCKED':
418
+ errorCode = Plaid.PlaidErrorCodes.PLAID_ACCOUNT_LOCKED;
419
+ message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
420
+ retryable = false;
421
+ userAction = 'Contact your bank';
422
+ break;
423
+ case 'INSTITUTION_NOT_RESPONDING':
424
+ errorCode = Plaid.PlaidErrorCodes.PLAID_MAINTENANCE;
425
+ message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
426
+ retryable = true;
427
+ break;
428
+ case 'RATE_LIMIT_EXCEEDED':
429
+ errorCode = Plaid.PlaidErrorCodes.PLAID_RATE_LIMITED;
430
+ message = Plaid.PLAID_ERROR_MESSAGES[errorCode];
431
+ retryable = true;
432
+ break;
433
+ default:
434
+ if (error.error_message) {
435
+ message = error.error_message;
436
+ }
437
+ break;
438
+ }
439
+ }
440
+ this.handleError({
441
+ code: errorCode,
442
+ message,
443
+ severity: Plaid.PLAID_ERROR_SEVERITY[errorCode],
444
+ originalError: error,
445
+ retryable,
446
+ userAction,
447
+ });
448
+ this.isAuthenticating = false;
449
+ };
450
+ this.handleError = (plaidError) => {
451
+ this.error = plaidError;
452
+ this.isLoading = false;
453
+ // Emit error event for parent components
454
+ this.plaidVerificationError.emit(plaidError);
455
+ console.error('Plaid verification error:', plaidError);
456
+ };
457
+ this.clearError = () => {
458
+ if (this.error) {
459
+ this.error = null;
460
+ }
461
+ };
462
+ }
463
+ componentDidRender() {
464
+ if (!this.scriptRef)
465
+ return;
466
+ this.scriptRef.onload = () => {
467
+ this.initializePlaidLink();
468
+ };
469
+ this.scriptRef.onerror = () => {
470
+ this.handleError({
471
+ code: Plaid.PlaidErrorCodes.PLAID_SDK_LOAD_FAILED,
472
+ message: Plaid.PLAID_ERROR_MESSAGES[Plaid.PlaidErrorCodes.PLAID_SDK_LOAD_FAILED],
473
+ severity: Plaid.PLAID_ERROR_SEVERITY[Plaid.PlaidErrorCodes.PLAID_SDK_LOAD_FAILED],
474
+ retryable: true,
475
+ userAction: 'Refresh the page and try again',
476
+ });
477
+ };
478
+ }
479
+ disconnectedCallback() {
480
+ // Clean up timeouts and abort controllers
481
+ if (this.timeoutId) {
482
+ clearTimeout(this.timeoutId);
483
+ }
484
+ if (this.abortController) {
485
+ this.abortController.abort();
486
+ }
487
+ }
488
+ render() {
489
+ const renderErrorState = () => {
490
+ if (!this.error)
491
+ return null;
492
+ const errorClass = this.error.severity === ComponentError.ComponentErrorSeverity.ERROR
493
+ ? 'text-danger'
494
+ : this.error.severity === ComponentError.ComponentErrorSeverity.WARNING
495
+ ? 'text-warning'
496
+ : 'text-info';
497
+ return (index.h("div", { class: `${errorClass} mt-2` }, index.h("small", null, this.error.message), index.h("br", null), this.error.userAction && (index.h("small", { class: "text-muted" }, this.error.userAction))));
498
+ };
499
+ const renderStatusState = () => {
500
+ if (this.error)
501
+ return null;
502
+ if (this.isLoading) {
503
+ return (index.h("div", { class: "text-info mt-2" }, index.h("small", null, "Verifying bank account...")));
504
+ }
505
+ if (this.isSuccess) {
506
+ return (index.h("div", { class: "text-success mt-2" }, index.h("small", null, "\u2713 Bank account verified successfully")));
507
+ }
508
+ if (this.isAuthenticating) {
509
+ return (index.h("div", { class: "text-info mt-2" }, index.h("small", null, "Connecting to your bank...")));
510
+ }
511
+ return null;
512
+ };
513
+ const plaidLogo = (index.h("img", { class: "plaid-logo-img", src: plaidIcon.plaidIconSvg, alt: "Plaid", title: "Plaid", style: {
514
+ display: 'inline',
515
+ width: '20px',
516
+ height: '20px',
517
+ marginLeft: '5px',
518
+ marginTop: '-2px',
519
+ } }));
520
+ return (index.h(styledHost.StyledHost, null, index.h("script", { src: "https://cdn.plaid.com/link/v2/stable/link-initialize.js", async: true, ref: (el) => (this.scriptRef = el) }), index.h("div", null, index.h("div", { class: "mb-3" }, index.h(button.Button, { variant: "secondary", type: "button", onClick: (event) => { event.preventDefault(); this.openPlaidLink(); }, disabled: this.isLoading, part: parts.buttonSecondary }, "Link Bank Account with ", plaidLogo)), renderErrorState(), renderStatusState())));
521
+ }
522
+ };
523
+
203
524
  exports.bank_account_document_form_inputs = BankAccountDocumentFormInputs;
204
525
  exports.bank_account_form_inputs = BankAccountFormInputs;
205
526
  exports.bank_account_form_inputs_canada = BankAccountFormInputsCanada;
@@ -208,3 +529,4 @@ exports.business_documents_on_file = BusinessDocumentsOnFile;
208
529
  exports.form_control_file = FileInput;
209
530
  exports.justifi_business_representative_form_inputs = RepresentativeFormInputs;
210
531
  exports.justifi_owner_form = BusinessOwnerForm;
532
+ exports.plaid_verification = PlaidVerification;
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  var index_esm = require('./index.esm-ByC0D4sJ.js');
4
- var schemaValidations = require('./schema-validations-DYYDrVol.js');
5
- var Business = require('./Business-uoeKyW_a.js');
6
- var countryConfig = require('./country-config-DGi9t3Ma.js');
4
+ var schemaValidations = require('./schema-validations-BakyfJpE.js');
5
+ var Business = require('./Business-CB8EVrhD.js');
6
+ var countryConfig = require('./country-config-ETD-7Wb7.js');
7
7
 
8
8
  // Base schema (no country-specific rules for classification/tax id)
9
9
  const baseBusinessCoreInfoSchema = (allowOptionalFields) => {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var Business = require('./Business-uoeKyW_a.js');
3
+ var Business = require('./Business-CB8EVrhD.js');
4
4
 
5
5
  const businessClassificationOptions = [
6
6
  {
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var index_esm = require('./index.esm-ByC0D4sJ.js');
4
- var schemaValidations = require('./schema-validations-DYYDrVol.js');
5
- var Business = require('./Business-uoeKyW_a.js');
4
+ var schemaValidations = require('./schema-validations-BakyfJpE.js');
5
+ var Business = require('./Business-CB8EVrhD.js');
6
6
 
7
7
  // Internal USA schemas
8
8
  const schemaUSA$1 = () => index_esm.create$3({
@@ -2,9 +2,9 @@
2
2
 
3
3
  var Api = require('./Api-CVbEWBG6.js');
4
4
  require('./ComponentError-D4OLnOkg.js');
5
- require('./GooglePay-CbKCUEfb.js');
5
+ require('./Plaid-DxPvVu0H.js');
6
6
  require('./Pagination-Dediz133.js');
7
- require('./Business-uoeKyW_a.js');
7
+ require('./Business-CB8EVrhD.js');
8
8
  require('./Dispute-CruQTF6_.js');
9
9
 
10
10
  const api = Api.Api();
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var _package = require('./package-DcGEg97O.js');
3
+ var _package = require('./package-Odd17EzW.js');
4
4
  var Api = require('./Api-CVbEWBG6.js');
5
5
  require('./ComponentError-D4OLnOkg.js');
6
- require('./GooglePay-CbKCUEfb.js');
6
+ require('./Plaid-DxPvVu0H.js');
7
7
  require('./Pagination-Dediz133.js');
8
- require('./Business-uoeKyW_a.js');
8
+ require('./Business-CB8EVrhD.js');
9
9
  require('./Dispute-CruQTF6_.js');
10
10
 
11
11
  const api = Api.Api();
@@ -24,6 +24,7 @@ class AnalyticsService {
24
24
  */
25
25
  class JustifiAnalytics {
26
26
  constructor(component) {
27
+ this.eventListeners = new Map();
27
28
  this.handleCustomEvent = async (data) => {
28
29
  // Track the event
29
30
  await this.service.record(data);
@@ -63,10 +64,12 @@ class JustifiAnalytics {
63
64
  this.eventEmitters.forEach((eventName) => {
64
65
  // if this.componentInstance.addEventListener is a function add the event listener
65
66
  if (typeof this.componentInstance.addEventListener === 'function') {
66
- this.componentInstance.addEventListener(eventName, (event) => this.handleCustomEvent({
67
+ const boundHandler = (event) => this.handleCustomEvent({
67
68
  event_type: eventName,
68
69
  data: Object.assign(Object.assign({}, this.basicData), { error: event.detail }),
69
- }));
70
+ });
71
+ this.eventListeners.set(eventName, boundHandler);
72
+ this.componentInstance.addEventListener(eventName, boundHandler);
70
73
  }
71
74
  });
72
75
  }
@@ -81,12 +84,10 @@ class JustifiAnalytics {
81
84
  }
82
85
  cleanup() {
83
86
  // Remove event listeners
84
- if (!this.eventEmitters) {
85
- return;
86
- }
87
- this.eventEmitters.forEach((event) => {
88
- this.componentInstance.removeEventListener(event, this.handleCustomEvent);
87
+ this.eventListeners.forEach((handler, eventName) => {
88
+ this.componentInstance.removeEventListener(eventName, handler);
89
89
  });
90
+ this.eventListeners.clear();
90
91
  }
91
92
  }
92
93
 
@@ -2,9 +2,9 @@
2
2
 
3
3
  var Api = require('./Api-CVbEWBG6.js');
4
4
  require('./ComponentError-D4OLnOkg.js');
5
- require('./GooglePay-CbKCUEfb.js');
5
+ require('./Plaid-DxPvVu0H.js');
6
6
  require('./Pagination-Dediz133.js');
7
- require('./Business-uoeKyW_a.js');
7
+ require('./Business-CB8EVrhD.js');
8
8
  require('./Dispute-CruQTF6_.js');
9
9
 
10
10
  const api = Api.Api();
@@ -4,9 +4,9 @@ var index = require('./index-p7cvUYAE.js');
4
4
  require('./config-state-BIgGhhe9.js');
5
5
  require('./dinero-BwNN_k7x.js');
6
6
  require('./ComponentError-D4OLnOkg.js');
7
- require('./GooglePay-CbKCUEfb.js');
7
+ require('./Plaid-DxPvVu0H.js');
8
8
  var Pagination = require('./Pagination-Dediz133.js');
9
- require('./Business-uoeKyW_a.js');
9
+ require('./Business-CB8EVrhD.js');
10
10
  require('./Dispute-CruQTF6_.js');
11
11
  var table = require('./table-eTN_pRIP.js');
12
12
  var eventTypes = require('./event-types-YOY5TKUN.js');
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var Business = require('./Business-uoeKyW_a.js');
3
+ var Business = require('./Business-CB8EVrhD.js');
4
4
 
5
5
  const ProvinceOptions = [
6
6
  {