@justifi/webcomponents 6.0.0-rc.1 → 6.0.0-rc.10

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 (465) hide show
  1. package/dist/cjs/{Api-CPuq_15r.js → Api-DyimBzKT.js} +2 -2
  2. package/dist/cjs/{Refund-CqWNG8sx.js → Refund-BefKONu4.js} +6 -3
  3. package/dist/cjs/additional-questions-details_5.cjs.entry.js +3 -3
  4. package/dist/cjs/{badge-CMmPvqtE.js → badge-CcJ9H85-.js} +1 -1
  5. package/dist/cjs/bank-account-document-form-inputs_4.cjs.entry.js +7 -7
  6. package/dist/cjs/bank-account-form.cjs.entry.js +9 -6
  7. package/dist/cjs/business-details-core.cjs.entry.js +4 -4
  8. package/dist/cjs/{business.service-C3BdUPlm.js → business.service-BB6zl4Gc.js} +2 -2
  9. package/dist/cjs/{button-CfVQSysQ.js → button-DsHDMHaa.js} +1 -1
  10. package/dist/cjs/card-form.cjs.entry.js +9 -6
  11. package/dist/cjs/{check-pkg-version-D_lazhBQ.js → check-pkg-version-DiQ-d5Nl.js} +9 -3
  12. package/dist/cjs/{checkout.service-B0ZmvWwI.js → checkout.service-B-R80p4f.js} +2 -2
  13. package/dist/cjs/checkout.store-BGvYPPz0.js +88 -0
  14. package/dist/cjs/checkouts-list-core.cjs.entry.js +10 -10
  15. package/dist/cjs/{payments-list-params-state-BNbT1fuJ.js → checkouts-list-params-state-Cewmin_p.js} +1 -1
  16. package/dist/cjs/{checkouts-table-UN5gPpQ_.js → checkouts-table-DjMdEiEW.js} +3 -3
  17. package/dist/cjs/{config-state-5xZf-jax.js → config-state-BBOZIS8x.js} +1 -1
  18. package/dist/cjs/custom-popper_2.cjs.entry.js +1 -1
  19. package/dist/cjs/{dispute.service-DsPEAcDn.js → dispute.service-B5tITFAh.js} +2 -2
  20. package/dist/cjs/form-alert_5.cjs.entry.js +1 -1
  21. package/dist/cjs/form-control-checkbox.cjs.entry.js +3 -3
  22. package/dist/cjs/form-control-date.cjs.entry.js +2 -2
  23. package/dist/cjs/{form-control-error-text-HM0zQerh.js → form-control-error-text-B-P5UDhm.js} +1 -1
  24. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +2 -2
  25. package/dist/cjs/{form-control-help-text-5KIUw1IP.js → form-control-help-text-JoZjhb9m.js} +1 -1
  26. package/dist/cjs/form-control-help-text.cjs.entry.js +1 -1
  27. package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +3 -3
  28. package/dist/cjs/form-control-monetary.cjs.entry.js +4 -4
  29. package/dist/cjs/form-control-number-masked_2.cjs.entry.js +2 -2
  30. package/dist/cjs/form-control-number.cjs.entry.js +3 -3
  31. package/dist/cjs/form-control-radio.cjs.entry.js +3 -3
  32. package/dist/cjs/form-control-select_2.cjs.entry.js +2 -2
  33. package/dist/cjs/{get-payment-details-DtCXaIMx.js → get-payment-details-BfgRmNL4.js} +2 -2
  34. package/dist/cjs/{get-subaccounts-CwCH5rC8.js → get-subaccounts-Bnfv2tEN.js} +3 -3
  35. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +4 -4
  36. package/dist/cjs/{header-1-DD41iNlG.js → header-1-DRA3f4Jh.js} +1 -1
  37. package/dist/cjs/{header-3-D9Wa0IfT.js → header-3-sOdOpfx3.js} +1 -1
  38. package/dist/cjs/hidden-input_2.cjs.entry.js +4 -4
  39. package/dist/cjs/{index-Yd9aLenr.js → index-B32W0A3m.js} +1 -1
  40. package/dist/cjs/{index-dm_GlYlb.js → index-C9hBD-32.js} +2 -2
  41. package/dist/cjs/index-D-dD-aC2.js +30 -0
  42. package/dist/cjs/index.cjs.js +8 -0
  43. package/dist/cjs/{insurance-state-Cyva9u6S.js → insurance-state-d2thhXUX.js} +2 -2
  44. package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +7 -7
  45. package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +8 -8
  46. package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +1 -1
  47. package/dist/cjs/justifi-apple-pay.cjs.entry.js +782 -0
  48. package/dist/cjs/justifi-bank-account-billing-form-simple_9.cjs.entry.js +16 -15
  49. package/dist/cjs/justifi-business-details.cjs.entry.js +10 -10
  50. package/dist/cjs/justifi-business-form.cjs.entry.js +13 -13
  51. package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +1 -1
  52. package/dist/cjs/justifi-checkout-summary_7.cjs.entry.js +1421 -0
  53. package/dist/cjs/justifi-checkout.cjs.entry.js +26 -48
  54. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +7 -7
  55. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +13 -13
  56. package/dist/cjs/justifi-config-provider.cjs.entry.js +3 -3
  57. package/dist/cjs/justifi-details.cjs.entry.js +2 -2
  58. package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +1 -1
  59. package/dist/cjs/justifi-dispute-management.cjs.entry.js +9 -9
  60. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +12 -12
  61. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +9 -9
  62. package/dist/cjs/justifi-order-terminals.cjs.entry.js +12 -12
  63. package/dist/cjs/justifi-owner-form_3.cjs.entry.js +8 -8
  64. package/dist/cjs/justifi-payment-details.cjs.entry.js +11 -11
  65. package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +3 -3
  66. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +9 -9
  67. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +12 -12
  68. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +5 -5
  69. package/dist/cjs/justifi-payments-list.cjs.entry.js +13 -13
  70. package/dist/cjs/justifi-payout-details.cjs.entry.js +10 -10
  71. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +12 -12
  72. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +5 -5
  73. package/dist/cjs/justifi-payouts-list.cjs.entry.js +14 -14
  74. package/dist/cjs/justifi-refund-payment.cjs.entry.js +13 -13
  75. package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +1 -1
  76. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +17 -12
  77. package/dist/cjs/justifi-skeleton.cjs.entry.js +3 -3
  78. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +7 -7
  79. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +11 -11
  80. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +7 -7
  81. package/dist/cjs/justifi-terminals-list.cjs.entry.js +13 -13
  82. package/dist/cjs/loader.cjs.js +2 -2
  83. package/dist/cjs/{package-Cp_7Ls2E.js → package-Be2aoTf8.js} +1 -1
  84. package/dist/cjs/pagination-menu.cjs.entry.js +1 -1
  85. package/dist/cjs/payment-details-core.cjs.entry.js +7 -7
  86. package/dist/cjs/payment-method-option.cjs.entry.js +2 -2
  87. package/dist/cjs/{payment.service-1H0VC3LV.js → payment.service-aR96UW5e.js} +2 -2
  88. package/dist/cjs/payments-list-core.cjs.entry.js +11 -11
  89. package/dist/cjs/{payouts-list-params-state-BNbT1fuJ.js → payments-list-params-state-Cewmin_p.js} +1 -1
  90. package/dist/cjs/{payments-status-PB63klt3.js → payments-status-DXRh_ekP.js} +2 -2
  91. package/dist/cjs/{payments-table-quF0NnsS.js → payments-table-BE8u0-i0.js} +3 -3
  92. package/dist/cjs/payout-details-core.cjs.entry.js +8 -8
  93. package/dist/cjs/{payout.service-CIZFU-hV.js → payout.service-6Cl_yXXQ.js} +2 -2
  94. package/dist/cjs/payouts-list-core.cjs.entry.js +11 -11
  95. package/dist/cjs/{checkouts-list-params-state-BNbT1fuJ.js → payouts-list-params-state-Cewmin_p.js} +1 -1
  96. package/dist/cjs/{payouts-status-Bk1JFzbP.js → payouts-status-DxTQZv3i.js} +2 -2
  97. package/dist/cjs/{payouts-table-D_CCTR_k.js → payouts-table-BbydhJUr.js} +3 -3
  98. package/dist/cjs/{skeleton-x-GSs3xk.js → skeleton-C7DQRD6r.js} +1 -1
  99. package/dist/cjs/{spinner-Kb1BFvnL.js → spinner-jmeA44Ee.js} +1 -1
  100. package/dist/cjs/{styled-host-CqQYxX-w.js → styled-host-BfVJlAsJ.js} +1 -1
  101. package/dist/cjs/{table-BJVUhh3s.js → table-Ccdrt0v_.js} +2 -2
  102. package/dist/cjs/table-filters-menu.cjs.entry.js +2 -2
  103. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +10 -10
  104. package/dist/cjs/{terminal-orders-list-params-state-BNbT1fuJ.js → terminal-orders-list-params-state-Cewmin_p.js} +1 -1
  105. package/dist/cjs/{terminal-orders-table-0O5jtzYj.js → terminal-orders-table-B4HjERrK.js} +5 -5
  106. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
  107. package/dist/cjs/{terminal.service-DUlyMTrX.js → terminal.service-D1FAYZzd.js} +2 -2
  108. package/dist/cjs/terminals-list-core.cjs.entry.js +10 -10
  109. package/dist/cjs/terminals-list-params-state-Cewmin_p.js +22 -0
  110. package/dist/cjs/{terminals-table-C2BNRUS5.js → terminals-table-C79Xc4FI.js} +3 -3
  111. package/dist/cjs/{utils-Df-pajL7.js → utils-Bzyj4qWe.js} +1 -1
  112. package/dist/cjs/{utils-BaGF9XIe.js → utils-ChCUZgUy.js} +6 -0
  113. package/dist/cjs/webcomponents.cjs.js +3 -3
  114. package/dist/collection/api/ApplePay.js +119 -0
  115. package/dist/collection/api/Payment.js +5 -2
  116. package/dist/collection/api/services/apple-pay.service.js +293 -0
  117. package/dist/collection/api/services/plaid.service.js +20 -0
  118. package/dist/collection/assets/plaid-icon.svg +1 -0
  119. package/dist/collection/collection-manifest.json +3 -1
  120. package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +6 -3
  121. package/dist/collection/components/checkout/card-form/card-form.js +6 -3
  122. package/dist/collection/components/checkout/checkout.js +17 -39
  123. package/dist/collection/components/checkout/save-new-payment-method.js +1 -1
  124. package/dist/collection/components/insurance/season-interruption/season-interruption-insurance.js +4 -0
  125. package/dist/collection/components/modular-checkout/ModularCheckout.js +28 -0
  126. package/dist/collection/components/modular-checkout/modular-checkout.js +228 -125
  127. package/dist/collection/components/modular-checkout/sub-components/apple-pay-skeleton.js +10 -0
  128. package/dist/collection/components/modular-checkout/sub-components/apple-pay.js +509 -0
  129. package/dist/collection/components/modular-checkout/sub-components/plaid-payment-method.js +885 -0
  130. package/dist/collection/components/modular-checkout/sub-components/plaid-payment-method.test.js +124 -0
  131. package/dist/collection/components/modular-checkout/sub-components/saved-payment-methods.js +7 -5
  132. package/dist/collection/components/modular-checkout/sub-components/sezzle-payment-method.js +25 -8
  133. package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +63 -34
  134. package/dist/collection/index.js +1 -0
  135. package/dist/collection/store/checkout.store.js +46 -2
  136. package/dist/collection/ui-components/apple-pay-button.js +146 -0
  137. package/dist/collection/ui-components/form/form-control-radio.js +5 -5
  138. package/dist/collection/ui-components/shadow-dom-components/justifi-radio-list-item.js +4 -4
  139. package/dist/collection/utils/check-pkg-version.js +6 -0
  140. package/dist/collection/utils/utils.js +5 -0
  141. package/dist/docs.json +1037 -212
  142. package/dist/esm/{Api-N_veT2p6.js → Api-DAWuvzbl.js} +2 -2
  143. package/dist/esm/{Refund-Di6J0oN2.js → Refund-CVh70dXA.js} +7 -4
  144. package/dist/esm/additional-questions-details_5.entry.js +4 -4
  145. package/dist/esm/{badge-D_mzXSCQ.js → badge-DSYSJcRy.js} +2 -2
  146. package/dist/esm/bank-account-document-form-inputs_4.entry.js +8 -8
  147. package/dist/esm/bank-account-form.entry.js +10 -7
  148. package/dist/esm/business-details-core.entry.js +5 -5
  149. package/dist/esm/{business.service-Bdvhdc_d.js → business.service-cQrH5BqF.js} +2 -2
  150. package/dist/esm/{button-CeR8qVS3.js → button-CpllL0At.js} +2 -2
  151. package/dist/esm/card-form.entry.js +10 -7
  152. package/dist/esm/{check-pkg-version-Bb69ihTN.js → check-pkg-version-CAnDiqiu.js} +9 -3
  153. package/dist/esm/{checkout.service-XgGFa7H8.js → checkout.service-Bbgi1I6V.js} +2 -2
  154. package/dist/esm/checkout.store-CCdFOPCK.js +83 -0
  155. package/dist/esm/checkouts-list-core.entry.js +11 -11
  156. package/dist/esm/{checkouts-list-params-state-SMXQIZTt.js → checkouts-list-params-state-D8tzsGR_.js} +1 -1
  157. package/dist/esm/{checkouts-table-CFZYoYjn.js → checkouts-table-Ddf2I-Ul.js} +4 -4
  158. package/dist/esm/{config-state-BrllxiM0.js → config-state-DZeVYerv.js} +1 -1
  159. package/dist/esm/custom-popper_2.entry.js +2 -2
  160. package/dist/esm/{dispute.service-CKPcmwhH.js → dispute.service-CrZsNDW8.js} +2 -2
  161. package/dist/esm/form-alert_5.entry.js +2 -2
  162. package/dist/esm/form-control-checkbox.entry.js +4 -4
  163. package/dist/esm/form-control-date.entry.js +3 -3
  164. package/dist/esm/{form-control-error-text-D3ZwkOv-.js → form-control-error-text-R7U07nTg.js} +2 -2
  165. package/dist/esm/form-control-file-v2_2.entry.js +3 -3
  166. package/dist/esm/{form-control-help-text-C39ZW65w.js → form-control-help-text-CRLH-2f7.js} +2 -2
  167. package/dist/esm/form-control-help-text.entry.js +1 -1
  168. package/dist/esm/form-control-monetary-provisioning.entry.js +4 -4
  169. package/dist/esm/form-control-monetary.entry.js +5 -5
  170. package/dist/esm/form-control-number-masked_2.entry.js +3 -3
  171. package/dist/esm/form-control-number.entry.js +4 -4
  172. package/dist/esm/form-control-radio.entry.js +4 -4
  173. package/dist/esm/form-control-select_2.entry.js +3 -3
  174. package/dist/esm/{get-payment-details-Dt-dr16k.js → get-payment-details-0VzpMNY9.js} +2 -2
  175. package/dist/esm/{get-subaccounts-BsoVLANw.js → get-subaccounts-9UMbyFiT.js} +3 -3
  176. package/dist/esm/gross-payment-chart-core.entry.js +5 -5
  177. package/dist/esm/{header-1-E-hEi3wF.js → header-1-3M9If0gM.js} +2 -2
  178. package/dist/esm/{header-3-Dm7M85kz.js → header-3-CWa41YWq.js} +2 -2
  179. package/dist/esm/hidden-input_2.entry.js +5 -5
  180. package/dist/esm/{index-B9me4yN2.js → index-B_KxSZIF.js} +1 -1
  181. package/dist/esm/{index-kpoIU4v_.js → index-Bn7inNWG.js} +2 -2
  182. package/dist/esm/index-CbL73B6U.js +30 -0
  183. package/dist/esm/index.js +1 -1
  184. package/dist/esm/{insurance-state-CB4l8sOv.js → insurance-state-CTalqbNa.js} +3 -3
  185. package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +8 -8
  186. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +9 -9
  187. package/dist/esm/justifi-additional-statement_8.entry.js +2 -2
  188. package/dist/esm/justifi-apple-pay.entry.js +780 -0
  189. package/dist/esm/justifi-bank-account-billing-form-simple_9.entry.js +17 -16
  190. package/dist/esm/justifi-business-details.entry.js +11 -11
  191. package/dist/esm/justifi-business-form.entry.js +14 -14
  192. package/dist/esm/justifi-business-representative-form-inputs.entry.js +2 -2
  193. package/dist/esm/justifi-checkout-summary_7.entry.js +1413 -0
  194. package/dist/esm/justifi-checkout.entry.js +26 -48
  195. package/dist/esm/justifi-checkouts-list-filters.entry.js +8 -8
  196. package/dist/esm/justifi-checkouts-list.entry.js +14 -14
  197. package/dist/esm/justifi-config-provider.entry.js +3 -3
  198. package/dist/esm/justifi-details.entry.js +3 -3
  199. package/dist/esm/justifi-dispute-management-core.entry.js +1 -1
  200. package/dist/esm/justifi-dispute-management.entry.js +9 -9
  201. package/dist/esm/justifi-dispute-notification_3.entry.js +13 -13
  202. package/dist/esm/justifi-gross-payment-chart.entry.js +10 -10
  203. package/dist/esm/justifi-order-terminals.entry.js +13 -13
  204. package/dist/esm/justifi-owner-form_3.entry.js +9 -9
  205. package/dist/esm/justifi-payment-details.entry.js +12 -12
  206. package/dist/esm/justifi-payment-provisioning-core.entry.js +4 -4
  207. package/dist/esm/justifi-payment-provisioning.entry.js +9 -9
  208. package/dist/esm/justifi-payment-transactions-list.entry.js +13 -13
  209. package/dist/esm/justifi-payments-list-filters.entry.js +6 -6
  210. package/dist/esm/justifi-payments-list.entry.js +14 -14
  211. package/dist/esm/justifi-payout-details.entry.js +11 -11
  212. package/dist/esm/justifi-payout-transactions-list.entry.js +13 -13
  213. package/dist/esm/justifi-payouts-list-filters.entry.js +6 -6
  214. package/dist/esm/justifi-payouts-list.entry.js +15 -15
  215. package/dist/esm/justifi-refund-payment.entry.js +14 -14
  216. package/dist/esm/justifi-saved-payment-method.entry.js +2 -2
  217. package/dist/esm/justifi-season-interruption-insurance.entry.js +18 -13
  218. package/dist/esm/justifi-skeleton.entry.js +4 -4
  219. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +8 -8
  220. package/dist/esm/justifi-terminal-orders-list.entry.js +12 -12
  221. package/dist/esm/justifi-terminals-list-filters.entry.js +8 -8
  222. package/dist/esm/justifi-terminals-list.entry.js +14 -14
  223. package/dist/esm/loader.js +3 -3
  224. package/dist/esm/{package-O3LY2Da6.js → package-CnWtPu8L.js} +1 -1
  225. package/dist/esm/pagination-menu.entry.js +2 -2
  226. package/dist/esm/{parts-CfF8KKwx.js → parts-RvUQ__Pq.js} +1 -1
  227. package/dist/esm/payment-details-core.entry.js +8 -8
  228. package/dist/esm/payment-method-option.entry.js +3 -3
  229. package/dist/esm/{payment.service-BWO84KlP.js → payment.service-TxyxCg0E.js} +2 -2
  230. package/dist/esm/payments-list-core.entry.js +12 -12
  231. package/dist/esm/{payments-list-params-state-SMXQIZTt.js → payments-list-params-state-D8tzsGR_.js} +1 -1
  232. package/dist/esm/{payments-status-XoZrlbiZ.js → payments-status-5orNU2Rd.js} +2 -2
  233. package/dist/esm/{payments-table-Dh4P9mTb.js → payments-table-gkJV5GNK.js} +4 -4
  234. package/dist/esm/payout-details-core.entry.js +9 -9
  235. package/dist/esm/{payout.service-Cld6TS5W.js → payout.service-BOwZ4wWh.js} +2 -2
  236. package/dist/esm/payouts-list-core.entry.js +12 -12
  237. package/dist/esm/{payouts-list-params-state-SMXQIZTt.js → payouts-list-params-state-D8tzsGR_.js} +1 -1
  238. package/dist/esm/{payouts-status-Qm2jZG1-.js → payouts-status-CZPwa2AE.js} +2 -2
  239. package/dist/esm/{payouts-table-DMVAZp-r.js → payouts-table-0PtktGRd.js} +4 -4
  240. package/dist/esm/{skeleton-DrHwsgs_.js → skeleton-qMb0_Cjy.js} +2 -2
  241. package/dist/esm/{spinner-XBq6mVJW.js → spinner-DUzyWLhj.js} +2 -2
  242. package/dist/esm/{styled-host-B_XBaM7z.js → styled-host-CTAGIN84.js} +1 -1
  243. package/dist/esm/{table-qqt2Ew5y.js → table-Br3n9Xu-.js} +3 -3
  244. package/dist/esm/table-filters-menu.entry.js +3 -3
  245. package/dist/esm/terminal-orders-list-core.entry.js +11 -11
  246. package/dist/esm/{terminal-orders-list-params-state-SMXQIZTt.js → terminal-orders-list-params-state-D8tzsGR_.js} +1 -1
  247. package/dist/esm/{terminal-orders-table-BN4Co4T8.js → terminal-orders-table-DTBSIMlJ.js} +6 -6
  248. package/dist/esm/terminal-quantity-selector.entry.js +2 -2
  249. package/dist/esm/{terminal.service-DmYCUQcA.js → terminal.service-E6dZlM43.js} +2 -2
  250. package/dist/esm/terminals-list-core.entry.js +11 -11
  251. package/dist/esm/terminals-list-params-state-D8tzsGR_.js +16 -0
  252. package/dist/esm/{terminals-table-C8LczeG_.js → terminals-table-TGUKTi7I.js} +4 -4
  253. package/dist/esm/{utils-lb8p1Exq.js → utils-BscIVFn8.js} +6 -1
  254. package/dist/esm/{utils-kWaZhFAd.js → utils-Dg6gMUTv.js} +2 -2
  255. package/dist/esm/webcomponents.js +4 -4
  256. package/dist/module/Analytics.js +6 -0
  257. package/dist/module/ModularCheckout.js +30 -0
  258. package/dist/module/Refund.js +5 -2
  259. package/dist/module/bank-account-form.js +5 -2
  260. package/dist/module/card-form.js +5 -2
  261. package/dist/module/checkout.store.js +47 -2
  262. package/dist/module/form-control-radio2.js +3 -3
  263. package/dist/module/gross-payment-chart-core2.js +1 -1
  264. package/dist/module/index.js +1 -0
  265. package/dist/module/justifi-apple-pay.d.ts +11 -0
  266. package/dist/module/justifi-apple-pay.js +811 -0
  267. package/dist/module/justifi-checkout.js +63 -75
  268. package/dist/module/justifi-order-terminals.js +1 -1
  269. package/dist/module/justifi-plaid-payment-method.d.ts +11 -0
  270. package/dist/module/justifi-plaid-payment-method.js +6 -0
  271. package/dist/module/justifi-radio-list-item2.js +2 -2
  272. package/dist/module/justifi-season-interruption-insurance.js +5 -1
  273. package/dist/module/modular-checkout.js +179 -101
  274. package/dist/module/package.js +1 -1
  275. package/dist/module/plaid-payment-method.js +687 -0
  276. package/dist/module/save-new-payment-method.js +1 -1
  277. package/dist/module/saved-payment-methods.js +7 -5
  278. package/dist/module/sezzle-payment-method.js +14 -22
  279. package/dist/module/terminals-list-core2.js +1 -1
  280. package/dist/module/tokenize-payment-method.js +44 -34
  281. package/dist/module/utils2.js +6 -1
  282. package/dist/types/api/ApplePay.d.ts +196 -0
  283. package/dist/types/api/Checkout.d.ts +9 -14
  284. package/dist/types/api/Payment.d.ts +4 -3
  285. package/dist/types/api/services/apple-pay.service.d.ts +55 -0
  286. package/dist/types/api/services/plaid.service.d.ts +12 -0
  287. package/dist/types/components/checkout/bank-account-form/bank-account-form.d.ts +1 -0
  288. package/dist/types/components/checkout/card-form/card-form.d.ts +1 -0
  289. package/dist/types/components/checkout/checkout.d.ts +6 -7
  290. package/dist/types/components/modular-checkout/ModularCheckout.d.ts +31 -0
  291. package/dist/types/components/modular-checkout/modular-checkout.d.ts +13 -4
  292. package/dist/types/components/modular-checkout/sub-components/apple-pay-skeleton.d.ts +6 -0
  293. package/dist/types/components/modular-checkout/sub-components/apple-pay.d.ts +39 -0
  294. package/dist/types/components/modular-checkout/sub-components/plaid-payment-method.d.ts +80 -0
  295. package/dist/types/components/modular-checkout/sub-components/plaid-payment-method.test.d.ts +1 -0
  296. package/dist/types/components/modular-checkout/sub-components/saved-payment-methods.d.ts +1 -1
  297. package/dist/types/components/modular-checkout/sub-components/sezzle-payment-method.d.ts +1 -1
  298. package/dist/types/components/tokenize-payment-method/tokenize-payment-method.d.ts +7 -6
  299. package/dist/types/components.d.ts +172 -11
  300. package/dist/types/index.d.ts +2 -0
  301. package/dist/types/store/checkout.store.d.ts +14 -3
  302. package/dist/types/ui-components/apple-pay-button.d.ts +17 -0
  303. package/dist/types/ui-components/form/form-control-radio.d.ts +1 -1
  304. package/dist/types/ui-components/shadow-dom-components/justifi-radio-list-item.d.ts +1 -1
  305. package/dist/types/utils/utils.d.ts +1 -0
  306. package/dist/webcomponents/index.esm.js +1 -0
  307. package/dist/webcomponents/p-0803d130.entry.js +1 -0
  308. package/dist/webcomponents/{p-Dvxpy_P1.js → p-0Om7jLBs.js} +1 -1
  309. package/dist/webcomponents/{p-0932f6a9.entry.js → p-117b7f47.entry.js} +1 -1
  310. package/dist/webcomponents/p-17093105.entry.js +1 -0
  311. package/dist/webcomponents/{p-f01953ea.entry.js → p-1a08b47f.entry.js} +1 -1
  312. package/dist/webcomponents/p-1bcb3852.entry.js +1 -0
  313. package/dist/webcomponents/{p-ae4297dd.entry.js → p-1eb2b847.entry.js} +1 -1
  314. package/dist/webcomponents/{p-dd257e60.entry.js → p-2f7aa249.entry.js} +1 -1
  315. package/dist/webcomponents/{p-28c7bef7.entry.js → p-2fa34c82.entry.js} +4 -4
  316. package/dist/webcomponents/{p-08ea8974.entry.js → p-33311d41.entry.js} +1 -1
  317. package/dist/webcomponents/p-336c31b3.entry.js +1 -0
  318. package/dist/webcomponents/{p-22be0859.entry.js → p-3f33c940.entry.js} +1 -1
  319. package/dist/webcomponents/{p-f3a757b2.entry.js → p-442f86e8.entry.js} +1 -1
  320. package/dist/webcomponents/{p-a8205044.entry.js → p-44450a94.entry.js} +1 -1
  321. package/dist/webcomponents/{p-cebe360b.entry.js → p-464e7a8e.entry.js} +1 -1
  322. package/dist/webcomponents/{p-ba8ae31f.entry.js → p-50392803.entry.js} +1 -1
  323. package/dist/webcomponents/p-52cbd667.entry.js +1 -0
  324. package/dist/webcomponents/{p-ded22005.entry.js → p-54ca3070.entry.js} +1 -1
  325. package/dist/webcomponents/{p-77515be6.entry.js → p-5ad0f438.entry.js} +1 -1
  326. package/dist/webcomponents/{p-6e18d13f.entry.js → p-613421d4.entry.js} +1 -1
  327. package/dist/webcomponents/{p-9b75aced.entry.js → p-62d12566.entry.js} +1 -1
  328. package/dist/webcomponents/p-65ed60bf.entry.js +1 -0
  329. package/dist/webcomponents/p-6cf30a24.entry.js +1 -0
  330. package/dist/webcomponents/{p-48bccf3b.entry.js → p-70f51444.entry.js} +1 -1
  331. package/dist/webcomponents/{p-a4172773.entry.js → p-729dbd8f.entry.js} +1 -1
  332. package/dist/webcomponents/p-77948b46.entry.js +1 -0
  333. package/dist/webcomponents/{p-1d53f0b8.entry.js → p-7bcfaff4.entry.js} +1 -1
  334. package/dist/webcomponents/{p-b0bfa20f.entry.js → p-7cf87637.entry.js} +1 -1
  335. package/dist/webcomponents/{p-dfd7c212.entry.js → p-7dd74e6f.entry.js} +1 -1
  336. package/dist/webcomponents/{p-I8XpD1TX.js → p-7s1gsXM5.js} +1 -1
  337. package/dist/webcomponents/{p-3d85d046.entry.js → p-80331983.entry.js} +1 -1
  338. package/dist/webcomponents/{p-d0e24727.entry.js → p-85f20746.entry.js} +1 -1
  339. package/dist/webcomponents/{p-79055216.entry.js → p-8687e5d6.entry.js} +1 -1
  340. package/dist/webcomponents/p-89ecd650.entry.js +1 -0
  341. package/dist/webcomponents/p-8a6718b6.entry.js +1 -0
  342. package/dist/webcomponents/p-8d6b81ba.entry.js +1 -0
  343. package/dist/webcomponents/{p-a7d5e434.entry.js → p-8d743490.entry.js} +1 -1
  344. package/dist/webcomponents/{p-8f0339de.entry.js → p-8f7396b1.entry.js} +1 -1
  345. package/dist/webcomponents/{p-15777cfe.entry.js → p-8ff839a4.entry.js} +1 -1
  346. package/dist/webcomponents/{p-57143978.entry.js → p-95cbb655.entry.js} +1 -1
  347. package/dist/webcomponents/{p-ae5a3c2a.entry.js → p-98cffba9.entry.js} +1 -1
  348. package/dist/webcomponents/{p-4ba144ac.entry.js → p-9a2c044f.entry.js} +1 -1
  349. package/dist/webcomponents/{p-904a95e5.entry.js → p-9be67b19.entry.js} +1 -1
  350. package/dist/webcomponents/{p-df199396.entry.js → p-9e8021a1.entry.js} +1 -1
  351. package/dist/webcomponents/{p-131d799c.entry.js → p-9fc0ea58.entry.js} +1 -1
  352. package/dist/webcomponents/p-9fc567d8.entry.js +1 -0
  353. package/dist/webcomponents/{p-424f491c.entry.js → p-9fcff84c.entry.js} +1 -1
  354. package/dist/webcomponents/p-B71k50jz.js +1 -0
  355. package/dist/webcomponents/p-BF4U0yVj.js +1 -0
  356. package/dist/webcomponents/{p-zdIeCUeh.js → p-BHf9IqGw.js} +1 -1
  357. package/dist/webcomponents/p-BQ2TIFoY.js +1 -0
  358. package/dist/webcomponents/p-BSt6p1oq.js +1 -0
  359. package/dist/webcomponents/p-BY1mRAvj.js +1 -0
  360. package/dist/webcomponents/{p-YND5pTuF.js → p-Bb-6bNcq.js} +1 -1
  361. package/dist/webcomponents/p-BbZwa5UI.js +1 -0
  362. package/dist/webcomponents/p-BdKWuCys.js +1 -0
  363. package/dist/webcomponents/p-BfM6X7lF.js +1 -0
  364. package/dist/webcomponents/{p-BbYVgLcf.js → p-BjVfIXWC.js} +1 -1
  365. package/dist/webcomponents/{p-kpoIU4v_.js → p-Bn7inNWG.js} +1 -1
  366. package/dist/webcomponents/{p-BisQ61nK.js → p-BsGE9UDv.js} +1 -1
  367. package/dist/webcomponents/{p-BeszVz87.js → p-C5id7s_l.js} +1 -1
  368. package/dist/webcomponents/{p-CsNubTqD.js → p-CAJnQLZF.js} +1 -1
  369. package/dist/webcomponents/{p-Bz164TKZ.js → p-CB0mCq1M.js} +1 -1
  370. package/dist/webcomponents/p-CaAVuW6B.js +1 -0
  371. package/dist/webcomponents/p-Cb0FhuyU.js +1 -0
  372. package/dist/webcomponents/p-CbL73B6U.js +1 -0
  373. package/dist/webcomponents/p-CnWtPu8L.js +1 -0
  374. package/dist/webcomponents/p-CpaS1Lex.js +1 -0
  375. package/dist/webcomponents/p-DD0Mvpeu.js +1 -0
  376. package/dist/webcomponents/p-DDUmOl3v.js +1 -0
  377. package/dist/webcomponents/p-DIDloHpm.js +1 -0
  378. package/dist/webcomponents/p-DIjoBk44.js +1 -0
  379. package/dist/webcomponents/{p-UD2JhYS2.js → p-DK2sRMlx.js} +1 -1
  380. package/dist/webcomponents/{p-DO3INvI2.js → p-DNo0OPOP.js} +1 -1
  381. package/dist/webcomponents/{p-BTkXk7ol.js → p-DRXvcLy9.js} +1 -1
  382. package/dist/webcomponents/{p-BNz6wy4f.js → p-DZYcH7jA.js} +1 -1
  383. package/dist/webcomponents/p-Da3idOSV.js +1 -0
  384. package/dist/webcomponents/p-Dgflaz6J.js +1 -0
  385. package/dist/webcomponents/{p-9y5MOK55.js → p-DhGNCW2f.js} +1 -1
  386. package/dist/webcomponents/p-DsZZxRXY.js +1 -0
  387. package/dist/webcomponents/{p-CRFzwZW6.js → p-DxqCFDtF.js} +1 -1
  388. package/dist/webcomponents/p-ED_TzwCp.js +1 -0
  389. package/dist/webcomponents/p-JyHlIFWl.js +1 -0
  390. package/dist/webcomponents/{p-CfF8KKwx.js → p-RvUQ__Pq.js} +1 -1
  391. package/dist/webcomponents/{p-DWUnL_zj.js → p-Wh1V0gvF.js} +1 -1
  392. package/dist/webcomponents/{p-c3a2c619.entry.js → p-a55f07af.entry.js} +1 -1
  393. package/dist/webcomponents/{p-40ba49e4.entry.js → p-aa6194ef.entry.js} +1 -1
  394. package/dist/webcomponents/{p-d77908ca.entry.js → p-ab6a5dc9.entry.js} +1 -1
  395. package/dist/webcomponents/{p-463ae23a.entry.js → p-abbf14b5.entry.js} +1 -1
  396. package/dist/webcomponents/{p-283cd78b.entry.js → p-af9c4174.entry.js} +1 -1
  397. package/dist/webcomponents/{p-f47095cd.entry.js → p-b7d2f2eb.entry.js} +1 -1
  398. package/dist/webcomponents/p-bbc4b4cb.entry.js +1 -0
  399. package/dist/webcomponents/{p-36d72e2d.entry.js → p-c599e526.entry.js} +1 -1
  400. package/dist/webcomponents/{p-5e10aa65.entry.js → p-d46dbb83.entry.js} +1 -1
  401. package/dist/webcomponents/{p-6849bf8e.entry.js → p-d62cd269.entry.js} +1 -1
  402. package/dist/webcomponents/{p-ff3377e7.entry.js → p-d9dd7d24.entry.js} +1 -1
  403. package/dist/webcomponents/p-dd7352da.entry.js +1 -0
  404. package/dist/webcomponents/{p-7c51805a.entry.js → p-e8a67dc7.entry.js} +1 -1
  405. package/dist/webcomponents/p-eP3fmhta.js +1 -0
  406. package/dist/webcomponents/p-eb2d9e5b.entry.js +1 -0
  407. package/dist/webcomponents/{p-1f8cd44e.entry.js → p-eddaca4e.entry.js} +1 -1
  408. package/dist/webcomponents/{p-9106fd74.entry.js → p-ef32fe0e.entry.js} +1 -1
  409. package/dist/webcomponents/{p-c5b48e8d.entry.js → p-f1cba43c.entry.js} +1 -1
  410. package/dist/webcomponents/{p-e830a580.entry.js → p-f1f0b405.entry.js} +1 -1
  411. package/dist/webcomponents/p-f499a8de.entry.js +1 -0
  412. package/dist/webcomponents/{p-828a61b9.entry.js → p-f4d0cdf0.entry.js} +1 -1
  413. package/dist/webcomponents/{p-818f51fd.entry.js → p-f680e617.entry.js} +1 -1
  414. package/dist/webcomponents/{p-bea4309d.entry.js → p-f7c4222f.entry.js} +1 -1
  415. package/dist/webcomponents/p-fa1884b4.entry.js +1 -0
  416. package/dist/webcomponents/p-sw5RO19U.js +1 -0
  417. package/dist/webcomponents/p-z-5r0gWn.js +1 -0
  418. package/dist/webcomponents/webcomponents.esm.js +1 -1
  419. package/package.json +2 -2
  420. package/dist/cjs/checkout.store-CV_fuGQw.js +0 -39
  421. package/dist/cjs/justifi-checkout-summary_6.cjs.entry.js +0 -698
  422. package/dist/cjs/terminals-list-params-state-BNbT1fuJ.js +0 -22
  423. package/dist/esm/checkout.store-B60siz2l.js +0 -36
  424. package/dist/esm/justifi-checkout-summary_6.entry.js +0 -691
  425. package/dist/esm/terminals-list-params-state-SMXQIZTt.js +0 -16
  426. package/dist/webcomponents/p-09e768fe.entry.js +0 -1
  427. package/dist/webcomponents/p-0dcc83ac.entry.js +0 -1
  428. package/dist/webcomponents/p-1bdce018.entry.js +0 -1
  429. package/dist/webcomponents/p-2f31a4e5.entry.js +0 -1
  430. package/dist/webcomponents/p-3a4ca4df.entry.js +0 -1
  431. package/dist/webcomponents/p-466f33d7.entry.js +0 -1
  432. package/dist/webcomponents/p-57802e57.entry.js +0 -1
  433. package/dist/webcomponents/p-5rVtZ2GJ.js +0 -1
  434. package/dist/webcomponents/p-7322c86e.entry.js +0 -1
  435. package/dist/webcomponents/p-7WIgS5RM.js +0 -1
  436. package/dist/webcomponents/p-89e27079.entry.js +0 -1
  437. package/dist/webcomponents/p-BC8YDY7M.js +0 -1
  438. package/dist/webcomponents/p-BVD7g3cE.js +0 -1
  439. package/dist/webcomponents/p-Bb6FBEPP.js +0 -1
  440. package/dist/webcomponents/p-Bpcb3SsP.js +0 -1
  441. package/dist/webcomponents/p-Bt388eye.js +0 -1
  442. package/dist/webcomponents/p-BySyDTv5.js +0 -1
  443. package/dist/webcomponents/p-C1fMfnu0.js +0 -1
  444. package/dist/webcomponents/p-CCME-fyU.js +0 -1
  445. package/dist/webcomponents/p-CLwzqWk2.js +0 -1
  446. package/dist/webcomponents/p-CVQyw7ao.js +0 -1
  447. package/dist/webcomponents/p-C_CXv7AN.js +0 -1
  448. package/dist/webcomponents/p-CwZKT93w.js +0 -1
  449. package/dist/webcomponents/p-D599ZMGU.js +0 -1
  450. package/dist/webcomponents/p-DD74a16D.js +0 -1
  451. package/dist/webcomponents/p-DaDsBt65.js +0 -1
  452. package/dist/webcomponents/p-JgbsbAhz.js +0 -1
  453. package/dist/webcomponents/p-O3LY2Da6.js +0 -1
  454. package/dist/webcomponents/p-WEguiGt1.js +0 -1
  455. package/dist/webcomponents/p-be06d86a.entry.js +0 -1
  456. package/dist/webcomponents/p-dd689b5e.entry.js +0 -1
  457. package/dist/webcomponents/p-dd6d6ddb.entry.js +0 -1
  458. package/dist/webcomponents/p-e859ece8.entry.js +0 -1
  459. package/dist/webcomponents/p-eaea7cc1.entry.js +0 -1
  460. package/dist/webcomponents/p-fa33df9f.entry.js +0 -1
  461. package/dist/webcomponents/p-ff869ded.entry.js +0 -1
  462. package/dist/webcomponents/p-pska2q1M.js +0 -1
  463. package/dist/webcomponents/p-qMrd7_Gp.js +0 -1
  464. package/dist/webcomponents/p-vRhNRfmB.js +0 -1
  465. package/dist/webcomponents/p-zrUQD0Wr.js +0 -1
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
8
  import { Business, IAdditionalQuestions, IAddress } from "./api/Business";
