@justifi/webcomponents 6.14.5 → 6.15.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (444) hide show
  1. package/dist/cjs/{Analytics-BVHauOC2.js → Analytics-COhunq0p.js} +3 -3
  2. package/dist/cjs/{Api-BzB0rppJ.js → Api-Do6SaltY.js} +1 -1
  3. package/dist/cjs/{Plaid-B2o4c_Ej.js → Plaid-D85oV9FN.js} +5 -0
  4. package/dist/cjs/additional-questions-form-step_15.cjs.entry.js +7 -7
  5. package/dist/cjs/additional-statement_8.cjs.entry.js +8 -8
  6. package/dist/cjs/bank-account-billing-form-simple_4.cjs.entry.js +4 -4
  7. package/dist/cjs/bank-account-document-form-inputs.cjs.entry.js +1 -1
  8. package/dist/cjs/bank-account-form.cjs.entry.js +5 -5
  9. package/dist/cjs/{business.service-j_VDzA2-.js → business.service-72YETCdB.js} +2 -2
  10. package/dist/cjs/card-form.cjs.entry.js +5 -5
  11. package/dist/cjs/{check-pkg-version-JMiLuNXu.js → check-pkg-version-BxGoSXGD.js} +1 -1
  12. package/dist/cjs/{checkout-actions-VCJi-q4z.js → checkout-actions-BRQFQ6n-.js} +2 -2
  13. package/dist/cjs/{checkout.service-0vHtBDZY.js → checkout.service-CPsXfx0Z.js} +2 -2
  14. package/dist/cjs/{checkout.store-DOa1-SjA.js → checkout.store-DaV9lvEQ.js} +6 -1
  15. package/dist/cjs/custom-popper_2.cjs.entry.js +2 -2
  16. package/dist/cjs/dispute-notification_2.cjs.entry.js +10 -10
  17. package/dist/cjs/{event-types-CMpeGHw8.js → event-types-UHzCC7Ga.js} +2 -2
  18. package/dist/cjs/form-address-fields_3.cjs.entry.js +2 -2
  19. package/dist/cjs/form-alert_3.cjs.entry.js +5 -5
  20. package/dist/cjs/form-control-checkbox.cjs.entry.js +2 -2
  21. package/dist/cjs/form-control-date.cjs.entry.js +2 -2
  22. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +3 -3
  23. package/dist/cjs/form-control-file.cjs.entry.js +2 -2
  24. package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
  25. package/dist/cjs/form-control-number_2.cjs.entry.js +2 -2
  26. package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
  27. package/dist/cjs/form-control-select_2.cjs.entry.js +4 -4
  28. package/dist/cjs/{get-business-BBDsPv-b.js → get-business-BpaRbn5S.js} +2 -2
  29. package/dist/cjs/{get-payment-details-BYZeUFAB.js → get-payment-details-Cmg8gWvo.js} +2 -2
  30. package/dist/cjs/{get-subaccounts-B7e8Eovg.js → get-subaccounts-Bp7DOmM_.js} +3 -3
  31. package/dist/cjs/{index-CajjbB9t.js → index-DDa1jd08.js} +4 -0
  32. package/dist/cjs/index.cjs.js +1 -1
  33. package/dist/cjs/internal-button.cjs.entry.js +1 -1
  34. package/dist/cjs/{justifi-apple-pay_11.cjs.entry.js → justifi-apple-pay_12.cjs.entry.js} +314 -26
  35. package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +6 -6
  36. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +6 -6
  37. package/dist/cjs/justifi-billing-form-full.cjs.entry.js +1 -1
  38. package/dist/cjs/justifi-billing-form.cjs.entry.js +1 -1
  39. package/dist/cjs/justifi-business-details.cjs.entry.js +8 -8
  40. package/dist/cjs/justifi-business-form.cjs.entry.js +8 -8
  41. package/dist/cjs/justifi-card-billing-form-simple.cjs.entry.js +1 -1
  42. package/dist/cjs/justifi-card-form.cjs.entry.js +6 -6
  43. package/dist/cjs/justifi-checkout-qr-code.cjs.entry.js +5 -5
  44. package/dist/cjs/justifi-checkout.cjs.entry.js +8 -8
  45. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +3 -3
  46. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +10 -10
  47. package/dist/cjs/justifi-dispute-management.cjs.entry.js +8 -8
  48. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +6 -6
  49. package/dist/cjs/justifi-order-terminals.cjs.entry.js +10 -10
  50. package/dist/cjs/justifi-payment-details.cjs.entry.js +16 -16
  51. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +8 -8
  52. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +8 -8
  53. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
  54. package/dist/cjs/justifi-payments-list.cjs.entry.js +8 -8
  55. package/dist/cjs/justifi-payout-details.cjs.entry.js +11 -11
  56. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +8 -8
  57. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +3 -3
  58. package/dist/cjs/justifi-payouts-list.cjs.entry.js +10 -10
  59. package/dist/cjs/justifi-qr-terminal.cjs.entry.js +8 -8
  60. package/dist/cjs/justifi-refund-payment.cjs.entry.js +8 -8
  61. package/dist/cjs/justifi-save-new-payment-method.cjs.entry.js +1 -1
  62. package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +1 -1
  63. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +8 -8
  64. package/dist/cjs/justifi-skeleton.cjs.entry.js +1 -1
  65. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +4 -4
  66. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +8 -8
  67. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +2 -2
  68. package/dist/cjs/justifi-terminals-list.cjs.entry.js +9 -9
  69. package/dist/cjs/loader.cjs.js +1 -1
  70. package/dist/cjs/{package-DfdMLmz7.js → package-G3Vs7Jx5.js} +1 -1
  71. package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
  72. package/dist/cjs/{payment-provisioning-actions-CIsDrh8k.js → payment-provisioning-actions-DDooZhhk.js} +2 -2
  73. package/dist/cjs/{payment.service-Bs3HJ4Kv.js → payment.service-CVwTrHEL.js} +2 -2
  74. package/dist/cjs/{payout.service-DNWZxt3R.js → payout.service-CL3VR0hN.js} +2 -2
  75. package/dist/cjs/{payouts-status-DVU5138C.js → payouts-status-1IUtW-UQ.js} +2 -2
  76. package/dist/cjs/{plaid.service-B_YQGBoC.js → plaid.service-Cukg5wuY.js} +2 -2
  77. package/dist/cjs/radio-list-item.cjs.entry.js +1 -1
  78. package/dist/cjs/save-new-payment-method.cjs.entry.js +3 -3
  79. package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
  80. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
  81. package/dist/cjs/{terminal.service-CvFZEemr.js → terminal.service-C0KG7BqL.js} +2 -2
  82. package/dist/cjs/{utils-WrOn06xB.js → utils-CBriZzRC.js} +1 -1
  83. package/dist/cjs/webcomponents.cjs.js +1 -1
  84. package/dist/collection/api/Checkout.js +5 -0
  85. package/dist/collection/api/Paypal.js +1 -0
  86. package/dist/collection/api/index.js +1 -0
  87. package/dist/collection/api/services/paypal.service.js +9 -0
  88. package/dist/collection/collection-manifest.json +1 -0
  89. package/dist/collection/components/checkout/billing-form/bank-account-billing-form-simple.js +1 -1
  90. package/dist/collection/components/checkout/billing-form/card-billing-form-simple.js +1 -1
  91. package/dist/collection/components/checkout/billing-form/justifi-billing-form.js +1 -1
  92. package/dist/collection/components/checkout/card-form/card-form.js +2 -2
  93. package/dist/collection/components/checkout/justifi-checkout.js +1 -1
  94. package/dist/collection/components/checkout/justifi-saved-payment-method.js +1 -1
  95. package/dist/collection/components/checkout/save-new-payment-method/justifi-save-new-payment-method.js +1 -1
  96. package/dist/collection/components/checkout/save-new-payment-method/save-new-payment-method.js +1 -1
  97. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +3 -3
  98. package/dist/collection/components/checkouts-list/justifi-checkouts-list.js +2 -2
  99. package/dist/collection/components/dispute-management/dispute-notification.js +2 -2
  100. package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +1 -1
  101. package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +1 -1
  102. package/dist/collection/components/dispute-management/dispute-response/customer-details.js +1 -1
  103. package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +1 -1
  104. package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +1 -1
  105. package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +1 -1
  106. package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +1 -1
  107. package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +1 -1
  108. package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +1 -1
  109. package/dist/collection/components/dispute-management/justifi-dispute-management.js +1 -1
  110. package/dist/collection/components/filters/table-filters-menu.js +1 -1
  111. package/dist/collection/components/modular-checkout/ModularCheckout.js +4 -0
  112. package/dist/collection/components/modular-checkout/justifi-modular-checkout.js +75 -11
  113. package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-billing-form-simple.js +1 -1
  114. package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-form.js +1 -1
  115. package/dist/collection/components/modular-checkout/sub-components/justifi-billing-form-full.js +1 -1
  116. package/dist/collection/components/modular-checkout/sub-components/justifi-card-billing-form-simple.js +1 -1
  117. package/dist/collection/components/modular-checkout/sub-components/justifi-card-form.js +1 -1
  118. package/dist/collection/components/modular-checkout/sub-components/justifi-checkout-summary.js +1 -1
  119. package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
  120. package/dist/collection/components/modular-checkout/sub-components/paypal/justifi-paypal.js +278 -0
  121. package/dist/collection/components/modular-checkout/sub-components/paypal/paypal.js +17 -0
  122. package/dist/collection/components/order-terminals/justifi-order-terminals.js +1 -1
  123. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
  124. package/dist/collection/components/payment-details/justifi-payment-details.js +8 -8
  125. package/dist/collection/components/payment-transactions-list/justifi-payment-transactions-list.js +1 -1
  126. package/dist/collection/components/payments-list/justifi-payments-list-filters.js +2 -2
  127. package/dist/collection/components/payments-list/justifi-payments-list.js +1 -1
  128. package/dist/collection/components/payout-details/justifi-payout-details.js +3 -3
  129. package/dist/collection/components/payout-transactions-list/justifi-payout-transactions-list.js +1 -1
  130. package/dist/collection/components/payouts-list/justifi-payouts-list-filters.js +2 -2
  131. package/dist/collection/components/payouts-list/justifi-payouts-list.js +1 -1
  132. package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list-filters.js +3 -3
  133. package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list.js +2 -2
  134. package/dist/collection/components/terminals-list/justifi-terminals-list-filters.js +1 -1
  135. package/dist/collection/components/terminals-list/justifi-terminals-list.js +1 -1
  136. package/dist/collection/components/tokenize-payment-method/justifi-tokenize-payment-method.js +1 -1
  137. package/dist/collection/store/checkout.store.js +5 -0
  138. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  139. package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
  140. package/dist/collection/ui-components/form/form-control-date.js +2 -2
  141. package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
  142. package/dist/collection/ui-components/form/form-control-file.js +2 -2
  143. package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
  144. package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
  145. package/dist/collection/ui-components/form/form-control-number.js +2 -2
  146. package/dist/collection/ui-components/form/form-control-radio.js +2 -2
  147. package/dist/collection/ui-components/form/form-control-select.js +2 -2
  148. package/dist/collection/ui-components/form/form-control-text.js +2 -2
  149. package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
  150. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  151. package/dist/collection/ui-components/form/iframe-input.js +3 -3
  152. package/dist/collection/ui-components/internal-button.js +1 -1
  153. package/dist/collection/ui-components/radio-list-item.js +1 -1
  154. package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +1 -1
  155. package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +1 -1
  156. package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +1 -1
  157. package/dist/docs.json +115 -3
  158. package/dist/esm/{Analytics-Dgz_MQ1D.js → Analytics-3WmRTICF.js} +3 -3
  159. package/dist/esm/{Api-DScockhO.js → Api-83B3f28Q.js} +1 -1
  160. package/dist/esm/{Plaid-DJ-4YL0_.js → Plaid-BP3xNxQF.js} +5 -0
  161. package/dist/esm/additional-questions-form-step_15.entry.js +7 -7
  162. package/dist/esm/additional-statement_8.entry.js +8 -8
  163. package/dist/esm/bank-account-billing-form-simple_4.entry.js +4 -4
  164. package/dist/esm/bank-account-document-form-inputs.entry.js +1 -1
  165. package/dist/esm/bank-account-form.entry.js +5 -5
  166. package/dist/esm/{business.service-DR2ldRqG.js → business.service-CTqiKKy5.js} +2 -2
  167. package/dist/esm/card-form.entry.js +5 -5
  168. package/dist/esm/{check-pkg-version-CPMg0K2m.js → check-pkg-version-CmFl6VLH.js} +1 -1
  169. package/dist/esm/{checkout-actions-DhL8YxrK.js → checkout-actions-0ftD0elo.js} +2 -2
  170. package/dist/esm/{checkout.service-CU4BnB34.js → checkout.service-wjFjBxIB.js} +2 -2
  171. package/dist/esm/{checkout.store-B6amfNq_.js → checkout.store-B2mtQcB5.js} +6 -1
  172. package/dist/esm/custom-popper_2.entry.js +2 -2
  173. package/dist/esm/dispute-notification_2.entry.js +10 -10
  174. package/dist/esm/{event-types-BNfdthYa.js → event-types-cqQHLwCy.js} +2 -2
  175. package/dist/esm/form-address-fields_3.entry.js +2 -2
  176. package/dist/esm/form-alert_3.entry.js +5 -5
  177. package/dist/esm/form-control-checkbox.entry.js +2 -2
  178. package/dist/esm/form-control-date.entry.js +2 -2
  179. package/dist/esm/form-control-file-v2_2.entry.js +3 -3
  180. package/dist/esm/form-control-file.entry.js +2 -2
  181. package/dist/esm/form-control-monetary.entry.js +2 -2
  182. package/dist/esm/form-control-number_2.entry.js +2 -2
  183. package/dist/esm/form-control-radio.entry.js +2 -2
  184. package/dist/esm/form-control-select_2.entry.js +4 -4
  185. package/dist/esm/{get-business-BSyOONF0.js → get-business-BLCT-zfN.js} +2 -2
  186. package/dist/esm/{get-payment-details-CoGzqJ6o.js → get-payment-details-BokzuPGl.js} +2 -2
  187. package/dist/esm/{get-subaccounts-BraeNX17.js → get-subaccounts-ClGG-LRZ.js} +3 -3
  188. package/dist/esm/{index-DkoufM1t.js → index-DEx8fQeW.js} +4 -0
  189. package/dist/esm/index.js +1 -1
  190. package/dist/esm/internal-button.entry.js +1 -1
  191. package/dist/esm/{justifi-apple-pay_11.entry.js → justifi-apple-pay_12.entry.js} +314 -27
  192. package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +6 -6
  193. package/dist/esm/justifi-bank-account-form.entry.js +6 -6
  194. package/dist/esm/justifi-billing-form-full.entry.js +1 -1
  195. package/dist/esm/justifi-billing-form.entry.js +1 -1
  196. package/dist/esm/justifi-business-details.entry.js +8 -8
  197. package/dist/esm/justifi-business-form.entry.js +8 -8
  198. package/dist/esm/justifi-card-billing-form-simple.entry.js +1 -1
  199. package/dist/esm/justifi-card-form.entry.js +6 -6
  200. package/dist/esm/justifi-checkout-qr-code.entry.js +5 -5
  201. package/dist/esm/justifi-checkout.entry.js +8 -8
  202. package/dist/esm/justifi-checkouts-list-filters.entry.js +3 -3
  203. package/dist/esm/justifi-checkouts-list.entry.js +10 -10
  204. package/dist/esm/justifi-dispute-management.entry.js +8 -8
  205. package/dist/esm/justifi-gross-payment-chart.entry.js +6 -6
  206. package/dist/esm/justifi-order-terminals.entry.js +10 -10
  207. package/dist/esm/justifi-payment-details.entry.js +16 -16
  208. package/dist/esm/justifi-payment-provisioning.entry.js +8 -8
  209. package/dist/esm/justifi-payment-transactions-list.entry.js +8 -8
  210. package/dist/esm/justifi-payments-list-filters.entry.js +2 -2
  211. package/dist/esm/justifi-payments-list.entry.js +8 -8
  212. package/dist/esm/justifi-payout-details.entry.js +11 -11
  213. package/dist/esm/justifi-payout-transactions-list.entry.js +8 -8
  214. package/dist/esm/justifi-payouts-list-filters.entry.js +3 -3
  215. package/dist/esm/justifi-payouts-list.entry.js +10 -10
  216. package/dist/esm/justifi-qr-terminal.entry.js +8 -8
  217. package/dist/esm/justifi-refund-payment.entry.js +8 -8
  218. package/dist/esm/justifi-save-new-payment-method.entry.js +1 -1
  219. package/dist/esm/justifi-saved-payment-method.entry.js +1 -1
  220. package/dist/esm/justifi-season-interruption-insurance.entry.js +8 -8
  221. package/dist/esm/justifi-skeleton.entry.js +1 -1
  222. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +4 -4
  223. package/dist/esm/justifi-terminal-orders-list.entry.js +8 -8
  224. package/dist/esm/justifi-terminals-list-filters.entry.js +2 -2
  225. package/dist/esm/justifi-terminals-list.entry.js +9 -9
  226. package/dist/esm/loader.js +1 -1
  227. package/dist/esm/{package-CiypNylL.js → package-CAVi_ne1.js} +1 -1
  228. package/dist/esm/payment-method-option.entry.js +1 -1
  229. package/dist/esm/{payment-provisioning-actions-DJKGndr3.js → payment-provisioning-actions-VRIPjnAQ.js} +2 -2
  230. package/dist/esm/{payment.service-BxBf9T-D.js → payment.service-D7uv5vym.js} +2 -2
  231. package/dist/esm/{payout.service-DKe3_O4y.js → payout.service-BoSyqft1.js} +2 -2
  232. package/dist/esm/{payouts-status-C0nijel1.js → payouts-status-CaiC5qpn.js} +2 -2
  233. package/dist/esm/{plaid.service-DwWljJOH.js → plaid.service-DufQkxDk.js} +2 -2
  234. package/dist/esm/radio-list-item.entry.js +1 -1
  235. package/dist/esm/save-new-payment-method.entry.js +3 -3
  236. package/dist/esm/table-filters-menu.entry.js +1 -1
  237. package/dist/esm/terminal-quantity-selector.entry.js +1 -1
  238. package/dist/esm/{terminal.service-Q4KXLOka.js → terminal.service-BM2aebB6.js} +2 -2
  239. package/dist/esm/{utils-D6LKoG0M.js → utils-YUOJKtjO.js} +1 -1
  240. package/dist/esm/webcomponents.js +1 -1
  241. package/dist/module/ModularCheckout.js +4 -0
  242. package/dist/module/Plaid.js +5 -0
  243. package/dist/module/additional-statement2.js +1 -1
  244. package/dist/module/bank-account-billing-form-simple2.js +1 -1
  245. package/dist/module/cancellation-policy2.js +1 -1
  246. package/dist/module/card-billing-form-simple2.js +1 -1
  247. package/dist/module/card-form2.js +2 -2
  248. package/dist/module/checkout.store.js +5 -0
  249. package/dist/module/custom-popper2.js +2 -2
  250. package/dist/module/customer-details2.js +1 -1
  251. package/dist/module/dispute-notification2.js +2 -2
  252. package/dist/module/dispute-response2.js +1 -1
  253. package/dist/module/duplicate-charge2.js +1 -1
  254. package/dist/module/electronic-evidence2.js +1 -1
  255. package/dist/module/form-control-checkbox2.js +2 -2
  256. package/dist/module/form-control-date2.js +2 -2
  257. package/dist/module/form-control-file-v22.js +1 -1
  258. package/dist/module/form-control-file2.js +2 -2
  259. package/dist/module/form-control-monetary2.js +2 -2
  260. package/dist/module/form-control-number-masked2.js +2 -2
  261. package/dist/module/form-control-number2.js +2 -2
  262. package/dist/module/form-control-radio2.js +2 -2
  263. package/dist/module/form-control-select2.js +2 -2
  264. package/dist/module/form-control-text2.js +2 -2
  265. package/dist/module/form-control-textarea2.js +2 -2
  266. package/dist/module/hidden-input2.js +1 -1
  267. package/dist/module/iframe-input2.js +3 -3
  268. package/dist/module/internal-button2.js +1 -1
  269. package/dist/module/justifi-bank-account-billing-form-simple.js +1 -1
  270. package/dist/module/justifi-bank-account-form.js +1 -1
  271. package/dist/module/justifi-billing-form-full.js +1 -1
  272. package/dist/module/justifi-billing-form.js +1 -1
  273. package/dist/module/justifi-button2.js +1 -1
  274. package/dist/module/justifi-card-billing-form-simple.js +1 -1
  275. package/dist/module/justifi-card-form.js +1 -1
  276. package/dist/module/justifi-checkout-summary2.js +1 -1
  277. package/dist/module/justifi-checkout.js +53 -47
  278. package/dist/module/justifi-checkouts-list-filters.js +2 -2
  279. package/dist/module/justifi-checkouts-list.js +2 -2
  280. package/dist/module/justifi-dispute-management.js +1 -1
  281. package/dist/module/justifi-header2.js +1 -1
  282. package/dist/module/justifi-modular-checkout2.js +75 -11
  283. package/dist/module/justifi-order-terminals.js +1 -1
  284. package/dist/module/justifi-payment-details.js +8 -8
  285. package/dist/module/justifi-payment-transactions-list.js +1 -1
  286. package/dist/module/justifi-payments-list-filters.js +2 -2
  287. package/dist/module/justifi-payments-list.js +1 -1
  288. package/dist/module/justifi-payout-details.js +3 -3
  289. package/dist/module/justifi-payout-transactions-list.js +1 -1
  290. package/dist/module/justifi-payouts-list-filters.js +2 -2
  291. package/dist/module/justifi-payouts-list.js +1 -1
  292. package/dist/module/justifi-paypal.d.ts +11 -0
  293. package/dist/module/justifi-paypal.js +6 -0
  294. package/dist/module/justifi-paypal2.js +254 -0
  295. package/dist/module/justifi-save-new-payment-method.js +1 -1
  296. package/dist/module/justifi-saved-payment-method.js +1 -1
  297. package/dist/module/justifi-skeleton.js +1 -1
  298. package/dist/module/justifi-terminal-orders-list-filters.js +3 -3
  299. package/dist/module/justifi-terminal-orders-list.js +2 -2
  300. package/dist/module/justifi-terminals-list-filters.js +1 -1
  301. package/dist/module/justifi-terminals-list.js +1 -1
  302. package/dist/module/justifi-tokenize-payment-method2.js +1 -1
  303. package/dist/module/package.js +1 -1
  304. package/dist/module/payment-method-option.js +1 -1
  305. package/dist/module/product-or-service2.js +1 -1
  306. package/dist/module/radio-list-item2.js +1 -1
  307. package/dist/module/refund-policy2.js +1 -1
  308. package/dist/module/save-new-payment-method2.js +1 -1
  309. package/dist/module/shipping-details2.js +1 -1
  310. package/dist/module/table-filters-menu2.js +1 -1
  311. package/dist/module/terminal-quantity-selector2.js +1 -1
  312. package/dist/types/api/Checkout.d.ts +13 -1
  313. package/dist/types/api/Paypal.d.ts +11 -0
  314. package/dist/types/api/index.d.ts +1 -0
  315. package/dist/types/api/services/paypal.service.d.ts +8 -0
  316. package/dist/types/components/modular-checkout/ModularCheckout.d.ts +6 -2
  317. package/dist/types/components/modular-checkout/justifi-modular-checkout.d.ts +7 -0
  318. package/dist/types/components/modular-checkout/sub-components/paypal/justifi-paypal.d.ts +43 -0
  319. package/dist/types/components/modular-checkout/sub-components/paypal/paypal.d.ts +39 -0
  320. package/dist/types/components.d.ts +53 -0
  321. package/dist/types/store/checkout.store.d.ts +2 -0
  322. package/dist/webcomponents/index.esm.js +1 -1
  323. package/dist/webcomponents/{p-49e40ebe.entry.js → p-0aa96018.entry.js} +1 -1
  324. package/dist/webcomponents/p-0fbc806f.entry.js +1 -0
  325. package/dist/webcomponents/p-10787684.entry.js +1 -0
  326. package/dist/webcomponents/{p-bc435cae.entry.js → p-1365a46b.entry.js} +1 -1
  327. package/dist/webcomponents/p-1fa62eba.entry.js +1 -0
  328. package/dist/webcomponents/p-25f70d5f.entry.js +1 -0
  329. package/dist/webcomponents/{p-BlqdDtQr.js → p-27igUlku.js} +1 -1
  330. package/dist/webcomponents/{p-4f54d1b2.entry.js → p-28fb6b50.entry.js} +1 -1
  331. package/dist/webcomponents/{p-f0083ace.entry.js → p-2b5533a1.entry.js} +1 -1
  332. package/dist/webcomponents/{p-da21ae43.entry.js → p-36340e63.entry.js} +1 -1
  333. package/dist/webcomponents/p-3642e189.entry.js +1 -0
  334. package/dist/webcomponents/p-388082cd.entry.js +1 -0
  335. package/dist/webcomponents/p-3f2fb856.entry.js +1 -0
  336. package/dist/webcomponents/{p-041a22dd.entry.js → p-42021e67.entry.js} +1 -1
  337. package/dist/webcomponents/{p-0d9022e5.entry.js → p-4cad48c1.entry.js} +1 -1
  338. package/dist/webcomponents/{p-373586db.entry.js → p-50c2b8f0.entry.js} +1 -1
  339. package/dist/webcomponents/p-5842d4e8.entry.js +1 -0
  340. package/dist/webcomponents/{p-e7909732.entry.js → p-5c89dcdf.entry.js} +1 -1
  341. package/dist/webcomponents/p-5d7b3d71.entry.js +1 -0
  342. package/dist/webcomponents/p-5dcb1713.entry.js +1 -0
  343. package/dist/webcomponents/p-5f8c30b6.entry.js +1 -0
  344. package/dist/webcomponents/p-68e88747.entry.js +1 -0
  345. package/dist/webcomponents/p-6931a1f2.entry.js +1 -0
  346. package/dist/webcomponents/{p-f8f01bbb.entry.js → p-6c94218c.entry.js} +1 -1
  347. package/dist/webcomponents/{p-e954f46c.entry.js → p-6eb65d23.entry.js} +1 -1
  348. package/dist/webcomponents/{p-027ef7e9.entry.js → p-7002286e.entry.js} +1 -1
  349. package/dist/webcomponents/{p-d6122124.entry.js → p-72bb4aff.entry.js} +1 -1
  350. package/dist/webcomponents/p-74575a99.entry.js +1 -0
  351. package/dist/webcomponents/p-777470cb.entry.js +1 -0
  352. package/dist/webcomponents/p-7c405573.entry.js +1 -0
  353. package/dist/webcomponents/p-825a7ee6.entry.js +1 -0
  354. package/dist/webcomponents/p-8d11aa27.entry.js +1 -0
  355. package/dist/webcomponents/{p-3870712e.entry.js → p-909a9828.entry.js} +4 -4
  356. package/dist/webcomponents/p-955c06d3.entry.js +1 -0
  357. package/dist/webcomponents/{p-2139497d.entry.js → p-97c6593d.entry.js} +1 -1
  358. package/dist/webcomponents/p-9e3e2e32.entry.js +1 -0
  359. package/dist/webcomponents/{p-29f68bd0.entry.js → p-9e9a2546.entry.js} +1 -1
  360. package/dist/webcomponents/{p-cb977890.entry.js → p-9f0ef3f3.entry.js} +1 -1
  361. package/dist/webcomponents/{p-DD9-ceDZ.js → p-B0DHIvEj.js} +1 -1
  362. package/dist/webcomponents/{p-BL112JyU.js → p-BAKuMxC9.js} +1 -1
  363. package/dist/webcomponents/{p-DcA_wt-j.js → p-BEL8sLz6.js} +1 -1
  364. package/dist/webcomponents/{p-H4vl65HO.js → p-BSxXlu9H.js} +1 -1
  365. package/dist/webcomponents/p-CAVi_ne1.js +1 -0
  366. package/dist/webcomponents/{p-rIJv0FaI.js → p-CIpBEUtx.js} +1 -1
  367. package/dist/webcomponents/{p-CnHbIkmu.js → p-CJEetAx7.js} +1 -1
  368. package/dist/webcomponents/p-CLq3Og7o.js +1 -0
  369. package/dist/webcomponents/p-CXsRwohv.js +1 -0
  370. package/dist/webcomponents/p-Cy2N3vAg.js +1 -0
  371. package/dist/webcomponents/p-CyOXIqHo.js +1 -0
  372. package/dist/webcomponents/p-D6uhYbLo.js +1 -0
  373. package/dist/webcomponents/p-DEx8fQeW.js +1 -0
  374. package/dist/webcomponents/p-DN7VhlTn.js +1 -0
  375. package/dist/webcomponents/{p-Co3Rtlnu.js → p-DZQBPUfH.js} +1 -1
  376. package/dist/webcomponents/p-D_84NsmN.js +1 -0
  377. package/dist/webcomponents/p-Fpaf7CLD.js +1 -0
  378. package/dist/webcomponents/{p-CnDagPty.js → p-PdwJswAy.js} +1 -1
  379. package/dist/webcomponents/p-acb0b66c.entry.js +1 -0
  380. package/dist/webcomponents/p-b23dfa13.entry.js +1 -0
  381. package/dist/webcomponents/{p-b17fabdc.entry.js → p-b98ea26a.entry.js} +1 -1
  382. package/dist/webcomponents/{p-6884fa3d.entry.js → p-c3818a5a.entry.js} +1 -1
  383. package/dist/webcomponents/{p-61eae8cd.entry.js → p-c4889a06.entry.js} +1 -1
  384. package/dist/webcomponents/{p-b9316945.entry.js → p-c5424fda.entry.js} +1 -1
  385. package/dist/webcomponents/p-ca13117d.entry.js +1 -0
  386. package/dist/webcomponents/p-ca6c5365.entry.js +1 -0
  387. package/dist/webcomponents/{p-f6b900f4.entry.js → p-cb1cc88e.entry.js} +1 -1
  388. package/dist/webcomponents/{p-387aba3d.entry.js → p-ced6f6f1.entry.js} +1 -1
  389. package/dist/webcomponents/{p-c5560a87.entry.js → p-d59676ea.entry.js} +1 -1
  390. package/dist/webcomponents/p-d98bc829.entry.js +1 -0
  391. package/dist/webcomponents/{p-b9b5d046.entry.js → p-e55216fb.entry.js} +1 -1
  392. package/dist/webcomponents/{p-cb5d2198.entry.js → p-ead48010.entry.js} +1 -1
  393. package/dist/webcomponents/p-eb31024f.entry.js +1 -0
  394. package/dist/webcomponents/{p-543fcff2.entry.js → p-ee7fe3a8.entry.js} +1 -1
  395. package/dist/webcomponents/p-f0434a13.entry.js +1 -0
  396. package/dist/webcomponents/{p-c14dde7c.entry.js → p-f3682c72.entry.js} +1 -1
  397. package/dist/webcomponents/{p-537ea763.entry.js → p-f5358a80.entry.js} +1 -1
  398. package/dist/webcomponents/{p-b945fa49.entry.js → p-f9f0cb1f.entry.js} +1 -1
  399. package/dist/webcomponents/p-fda6f27d.entry.js +1 -0
  400. package/dist/webcomponents/p-fdd087d4.entry.js +1 -0
  401. package/dist/webcomponents/{p-C8g8unYJ.js → p-nbKvRcwU.js} +1 -1
  402. package/dist/webcomponents/{p-WnMmPpEb.js → p-vIQBTQmc.js} +1 -1
  403. package/dist/webcomponents/webcomponents.esm.js +1 -1
  404. package/package.json +15 -15
  405. package/LICENSE +0 -21
  406. package/dist/webcomponents/p-04153e8c.entry.js +0 -1
  407. package/dist/webcomponents/p-0464be7b.entry.js +0 -1
  408. package/dist/webcomponents/p-0c1cc1e9.entry.js +0 -1
  409. package/dist/webcomponents/p-0fe976d6.entry.js +0 -1
  410. package/dist/webcomponents/p-15934f30.entry.js +0 -1
  411. package/dist/webcomponents/p-2128265d.entry.js +0 -1
  412. package/dist/webcomponents/p-21a5c3d8.entry.js +0 -1
  413. package/dist/webcomponents/p-25d24964.entry.js +0 -1
  414. package/dist/webcomponents/p-3086ee7a.entry.js +0 -1
  415. package/dist/webcomponents/p-36d7033b.entry.js +0 -1
  416. package/dist/webcomponents/p-3ef039ec.entry.js +0 -1
  417. package/dist/webcomponents/p-49f279c3.entry.js +0 -1
  418. package/dist/webcomponents/p-4d60d249.entry.js +0 -1
  419. package/dist/webcomponents/p-51714ea9.entry.js +0 -1
  420. package/dist/webcomponents/p-558677a7.entry.js +0 -1
  421. package/dist/webcomponents/p-568b81a2.entry.js +0 -1
  422. package/dist/webcomponents/p-6f34fa90.entry.js +0 -1
  423. package/dist/webcomponents/p-8fO8CrtQ.js +0 -1
  424. package/dist/webcomponents/p-9b758a11.entry.js +0 -1
  425. package/dist/webcomponents/p-9c506058.entry.js +0 -1
  426. package/dist/webcomponents/p-BEOJqK7T.js +0 -1
  427. package/dist/webcomponents/p-C0w_sG9P.js +0 -1
  428. package/dist/webcomponents/p-CMvr3y5s.js +0 -1
  429. package/dist/webcomponents/p-CaLXuYmg.js +0 -1
  430. package/dist/webcomponents/p-CiypNylL.js +0 -1
  431. package/dist/webcomponents/p-D1H6VUbM.js +0 -1
  432. package/dist/webcomponents/p-DNxN6bjU.js +0 -1
  433. package/dist/webcomponents/p-DkoufM1t.js +0 -1
  434. package/dist/webcomponents/p-Dl0CAW76.js +0 -1
  435. package/dist/webcomponents/p-a14d3d7d.entry.js +0 -1
  436. package/dist/webcomponents/p-a47854b9.entry.js +0 -1
  437. package/dist/webcomponents/p-b8d46fc5.entry.js +0 -1
  438. package/dist/webcomponents/p-c0bd4006.entry.js +0 -1
  439. package/dist/webcomponents/p-c4799285.entry.js +0 -1
  440. package/dist/webcomponents/p-cc5a97a0.entry.js +0 -1
  441. package/dist/webcomponents/p-d57ae599.entry.js +0 -1
  442. package/dist/webcomponents/p-de8c6cd4.entry.js +0 -1
  443. package/dist/webcomponents/p-f6941969.entry.js +0 -1
  444. package/dist/webcomponents/p-f8cff289.entry.js +0 -1
