@justifi/webcomponents 5.7.6 → 6.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (734) hide show
  1. package/dist/cjs/{Api-p2pK86Zd.js → Api-CPuq_15r.js} +1 -1
  2. package/dist/cjs/{ComponentError-C4MdBBMe.js → ComponentError-D4OLnOkg.js} +10 -0
  3. package/dist/cjs/{Refund-h6MCxFEE.js → Refund-CqWNG8sx.js} +245 -1
  4. package/dist/cjs/additional-questions-details_5.cjs.entry.js +2 -1
  5. package/dist/cjs/bank-account-document-form-inputs_4.cjs.entry.js +8 -9
  6. package/dist/cjs/bank-account-form.cjs.entry.js +63 -0
  7. package/dist/cjs/{business.service-OxMVnZMF.js → business.service-C3BdUPlm.js} +3 -5
  8. package/dist/cjs/card-form.cjs.entry.js +71 -0
  9. package/dist/cjs/{check-pkg-version-Co_IKlwj.js → check-pkg-version-BfmeLSXP.js} +4 -6
  10. package/dist/cjs/{checkout.service-GgFXq7Ux.js → checkout.service-B0ZmvWwI.js} +3 -5
  11. package/dist/cjs/checkout.store-Cn3Jj5gi.js +40 -0
  12. package/dist/cjs/checkouts-list-core.cjs.entry.js +6 -7
  13. package/dist/cjs/{checkouts-table-DJoMGwVG.js → checkouts-table-UN5gPpQ_.js} +1 -1
  14. package/dist/cjs/{custom-popper.cjs.entry.js → custom-popper_2.cjs.entry.js} +22 -2
  15. package/dist/cjs/dinero-BwNN_k7x.js +1657 -0
  16. package/dist/cjs/{dispute.service-XdB1KbMS.js → dispute.service-DsPEAcDn.js} +3 -5
  17. package/dist/cjs/form-alert_5.cjs.entry.js +4 -4
  18. package/dist/cjs/form-control-checkbox.cjs.entry.js +2 -2
  19. package/dist/cjs/form-control-date.cjs.entry.js +2 -2
  20. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +3 -3
  21. package/dist/cjs/form-control-monetary-provisioning.cjs.entry.js +2 -2
  22. package/dist/cjs/form-control-monetary.cjs.entry.js +4 -3
  23. package/dist/cjs/form-control-number-masked_2.cjs.entry.js +3 -3
  24. package/dist/cjs/form-control-number.cjs.entry.js +2 -2
  25. package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
  26. package/dist/cjs/{form-control-select_3.cjs.entry.js → form-control-select_2.cjs.entry.js} +4 -23
  27. package/dist/cjs/{get-business-BJrtsomz.js → get-business-o5jPq_ME.js} +2 -2
  28. package/dist/cjs/{get-payment-details-Ccd7IWqM.js → get-payment-details-DtCXaIMx.js} +5 -7
  29. package/dist/cjs/{get-payout-csv-CXEQkjDm.js → get-payout-csv-DE_D9y08.js} +2 -2
  30. package/dist/cjs/{get-subaccounts-C4HDfc3o.js → get-subaccounts-CwCH5rC8.js} +5 -7
  31. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +3 -2
  32. package/dist/cjs/{iframe-input_4.cjs.entry.js → hidden-input_2.cjs.entry.js} +111 -153
  33. package/dist/cjs/{insurance-state-qT_hkvZV.js → insurance-state-Cyva9u6S.js} +18 -0
  34. package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +4 -5
  35. package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +17 -18
  36. package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +8 -8
  37. package/dist/cjs/justifi-apple-pay.cjs.entry.js +830 -0
  38. package/dist/cjs/justifi-bank-account-billing-form-simple_9.cjs.entry.js +372 -0
  39. package/dist/cjs/justifi-business-details.cjs.entry.js +11 -12
  40. package/dist/cjs/justifi-business-form.cjs.entry.js +10 -11
  41. package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +1 -1
  42. package/dist/cjs/justifi-checkout-summary_6.cjs.entry.js +785 -0
  43. package/dist/cjs/justifi-checkout.cjs.entry.js +88 -96
  44. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +11 -12
  45. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +13 -14
  46. package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +1 -1
  47. package/dist/cjs/justifi-dispute-management.cjs.entry.js +10 -11
  48. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +13 -14
  49. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +8 -9
  50. package/dist/cjs/justifi-order-terminals.cjs.entry.js +12 -13
  51. package/dist/cjs/justifi-owner-form_3.cjs.entry.js +12 -13
  52. package/dist/cjs/justifi-payment-details.cjs.entry.js +11 -12
  53. package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +2 -2
  54. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +11 -12
  55. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +10 -11
  56. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +4 -3
  57. package/dist/cjs/justifi-payments-list.cjs.entry.js +12 -13
  58. package/dist/cjs/justifi-payout-details.cjs.entry.js +10 -11
  59. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +10 -11
  60. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +4 -3
  61. package/dist/cjs/justifi-payouts-list.cjs.entry.js +13 -14
  62. package/dist/cjs/justifi-refund-payment.cjs.entry.js +10 -11
  63. package/dist/cjs/justifi-saved-payment-method.cjs.entry.js +31 -0
  64. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +115 -18
  65. package/dist/cjs/justifi-skeleton.cjs.entry.js +17 -0
  66. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +6 -7
  67. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +10 -11
  68. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +5 -6
  69. package/dist/cjs/justifi-terminals-list.cjs.entry.js +12 -13
  70. package/dist/cjs/loader.cjs.js +1 -1
  71. package/dist/cjs/{package-B7_ed3oS.js → package-CuNDvHTB.js} +1 -1
  72. package/dist/cjs/payment-details-core.cjs.entry.js +10 -9
  73. package/dist/cjs/payment-method-option-utils-WYHIHy-l.js +15 -0
  74. package/dist/cjs/payment-method-option.cjs.entry.js +17 -0
  75. package/dist/cjs/{payment-provisioning-actions-BkWSDJQQ.js → payment-provisioning-actions-CZVlnRA0.js} +2 -2
  76. package/dist/cjs/{payment.service-BU1Mwwnv.js → payment.service-1H0VC3LV.js} +3 -5
  77. package/dist/cjs/payments-list-core.cjs.entry.js +6 -7
  78. package/dist/cjs/{payments-table-uouQ4x2Y.js → payments-table-quF0NnsS.js} +1 -1
  79. package/dist/cjs/payout-details-core.cjs.entry.js +5 -4
  80. package/dist/cjs/{payout.service-BjB-B6CX.js → payout.service-CIZFU-hV.js} +3 -5
  81. package/dist/cjs/payouts-list-core.cjs.entry.js +6 -7
  82. package/dist/cjs/{payouts-table-Bo61u5ZZ.js → payouts-table-D_CCTR_k.js} +1 -1
  83. package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
  84. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +6 -7
  85. package/dist/cjs/{terminal-orders-table-FtFQqd0s.js → terminal-orders-table-0O5jtzYj.js} +3 -5
  86. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
  87. package/dist/cjs/{terminal.service-De-0eGdM.js → terminal.service-DUlyMTrX.js} +3 -5
  88. package/dist/cjs/terminals-list-core.cjs.entry.js +6 -7
  89. package/dist/cjs/{terminals-table-CGG9EhiI.js → terminals-table-C2BNRUS5.js} +1 -1
  90. package/dist/cjs/{utils-Dka3MplB.js → utils-BaGF9XIe.js} +3 -1661
  91. package/dist/cjs/{utils-l0veqT9y.js → utils-DvUQQLmR.js} +1 -1
  92. package/dist/cjs/webcomponents.cjs.js +1 -1
  93. package/dist/collection/actions/checkout/checkout-actions.js +2 -1
  94. package/dist/collection/api/ApplePay.js +119 -0
  95. package/dist/collection/api/BillingInformation.js +1 -0
  96. package/dist/collection/api/Checkout.js +1 -3
  97. package/dist/collection/api/ComponentError.js +10 -0
  98. package/dist/collection/api/PaymentMethod.js +1 -0
  99. package/dist/collection/api/services/apple-pay.service.js +329 -0
  100. package/dist/collection/collection-manifest.json +16 -9
  101. package/dist/collection/components/business-forms/business-form/additional-questions/additional-questions.js +1 -1
  102. package/dist/collection/components/business-forms/business-form/business-core-info/business-core-info.js +1 -1
  103. package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +1 -1
  104. package/dist/collection/components/business-forms/business-form/legal-address-form/legal-address-form.js +1 -1
  105. package/dist/collection/components/business-forms/owner-form/identity-address/identity-address-form.js +1 -1
  106. package/dist/collection/components/business-forms/owner-form/owner-form-core.js +1 -1
  107. package/dist/collection/components/business-forms/owner-form/owner-form-inputs.js +1 -1
  108. package/dist/collection/components/business-forms/owner-form/owner-form.js +1 -1
  109. package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.js +1 -1
  110. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-document-inputs.js +1 -1
  111. package/dist/collection/components/business-forms/payment-provisioning/bank-account/bank-account-form-inputs.js +1 -1
  112. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +1 -1
  113. package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +1 -1
  114. package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +1 -1
  115. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-inputs.js +1 -1
  116. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +1 -1
  117. package/dist/collection/components/business-forms/payment-provisioning/form-control-monetary-provisioning.js +2 -2
  118. package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.js +1 -1
  119. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-core.js +1 -1
  120. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-buttons.js +1 -1
  121. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-form-steps.js +1 -1
  122. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.js +1 -1
  123. package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +1 -1
  124. package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +2 -2
  125. package/dist/collection/components/checkout/billing-form/billing-form-schema.js +3 -3
  126. package/dist/collection/components/checkout/card-form/card-form.js +2 -2
  127. package/dist/collection/components/checkout/checkout.js +156 -51
  128. package/dist/collection/components/checkout/payment-method-option-utils.js +0 -1
  129. package/dist/collection/components/checkout/save-new-payment-method.js +9 -5
  130. package/dist/collection/components/checkout/saved-payment-method.js +1 -1
  131. package/dist/collection/components/checkouts-list/checkouts-list-core.js +1 -1
  132. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +1 -1
  133. package/dist/collection/components/checkouts-list/checkouts-list.js +1 -1
  134. package/dist/collection/components/dispute-management/dispute-management-core.js +1 -1
  135. package/dist/collection/components/dispute-management/dispute-management.js +1 -1
  136. package/dist/collection/components/dispute-management/dispute-notification.js +1 -1
  137. package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +1 -1
  138. package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +1 -1
  139. package/dist/collection/components/dispute-management/dispute-response/customer-details.js +1 -1
  140. package/dist/collection/components/dispute-management/dispute-response/dispute-response-core.js +1 -1
  141. package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +1 -1
  142. package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +1 -1
  143. package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +1 -1
  144. package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +1 -1
  145. package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +1 -1
  146. package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +1 -1
  147. package/dist/collection/components/filters/table-filters-menu.js +1 -1
  148. package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +1 -1
  149. package/dist/collection/components/insurance/insurance-state.js +18 -1
  150. package/dist/collection/components/insurance/season-interruption/season-interruption-insurance.js +114 -12
  151. package/dist/collection/components/modular-checkout/modular-checkout.js +509 -0
  152. package/dist/collection/components/modular-checkout/sub-components/apple-pay-skeleton.js +10 -0
  153. package/dist/collection/components/modular-checkout/sub-components/apple-pay.js +554 -0
  154. package/dist/collection/components/{checkout/billing-form → modular-checkout/sub-components}/bank-account-billing-form-simple.js +7 -5
  155. package/dist/collection/components/modular-checkout/sub-components/bank-account-skeleton.js +10 -0
  156. package/dist/collection/components/modular-checkout/sub-components/bank-account.js +98 -0
  157. package/dist/collection/components/{checkout/billing-form → modular-checkout/sub-components}/billing-form-full.js +12 -8
  158. package/dist/collection/components/{checkout/billing-form → modular-checkout/sub-components}/card-billing-form-simple.js +7 -5
  159. package/dist/collection/components/modular-checkout/sub-components/card-form-skeleton.js +10 -0
  160. package/dist/collection/components/modular-checkout/sub-components/card-form.js +102 -0
  161. package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +113 -0
  162. package/dist/collection/components/modular-checkout/sub-components/saved-payment-methods.js +40 -0
  163. package/dist/collection/components/modular-checkout/sub-components/sezzle-payment-method.js +127 -0
  164. package/dist/collection/components/modular-checkout/sub-components/summary.js +12 -0
  165. package/dist/collection/components/order-terminals/order-terminals.js +1 -1
  166. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
  167. package/dist/collection/components/payment-details/payment-details-core.js +8 -8
  168. package/dist/collection/components/payment-transactions-list/payment-transactions-list.js +1 -1
  169. package/dist/collection/components/payments-list/payments-list-core.js +1 -1
  170. package/dist/collection/components/payments-list/payments-list-filters.js +2 -2
  171. package/dist/collection/components/payments-list/payments-list.js +1 -1
  172. package/dist/collection/components/payout-details/payout-details-core.js +3 -3
  173. package/dist/collection/components/payout-transactions-list/payout-transactions-list.js +1 -1
  174. package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
  175. package/dist/collection/components/payouts-list/payouts-list-filters.js +2 -2
  176. package/dist/collection/components/payouts-list/payouts-list.js +1 -1
  177. package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +1 -1
  178. package/dist/collection/components/terminal-orders-list/terminal-orders-list-filters.js +2 -2
  179. package/dist/collection/components/terminal-orders-list/terminal-orders-list.js +1 -1
  180. package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
  181. package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
  182. package/dist/collection/components/terminals-list/terminals-list.js +1 -1
  183. package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +293 -83
  184. package/dist/collection/store/checkout.store.js +35 -0
  185. package/dist/collection/ui-components/apple-pay-button.js +146 -0
  186. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  187. package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
  188. package/dist/collection/ui-components/form/form-control-date.js +2 -2
  189. package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
  190. package/dist/collection/ui-components/form/form-control-file.js +2 -2
  191. package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
  192. package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
  193. package/dist/collection/ui-components/form/form-control-number.js +2 -2
  194. package/dist/collection/ui-components/form/form-control-radio.js +2 -2
  195. package/dist/collection/ui-components/form/form-control-select.js +2 -2
  196. package/dist/collection/ui-components/form/form-control-text.js +2 -2
  197. package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
  198. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  199. package/dist/collection/ui-components/form/iframe-input.js +10 -5
  200. package/dist/collection/ui-components/index.js +1 -0
  201. package/dist/collection/ui-components/shadow-dom-components/justifi-button.js +176 -0
  202. package/dist/collection/ui-components/shadow-dom-components/justifi-header.js +83 -0
  203. package/dist/collection/ui-components/shadow-dom-components/justifi-radio-list-item.js +155 -0
  204. package/dist/collection/ui-components/shadow-dom-components/justifi-skeleton.js +108 -0
  205. package/dist/docs.json +5023 -5075
  206. package/dist/esm/{Api-Bes3KkG6.js → Api-N_veT2p6.js} +1 -1
  207. package/dist/esm/{ComponentError-SdntD1xf.js → ComponentError-Cjcsf8ku.js} +11 -1
  208. package/dist/esm/{Dispute-7MWRbTXI.js → Dispute-BH0Xfn-F.js} +1 -1
  209. package/dist/esm/{Refund-CISeDJoW.js → Refund-Di6J0oN2.js} +244 -2
  210. package/dist/esm/additional-questions-details_5.entry.js +4 -3
  211. package/dist/esm/{badge-BRPxcFAe.js → badge-D4ZXPFjL.js} +1 -1
  212. package/dist/esm/bank-account-document-form-inputs_4.entry.js +12 -13
  213. package/dist/esm/bank-account-form.entry.js +61 -0
  214. package/dist/esm/business-details-core.entry.js +3 -3
  215. package/dist/esm/{business.service-Cx6MiBgY.js → business.service-Bdvhdc_d.js} +4 -6
  216. package/dist/esm/{button-B_viNpoz.js → button-C0wLsDP3.js} +1 -1
  217. package/dist/esm/card-form.entry.js +69 -0
  218. package/dist/esm/{check-pkg-version-DvajBJj9.js → check-pkg-version-BuYkk-jV.js} +5 -7
  219. package/dist/esm/{checkout.service-BQ2Z7hHe.js → checkout.service-XgGFa7H8.js} +4 -6
  220. package/dist/esm/checkout.store-OAv_iY1u.js +37 -0
  221. package/dist/esm/checkouts-list-core.entry.js +11 -12
  222. package/dist/esm/{checkouts-table-YyKWgXbv.js → checkouts-table-DjGKtqoc.js} +3 -3
  223. package/dist/esm/{custom-popper.entry.js → custom-popper_2.entry.js} +22 -3
  224. package/dist/esm/dinero-HXpYMWUU.js +1655 -0
  225. package/dist/esm/{dispute.service-Bmw6fgc6.js → dispute.service-CKPcmwhH.js} +4 -6
  226. package/dist/esm/form-alert_5.entry.js +5 -5
  227. package/dist/esm/form-control-checkbox.entry.js +5 -5
  228. package/dist/esm/form-control-date.entry.js +4 -4
  229. package/dist/esm/{form-control-error-text-BvjVjw2l.js → form-control-error-text-Bzfs_rxk.js} +1 -1
  230. package/dist/esm/form-control-file-v2_2.entry.js +5 -5
  231. package/dist/esm/{form-control-help-text-Dggj4lH9.js → form-control-help-text-ueLctOBN.js} +1 -1
  232. package/dist/esm/form-control-monetary-provisioning.entry.js +5 -5
  233. package/dist/esm/form-control-monetary.entry.js +7 -6
  234. package/dist/esm/form-control-number-masked_2.entry.js +5 -5
  235. package/dist/esm/form-control-number.entry.js +5 -5
  236. package/dist/esm/form-control-radio.entry.js +3 -3
  237. package/dist/esm/{form-control-select_3.entry.js → form-control-select_2.entry.js} +7 -25
  238. package/dist/esm/{get-business-GEPTefIj.js → get-business-Crb6P-iI.js} +2 -2
  239. package/dist/esm/{get-payment-details-Rww84hl5.js → get-payment-details-Dt-dr16k.js} +5 -7
  240. package/dist/esm/{get-payout-csv-D7IYYqVL.js → get-payout-csv-D-Lnooki.js} +2 -2
  241. package/dist/esm/{get-subaccounts-0PmjUDEa.js → get-subaccounts-BsoVLANw.js} +6 -8
  242. package/dist/esm/gross-payment-chart-core.entry.js +6 -5
  243. package/dist/esm/{header-1-UMqoryJI.js → header-1-BMKEv9y6.js} +1 -1
  244. package/dist/esm/{header-3-DfV3YFNS.js → header-3-C3t3m27b.js} +1 -1
  245. package/dist/esm/{iframe-input_4.entry.js → hidden-input_2.entry.js} +106 -146
  246. package/dist/esm/insurance-state-d4hjThzE.js +45 -0
  247. package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +8 -9
  248. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +20 -21
  249. package/dist/esm/justifi-additional-statement_8.entry.js +9 -9
  250. package/dist/esm/justifi-apple-pay.entry.js +828 -0
  251. package/dist/esm/justifi-bank-account-billing-form-simple_9.entry.js +362 -0
  252. package/dist/esm/justifi-business-details.entry.js +13 -14
  253. package/dist/esm/justifi-business-form.entry.js +15 -16
  254. package/dist/esm/justifi-business-representative-form-inputs.entry.js +2 -2
  255. package/dist/esm/justifi-checkout-summary_6.entry.js +778 -0
  256. package/dist/esm/justifi-checkout.entry.js +88 -96
  257. package/dist/esm/justifi-checkouts-list-filters.entry.js +7 -8
  258. package/dist/esm/justifi-checkouts-list.entry.js +15 -16
  259. package/dist/esm/justifi-details.entry.js +2 -2
  260. package/dist/esm/justifi-dispute-management-core.entry.js +2 -2
  261. package/dist/esm/justifi-dispute-management.entry.js +11 -12
  262. package/dist/esm/justifi-dispute-notification_3.entry.js +16 -17
  263. package/dist/esm/justifi-gross-payment-chart.entry.js +11 -12
  264. package/dist/esm/justifi-order-terminals.entry.js +15 -16
  265. package/dist/esm/justifi-owner-form_3.entry.js +14 -15
  266. package/dist/esm/justifi-payment-details.entry.js +13 -14
  267. package/dist/esm/justifi-payment-provisioning-core.entry.js +4 -4
  268. package/dist/esm/justifi-payment-provisioning.entry.js +12 -13
  269. package/dist/esm/justifi-payment-transactions-list.entry.js +14 -15
  270. package/dist/esm/justifi-payments-list-filters.entry.js +5 -4
  271. package/dist/esm/justifi-payments-list.entry.js +15 -16
  272. package/dist/esm/justifi-payout-details.entry.js +13 -14
  273. package/dist/esm/justifi-payout-transactions-list.entry.js +14 -15
  274. package/dist/esm/justifi-payouts-list-filters.entry.js +5 -4
  275. package/dist/esm/justifi-payouts-list.entry.js +17 -18
  276. package/dist/esm/justifi-refund-payment.entry.js +14 -15
  277. package/dist/esm/justifi-saved-payment-method.entry.js +29 -0
  278. package/dist/esm/justifi-season-interruption-insurance.entry.js +117 -20
  279. package/dist/esm/justifi-skeleton.entry.js +15 -0
  280. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +8 -9
  281. package/dist/esm/justifi-terminal-orders-list.entry.js +13 -14
  282. package/dist/esm/justifi-terminals-list-filters.entry.js +7 -8
  283. package/dist/esm/justifi-terminals-list.entry.js +15 -16
  284. package/dist/esm/loader.js +1 -1
  285. package/dist/esm/{package-DwtqmD1M.js → package-C60pS6qh.js} +1 -1
  286. package/dist/esm/pagination-menu.entry.js +1 -1
  287. package/dist/esm/{parts-CVGBVdVC.js → parts-RvUQ__Pq.js} +1 -1
  288. package/dist/esm/payment-details-core.entry.js +15 -14
  289. package/dist/esm/payment-method-option-utils-lUHAQVFl.js +15 -0
  290. package/dist/esm/payment-method-option.entry.js +15 -0
  291. package/dist/esm/{payment-provisioning-actions-BIfyW239.js → payment-provisioning-actions-ONP8lDnV.js} +2 -2
  292. package/dist/esm/{payment.service-Ck1kdYXH.js → payment.service-BWO84KlP.js} +4 -6
  293. package/dist/esm/payments-list-core.entry.js +12 -13
  294. package/dist/esm/{payments-status-gL2bjUp9.js → payments-status-1yRdTNeS.js} +1 -1
  295. package/dist/esm/{payments-table-DrnN-flR.js → payments-table-8RADYkma.js} +3 -3
  296. package/dist/esm/payout-details-core.entry.js +11 -10
  297. package/dist/esm/{payout.service-YOny8vA1.js → payout.service-Cld6TS5W.js} +4 -6
  298. package/dist/esm/payouts-list-core.entry.js +12 -13
  299. package/dist/esm/{payouts-status-BpBVp8j1.js → payouts-status-BqsQVtBp.js} +1 -1
  300. package/dist/esm/{payouts-table-Bt0Dhq3E.js → payouts-table-DPw7yIx8.js} +3 -3
  301. package/dist/esm/{skeleton-MHyzfkPM.js → skeleton-BmTjpTYa.js} +1 -1
  302. package/dist/esm/{spinner-CaGDuAi8.js → spinner-YGDOI-CS.js} +1 -1
  303. package/dist/esm/table-filters-menu.entry.js +3 -3
  304. package/dist/esm/{table-B-m83mFl.js → table-ybHxxc9f.js} +2 -2
  305. package/dist/esm/terminal-orders-list-core.entry.js +11 -12
  306. package/dist/esm/{terminal-orders-table-shGx8Lcn.js → terminal-orders-table-D-xP5WuM.js} +6 -8
  307. package/dist/esm/terminal-quantity-selector.entry.js +2 -2
  308. package/dist/esm/{terminal.service-CJbnbE1S.js → terminal.service-DmYCUQcA.js} +4 -6
  309. package/dist/esm/terminals-list-core.entry.js +11 -12
  310. package/dist/esm/{terminals-table-DskXRPbS.js → terminals-table-DVAPCgEr.js} +3 -3
  311. package/dist/esm/{utils-Dccsn9BY.js → utils-BeQLScSm.js} +1 -1
  312. package/dist/esm/{utils-DOW3rBEH.js → utils-DG5aMFmf.js} +1 -1
  313. package/dist/esm/{utils-DIxPWgIk.js → utils-lb8p1Exq.js} +3 -1660
  314. package/dist/esm/webcomponents.js +1 -1
  315. package/dist/module/{check-pkg-version.js → Analytics.js} +22 -24
  316. package/dist/module/Refund.js +328 -1
  317. package/dist/module/additional-questions.js +1 -1
  318. package/dist/module/additional-statement.js +2 -2
  319. package/dist/module/badge.js +1 -1
  320. package/dist/module/bank-account-billing-form-simple.js +9 -4
  321. package/dist/module/bank-account-document-inputs.js +3 -5
  322. package/dist/module/bank-account-form-inputs2.js +1 -1
  323. package/dist/module/bank-account-form.js +83 -1
  324. package/dist/module/{bank-account-form2.js → bank-account.js} +26 -8
  325. package/dist/module/billing-form-full.js +14 -11
  326. package/dist/module/billing-form-schema.js +3 -3
  327. package/dist/module/business-additional-questions-form-step.js +2 -2
  328. package/dist/module/business-bank-account-form-step-core.js +2 -4
  329. package/dist/module/business-bank-account-form-step.js +3 -5
  330. package/dist/module/business-core-info-form-step.js +2 -2
  331. package/dist/module/business-core-info.js +1 -1
  332. package/dist/module/business-details-core2.js +1 -0
  333. package/dist/module/business-documents-on-file2.js +2 -1
  334. package/dist/module/business-owners-form-step-core.js +1 -0
  335. package/dist/module/business-owners-form-step.js +2 -2
  336. package/dist/module/business-representative-form-inputs.js +1 -1
  337. package/dist/module/business-representative-form-step.js +2 -2
  338. package/dist/module/business-representative.js +1 -1
  339. package/dist/module/business-terms-conditions-form-step.js +2 -4
  340. package/dist/module/business.service.js +1 -3
  341. package/dist/module/button.js +1 -1
  342. package/dist/module/cancellation-policy.js +2 -2
  343. package/dist/module/card-billing-form-simple.js +9 -4
  344. package/dist/module/card-form.js +91 -1
  345. package/dist/module/card-form2.js +28 -10
  346. package/dist/module/checkout.service.js +1 -3
  347. package/dist/module/checkout.store.js +37 -0
  348. package/dist/module/checkouts-list-core2.js +6 -6
  349. package/dist/module/custom-popper2.js +2 -2
  350. package/dist/module/customer-details.js +2 -2
  351. package/dist/module/dinero.js +1655 -0
  352. package/dist/module/dispute-management-core.js +2 -2
  353. package/dist/module/dispute-notification.js +3 -2
  354. package/dist/module/dispute-response-actions.js +1 -3
  355. package/dist/module/dispute-response-core.js +2 -2
  356. package/dist/module/dispute-response.js +4 -3
  357. package/dist/module/duplicate-charge.js +2 -2
  358. package/dist/module/electronic-evidence.js +2 -2
  359. package/dist/module/form-alert2.js +1 -1
  360. package/dist/module/form-control-checkbox2.js +4 -3
  361. package/dist/module/form-control-date2.js +3 -2
  362. package/dist/module/form-control-file-v22.js +1 -1
  363. package/dist/module/form-control-file2.js +3 -2
  364. package/dist/module/form-control-monetary-provisioning2.js +4 -3
  365. package/dist/module/form-control-monetary2.js +4 -3
  366. package/dist/module/form-control-number-masked2.js +3 -2
  367. package/dist/module/form-control-number.js +4 -3
  368. package/dist/module/form-control-radio2.js +3 -3
  369. package/dist/module/form-control-select2.js +3 -2
  370. package/dist/module/form-control-text2.js +3 -2
  371. package/dist/module/form-control-textarea2.js +3 -3
  372. package/dist/module/get-business.js +1 -1
  373. package/dist/module/get-payment-details.js +2 -4
  374. package/dist/module/get-payout-csv.js +1 -1
  375. package/dist/module/get-subaccounts.js +2 -4
  376. package/dist/module/gross-payment-chart-core2.js +2 -2
  377. package/dist/module/header-2.js +8 -0
  378. package/dist/module/header-3.js +8 -0
  379. package/dist/module/hidden-input2.js +2 -2
  380. package/dist/module/identity-address-form.js +1 -1
  381. package/dist/module/iframe-input2.js +6 -6
  382. package/dist/module/insurance-state.js +18 -7
  383. package/dist/module/{justifi-checkout-core.d.ts → justifi-apple-pay.d.ts} +4 -4
  384. package/dist/module/justifi-apple-pay.js +871 -0
  385. package/dist/module/justifi-bank-account-form.d.ts +11 -0
  386. package/dist/module/justifi-bank-account-form.js +6 -0
  387. package/dist/module/justifi-business-details.js +2 -2
  388. package/dist/module/justifi-business-form.js +4 -5
  389. package/dist/module/justifi-button.d.ts +11 -0
  390. package/dist/module/justifi-button.js +6 -0
  391. package/dist/module/justifi-button2.js +41 -0
  392. package/dist/module/justifi-card-form.d.ts +11 -0
  393. package/dist/module/justifi-card-form.js +6 -0
  394. package/dist/module/justifi-checkout-summary.d.ts +11 -0
  395. package/dist/module/justifi-checkout-summary.js +6 -0
  396. package/dist/module/justifi-checkout.js +157 -137
  397. package/dist/module/justifi-checkouts-list-filters.js +4 -5
  398. package/dist/module/justifi-checkouts-list.js +5 -6
  399. package/dist/module/justifi-dispute-management.js +3 -4
  400. package/dist/module/justifi-gross-payment-chart.js +2 -4
  401. package/dist/module/justifi-header.d.ts +11 -0
  402. package/dist/module/justifi-header.js +6 -0
  403. package/dist/module/justifi-header2.js +43 -0
  404. package/dist/module/justifi-modular-checkout.d.ts +11 -0
  405. package/dist/module/justifi-modular-checkout.js +6 -0
  406. package/dist/module/justifi-order-terminals.js +7 -7
  407. package/dist/module/justifi-payment-details.js +2 -2
  408. package/dist/module/justifi-payment-provisioning.js +3 -5
  409. package/dist/module/justifi-payment-transactions-list.js +7 -7
  410. package/dist/module/justifi-payments-list-filters.js +4 -3
  411. package/dist/module/justifi-payments-list.js +5 -6
  412. package/dist/module/justifi-payout-details.js +3 -5
  413. package/dist/module/justifi-payout-transactions-list.js +7 -7
  414. package/dist/module/justifi-payouts-list-filters.js +4 -3
  415. package/dist/module/justifi-payouts-list.js +5 -6
  416. package/dist/module/justifi-radio-list-item.d.ts +11 -0
  417. package/dist/module/justifi-radio-list-item.js +6 -0
  418. package/dist/module/justifi-radio-list-item2.js +55 -0
  419. package/dist/module/justifi-refund-payment.js +3 -4
  420. package/dist/module/justifi-saved-payment-method.js +57 -1
  421. package/dist/module/justifi-saved-payment-methods.d.ts +11 -0
  422. package/dist/module/justifi-saved-payment-methods.js +6 -0
  423. package/dist/module/justifi-season-interruption-insurance.js +120 -24
  424. package/dist/module/justifi-skeleton.d.ts +11 -0
  425. package/dist/module/justifi-skeleton.js +39 -0
  426. package/dist/module/justifi-terminal-orders-list-filters.js +5 -6
  427. package/dist/module/justifi-terminal-orders-list.js +5 -6
  428. package/dist/module/justifi-terminals-list-filters.js +4 -5
  429. package/dist/module/justifi-terminals-list.js +5 -6
  430. package/dist/module/justifi-tokenize-payment-method.js +1 -219
  431. package/dist/module/legal-address-form-step.js +2 -2
  432. package/dist/module/legal-address-form.js +1 -1
  433. package/dist/module/modular-checkout.js +415 -0
  434. package/dist/module/owner-form-core2.js +3 -2
  435. package/dist/module/owner-form-inputs2.js +1 -1
  436. package/dist/module/owner-form.js +1 -1
  437. package/dist/module/package.js +3 -3
  438. package/dist/module/pagination-menu2.js +1 -1
  439. package/dist/module/parts.js +1 -1
  440. package/dist/module/payment-details-core2.js +10 -9
  441. package/dist/module/payment-method-option-utils.js +15 -0
  442. package/dist/module/payment-method-option.d.ts +11 -0
  443. package/dist/module/payment-method-option.js +54 -0
  444. package/dist/module/payment-provisioning-actions.js +1 -1
  445. package/dist/module/payment-provisioning-core.js +3 -2
  446. package/dist/module/payment-provisioning-form-buttons.js +2 -1
  447. package/dist/module/payment-provisioning-form-steps.js +1 -1
  448. package/dist/module/payment-provisioning-loading.js +1 -0
  449. package/dist/module/payment.service.js +1 -3
  450. package/dist/module/payments-list-core2.js +6 -6
  451. package/dist/module/payout-details-core2.js +5 -4
  452. package/dist/module/payout.service.js +1 -3
  453. package/dist/module/payouts-list-core2.js +6 -6
  454. package/dist/module/product-or-service.js +2 -2
  455. package/dist/module/refund-policy.js +2 -2
  456. package/dist/module/save-new-payment-method.js +13 -6
  457. package/dist/module/saved-payment-methods.js +73 -0
  458. package/dist/module/sezzle-payment-method.js +25 -18
  459. package/dist/module/shipping-details.js +2 -2
  460. package/dist/module/spinner.js +1 -1
  461. package/dist/module/summary.js +35 -0
  462. package/dist/module/table-filters-menu2.js +1 -1
  463. package/dist/module/table.js +1 -1
  464. package/dist/module/terminal-orders-list-core2.js +6 -6
  465. package/dist/module/terminal-quantity-selector2.js +2 -2
  466. package/dist/module/terminal.service.js +1 -3
  467. package/dist/module/terminals-list-core2.js +6 -6
  468. package/dist/module/tokenize-payment-method.js +400 -0
  469. package/dist/module/utils2.js +3 -1660
  470. package/dist/module/utils4.js +1 -1
  471. package/dist/types/api/ApplePay.d.ts +196 -0
  472. package/dist/types/api/BillingInformation.d.ts +13 -0
  473. package/dist/types/api/Checkout.d.ts +15 -13
  474. package/dist/types/api/ComponentError.d.ts +10 -1
  475. package/dist/types/api/PaymentMethod.d.ts +21 -0
  476. package/dist/types/api/services/apple-pay.service.d.ts +65 -0
  477. package/dist/types/components/checkout/billing-form/billing-form-schema.d.ts +4 -4
  478. package/dist/types/components/checkout/checkout.d.ts +27 -11
  479. package/dist/types/components/checkout/save-new-payment-method.d.ts +1 -1
  480. package/dist/types/components/insurance/insurance-state.d.ts +2 -1
  481. package/dist/types/components/insurance/season-interruption/season-interruption-insurance.d.ts +9 -3
  482. package/dist/types/components/modular-checkout/modular-checkout.d.ts +42 -0
  483. package/dist/types/components/modular-checkout/sub-components/apple-pay-skeleton.d.ts +6 -0
  484. package/dist/types/components/modular-checkout/sub-components/apple-pay.d.ts +38 -0
  485. package/dist/types/components/{checkout/billing-form → modular-checkout/sub-components}/bank-account-billing-form-simple.d.ts +1 -1
  486. package/dist/types/components/modular-checkout/sub-components/bank-account-skeleton.d.ts +6 -0
  487. package/dist/types/components/modular-checkout/sub-components/bank-account.d.ts +18 -0
  488. package/dist/types/components/{checkout/billing-form → modular-checkout/sub-components}/billing-form-full.d.ts +1 -2
  489. package/dist/types/components/{checkout/billing-form → modular-checkout/sub-components}/card-billing-form-simple.d.ts +1 -1
  490. package/dist/types/components/modular-checkout/sub-components/card-form-skeleton.d.ts +6 -0
  491. package/dist/types/components/modular-checkout/sub-components/card-form.d.ts +20 -0
  492. package/dist/types/components/modular-checkout/sub-components/payment-method-option.d.ts +8 -0
  493. package/dist/types/components/modular-checkout/sub-components/saved-payment-methods.d.ts +7 -0
  494. package/dist/types/components/{checkout → modular-checkout/sub-components}/sezzle-payment-method.d.ts +3 -9
  495. package/dist/types/components/modular-checkout/sub-components/summary.d.ts +3 -0
  496. package/dist/types/components/tokenize-payment-method/tokenize-payment-method.d.ts +42 -15
  497. package/dist/types/components.d.ts +423 -219
  498. package/dist/types/store/checkout.store.d.ts +28 -0
  499. package/dist/types/ui-components/apple-pay-button.d.ts +17 -0
  500. package/dist/types/ui-components/form/iframe-input.d.ts +2 -1
  501. package/dist/types/ui-components/index.d.ts +1 -0
  502. package/dist/types/ui-components/shadow-dom-components/justifi-button.d.ts +13 -0
  503. package/dist/types/ui-components/shadow-dom-components/justifi-radio-list-item.d.ts +12 -0
  504. package/dist/types/ui-components/shadow-dom-components/justifi-skeleton.d.ts +10 -0
  505. package/dist/webcomponents/{p-2e734e97.entry.js → p-03c7cee8.entry.js} +1 -1
  506. package/dist/webcomponents/{p-254724c4.entry.js → p-08a5cc2f.entry.js} +1 -1
  507. package/dist/webcomponents/p-0aa78c58.entry.js +1 -0
  508. package/dist/webcomponents/p-0aee6da6.entry.js +1 -0
  509. package/dist/webcomponents/p-0e64cd09.entry.js +1 -0
  510. package/dist/webcomponents/p-1202181b.entry.js +1 -0
  511. package/dist/webcomponents/p-1246b999.entry.js +1 -0
  512. package/dist/webcomponents/p-12c312a0.entry.js +1 -0
  513. package/dist/webcomponents/p-1a83d9f2.entry.js +1 -0
  514. package/dist/webcomponents/p-1b892b3a.entry.js +1 -0
  515. package/dist/webcomponents/p-1c0c1d7b.entry.js +1 -0
  516. package/dist/webcomponents/p-1e206c92.entry.js +1 -0
  517. package/dist/webcomponents/p-2169c3d1.entry.js +1 -0
  518. package/dist/webcomponents/p-281e36be.entry.js +1 -0
  519. package/dist/webcomponents/p-2988e82c.entry.js +1 -0
  520. package/dist/webcomponents/p-2a0a907d.entry.js +1 -0
  521. package/dist/webcomponents/p-32cc081a.entry.js +1 -0
  522. package/dist/webcomponents/p-387bcdee.entry.js +1 -0
  523. package/dist/webcomponents/p-41416b5f.entry.js +1 -0
  524. package/dist/webcomponents/p-42994618.entry.js +1 -0
  525. package/dist/webcomponents/p-4a79c737.entry.js +1 -0
  526. package/dist/webcomponents/p-4c994761.entry.js +1 -0
  527. package/dist/webcomponents/p-4cf9168d.entry.js +1 -0
  528. package/dist/webcomponents/p-5510b57c.entry.js +1 -0
  529. package/dist/webcomponents/p-55b7bdba.entry.js +1 -0
  530. package/dist/webcomponents/p-59e8f027.entry.js +1 -0
  531. package/dist/webcomponents/p-5a5f07be.entry.js +1 -0
  532. package/dist/webcomponents/{p-BTS3E50C.js → p-5aA7gjr5.js} +1 -1
  533. package/dist/webcomponents/p-5acd6add.entry.js +1 -0
  534. package/dist/webcomponents/p-5ad70aae.entry.js +1 -0
  535. package/dist/webcomponents/p-5afbfafb.entry.js +1 -0
  536. package/dist/webcomponents/p-5rVtZ2GJ.js +1 -0
  537. package/dist/webcomponents/p-6974a44c.entry.js +1 -0
  538. package/dist/webcomponents/p-6f2b41f5.entry.js +1 -0
  539. package/dist/webcomponents/p-6f9755cc.entry.js +1 -0
  540. package/dist/webcomponents/p-7288473f.entry.js +1 -0
  541. package/dist/webcomponents/p-76a95d07.entry.js +1 -0
  542. package/dist/webcomponents/p-7b9fa1fb.entry.js +1 -0
  543. package/dist/webcomponents/p-92efb3f2.entry.js +1 -0
  544. package/dist/webcomponents/p-98939b74.entry.js +1 -0
  545. package/dist/webcomponents/{p-7MWRbTXI.js → p-BH0Xfn-F.js} +1 -1
  546. package/dist/webcomponents/p-BUadwxkh.js +1 -0
  547. package/dist/webcomponents/p-BXKEChoo.js +1 -0
  548. package/dist/webcomponents/p-BZzESzqz.js +1 -0
  549. package/dist/webcomponents/p-Bb6FBEPP.js +1 -0
  550. package/dist/webcomponents/{p-PmGAGJ5K.js → p-BhdBpAn9.js} +1 -1
  551. package/dist/webcomponents/p-BmFoKOM3.js +1 -0
  552. package/dist/webcomponents/p-Bpcb3SsP.js +1 -0
  553. package/dist/webcomponents/p-BtOB_CaO.js +1 -0
  554. package/dist/webcomponents/p-BySyDTv5.js +1 -0
  555. package/dist/webcomponents/p-C0AHrswP.js +1 -0
  556. package/dist/webcomponents/p-C60pS6qh.js +1 -0
  557. package/dist/webcomponents/p-CLwzqWk2.js +1 -0
  558. package/dist/webcomponents/{p-CvXbmLtl.js → p-CP_tg-uH.js} +1 -1
  559. package/dist/webcomponents/p-Cjcsf8ku.js +1 -0
  560. package/dist/webcomponents/{p-C5RuuShs.js → p-D2muobcE.js} +1 -1
  561. package/dist/webcomponents/{p-BvLgDun_.js → p-D48iERjQ.js} +1 -1
  562. package/dist/webcomponents/p-D7eeJWA-.js +1 -0
  563. package/dist/webcomponents/p-D9Sv4eV5.js +1 -0
  564. package/dist/webcomponents/{p-QxJlhLWM.js → p-DBsw4qpn.js} +1 -1
  565. package/dist/webcomponents/p-DD74a16D.js +1 -0
  566. package/dist/webcomponents/p-DH8F0bsw.js +1 -0
  567. package/dist/webcomponents/{p-BRBt7Vt-.js → p-DKRXPZKS.js} +1 -1
  568. package/dist/webcomponents/p-DOd8HaWV.js +1 -0
  569. package/dist/webcomponents/p-DWUnL_zj.js +1 -0
  570. package/dist/webcomponents/p-DYGIC0QH.js +1 -0
  571. package/dist/webcomponents/p-DcE8SQPv.js +1 -0
  572. package/dist/webcomponents/p-Drz6LnIw.js +1 -0
  573. package/dist/webcomponents/{p-DkaX7Taq.js → p-DuXN7Akd.js} +1 -1
  574. package/dist/webcomponents/{p-CA1oADw4.js → p-HAk7yBNq.js} +1 -1
  575. package/dist/webcomponents/p-HXpYMWUU.js +1 -0
  576. package/dist/webcomponents/{p-CZ8q2CPi.js → p-I8XpD1TX.js} +1 -1
  577. package/dist/webcomponents/{p-CVGBVdVC.js → p-RvUQ__Pq.js} +1 -1
  578. package/dist/webcomponents/p-UD2JhYS2.js +1 -0
  579. package/dist/webcomponents/p-WEguiGt1.js +1 -0
  580. package/dist/webcomponents/p-ZpPDShvP.js +1 -0
  581. package/dist/webcomponents/p-a1a8f6bd.entry.js +1 -0
  582. package/dist/webcomponents/p-a406bf1a.entry.js +1 -0
  583. package/dist/webcomponents/p-a70bc148.entry.js +1 -0
  584. package/dist/webcomponents/{p-437aaa5e.entry.js → p-a9d2dd5e.entry.js} +1 -1
  585. package/dist/webcomponents/{p-e7b60660.entry.js → p-ab308ee3.entry.js} +1 -1
  586. package/dist/webcomponents/{p-c711551a.entry.js → p-afc83e27.entry.js} +1 -1
  587. package/dist/webcomponents/p-b04cc606.entry.js +1 -0
  588. package/dist/webcomponents/p-b41d2b8f.entry.js +1 -0
  589. package/dist/webcomponents/p-b8f63e28.entry.js +1 -0
  590. package/dist/webcomponents/p-ba84c3bd.entry.js +1 -0
  591. package/dist/webcomponents/p-bfc38bc2.entry.js +1 -0
  592. package/dist/webcomponents/p-c62e23c1.entry.js +1 -0
  593. package/dist/webcomponents/{p-831337bc.entry.js → p-c6860f60.entry.js} +1 -1
  594. package/dist/webcomponents/p-c7e5245a.entry.js +1 -0
  595. package/dist/webcomponents/p-cabaf013.entry.js +1 -0
  596. package/dist/webcomponents/p-cbfc8269.entry.js +1 -0
  597. package/dist/webcomponents/p-cf16498f.entry.js +1 -0
  598. package/dist/webcomponents/p-d014a155.entry.js +1 -0
  599. package/dist/webcomponents/{p-db9f3fcd.entry.js → p-dc245644.entry.js} +4 -4
  600. package/dist/webcomponents/p-e6ca1872.entry.js +1 -0
  601. package/dist/webcomponents/p-e8a198fa.entry.js +1 -0
  602. package/dist/webcomponents/p-ea1b161a.entry.js +1 -0
  603. package/dist/webcomponents/p-eff0b0e9.entry.js +1 -0
  604. package/dist/webcomponents/p-f3be7b2b.entry.js +1 -0
  605. package/dist/webcomponents/p-f787bc18.entry.js +1 -0
  606. package/dist/webcomponents/p-fb1904d2.entry.js +1 -0
  607. package/dist/webcomponents/p-fbaf62a5.entry.js +1 -0
  608. package/dist/webcomponents/p-fcb6e870.entry.js +1 -0
  609. package/dist/webcomponents/{p-DBhBVIU-.js → p-nWGo6sHu.js} +1 -1
  610. package/dist/webcomponents/p-wyEq9Pa1.js +1 -0
  611. package/dist/webcomponents/p-zdIeCUeh.js +1 -0
  612. package/dist/webcomponents/webcomponents.esm.js +1 -1
  613. package/package.json +1 -1
  614. package/dist/cjs/Checkout-nsVtlYWD.js +0 -103
  615. package/dist/cjs/Payment-2Zmn-l6G.js +0 -151
  616. package/dist/cjs/bank-account-form_9.cjs.entry.js +0 -542
  617. package/dist/cjs/iframe-input-styles-state-CGWgxf_0.js +0 -26
  618. package/dist/cjs/justifi-checkout-core.cjs.entry.js +0 -141
  619. package/dist/cjs/justifi-season-interruption-insurance-core.cjs.entry.js +0 -124
  620. package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +0 -80
  621. package/dist/collection/components/checkout/checkout-core.js +0 -454
  622. package/dist/collection/components/checkout/new-payment-method.js +0 -378
  623. package/dist/collection/components/checkout/payment-method-options.js +0 -440
  624. package/dist/collection/components/checkout/sezzle-payment-method.js +0 -240
  625. package/dist/collection/components/insurance/season-interruption/season-interruption-insurance-core.js +0 -447
  626. package/dist/esm/Checkout-DfRTGCdt.js +0 -101
  627. package/dist/esm/Payment-93PpwzdC.js +0 -149
  628. package/dist/esm/bank-account-form_9.entry.js +0 -532
  629. package/dist/esm/iframe-input-styles-state-2KXH-_4X.js +0 -23
  630. package/dist/esm/insurance-state-yzV5mr5o.js +0 -28
  631. package/dist/esm/justifi-checkout-core.entry.js +0 -139
  632. package/dist/esm/justifi-season-interruption-insurance-core.entry.js +0 -122
  633. package/dist/esm/justifi-tokenize-payment-method.entry.js +0 -78
  634. package/dist/module/Checkout.js +0 -121
  635. package/dist/module/Payment.js +0 -204
  636. package/dist/module/checkout-core.js +0 -292
  637. package/dist/module/justifi-checkout-core.js +0 -6
  638. package/dist/module/justifi-new-payment-method.d.ts +0 -11
  639. package/dist/module/justifi-new-payment-method.js +0 -6
  640. package/dist/module/justifi-payment-method-options.d.ts +0 -11
  641. package/dist/module/justifi-payment-method-options.js +0 -6
  642. package/dist/module/justifi-season-interruption-insurance-core.d.ts +0 -11
  643. package/dist/module/justifi-season-interruption-insurance-core.js +0 -6
  644. package/dist/module/new-payment-method.js +0 -222
  645. package/dist/module/payment-method-options.js +0 -237
  646. package/dist/module/saved-payment-method.js +0 -79
  647. package/dist/module/season-interruption-insurance-core.js +0 -168
  648. package/dist/types/components/checkout/checkout-core.d.ts +0 -49
  649. package/dist/types/components/checkout/new-payment-method.d.ts +0 -31
  650. package/dist/types/components/checkout/payment-method-options.d.ts +0 -32
  651. package/dist/types/components/insurance/season-interruption/season-interruption-insurance-core.d.ts +0 -32
  652. package/dist/webcomponents/p-08ae973e.entry.js +0 -1
  653. package/dist/webcomponents/p-0ac1bb26.entry.js +0 -1
  654. package/dist/webcomponents/p-0ced05b3.entry.js +0 -1
  655. package/dist/webcomponents/p-144f15c1.entry.js +0 -1
  656. package/dist/webcomponents/p-20a75acd.entry.js +0 -1
  657. package/dist/webcomponents/p-2634a1ee.entry.js +0 -1
  658. package/dist/webcomponents/p-28133336.entry.js +0 -1
  659. package/dist/webcomponents/p-29f81159.entry.js +0 -1
  660. package/dist/webcomponents/p-2b1090d0.entry.js +0 -1
  661. package/dist/webcomponents/p-3aafab63.entry.js +0 -1
  662. package/dist/webcomponents/p-3b98d8ca.entry.js +0 -1
  663. package/dist/webcomponents/p-3f771784.entry.js +0 -1
  664. package/dist/webcomponents/p-4114a328.entry.js +0 -1
  665. package/dist/webcomponents/p-41ab2378.entry.js +0 -1
  666. package/dist/webcomponents/p-423ad3eb.entry.js +0 -1
  667. package/dist/webcomponents/p-43752d57.entry.js +0 -1
  668. package/dist/webcomponents/p-44FkPJq7.js +0 -1
  669. package/dist/webcomponents/p-50f8e87e.entry.js +0 -1
  670. package/dist/webcomponents/p-52092407.entry.js +0 -1
  671. package/dist/webcomponents/p-52ede69d.entry.js +0 -1
  672. package/dist/webcomponents/p-540c31f2.entry.js +0 -1
  673. package/dist/webcomponents/p-5B_nojEF.js +0 -1
  674. package/dist/webcomponents/p-5dbd1b93.entry.js +0 -1
  675. package/dist/webcomponents/p-6158cf60.entry.js +0 -1
  676. package/dist/webcomponents/p-652cc155.entry.js +0 -1
  677. package/dist/webcomponents/p-66a77e7d.entry.js +0 -1
  678. package/dist/webcomponents/p-6816c021.entry.js +0 -1
  679. package/dist/webcomponents/p-69800e4a.entry.js +0 -1
  680. package/dist/webcomponents/p-6dd98d75.entry.js +0 -1
  681. package/dist/webcomponents/p-7528f993.entry.js +0 -1
  682. package/dist/webcomponents/p-7bc9d8f4.entry.js +0 -1
  683. package/dist/webcomponents/p-7be2ef8d.entry.js +0 -1
  684. package/dist/webcomponents/p-7d3a563f.entry.js +0 -1
  685. package/dist/webcomponents/p-8dfc21d5.entry.js +0 -1
  686. package/dist/webcomponents/p-96b75110.entry.js +0 -1
  687. package/dist/webcomponents/p-BEXEpjn_.js +0 -1
  688. package/dist/webcomponents/p-BGUDiFCH.js +0 -1
  689. package/dist/webcomponents/p-BZ70sqbi.js +0 -1
  690. package/dist/webcomponents/p-BiWuElbM.js +0 -1
  691. package/dist/webcomponents/p-BwRi5Eou.js +0 -1
  692. package/dist/webcomponents/p-CHB0cPw7.js +0 -1
  693. package/dist/webcomponents/p-CSNli0tl.js +0 -1
  694. package/dist/webcomponents/p-Cs0cIpIm.js +0 -1
  695. package/dist/webcomponents/p-Cuxr_9xa.js +0 -1
  696. package/dist/webcomponents/p-D-vUkGsU.js +0 -1
  697. package/dist/webcomponents/p-D6ssxpjT.js +0 -1
  698. package/dist/webcomponents/p-DAasymX_.js +0 -1
  699. package/dist/webcomponents/p-DIxPWgIk.js +0 -1
  700. package/dist/webcomponents/p-DT-cTREr.js +0 -1
  701. package/dist/webcomponents/p-DZgAEPoo.js +0 -1
  702. package/dist/webcomponents/p-DZw7v4st.js +0 -1
  703. package/dist/webcomponents/p-Dgo6D5G7.js +0 -1
  704. package/dist/webcomponents/p-DniQ6yo6.js +0 -1
  705. package/dist/webcomponents/p-DwtqmD1M.js +0 -1
  706. package/dist/webcomponents/p-G_As8rAe.js +0 -1
  707. package/dist/webcomponents/p-SdntD1xf.js +0 -1
  708. package/dist/webcomponents/p-Y-KcAUY_.js +0 -1
  709. package/dist/webcomponents/p-a1ce996c.entry.js +0 -1
  710. package/dist/webcomponents/p-a3c5ac1c.entry.js +0 -1
  711. package/dist/webcomponents/p-af3ef542.entry.js +0 -1
  712. package/dist/webcomponents/p-b3e8e00f.entry.js +0 -1
  713. package/dist/webcomponents/p-b46bf62f.entry.js +0 -1
  714. package/dist/webcomponents/p-b8b7603c.entry.js +0 -1
  715. package/dist/webcomponents/p-be165165.entry.js +0 -1
  716. package/dist/webcomponents/p-c8ae1620.entry.js +0 -1
  717. package/dist/webcomponents/p-d47a05ba.entry.js +0 -1
  718. package/dist/webcomponents/p-d54963ce.entry.js +0 -1
  719. package/dist/webcomponents/p-d5505b45.entry.js +0 -1
  720. package/dist/webcomponents/p-d6f02807.entry.js +0 -1
  721. package/dist/webcomponents/p-d711f296.entry.js +0 -1
  722. package/dist/webcomponents/p-d9704f8c.entry.js +0 -1
  723. package/dist/webcomponents/p-da6790bb.entry.js +0 -1
  724. package/dist/webcomponents/p-da731140.entry.js +0 -1
  725. package/dist/webcomponents/p-e3197269.entry.js +0 -1
  726. package/dist/webcomponents/p-e4dbec27.entry.js +0 -1
  727. package/dist/webcomponents/p-f057b215.entry.js +0 -1
  728. package/dist/webcomponents/p-f9a18fcb.entry.js +0 -1
  729. package/dist/webcomponents/p-fa30d8bd.entry.js +0 -1
  730. package/dist/webcomponents/p-fc1e3832.entry.js +0 -1
  731. package/dist/webcomponents/p-lZ9GOnvt.js +0 -1
  732. package/dist/webcomponents/p-qnx9PpK1.js +0 -1
  733. package/dist/webcomponents/p-vi4XpHew.js +0 -1
  734. package/dist/webcomponents/p-zRPvfo_G.js +0 -1