9
- import { ComponentClickEvent as ComponentClickEvent1, ComponentErrorCodes, ComponentErrorEvent as ComponentErrorEvent1, ComponentFormStepCompleteEvent as ComponentFormStepCompleteEvent1, ComponentSubmitEvent as ComponentSubmitEvent1, FileSelectEvent, IApiResponse, ICheckoutPaymentModeParam, ICheckoutStatus, ILoadedEventResponse, IRefund, ITerminalStatus, TerminalModelName, TerminalOrderStatus, TerminalOrderType } from "./api";
9
+ import { ComponentClickEvent as ComponentClickEvent1, ComponentErrorCodes, ComponentErrorEvent as ComponentErrorEvent1, ComponentFormStepCompleteEvent as ComponentFormStepCompleteEvent1, ComponentSubmitEvent as ComponentSubmitEvent1, FileSelectEvent, IApiResponse, ICheckoutPaymentMethod, ICheckoutPaymentModeParam, ICheckoutStatus, ILoadedEventResponse, IRefund, ITerminalStatus, PaymentMethodTypes, TerminalModelName, TerminalOrderStatus, TerminalOrderType } from "./api";
10
10
  import { ComponentClickEvent, ComponentErrorEvent, ComponentFormStepCompleteEvent, ComponentSubmitEvent } from "./api/ComponentEvents";