@@ -48,10 +48,10 @@ const FormControlNumber = class {
48
48
  return input;
49
49
  }
50
50
  render() {
51
- return (h(Host, { key: 'a47de1fbb4fbd97b47c4dc934d58a628c65f1dbf' }, h("div", { key: 'bbd063c3f0c68bdad5f1849fed8ac318ebb423ef', class: 'form-group d-flex flex-column' }, h("label", { key: '796cb0253dc523ceb21464f3ce528509abffecfa', part: label, class: "form-label", htmlFor: this.name }, this.label), h("input", { key: '8ceaf162d7db2c639b679a431dea7b962593eb09', id: this.name, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
51
+ return (h(Host, { key: 'e21694c1c7611df6ede999aa75fece02977f66f3' }, h("div", { key: '8ea4a38832865e82ffeebcceaabc704d10403966', class: 'form-group d-flex flex-column' }, h("label", { key: '396ab2f79a7168080538ae46da735506b0797311', part: label, class: "form-label", htmlFor: this.name }, this.label), h("input", { key: '715cb6bfbf439fdd4f659e6d21091b047cbca94d', id: this.name, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
52
52
  this.isFocused = false;
53
53
  this.formControlBlur.emit();
54
- }, onInput: this.handleFormControlInput, part: this.part, class: this.errorText ? 'form-control is-invalid' : 'form-control', type: "number", disabled: this.disabled }), h(FormControlHelpText, { key: '6935e075c057a55f0af02051eb97310b187ae807', helpText: this.helpText, name: this.name }), h(FormControlErrorText, { key: '019b48db586768219622e657e121772e4f0203c5', errorText: this.errorText, name: this.name }))));
54
+ }, onInput: this.handleFormControlInput, part: this.part, class: this.errorText ? 'form-control is-invalid' : 'form-control', type: "number", disabled: this.disabled }), h(FormControlHelpText, { key: 'f8695d85c9b447644b5bdf02d4df9e1c1e3e5da7', helpText: this.helpText, name: this.name }), h(FormControlErrorText, { key: 'e736f720d89f5d5aeee6982cb15ea11f63c5dd93', errorText: this.errorText, name: this.name }))));
55
55
  }