@@ -1,168 +0,0 @@
1
- import { h, proxyCustomElement, HTMLElement, createEvent } from '@stencil/core/internal/client';
2
- import { p as processHTML, c as formatCurrency, r as removeAttribute, k as addAttribute } from './utils2.js';
3
- import { v as validateInsuranceValues, a as insuranceValues, b as insuranceErrors, H as Header2 } from './insurance-state.js';
4
- import { t as text, j as textDanger } from './parts.js';
5
- import { S as StyledHost } from './styled-host.js';
6
- import './details.js';
7
- import './event-types.js';
8
- import { S as Skeleton } from './skeleton.js';
9
- import { d as defineCustomElement$2 } from './form-control-help-text2.js';
10
- import { d as defineCustomElement$1 } from './form-control-radio2.js';
11
-
12
- const SeasonInterruptionInsuranceLoading = () => (h("div", { class: "row gap-3" },
13
- h("div", { class: "col-12" },
14
- h(Skeleton, { width: "35%", height: "30px" })),
15
- h("div", { class: "col-12" },
16
- h(Skeleton, { width: "70%" })),
17
- h("div", { class: "col-12" },
18
- h(Skeleton, { width: "40%" })),
19
- h("div", { class: "col-12" },
20
- h(Skeleton, { width: "40%" })),
21
- h("div", { class: "col-12" },
22
- h(Skeleton, { width: "100%" })),
23
- h("div", { class: "col-12" },
24
- h(Skeleton, { width: "80%" }))));
25
-
26
- const SeasonInterruptionInsuranceCore = /*@__PURE__*/ proxyCustomElement(class SeasonInterruptionInsuranceCore extends HTMLElement {
27
- constructor() {
28
- super();
29
- this.__registerHost();
30
- this.insuranceUpdated = createEvent(this, "insurance-updated", 7);
31
- this.errorEvent = createEvent(this, "error-event", 7);
32
- this.isLoading = true;
33
- }
34
- async validate() {
35
- return validateInsuranceValues();
36
- }
37
- processHTMLContent(html) {
38
- return processHTML(html, [
39
- (html) => removeAttribute(html, 'style'),
40
- (html) => addAttribute(html, 'a', 'part', text),
41
- (html) => addAttribute(html, 'p', 'part', text),
42
- ]);
43
- }
44
- componentWillLoad() {
45
- if (this.getQuote) {
46
- this.fetchData();
47
- }
48
- }
49
- ;
50
- fetchData() {
51
- this.isLoading = true;
52
- this.getQuote({
53
- payload: {
54
- checkout_id: this.checkoutId,
55
- policy_type: "season_interruption",
56
- primary_identity: {
57
- state: this.primaryIdentityState,
58
- email: this.primaryIdentityEmailAddress,
59
- first_name: this.primaryIdentityFirstName,
60
- last_name: this.primaryIdentityLastName,
61
- postal_code: this.primaryIdentityPostalCode,
62
- country: this.primaryIdentityCountry
63
- },
64
- policy_attributes: {
65
- insurable_amount: this.policyAttributesInsurableAmount,
66
- start_date: this.policyAttributesStartDate,
67
- end_date: this.policyAttributesEndDate,
68
- covered_identity: {
69
- first_name: this.coveredIdentityFirstName,
70
- last_name: this.coveredIdentityLastName
71
- }
72
- }
73
- },
74
- onSuccess: ({ quote }) => {
75
- this.quote = quote;
76
- this.quote.product.description = this.processHTMLContent(this.quote.product.description);
77
- this.quote.product.legal_disclaimer = this.processHTMLContent(this.quote.product.legal_disclaimer);
78
- insuranceValues[quote.policy_type] = quote.accepted;
79
- this.isLoading = false;
80
- },
81
- onError: ({ error, code, severity }) => {
82
- this.isLoading = false;
83
- this.errorEvent.emit({
84
- errorCode: code,
85
- message: error,
86
- severity,
87
- });
88
- }
89
- });
90
- }
91
- ;
92
- onChangeHandler(_name, value) {
93
- this.accepted = value;
94
- insuranceErrors[this.quote.policy_type] = false;
95
- this.toggleCoverage({
96
- quoteId: this.quote.id,
97
- payload: { accepted: this.accepted },
98
- onSuccess: () => {
99
- this.insuranceUpdated.emit();
100
- insuranceValues[this.quote.policy_type] = this.accepted;
101
- },
102
- onError: ({ error, code, severity }) => {
103
- this.errorEvent.emit({
104
- errorCode: code,
105
- message: error,
106
- severity,
107
- });
108
- }
109
- });
110
- }
111
- get error() {
112
- var _a;
113
- return insuranceErrors[(_a = this.quote) === null || _a === void 0 ? void 0 : _a.policy_type];
114
- }
115
- render() {
116
- var _a, _b, _c, _d;
117
- if (this.isLoading)
118
- return (h(StyledHost, null, h(SeasonInterruptionInsuranceLoading, null)));
119
- return (h(StyledHost, null, h("div", null, h(Header2, { text: (_a = this.quote) === null || _a === void 0 ? void 0 : _a.product.title, class: "fs-5 fw-bold pb-3" }), h("small", { part: text, innerHTML: (_b = this.quote) === null || _b === void 0 ? void 0 : _b.product.description }), h("form-control-radio", { label: `Accept coverage for ${formatCurrency((_c = this.quote) === null || _c === void 0 ? void 0 : _c.total_cents)}`, name: "opt-in", value: 'true', checked: this.accepted === 'true', inputHandler: this.onChangeHandler.bind(this),
120
- // don't wanna show error message, but need to show the red border
121
- errorText: this.error ? ' ' : undefined }), h("form-control-radio", { label: "Decline coverage", name: "opt-in", value: 'false', checked: this.accepted === 'false', inputHandler: this.onChangeHandler.bind(this), errorText: this.error ? ' ' : undefined }), h("div", { class: "invalid-feedback", style: { display: this.error ? 'block' : 'none' }, part: textDanger }, "Please select an option"), h("small", { part: text, innerHTML: (_d = this.quote) === null || _d === void 0 ? void 0 : _d.product.legal_disclaimer }))));
122
- }
123
- }, [256, "justifi-season-interruption-insurance-core", {
124
- "checkoutId": [1, "checkout-id"],
125
- "getQuote": [16, "get-quote"],
126
- "toggleCoverage": [16, "toggle-coverage"],
127
- "primaryIdentityFirstName": [1, "primary-identity-first-name"],
128
- "primaryIdentityLastName": [1, "primary-identity-last-name"],
129
- "primaryIdentityState": [1, "primary-identity-state"],
130
- "primaryIdentityPostalCode": [1, "primary-identity-postal-code"],
131
- "primaryIdentityCountry": [1, "primary-identity-country"],
132
- "primaryIdentityEmailAddress": [1, "primary-identity-email-address"],
133
- "policyAttributesInsurableAmount": [2, "policy-attributes-insurable-amount"],
134
- "policyAttributesStartDate": [1, "policy-attributes-start-date"],
135
- "policyAttributesEndDate": [1, "policy-attributes-end-date"],
136
- "coveredIdentityFirstName": [1, "covered-identity-first-name"],
137
- "coveredIdentityLastName": [1, "covered-identity-last-name"],
138
- "quote": [32],
139
- "isLoading": [32],
140
- "accepted": [32],
141
- "validate": [64]
142
- }]);
143
- function defineCustomElement() {
144
- if (typeof customElements === "undefined") {
145
- return;
146
- }
147
- const components = ["justifi-season-interruption-insurance-core", "form-control-help-text", "form-control-radio"];
148
- components.forEach(tagName => { switch (tagName) {
149
- case "justifi-season-interruption-insurance-core":
150
- if (!customElements.get(tagName)) {
151
- customElements.define(tagName, SeasonInterruptionInsuranceCore);
152
- }
153
- break;
154
- case "form-control-help-text":
155
- if (!customElements.get(tagName)) {
156
- defineCustomElement$2();
157
- }
158
- break;
159
- case "form-control-radio":
160
- if (!customElements.get(tagName)) {
161
- defineCustomElement$1();
162
- }
163
- break;
164
- } });
165
- }
166
- defineCustomElement();
167
-
168
- export { SeasonInterruptionInsuranceCore as S, defineCustomElement as d };
@@ -1,49 +0,0 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
2
- import { ICheckout, ICheckoutCompleteResponse, ILoadedEventResponse } from '../../api/Checkout';
3
- import { ComponentErrorCodes, ComponentErrorSeverity } from '../../api/ComponentError';
4
- import { BillingFormFields } from './billing-form/billing-form-schema';
5
- import { ComponentErrorEvent, ComponentSubmitEvent } from '../../api/ComponentEvents';
6
- export declare class CheckoutCore {
7
- authToken: string;
8
- getCheckout: Function;
9
- complete: Function;
10
- checkoutId: string;
11
- disableCreditCard?: boolean;
12
- disableBankAccount?: boolean;
13
- disableBnpl?: boolean;
14
- disablePaymentMethodGroup?: boolean;
15
- hideCardBillingForm?: boolean;
16
- hideBankAccountBillingForm?: boolean;
17
- hasLoadedFonts: boolean;
18
- checkout: ICheckout;
19
- serverError: string;
20
- renderState: 'loading' | 'error' | 'success';
21
- creatingNewPaymentMethod: boolean;
22
- insuranceToggled: boolean;
23
- submitEvent: EventEmitter<ComponentSubmitEvent>;
24
- errorEvent: EventEmitter<ComponentErrorEvent>;
25
- loaded: EventEmitter<ILoadedEventResponse>;
26
- private paymentMethodOptionsRef?;
27
- fillBillingForm(fields: BillingFormFields): Promise<void>;
28
- validate(): Promise<{
29
- isValid: boolean;
30
- }>;
31
- componentWillLoad(): void;
32
- fetchData(): void;
33
- submit(event: any): Promise<void>;
34
- completeCheckout: (payment: {
35
- payment_mode: string;
36
- payment_token?: string;
37
- }) => Promise<void>;
38
- onSubmitted: (response: ICheckoutCompleteResponse) => void;
39
- onError: ({ error, code, severity }: {
40
- error: string;
41
- code: ComponentErrorCodes;
42
- severity: ComponentErrorSeverity;
43
- }) => void;
44
- get isLoading(): boolean;
45
- get isError(): boolean;
46
- get paymentType(): any;
47
- get summary(): any;
48
- render(): any;
49
- }
@@ -1,31 +0,0 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
2
- import { PaymentMethodOption } from './payment-method-option-utils';
3
- import { PaymentMethodPayload } from './payment-method-payload';
4
- import { BillingFormFields } from './billing-form/billing-form-schema';
5
- export declare class NewPaymentMethod {
6
- private billingFormRef?;
7
- private paymentMethodFormRef?;
8
- authToken: string;
9
- accountId: string;
10
- paymentMethodOption: PaymentMethodOption;
11
- paymentMethodGroupId?: string;
12
- isSelected: boolean;
13
- showCard?: boolean;
14
- showAch?: boolean;
15
- hideCardBillingForm?: boolean;
16
- hideBankAccountBillingForm?: boolean;
17
- saveNewPaymentMethodChecked: boolean;
18
- paymentMethodOptionSelected: EventEmitter;
19
- handleCheckboxChanged(event: CustomEvent<boolean>): void;
20
- fillBillingForm(fields: BillingFormFields): Promise<void>;
21
- resolvePaymentMethod(insuranceValidation: any): Promise<PaymentMethodPayload>;
22
- validate(): Promise<{
23
- isValid: boolean;
24
- errors: any;
25
- }>;
26
- tokenize(): Promise<any>;
27
- onPaymentMethodOptionClick: (e: any) => void;
28
- showNewPaymentMethodForm(): any;
29
- private get hiddenRadioInput();
30
- render(): any;
31
- }
@@ -1,32 +0,0 @@
1
- import { PaymentMethodOption } from './payment-method-option-utils';
2
- import { PaymentMethodPayload } from './payment-method-payload';
3
- import { IBnpl } from '../../api';
4
- import { BillingFormFields } from './billing-form/billing-form-schema';
5
- export declare class PaymentMethodOptions {
6
- showCard: boolean;
7
- showAch: boolean;
8
- showBnpl: boolean;
9
- showSavedPaymentMethods: boolean;
10
- paymentMethodGroupId?: string;
11
- bnpl: IBnpl;
12
- insuranceToggled: boolean;
13
- authToken: string;
14
- accountId: string;
15
- savedPaymentMethods: any[];
16
- paymentAmount: number;
17
- hideCardBillingForm?: boolean;
18
- hideBankAccountBillingForm?: boolean;
19
- selectedPaymentMethodId: string;
20
- paymentMethodOptions: PaymentMethodOption[];
21
- private selectedPaymentMethodOptionRef?;
22
- fillBillingForm(fields: BillingFormFields): Promise<void>;
23
- connectedCallback(): void;
24
- paymentMethodsChanged(): void;
25
- paymentMethodOptionSelected(event: CustomEvent<PaymentMethodOption>): void;
26
- resolvePaymentMethod(insuranceValidation: any): Promise<PaymentMethodPayload>;
27
- validate(): Promise<{
28
- isValid: boolean;
29
- errors?: any;
30
- }>;
31
- render(): any;
32
- }
@@ -1,32 +0,0 @@
1
- import { EventEmitter } from "../../../stencil-public-runtime";
2
- import { ComponentErrorEvent } from "../../../api/ComponentEvents";
3
- export declare class SeasonInterruptionInsuranceCore {
4
- checkoutId: string;
5
- getQuote: Function;
6
- toggleCoverage: Function;
7
- primaryIdentityFirstName: string;
8
- primaryIdentityLastName: string;
9
- primaryIdentityState: string;
10
- primaryIdentityPostalCode: string;
11
- primaryIdentityCountry: string;
12
- primaryIdentityEmailAddress: string;
13
- policyAttributesInsurableAmount: number;
14
- policyAttributesStartDate?: string;
15
- policyAttributesEndDate?: string;
16
- coveredIdentityFirstName?: string;
17
- coveredIdentityLastName?: string;
18
- quote: any;
19
- isLoading: boolean;
20
- accepted: string | undefined;
21
- insuranceUpdated: EventEmitter;
22
- errorEvent: EventEmitter<ComponentErrorEvent>;
23
- validate(): Promise<{
24
- isValid: boolean;
25
- }>;
26
- processHTMLContent(html: string): any;
27
- componentWillLoad(): void;
28
- fetchData(): void;
29
- onChangeHandler(_name: string, value: string): void;
30
- get error(): any;
31
- render(): any;
32
- }
@@ -1 +0,0 @@
1
- import{h as s,r as i,c as t}from"./p-kpoIU4v_.js";import{c as r,F as e}from"./p-CR9D6mKt.js";import{b as o,a}from"./p-DSP8qjHL.js";import{i as p,a as h}from"./p-PgEzcvI6.js";import"./p-9y5MOK55.js";import"./p-DIxPWgIk.js";import{C as n,a as m}from"./p-SdntD1xf.js";import"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import"./p-DZgAEPoo.js";import{B as l,b as d}from"./p-BlJnA265.js";import"./p-7MWRbTXI.js";import{c,J as j}from"./p-BZ70sqbi.js";import{B as u}from"./p-BvLgDun_.js";import{S as f}from"./p-CRFzwZW6.js";import{H as v}from"./p-BEXEpjn_.js";import"./p-CZfYo5-1.js";import{S as b}from"./p-BGUDiFCH.js";import{B as C}from"./p-XYgDHrVL.js";import{m as g,b as w}from"./p-BTS3E50C.js";import{B}from"./p-DZw7v4st.js";import"./p-BFTU3MAI.js";import"./p-CYBR4K2p.js";import"./p-BX8GieXu.js";import"./p-yH3TC3ZQ.js";import"./p-7WIgS5RM.js";import"./p-Dt-vy9Le.js";import"./p-DwtqmD1M.js";import"./p-CZ8q2CPi.js";import"./p-CVGBVdVC.js";import"./p-C5RuuShs.js";const y=r(Object.assign(Object.assign({},o().fields),{legal_address:h(),additional_questions:a(),representative:p("representative")})),D=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(b,{width:"25%"})),s("div",{class:"col-12"},s(b,{width:"100%"})),s("div",{class:"col-12 d-flex gap-3"},s(b,{width:"50%"}),s(b,{width:"50%"})),s("div",{class:"col-12 d-flex gap-3"},s(b,{width:"65%"}),s(b,{width:"35%"}))),S=()=>s("div",{class:"row gap-5"},s("div",{class:"col-12"},s(b,{width:"40%",height:"40px"})),s(D,null),s(D,null),s(D,null)),x=class{constructor(s){i(this,s),this.submitEvent=t(this,"submit-event"),this.clickEvent=t(this,"click-event"),this.errorEvent=t(this,"error-event"),this.isLoading=!1,this.isSaving=!1,this.hideErrors=!1,this.formTitle="Business Information",this.removeTitle=!1,this.instantiateBusiness=s=>{const i=new l(s);this.formController.setInitialValues(Object.assign({},i))},this.sendData=async()=>{this.isSaving=!0;const s=this.formController.values.getValue(),i=this.formController.getInitialValues(),t=new l(Object.assign(Object.assign({},i),s)).payload;this.patchBusiness({payload:t,onSuccess:s=>{this.handleReponse(s)},onError:({error:s,code:i,severity:t})=>{this.errorMessage=s.message,this.errorEvent.emit({errorCode:i,message:s.message,severity:t})},final:()=>{this.isSaving=!1}})},this.validateAndSubmit=s=>{s.preventDefault(),this.formController.validateAndSubmit(this.sendData)}}componentWillLoad(){c(),this.analytics=new j(this),this.formController=new e(y),this.initializeApi()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}get title(){return this.removeTitle?"":this.formTitle}get disabledState(){return this.isSaving}get businessEndpoint(){return`entities/business/${this.businessId}`}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=g({authToken:this.authToken,businessId:this.businessId,service:new B}),this.patchBusiness=w({authToken:this.authToken,businessId:this.businessId,service:new B}),this.getBusiness({onSuccess:s=>{this.instantiateBusiness(s.data)},onError:({error:s,code:i,severity:t})=>{this.errorMessage=s.message,this.errorEvent.emit({errorCode:i,message:s.message,severity:t})},final:()=>{this.isLoading=!1}})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:m.MISSING_PROPS,severity:n.ERROR})}handleReponse(s){s.error&&(this.errorMessage=d.patchData),this.submitEvent.emit({response:s}),this.instantiateBusiness(s.data)}render(){return s(f,null,this.isLoading?s(S,null):s("form",{onSubmit:this.validateAndSubmit},s("div",{class:"row gap-3"},s(v,{text:this.title}),s("form-alert",{text:this.errorMessage,hideAlert:this.hideErrors}),s("div",{class:"col-12 mb-4"},s("justifi-business-core-info",{formController:this.formController})),s("div",{class:"col-12 mb-4"},s("justifi-legal-address-form",{formController:this.formController})),s("div",{class:"col-12 mb-4"},s("justifi-additional-questions",{formController:this.formController})),s("div",{class:"col-12 mb-4"},s("justifi-business-representative",{formController:this.formController})),s("div",{class:"col-12 d-flex flex-row-reverse"},s(u,{type:"submit",disabled:this.disabledState,variant:"primary",onClick:()=>this.clickEvent.emit({name:C.submit}),isLoading:this.isSaving},"Submit")))))}};export{x as justifi_business_form}
@@ -1 +0,0 @@
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 e,J as o}from"./p-BZ70sqbi.js";import{d as a}from"./p-BiWuElbM.js";import"./p-9y5MOK55.js";import"./p-DIxPWgIk.js";import{C as n,a as p}from"./p-SdntD1xf.js";import"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import{e as m}from"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-7MWRbTXI.js";import{g as c,a as h}from"./p-C5RuuShs.js";import{A as d}from"./p-CZ8q2CPi.js";import"./p-DwtqmD1M.js";import"./p-CVGBVdVC.js";import"./p-BRBt7Vt-.js";import"./p-7WIgS5RM.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const l=d();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,d;try{const a=await t.fetchTerminalOrders(r,s,i);if(a.error)return o({error:h(a.error),code:c(null===(d=a.error)||void 0===d?void 0:d.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 m(r))))||[],pagingInfo:r})}}catch(r){const s=c(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:"e1443c306b24a4e0e179458a899f7e362ef50d67"},t("terminal-orders-list-core",{key:"8c7df6db57f09f71795273aa1e5ec5e93e67a09b",getTerminalOrders:this.getTerminalOrders,"onError-event":this.handleErrorEvent,columns:this.columns}))}};export{j as justifi_terminal_orders_list}
@@ -1 +0,0 @@
1
- import{r as e,h as t}from"./p-kpoIU4v_.js";import{l as a}from"./p-Bde7dY9t.js";import{f as s,p as i,c as r}from"./p-BVD7g3cE.js";import{w as l,x as o,y as p,z as d}from"./p-CVGBVdVC.js";import{S as c}from"./p-CRFzwZW6.js";import"./p-CZfYo5-1.js";import"./p-9y5MOK55.js";import"./p-DIxPWgIk.js";import"./p-SdntD1xf.js";import"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import{I as f}from"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-7MWRbTXI.js";import"./p-BFTU3MAI.js";import"./p-7WIgS5RM.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const n=class{constructor(t){e(this,t),this.setParamsOnChange=(e,t)=>{s[e]=t}}componentWillLoad(){this.debouncedSetParamsOnChange=a.debounce(this.setParamsOnChange,300),Object.entries({terminal_id:this.terminalId,status:this.terminalStatus,terminal_order_id:this.terminalOrderId}).forEach((([e,t])=>{t&&(i[e]=t)}))}get terminalStatusOptions(){return[{label:"All",value:""},{label:"Connected",value:f.connected},{label:"Disconnected",value:f.disconnected},{label:"Unknown",value:f.unknown},{label:"Pending Configuration",value:f.pending_configuration}]}render(){const e=Object.assign({},s);return t(c,{key:"33d0e44947a2df5217d725fab6cbdee16b82b505"},t("table-filters-menu",{key:"23d37f21ce7fe37f8e09cb8244593c8cd87d6163",params:e,clearParams:r,part:l},t("div",{key:"72bea11d594c36b78819da9a4df7b637af9c82f5",class:"grid-cols-2 gap-3 p-1"},t("div",{key:"6001d65ea3c2f0e7e950ff647d2e25ab0986e757",class:"p-2"},t("form-control-text",{key:"035f811a609d95f6445eafc94c5ccca42c5086e0",name:"terminal_id",label:"Terminal ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalId||s.terminal_id,disabled:!!this.terminalId,part:o})),t("div",{key:"0f1f0f6a83ecc78dfea9c9744d6c26c64549231d",class:"p-2"},t("form-control-text",{key:"9798016e2e88ea4e90f280afa3ecb9d34748ff4c",name:"terminal_order_id",label:"Terminal Order ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalOrderId||s.terminal_order_id,disabled:!!this.terminalOrderId,part:p})),t("div",{key:"719f95cc9b707b626fcb7234164f247dec321b0f",class:"p-2"},t("form-control-select",{key:"08482cde28ea4fb2d25cba044112b8a47ffe8c33",name:"status",label:"Status",options:this.terminalStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.terminalStatus||s.status,disabled:!!this.terminalStatus,part:d})))))}};export{n as justifi_terminals_list_filters}
@@ -1 +0,0 @@
1
- import{r as s,c as i,h as t}from"./p-kpoIU4v_.js";import{c as o,J as r}from"./p-BZ70sqbi.js";import{C as e,a as p}from"./p-SdntD1xf.js";import{m as n,a}from"./p-BTS3E50C.js";import{B as h}from"./p-DZw7v4st.js";import{A as m}from"./p-CZ8q2CPi.js";import"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-7MWRbTXI.js";import"./p-DwtqmD1M.js";import"./p-C5RuuShs.js";import"./p-9y5MOK55.js";import"./p-7WIgS5RM.js";import"./p-DIxPWgIk.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const u=m();class d{async postProvisioning(s,i,t){return u.post({endpoint:"entities/provisioning",body:{business_id:i,product_category:t},authToken:s})}}const c=class{constructor(t){s(this,t),this.errorEvent=i(this,"error-event"),this.allowOptionalFields=!1,this.formTitle="Business Information"}propChanged(){this.initializeApi()}componentWillLoad(){o(),this.analytics=new r(this),this.initializeApi()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=n({authToken:this.authToken,businessId:this.businessId,service:new h}),this.postProvisioning=a({authToken:this.authToken,businessId:this.businessId,product:"payment",service:new d})):this.errorEvent.emit({message:"auth-token and business-id are required",errorCode:p.MISSING_PROPS,severity:e.ERROR})}render(){return t("justifi-payment-provisioning-core",{key:"11871305b4b4974787a9278195ea0b314be250b0",businessId:this.businessId,authToken:this.authToken,allowOptionalFields:this.allowOptionalFields,formTitle:this.formTitle,getBusiness:this.getBusiness,postProvisioning:this.postProvisioning})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}};export{c as justifi_payment_provisioning}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as e}from"./p-kpoIU4v_.js";import"./p-9y5MOK55.js";import"./p-DIxPWgIk.js";import"./p-SdntD1xf.js";import"./p-5B_nojEF.js";import{p as i}from"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-7MWRbTXI.js";import{T as a,a as r,b as h,c as o,d as c,e as n,f as p,g as m,h as d,i as f,j as b,k as u,l as g}from"./p-CA1oADw4.js";import{T as j}from"./p-CZfYo5-1.js";import{t as l,a as y}from"./p-PmGAGJ5K.js";import{o as k,g as C}from"./p-BVD7g3cE.js";import"./p-7WIgS5RM.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-CVGBVdVC.js";import"./p-lZ9GOnvt.js";import"./p-BRBt7Vt-.js";const v=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event"),this.errorEvent=s(this,"error-event"),this.terminals=[],this.subAccounts=[],this.loading=!0,this.paging=i,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:j.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:j.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const e=this.terminals.find((t=>t.id===s));this.clickEvent.emit({name:j.row,data:e})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.terminalsTable=new a(this.terminals,this.columns,l,y),this.getTerminals&&this.getSubAccounts&&this.fetchData(),k("set",(()=>{this.pagingParams={}})),k("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getTerminals({params:this.terminalParams,onSuccess:async({terminals:t,pagingInfo:s})=>{this.terminals=t,this.paging=s,this.terminalsTable.collectionData=this.terminals,this.terminalsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.terminals=this.terminals.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get terminalParams(){const t=C();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.terminals.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.terminals.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e(g,{key:"5ac52a5c666e2fa570cecb81092592795623adfa"},e(r,{key:"dbcde2fe24d4b377bfa7103db4c441e4e38537c6"},e(h,{key:"34b676d43e989020a363b76e838e12a35cc7f127"},e(o,{key:"d238b92b6d2d175a6badebee5e2089ff95ab77eb"},this.terminalsTable.columnData.map((t=>t)))),e(c,{key:"6309ec4f6a4cbafeb068192a95afa42288b6d900"},e(n,{key:"62cd851290e81aee8f96066bd8a6e7892d797513",columnSpan:this.terminalsTable.columnKeys.length,isLoading:this.loading}),e(p,{key:"ff26f57ec23766361290113889a4c85f6c6ecee9",isEmpty:this.showEmptyState,columnSpan:this.terminalsTable.columnKeys.length}),e(m,{key:"6ee48938a04a465ff189dcab515e8300e38e9ed8",columnSpan:this.terminalsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalsTable.rowData.map(((t,s)=>e(d,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e(f,{key:"5eac0724e3e65a5394fc026804f131a8b6c6116c"},e(b,{key:"cd4fcf88e4729d15722b8b75cb21796cfbbf9f20"},e(u,{key:"eb6618e74f0b5689e0c0a8266f0c76a10e98fe36",colSpan:this.terminalsTable.columnData.length},e("pagination-menu",{key:"f2454d466c09357f9b59dd55be0b2ef629ef073a",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getTerminals:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{v as terminals_list_core}
@@ -1 +0,0 @@
1
- import{r as s,c as i,h as t}from"./p-kpoIU4v_.js";import{f as e}from"./p-DIxPWgIk.js";import{C as o}from"./p-5B_nojEF.js";import{C as a}from"./p-SdntD1xf.js";import{v as d,i as r,a as c,H as h}from"./p-D-vUkGsU.js";import{B as n}from"./p-BvLgDun_.js";import{S as l}from"./p-CRFzwZW6.js";import{S as f}from"./p-BGUDiFCH.js";import{A as m,T as p}from"./p-CVGBVdVC.js";import{H as v}from"./p-zRPvfo_G.js";import"./p-CZfYo5-1.js";import"./p-7WIgS5RM.js";const b=class{constructor(t){s(this,t),this.submitEvent=i(this,"submit-event"),this.errorEvent=i(this,"error-event"),this.loaded=i(this,"loaded"),this.hasLoadedFonts=!1,this.renderState="loading",this.creatingNewPaymentMethod=!1,this.insuranceToggled=!1,this.completeCheckout=async s=>{this.complete({payment:s,onSuccess:this.onSubmitted,onError:this.onError})},this.onSubmitted=s=>{this.submitEvent.emit({response:s}),this.renderState="success"},this.onError=({error:s,code:i,severity:t})=>{this.serverError=s,this.errorEvent.emit({errorCode:i,message:s,severity:t}),this.renderState="error"}}async fillBillingForm(s){this.paymentMethodOptionsRef.fillBillingForm(s)}async validate(){const s=d(),{isValid:i}=await this.paymentMethodOptionsRef.validate();return s.isValid&&i?{isValid:!0}:{isValid:!1}}componentWillLoad(){this.getCheckout&&(this.fetchData(),r("set",(s=>{const i=c[s];void 0!==i&&(this.insuranceToggled=i,this.fetchData())})))}fetchData(){this.renderState="loading",this.getCheckout({onSuccess:({checkout:s})=>{this.checkout=new o(s);const{status:i}=this.checkout;this.loaded.emit({checkout_status:i}),this.renderState="success"},onError:({error:s,code:i,severity:t})=>{this.serverError=s,this.renderState="error",this.errorEvent.emit({errorCode:i,message:s,severity:t})}})}async submit(s){var i;s.preventDefault(),this.renderState="loading";const t=d(),e=await this.paymentMethodOptionsRef.resolvePaymentMethod(t);e.validationError?this.renderState="error":e.error?(this.renderState="error",this.serverError=e.error.message,this.onError({code:e.error.code,error:e.error.message,severity:a.ERROR})):e.token?this.completeCheckout({payment_mode:"ecom",payment_token:e.token}):"success"===(null===(i=e.bnpl)||void 0===i?void 0:i.status)?this.completeCheckout({payment_mode:"bnpl"}):this.renderState="error"}get isLoading(){return"loading"===this.renderState}get isError(){return"error"===this.renderState}get paymentType(){var s,i,e,o,a;return t("section",null,t("div",{class:!this.isLoading&&"visually-hidden"},t(f,{height:"300px"})),t("div",{class:this.isLoading&&"visually-hidden"},t("justifi-payment-method-options",{ref:s=>this.paymentMethodOptionsRef=s,"show-card":!this.disableCreditCard,"show-ach":!this.disableBankAccount,"show-bnpl":!this.disableBnpl,paymentMethodGroupId:null===(s=this.checkout)||void 0===s?void 0:s.payment_method_group_id,"show-saved-payment-methods":!this.disablePaymentMethodGroup,hideCardBillingForm:this.hideCardBillingForm,hideBankAccountBillingForm:this.hideBankAccountBillingForm,bnpl:null===(i=this.checkout)||void 0===i?void 0:i.bnpl,authToken:this.authToken,"account-id":null===(e=this.checkout)||void 0===e?void 0:e.account_id,savedPaymentMethods:(null===(o=this.checkout)||void 0===o?void 0:o.payment_methods)||[],paymentAmount:null===(a=this.checkout)||void 0===a?void 0:a.payment_amount,insuranceToggled:this.insuranceToggled})))}get summary(){var s,i;return t("section",null,t("div",{class:!this.isLoading&&"visually-hidden"},t(f,{height:"24px"})),t("div",{class:this.isLoading&&"visually-hidden"},t("div",{part:m},null===(s=this.checkout)||void 0===s?void 0:s.payment_description),t("div",null,t("span",{part:m},"Total")," ",t("span",{part:m},e(+(null===(i=this.checkout)||void 0===i?void 0:i.total_amount))))))}render(){return t(l,{key:"2fb8b2c2b543712023c74cf9b41dc57675c89237"},t("div",{key:"caba36e076e4162d9c92844f7c0632b5bf678de6",class:"row gy-3 jfi-checkout-core"},t("div",{key:"6a27d64005d785815d5567894d6e2a6e1e515cf8",class:"col-12",part:p},t(h,{key:"645fe4250331805e86811700b453458f065188bd",text:"Summary",class:"fs-5 fw-bold pb-3"}),this.summary),t("div",{key:"c49c73eb3462ad17e0344e74be508abe958a9358",class:"col-12"},t("slot",{key:"be626bff57c95b92f9853e2e9b63dd9279834142",name:"insurance"})),t("div",{key:"025b0400164935f10d6c79d445bfdcf157290fd6",class:"col-12 mt-4"},t(h,{key:"483b5d53b5cea3ae6fccfbb3aa9d3efe0dc8fcab",text:"Payment",class:"fs-5 fw-bold pb-3"}),t(v,{key:"21abbd4d669e351c8ad0a87b7b408a4998948b46",text:"Select payment type",class:"fs-6 fw-bold lh-lg"}),t("div",{key:"9441e97e1bd64b796ebcf1404d4ca04964990982",class:"d-flex flex-column"},this.paymentType)),t("div",{key:"9db2e4fccff5b868e7d329d9b0be864942adcc3d",class:"col-12"},t("div",{key:"2eaef4ed6062b27de2516de7b71a056c829f8cab",class:"d-flex justify-content-end"},t(n,{key:"505869afa61094d628b58a32749c44f678e4fda3",type:"submit",variant:"primary",onClick:s=>this.submit(s),disabled:this.isLoading,isLoading:this.isLoading,style:{width:"100%"}},"Pay")))))}};export{b as justifi_checkout_core}
@@ -1 +0,0 @@
1
- import{r as s,c as t,h as r}from"./p-kpoIU4v_.js";import{A as o}from"./p-CZ8q2CPi.js";import{C as i,a as e}from"./p-SdntD1xf.js";import"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-7MWRbTXI.js";import{g as a,a as p}from"./p-C5RuuShs.js";import{E as n}from"./p-DkaX7Taq.js";import{c as h,J as c}from"./p-BZ70sqbi.js";import"./p-9y5MOK55.js";import"./p-7WIgS5RM.js";import"./p-DIxPWgIk.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-CVGBVdVC.js";import"./p-DwtqmD1M.js";const m=o();class u{async fetchGrossVolumeChartData(s,t){return m.get({endpoint:`account/${s}/reports/gross_volume`,authToken:t})}}const d=class{constructor(r){s(this,r),this.errorEvent=t(this,"error-event"),this.errorMessage=null,this.handleErrorEvent=s=>{this.errorMessage=s.detail.message,this.errorEvent.emit(s.detail)}}componentWillLoad(){h(),this.analytics=new c(this),this.initializeGetGrossPayment()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}propChanged(){this.initializeGetGrossPayment()}initializeGetGrossPayment(){this.accountId&&this.authToken?this.getGrossPayment=(({id:s,authToken:t,service:r})=>async({onSuccess:o,onError:e})=>{var n;try{const h=await r.fetchGrossVolumeChartData(s,t);h.error?e({error:p(h.error),code:a(null===(n=h.error)||void 0===n?void 0:n.code),severity:i.ERROR}):o(h.data)}catch(s){const t=a(null==s?void 0:s.code);e({error:p(s),code:t,severity:i.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new u}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:e.MISSING_PROPS,message:this.errorMessage,severity:i.ERROR}))}render(){return this.errorMessage?n(this.errorMessage):r("gross-payment-chart-core",{getGrossPayment:this.getGrossPayment,"onError-event":this.handleErrorEvent})}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{d as justifi_gross_payment_chart}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as e}from"./p-kpoIU4v_.js";import"./p-9y5MOK55.js";import"./p-DIxPWgIk.js";import"./p-SdntD1xf.js";import"./p-5B_nojEF.js";import{p as i}from"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-7MWRbTXI.js";import{T as a,a as r,b as h,c as o,d as c,e as n,f as p,g as d,h as f,i as m,j as u,k as b,l as g}from"./p-CA1oADw4.js";import{T as j}from"./p-CZfYo5-1.js";import{c as y,a as k}from"./p-QxJlhLWM.js";import{o as l,g as C}from"./p-pska2q1M.js";import"./p-7WIgS5RM.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-CVGBVdVC.js";import"./p-lZ9GOnvt.js";import"./p-BRBt7Vt-.js";const v=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event"),this.errorEvent=s(this,"error-event"),this.checkouts=[],this.subAccounts=[],this.loading=!0,this.paging=i,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:j.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:j.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr").dataset.rowEntityId;if(!s)return;const e=this.checkouts.find((t=>t.id===s));this.clickEvent.emit({name:j.row,data:e})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.checkoutsTable=new a(this.checkouts,this.columns,y,k),this.getCheckouts&&this.getSubAccounts&&this.fetchData(),l("set",(()=>{this.pagingParams={}})),l("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getCheckouts({params:this.checkoutParams,onSuccess:async({checkouts:t,pagingInfo:s})=>{this.checkouts=t,this.paging=s,this.checkoutsTable.collectionData=this.checkouts,this.checkoutsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.checkouts=this.checkouts.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get checkoutParams(){const t=C();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.checkouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.checkouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.checkoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e(g,{key:"2e28ecaebdb41c3f1caae3446e50b7c12ae41fd3"},e(r,{key:"91f18d0eb5b540dadb8c3f2ca5e5fdb9fa8c58a6"},e(h,{key:"cb525fc273469ed377c77aa2768ac9591e2c9887"},e(o,{key:"2daca61b401b6ec76003127e203312521031d494"},this.checkoutsTable.columnData.map((t=>t)))),e(c,{key:"54af9509fb1a3e8ca277420bbd52e6cb91af1c16"},e(n,{key:"8361ac7b551d50df31b39d824ac1312eb11dcff4",columnSpan:this.checkoutsTable.columnKeys.length,isLoading:this.loading}),e(p,{key:"774aeed2b5cb2599fe969640aa8676a14ed7961a",isEmpty:this.showEmptyState,columnSpan:this.checkoutsTable.columnKeys.length}),e(d,{key:"d647967604a57d0430935b913eaa155a0b1f807c",columnSpan:this.checkoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.checkoutsTable.rowData.map(((t,s)=>e(f,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e(m,{key:"ff25938a838ca2729262ca6918ae76ff919f50d2"},e(u,{key:"4baaf61f51193dd07d7f8d5a75c2b6068137a2de"},e(b,{key:"2994105ef8df42647f9ad16c6ccbf0365008f41b",colSpan:this.checkoutsTable.columnData.length},e("pagination-menu",{key:"b2f3e86d0c25eed661896e915f8dba72b615e311",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getCheckouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{v as checkouts_list_core}
@@ -1 +0,0 @@
1
- import{r as e,h as a}from"./p-kpoIU4v_.js";import{f as t,p as s,c as r}from"./p-CVQyw7ao.js";import{o as l,q as d,r as i,u as o,v as p}from"./p-CVGBVdVC.js";import{S as f}from"./p-CRFzwZW6.js";import"./p-CZfYo5-1.js";import"./p-9y5MOK55.js";import{c as b,a as c}from"./p-DIxPWgIk.js";import"./p-SdntD1xf.js";import"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import{T as n,a as m}from"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-7MWRbTXI.js";import"./p-7WIgS5RM.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const u=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{t[e]=a},this.handleDateInput=(e,a)=>{const t=b(a,{setExactTime:!0});this.setParamsOnChange(e,t)}}componentWillLoad(){Object.entries({order_status:this.orderStatus,order_type:this.orderType,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([e,a])=>{a&&(s[e]=a)}))}get terminalOrderStatusOptions(){return[{label:"All",value:""},{label:"Created",value:n.created},{label:"Completed",value:n.completed},{label:"Submitted",value:n.submitted},{label:"In Progress",value:n.in_progress},{label:"On Hold",value:n.on_hold},{label:"Canceled",value:n.canceled}]}get terminalOrderTypeOptions(){return[{label:"All",value:""},{label:"Boarding Only",value:m.boardingOnly},{label:"Boarding Shipping",value:m.boardingShipping}]}render(){const e=Object.assign({},t);return a(f,{key:"583766e7fe6e649d4c575b74674c6df3528b9f23"},a("table-filters-menu",{key:"b153c328d120c9f45339b36a05f1f31e95488f05",params:e,clearParams:r,part:l},a("div",{key:"2f8183f040f65592771425b8ef08d8991112de58",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"5d92afe66d4ad1518b02966a7bd20b919481df8d",class:"p-2"},a("form-control-select",{key:"5d9619b0f89917158e3f73dbdd257b3ab9f42798",name:"order_status",label:"Order Status",options:this.terminalOrderStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.orderStatus||t.order_status,disabled:!!this.orderStatus,part:d})),a("div",{key:"149e9cabd81646a1bed3f448472c83b503519c03",class:"p-2"},a("form-control-select",{key:"0124bbb2937fb7f1b83f09253f268d06e057a023",name:"order_type",label:"Order Type",options:this.terminalOrderTypeOptions,inputHandler:this.setParamsOnChange,defaultValue:this.orderType||t.order_type,disabled:!!this.orderType,part:i})),a("div",{key:"e59daa2229b40867eeaf3be94bffda752304186a",class:"p-2"},a("form-control-date",{key:"1a6470d8619c6a5e15499021df8fce7dcc1e7a4c",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:c(this.createdAfter,{showInputDateTime:!0})||c(t.created_after,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdAfter,part:o})),a("div",{key:"63ce4af7c5ce8e84c222de5f279af78d0fe70b98",class:"p-2"},a("form-control-date",{key:"44f2c492dda5bd6ebc215b1b8bcdf12fe8d346e8",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:c(this.createdBefore,{showInputDateTime:!0})||c(t.created_before,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdBefore,part:p})))))}};export{u as justifi_terminal_orders_list_filters}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as a,H as e,g as i}from"./p-kpoIU4v_.js";import{i as r,a as o,b as h,c as n,l as c}from"./p-CVGBVdVC.js";import{F as l}from"./p-vi4XpHew.js";import{F as f}from"./p-CHB0cPw7.js";import"./p-CZfYo5-1.js";const m=class{constructor(a){t(this,a),this.formControlInput=s(this,"formControlInput"),this.formControlBlur=s(this,"formControlBlur"),this.isFocused=!1,this.handleFormControlInput=t=>{const s=t.target,a=s.getAttribute("name");this.inputHandler(a,s.value),this.formControlInput.emit({name:a,value:s.value})},this.updateInput=t=>{const s=this.el.querySelector("input");s&&(s.value=t||"")}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get part(){return this.isFocused&&this.errorText?r:this.isFocused?o:this.errorText?h:n}render(){return a(e,{key:"4b7549a92438ca0c2af28ca1c01c0aafcbafb0b5"},a("div",{key:"4367a89894beca5359a4a1fe6e000b99e89c4cf8",class:"form-group d-flex flex-column"},a("label",{key:"989fa10991b685da0e3419190733c491403a309d",part:c,class:"form-label",htmlFor:this.name},this.label),a("input",{key:"1e1f9d45d9528e12ae2d79933fc2c44e2f739139",id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:this.handleFormControlInput,part:this.part,class:this.errorText?"form-control is-invalid":"form-control",type:"number",disabled:this.disabled}),a(l,{key:"4e57da3b445639563cd60d8481522fdd3450f9b7",helpText:this.helpText,name:this.name}),a(f,{key:"d038896853b604804af4c3f88a33f57c4d4a445f",errorText:this.errorText,name:this.name})))}get el(){return i(this)}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{m as form_control_number}
@@ -1 +0,0 @@
1
- import{r as e,h as a}from"./p-kpoIU4v_.js";import{f as t,p as s,c as r}from"./p-Bt388eye.js";import{k as c,m as f,n as d}from"./p-CVGBVdVC.js";import{S as o}from"./p-CRFzwZW6.js";import"./p-CZfYo5-1.js";import{c as i,a as p}from"./p-DIxPWgIk.js";import"./p-7WIgS5RM.js";const l=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{t[e]=a},this.handleDateInput=(e,a)=>{const t=i(a,{setEndOfDay:!0});this.setParamsOnChange(e,t)}}componentWillLoad(){Object.entries({created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([e,a])=>{a&&(s[e]=a)}))}render(){const e=Object.assign({},t);return a(o,{key:"ee311d3935be35c0849c953252918de4d637dbb9"},a("table-filters-menu",{key:"1236e60bcf7c649cf34b1cbe36dce7acb0367f76",params:e,clearParams:r,part:c},a("div",{key:"994bc577431d951796311faf7e683fc751dd083c",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"8d3094ca700414f7ab9d8f98952dc93e425e5014",class:"p-2"},a("form-control-date",{key:"0d08df3c4f1aeeef5708684b6a29ca951597eb05",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:p(this.createdAfter,{showInputDate:!0})||p(t.created_after,{showInputDate:!0}),disabled:!!this.createdAfter,part:f})),a("div",{key:"f9964f294ffa0116fca10d05680c5bb531c610dc",class:"p-2"},a("form-control-date",{key:"72518f96fc20718817a445c9ea18f2b73d5547fb",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:p(this.createdBefore,{showInputDate:!0})||p(t.created_before,{showInputDate:!0}),disabled:!!this.createdBefore,part:d})))))}};export{l as justifi_payouts_list_filters}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as e}from"./p-kpoIU4v_.js";import"./p-9y5MOK55.js";import"./p-DIxPWgIk.js";import{C as i,a}from"./p-SdntD1xf.js";import"./p-5B_nojEF.js";import{p as r}from"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-7MWRbTXI.js";import{T as o,a as h,b as c,c as n,d as p,e as d,f as m,g as u,h as b,i as f,j as y,k as g,l as j}from"./p-CA1oADw4.js";import{T as l}from"./p-CZfYo5-1.js";import{p as k,a as C}from"./p-BwRi5Eou.js";import{o as v,g as S}from"./p-Bt388eye.js";import"./p-7WIgS5RM.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-CVGBVdVC.js";import"./p-lZ9GOnvt.js";import"./p-CvXbmLtl.js";import"./p-BRBt7Vt-.js";const w=class{constructor(e){t(this,e),this.clickEvent=s(this,"click-event"),this.errorEvent=s(this,"error-event"),this.payouts=[],this.subAccounts=[],this.loading=!0,this.paging=r,this.pagingParams={},this.downloadCSV=t=>{this.getPayoutCSV({payoutId:t,onError:()=>{this.errorEvent.emit({errorCode:a.FETCH_ERROR,message:"Failed to download CSV",severity:i.ERROR})}})},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:l.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:l.next})},this.rowClickHandler=t=>{const s=t.target.closest("tr"),e=s.dataset.rowEntityId;if(!e)return;if(s.querySelector("a")===t.target)return;const i=this.payouts.find((t=>t.id===e));this.clickEvent.emit({name:l.row,data:i})}}updateOnPropChange(){this.fetchData()}componentWillLoad(){this.payoutsTable=new o(this.payouts,this.columns,k,C(this.downloadCSV)),this.getPayouts&&this.getSubAccounts&&this.fetchData(),v("set",(()=>{this.pagingParams={}})),v("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}fetchData(){this.loading=!0,this.getPayouts({params:this.payoutParams,onSuccess:({payouts:t,pagingInfo:s})=>{this.payouts=t,this.paging=s,this.payoutsTable.collectionData=this.payouts,this.payoutsTable.columnKeys.includes("sub_account_name")?this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.payouts=this.payouts.map((t=>{var s;return t.sub_account_name=null===(s=this.subAccounts.find((s=>s.id===t.account_id)))||void 0===s?void 0:s.name,t})),this.loading=!1},onError:({error:t,code:s,severity:e})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:s,message:t,severity:e}),this.loading=!1}})}get payoutParams(){const t=S();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){let t=this.payouts.map((t=>t.account_id));return{sub_account_id:[...new Set(t)].join(",")}}get entityId(){return this.payouts.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.payoutsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return e(j,{key:"45a3a0122a04157f8973b41c9eeb56c93716b1cc"},e(h,{key:"209bf75f732420305b75a562eecaa927c780c4b7"},e(c,{key:"a975d9d91fbeb27f17d745c901c18d31a1f34f5c"},e(n,{key:"0dee293dff0cf126e749a7e105f351468c072298"},this.payoutsTable.columnData.map((t=>t)))),e(p,{key:"e1386e1d3381665bf865e71868dc90748836e7db"},e(d,{key:"0891f85f83515b7bf4c74490ab6631463e3cfd66",columnSpan:this.payoutsTable.columnKeys.length,isLoading:this.loading}),e(m,{key:"62177a9366eda951da44bffe1e0413ec81530465",isEmpty:this.showEmptyState,columnSpan:this.payoutsTable.columnKeys.length}),e(u,{key:"f95aaa35e4d852b41f67092252b79dcbf353ed17",columnSpan:this.payoutsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.payoutsTable.rowData.map(((t,s)=>e(b,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},t)))),this.paging&&e(f,{key:"7b2b4123103664b051ceb9bfb6e8c00317e33e58"},e(y,{key:"bb19ab81d64eac40475505e3e9d2eb735388c0d5"},e(g,{key:"ee44f1fc1b292f3a8df9c93abd8542662dd0c002",colSpan:this.payoutsTable.columnData.length},e("pagination-menu",{key:"c987240448e548256034675e5de769a19a8fea10",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})}))))))}static get watchers(){return{pagingParams:["updateOnPropChange"],getPayouts:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"]}}};export{w as payouts_list_core}
@@ -1 +0,0 @@
1
- import{r as e,h as a}from"./p-kpoIU4v_.js";import"./p-9y5MOK55.js";import"./p-DIxPWgIk.js";import"./p-SdntD1xf.js";import{I as t,a as s}from"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-7MWRbTXI.js";import{f as p,p as l,c as o}from"./p-pska2q1M.js";import{d as r,s as i,p as c}from"./p-CVGBVdVC.js";import{S as d}from"./p-CRFzwZW6.js";import"./p-CZfYo5-1.js";import"./p-7WIgS5RM.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";const m=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{p[e]=a}}componentWillLoad(){Object.entries({status:this.checkoutStatus,payment_mode:this.paymentMode}).forEach((([e,a])=>{a&&(l[e]=a)}))}get checkoutStatusOptions(){return[{label:"All",value:""},{label:"Created",value:t.created},{label:"Completed",value:t.completed},{label:"Attempted",value:t.attempted},{label:"Expired",value:t.expired}]}get checkoutPaymentModeOptions(){return[{label:"All",value:""},{label:"E-commerce",value:s.ecom},{label:"BNPL",value:s.bnpl}]}render(){const e=Object.assign({},p);return a(d,{key:"da4917a79b2d4e5a00627a00036839caeeee1ce1"},a("table-filters-menu",{key:"ad310d55d131b4fcb64ccdcaedcfcd665843cee4",params:e,clearParams:o,part:r},a("div",{key:"9989d0a3e5b6672fb5e78d2c368380768fc34167",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"a6182923403cfa9a4d7217e436acc6ee2133e270",class:"p-2"},a("form-control-select",{key:"4b0314046130feae009a058e180108e9ea848cdc",name:"status",label:"Status",options:this.checkoutStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.checkoutStatus||p.status,disabled:!!this.checkoutStatus,part:i})),a("div",{key:"a9b53a160ef84ca33003c481c4ab07b173d64825",class:"p-2"},a("form-control-select",{key:"ad304f8d8843d386feb90cc1a82259a168445331",name:"payment_mode",label:"Payment Mode",options:this.checkoutPaymentModeOptions,inputHandler:this.setParamsOnChange,defaultValue:this.paymentMode||p.payment_mode,disabled:!!this.paymentMode,part:c})))))}};export{m as justifi_checkouts_list_filters}
@@ -1 +0,0 @@
1
- import{r as s,c as e,h as t,H as i}from"./p-kpoIU4v_.js";import{C as n,a as r}from"./p-SdntD1xf.js";import{m as o,b as a,f as h,g as d}from"./p-BTS3E50C.js";import{B as c,a as u,D as p}from"./p-DZw7v4st.js";import"./p-9y5MOK55.js";import"./p-DIxPWgIk.js";import"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-7MWRbTXI.js";import{c as f,d as l,F as b}from"./p-CR9D6mKt.js";import{A as m}from"./p-CZ8q2CPi.js";import{D as g}from"./p-CVGBVdVC.js";import{a as k,B as y}from"./p-XYgDHrVL.js";import{B as v}from"./p-BvLgDun_.js";import"./p-CZfYo5-1.js";import"./p-C5RuuShs.js";import"./p-7WIgS5RM.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-BFTU3MAI.js";const j=class{constructor(t){s(this,t),this.errorEvent=e(this,"error-event")}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new c}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new c})):this.errorEvent.emit({message:"Missing required props",errorCode:r.MISSING_PROPS,severity:n.ERROR})}render(){return t("justifi-additional-questions-form-step-core",{key:"cdc14a51e5655ce4b4d7c24af613b9146c80ba37",getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},_=class{constructor(t){s(this,t),this.errorEvent=e(this,"error-event")}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new c}),this.postBankAccount=h({authToken:this.authToken,service:new u}),this.postDocumentRecord=d({authToken:this.authToken,service:new p})):this.errorEvent.emit({message:"Missing required props",errorCode:r.MISSING_PROPS,severity:n.ERROR})}render(){return t("justifi-business-bank-account-form-step-core",{key:"0cdd7da1ea31971df421b28f17673bd1a81bf661",businessId:this.businessId,getBusiness:this.getBusiness,postBankAccount:this.postBankAccount,postDocumentRecord:this.postDocumentRecord,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},w=class{constructor(t){s(this,t),this.errorEvent=e(this,"error-event")}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new c}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new c})):this.errorEvent.emit({message:"Missing required props",errorCode:r.MISSING_PROPS,severity:n.ERROR})}render(){return t("justifi-business-core-info-form-step-core",{key:"21d9ea1603f0e9bf6fe842d177f0f6da0113fb73",businessId:this.businessId,getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},C=class{constructor(t){s(this,t),this.errorEvent=e(this,"error-event")}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new c}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new c})):this.errorEvent.emit({message:"Missing required props",errorCode:r.MISSING_PROPS,severity:n.ERROR})}render(){return t(i,{key:"39dcd68b6ef40bb24dfec2da03d420de7ff17f1a"},t("justifi-business-owners-form-step-core",{key:"f9958c7cb798f256106f93a45bcc8405da5f3b49",authToken:this.authToken,businessId:this.businessId,getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s}))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},T=class{constructor(t){s(this,t),this.errorEvent=e(this,"error-event")}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new c}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new c})):this.errorEvent.emit({message:"Missing required props",errorCode:r.MISSING_PROPS,severity:n.ERROR})}render(){return t("justifi-business-representative-form-step-core",{key:"53c23a79fc8c678d98ca016f38fe7e6fe6ad9fba",getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},I=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.formCompleted=e(this,"formCompleted"),this.errors={},this.fetchData=async()=>{this.formLoading.emit(!0);try{const s=await this.api.get({endpoint:this.businessEndpoint,authToken:this.authToken});this.acceptedTermsBefore=s.data.terms_conditions_accepted}catch(s){this.errorEvent.emit({errorCode:r.FETCH_ERROR,message:s.message,severity:n.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.sendData=async s=>{this.formLoading.emit(!0);try{const e=this.termsPayload,t=await this.api.post({endpoint:this.termsConditionsEndpoint,body:e,authToken:this.authToken});this.handleResponse(t,s)}catch(s){this.errorEvent.emit({errorCode:r.POST_ERROR,message:s.message,severity:n.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.inputHandler=(s,e)=>{this.acceptedTerms=e,this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:e}))}}get businessEndpoint(){return`entities/business/${this.businessId}`}get termsConditionsEndpoint(){return"entities/terms_and_conditions"}get formHelperText(){return this.acceptedTermsBefore?"You have already accepted the terms and conditions.":null}get termsPayload(){return{business_id:this.businessId,accepted:this.formController.values.getValue().accepted,user_agent:window.navigator.userAgent}}async componentWillLoad(){this.api=m(),this.formController=new b((s=>{const e=f({accepted:l().oneOf([!0],"You must agree to the terms and conditions to continue").required("You must agree to the terms and conditions to continue")}),t=f({accepted:l().nullable()});return s?t:e})(this.allowOptionalFields)),this.businessId&&this.authToken&&this.fetchData()}handleResponse(s,e){s.error?this.errorEvent.emit({errorCode:r.POST_ERROR,message:s.error.message,severity:n.ERROR,data:s.error}):e(),this.stepCompleteEvent.emit({response:s,formStep:k.termsAndConditions}),this.formCompleted.emit()}async validateAndSubmit({onSuccess:s}){this.acceptedTermsBefore?(this.stepCompleteEvent.emit({response:null,formStep:k.termsAndConditions,metadata:"no data submitted"}),this.formCompleted.emit(),s()):this.formController.validateAndSubmit((()=>this.sendData(s)))}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}get merchantAgreementLink(){return t("a",{href:"https://justifi.tech/merchant-agreement/",target:"_blank",rel:"noopener noreferrer"},"merchant agreement")}render(){return t("form",{key:"c1ca0ecd364a999e7525e9ac3da82e874a8784e8"},t("fieldset",{key:"a77178a38044c458d8dbd31a7e1aeb3f1a34c968"},t("legend",{key:"7e933517fca8d54095466715bf1f0485625be74f",part:g},"Terms and Conditions"),t("hr",{key:"1c1da0b7378c51ad2be5efc0e51dedd3ed178c8f"}),t("div",{key:"bc37aa5162dddc8ade4316b5f24deb1d4a4b6f86"},t("p",{key:"aef3d0c9186845e3f44b8e1906c405647f489b53"},"Please read and accept the ",this.merchantAgreementLink," to submit your provisioning request.")),t("br",{key:"2a6a480916cc0c4bf35d96c96c3f0250e87149cb"}),t("div",{key:"2e3bed3a57bcb026152fcdc82debab0e667f8148",class:"row-gy-3"},t("div",{key:"3243c1819e4e61921421467271b2a4d2a89e73d4",class:"col-12"},t("form-control-checkbox",{key:"20b9b72809148ef390a6da7d9f5bc216436d34a5",name:"accepted",label:"I agree to the terms and conditions",inputHandler:this.inputHandler,errorText:this.errors.accepted,disabled:this.acceptedTermsBefore,helpText:this.formHelperText,checked:this.acceptedTerms})))))}},S=class{constructor(t){s(this,t),this.errorEvent=e(this,"error-event")}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new c}),this.patchBusiness=a({authToken:this.authToken,businessId:this.businessId,service:new c})):this.errorEvent.emit({message:"Missing required props",errorCode:r.MISSING_PROPS,severity:n.ERROR})}render(){return t("justifi-legal-address-form-step-core",{key:"65d876bee76f4deb4df115e636fafaef2c883f24",getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},B=class{constructor(e){s(this,e)}get showPreviousStepButton(){return this.currentStep>0}get showNextStepButton(){return this.currentStep<this.totalSteps}get showSubmitButton(){return this.currentStep===this.totalSteps}render(){return t("div",{key:"7c793a33752cd9b3dd1ebc6c30b7a98002ef8820",class:"d-flex gap-2"},t(v,{key:"5127c233ef8c819fe17204baaff7370d78ec70e7",variant:"secondary",type:"button",onClick:()=>this.previousStepButtonOnClick(),disabled:this.formDisabled,hidden:!this.showPreviousStepButton},"Previous"),t(v,{key:"d889e96935718eb333eaac70023fd7b273118676",variant:"primary",type:"button",onClick:s=>this.nextStepButtonOnClick(s,y.nextStep),disabled:this.formDisabled,isLoading:this.formLoading,hidden:!this.showNextStepButton},"Next"),t(v,{key:"5502d7d73084119862451389bf85705407187016",variant:"primary",type:"submit",onClick:s=>this.nextStepButtonOnClick(s,y.submit),disabled:this.formDisabled,isLoading:this.formLoading,hidden:!this.showSubmitButton},"Submit"))}},A=class{constructor(e){s(this,e),this.allowOptionalFields=!1,this.componentStepMapping={0:()=>t("justifi-business-core-info-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[0]=s,allowOptionalFields:this.allowOptionalFields}),1:()=>t("justifi-legal-address-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[1]=s,allowOptionalFields:this.allowOptionalFields}),2:()=>t("justifi-additional-questions-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[2]=s,allowOptionalFields:this.allowOptionalFields}),3:()=>t("justifi-business-representative-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[3]=s,allowOptionalFields:this.allowOptionalFields}),4:()=>t("justifi-business-owners-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[4]=s,allowOptionalFields:this.allowOptionalFields}),5:()=>t("justifi-business-bank-account-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[5]=s,allowOptionalFields:this.allowOptionalFields}),6:()=>t("justifi-business-terms-conditions-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[6]=s,onFormLoading:this.handleFormLoading,allowOptionalFields:this.allowOptionalFields})}}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}render(){return t("div",{key:"f25bbaeeac7ea49b2d99f746af0aec7b637d879a",class:"col-12 mb-4"},this.currentStepComponent)}};export{j as justifi_additional_questions_form_step,_ as justifi_business_bank_account_form_step,w as justifi_business_core_info_form_step,C as justifi_business_owners_form_step,T as justifi_business_representative_form_step,I as justifi_business_terms_conditions_form_step,S as justifi_legal_address_form_step,B as justifi_payment_provisioning_form_buttons,A as justifi_payment_provisioning_form_steps}
@@ -1 +0,0 @@
1
- import{h as t,r as s,c as e}from"./p-kpoIU4v_.js";import{a as i,b as r}from"./p-DSP8qjHL.js";import{F as o,c as n,b as a}from"./p-CR9D6mKt.js";import{A as l,C as h,R as c,c as d}from"./p-BlJnA265.js";import{C as u,P as m}from"./p-B-iV5cYd.js";import{D as p}from"./p-CVGBVdVC.js";import{S as f}from"./p-BGUDiFCH.js";import"./p-CZfYo5-1.js";import{a as v,r as b,s as y,b as g}from"./p-yH3TC3ZQ.js";import{a as w,B as _}from"./p-XYgDHrVL.js";import{E as x,h as j,i as S}from"./p-DZgAEPoo.js";import{z as k,A as T,B as C,y as O,C as D,D as L}from"./p-CYBR4K2p.js";import"./p-9y5MOK55.js";import"./p-DIxPWgIk.js";import{C as H,a as E}from"./p-SdntD1xf.js";import"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import"./p-7MWRbTXI.js";import{n as V}from"./p-BnjCmwMr.js";import{B}from"./p-BvLgDun_.js";import{i as A,a as P}from"./p-PgEzcvI6.js";import{S as I}from"./p-BX8GieXu.js";import"./p-BFTU3MAI.js";import"./p-Dt-vy9Le.js";import"./p-7WIgS5RM.js";class W{constructor(t){this.id=t.id,this.account_owner_name=t.account_owner_name,this.full_name=t.full_name,this.account_type=t.account_type,this.account_number=t.account_number,this.acct_last_four=t.acct_last_four,this.account_number_last4=t.account_number_last4,this.routing_number=t.routing_number,this.bank_name=t.bank_name,this.country=t.country,this.currency=t.currency,this.nickname=t.nickname,this.metadata=t.metadata,this.business_id=t.business_id,this.platform_account_id=t.platform_account_id,this.created_at=t.created_at,this.updated_at=t.updated_at}get payload(){return{account_owner_name:this.account_owner_name||"",account_type:this.account_type||"",account_number:this.account_number||"",routing_number:this.routing_number||"",bank_name:this.bank_name||"",nickname:this.nickname||"",business_id:this.business_id||""}}}const F=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(f,{width:"25%"})),t("div",{class:"col-12"},t(f,{width:"100%"})),t("div",{class:"col-12 d-flex gap-3"},t(f,{width:"50%"}),t(f,{width:"50%"})),t("div",{class:"col-12 d-flex gap-3"},t(f,{width:"65%"}),t(f,{width:"35%"}))),U=()=>t("div",{class:"row gap-5"},t("div",{class:"col-12"},t(f,{width:"40%",height:"40px"})),t(F,null),t(F,null),t(F,null)),R=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.additional_questions={},this.recurringPayments=!1,this.isLoading=!1,this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.additional_questions=new l(t.data.additional_questions||{}),this.formController.setInitialValues(Object.assign({},this.additional_questions))},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{s=e,t()},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:w.additionalQuestions}),this.formLoading.emit(!1)}})},this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s})),this.additional_questions=new l(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}recurringPaymentsWatcher(t){this.recurringPayments="Yes"===(null==t?void 0:t.business_recurring_payments)}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{additional_questions:new l(this.formController.values.getValue()).payload}}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(i(this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){var s,e,i,r,o,n,a;const l=this.formController.getInitialValues();return this.isLoading?t(U,null):t("form",null,t("fieldset",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:p},"Additional Questions"),t("form-control-tooltip",{helpText:"This information helps us understand the business and identify and monitor trends to safeguard you and your customers."})),t("hr",{class:"mt-2"}),t("div",{class:"row gy-3"},t("div",{class:"col-12 col-md-6"},t("form-control-monetary-provisioning",{name:"business_revenue",label:"What is your business’ estimated annual revenue from its primary business activities?",inputHandler:this.inputHandler,errorText:null===(s=this.errors)||void 0===s?void 0:s.business_revenue,defaultValue:null==l?void 0:l.business_revenue,maskOptions:u.WHOLE})),t("div",{class:"col-12 col-md-6"},t("form-control-monetary-provisioning",{name:"business_payment_volume",label:"What is your business' annual credit card & ACH volume anticipated to process?",inputHandler:this.inputHandler,errorText:null===(e=this.errors)||void 0===e?void 0:e.business_payment_volume,defaultValue:null==l?void 0:l.business_payment_volume,maskOptions:u.WHOLE})),t("div",{class:"col-12"},t("form-control-select",{name:"business_when_service_received",label:"On average, how long after paying will your customers typically receive their goods or services?",inputHandler:this.inputHandler,errorText:null===(i=this.errors)||void 0===i?void 0:i.business_when_service_received,options:v,defaultValue:null==l?void 0:l.business_when_service_received})),t("div",{class:"col-12"},t("form-control-select",{name:"business_recurring_payments",label:"Does your business offer recurring payments?",inputHandler:this.inputHandler,errorText:null===(r=this.errors)||void 0===r?void 0:r.business_recurring_payments,options:b,defaultValue:null==l?void 0:l.business_recurring_payments})),t("div",{class:"col-12",hidden:!this.recurringPayments},t("form-control-text",{name:"business_recurring_payments_percentage",label:"What percent of revenue is generated from each recurring payment type offered?",inputHandler:this.inputHandler,errorText:null===(o=this.errors)||void 0===o?void 0:o.business_recurring_payments_percentage,defaultValue:null==l?void 0:l.business_recurring_payments_percentage,helpText:"For example: 50% monthly, 50% annual."})),t("div",{class:"col-12"},t("form-control-select",{name:"business_seasonal",label:"Is this business seasonal?",inputHandler:this.inputHandler,errorText:null===(n=this.errors)||void 0===n?void 0:n.business_seasonal,options:y,defaultValue:null==l?void 0:l.business_seasonal})),t("div",{class:"col-12"},t("form-control-text",{name:"business_other_payment_details",label:"Is there anything else you would like us to know about how your customers pay the business? (optional)",inputHandler:this.inputHandler,errorText:null===(a=this.errors)||void 0===a?void 0:a.business_other_payment_details,defaultValue:null==l?void 0:l.business_other_payment_details})))))}static get watchers(){return{additional_questions:["recurringPaymentsWatcher"]}}},q=(t,s)=>t.some((t=>t.document_type===s)),N="Please upload either a voided check or a bank statement. Only one is required.",Y=(t,s)=>{const e=q(t,x.voidedCheck),i=q(t,x.bankStatement),r=e||i,o=n().shape({bank_name:L.required("Enter bank name"),nickname:D.required("Enter nickname"),account_owner_name:O.required("Enter account owner name"),account_type:C.required("Select account type"),account_number:T.required("Enter account number"),routing_number:k.required("Enter routing number"),voided_check:a().when("bank_statement",{is:t=>!t&&!r,then:t=>t.required(N),otherwise:t=>t.notRequired()}),bank_statement:a().when("voided_check",{is:t=>!t&&!r,then:t=>t.required(N),otherwise:t=>t.notRequired()})},[["voided_check","bank_statement"]]),l=n({bank_name:L.nullable(),nickname:D.nullable(),account_owner_name:O.nullable(),account_type:C.nullable(),account_number:T.nullable(),routing_number:k.nullable(),voided_check:a().nullable(),bank_statement:a().nullable()});return s?l:o},M=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.bankAccount={},this.existingDocuments=[],this.documentData=new j,this.isLoading=!1,this.initializeFormController=()=>{this.formController=new o(Y(this.existingDocuments,this.allowOptionalFields)),this.formController.setInitialValues(Object.assign({},this.bankAccount)),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))},this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))},this.storeFiles=t=>{const s=Array.from(t.detail.fileList),e=t.detail.document_type,i=s.map((t=>new S({file:t,document_type:e},this.businessId)));this.documentData[e]=i},this.getData=()=>{this.isLoading=!0,this.getBusiness({onSuccess:t=>{t.data.bank_accounts.length>0?this.bankAccount=new W(t.data.bank_accounts[0]):(this.bankAccount=new W({}),this.bankAccount.business_id=this.businessId),this.existingDocuments=t.data.documents},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.initializeFormController(),this.isLoading=!1}})},this.postDocumentRecordData=async t=>{this.isLoading=!0;const s=t.record_data;return new Promise((e=>{this.postDocumentRecord({payload:s,onSuccess:s=>{e(this.handleDocRecordResponse(t,s))},onError:({error:t,code:s,severity:i})=>{this.errorEvent.emit({message:t,errorCode:s,severity:i}),e(!1)}})}))},this.handleDocRecordResponse=(t,s)=>s.error?(this.errorEvent.emit({errorCode:E.POST_ERROR,message:s.error.message,severity:H.ERROR,data:s.error}),!1):(t.setPresignedUrl(s.data.presigned_url),!0),this.uploadDocument=async t=>{if(!t.presigned_url)throw new Error("Presigned URL is not set");const s=await t.getFileData(),e=await fetch(t.presigned_url,{method:"PUT",body:s});return this.handleUploadResponse(e)},this.handleUploadResponse=t=>!t.error||(this.errorEvent.emit({errorCode:E.POST_ERROR,message:t.error.message,severity:H.ERROR,data:t.error}),!1)}watchHandler(t){this.formLoading.emit(t)}async validateAndSubmit({onSuccess:t}){this.existingBankAccount?this.sendData(t):this.formController.validateAndSubmit((()=>this.sendData(t)))}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(Y(this.existingDocuments,this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}get postPayload(){return new W(this.formController.values.getValue()).payload}get existingBankAccount(){var t;return!!(null===(t=this.bankAccount)||void 0===t?void 0:t.id)}async sendData(t){try{if(!this.existingBankAccount&&!await this.postBankAccountData())return;if(!await this.postBusinessDocuments())return;t()}catch(t){this.errorEvent.emit({message:t,errorCode:E.POST_ERROR,severity:H.ERROR})}}async postBankAccountData(){let t;return this.isLoading=!0,new Promise((s=>{let e=!1;this.postBankAccount({payload:this.postPayload,onSuccess:s=>{t=s,e=!0},onError:({error:t,code:s,severity:i})=>{e=!1,this.errorEvent.emit({message:t,errorCode:s,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:t,formStep:w.bankAccount}),this.isLoading=!1,s(e)}})}))}async postBusinessDocuments(){this.isLoading=!0;try{const t=Object.values(this.documentData).flat();return!t.length||!(await Promise.all(t.map((t=>this.postDocumentRecordData(t))))).includes(!1)&&!(await Promise.all(t.map((t=>this.uploadDocument(t))))).includes(!1)}finally{this.isLoading=!1}}render(){const s=this.formController.getInitialValues();return this.isLoading?t(U,null):t("form",null,t("fieldset",{class:"mb-4"},t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:p},"Bank Account Info"),t("form-control-tooltip",{helpText:"This direct deposit account is the designated bank account where incoming funds will be deposited. The name of this account must match the registered business name exactly. We are not able to accept personal accounts unless your business is a registered sole proprietorship."})),t("hr",{class:"mt-2"}),t("bank-account-form-inputs",{defaultValue:s,errors:this.errors,inputHandler:this.inputHandler,formDisabled:this.existingBankAccount})),t("fieldset",{class:"mt-4"},t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:p},"Document Uploads"),t("form-control-tooltip",{helpText:"One document (voided check or bank statement) is required for underwriting purposes. It needs to visibly show the name tied to the account and the account number. Various file formats such as PDF, DOC, DOCX, JPEG are accepted. Multiple files can be uploaded for each document category."})),t("hr",{class:"mt-2"}),t("business-documents-on-file",{documents:this.existingDocuments,isLoading:this.isLoading}),t("bank-account-document-form-inputs",{inputHandler:this.inputHandler,errors:this.errors,storeFiles:this.storeFiles})))}static get watchers(){return{isLoading:["watchHandler"]}}},X=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.coreInfo={},this.isLoading=!1,this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.coreInfo=new h(t.data),this.formController.setInitialValues(Object.assign({},this.coreInfo))},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{s=e,t()},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:w.businessInfo}),this.formLoading.emit(!1)}})},this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return new h(this.formController.values.getValue()).payload}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(r(this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){const s=this.formController.getInitialValues();return this.isLoading?t(U,null):t("form",null,t("fieldset",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:p},"Business Information")),t("hr",{class:"mt-2"}),t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-text",{name:"legal_name",label:"Business Name",defaultValue:s.legal_name,errorText:this.errors.legal_name,inputHandler:this.inputHandler,helpText:"Enter this exactly as it appears on your tax records (don't use acronyms or abbreviations unless you registered that way)."})),t("div",{class:"col-12"},t("form-control-text",{name:"doing_business_as",label:"Doing Business As (DBA)",defaultValue:s.doing_business_as,errorText:this.errors.doing_business_as,inputHandler:this.inputHandler,helpText:"Enter this exactly as it appears on your tax records (leave blank if you don't have a registered DBA/trade name)"})),t("div",{class:"col-12 col-md-8"},t("form-control-select",{name:"classification",label:"Business Classification",options:g,defaultValue:s.classification,errorText:this.errors.classification,inputHandler:this.inputHandler})),t("div",{class:"col-12 col-md-4"},t("form-control-date",{name:"date_of_incorporation",label:"Date of Incorporation",defaultValue:s.date_of_incorporation,errorText:this.errors.date_of_incorporation,inputHandler:this.inputHandler})),t("div",{class:"col-12 col-md-6"},t("form-control-text",{name:"industry",label:"Industry",defaultValue:s.industry,errorText:this.errors.industry,inputHandler:this.inputHandler,helpText:"Describe what you sell"})),t("div",{class:"col-12 col-md-6"},t("form-control-text",{name:"tax_id",label:"Tax ID (EIN or SSN)",defaultValue:s.tax_id,errorText:this.errors.tax_id,inputHandler:this.inputHandler,keyDownHandler:V,maxLength:9,helpText:"Employer Identification Numbers (EINs) are nine digits. The federal tax identification number/EIN issued to you by the IRS. It can be found on your tax returns. Enter value without dashes."})),t("div",{class:"col-12"},t("form-control-text",{name:"website_url",label:"Business Website URL",defaultValue:s.website_url,errorText:this.errors.website_url,inputHandler:this.inputHandler,helpText:"Don't have a live website? You can use your social media business page, app store link, or staging site URL."})),t("div",{class:"col-12 col-md-6"},t("form-control-text",{name:"email",label:"Business Email Address",defaultValue:s.email,errorText:this.errors.email,inputHandler:this.inputHandler})),t("div",{class:"col-12 col-md-6"},t("form-control-number-masked",{name:"phone",label:"Business Phone Number",defaultValue:s.phone,errorText:this.errors.phone,inputHandler:this.inputHandler,mask:m.US})))))}},G=class{constructor(t){s(this,t),this.clickEvent=e(this,"click-event"),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.ownersPayload=[],this.refs=[],this.isLoading=!1,this.matchRef=(t,s)=>{const e=this.refs.findIndex((t=>t===s));-1!==e&&(this.refs[e]=t)},this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{t.data.owners.length?this.ownersPayload=t.data.owners.map((t=>({id:t.id}))):this.addOwnerForm()},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1,this.manageRefs()}})},this.sendData=async t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:{owners:this.ownersPayload},onSuccess:e=>{s=e,t()},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:w.owners}),this.formLoading.emit(!1)}})},this.addOwnerForm=t=>{this.newFormOpen=!0,this.ownersPayload=[...this.ownersPayload,{id:""}],t&&this.clickEvent.emit({name:_.addOwnerForm})},this.removeOwnerForm=t=>{this.ownersPayload=this.ownersPayload.filter((s=>s.id!==t)),this.newFormOpen&&(this.newFormOpen=!1)}}get showAddOwnerButton(){return this.ownersPayload.length<4&&!this.newFormOpen}manageRefs(){this.refs=this.ownersPayload.map((t=>t.id))}async validateAndSubmit({onSuccess:t}){const s=this.refs.map((t=>t.validate()));if(!(await Promise.all(s)).every((t=>t)))return;const e=this.refs.map((t=>t.submit()));(await Promise.all(e)).every((t=>t))&&this.sendData(t)}componentWillLoad(){this.getBusiness&&this.getData()}ownersWatcher(){this.manageRefs()}handleOwnerSubmit(t){const s=t.detail,e=this.ownersPayload.map((t=>t.id===s.id?s:t));e.includes(s)||(e[this.ownersPayload.findIndex((t=>!t.id))]=s,this.newFormOpen&&(this.newFormOpen=!1)),this.ownersPayload=e}render(){return this.isLoading?t(U,null):t("div",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:p},"Owners"),t("form-control-tooltip",{helpText:"For partnerships, LLCs or privately held corporations, the business is required to apply with all individuals with 25% or more ownership to the application. For charities and registered non-profits, the business is required to apply with 1 individual with substantial control over the entity, such as a board member or director."})),t("hr",{class:"mt-2"}),t("div",{class:"row gy-3"},this.ownersPayload.map((s=>t("justifi-owner-form",{key:s.id,authToken:this.authToken,businessId:this.businessId,ownerId:s.id,removeOwner:this.removeOwnerForm,newFormOpen:this.newFormOpen,ownersLength:this.ownersPayload.length,allowOptionalFields:this.allowOptionalFields,ref:t=>this.matchRef(t,s.id)})))),t("div",{class:"d-flex justify-content-start"},t("div",{class:"gap-2"},t(B,{variant:"primary",onClick:()=>this.addOwnerForm(!0),hidden:!this.showAddOwnerButton},"Add Owner"))))}static get watchers(){return{ownersPayload:["ownersWatcher"]}}},K=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.representative={},this.isLoading=!1,this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.representative=new c(t.data.representative||{}),this.formController.setInitialValues(Object.assign({},this.representative))},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{s=e,t()},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:w.representative}),this.formLoading.emit(!1)}})}}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{representative:new c(this.formController.values.getValue()).payload}}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(A("representative",this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){return this.isLoading?t(U,null):t("justifi-business-representative-form-inputs",{representativeDefaultValue:this.formController.getInitialValues(),errors:this.errors,formController:this.formController})}},Z=class{constructor(t){s(this,t),this.stepCompleteEvent=e(this,"complete-form-step-event"),this.errorEvent=e(this,"error-event"),this.formLoading=e(this,"formLoading"),this.errors={},this.legal_address={},this.isLoading=!1,this.getData=()=>{this.formLoading.emit(!0),this.isLoading=!0,this.getBusiness({onSuccess:t=>{this.legal_address=new d(t.data.legal_address||{}),this.formController.setInitialValues(Object.assign({},this.legal_address))},onError:({error:t,code:s,severity:e})=>{this.errorEvent.emit({message:t,errorCode:s,severity:e})},final:()=>{this.formLoading.emit(!1),this.isLoading=!1}})},this.sendData=t=>{let s;this.formLoading.emit(!0),this.patchBusiness({payload:this.patchPayload,onSuccess:e=>{s=e,t()},onError:({error:t,code:e,severity:i})=>{s=t,this.errorEvent.emit({message:t,errorCode:e,severity:i})},final:()=>{this.stepCompleteEvent.emit({response:s,formStep:w.legalAddress}),this.formLoading.emit(!1)}})},this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}async validateAndSubmit({onSuccess:t}){this.formController.validateAndSubmit((()=>this.sendData(t)))}get patchPayload(){return{legal_address:new d(this.formController.values.getValue()).payload}}componentWillLoad(){this.getBusiness&&this.getData(),this.formController=new o(P(this.allowOptionalFields))}componentDidLoad(){this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}render(){var s,e,i,r,o,n;const a=this.formController.getInitialValues();return this.isLoading?t(U,null):t("form",null,t("fieldset",null,t("div",{class:"d-flex align-items-center gap-2"},t("legend",{class:"mb-0",part:p},"Legal Address of your Business"),t("form-control-tooltip",{helpText:"No PO Boxes."})),t("hr",{class:"mt-2"}),t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-text",{name:"line1",label:"Legal Address",inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.line1,errorText:null===(s=this.errors)||void 0===s?void 0:s.line1})),t("div",{class:"col-12"},t("form-control-text",{name:"line2",label:"Address Line 2 (optional)",inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.line2,errorText:null===(e=this.errors)||void 0===e?void 0:e.line2})),t("div",{class:"col-12"},t("form-control-text",{name:"city",label:"City",inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.city,errorText:null===(i=this.errors)||void 0===i?void 0:i.city})),t("div",{class:"col-12"},t("form-control-select",{name:"state",label:"State",options:I,inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.state,errorText:null===(r=this.errors)||void 0===r?void 0:r.state})),t("div",{class:"col-12"},t("form-control-text",{name:"postal_code",label:"Postal Code",inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.postal_code,errorText:null===(o=this.errors)||void 0===o?void 0:o.postal_code,maxLength:5,keyDownHandler:V})),t("div",{class:"col-12"},t("form-control-select",{name:"country",label:"Country",options:[{label:"United States",value:"USA"}],inputHandler:this.inputHandler,defaultValue:null==a?void 0:a.country,errorText:null===(n=this.errors)||void 0===n?void 0:n.country,disabled:!0})))))}};export{R as justifi_additional_questions_form_step_core,M as justifi_business_bank_account_form_step_core,X as justifi_business_core_info_form_step_core,G as justifi_business_owners_form_step_core,K as justifi_business_representative_form_step_core,Z as justifi_legal_address_form_step_core}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as i}from"./p-kpoIU4v_.js";import{C as r,a as o}from"./p-SdntD1xf.js";import{c as e,J as a}from"./p-BZ70sqbi.js";import{T as p}from"./p-DT-cTREr.js";import"./p-9y5MOK55.js";import"./p-DIxPWgIk.js";import"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import{b as n}from"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-7MWRbTXI.js";import{g as c,a as m}from"./p-C5RuuShs.js";import{m as h,S as d}from"./p-DAasymX_.js";import{S as u}from"./p-CRFzwZW6.js";import"./p-CZfYo5-1.js";import{d as j}from"./p-PmGAGJ5K.js";import"./p-DwtqmD1M.js";import"./p-CZ8q2CPi.js";import"./p-7WIgS5RM.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-BRBt7Vt-.js";import"./p-CVGBVdVC.js";const l=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(){e(),this.analytics=new a(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetTerminals(),this.initializeGetSubAccounts()}initializeGetTerminals(){this.accountId&&this.authToken?this.getTerminals=(({id:t,authToken:s,service:i})=>async({params:o,onSuccess:e,onError:a})=>{var p,h;try{const d=await i.fetchTerminals(t,s,o);if(d.error)return a({error:m(d.error),code:c(null===(h=d.error)||void 0===h?void 0:h.code),severity:r.ERROR});{const t=Object.assign({},d.page_info);e({terminals:(null===(p=d.data)||void 0===p?void 0:p.map((t=>new n(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return a({error:t.message||t,code:s,severity:r.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new p}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:this.errorMessage,severity:r.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=h({accountId:this.accountId,authToken:this.authToken,service:new d}))}render(){return i(u,{key:"a35e4efef6e52f45e8c2c232bde43afc0f5945ab"},i("terminals-list-core",{key:"46cdde8b97d04760cf1a32f561513dcf42c5dd37",getTerminals:this.getTerminals,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{l as justifi_terminals_list}
@@ -1 +0,0 @@
1
- import"./p-9y5MOK55.js";import"./p-DIxPWgIk.js";import{C as o}from"./p-SdntD1xf.js";import"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import{P as r}from"./p-Y-KcAUY_.js";import"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-7MWRbTXI.js";import{g as s,a as p}from"./p-C5RuuShs.js";const t=({id:t,authToken:i,service:e})=>async({onSuccess:n,onError:a,final:m})=>{var c;try{const m=await e.fetchPayment(t,i);if(m.error){a({error:p(m.error),code:s(null===(c=m.error)||void 0===c?void 0:c.code),severity:o.ERROR})}else n({payment:new r(m.data)})}catch(r){const t=s(null==r?void 0:r.code);a({error:p(r),code:t,severity:o.ERROR})}finally{m()}};export{t as m}
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as s}from"./p-kpoIU4v_.js";import{f as i}from"./p-DIxPWgIk.js";import{A as a,ak as r}from"./p-CVGBVdVC.js";import{B as d}from"./p-BvLgDun_.js";import{S as c}from"./p-CRFzwZW6.js";import{S as o}from"./p-BGUDiFCH.js";import"./p-CZfYo5-1.js";import{C as n,a as h}from"./p-SdntD1xf.js";import{g as p,a as f}from"./p-C5RuuShs.js";import{D as l}from"./p-Cuxr_9xa.js";import{D as u}from"./p-Bg2SZArf.js";import{c as b,J as y}from"./p-BZ70sqbi.js";import"./p-CZ8q2CPi.js";import"./p-9y5MOK55.js";import"./p-7WIgS5RM.js";import"./p-5B_nojEF.js";import"./p-CLHwhyvu.js";import"./p-Y-KcAUY_.js";import"./p-7MWRbTXI.js";import"./p-DZgAEPoo.js";import"./p-BlJnA265.js";import"./p-Dt-vy9Le.js";import"./p-BX8GieXu.js";import"./p-DwtqmD1M.js";const m=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.submitDisputeResponse(t,e,i);if(d.error){return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR})}a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}},v=class{constructor(s){e(this,s),this.clickEvent=t(this,"click-event"),this.errorEvent=t(this,"error-event"),this.submitEvent=t(this,"submit-event")}acceptDispute(){m({disputeId:this.dispute.id,authToken:this.authToken,service:new l})({payload:{forfeit:!0},onSuccess:e=>{this.submitEvent.emit({response:e})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}})}initiateRespondToDispute(){this.clickEvent.emit({name:u.respondToDispute})}render(){var e,t,n,h,p,f,l;return s(c,{key:"1db05d5d0a2a5d6e6b78cc59993505bd4d76ebe7"},this.isLoading&&s("div",{key:"9c89f30960ddf0be3d71c966ca57b569f3ff9d4a",style:{marginBottom:"8px"}},s(o,{key:"e5a2a2bc3ac92eb5ad4195fc88033213a8ece47a",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(o,{key:"0bc0a4d2fada5d327e1931c1fa0d14e96bffdb3e",height:"18px",styles:{marginBottom:"8px"}}),s(o,{key:"3166b2cfc5b45d26e5df4895eacf531e9e65007e",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&s("div",{key:"e466615b698a19c1732cb121e62bb1e3c907dd8c",part:a},s("h1",{key:"e0dcf51f9f23aaa638c4262279e9e09a51ea4fd3",class:"h4",part:r},"This payment is disputed"),s("p",{key:"f6223902379663abfa854238d4da032c0c05c6db"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"2f020f828b56ffad6d304a8b1dbf456fd2bc1566",class:"h5"},"Dispute details"),s("div",{key:"d039822e36ebbda4e16260d475a38099bffb2987",class:"d-table gap-2"},s("div",{key:"f500c5dbe0db03f17eadcecd63fb391650b5dcfd",class:"d-table-row gap-2"},s("span",{key:"663fd1b756692e84a6c1777f3283964cc28d89c2",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"b6740f9c893af1894f41854ccc3ad8f3ea4a078a",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(t=this.dispute)||void 0===t?void 0:t.amount))),s("div",{key:"3ed0b2ad6671aae4ab0e8ca39cff0a5a8b9dd372",class:"d-table-row gap-2"},s("span",{key:"92567e18ffca620b909602b4e3384a633177e804",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"96f921be894d079bfe920d58c1c1b219a8a4908b",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(n=this.dispute)||void 0===n?void 0:n.reason)),s("div",{key:"0d378be43be30460b7f4a029f1b15329ec97e8e4",class:"d-table-row gap-2"},s("span",{key:"77a49b1a543318be776fc5d21e341abf8670527a",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Dispute ID"),s("span",{key:"41de3a05cbaa74975c010de2fad237321a4f58c0",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(h=this.dispute)||void 0===h?void 0:h.id))),s("div",{key:"3f0b6a369b04389428bad7de8b71d3f8718d538b",class:"d-flex gap-2 mt-4 justify-content-end"},s(d,{key:"07ffa21453cf14537441283c280e3a32bc8a7391",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(d,{key:"977c1a385c094d0fa3dac86ecdc128c5b6a76579",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(p=this.dispute)||void 0===p?void 0:p.underReview)&&s("div",{key:"9c58e1b63217f79cddd6bcf2cbba875a321c6c32"},s("h1",{key:"c8feb6609b2da8a8a7ec340cd184cb80ffabdd1f",class:"h4"},"This payment is disputed and under review"),s("p",{key:"a1498ee9a3055028bb5157926ad59b12aeee2925"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(f=this.dispute)||void 0===f?void 0:f.won)&&s("div",{key:"7721a8e37b1b8ad4cc535f83a16c2a5d31c7d70c"},s("h1",{key:"0669edf9efde01f89a75751286cb4ce4601dfc8a",class:"h4"},"This payment was disputed"),s("p",{key:"41a2645ecd146432c7b6c7db48acafa538e6c6a7"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(l=this.dispute)||void 0===l?void 0:l.lost)&&s("div",{key:"53bcf1dc1ca865fd0d1aa297794759099d3e5736"},s("h1",{key:"3c4e05422f28d10620577a3f35c3d182afca6482",class:"h4"},"This payment was disputed"),s("p",{key:"7f82acac107d1ae357e5ced092f9f7d23ca80bd2"},"The cardholder disputed this payment and the card issuer has settled it in their favor.")))}},k=class{constructor(s){e(this,s),this.errorEvent=t(this,"error-event"),this.errorMessage=null,this.apiOrigin="https://wc-proxy.justifi.ai",this.handleErrorEvent=e=>{this.errorMessage=e.detail.message,this.errorEvent.emit(e.detail)}}componentWillLoad(){b(),this.analytics=new y(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeDisputeServiceMethods()}initializeDisputeServiceMethods(){this.disputeId&&this.authToken?(this.updateDisputeResponse=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.updateDisputeResponse(t,e,i);if(d.error)return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.createDisputeEvidence(t,e,i);if(d.error)return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.submitDisputeResponse=m({disputeId:this.disputeId,authToken:this.authToken,service:new l})):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:h.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return s(c,{key:"ccac9f466cce91e00a39d8130ebf7ff9266ed34e"},s("justifi-dispute-response-core",{key:"45f6c536728230fce1b7dd9b727d857b4f263df5","onError-event":this.handleErrorEvent,"dispute-id":this.disputeId,disputeResponse:this.disputeResponse,createDisputeEvidence:this.createDisputeEvidence,updateDisputeResponse:this.updateDisputeResponse,submitDisputeResponse:this.submitDisputeResponse}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}},j=class{constructor(i){e(this,i),this.clickEvent=t(this,"click-event"),this.errorEvent=t(this,"error-event"),this.stepCompleteEvent=t(this,"complete-form-step-event"),this.submitEvent=t(this,"submit-event"),this.disputeResponse={},this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.componentStepMapping=[()=>s("justifi-product-or-service",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-customer-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-cancellation-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-refund-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-duplicate-charge",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-electronic-evidence",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-shipping-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-additional-statement",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors})],this.saveData=async(e,t)=>{if(Object.keys(e).length)return this.isLastStep?this.submitDisputeResponse({payload:e,onSuccess:e=>{this.submitEvent.emit({response:e}),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}}):this.updateDisputeResponse({payload:e,onSuccess:e=>{this.disputeResponse=Object.assign({},e.data),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}});this.stepCompleteEvent.emit({response:null,formStep:t})},this.initializeMakePresignedURLs=async()=>{const e=this.documentList.map((e=>this.getPresignedFileUrl(e)));return await Promise.all(e)},this.initializeFileUploads=async()=>{const e=this.documentList.map((e=>this.uploadDocument(e)));return Promise.all(e)},this.getPresignedFileUrl=async e=>this.createDisputeEvidence({payload:{file_name:e.file_name,file_type:e.file_type,dispute_evidence_type:e.dispute_evidence_type},onSuccess:t=>{e.presignedUrl=t.data.presigned_url},onError:({error:t,code:s,severity:i})=>{const a={[e.dispute_evidence_type]:t};this.documentErrors=Object.assign(Object.assign({},this.documentErrors),a),this.errorEvent.emit({errorCode:s,message:t,severity:i})}}),this.uploadDocument=async e=>{const t=await e.getFileString();if(!e.presignedUrl)throw new Error("Presigned URL is not set");return await fetch(e.presignedUrl,{method:"PUT",body:t})},this.handleSubmit=async(e,t,s)=>{if(this.isLoading=!0,t.length){if(this.documentErrors={},this.documentList=t,await this.initializeMakePresignedURLs(),Object.keys(this.documentErrors).length)throw this.isLoading=!1,new Error("Could not presign all documents");await this.initializeFileUploads()}await this.saveData(e,s),this.isLoading=!1},this.onCancel=()=>{this.clickEvent.emit({name:u.cancelDispute})},this.onBack=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.previousStep}),await this.handleSubmit(e,t,s),this.currentStep--}))},this.onNext=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.nextStep}),await this.handleSubmit(e,t,s),this.currentStep++}))},this.onSubmit=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.submit});const i=Object.assign(Object.assign({},e),{forfeit:!1});await this.handleSubmit(i,t,s)}))}}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}get isLastStep(){return this.currentStep===this.componentStepMapping.length-1}get isFirstStep(){return 0===this.currentStep}render(){return s("div",{key:"c01224655927f38fbe19920656dfcbdd832708cc",class:"row gy-3"},s("div",{key:"86f297470d848fec04a8f2e28cb57e497c840ca0",class:"col-12"},s("h1",{key:"57c00af581c27dc5b2793c3acda3985dba47879d",class:"h4",part:r},"Counter dispute")),s("div",{key:"0b669232373f4f9a33ed49c5ba7235edb47765f1",class:"col-12"},this.currentStepComponent),s("div",{key:"f61fde58ce2876513ee8d45b58b85433337de4f9",class:"col-12"},s("div",{key:"4c97586d7b9961a50e629425f7caba4fe96bbf27",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(d,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(d,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(d,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(d,{variant:"primary",onClick:()=>this.onNext(),disabled:this.isLoading,isLoading:this.isLoading},"Next"))))}};export{v as justifi_dispute_notification,k as justifi_dispute_response,j as justifi_dispute_response_core}