11
11
  import { Placement, PositioningStrategy } from "@popperjs/core";
12
12
  import { EntityDocumentType, FileSelectEvent as FileSelectEvent1 } from "./api/Document";
@@ -14,15 +14,17 @@ import { IPaymentMethodMetadata } from "./api/PaymentMethod";
14
14
  import { BillingFormFields as BillingFormFields1, FormController } from "./components";
15
15
  import { DisputeEvidenceDocument } from "./api/DisputeEvidenceDocument";
16
16
  import { DisputeResponseFormStep } from "./components/dispute-management/dispute-response/dispute-response-form-types";
17
+ import { ApplePayButtonStyle, ApplePayButtonType, IApplePayToken } from "./api/ApplePay";
17
18
  import { BillingFormFields } from "./components/checkout/billing-form/billing-form-schema";
18
19
  import { FormController as FormController1 } from "./ui-components/form/form";
19
20
  import { Dispute, IDispute } from "./api/Dispute";
20
- import { PaymentMethodOption } from "./components/checkout/payment-method-option-utils";
21
+ import { CheckoutChangedEventDetail } from "./components/modular-checkout/ModularCheckout";
21
22
  import { PaymentMethodPayload } from "./components/checkout/payment-method-payload";
23
+ import { PaymentMethodOption } from "./components/checkout/payment-method-option-utils";
22
24
  import { Identity } from "./api/Identity";
23
25
  import { PaginationProps } from "./ui-components/pagination-menu/pagination-menu";
24
26
  export { Business, IAdditionalQuestions, IAddress } from "./api/Business";
25
- export { ComponentClickEvent as ComponentClickEvent1, ComponentErrorCodes, ComponentErrorEvent as ComponentErrorEvent1, ComponentFormStepCompleteEvent as ComponentFormStepCompleteEvent1, ComponentSubmitEvent as ComponentSubmitEvent1, FileSelectEvent, IApiResponse, ICheckoutPaymentModeParam, ICheckoutStatus, ILoadedEventResponse, IRefund, ITerminalStatus, TerminalModelName, TerminalOrderStatus, TerminalOrderType } from "./api";
27
+ export { ComponentClickEvent as ComponentClickEvent1, ComponentErrorCodes, ComponentErrorEvent as ComponentErrorEvent1, ComponentFormStepCompleteEvent as ComponentFormStepCompleteEvent1, ComponentSubmitEvent as ComponentSubmitEvent1, FileSelectEvent, IApiResponse, ICheckoutPaymentMethod, ICheckoutPaymentModeParam, ICheckoutStatus, ILoadedEventResponse, IRefund, ITerminalStatus, PaymentMethodTypes, TerminalModelName, TerminalOrderStatus, TerminalOrderType } from "./api";
26
28
  export { ComponentClickEvent, ComponentErrorEvent, ComponentFormStepCompleteEvent, ComponentSubmitEvent } from "./api/ComponentEvents";
27
29
  export { Placement, PositioningStrategy } from "@popperjs/core";
28
30
  export { EntityDocumentType, FileSelectEvent as FileSelectEvent1 } from "./api/Document";
@@ -30,11 +32,13 @@ export { IPaymentMethodMetadata } from "./api/PaymentMethod";
30
32
  export { BillingFormFields as BillingFormFields1, FormController } from "./components";
31
33
  export { DisputeEvidenceDocument } from "./api/DisputeEvidenceDocument";
32
34
  export { DisputeResponseFormStep } from "./components/dispute-management/dispute-response/dispute-response-form-types";
35
+ export { ApplePayButtonStyle, ApplePayButtonType, IApplePayToken } from "./api/ApplePay";
33
36
  export { BillingFormFields } from "./components/checkout/billing-form/billing-form-schema";
34
37
  export { FormController as FormController1 } from "./ui-components/form/form";
35
38
  export { Dispute, IDispute } from "./api/Dispute";
36
- export { PaymentMethodOption } from "./components/checkout/payment-method-option-utils";
39
+ export { CheckoutChangedEventDetail } from "./components/modular-checkout/ModularCheckout";
37
40
  export { PaymentMethodPayload } from "./components/checkout/payment-method-payload";
41
+ export { PaymentMethodOption } from "./components/checkout/payment-method-option-utils";
38
42
  export { Identity } from "./api/Identity";
39
43
  export { PaginationProps } from "./ui-components/pagination-menu/pagination-menu";