56
56
  get el() { return getElement(this); }
57
57
  static get watchers() { return {
@@ -33,10 +33,10 @@ const FormControlRadio = class {
33
33
  return inputRadio;
34
34
  }
35
35
  render() {
36
- return (h(Host, { key: '0c6362e375e04d23c7e31a6be9ea6a43fbfdaac2', class: 'form-group d-flex flex-column' }, h("div", { key: '81b22f74d5b872318e121a2be0cbd8108c3f32ec', class: "form-check" }, h("input", { key: '903e8b0ad9cb30241d175da091de758bf4ac2471', ref: el => (this.radioElement = el), type: "radio", id: `${this.name}-${this.value}`, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
36
+ return (h(Host, { key: 'ffbfee5a2bffb9dc2d6c2489faa9daa60a36604e', class: 'form-group d-flex flex-column' }, h("div", { key: '93e4d129fd0a67d6b6f021b2af4e816683f8b926', class: "form-check" }, h("input", { key: 'e100d93d9750db95262e63aaaf75ff413dbc0928', ref: el => (this.radioElement = el), type: "radio", id: `${this.name}-${this.value}`, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
37
37
  this.isFocused = false;
38
38
  this.formControlBlur.emit();
39
- }, onChange: this.handleFormControlInput, part: this.part, class: this.errorText ? 'form-check-input is-invalid' : 'form-check-input', disabled: this.disabled, value: this.value, checked: this.checked }), h("label", { key: 'df1402687b5965cbbd41ab65dc3de46a2e6e86b8', class: "form-check-label", htmlFor: `${this.name}-${this.value}`, part: label }, this.label)), h("form-control-help-text", { key: 'cf5498002674765b9cc5a0a09be1851be4221e9f', helpText: this.helpText, name: this.name }), h("form-control-error-text", { key: 'c5b50668f0451d1d5cbf94c1399057758ac93a5e', errorText: this.errorText, name: this.name })));
39
+ }, onChange: this.handleFormControlInput, part: this.part, class: this.errorText ? 'form-check-input is-invalid' : 'form-check-input', disabled: this.disabled, value: this.value, checked: this.checked }), h("label", { key: '14a8bb0f48683405413245f572d3186d8948de41', class: "form-check-label", htmlFor: `${this.name}-${this.value}`, part: label }, this.label)), h("form-control-help-text", { key: 'ca497838c5f52e0c9a528c9503b2e17785239d23', helpText: this.helpText, name: this.name }), h("form-control-error-text", { key: '6f1f5d3ac8e1fe55d9c676f5e5f96633de777d01', errorText: this.errorText, name: this.name })));
40
40
  }
41
41
  };
42
42
 
@@ -40,10 +40,10 @@ const FormControlSelect = class {
40
40
  }
41
41
  render() {
42
42
  var _a;
43
- return (h(Host, { key: '181f9882efa122d1158475b03c5d91b6a596a029' }, h("div", { key: 'ab62345c08da6d3d33fa110937c936758e065eb3', class: "form-group d-flex flex-column" }, h("div", { key: 'a4cd1468d4c57b63ee25f25cca6f42ea08b70ef4', class: "d-flex align-items-start gap-2" }, h("label", { key: 'ebb6e16b2e11a3623c3152eb8e1b51412fa4d1ae', part: label, class: "form-label", htmlFor: this.name }, this.label), h("form-control-tooltip", { key: '5d5d414a90927659661b6a2e167056c938e9c5a7', helpText: this.helpText })), h("select", { key: '8105c889f7fdb9376848c6057ccd58b9c62841a4', ref: el => (this.selectElement = el), id: this.name, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
43
+ return (h(Host, { key: '1bf4b5a98883ea56ee00cc10c8e665c5816322f9' }, h("div", { key: '9c36f16f9fad894ffe4ae9e665fae50839fbac58', class: "form-group d-flex flex-column" }, h("div", { key: 'f81841ffb7bf19c6460a087cec95617aa3a983a2', class: "d-flex align-items-start gap-2" }, h("label", { key: 'd17ae46135877411c2aa15b5a2390c31ca791955', part: label, class: "form-label", htmlFor: this.name }, this.label), h("form-control-tooltip", { key: '2e0c07c7f0421547271c18fa1919e97b1735a6ba', helpText: this.helpText })), h("select", { key: '5c68fb7f1ae8c55b3c52730286f2b33391b619cc', ref: el => (this.selectElement = el), id: this.name, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
44
44
  this.isFocused = false;
45
45
  this.formControlBlur.emit();
46
- }, onInput: this.handleFormControlInput, part: this.part, class: this.errorText ? 'form-select is-invalid' : 'form-select', disabled: this.disabled }, (_a = this.options) === null || _a === void 0 ? void 0 : _a.map(option => (h("option", { value: option.value }, option.label)))), h(FormControlErrorText, { key: '061a26387560f0b8085e83e1c373a43340146469', errorText: this.errorText, name: this.name }))));
46
+ }, onInput: this.handleFormControlInput, part: this.part, class: this.errorText ? 'form-select is-invalid' : 'form-select', disabled: this.disabled }, (_a = this.options) === null || _a === void 0 ? void 0 : _a.map(option => (h("option", { value: option.value }, option.label)))), h(FormControlErrorText, { key: '43c4397970628eabb1554d9352808566aa219a7a', errorText: this.errorText, name: this.name }))));
47
47
  }
48
48
  static get watchers() { return {
49
49
  "defaultValue": ["handleDefaultValueChange"]
@@ -88,10 +88,10 @@ const FormControlText = class {
88
88
  return input;
89
89
  }
90
90
  render() {
91
- return (h(Host, { key: '5732a2a92dd945b8520e277bf10e22ea296b0949' }, h("div", { key: '9f58456015584c0cd945686e8bc7d629f46a39a2', class: "form-group d-flex flex-column" }, h("div", { key: '1dccca5e3f97a41e895e7572f24f0e21d2b912c1', class: "d-flex align-items-start gap-2" }, h("label", { key: '54d52a444a22f460579911ecf869633b041bcab9', part: label, class: "form-label", htmlFor: this.name }, this.label), h("form-control-tooltip", { key: '65f9c29cb659be24d88697c72dac422c70431209', helpText: this.helpText })), h("input", { key: 'ba4b46b0e3e66112ed90e64425de6fd9c97559d2', id: this.name, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
91
+ return (h(Host, { key: '0a275b26c5e6604a478bd4618f8955264205b4f8' }, h("div", { key: 'c495cf0113cfd1ddd6a4d586dfb96d67ec7e92f1', class: "form-group d-flex flex-column" }, h("div", { key: '6a97e6086faaf4b43c41da9615568f359760343c', class: "d-flex align-items-start gap-2" }, h("label", { key: '39c1d7b7d281874a81125374e7a351783de14207', part: label, class: "form-label", htmlFor: this.name }, this.label), h("form-control-tooltip", { key: '646caf4cd154574488610f47a593a8fbfff0778f', helpText: this.helpText })), h("input", { key: '540637afeb21d3da93c304710568a0ed8ad99dc4', id: this.name, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
92
92
  this.isFocused = false;
93
93
  this.formControlBlur.emit();
94
- }, onInput: this.handleFormControlInput, onKeyDown: this.keyDownHandler, onPaste: this.keyDownHandler, maxLength: this.maxLength, part: this.part, class: this.errorText ? "form-control is-invalid" : "form-control", type: "text", disabled: this.disabled }), h(FormControlErrorText, { key: 'f7bf2c8f5f1c30cfdc4e6c2927434a50f7f58add', errorText: this.errorText, name: this.name }))));
94
+ }, onInput: this.handleFormControlInput, onKeyDown: this.keyDownHandler, onPaste: this.keyDownHandler, maxLength: this.maxLength, part: this.part, class: this.errorText ? "form-control is-invalid" : "form-control", type: "text", disabled: this.disabled }), h(FormControlErrorText, { key: '1a8246dbf9908c7e56ae2cc0cbea65934c3a33ce', errorText: this.errorText, name: this.name }))));
95
95
  }