40
44
  export namespace Components {
@@ -202,7 +206,7 @@ export namespace Components {
202
206
  "errorText": string;
203
207
  "helpText"?: string;
204
208
  "inputHandler": (name: string, value: string) => void;
205
- "label": string;
209
+ "label": any;
206
210
  "name": any;
207
211
  "value": string;
208
212
  }
@@ -276,6 +280,43 @@ export namespace Components {
276
280
  "documentErrors": any;
277
281
  "validateAndSubmit": (onSuccess: (formData: any, documentList: DisputeEvidenceDocument[], formStep: DisputeResponseFormStep) => void) => Promise<void>;
278
282
  }
283
+ interface JustifiApplePay {
284
+ "abort": () => Promise<void>;
285
+ /**
286
+ * @default ApplePayButtonStyle.BLACK
287
+ */
288
+ "buttonStyle": ApplePayButtonStyle;
289
+ /**
290
+ * @default ApplePayButtonType.PLAIN
291
+ */
292
+ "buttonType": ApplePayButtonType;
293
+ /**
294
+ * @default "US"
295
+ */
296
+ "countryCode": string;
297
+ /**
298
+ * @default false
299
+ */
300
+ "disabled": boolean;
301
+ "getPaymentMethods": () => Promise<string[]>;
302
+ /**
303
+ * @default "dev-checkout.justifi-staging.com"
304
+ */
305
+ "initiativeContext": string;
306
+ "isSupported": () => Promise<boolean>;
307
+ /**
308
+ * @default "JustiFi Checkout"
309
+ */
310
+ "merchantDisplayName": string;
311
+ /**
312
+ * @default "merchant.com.staging-justifi.checkout-dev"
313
+ */
314
+ "merchantIdentifier": string;
315
+ /**
316
+ * @default true
317
+ */
318
+ "showSkeleton": boolean;
319
+ }
279
320
  interface JustifiBankAccountBillingFormSimple {
280
321
  "fill": (fields: BillingFormFields) => Promise<void>;
281
322
  "getValues": () => Promise<BillingFormFields>;
@@ -598,7 +639,7 @@ export namespace Components {
598
639
  * @default false
599
640
  */
600
641
  "savePaymentMethod"?: boolean;
601
- "setSelectedPaymentMethod": (paymentMethodId: string) => Promise<void>;
642
+ "setSelectedPaymentMethod": (paymentMethod: ICheckoutPaymentMethod | { type: PaymentMethodTypes; }) => Promise<void>;
602
643
  "submitCheckout": (submitCheckoutArgs?: BillingFormFields1) => Promise<void>;
603
644
  "validate": () => Promise<boolean>;
604
645
  }
@@ -720,6 +761,18 @@ export namespace Components {
720
761
  "createdAfter"?: string;
721
762
  "createdBefore"?: string;
722
763
  }
764
+ interface JustifiPlaidPaymentMethod {
765
+ "deselect": () => Promise<void>;
766
+ "getErrorInfo": () => Promise<PlaidError | null>;
767
+ "getPaymentToken": () => Promise<string | undefined>;
768
+ "handleSelectionClick": () => Promise<void>;
769
+ "isCurrentlySelected": () => Promise<boolean>;
770
+ "isReadyForAuthentication": () => Promise<boolean>;
771
+ "reset": () => Promise<void>;
772
+ "resolvePaymentMethod": () => Promise<PaymentMethodPayload>;
773
+ "retry": () => Promise<void>;
774
+ "setSelected": (selected: boolean) => Promise<void>;
775
+ }
723
776
  interface JustifiProductOrService {
724
777
  "disputeResponse": any;
725
778
  /**
@@ -738,7 +791,7 @@ export namespace Components {
738
791
  * @default false
739
792
  */
740
793
  "hidden"?: boolean;
741
- "label": string;
794
+ "label": any;
742
795
  "name": string;
743
796
  "value": string;
744
797
  }
@@ -786,6 +839,7 @@ export namespace Components {
786
839
  "validate": () => Promise<{ isValid: boolean; }>;
787
840
  }
788
841
  interface JustifiSezzlePaymentMethod {
842
+ "handleSelectionClick": () => Promise<void>;
789
843
  "resolvePaymentMethod": (insuranceValidation: any) => Promise<PaymentMethodPayload>;
790
844
  }
791
845
  interface JustifiShippingDetails {
@@ -844,6 +898,7 @@ export namespace Components {
844
898
  * @default 'Submit'
845
899
  */
846
900
  "submitButtonText"?: string;
901
+ "tokenize": () => Promise<any>;
847
902
  "tokenizePaymentMethod": (event?: MouseEvent) => Promise<PaymentMethodPayload>;
848
903
  "validate": () => Promise<ValidationResult>;
849
904
  }
@@ -1010,6 +1065,10 @@ export interface JustifiAdditionalQuestionsFormStepCoreCustomEvent<T> extends Cu
1010
1065
  detail: T;
1011
1066
  target: HTMLJustifiAdditionalQuestionsFormStepCoreElement;
1012
1067
  }
1068
+ export interface JustifiApplePayCustomEvent<T> extends CustomEvent<T> {
1069
+ detail: T;
1070
+ target: HTMLJustifiApplePayElement;
1071
+ }
1013
1072
  export interface JustifiBusinessBankAccountFormStepCustomEvent<T> extends CustomEvent<T> {
1014
1073
  detail: T;
1015
1074
  target: HTMLJustifiBusinessBankAccountFormStepElement;
@@ -1138,6 +1197,10 @@ export interface JustifiPayoutsListCustomEvent<T> extends CustomEvent<T> {
1138
1197
  detail: T;
1139
1198
  target: HTMLJustifiPayoutsListElement;
1140
1199
  }
1200
+ export interface JustifiPlaidPaymentMethodCustomEvent<T> extends CustomEvent<T> {
1201
+ detail: T;
1202
+ target: HTMLJustifiPlaidPaymentMethodElement;
1203
+ }
1141
1204
  export interface JustifiRadioListItemCustomEvent<T> extends CustomEvent<T> {
1142
1205
  detail: T;
1143
1206
  target: HTMLJustifiRadioListItemElement;
@@ -1625,6 +1688,31 @@ declare global {
1625
1688
  prototype: HTMLJustifiAdditionalStatementElement;
1626
1689
  new (): HTMLJustifiAdditionalStatementElement;
1627
1690
  };
1691
+ interface HTMLJustifiApplePayElementEventMap {
1692
+ "applePayStarted": void;
1693
+ "applePayCompleted": {
1694
+ success: boolean;
1695
+ token?: IApplePayToken;
1696
+ paymentMethodId?: string;
1697
+ error?: any;
1698
+ };
1699
+ "applePayCancelled": void;
1700
+ "applePayError": { error: string };
1701
+ }
1702
+ interface HTMLJustifiApplePayElement extends Components.JustifiApplePay, HTMLStencilElement {
1703
+ addEventListener<K extends keyof HTMLJustifiApplePayElementEventMap>(type: K, listener: (this: HTMLJustifiApplePayElement, ev: JustifiApplePayCustomEvent<HTMLJustifiApplePayElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
1704
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1705
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
1706
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
1707
+ removeEventListener<K extends keyof HTMLJustifiApplePayElementEventMap>(type: K, listener: (this: HTMLJustifiApplePayElement, ev: JustifiApplePayCustomEvent<HTMLJustifiApplePayElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
1708
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1709
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
1710
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
1711
+ }
1712
+ var HTMLJustifiApplePayElement: {
1713
+ prototype: HTMLJustifiApplePayElement;
1714
+ new (): HTMLJustifiApplePayElement;
1715
+ };
1628
1716
  interface HTMLJustifiBankAccountBillingFormSimpleElement extends Components.JustifiBankAccountBillingFormSimple, HTMLStencilElement {
1629
1717
  }
1630
1718
  var HTMLJustifiBankAccountBillingFormSimpleElement: {
@@ -2139,7 +2227,7 @@ declare global {
2139
2227
  interface HTMLJustifiModularCheckoutElementEventMap {
2140
2228
  "error-event": any;
2141
2229
  "submit-event": any;
2142
- "payment-method-changed": string;
2230
+ "checkout-changed": CheckoutChangedEventDetail;
2143
2231
  }
2144
2232
  interface HTMLJustifiModularCheckoutElement extends Components.JustifiModularCheckout, HTMLStencilElement {
2145
2233
  addEventListener<K extends keyof HTMLJustifiModularCheckoutElementEventMap>(type: K, listener: (this: HTMLJustifiModularCheckoutElement, ev: JustifiModularCheckoutCustomEvent<HTMLJustifiModularCheckoutElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
@@ -2354,6 +2442,25 @@ declare global {
2354
2442
  prototype: HTMLJustifiPayoutsListFiltersElement;
2355
2443
  new (): HTMLJustifiPayoutsListFiltersElement;
2356
2444
  };
2445
+ interface HTMLJustifiPlaidPaymentMethodElementEventMap {
2446
+ "paymentMethodOptionSelected": any;
2447
+ "plaidError": any;
2448
+ "plaidErrorRecovered": any;
2449
+ }
2450
+ interface HTMLJustifiPlaidPaymentMethodElement extends Components.JustifiPlaidPaymentMethod, HTMLStencilElement {
2451
+ addEventListener<K extends keyof HTMLJustifiPlaidPaymentMethodElementEventMap>(type: K, listener: (this: HTMLJustifiPlaidPaymentMethodElement, ev: JustifiPlaidPaymentMethodCustomEvent<HTMLJustifiPlaidPaymentMethodElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
2452
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2453
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
2454
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
2455
+ removeEventListener<K extends keyof HTMLJustifiPlaidPaymentMethodElementEventMap>(type: K, listener: (this: HTMLJustifiPlaidPaymentMethodElement, ev: JustifiPlaidPaymentMethodCustomEvent<HTMLJustifiPlaidPaymentMethodElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
2456
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2457
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
2458
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
2459
+ }
2460
+ var HTMLJustifiPlaidPaymentMethodElement: {
2461
+ prototype: HTMLJustifiPlaidPaymentMethodElement;
2462
+ new (): HTMLJustifiPlaidPaymentMethodElement;
2463
+ };
2357
2464
  interface HTMLJustifiProductOrServiceElement extends Components.JustifiProductOrService, HTMLStencilElement {
2358
2465
  }
2359
2466
  var HTMLJustifiProductOrServiceElement: {
@@ -2770,6 +2877,7 @@ declare global {
2770
2877
  "justifi-additional-questions-form-step": HTMLJustifiAdditionalQuestionsFormStepElement;
2771
2878
  "justifi-additional-questions-form-step-core": HTMLJustifiAdditionalQuestionsFormStepCoreElement;
2772
2879
  "justifi-additional-statement": HTMLJustifiAdditionalStatementElement;
2880
+ "justifi-apple-pay": HTMLJustifiApplePayElement;
2773
2881
  "justifi-bank-account-billing-form-simple": HTMLJustifiBankAccountBillingFormSimpleElement;
2774
2882
  "justifi-bank-account-form": HTMLJustifiBankAccountFormElement;
2775
2883
  "justifi-billing-form": HTMLJustifiBillingFormElement;
@@ -2827,6 +2935,7 @@ declare global {
2827
2935
  "justifi-payout-transactions-list": HTMLJustifiPayoutTransactionsListElement;
2828
2936
  "justifi-payouts-list": HTMLJustifiPayoutsListElement;
2829
2937
  "justifi-payouts-list-filters": HTMLJustifiPayoutsListFiltersElement;
2938
+ "justifi-plaid-payment-method": HTMLJustifiPlaidPaymentMethodElement;
2830
2939
  "justifi-product-or-service": HTMLJustifiProductOrServiceElement;
2831
2940
  "justifi-radio-list-item": HTMLJustifiRadioListItemElement;
2832
2941
  "justifi-refund-payment": HTMLJustifiRefundPaymentElement;
@@ -3043,7 +3152,7 @@ declare namespace LocalJSX {
3043
3152
  "errorText"?: string;
3044
3153
  "helpText"?: string;
3045
3154
  "inputHandler"?: (name: string, value: string) => void;
3046
- "label"?: string;
3155
+ "label"?: any;
3047
3156
  "name"?: any;
3048
3157
  "onFormControlBlur"?: (event: FormControlRadioCustomEvent<any>) => void;
3049
3158
  "onFormControlInput"?: (event: FormControlRadioCustomEvent<any>) => void;
@@ -3126,6 +3235,49 @@ declare namespace LocalJSX {
3126
3235
  */
3127
3236
  "documentErrors"?: any;
3128
3237
  }
3238
+ interface JustifiApplePay {
3239
+ /**
3240
+ * @default ApplePayButtonStyle.BLACK
3241
+ */
3242
+ "buttonStyle"?: ApplePayButtonStyle;
3243
+ /**
3244
+ * @default ApplePayButtonType.PLAIN
3245
+ */
3246
+ "buttonType"?: ApplePayButtonType;
3247
+ /**
3248
+ * @default "US"
3249
+ */
3250
+ "countryCode"?: string;
3251
+ /**
3252
+ * @default false
3253
+ */
3254
+ "disabled"?: boolean;
3255
+ /**
3256
+ * @default "dev-checkout.justifi-staging.com"
3257
+ */
3258
+ "initiativeContext"?: string;
3259
+ /**
3260
+ * @default "JustiFi Checkout"
3261
+ */
3262
+ "merchantDisplayName"?: string;
3263
+ /**
3264
+ * @default "merchant.com.staging-justifi.checkout-dev"
3265
+ */
3266
+ "merchantIdentifier"?: string;
3267
+ "onApplePayCancelled"?: (event: JustifiApplePayCustomEvent<void>) => void;
3268
+ "onApplePayCompleted"?: (event: JustifiApplePayCustomEvent<{
3269
+ success: boolean;
3270
+ token?: IApplePayToken;
3271
+ paymentMethodId?: string;
3272
+ error?: any;
3273
+ }>) => void;
3274
+ "onApplePayError"?: (event: JustifiApplePayCustomEvent<{ error: string }>) => void;
3275
+ "onApplePayStarted"?: (event: JustifiApplePayCustomEvent<void>) => void;
3276
+ /**
3277
+ * @default true
3278
+ */
3279
+ "showSkeleton"?: boolean;
3280
+ }
3129
3281
  interface JustifiBankAccountBillingFormSimple {
3130
3282
  "legend"?: string;
3131
3283
  }
@@ -3455,8 +3607,8 @@ declare namespace LocalJSX {
3455
3607
  interface JustifiModularCheckout {
3456
3608
  "authToken"?: string;
3457
3609
  "checkoutId"?: string;
3610
+ "onCheckout-changed"?: (event: JustifiModularCheckoutCustomEvent<CheckoutChangedEventDetail>) => void;
3458
3611
  "onError-event"?: (event: JustifiModularCheckoutCustomEvent<any>) => void;
3459
- "onPayment-method-changed"?: (event: JustifiModularCheckoutCustomEvent<string>) => void;
3460
3612
  "onSubmit-event"?: (event: JustifiModularCheckoutCustomEvent<any>) => void;
3461
3613
  /**
3462
3614
  * @default false
@@ -3593,6 +3745,11 @@ declare namespace LocalJSX {
3593
3745
  "createdAfter"?: string;
3594
3746
  "createdBefore"?: string;
3595
3747
  }
3748
+ interface JustifiPlaidPaymentMethod {
3749
+ "onPaymentMethodOptionSelected"?: (event: JustifiPlaidPaymentMethodCustomEvent<any>) => void;
3750
+ "onPlaidError"?: (event: JustifiPlaidPaymentMethodCustomEvent<any>) => void;
3751
+ "onPlaidErrorRecovered"?: (event: JustifiPlaidPaymentMethodCustomEvent<any>) => void;
3752
+ }
3596
3753
  interface JustifiProductOrService {
3597
3754
  "disputeResponse"?: any;
3598
3755
  /**
@@ -3610,7 +3767,7 @@ declare namespace LocalJSX {
3610
3767
  * @default false
3611
3768
  */
3612
3769
  "hidden"?: boolean;
3613
- "label": string;
3770
+ "label": any;
3614
3771
  "name": string;
3615
3772
  "onRadio-click"?: (event: JustifiRadioListItemCustomEvent<string>) => void;
3616
3773
  "value": string;
@@ -3852,6 +4009,7 @@ declare namespace LocalJSX {
3852
4009
  "justifi-additional-questions-form-step": JustifiAdditionalQuestionsFormStep;
3853
4010
  "justifi-additional-questions-form-step-core": JustifiAdditionalQuestionsFormStepCore;
3854
4011
  "justifi-additional-statement": JustifiAdditionalStatement;
4012
+ "justifi-apple-pay": JustifiApplePay;
3855
4013
  "justifi-bank-account-billing-form-simple": JustifiBankAccountBillingFormSimple;
3856
4014
  "justifi-bank-account-form": JustifiBankAccountForm;
3857
4015
  "justifi-billing-form": JustifiBillingForm;
@@ -3909,6 +4067,7 @@ declare namespace LocalJSX {
3909
4067
  "justifi-payout-transactions-list": JustifiPayoutTransactionsList;
3910
4068
  "justifi-payouts-list": JustifiPayoutsList;
3911
4069
  "justifi-payouts-list-filters": JustifiPayoutsListFilters;
4070
+ "justifi-plaid-payment-method": JustifiPlaidPaymentMethod;
3912
4071
  "justifi-product-or-service": JustifiProductOrService;
3913
4072
  "justifi-radio-list-item": JustifiRadioListItem;
3914
4073
  "justifi-refund-payment": JustifiRefundPayment;
@@ -3978,6 +4137,7 @@ declare module "@stencil/core" {
3978
4137
  "justifi-additional-questions-form-step": LocalJSX.JustifiAdditionalQuestionsFormStep & JSXBase.HTMLAttributes<HTMLJustifiAdditionalQuestionsFormStepElement>;
3979
4138
  "justifi-additional-questions-form-step-core": LocalJSX.JustifiAdditionalQuestionsFormStepCore & JSXBase.HTMLAttributes<HTMLJustifiAdditionalQuestionsFormStepCoreElement>;
3980
4139
  "justifi-additional-statement": LocalJSX.JustifiAdditionalStatement & JSXBase.HTMLAttributes<HTMLJustifiAdditionalStatementElement>;
4140
+ "justifi-apple-pay": LocalJSX.JustifiApplePay & JSXBase.HTMLAttributes<HTMLJustifiApplePayElement>;
3981
4141
  "justifi-bank-account-billing-form-simple": LocalJSX.JustifiBankAccountBillingFormSimple & JSXBase.HTMLAttributes<HTMLJustifiBankAccountBillingFormSimpleElement>;
3982
4142
  "justifi-bank-account-form": LocalJSX.JustifiBankAccountForm & JSXBase.HTMLAttributes<HTMLJustifiBankAccountFormElement>;
3983
4143
  "justifi-billing-form": LocalJSX.JustifiBillingForm & JSXBase.HTMLAttributes<HTMLJustifiBillingFormElement>;
@@ -4040,6 +4200,7 @@ declare module "@stencil/core" {
4040
4200
  "justifi-payout-transactions-list": LocalJSX.JustifiPayoutTransactionsList & JSXBase.HTMLAttributes<HTMLJustifiPayoutTransactionsListElement>;
4041
4201
  "justifi-payouts-list": LocalJSX.JustifiPayoutsList & JSXBase.HTMLAttributes<HTMLJustifiPayoutsListElement>;
4042
4202
  "justifi-payouts-list-filters": LocalJSX.JustifiPayoutsListFilters & JSXBase.HTMLAttributes<HTMLJustifiPayoutsListFiltersElement>;
4203
+ "justifi-plaid-payment-method": LocalJSX.JustifiPlaidPaymentMethod & JSXBase.HTMLAttributes<HTMLJustifiPlaidPaymentMethodElement>;
4043
4204
  "justifi-product-or-service": LocalJSX.JustifiProductOrService & JSXBase.HTMLAttributes<HTMLJustifiProductOrServiceElement>;
4044
4205
  "justifi-radio-list-item": LocalJSX.JustifiRadioListItem & JSXBase.HTMLAttributes<HTMLJustifiRadioListItemElement>;
4045
4206
  "justifi-refund-payment": LocalJSX.JustifiRefundPayment & JSXBase.HTMLAttributes<HTMLJustifiRefundPaymentElement>;
@@ -1 +1,3 @@
1
1
  export * from './components';
2
+ export { PAYMENT_METHODS } from './components/modular-checkout/ModularCheckout';
3
+ export type { CheckoutChangedEventDetail } from './components/modular-checkout/ModularCheckout';
@@ -1,27 +1,38 @@
1
- import { ICheckoutPaymentMethod } from '../api';
1
+ import { ICheckoutPaymentMethod, PaymentMethodTypes } from '../api';
2
2
  import { BillingFormFields } from '../components';
3
+ import { PAYMENT_METHODS } from '../components/modular-checkout/ModularCheckout';
3
4
  interface IInitialState {
4
5
  accountId: string;
5
6
  authToken: string;
6
7
  billingFormFields: BillingFormFields;
7
8
  bnplEnabled: boolean;
9
+ insuranceEnabled: boolean;
8
10
  bnplProviderApiVersion: string;
9
11
  bnplProviderCheckoutUrl: string;
10
12
  bnplProviderClientId: string;
11
13
  bnplProviderMode: string;
12
14
  checkoutId: string;
15
+ bankAccountVerification?: boolean;
13
16
  disableBankAccount: boolean;
14
17
  disableBnpl: boolean;
15
18
  disableCreditCard: boolean;
16
19
  disablePaymentMethodGroup: boolean;
17
20
  paymentAmount: number;
21
+ paymentCurrency: string;
18
22
  paymentDescription: string;
19
23
  paymentMethodGroupId: string | undefined;
20
24
  paymentMethods: ICheckoutPaymentMethod[];
21
25
  paymentToken?: string;
22
26
  savePaymentMethod: boolean;
23
- selectedPaymentMethod: string;
27
+ selectedPaymentMethod: ICheckoutPaymentMethod | {
28
+ type: PaymentMethodTypes;
29
+ };
24
30
  totalAmount: number;
25
31
  }
32
+ declare const initialState: IInitialState;
26
33
  declare const checkoutStore: IInitialState, onChange: import("@stencil/store/dist/types").OnChangeHandler<IInitialState>;
27
- export { checkoutStore, onChange };
34
+ export declare function getAvailablePaymentMethodTypes(): PAYMENT_METHODS[];
35
+ export declare function isNewCardSelected(): boolean;
36
+ export { checkoutStore as checkoutStore, onChange };
37
+ type StoreKey = keyof typeof initialState;
38
+ export declare function onAnyChange(callback: (key: StoreKey, value: (typeof initialState)[StoreKey]) => void): void;
@@ -0,0 +1,17 @@
1
+ import { FunctionalComponent } from "../stencil-public-runtime";
2
+ import { ApplePayButtonType, ApplePayButtonStyle } from "../api/ApplePay";
3
+ interface ApplePayButtonProps {
4
+ buttonType?: ApplePayButtonType;
5
+ buttonStyle?: ApplePayButtonStyle;
6
+ disabled?: boolean;
7
+ isProcessing?: boolean;
8
+ isAvailable?: boolean;
9
+ width?: string;
10
+ height?: string;
11
+ clickHandler?: () => void;
12
+ }
13
+ type ApplePayButtonElementProps = ApplePayButtonProps & {
14
+ [key: string]: any;
15
+ };
16
+ export declare const ApplePayButton: FunctionalComponent<ApplePayButtonElementProps>;
17
+ export {};
@@ -2,7 +2,7 @@ import { EventEmitter } from '../../stencil-public-runtime';
2
2
  export declare class RadioInput {
3
3
  radioElement: HTMLInputElement;
4
4
  isFocused: boolean;
5
- label: string;
5
+ label: any;
6
6
  name: any;
7
7
  value: string;
8
8
  helpText?: string;
@@ -2,7 +2,7 @@ import { EventEmitter } from "../../stencil-public-runtime";
2
2
  export declare class JustifiRadioListItem {
3
3
  name: string;
4
4
  value: string;
5
- label: string;
5
+ label: any;
6
6
  checked?: boolean;
7
7
  hidden?: boolean;
8
8
  class?: string;
@@ -30,4 +30,5 @@ export declare function addAttribute(htmlString: any, tagName: any, attribute: a
30
30
  export declare function processHTML(htmlString: any, functions: any): any;
31
31
  export declare function formatPhoneNumber(number: any): string;
32
32
  export declare function generateId(length?: number): string;
33
+ export declare function generateTabId(): string;
33
34
  export {};
@@ -0,0 +1 @@
1
+ export{P as PAYMENT_METHODS}from"./p-CbL73B6U.js";
@@ -0,0 +1 @@
1
+ import{h as s,r as t,c as i}from"./p-Bn7inNWG.js";import{A as e}from"./p-7s1gsXM5.js";import{C as r,a as o}from"./p-Cjcsf8ku.js";import"./p-Da3idOSV.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-D2muobcE.js";import{c,J as l}from"./p-DZYcH7jA.js";import{c as h}from"./p-DIjoBk44.js";import{p,f as d,r as u,i as v}from"./p-BHf9IqGw.js";import{v as m,i as f,a as y,H as j}from"./p-B71k50jz.js";import{z as _,A as g}from"./p-RvUQ__Pq.js";import{S as C}from"./p-DxqCFDtF.js";import"./p-CZfYo5-1.js";import{S as k}from"./p-CaAVuW6B.js";import"./p-DhGNCW2f.js";import"./p-CpaS1Lex.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-CnWtPu8L.js";import"./p-HXpYMWUU.js";import"./p-CbL73B6U.js";const b=e();class w{async fetchQuote(s,t){return b.post({endpoint:"insurance/quotes",body:t,authToken:s})}async toggleCoverage(s,t,i){return b.post({endpoint:`insurance/quotes/${t}/toggle`,body:i,authToken:s})}}const H=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(k,{width:"35%",height:"30px"})),s("div",{class:"col-12"},s(k,{width:"70%"})),s("div",{class:"col-12"},s(k,{width:"40%"})),s("div",{class:"col-12"},s(k,{width:"40%"})),s("div",{class:"col-12"},s(k,{width:"100%"})),s("div",{class:"col-12"},s(k,{width:"80%"}))),T=class{constructor(s){t(this,s),this.insuranceUpdated=i(this,"insurance-updated"),this.errorEvent=i(this,"error-event"),this.isLoading=!0}async validate(){return m()}processHTMLContent(s){return p(s,[s=>u(s,"style"),s=>v(s,"a","part",_),s=>v(s,"p","part",_)])}componentWillLoad(){c(),this.analytics=new l(this),this.initializeServiceMethods(),this.getQuote&&this.fetchData()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeServiceMethods(){const s=this.authToken||h.authToken;if(!s)return void this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:"Missing authToken",severity:r.ERROR});const t={authToken:s,service:new w};this.getQuote=(({authToken:s,service:t})=>async({payload:i,onSuccess:e,onError:o})=>{var c;try{const l=await t.fetchQuote(s,i);if(l.error)return o({error:n(l.error),code:a(null===(c=l.error)||void 0===c?void 0:c.code),severity:r.ERROR});e({quote:l.data})}catch(s){const t=a(null==s?void 0:s.code);return o({error:s.message||s,code:t,severity:r.ERROR})}})(t),this.toggleCoverage=(({authToken:s,service:t})=>async({quoteId:i,payload:e,onSuccess:o,onError:c})=>{var l;try{const h=await t.toggleCoverage(s,i,e);if(h.error)return c({error:n(h.error),code:a(null===(l=h.error)||void 0===l?void 0:l.code),severity:r.ERROR});o({quote:h.data})}catch(s){const t=a(null==s?void 0:s.code);return c({error:s.message||s,code:t,severity:r.ERROR})}})(t)}fetchData(){this.isLoading=!0,this.getQuote({payload:{checkout_id:this.checkoutId||h.checkoutId,policy_type:"season_interruption",primary_identity:{state:this.primaryIdentityState,email:this.primaryIdentityEmailAddress,first_name:this.primaryIdentityFirstName,last_name:this.primaryIdentityLastName,postal_code:this.primaryIdentityPostalCode,country:this.primaryIdentityCountry},policy_attributes:{insurable_amount:this.policyAttributesInsurableAmount,start_date:this.policyAttributesStartDate,end_date:this.policyAttributesEndDate,covered_identity:{first_name:this.coveredIdentityFirstName,last_name:this.coveredIdentityLastName}}},onSuccess:({quote:s})=>{this.quote=s,this.quote.product.description=this.processHTMLContent(this.quote.product.description),this.quote.product.legal_disclaimer=this.processHTMLContent(this.quote.product.legal_disclaimer),f[s.policy_type]=s.accepted,this.isLoading=!1},onError:({error:s,code:t,severity:i})=>{this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}onChangeHandler(s,t){this.accepted=t,y[this.quote.policy_type]=!1,this.toggleCoverage({quoteId:this.quote.id,payload:{accepted:this.accepted},onSuccess:()=>{this.insuranceUpdated.emit(),f[this.quote.policy_type]=this.accepted},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}get error(){var s;return y[null===(s=this.quote)||void 0===s?void 0:s.policy_type]}render(){var t,i,e,r;return h&&!1===h.insuranceEnabled?(console.warn("[justifi-season-interruption-insurance] Insurance is disabled for this checkout (payment_settings.insurance_payments=false)."),null):s(C,null,this.isLoading?s(H,null):s("div",null,s(j,{text:null===(t=this.quote)||void 0===t?void 0:t.product.title,class:"fs-5 fw-bold pb-3"}),s("small",{part:_,innerHTML:null===(i=this.quote)||void 0===i?void 0:i.product.description}),s("form-control-radio",{label:`Accept coverage for ${d(null===(e=this.quote)||void 0===e?void 0:e.total_cents)}`,name:"opt-in",value:"true",checked:"true"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("form-control-radio",{label:"Decline coverage",name:"opt-in",value:"false",checked:"false"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("div",{class:"invalid-feedback",style:{display:this.error?"block":"none"},part:g},"Please select an option"),s("small",{part:_,innerHTML:null===(r=this.quote)||void 0===r?void 0:r.product.legal_disclaimer})))}};export{T as justifi_season_interruption_insurance}
@@ -1 +1 @@
1
- import{h as t}from"./p-kpoIU4v_.js";import{B as e,a as i}from"./p-vRhNRfmB.js";import{R as a,S as n}from"./p-CfF8KKwx.js";import{e as r}from"./p-zdIeCUeh.js";const o="nickname,provider_serial_number,status",s={nickname:()=>t("th",{part:a,scope:"col",title:"The nickname associated with the terminal"},"Nickname"),model_name:()=>t("th",{part:a,scope:"col",title:"The model name of the terminal"},"Model Name"),id:()=>t("th",{part:a,scope:"col",title:"The ID of the terminal"},"ID"),provider:()=>t("th",{part:a,scope:"col",title:"The provider of the terminal"},"Provider"),provider_serial_number:()=>t("th",{part:a,scope:"col",title:"The serial number of the terminal"},"Serial Number"),device_id:()=>t("th",{part:a,scope:"col",title:"The device/provider ID of the terminal"},"Device ID"),sub_account_name:()=>t("th",{part:a,scope:"col",title:"The sub account associated with the terminal"},"Sub Account"),status:()=>t("th",{part:a,scope:"col",title:"The current status of each terminal"},"Status")},c={nickname:(e,i)=>t("td",{part:n(i)},e.nickname),model_name:(e,i)=>t("td",{part:n(i)},e.model_name),id:(e,i)=>t("td",{part:n(i)},e.id),provider:(e,i)=>t("td",{part:n(i)},r(e.provider)),provider_serial_number:(e,i)=>t("td",{part:n(i)},e.provider_serial_number),device_id:(e,i)=>t("td",{part:n(i)},e.provider_id),sub_account_name:(e,i)=>t("td",{part:n(i)},e.sub_account_name),status:(a,r)=>t("td",{part:n(r)},t(i,Object.assign({},{connected:{variant:e.SUCCESS,title:"This terminal is connected",text:"Connected"},disconnected:{variant:e.DANGER,title:"This terminal is disconnected",text:"Disconnected"},unknown:{variant:e.SECONDARY,title:"The status of this terminal is unknown",text:"Unknown"},pending_configuration:{variant:e.WARNING,title:"This terminal is pending configuration",text:"Pending configuration"}}[a.status])))};export{c as a,o as d,s as t}
1
+ import{h as t}from"./p-Bn7inNWG.js";import{B as e,a as i}from"./p-DDUmOl3v.js";import{N as a,O as n}from"./p-RvUQ__Pq.js";import{h as r}from"./p-BHf9IqGw.js";const o="nickname,provider_serial_number,status",s={nickname:()=>t("th",{part:a,scope:"col",title:"The nickname associated with the terminal"},"Nickname"),model_name:()=>t("th",{part:a,scope:"col",title:"The model name of the terminal"},"Model Name"),id:()=>t("th",{part:a,scope:"col",title:"The ID of the terminal"},"ID"),provider:()=>t("th",{part:a,scope:"col",title:"The provider of the terminal"},"Provider"),provider_serial_number:()=>t("th",{part:a,scope:"col",title:"The serial number of the terminal"},"Serial Number"),device_id:()=>t("th",{part:a,scope:"col",title:"The device/provider ID of the terminal"},"Device ID"),sub_account_name:()=>t("th",{part:a,scope:"col",title:"The sub account associated with the terminal"},"Sub Account"),status:()=>t("th",{part:a,scope:"col",title:"The current status of each terminal"},"Status")},c={nickname:(e,i)=>t("td",{part:n(i)},e.nickname),model_name:(e,i)=>t("td",{part:n(i)},e.model_name),id:(e,i)=>t("td",{part:n(i)},e.id),provider:(e,i)=>t("td",{part:n(i)},r(e.provider)),provider_serial_number:(e,i)=>t("td",{part:n(i)},e.provider_serial_number),device_id:(e,i)=>t("td",{part:n(i)},e.provider_id),sub_account_name:(e,i)=>t("td",{part:n(i)},e.sub_account_name),status:(a,r)=>t("td",{part:n(r)},t(i,Object.assign({},{connected:{variant:e.SUCCESS,title:"This terminal is connected",text:"Connected"},disconnected:{variant:e.DANGER,title:"This terminal is disconnected",text:"Disconnected"},unknown:{variant:e.SECONDARY,title:"The status of this terminal is unknown",text:"Unknown"},pending_configuration:{variant:e.WARNING,title:"This terminal is pending configuration",text:"Pending configuration"}}[a.status])))};export{c as a,o as d,s as t}
@@ -1 +1 @@
1
- import{h as e,r as t,c as a}from"./p-kpoIU4v_.js";import{d as s,b as i}from"./p-zdIeCUeh.js";import{a as d,b as c,D as f,c as r,C as o,E as l}from"./p-DO3INvI2.js";import{B as h}from"./p-JgbsbAhz.js";import{S as b}from"./p-CRFzwZW6.js";import"./p-CZfYo5-1.js";import{M as n}from"./p-BeszVz87.js";import{S as p}from"./p-BC8YDY7M.js";import{a as v,B as y}from"./p-vRhNRfmB.js";import"./p-HXpYMWUU.js";import"./p-CfF8KKwx.js";const u=()=>e("div",{class:"row gap-3"},e("div",{class:"col-12"},e(p,{width:"35%",height:"30px"})),e("div",{class:"col-12"},e(p,{width:"70%"})),e("div",{class:"col-12"},e(p,{width:"40%"})),e("div",{class:"col-12"},e(p,{width:"40%"})),e("div",{class:"col-12"},e(p,{width:"100%"})),e("div",{class:"col-12"},e(p,{width:"80%"}))),m=class{constructor(e){t(this,e),this.errorEvent=a(this,"error-event"),this.loading=!0,this.errorMessage=null,this.downloadCSV=()=>{this.getPayoutCSV({payoutId:this.payout.id,onError:({error:e,code:t,severity:a})=>{this.errorMessage=e,this.errorEvent.emit({message:e,errorCode:t,severity:a})}})}}componentWillLoad(){this.getPayout&&this.fetchData()}getPayoutWatcher(){this.fetchData()}fetchData(){this.loading=!0,this.getPayout({onSuccess:e=>{this.errorMessage=null,this.payout=e,this.loading=!1},onError:({error:e,code:t,severity:a})=>{this.errorMessage=e,this.errorEvent.emit({message:e,errorCode:t,severity:a}),this.loading=!1}})}render(){var t;return e(b,{key:"f8f7a846e1c82a2d90231060286e8d2a906e1988"},this.loading&&e(u,{key:"d626ef6861f8eba2235c0405e2229c75dc7972c6"}),!this.loading&&this.errorMessage&&l(this.errorMessage),!this.loading&&this.payout&&e("justifi-details",{key:"209795b172c2a5250726f56a767f8c1dc6e8723f","error-message":this.errorMessage},e(d,{key:"ab602bc00824f5364eb38366f5a11b7a9284eaad",slot:"head-info",badge:e("div",{class:"d-flex gap-1"},n(null===(t=this.payout)||void 0===t?void 0:t.status),e(v,"expedited"===this.payout.settlement_priority?{variant:y.WARNING,title:"Expedited",text:"Expedited"}:{variant:y.SECONDARY,title:"Standard",text:"Standard"})),title:this.payout.formattedPaymentAmount(this.payout.amount)},e(c,{key:"294f615d3eefd108719bd1c292b551cdf7c67b83",classes:"border-1 border-end",title:"Updated At",value:`${s(this.payout.updated_at)} ${i(this.payout.updated_at)}`}),e(c,{key:"eff8af7b09d32e5c61fe764de075f67857381600",classes:"border-1 border-end",title:"Created At",value:`${s(this.payout.created_at)} ${i(this.payout.created_at)}`}),e(c,{key:"d1a5d5c36fd9a7a3e4a959d890b157e224e24277",title:"ID",value:this.payout.id}),e("div",{key:"9a0b3ac70bbe2290ec3aebf83ca4037fabbd41a4",class:"m-4"},e(h,{key:"e50464088db095e913cc176fbc752576faf1e483",variant:"secondary",class:"btn btn-outline-secondary d-flex align-items-center",onClick:this.downloadCSV},"Export CSV"))),e("div",{key:"c1ac03ad58a631076be03f0bc152ccb71c96dd3f",slot:"detail-sections"},e(f,{key:"23168d82b011053fdde169653b9d38e9afd20ca8",sectionTitle:"Details"}),e("div",{key:"a0d48c1064dacd030dfbdb038f7f7916216120e1",class:"d-table gap-2 w-100"},e(r,{key:"669f79459362f38d9a8e6d5b62cf7729749fe025",title:"Date paid",value:s(this.payout.deposits_at)}),e(r,{key:"31c91b0e512789303456bfb2eb177d4e88009ea9",title:"Statement Description",value:this.payout.description}),e(r,{key:"d168b4c88d22850d35f57775fed8d2fd35ce2593",title:"Payout Method",value:this.payout.delivery_method}),e(r,{key:"a17172ea263334a99136495c3b93534b6e913c92",title:"Amount",value:this.payout.formattedPaymentAmount(this.payout.amount)}),e(r,{key:"f896659044741ac90391795322f7da5f46ea347e",title:"Fee",value:this.payout.formattedPaymentAmount(this.payout.fees_total)})),e(f,{key:"9acf299858e138e1774375f747cca3ce07d40a62",sectionTitle:"Account"}),e("div",{key:"bd65f987d50082c875952f426ac233c3d7d7033b",class:"d-table gap-2 w-100"},e(r,{key:"89420940ff25dfa0cd5f74fdcaebb2e7d332881a",title:"ID",value:this.payout.account_id}),e(r,{key:"5283b7c63a70458185fdf9280af31b15023c983a",title:"Account Type",value:this.payout.bank_account.account_type}),e(r,{key:"14e79f73210ac1e7c8542e3b5de9085b1ee21993",title:"Institution",value:this.payout.bank_account.account_type}),e(r,{key:"f2dbc9f4279068e9cd5f4e6c623e8d30468ff5cc",title:"Routing Number",value:this.payout.bank_account.routing_number}),e(r,{key:"8cf9051da522924f6134d9aa3eb5f49f0f91cb61",title:"Account Number",value:this.payout.bank_account.account_number_last4})),this.payout.metadata&&[e(f,{key:"8117a4636c6d41a0137bfd58c80eb4cfaa521627",sectionTitle:"Metadata"}),e("div",{key:"91ecdff8221e907542e7d026e354c78bdd577dd2",class:"d-table gap-2 w-100"},e(o,{key:"a1a8d86e784eadf48af99f6576f67f37b9b7d585",metadata:this.payout.metadata}))])))}static get watchers(){return{getPayout:["getPayoutWatcher"]}}};export{m as payout_details_core}
1
+ import{h as e,r as t,c as a}from"./p-Bn7inNWG.js";import{e as s,d as i}from"./p-BHf9IqGw.js";import{a as d,b as c,D as f,c as r,C as o,E as l}from"./p-DNo0OPOP.js";import{B as h}from"./p-DD0Mvpeu.js";import{S as b}from"./p-DxqCFDtF.js";import"./p-CZfYo5-1.js";import{M as n}from"./p-C5id7s_l.js";import{S as p}from"./p-CaAVuW6B.js";import{a as v,B as y}from"./p-DDUmOl3v.js";import"./p-HXpYMWUU.js";import"./p-RvUQ__Pq.js";const u=()=>e("div",{class:"row gap-3"},e("div",{class:"col-12"},e(p,{width:"35%",height:"30px"})),e("div",{class:"col-12"},e(p,{width:"70%"})),e("div",{class:"col-12"},e(p,{width:"40%"})),e("div",{class:"col-12"},e(p,{width:"40%"})),e("div",{class:"col-12"},e(p,{width:"100%"})),e("div",{class:"col-12"},e(p,{width:"80%"}))),m=class{constructor(e){t(this,e),this.errorEvent=a(this,"error-event"),this.loading=!0,this.errorMessage=null,this.downloadCSV=()=>{this.getPayoutCSV({payoutId:this.payout.id,onError:({error:e,code:t,severity:a})=>{this.errorMessage=e,this.errorEvent.emit({message:e,errorCode:t,severity:a})}})}}componentWillLoad(){this.getPayout&&this.fetchData()}getPayoutWatcher(){this.fetchData()}fetchData(){this.loading=!0,this.getPayout({onSuccess:e=>{this.errorMessage=null,this.payout=e,this.loading=!1},onError:({error:e,code:t,severity:a})=>{this.errorMessage=e,this.errorEvent.emit({message:e,errorCode:t,severity:a}),this.loading=!1}})}render(){var t;return e(b,{key:"f8f7a846e1c82a2d90231060286e8d2a906e1988"},this.loading&&e(u,{key:"d626ef6861f8eba2235c0405e2229c75dc7972c6"}),!this.loading&&this.errorMessage&&l(this.errorMessage),!this.loading&&this.payout&&e("justifi-details",{key:"209795b172c2a5250726f56a767f8c1dc6e8723f","error-message":this.errorMessage},e(d,{key:"ab602bc00824f5364eb38366f5a11b7a9284eaad",slot:"head-info",badge:e("div",{class:"d-flex gap-1"},n(null===(t=this.payout)||void 0===t?void 0:t.status),e(v,"expedited"===this.payout.settlement_priority?{variant:y.WARNING,title:"Expedited",text:"Expedited"}:{variant:y.SECONDARY,title:"Standard",text:"Standard"})),title:this.payout.formattedPaymentAmount(this.payout.amount)},e(c,{key:"294f615d3eefd108719bd1c292b551cdf7c67b83",classes:"border-1 border-end",title:"Updated At",value:`${s(this.payout.updated_at)} ${i(this.payout.updated_at)}`}),e(c,{key:"eff8af7b09d32e5c61fe764de075f67857381600",classes:"border-1 border-end",title:"Created At",value:`${s(this.payout.created_at)} ${i(this.payout.created_at)}`}),e(c,{key:"d1a5d5c36fd9a7a3e4a959d890b157e224e24277",title:"ID",value:this.payout.id}),e("div",{key:"9a0b3ac70bbe2290ec3aebf83ca4037fabbd41a4",class:"m-4"},e(h,{key:"e50464088db095e913cc176fbc752576faf1e483",variant:"secondary",class:"btn btn-outline-secondary d-flex align-items-center",onClick:this.downloadCSV},"Export CSV"))),e("div",{key:"c1ac03ad58a631076be03f0bc152ccb71c96dd3f",slot:"detail-sections"},e(f,{key:"23168d82b011053fdde169653b9d38e9afd20ca8",sectionTitle:"Details"}),e("div",{key:"a0d48c1064dacd030dfbdb038f7f7916216120e1",class:"d-table gap-2 w-100"},e(r,{key:"669f79459362f38d9a8e6d5b62cf7729749fe025",title:"Date paid",value:s(this.payout.deposits_at)}),e(r,{key:"31c91b0e512789303456bfb2eb177d4e88009ea9",title:"Statement Description",value:this.payout.description}),e(r,{key:"d168b4c88d22850d35f57775fed8d2fd35ce2593",title:"Payout Method",value:this.payout.delivery_method}),e(r,{key:"a17172ea263334a99136495c3b93534b6e913c92",title:"Amount",value:this.payout.formattedPaymentAmount(this.payout.amount)}),e(r,{key:"f896659044741ac90391795322f7da5f46ea347e",title:"Fee",value:this.payout.formattedPaymentAmount(this.payout.fees_total)})),e(f,{key:"9acf299858e138e1774375f747cca3ce07d40a62",sectionTitle:"Account"}),e("div",{key:"bd65f987d50082c875952f426ac233c3d7d7033b",class:"d-table gap-2 w-100"},e(r,{key:"89420940ff25dfa0cd5f74fdcaebb2e7d332881a",title:"ID",value:this.payout.account_id}),e(r,{key:"5283b7c63a70458185fdf9280af31b15023c983a",title:"Account Type",value:this.payout.bank_account.account_type}),e(r,{key:"14e79f73210ac1e7c8542e3b5de9085b1ee21993",title:"Institution",value:this.payout.bank_account.account_type}),e(r,{key:"f2dbc9f4279068e9cd5f4e6c623e8d30468ff5cc",title:"Routing Number",value:this.payout.bank_account.routing_number}),e(r,{key:"8cf9051da522924f6134d9aa3eb5f49f0f91cb61",title:"Account Number",value:this.payout.bank_account.account_number_last4})),this.payout.metadata&&[e(f,{key:"8117a4636c6d41a0137bfd58c80eb4cfaa521627",sectionTitle:"Metadata"}),e("div",{key:"91ecdff8221e907542e7d026e354c78bdd577dd2",class:"d-table gap-2 w-100"},e(o,{key:"a1a8d86e784eadf48af99f6576f67f37b9b7d585",metadata:this.payout.metadata}))])))}static get watchers(){return{getPayout:["getPayoutWatcher"]}}};export{m as payout_details_core}
@@ -0,0 +1 @@
1
+ import{r as a,h as e}from"./p-Bn7inNWG.js";import{l as t}from"./p-Bde7dY9t.js";import{f as s,p as i,c as r}from"./p-sw5RO19U.js";import{P as l,Q as p,R as d,S as o}from"./p-RvUQ__Pq.js";import{S as c}from"./p-DxqCFDtF.js";import"./p-CZfYo5-1.js";import"./p-DhGNCW2f.js";import"./p-HXpYMWUU.js";import"./p-Cjcsf8ku.js";import{d as b}from"./p-Da3idOSV.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import"./p-BFTU3MAI.js";import"./p-CpaS1Lex.js";import"./p-BHf9IqGw.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const n=class{constructor(e){a(this,e),this.setParamsOnChange=(a,e)=>{s[a]=e}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({terminal_id:this.terminalId,status:this.terminalStatus,terminal_order_id:this.terminalOrderId}).forEach((([a,e])=>{e&&(i[a]=e)}))}get terminalStatusOptions(){return[{label:"All",value:""},{label:"Connected",value:b.connected},{label:"Disconnected",value:b.disconnected},{label:"Unknown",value:b.unknown},{label:"Pending Configuration",value:b.pending_configuration}]}render(){const a=Object.assign({},s);return e(c,{key:"b171691b2dd20e57f132d83f6857d15bfda36ea1"},e("table-filters-menu",{key:"458e8a032f475812a7cc77ecfc2af6ba0e4b8398",params:a,clearParams:r,part:l},e("div",{key:"dc1953cae02eded40a0e8351aa2d3b25f1105486",class:"grid-cols-2 gap-3 p-1"},e("div",{key:"f676f3b75ee02a0a1db4b8b95ba6c01cbcd00cb4",class:"p-2"},e("form-control-text",{key:"8f00314bc11246b6006d682830155fd931adf1b6",name:"terminal_id",label:"Terminal ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalId||s.terminal_id,disabled:!!this.terminalId,part:p})),e("div",{key:"bf6704c3b84fd825c925bc212c8f76b2d6c0a3c3",class:"p-2"},e("form-control-text",{key:"24b7ef636136f749a44d927752d54110508c5986",name:"terminal_order_id",label:"Terminal Order ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalOrderId||s.terminal_order_id,disabled:!!this.terminalOrderId,part:d})),e("div",{key:"0c1bd807a3ca0e9a0d5bf182f4f48e6bbc78201e",class:"p-2"},e("form-control-select",{key:"bf9f459cbda08eabb9c6bbbb6c8c4cd82ce753b5",name:"status",label:"Status",options:this.terminalStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.terminalStatus||s.status,disabled:!!this.terminalStatus,part:o})))))}};export{n as justifi_terminals_list_filters}
@@ -1 +1 @@
1
- import{r,c as s,h as t}from"./p-kpoIU4v_.js";import{S as i}from"./p-CRFzwZW6.js";import"./p-CZfYo5-1.js";import{c as o,J as e}from"./p-BNz6wy4f.js";import{d as a}from"./p-BTkXk7ol.js";import"./p-9y5MOK55.js";import"./p-HXpYMWUU.js";import{C as n,a as p}from"./p-Cjcsf8ku.js";import{h as c}from"./p-WEguiGt1.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as m,a as d}from"./p-D2muobcE.js";import{A as h}from"./p-I8XpD1TX.js";import"./p-O3LY2Da6.js";import"./p-CfF8KKwx.js";import"./p-zdIeCUeh.js";import"./p-vRhNRfmB.js";import"./p-7WIgS5RM.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const l=h();class u{async fetchTerminalOrders(r,s,t){return l.get({endpoint:"terminals/orders",params:t,headers:{account:r},authToken:s})}}const j=class{constructor(t){r(this,t),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=a,this.handleErrorEvent=r=>{this.errorMessage=r.detail.message,this.errorEvent.emit(r.detail)}}componentWillLoad(){o(),this.analytics=new e(this),this.initializeGetData()}disconnectedCallback(){var r;null===(r=this.analytics)||void 0===r||r.cleanup()}initializeGetData(){this.accountId&&this.authToken?this.getTerminalOrders=(({id:r,authToken:s,service:t})=>async({params:i,onSuccess:o,onError:e,final:a})=>{var p,h;try{const a=await t.fetchTerminalOrders(r,s,i);if(a.error)return e({error:d(a.error),code:m(null===(h=a.error)||void 0===h?void 0:h.code),severity:n.ERROR});{const r=Object.assign({},a.page_info);o({terminalOrders:(null===(p=a.data)||void 0===p?void 0:p.map((r=>new c(r))))||[],pagingInfo:r})}}catch(r){const s=m(null==r?void 0:r.code);return e({error:r.message||r,code:s,severity:n.ERROR})}finally{return a()}})({id:this.accountId,authToken:this.authToken,service:new u}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:p.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return t(i,{key:"770ec45855c3d0034eb5a09db38a31cdfcc6227c"},t("terminal-orders-list-core",{key:"53a96754ad9de85d99c1a299212d74925539d193",getTerminalOrders:this.getTerminalOrders,"onError-event":this.handleErrorEvent,columns:this.columns}))}};export{j as justifi_terminal_orders_list}
1
+ import{r,c as s,h as t}from"./p-Bn7inNWG.js";import{S as i}from"./p-DxqCFDtF.js";import"./p-CZfYo5-1.js";import{c as e,J as o}from"./p-DZYcH7jA.js";import{d as a}from"./p-DRXvcLy9.js";import"./p-DhGNCW2f.js";import"./p-HXpYMWUU.js";import{C as n,a as p}from"./p-Cjcsf8ku.js";import{i as c}from"./p-Da3idOSV.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as m,a as d}from"./p-D2muobcE.js";import{A as h}from"./p-7s1gsXM5.js";import"./p-CnWtPu8L.js";import"./p-RvUQ__Pq.js";import"./p-BHf9IqGw.js";import"./p-DDUmOl3v.js";import"./p-CpaS1Lex.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const l=h();class u{async fetchTerminalOrders(r,s,t){return l.get({endpoint:"terminals/orders",params:t,headers:{account:r},authToken:s})}}const j=class{constructor(t){r(this,t),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=a,this.handleErrorEvent=r=>{this.errorMessage=r.detail.message,this.errorEvent.emit(r.detail)}}componentWillLoad(){e(),this.analytics=new o(this),this.initializeGetData()}disconnectedCallback(){var r;null===(r=this.analytics)||void 0===r||r.cleanup()}initializeGetData(){this.accountId&&this.authToken?this.getTerminalOrders=(({id:r,authToken:s,service:t})=>async({params:i,onSuccess:e,onError:o,final:a})=>{var p,h;try{const a=await t.fetchTerminalOrders(r,s,i);if(a.error)return o({error:d(a.error),code:m(null===(h=a.error)||void 0===h?void 0:h.code),severity:n.ERROR});{const r=Object.assign({},a.page_info);e({terminalOrders:(null===(p=a.data)||void 0===p?void 0:p.map((r=>new c(r))))||[],pagingInfo:r})}}catch(r){const s=m(null==r?void 0:r.code);return o({error:r.message||r,code:s,severity:n.ERROR})}finally{return a()}})({id:this.accountId,authToken:this.authToken,service:new u}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:p.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return t(i,{key:"770ec45855c3d0034eb5a09db38a31cdfcc6227c"},t("terminal-orders-list-core",{key:"53a96754ad9de85d99c1a299212d74925539d193",getTerminalOrders:this.getTerminalOrders,"onError-event":this.handleErrorEvent,columns:this.columns}))}};export{j as justifi_terminal_orders_list}
@@ -0,0 +1 @@
1
+ import{h as i,r as s,c as t}from"./p-Bn7inNWG.js";import{al as e,ai as r,ae as o,z as l}from"./p-RvUQ__Pq.js";import{S as d}from"./p-DxqCFDtF.js";import"./p-CZfYo5-1.js";import{c as n,J as a}from"./p-DZYcH7jA.js";import{C as h,a as c}from"./p-Cjcsf8ku.js";import{B as u}from"./p-Cb0FhuyU.js";import{B as v}from"./p-BlJnA265.js";import{m as p}from"./p-DH8F0bsw.js";import{S as m}from"./p-CaAVuW6B.js";import"./p-DhGNCW2f.js";import"./p-HXpYMWUU.js";import{j as f,i as w,c as b}from"./p-Da3idOSV.js";import"./p-CLHwhyvu.js";import"./p-BH0Xfn-F.js";import{g as j,a as x}from"./p-D2muobcE.js";import{T as g}from"./p-Wh1V0gvF.js";import{k as y}from"./p-BHf9IqGw.js";import"./p-CnWtPu8L.js";import"./p-7s1gsXM5.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-CpaS1Lex.js";const C=()=>i("div",{class:"row gap-3"},i("div",{class:"col-12"},i(m,{width:"25%"})),i("div",{class:"col-12"},i(m,{width:"100%"})),i("div",{class:"col-12 d-flex gap-3"},i(m,{width:"50%"}),i(m,{width:"50%"})),i("div",{class:"col-12 d-flex gap-3"},i(m,{width:"65%"}),i(m,{width:"35%"}))),S=()=>i("div",{class:"row gap-5"},i("div",{class:"col-12"},i(m,{width:"40%",height:"40px"})),i(C,null)),k=()=>i("div",{class:"terminal-selector-skeleton mt-4 rounded shadow-sm"},i("div",{class:"d-flex align-items-center gap-3"},i(m,{width:"125px",height:"125px",styles:{borderRadius:"8px"}}),i("div",{class:"flex-grow-1"},i("div",{class:"d-flex row flex-row"},i("div",{class:"col-6 flex-column"},i(m,null),i(m,{width:"60%"})),i("div",{class:"d-flex justify-content-end align-items-center gap-2 col-6"},i(m,{width:"32px",height:"32px",styles:{borderRadius:"50%"}}),i(m,{width:"80px",height:"32px"}),i(m,{width:"32px",height:"32px",styles:{borderRadius:"50%"}}))),i("div",{class:"mt-4"},i("div",{class:"d-flex flex-column gap-2"},i(m,null),i(m,null)))))),B=class{constructor(i){s(this,i),this.errorEvent=t(this,"error-event"),this.submitted=t(this,"submit-event"),this.shipping=!1,this.submitButtonText="Submit Order",this.loading={business:!0,terminals:!0},this.submitting=!1,this.error=null,this.totalQuantity=0}componentWillLoad(){this.order=new w({business_id:this.businessId,sub_account_id:this.accountId,order_type:this.shipping?b.boardingShipping:b.boardingOnly}),n(),this.analytics=new a(this),this.loadData()}disconnectedCallback(){var i;null===(i=this.analytics)||void 0===i||i.cleanup()}handleError(i,s,t){this.error={message:i,code:s,severity:t},this.errorEvent.emit({errorCode:s,message:i,severity:t})}loadData(){this.businessId&&this.authToken?(this.initializeGetBusiness(),this.initializeGetTerminalModels()):this.handleError("Invalid business id or auth token",c.MISSING_PROPS,h.ERROR)}initializeGetBusiness(){p({id:this.businessId,authToken:this.authToken,service:new u})({onSuccess:({business:i})=>{this.business=new v(i),this.loading.business=!1},onError:({error:i,code:s,severity:t})=>{this.handleError(i,s,t),this.loading.business=!1}})}initializeGetTerminalModels(){(({id:i,authToken:s,service:t})=>async({onSuccess:e,onError:r})=>{var o,l,d,n;try{const a=await t.fetchTerminalModels(i,s);if(a.error)return r({error:x(a.error),code:j(null===(n=a.error)||void 0===n?void 0:n.code),severity:h.ERROR});e({terminals:(null===(l=null===(o=a.data)||void 0===o?void 0:o.terminal_order_models)||void 0===l?void 0:l.map((i=>new f(i))))||[],orderLimit:null===(d=a.data)||void 0===d?void 0:d.order_limit})}catch(i){const s=j(null==i?void 0:i.code);return r({error:i.message||i,code:s,severity:h.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new g})({onSuccess:({terminals:i,orderLimit:s})=>{this.terminalModels=i,this.orderLimit=s,this.loading.terminals=!1},onError:({error:i,code:s,severity:t})=>{this.handleError(i,s,t),this.loading.terminals=!1}})}submitOrder(){const i=(({authToken:i,service:s,apiOrigin:t="https://wc-proxy.justifi.ai"})=>async({terminalOrder:e,onSuccess:r,onError:o})=>{var l;try{const d=await s.orderTerminals(i,e,t);if(d.error)return o({error:x(d.error),code:j(null===(l=d.error)||void 0===l?void 0:l.code),severity:h.ERROR});{const{data:i}=d;r({data:i})}}catch(i){const s=j(null==i?void 0:i.code);return o({error:i.message||i,code:s,severity:h.ERROR})}})({authToken:this.authToken,service:new g});this.submitting=!0,i({terminalOrder:this.order.payload,onSuccess:({data:i})=>{this.submitted.emit(i),this.submitting=!1},onError:({error:i,code:s,severity:t})=>{this.handleError(i,s,t),this.submitting=!1}})}onSelectedQuantityChange(i){this.order.updateTerminal(i.detail.modelName,i.detail.quantity),this.totalQuantity=this.order.totalQuantity}renderLoading(){return i("div",null,this.loading.business&&i(S,null),this.loading.terminals&&i("div",{class:"mt-5"},i(k,null),i(k,null),i(k,null)))}renderBusinessDetails(){var s,t,o,l,d,n,a,h;if(!this.loading.business&&this.business)return i("div",{class:"d-flex flex-column gap-4 mb-5 pt-5"},i("div",{class:"row"},i("div",{class:"col-12"},i("h2",{part:r},this.business.legal_name))),i("div",{class:"row"},i("div",{class:"col-6"},i("h5",{part:e},"Representative:"),i("div",null,i("div",null,null===(t=null===(s=this.business)||void 0===s?void 0:s.representative)||void 0===t?void 0:t.name),i("div",null,null===(l=null===(o=this.business)||void 0===o?void 0:o.representative)||void 0===l?void 0:l.title),i("div",null,null===(n=null===(d=this.business)||void 0===d?void 0:d.representative)||void 0===n?void 0:n.email),i("div",null,y(null===(h=null===(a=this.business)||void 0===a?void 0:a.representative)||void 0===h?void 0:h.phone)))),i("div",{class:"col-6"},i("h5",{part:e},this.shipping?"Shipping Address:":"Business Address:"),i("div",null,this.business.legal_address.line1,this.business.legal_address.line2?`, ${this.business.legal_address.line2}`:"",i("br",null),this.business.legal_address.city,", ",this.business.legal_address.state," ",this.business.legal_address.postal_code))))}renderTerminals(){if(!this.loading.terminals&&this.terminalModels)return i("div",{class:"d-flex flex-column gap-2 mt-5"},this.terminalModels.map((s=>i("terminal-quantity-selector",{modelName:s.model_name,description:s.description,imageUrl:s.image_url,helpUrl:s.help_url,limit:this.orderLimit-this.order.totalQuantity,onSelectedQuantityChange:this.onSelectedQuantityChange.bind(this)}))))}renderOrderSection(){return i("div",{class:"mt-3"},i("div",{class:"text-end"},"Order limit: ",this.orderLimit),i("div",{class:"d-flex justify-content-end mt-3"},i("button",{class:"btn btn-primary submit-btn",onClick:this.submitOrder.bind(this),disabled:0===this.order.totalQuantity||this.submitting,part:o},this.submitting?"Submitting...":this.submitButtonText)))}render(){return i(d,{key:"5171ddb7b807bf4084f0f831002803a4ece698f3"},i("div",{key:"529adf4549be8b2723fca357be3f541403dfc8a3",part:l},this.renderLoading(),this.renderBusinessDetails(),this.renderTerminals(),this.renderOrderSection()))}};export{B as justifi_order_terminals}
@@ -1 +1 @@
1
- import{h as t,r as s,c as e}from"./p-kpoIU4v_.js";import{c as r,a as i,F as o}from"./p-CR9D6mKt.js";import{f as n}from"./p-zdIeCUeh.js";import"./p-9y5MOK55.js";import{C as a,a as u}from"./p-Cjcsf8ku.js";import{R as l,j as m}from"./p-WEguiGt1.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{B as h}from"./p-JgbsbAhz.js";import{S as p}from"./p-CRFzwZW6.js";import"./p-CZfYo5-1.js";import{P as c}from"./p-Bb6FBEPP.js";import{m as d}from"./p-CLwzqWk2.js";import{c as f,J as j}from"./p-BNz6wy4f.js";import{g as v,a as y}from"./p-D2muobcE.js";import{A as b}from"./p-I8XpD1TX.js";import{S as w}from"./p-BC8YDY7M.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-7WIgS5RM.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-CfF8KKwx.js";import"./p-O3LY2Da6.js";const g=t=>{const s=+t;return i().required("Amount is required").test("max-amount",`Refund amount cannot be more than payment amount: ${n(s)}`,(function(t){return+t<=+s})).test("min-amount","Refund amount must be greater than 0",(function(t){return+t>0}))},C=t=>{if(t)return r({amount:g(t),description:i().optional(),reason:i().optional().oneOf([l.customerRequest,l.duplicate,l.fraudulent],"Select a reason")})},x=[{label:"Select a reason",value:""},{label:"Customer requested a refund",value:"customer_request"},{label:"Customer was double-charged",value:"duplicate"},{label:"Payment was reported as fraud",value:"fraudulent"}],A=b();class B{async postRefund(t,s,e,r){return A.post({endpoint:`payments/${t}/refunds`,headers:{"Sub-Account":s},body:r,authToken:e})}}const I=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(w,{width:"100%",height:"40px"}))),R=()=>t(p,null,t("div",{class:"row gap-5"},t(I,null),t(I,null),t(I,null))),k=class{constructor(t){s(this,t),this.errorEvent=e(this,"error-event"),this.submitEvent=e(this,"submit-event"),this.refundPayload={},this.displayAmount="",this.errors={},this.paymentLoading=!0,this.refundLoading=!1,this.hideSubmitButton=!1,this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}componentWillLoad(){f(),this.analytics=new j(this),this.initializeApi(),this.formController=new o(C())}handleError(t,s,e){this.errorEvent.emit({errorCode:t,message:s,severity:e})}checkAmount(t){return t>0}handleInvalidAmount(){this.submitDisabled=!0,this.handleError(u.INVALID_REFUND_AMOUNT,"Refund amount must be greater than 0",a.ERROR)}initializeFormController(){const t=this.refundPayload.amount,s=t?t.toString():"0";this.formController=new o(C(s)),this.formController.setInitialValues({amount:s}),this.formController.values.subscribe((t=>{this.refundPayload=Object.assign({},t)})),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.paymentId&&this.authToken?d({id:this.paymentId,authToken:this.authToken,service:new c})({onSuccess:({payment:t})=>{this.refundPayload=new m({amount:t.amount_refundable})},onError:({error:t,code:s,severity:e})=>{this.handleError(s,t,e)},final:()=>{this.checkAmount(this.refundPayload.amount)?this.initializeFormController():this.handleInvalidAmount(),this.paymentLoading=!1}}):this.handleError(u.MISSING_PROPS,"Payment ID and Auth Token are required",a.ERROR)}async refundPayment(t){if(t&&t.preventDefault(),!await this.formController.validate())return;const s=(({authToken:t,accountId:s,paymentId:e,service:r})=>async({refundBody:i,onSuccess:o,onError:n,final:u})=>{var l;try{const u=await r.postRefund(e,s,t,i);if(u.error)return n({error:y(u.error),code:v(null===(l=u.error)||void 0===l?void 0:l.code),severity:a.ERROR});o(u)}catch(t){const s=v(null==t?void 0:t.code);return n({error:t.message||t,code:s,severity:a.ERROR})}finally{return u()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new B}),e=this.formController.values.getValue();return this.refundLoading=!0,new Promise((t=>{let r;s({refundBody:e,onSuccess:t=>{r=t},onError:({error:t,code:s,severity:e})=>{r=t,this.handleError(t,s,e)},final:()=>{this.submitEvent.emit({response:r}),this.submitDisabled=!0,this.refundLoading=!1,t(r.data)}})}))}render(){if(this.paymentLoading)return t(R,null);const s=this.formController.getInitialValues(),e=this.refundPayload.amount;return t(p,null,t("form",null,t("fieldset",null,t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-monetary",{name:"amount",label:"Refund Amount",defaultValue:s.amount,inputHandler:this.inputHandler,errorText:this.errors.amount})),t("div",{class:"col-12"},t("form-control-select",{name:"reason",label:"Reason for refund (optional)",defaultValue:s.reason,inputHandler:this.inputHandler,options:x,errorText:this.errors.reason})),t("div",{class:"col-12"},t("form-control-textarea",{name:"description",label:"Note (optional)",defaultValue:s.description,inputHandler:this.inputHandler,maxLength:250,errorText:this.errors.description})),t("div",{class:"form-group d-flex flex-row-reverse"},t(h,{variant:"primary",type:"submit",onClick:this.refundPayment.bind(this),isLoading:this.paymentLoading||this.refundLoading,hidden:this.hideSubmitButton,disabled:this.submitDisabled},`Refund ${n(+e)}`))))))}};export{k as justifi_refund_payment}
1
+ import{h as t,r as s,c as e}from"./p-Bn7inNWG.js";import{c as r,a as i,F as o}from"./p-CR9D6mKt.js";import{f as n}from"./p-BHf9IqGw.js";import"./p-DhGNCW2f.js";import{C as a,a as u}from"./p-Cjcsf8ku.js";import{R as l,k as m}from"./p-Da3idOSV.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{B as h}from"./p-DD0Mvpeu.js";import{S as p}from"./p-DxqCFDtF.js";import"./p-CZfYo5-1.js";import{P as c}from"./p-BdKWuCys.js";import{m as d}from"./p-JyHlIFWl.js";import{c as f,J as v}from"./p-DZYcH7jA.js";import{g as j,a as y}from"./p-D2muobcE.js";import{A as b}from"./p-7s1gsXM5.js";import{S as w}from"./p-CaAVuW6B.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-CpaS1Lex.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-RvUQ__Pq.js";import"./p-CnWtPu8L.js";const C=t=>{const s=+t;return i().required("Amount is required").test("max-amount",`Refund amount cannot be more than payment amount: ${n(s)}`,(function(t){return+t<=+s})).test("min-amount","Refund amount must be greater than 0",(function(t){return+t>0}))},g=t=>{if(t)return r({amount:C(t),description:i().optional(),reason:i().optional().oneOf([l.customerRequest,l.duplicate,l.fraudulent],"Select a reason")})},x=[{label:"Select a reason",value:""},{label:"Customer requested a refund",value:"customer_request"},{label:"Customer was double-charged",value:"duplicate"},{label:"Payment was reported as fraud",value:"fraudulent"}],A=b();class B{async postRefund(t,s,e,r){return A.post({endpoint:`payments/${t}/refunds`,headers:{"Sub-Account":s},body:r,authToken:e})}}const D=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(w,{width:"100%",height:"40px"}))),R=()=>t(p,null,t("div",{class:"row gap-5"},t(D,null),t(D,null),t(D,null))),S=class{constructor(t){s(this,t),this.errorEvent=e(this,"error-event"),this.submitEvent=e(this,"submit-event"),this.refundPayload={},this.displayAmount="",this.errors={},this.paymentLoading=!0,this.refundLoading=!1,this.hideSubmitButton=!1,this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}componentWillLoad(){f(),this.analytics=new v(this),this.initializeApi(),this.formController=new o(g())}handleError(t,s,e){this.errorEvent.emit({errorCode:t,message:s,severity:e})}checkAmount(t){return t>0}handleInvalidAmount(){this.submitDisabled=!0,this.handleError(u.INVALID_REFUND_AMOUNT,"Refund amount must be greater than 0",a.ERROR)}initializeFormController(){const t=this.refundPayload.amount,s=t?t.toString():"0";this.formController=new o(g(s)),this.formController.setInitialValues({amount:s}),this.formController.values.subscribe((t=>{this.refundPayload=Object.assign({},t)})),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.paymentId&&this.authToken?d({id:this.paymentId,authToken:this.authToken,service:new c})({onSuccess:({payment:t})=>{this.refundPayload=new m({amount:t.amount_refundable})},onError:({error:t,code:s,severity:e})=>{this.handleError(s,t,e)},final:()=>{this.checkAmount(this.refundPayload.amount)?this.initializeFormController():this.handleInvalidAmount(),this.paymentLoading=!1}}):this.handleError(u.MISSING_PROPS,"Payment ID and Auth Token are required",a.ERROR)}async refundPayment(t){if(t&&t.preventDefault(),!await this.formController.validate())return;const s=(({authToken:t,accountId:s,paymentId:e,service:r})=>async({refundBody:i,onSuccess:o,onError:n,final:u})=>{var l;try{const u=await r.postRefund(e,s,t,i);if(u.error)return n({error:y(u.error),code:j(null===(l=u.error)||void 0===l?void 0:l.code),severity:a.ERROR});o(u)}catch(t){const s=j(null==t?void 0:t.code);return n({error:t.message||t,code:s,severity:a.ERROR})}finally{return u()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new B}),e=this.formController.values.getValue();return this.refundLoading=!0,new Promise((t=>{let r;s({refundBody:e,onSuccess:t=>{r=t},onError:({error:t,code:s,severity:e})=>{r=t,this.handleError(t,s,e)},final:()=>{this.submitEvent.emit({response:r}),this.submitDisabled=!0,this.refundLoading=!1,t(r.data)}})}))}render(){if(this.paymentLoading)return t(R,null);const s=this.formController.getInitialValues(),e=this.refundPayload.amount;return t(p,null,t("form",null,t("fieldset",null,t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-monetary",{name:"amount",label:"Refund Amount",defaultValue:s.amount,inputHandler:this.inputHandler,errorText:this.errors.amount})),t("div",{class:"col-12"},t("form-control-select",{name:"reason",label:"Reason for refund (optional)",defaultValue:s.reason,inputHandler:this.inputHandler,options:x,errorText:this.errors.reason})),t("div",{class:"col-12"},t("form-control-textarea",{name:"description",label:"Note (optional)",defaultValue:s.description,inputHandler:this.inputHandler,maxLength:250,errorText:this.errors.description})),t("div",{class:"form-group d-flex flex-row-reverse"},t(h,{variant:"primary",type:"submit",onClick:this.refundPayment.bind(this),isLoading:this.paymentLoading||this.refundLoading,hidden:this.hideSubmitButton,disabled:this.submitDisabled},`Refund ${n(+e)}`))))))}};export{S as justifi_refund_payment}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i}from"./p-kpoIU4v_.js";import"./p-9y5MOK55.js";import"./p-HXpYMWUU.js";import{C as o,a as r}from"./p-Cjcsf8ku.js";import{C as e}from"./p-WEguiGt1.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as c,a as p}from"./p-D2muobcE.js";import{c as a,J as n}from"./p-BNz6wy4f.js";import{C as h}from"./p-UD2JhYS2.js";import{m,S as u}from"./p-Bpcb3SsP.js";import{S as d}from"./p-CRFzwZW6.js";import"./p-CZfYo5-1.js";import{d as j}from"./p-CsNubTqD.js";import"./p-7WIgS5RM.js";import"./p-zdIeCUeh.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-O3LY2Da6.js";import"./p-I8XpD1TX.js";import"./p-vRhNRfmB.js";import"./p-CfF8KKwx.js";const f=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=j,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){a(),this.analytics=new n(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetCheckouts(),this.initializeGetSubAccounts()}initializeGetCheckouts(){this.accountId&&this.authToken?this.getCheckouts=(({accountId:t,authToken:s,service:i})=>async({params:r,onSuccess:a,onError:n})=>{var h,m;try{const u=await i.fetchCheckouts(t,s,r);if(u.error)return n({error:p(u.error),code:c(null===(m=u.error)||void 0===m?void 0:m.code),severity:o.ERROR});{const t=Object.assign({},u.page_info);a({checkouts:(null===(h=u.data)||void 0===h?void 0:h.map((t=>new e(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return n({error:t.message||t,code:s,severity:o.ERROR})}})({accountId:this.accountId,authToken:this.authToken,service:new h}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({accountId:this.accountId,authToken:this.authToken,service:new u}))}render(){return i(d,{key:"b0c774c4f56f94cd6b4a3dc8651938f9f33ca94e"},i("checkouts-list-core",{key:"d524423a791f70c234044f5ba27d7bc3648fc988",getCheckouts:this.getCheckouts,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{f as justifi_checkouts_list}
1
+ import{r as t,c as s,h as i}from"./p-Bn7inNWG.js";import"./p-DhGNCW2f.js";import"./p-HXpYMWUU.js";import{C as o,a as r}from"./p-Cjcsf8ku.js";import{C as e}from"./p-Da3idOSV.js";import"./p-CLHwhyvu.js";import"./p-BlJnA265.js";import"./p-BH0Xfn-F.js";import{g as c,a as n}from"./p-D2muobcE.js";import{c as p,J as a}from"./p-DZYcH7jA.js";import{C as h}from"./p-DK2sRMlx.js";import{m,S as u}from"./p-z-5r0gWn.js";import{S as d}from"./p-DxqCFDtF.js";import"./p-CZfYo5-1.js";import{d as j}from"./p-CAJnQLZF.js";import"./p-CpaS1Lex.js";import"./p-BHf9IqGw.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-CnWtPu8L.js";import"./p-7s1gsXM5.js";import"./p-DDUmOl3v.js";import"./p-RvUQ__Pq.js";const f=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=j,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){p(),this.analytics=new a(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetCheckouts(),this.initializeGetSubAccounts()}initializeGetCheckouts(){this.accountId&&this.authToken?this.getCheckouts=(({accountId:t,authToken:s,service:i})=>async({params:r,onSuccess:p,onError:a})=>{var h,m;try{const u=await i.fetchCheckouts(t,s,r);if(u.error)return a({error:n(u.error),code:c(null===(m=u.error)||void 0===m?void 0:m.code),severity:o.ERROR});{const t=Object.assign({},u.page_info);p({checkouts:(null===(h=u.data)||void 0===h?void 0:h.map((t=>new e(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return a({error:t.message||t,code:s,severity:o.ERROR})}})({accountId:this.accountId,authToken:this.authToken,service:new h}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({accountId:this.accountId,authToken:this.authToken,service:new u}))}render(){return i(d,{key:"b0c774c4f56f94cd6b4a3dc8651938f9f33ca94e"},i("checkouts-list-core",{key:"d524423a791f70c234044f5ba27d7bc3648fc988",getCheckouts:this.getCheckouts,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{f as justifi_checkouts_list}