96
96
  get el() { return getElement(this); }
97
97
  static get watchers() { return {
@@ -1,6 +1,6 @@
1
1
  import { B as Business } from './Business-DaDqgDrb.js';
2
- import { C as ComponentErrorSeverity } from './Plaid-DJ-4YL0_.js';
3
- import { g as getErrorCode, a as getErrorMessage } from './utils-D6LKoG0M.js';
2
+ import { C as ComponentErrorSeverity } from './Plaid-BP3xNxQF.js';
3
+ import { g as getErrorCode, a as getErrorMessage } from './utils-YUOJKtjO.js';
4
4
 
5
5
  const makeGetBusiness = ({ id, authToken, service }) => async ({ onSuccess, onError, final }) => {
6
6
  var _a;
@@ -1,9 +1,9 @@
1
1
  import './config-state-BKOsYBXZ.js';
2
2
  import './dinero-HXpYMWUU.js';
3
- import { e as Payment, C as ComponentErrorSeverity } from './Plaid-DJ-4YL0_.js';
3
+ import { e as Payment, C as ComponentErrorSeverity } from './Plaid-BP3xNxQF.js';
4
4
  import './Pagination-CLHwhyvu.js';
5
5
  import './Business-DaDqgDrb.js';
6
- import { g as getErrorCode, a as getErrorMessage } from './utils-D6LKoG0M.js';
6
+ import { g as getErrorCode, a as getErrorMessage } from './utils-YUOJKtjO.js';
7
7
 
8
8
  const makeGetPaymentDetails = ({ id, authToken, service }) => async ({ onSuccess, onError, final }) => {
9
9
  var _a;
@@ -1,10 +1,10 @@
1
- import { A as Api } from './Api-DScockhO.js';
2
- import { S as SubAccount, C as ComponentErrorSeverity } from './Plaid-DJ-4YL0_.js';
1
+ import { A as Api } from './Api-83B3f28Q.js';
2
+ import { S as SubAccount, C as ComponentErrorSeverity } from './Plaid-BP3xNxQF.js';
3
3
  import './Pagination-CLHwhyvu.js';
4
4
  import './Business-DaDqgDrb.js';
5
5
  import './config-state-BKOsYBXZ.js';
6
6
  import './dinero-HXpYMWUU.js';
7
- import { g as getErrorCode, a as getErrorMessage } from './utils-D6LKoG0M.js';
7
+ import { g as getErrorCode, a as getErrorMessage } from './utils-YUOJKtjO.js';
8
8
 
9
9
  const api = Api();
10
10
  class SubAccountService {
@@ -4,6 +4,8 @@ var PAYMENT_MODE;
4
4
  PAYMENT_MODE["BNPL"] = "bnpl";
5
5
  PAYMENT_MODE["APPLE_PAY"] = "apple_pay";
6
6
  PAYMENT_MODE["GOOGLE_PAY"] = "google_pay";
7
+ PAYMENT_MODE["PAYPAL"] = "paypal";
8
+ PAYMENT_MODE["VENMO"] = "venmo";
7
9
  })(PAYMENT_MODE || (PAYMENT_MODE = {}));
8
10
  // Maps the backend payment method types to the frontend payment method types
9
11
  var PAYMENT_METHOD_TYPES;
@@ -26,6 +28,8 @@ var PAYMENT_METHODS;
26
28
  PAYMENT_METHODS["GOOGLE_PAY"] = "google_pay";
27
29
  PAYMENT_METHODS["SEZZLE"] = "sezzle";
28
30
  PAYMENT_METHODS["PLAID"] = "plaid";
31
+ PAYMENT_METHODS["PAYPAL"] = "paypal";
32
+ PAYMENT_METHODS["VENMO"] = "venmo";
29
33
  })(PAYMENT_METHODS || (PAYMENT_METHODS = {}));
30
34
  const mapPaymentMethodType = (type) => {
31
35
  switch (type) {
package/dist/esm/index.js CHANGED
@@ -1 +1 @@
1
- export { P as PAYMENT_METHODS } from './index-DkoufM1t.js';
1
+ export { P as PAYMENT_METHODS } from './index-DEx8fQeW.js';
@@ -9,7 +9,7 @@ const InternalButton = class {
9
9
  this.type = 'button';
10
10
  }
11
11
  render() {
12
- return (h(Button, { key: 'a20d0f251ab26062356b54965b3981af7953c71f', variant: this.variant, isLoading: this.isLoading, clickHandler: this.clickHandler, class: this.class, type: this.type, disabled: this.disabled, style: this.customStyle, hidden: this.hidden }, this.text));
12
+ return (h(Button, { key: '4048996761c978279f2aefbb43bbbb249fe445d9', variant: this.variant, isLoading: this.isLoading, clickHandler: this.clickHandler, class: this.class, type: this.type, disabled: this.disabled, style: this.customStyle, hidden: this.hidden }, this.text));
13
13
  }
14
14
  };
15
15
 
@@ -1,29 +1,29 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-CV0Pyo1O.js';
2
- import { A as Api } from './Api-DScockhO.js';
3
- import { A as ApplePayConfig, r as ApplePayHelpers, s as ApplePayPaymentRequest, t as ApplePaySessionStatus, u as ApplePayButtonStyle, v as ApplePayButtonType, w as ApplePayMerchantCapability, C as ComponentErrorSeverity, b as ComponentErrorCodes, c as ComponentErrorMessages, I as ICheckoutStatus, x as PLAID_ERROR_SEVERITY, y as PLAID_ERROR_MESSAGES, z as PlaidErrorCodes } from './Plaid-DJ-4YL0_.js';
2
+ import { A as Api } from './Api-83B3f28Q.js';
3
+ import { A as ApplePayConfig, r as ApplePayHelpers, s as ApplePayPaymentRequest, t as ApplePaySessionStatus, u as ApplePayButtonStyle, v as ApplePayButtonType, w as ApplePayMerchantCapability, C as ComponentErrorSeverity, b as ComponentErrorCodes, c as ComponentErrorMessages, I as ICheckoutStatus, x as PLAID_ERROR_SEVERITY, y as PLAID_ERROR_MESSAGES, z as PlaidErrorCodes } from './Plaid-BP3xNxQF.js';
4
4
  import { S as StyledHost } from './styled-host-RvPhw8Gu.js';
5
5
  import './event-types-CZfYo5-1.js';
6
6
  import { S as Skeleton } from './skeleton-dbktEkFS.js';
7
- import { c as checkoutStore, o as onChange, a as onAnyChange, g as getAvailablePaymentMethodTypes, b as getCheckoutState } from './checkout.store-B6amfNq_.js';
7
+ import { c as checkoutStore, o as onChange, a as onAnyChange, g as getAvailablePaymentMethodTypes, b as getCheckoutState } from './checkout.store-B2mtQcB5.js';
8
8
  import { t as text, r as radioListItem } from './parts-Bu7gdOaV.js';
9
9
  import { f as formatCurrency } from './utils-D8J8OvxY.js';
10
10
  import { w as waitForConfig, c as configState } from './config-state-BKOsYBXZ.js';
11
11
  import { H as Header1 } from './header-1-BI0o3rMW.js';
12
12
  import { H as Header2, b as insuranceValuesOn, h as hasInsuranceValueChanged, i as insuranceValues } from './insurance-state-DM0VaTpH.js';
13
13
  import { H as Header3 } from './header-3-DNqRk_HO.js';
14
- import { J as JustifiAnalytics } from './Analytics-Dgz_MQ1D.js';
15
- import { c as checkPkgVersion } from './check-pkg-version-CPMg0K2m.js';
14
+ import { J as JustifiAnalytics } from './Analytics-3WmRTICF.js';
15
+ import { c as checkPkgVersion } from './check-pkg-version-CmFl6VLH.js';
16
16
  import './dinero-HXpYMWUU.js';
17
17
  import './Pagination-CLHwhyvu.js';
18
18
  import './Business-DaDqgDrb.js';
19
- import { m as makeGetCheckout, a as makeCheckoutComplete } from './checkout-actions-DhL8YxrK.js';
20
- import { C as CheckoutService } from './checkout.service-CU4BnB34.js';
21
- import { P as PlaidService } from './plaid.service-DwWljJOH.js';
22
- import { P as PAYMENT_METHODS, a as PaymentMethod, b as PAYMENT_MODE } from './index-DkoufM1t.js';
19
+ import { m as makeGetCheckout, a as makeCheckoutComplete } from './checkout-actions-0ftD0elo.js';
20
+ import { C as CheckoutService } from './checkout.service-wjFjBxIB.js';
21
+ import { P as PlaidService } from './plaid.service-DufQkxDk.js';
22
+ import { P as PAYMENT_METHODS, a as PaymentMethod, b as PAYMENT_MODE } from './index-DEx8fQeW.js';
23
23
  import { C as CardBrandLabels } from './payment-method-option-utils-lUHAQVFl.js';
24
- import './package-CiypNylL.js';
24
+ import './package-CAVi_ne1.js';
25
25
  import './index-3wWWWrhn.js';
26
- import './utils-D6LKoG0M.js';
26
+ import './utils-YUOJKtjO.js';
27
27
 
28
28
  const JustifiRadioListItem = class {
29
29
  constructor(hostRef) {
@@ -743,7 +743,7 @@ const JustifiButton = class {
743
743
  this.type = 'button';
744
744
  }
745
745
  render() {
746
- return (h(StyledHost, { key: '241fe8903788f0442b42bf5a6835d152d1944967' }, h("internal-button", { key: '7c13bd1fa53cf9faae26e521af5a40a08659fe92', text: this.text, variant: this.variant, isLoading: this.isLoading, clickHandler: this.clickHandler, type: this.type, disabled: this.disabled, class: this.class, customStyle: this.customStyle, hidden: this.hidden })));
746
+ return (h(StyledHost, { key: '1e09a302d064e2e4a860dc4efd9eb9693d4d0055' }, h("internal-button", { key: '9ce7819853789c44860de43f26632c62415ebdb5', text: this.text, variant: this.variant, isLoading: this.isLoading, clickHandler: this.clickHandler, type: this.type, disabled: this.disabled, class: this.class, customStyle: this.customStyle, hidden: this.hidden })));
747
747
  }
748
748
  };
749
749
 
@@ -752,7 +752,7 @@ const JustifiCheckoutSummary = class {
752
752
  registerInstance(this, hostRef);
753
753
  }
754
754
  render() {
755
- return (h(StyledHost, { key: '336fa6563952ee7905c2ed4a3330d73bbb33a0eb' }, h("section", { key: '48b8798a925d618f5a2c52d743190207b78eb70a' }, h("div", { key: '81d91167c10ccc49acb039ea54a9f97f4aa6e305' }, h("div", { key: '9744242f2c2c3082e9c1a3af6e716ec4cb28f1fd', part: text }, checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.paymentDescription), h("div", { key: '438062935abd2f00495c432ef6652e3808e5215f' }, h("span", { key: 'e3f24d9c52ddae0206cbefe61bd08f24697fe28e', part: text }, "Total"), "\u00A0", h("span", { key: '9835cb60de31a2c8946b7ac2dd6d1fa82f223110', part: text }, formatCurrency(+(checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.totalAmount))))))));
755
+ return (h(StyledHost, { key: '7d3447ff4daa9bf4f603ca381027b3f43cfcc6a1' }, h("section", { key: '1c8189ccde6dc986ad2d4c74da2dd10cacfc1c36' }, h("div", { key: '45e6d5f47d8a92e0bd4a7bfa427630a96f049b4a' }, h("div", { key: '9900b5fd770cd59b00803c3614216c16a803da41', part: text }, checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.paymentDescription), h("div", { key: '16cec140ef6912533a80b1f6341fcc9cb341b478' }, h("span", { key: 'f8883538c99a524017bb102bfd8cfaea7062e650', part: text }, "Total"), "\u00A0", h("span", { key: '11baa64630a60c56cedfa53548c107ec3fe3c0f5', part: text }, formatCurrency(+(checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.totalAmount))))))));
756
756
  }
757
757
  };
758
758
 
@@ -911,7 +911,7 @@ const JustifiHeader = class {
911
911
  }
912
912
  render() {
913
913
  const HeaderComponent = this.levels[this.level];
914
- return (h(StyledHost, { key: '5a0872ee486bdba3ba1c86145946889bb7d151f2' }, h(HeaderComponent, { key: '89807e249cdf64f7ef80800276cb50966083f28e', text: this.text, class: this.class })));
914
+ return (h(StyledHost, { key: '1843adabddf7d439036f8ce6f55627b7ca3e4a9f' }, h(HeaderComponent, { key: 'b16e5624ce7e092cc8c144a7cdfd9cb6afdf7a83', text: this.text, class: this.class })));
915
915
  }
916
916
  };
917
917
 
@@ -922,6 +922,43 @@ const JustifiModularCheckout = class {
922
922
  this.submitEvent = createEvent(this, "submit-event", 7);
923
923
  this.checkoutChangedEvent = createEvent(this, "checkout-changed", 7);
924
924
  this.plaidService = new PlaidService();
925
+ this.handlePaypalStarted = () => {
926
+ checkoutStore.isWalletProcessing = true;
927
+ };
928
+ this.handlePaypalCompleted = (event) => {
929
+ const { success, paymentMethodId, fundingSource } = event.detail || {};
930
+ checkoutStore.isWalletProcessing = false;
931
+ if (success && paymentMethodId) {
932
+ checkoutStore.paymentToken = paymentMethodId;
933
+ checkoutStore.selectedPaymentMethod = {
934
+ type: fundingSource === "venmo"
935
+ ? PAYMENT_METHODS.VENMO
936
+ : PAYMENT_METHODS.PAYPAL,
937
+ };
938
+ this.submitCheckout();
939
+ }
940
+ else {
941
+ this.errorEvent.emit({
942
+ message: "Paypal payment failed",
943
+ errorCode: ComponentErrorCodes.TOKENIZE_ERROR,
944
+ severity: ComponentErrorSeverity.ERROR,
945
+ });
946
+ }
947
+ };
948
+ this.handlePaypalCancelled = () => {
949
+ checkoutStore.isWalletProcessing = false;
950
+ checkoutStore.paymentToken = undefined;
951
+ checkoutStore.selectedPaymentMethod = undefined;
952
+ };
953
+ this.handlePaypalError = (event) => {
954
+ checkoutStore.isWalletProcessing = false;
955
+ const { error, code } = event.detail || {};
956
+ this.errorEvent.emit({
957
+ message: error || "Paypal error occurred",
958
+ errorCode: `PAYPAL_${code}`,
959
+ severity: ComponentErrorSeverity.ERROR,
960
+ });
961
+ };
925
962
  this.handleApplePayStarted = () => {
926
963
  checkoutStore.isWalletProcessing = true;
927
964
  };
@@ -991,6 +1028,7 @@ const JustifiModularCheckout = class {
991
1028
  this.queryFormRefs();
992
1029
  this.setupApplePayListeners(); // set up again listeners when DOM changes
993
1030
  this.setupGooglePayListeners();
1031
+ this.setupPaypalListeners();
994
1032
  });
995
1033
  this.observer.observe(this.hostEl, {
996
1034
  childList: true,
@@ -1026,6 +1064,7 @@ const JustifiModularCheckout = class {
1026
1064
  this.queryFormRefs();
1027
1065
  this.setupApplePayListeners();
1028
1066
  this.setupGooglePayListeners();
1067
+ this.setupPaypalListeners();
1029
1068
  }
1030
1069
  disconnectedCallback() {
1031
1070
  var _a, _b;
@@ -1034,6 +1073,7 @@ const JustifiModularCheckout = class {
1034
1073
  (_b = this.observer) === null || _b === void 0 ? void 0 : _b.disconnect();
1035
1074
  this.removeApplePayListeners();
1036
1075
  this.removeGooglePayListeners();
1076
+ this.removePaypalListeners();
1037
1077
  }
1038
1078
  fetchCheckout() {
1039
1079
  if (!this.authToken || !this.checkoutId) {
@@ -1076,9 +1116,8 @@ const JustifiModularCheckout = class {
1076
1116
  }
1077
1117
  }
1078
1118
  updateStore(checkout) {
1079
- var _a, _b, _c, _d, _e, _f, _g, _h;
1119
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
1080
1120
  checkoutStore.accountId = checkout.account_id;
1081
- checkoutStore.checkoutLoaded = true;
1082
1121
  const rawMode = checkout.mode != null ? String(checkout.mode).toLowerCase() : '';
1083
1122
  checkoutStore.checkoutMode =
1084
1123
  rawMode === 'test' ? 'test' : rawMode === 'live' ? 'live' : null;
@@ -1090,16 +1129,20 @@ const JustifiModularCheckout = class {
1090
1129
  checkoutStore.totalAmount = checkout.total_amount;
1091
1130
  checkoutStore.paymentAmount = checkout.payment_amount;
1092
1131
  checkoutStore.bnplEnabled = checkout.payment_settings.bnpl_payments;
1093
- checkoutStore.insuranceEnabled = checkout.payment_settings.insurance_payments;
1094
- checkoutStore.bankAccountVerification = (_b = checkout.payment_settings) === null || _b === void 0 ? void 0 : _b.bank_account_verification;
1095
- checkoutStore.applePayEnabled = (_c = checkout.payment_settings) === null || _c === void 0 ? void 0 : _c.apple_payments;
1096
- checkoutStore.googlePayEnabled = (_d = checkout.payment_settings) === null || _d === void 0 ? void 0 : _d.google_payments;
1132
+ checkoutStore.insuranceEnabled = (_b = checkout.payment_settings.insurance_payments) !== null && _b !== void 0 ? _b : false;
1133
+ checkoutStore.bankAccountVerification = (_c = checkout.payment_settings) === null || _c === void 0 ? void 0 : _c.bank_account_verification;
1134
+ checkoutStore.applePayEnabled = (_e = (_d = checkout.payment_settings) === null || _d === void 0 ? void 0 : _d.apple_payments) !== null && _e !== void 0 ? _e : false;
1135
+ checkoutStore.googlePayEnabled = (_g = (_f = checkout.payment_settings) === null || _f === void 0 ? void 0 : _f.google_payments) !== null && _g !== void 0 ? _g : false;
1136
+ checkoutStore.paypalEnabled = (_j = (_h = checkout.payment_settings) === null || _h === void 0 ? void 0 : _h.paypal_payments) !== null && _j !== void 0 ? _j : false;
1137
+ checkoutStore.paypalProviderClientId = (_l = (_k = checkout.paypal) === null || _k === void 0 ? void 0 : _k.provider_client_id) !== null && _l !== void 0 ? _l : '';
1097
1138
  checkoutStore.achPaymentsEnabled = achEnabled;
1098
- checkoutStore.bnplProviderClientId = (_e = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _e === void 0 ? void 0 : _e.provider_client_id;
1099
- checkoutStore.bnplProviderMode = (_f = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _f === void 0 ? void 0 : _f.provider_mode;
1100
- checkoutStore.bnplProviderApiVersion = (_g = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _g === void 0 ? void 0 : _g.provider_api_version;
1139
+ checkoutStore.bnplProviderClientId = (_m = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _m === void 0 ? void 0 : _m.provider_client_id;
1140
+ checkoutStore.bnplProviderMode = (_o = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _o === void 0 ? void 0 : _o.provider_mode;
1141
+ checkoutStore.bnplProviderApiVersion = (_p = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _p === void 0 ? void 0 : _p.provider_api_version;
1101
1142
  checkoutStore.bnplProviderCheckoutUrl =
1102
- (_h = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _h === void 0 ? void 0 : _h.provider_checkout_url;
1143
+ (_q = checkout === null || checkout === void 0 ? void 0 : checkout.bnpl) === null || _q === void 0 ? void 0 : _q.provider_checkout_url;
1144
+ checkoutStore.paymentCurrency = (checkout.payment_currency || checkoutStore.paymentCurrency).toUpperCase();
1145
+ checkoutStore.checkoutLoaded = true;
1103
1146
  }
1104
1147
  emitCheckoutChanged() {
1105
1148
  const detail = {
@@ -1113,6 +1156,7 @@ const JustifiModularCheckout = class {
1113
1156
  this.billingFormRef = this.hostEl.querySelector("justifi-billing-form, justifi-bank-account-billing-form-simple, justifi-card-billing-form-simple, justifi-billing-form-full, justifi-tokenize-payment-method");
1114
1157
  this.applePayRef = this.hostEl.querySelector("justifi-apple-pay");
1115
1158
  this.googlePayRef = this.hostEl.querySelector("justifi-google-pay");
1159
+ this.paypalRef = this.hostEl.querySelector("justifi-paypal");
1116
1160
  this.paymentMethodFormRef =
1117
1161
  this.hostEl.querySelector('justifi-card-form, justifi-bank-account-form, justifi-tokenize-payment-method');
1118
1162
  if (!checkoutStore.selectedPaymentMethod && this.paymentMethodFormRef) {
@@ -1157,6 +1201,22 @@ const JustifiModularCheckout = class {
1157
1201
  this.googlePayRef.removeEventListener("googlePayCancelled", this.handleGooglePayCancelled);
1158
1202
  }
1159
1203
  }
1204
+ setupPaypalListeners() {
1205
+ if (this.paypalRef) {
1206
+ this.paypalRef.addEventListener("paypalStarted", this.handlePaypalStarted);
1207
+ this.paypalRef.addEventListener("paypalCompleted", this.handlePaypalCompleted);
1208
+ this.paypalRef.addEventListener("paypalCancelled", this.handlePaypalCancelled);
1209
+ this.paypalRef.addEventListener("paypalError", this.handlePaypalError);
1210
+ }
1211
+ }
1212
+ removePaypalListeners() {
1213
+ if (this.paypalRef) {
1214
+ this.paypalRef.removeEventListener("paypalStarted", this.handlePaypalStarted);
1215
+ this.paypalRef.removeEventListener("paypalCompleted", this.handlePaypalCompleted);
1216
+ this.paypalRef.removeEventListener("paypalCancelled", this.handlePaypalCancelled);
1217
+ this.paypalRef.removeEventListener("paypalError", this.handlePaypalError);
1218
+ }
1219
+ }
1160
1220
  async tokenizePaymentMethod(tokenizeArgs) {
1161
1221
  var _a, _b, _c;
1162
1222
  const billingInfoValues = (_b = (await ((_a = this.billingFormRef) === null || _a === void 0 ? void 0 : _a.getValues()))) !== null && _b !== void 0 ? _b : {};
@@ -1340,6 +1400,10 @@ const JustifiModularCheckout = class {
1340
1400
  return PAYMENT_MODE.APPLE_PAY;
1341
1401
  case PAYMENT_METHODS.GOOGLE_PAY:
1342
1402
  return PAYMENT_MODE.GOOGLE_PAY;
1403
+ case PAYMENT_METHODS.PAYPAL:
1404
+ return PAYMENT_MODE.PAYPAL;
1405
+ case PAYMENT_METHODS.VENMO:
1406
+ return PAYMENT_MODE.VENMO;
1343
1407
  default:
1344
1408
  return undefined;
1345
1409
  }
@@ -1381,11 +1445,234 @@ const JustifiModularCheckout = class {
1381
1445
  });
1382
1446
  }
1383
1447
  render() {
1384
- return h(Host, { key: 'c9b021ee33cdac2c88ec16df613ccaf3f4e981ef' });
1448
+ return h(Host, { key: '127bf2aea6758c7d91e33f252a3db4bc27b066ff' });
1385
1449
  }
1386
1450
  get hostEl() { return getElement(this); }
1387
1451
  };
1388
1452
 
1453
+ const api = Api();
1454
+ class PaypalService {
1455
+ async createPaypalOrder(authToken, checkoutId, fundingSource, signal) {
1456
+ const endpoint = `checkouts/${checkoutId}/paypal/orders`;
1457
+ const body = { funding_source: fundingSource };
1458
+ return api.post({ endpoint, body, authToken, signal });
1459
+ }
1460
+ }
1461
+
1462
+ const PAYPAL_SANDBOX_SCRIPT_URL = 'https://www.sandbox.paypal.com/web-sdk/v6/core';
1463
+ const PAYPAL_PRODUCTION_SCRIPT_URL = 'https://www.paypal.com/web-sdk/v6/core';
1464
+ const PAYPAL_SCRIPT_DATA_TEST_ID = 'paypal-script';
1465
+ const PAYPAL_COMPONENTS = ['paypal-payments', 'venmo-payments'];
1466
+ const PAYPAL_PAGE_TYPE = 'checkout';
1467
+ const PAYPAL_DEFAULT_CURRENCY = 'USD';
1468
+ const PAYPAL_PRESENTATION_MODE = 'auto';
1469
+ /** Venmo only settles in USD, and the checkout payload carries no country. */
1470
+ const VENMO_SUPPORTED_CURRENCY = 'USD';
1471
+ /** `test` checkouts talk to PayPal's sandbox; everything else goes to production. */
1472
+ const paypalScriptUrl = (mode) => mode === 'test' ? PAYPAL_SANDBOX_SCRIPT_URL : PAYPAL_PRODUCTION_SCRIPT_URL;
1473
+ const PaypalErrorCode = {
1474
+ CONFIG_ERROR: 'CONFIG_ERROR',
1475
+ INITIALIZATION_ERROR: 'INITIALIZATION_ERROR',
1476
+ ORDER_ERROR: 'ORDER_ERROR',
1477
+ PAYMENT_FAILED: 'PAYMENT_FAILED',
1478
+ };
1479
+
1480
+ const SHOWN_CLASS = 'shown';
1481
+ const setShown = (el, shown) => {
1482
+ if (!el)
1483
+ return;
1484
+ if (shown)
1485
+ el.classList.add(SHOWN_CLASS);
1486
+ else
1487
+ el.classList.remove(SHOWN_CLASS);
1488
+ };
1489
+ const JustifiPaypal = class {
1490
+ constructor(hostRef) {
1491
+ registerInstance(this, hostRef);
1492
+ this.paypalStarted = createEvent(this, "paypalStarted", 7);
1493
+ this.paypalCompleted = createEvent(this, "paypalCompleted", 7);
1494
+ this.paypalCancelled = createEvent(this, "paypalCancelled", 7);
1495
+ this.paypalError = createEvent(this, "paypalError", 7);
1496
+ this.paypalService = new PaypalService();
1497
+ this.paypalEligible = false;
1498
+ this.venmoEligible = false;
1499
+ this.startSession = async (session, fundingSource) => {
1500
+ if (!session)
1501
+ return;
1502
+ this.pendingOrderId = undefined;
1503
+ this.paypalStarted.emit({ fundingSource });
1504
+ let orderFailed = false;
1505
+ const order = this.createOrder(fundingSource)
1506
+ .then((created) => ({ orderId: created.provider_order_id }))
1507
+ .catch((error) => {
1508
+ orderFailed = true;
1509
+ this.emitError((error === null || error === void 0 ? void 0 : error.message) || 'Could not create the Paypal order', PaypalErrorCode.ORDER_ERROR);
1510
+ throw error;
1511
+ });
1512
+ // The SDK is what normally consumes this rejection; swallow a copy so a
1513
+ // failed order can never surface as an unhandled rejection.
1514
+ order.catch(() => undefined);
1515
+ try {
1516
+ await session.start({ presentationMode: PAYPAL_PRESENTATION_MODE }, order);
1517
+ }
1518
+ catch (error) {
1519
+ if (orderFailed)
1520
+ return;
1521
+ this.emitError((error === null || error === void 0 ? void 0 : error.message) || 'Paypal payment failed', PaypalErrorCode.PAYMENT_FAILED);
1522
+ }
1523
+ };
1524
+ }
1525
+ componentDidLoad() {
1526
+ if (checkoutStore.checkoutLoaded) {
1527
+ this.initializePaypal();
1528
+ }
1529
+ else {
1530
+ onChange('checkoutLoaded', (loaded) => {
1531
+ if (loaded)
1532
+ this.initializePaypal();
1533
+ });
1534
+ }
1535
+ }
1536
+ componentDidRender() {
1537
+ this.applyVisibility();
1538
+ }
1539
+ get currencyCode() {
1540
+ return (checkoutStore.paymentCurrency || PAYPAL_DEFAULT_CURRENCY).toUpperCase();
1541
+ }
1542
+ get showPaypal() {
1543
+ return !!checkoutStore.paypalEnabled && this.paypalEligible;
1544
+ }
1545
+ get showVenmo() {
1546
+ return (!!checkoutStore.paypalEnabled &&
1547
+ this.venmoEligible &&
1548
+ this.currencyCode === VENMO_SUPPORTED_CURRENCY);
1549
+ }
1550
+ applyVisibility() {
1551
+ const { showPaypal, showVenmo } = this;
1552
+ setShown(this.buttonsEl, showPaypal || showVenmo);
1553
+ setShown(this.paypalButtonEl, showPaypal);
1554
+ setShown(this.venmoButtonEl, showVenmo);
1555
+ }
1556
+ emitError(error, code) {
1557
+ this.paypalError.emit({ error, code });
1558
+ }
1559
+ // The script tag is the dedup token, so a second instance (or a remount)
1560
+ // reuses the in-flight load instead of appending another SDK.
1561
+ loadPaypalScript() {
1562
+ const loaded = window.paypal;
1563
+ if (loaded)
1564
+ return Promise.resolve(loaded);
1565
+ return new Promise((resolve, reject) => {
1566
+ const selector = `script[data-test-id="${PAYPAL_SCRIPT_DATA_TEST_ID}"]`;
1567
+ let script = document.head.querySelector(selector);
1568
+ if (!script) {
1569
+ script = document.createElement('script');
1570
+ script.src = paypalScriptUrl(checkoutStore.checkoutMode);
1571
+ script.async = true;
1572
+ script.setAttribute('data-test-id', PAYPAL_SCRIPT_DATA_TEST_ID);
1573
+ document.head.appendChild(script);
1574
+ }
1575
+ script.addEventListener('load', () => {
1576
+ const paypal = window.paypal;
1577
+ if (paypal) {
1578
+ resolve(paypal);
1579
+ }
1580
+ else {
1581
+ reject(new Error('Paypal script loaded but window.paypal is undefined'));
1582
+ }
1583
+ });
1584
+ script.addEventListener('error', () => reject(new Error('Error loading Paypal script')));
1585
+ });
1586
+ }
1587
+ metadataId() {
1588
+ return (Math.random().toString(36).substring(2, 15) +
1589
+ Math.random().toString(36).substring(2, 15));
1590
+ }
1591
+ async initializePaypal() {
1592
+ const clientId = checkoutStore.paypalProviderClientId;
1593
+ if (!clientId) {
1594
+ this.paypalEligible = false;
1595
+ this.venmoEligible = false;
1596
+ this.applyVisibility();
1597
+ this.emitError('Missing Paypal client id', PaypalErrorCode.CONFIG_ERROR);
1598
+ return;
1599
+ }
1600
+ try {
1601
+ const paypal = await this.loadPaypalScript();
1602
+ this.sdkInstance = await paypal.createInstance({
1603
+ clientId,
1604
+ components: PAYPAL_COMPONENTS,
1605
+ pageType: PAYPAL_PAGE_TYPE,
1606
+ metadataId: this.metadataId(),
1607
+ });
1608
+ const eligibleMethods = await this.sdkInstance.findEligibleMethods({
1609
+ currencyCode: this.currencyCode,
1610
+ });
1611
+ this.paypalEligible = eligibleMethods.isEligible('paypal');
1612
+ this.venmoEligible = eligibleMethods.isEligible('venmo');
1613
+ if (this.paypalEligible) {
1614
+ this.paypalSession = this.sdkInstance.createPayPalOneTimePaymentSession(this.sessionOptions('paypal'));
1615
+ }
1616
+ if (this.venmoEligible) {
1617
+ this.venmoSession = this.sdkInstance.createVenmoOneTimePaymentSession(this.sessionOptions('venmo'));
1618
+ }
1619
+ this.applyVisibility();
1620
+ }
1621
+ catch (error) {
1622
+ this.paypalEligible = false;
1623
+ this.venmoEligible = false;
1624
+ this.applyVisibility();
1625
+ this.emitError((error === null || error === void 0 ? void 0 : error.message) || 'Error initializing Paypal', PaypalErrorCode.INITIALIZATION_ERROR);
1626
+ }
1627
+ }
1628
+ sessionOptions(fundingSource) {
1629
+ return {
1630
+ onApprove: () => this.paypalCompleted.emit({
1631
+ success: true,
1632
+ paymentMethodId: this.pendingOrderId,
1633
+ fundingSource,
1634
+ }),
1635
+ onCancel: () => this.paypalCancelled.emit({ fundingSource }),
1636
+ onError: (error) => this.emitError((error === null || error === void 0 ? void 0 : error.message) || 'Paypal payment failed', PaypalErrorCode.PAYMENT_FAILED),
1637
+ };
1638
+ }
1639
+ async createOrder(fundingSource) {
1640
+ const response = await this.paypalService.createPaypalOrder(checkoutStore.authToken, checkoutStore.checkoutId, fundingSource);
1641
+ if (response === null || response === void 0 ? void 0 : response.error) {
1642
+ const message = typeof response.error === 'string'
1643
+ ? response.error
1644
+ : response.error.message;
1645
+ throw new Error(message || 'Could not create the Paypal order');
1646
+ }
1647
+ const order = response === null || response === void 0 ? void 0 : response.data;
1648
+ if (!(order === null || order === void 0 ? void 0 : order.provider_order_id)) {
1649
+ throw new Error('Paypal order is missing a provider order id');
1650
+ }
1651
+ this.pendingOrderId = order.id;
1652
+ return order;
1653
+ }
1654
+ render() {
1655
+ return (h(StyledHost, { key: '05c771ae41d3b21da7046e70c7d0e03efc296a0c' }, h("div", { key: '8e7a14372ce29b4da284efadb43c27d0c059607e', class: "paypal-buttons", ref: (el) => (this.buttonsEl = el) }, h("paypal-button", { key: 'aa7fa82c96ca4d41872f445a01e72a18f6f5920a', type: "pay", ref: (el) => (this.paypalButtonEl = el), onClick: () => this.startSession(this.paypalSession, 'paypal') }), h("venmo-button", { key: '2cb068aa82460068548f133607cebec096028a41', type: "pay", ref: (el) => (this.venmoButtonEl = el), onClick: () => this.startSession(this.venmoSession, 'venmo') })), h("style", { key: '159cc68f682ed79a9a83be7d1b4c88127f8a2623' }, `
1656
+ .paypal-buttons {
1657
+ display: none;
1658
+ gap: 8px;
1659
+ width: 100%;
1660
+ }
1661
+ .paypal-buttons.shown {
1662
+ display: flex;
1663
+ }
1664
+ .paypal-buttons > * {
1665
+ display: none;
1666
+ flex: 1 1 0;
1667
+ min-width: 0;
1668
+ }
1669
+ .paypal-buttons > .shown {
1670
+ display: block;
1671
+ }
1672
+ `)));
1673
+ }
1674
+ };
1675
+
1389
1676
  const plaidIconSvg = 'data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjQ4IiB2aWV3Qm94PSIwIDAgMjggMjkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgY2xhc3M9ImNzcy0xcmRhajhtIj48ZyBmaWxsPSIjMTExIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yNS43NjI5IDI2LjI2MjhMMjggMTcuNTMwOUwyNC45NjkxIDE0LjUwMDFMMjcuOTk5OSAxMS40NjkxTDI1Ljc2MjggMi43MzcwNkwxNy4wMzA5IDAuNUwxNC4wMDAxIDMuNTMxTDEwLjk2OSAwLjUwMDE0TDIuMjM3MDYgMi43MzczNEwwIDExLjQ2OTFMMy4wMzEyOCAxNC40OTk5TDAuMDAwMTQgMTcuNTMxTDIuMjM3MiAyNi4yNjI5TDEwLjk2OTEgMjguNUwxNC4wMDAxIDI1LjQ2OUwxNy4wMzEgMjguNDk5OUwyNS43NjI5IDI2LjI2MjhaTTE1LjczMjEgMjMuNzM3MUwxOC42MTg2IDIwLjg1MDVMMjIuMjkxMiAyNC41MjMzTDE3LjY5NTYgMjUuNzAwN0wxNS43MzIxIDIzLjczNzFaTTExLjExMzYgOS44ODE1NEwxNC4wMDAzIDYuOTk1MDJMMTYuODg2OCA5Ljg4MTRMMTQuMDAwMSAxMi43Njc5TDExLjExMzYgOS44ODE1NFpNMTIuMjY4MiAxNC41TDkuMzgxNTQgMTcuMzg2NUw2LjQ5NTAyIDE0LjVMOS4zODE1NCAxMS42MTM1TDEyLjI2ODIgMTQuNVpNMTguNjE4NyAxMS42MTMzTDIxLjUwNTMgMTQuNUwxOC42MTg2IDE3LjM4NjVMMTUuNzMyMSAxNC41TDE4LjYxODcgMTEuNjEzM1pNMTYuODg2NyAxOS4xMTg2TDE0LjAwMDEgMjIuMDA1MUwxMS4xMTM1IDE5LjExODVMMTQuMDAwMSAxNi4yMzE5TDE2Ljg4NjcgMTkuMTE4NlpNMTAuMzA0NCAyNS43MDA3TDUuNzA4NjQgMjQuNTIzM0w5LjM4MTU0IDIwLjg1MDRMMTIuMjY4MiAyMy43MzcxTDEwLjMwNDQgMjUuNzAwN1pNNC43NjMwOCAxNi4yMzE5TDcuNjQ5NiAxOS4xMTg1TDMuOTc2NyAyMi43OTE0TDIuNzk5MyAxOC4xOTU3TDQuNzYzMDggMTYuMjMxOVpNMy45NzY3IDYuMjA4MzZMNy42NDk3NCA5Ljg4MTRMNC43NjMwOCAxMi43NjgxTDIuNzk5MyAxMC44MDQxTDMuOTc2NyA2LjIwODM2Wk0xMi4yNjgzIDUuMjYyOTRMOS4zODE2OCA4LjE0OTZMNS43MDg5MiA0LjQ3NjdMMTAuMzA0NyAzLjI5OTNMMTIuMjY4MyA1LjI2Mjk0Wk0xNy42OTU5IDMuMjk5M0wyMi4yOTE1IDQuNDc2N0wxOC42MTg2IDguMTQ5NDZMMTUuNzMyMSA1LjI2Mjk0TDE3LjY5NTkgMy4yOTkzWk0yMy4yMzcyIDEyLjc2ODFMMjAuMzUwNSA5Ljg4MTRMMjQuMDIzMyA2LjIwODc4TDI1LjIwMDcgMTAuODA0NkwyMy4yMzcyIDEyLjc2ODFaTTI0LjAyMzMgMjIuNzkxNEwyMC4zNTA1IDE5LjExODZMMjMuMjM3MiAxNi4yMzIxTDI1LjIwMDcgMTguMTk1N0wyNC4wMjMzIDIyLjc5MTRaIj48L3BhdGg+PC9nPjwvc3ZnPgo=';
1390
1677
 
1391
1678
  const JustifiPlaidPaymentMethod = class {
@@ -2318,7 +2605,7 @@ const JustifiTokenizePaymentMethod = class {
2318
2605
  } }));
2319
2606
  }
2320
2607
  render() {
2321
- return (h(StyledHost, { key: 'bc76697688be332ef84db56e61b6b455a6d1e986' }, h("form", { key: '8f64f55f945d4ff4ed0f144c724dbd71278ec771' }, h("fieldset", { key: '15b6d388117738391089cf91f999247cddb29714' }, h("div", { key: 'a4e23f7808b446dff6f7da437dba3cb57d2d62aa', class: "row gy-3" }, h("div", { key: '63b0584d217d9bb50036eb7d5837e7287be58760', class: "col-12" }, this.availablePaymentMethods.map((method) => this.renderPaymentMethodOption(method))), h("div", { key: 'c9345be3429cd8ab01a84e8584270938feceba39', class: "col-12" }, h("internal-button", { key: 'aa56df7b6b1250e9b81fbc281b969d2a37a05428', text: this.submitButtonText, variant: "primary", type: "submit", clickHandler: (e) => this.tokenizePaymentMethod(e), isLoading: this.isLoading, "data-testid": "submit-button", hidden: this.computedHideSubmitButton })))))));
2608
+ return (h(StyledHost, { key: '16a5a47febb09295c95f141ddc96a849e530c477' }, h("form", { key: 'e1ac3ac80435b32cb0a742198d814778bffd635c' }, h("fieldset", { key: '68d0f984d3e66a6abc794e8b2086e27f26ecc809' }, h("div", { key: 'b1759ec1b9c94a976da992947b06da6d8f48f553', class: "row gy-3" }, h("div", { key: 'bc1ef82406d3da36c5d4d97b1a10259de87fdd09', class: "col-12" }, this.availablePaymentMethods.map((method) => this.renderPaymentMethodOption(method))), h("div", { key: 'ed26f2908aa90daba5ab320a668369566b9dacfa', class: "col-12" }, h("internal-button", { key: '094cdacb592825374ad33dd80a05091747bfec4b', text: this.submitButtonText, variant: "primary", type: "submit", clickHandler: (e) => this.tokenizePaymentMethod(e), isLoading: this.isLoading, "data-testid": "submit-button", hidden: this.computedHideSubmitButton })))))));
2322
2609
  }
2323
2610
  get host() { return getElement(this); }
2324
2611
  static get watchers() { return {
@@ -2327,4 +2614,4 @@ const JustifiTokenizePaymentMethod = class {
2327
2614
  }; }
2328
2615
  };
2329
2616
 
2330
- export { JustifiApplePay as justifi_apple_pay, JustifiButton as justifi_button, JustifiCheckoutSummary as justifi_checkout_summary, JustifiGooglePay as justifi_google_pay, JustifiHeader as justifi_header, JustifiModularCheckout as justifi_modular_checkout, JustifiPlaidPaymentMethod as justifi_plaid_payment_method, JustifiRadioListItem as justifi_radio_list_item, JustifiSavedPaymentMethods as justifi_saved_payment_methods, JustifiSezzlePaymentMethod as justifi_sezzle_payment_method, JustifiTokenizePaymentMethod as justifi_tokenize_payment_method };
2617
+ export { JustifiApplePay as justifi_apple_pay, JustifiButton as justifi_button, JustifiCheckoutSummary as justifi_checkout_summary, JustifiGooglePay as justifi_google_pay, JustifiHeader as justifi_header, JustifiModularCheckout as justifi_modular_checkout, JustifiPaypal as justifi_paypal, JustifiPlaidPaymentMethod as justifi_plaid_payment_method, JustifiRadioListItem as justifi_radio_list_item, JustifiSavedPaymentMethods as justifi_saved_payment_methods, JustifiSezzlePaymentMethod as justifi_sezzle_payment_method, JustifiTokenizePaymentMethod as justifi_tokenize_payment_method };