@justifi/webcomponents 6.15.0 → 6.16.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 (441) hide show
  1. package/dist/cjs/{Analytics-BjZHa0wt.js → Analytics-CDE3KpL6.js} +2 -2
  2. package/dist/cjs/{Api-us3AxMRC.js → Api-CaEn8pKs.js} +1 -1
  3. package/dist/cjs/additional-questions-form-step_15.cjs.entry.js +8 -8
  4. package/dist/cjs/additional-questions_4.cjs.entry.js +1 -1
  5. package/dist/cjs/additional-statement_8.cjs.entry.js +8 -8
  6. package/dist/cjs/bank-account-billing-form-simple_4.cjs.entry.js +13 -7
  7. package/dist/cjs/bank-account-form.cjs.entry.js +64 -12
  8. package/dist/cjs/{business-identity-schema-XiCLzxWM.js → business-identity-schema-DuOIMFjG.js} +2 -2
  9. package/dist/cjs/{business.service-_Sl3vWmu.js → business.service-DIspRonp.js} +1 -1
  10. package/dist/cjs/card-form.cjs.entry.js +12 -10
  11. package/dist/cjs/{checkout.service-B_qymeqJ.js → checkout.service-CM1Duar4.js} +1 -1
  12. package/dist/cjs/{checkout.store-DaV9lvEQ.js → checkout.store-B5lTwvUV.js} +1 -0
  13. package/dist/cjs/{country-config-DQQujh5h.js → country-config-CFC3KuVD.js} +24 -2
  14. package/dist/cjs/custom-popper_2.cjs.entry.js +2 -2
  15. package/dist/cjs/detect-duplicate-version-DyHHkx4J.js +29 -0
  16. package/dist/cjs/dispute-notification_2.cjs.entry.js +9 -9
  17. package/dist/cjs/{event-types-DmY59QXs.js → event-types-DNCxVTir.js} +1 -1
  18. package/dist/cjs/form-address-fields_3.cjs.entry.js +5 -5
  19. package/dist/cjs/form-alert_3.cjs.entry.js +122 -16
  20. package/dist/cjs/form-control-checkbox.cjs.entry.js +2 -2
  21. package/dist/cjs/form-control-date.cjs.entry.js +2 -2
  22. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +1 -1
  23. package/dist/cjs/form-control-file.cjs.entry.js +2 -2
  24. package/dist/cjs/form-control-monetary.cjs.entry.js +2 -2
  25. package/dist/cjs/form-control-number_2.cjs.entry.js +3 -3
  26. package/dist/cjs/form-control-radio.cjs.entry.js +2 -2
  27. package/dist/cjs/form-control-select_2.cjs.entry.js +22 -6
  28. package/dist/cjs/{get-subaccounts-BMY2bOFj.js → get-subaccounts-8LeFCTm6.js} +1 -1
  29. package/dist/cjs/internal-button.cjs.entry.js +1 -1
  30. package/dist/cjs/justifi-apple-pay_12.cjs.entry.js +54 -32
  31. package/dist/cjs/justifi-bank-account-billing-form-simple.cjs.entry.js +6 -6
  32. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +8 -7
  33. package/dist/cjs/justifi-billing-form-full.cjs.entry.js +1 -1
  34. package/dist/cjs/justifi-business-details.cjs.entry.js +7 -7
  35. package/dist/cjs/justifi-business-form.cjs.entry.js +9 -9
  36. package/dist/cjs/justifi-card-billing-form-simple.cjs.entry.js +1 -1
  37. package/dist/cjs/justifi-card-form.cjs.entry.js +9 -6
  38. package/dist/cjs/justifi-checkout-qr-code.cjs.entry.js +5 -5
  39. package/dist/cjs/justifi-checkout.cjs.entry.js +17 -8
  40. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +2 -2
  41. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +9 -9
  42. package/dist/cjs/justifi-dispute-management.cjs.entry.js +7 -7
  43. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +5 -5
  44. package/dist/cjs/justifi-order-terminals.cjs.entry.js +8 -8
  45. package/dist/cjs/justifi-payment-details.cjs.entry.js +14 -14
  46. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +6 -6
  47. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +7 -7
  48. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +2 -2
  49. package/dist/cjs/justifi-payments-list.cjs.entry.js +7 -7
  50. package/dist/cjs/justifi-payout-details.cjs.entry.js +9 -9
  51. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +7 -7
  52. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +2 -2
  53. package/dist/cjs/justifi-payouts-list.cjs.entry.js +8 -8
  54. package/dist/cjs/justifi-qr-terminal.cjs.entry.js +6 -6
  55. package/dist/cjs/justifi-refund-payment.cjs.entry.js +6 -6
  56. package/dist/cjs/justifi-save-new-payment-method.cjs.entry.js +1 -1
  57. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +6 -6
  58. package/dist/cjs/justifi-terminal-orders-list-filters.cjs.entry.js +3 -3
  59. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +7 -7
  60. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +1 -1
  61. package/dist/cjs/justifi-terminals-list.cjs.entry.js +8 -8
  62. package/dist/cjs/loader.cjs.js +1 -1
  63. package/dist/cjs/{package-30T__1wH.js → package-DGrVUpde.js} +1 -3
  64. package/dist/cjs/payment-method-option.cjs.entry.js +1 -1
  65. package/dist/cjs/{payment.service-DRXVT-uB.js → payment.service-By7aeVkC.js} +1 -1
  66. package/dist/cjs/{payout.service-CuQ-mXKB.js → payout.service-Dn0rXkmg.js} +1 -1
  67. package/dist/cjs/{plaid.service-B58nzlUE.js → plaid.service-CjaugrzX.js} +1 -1
  68. package/dist/cjs/radio-list-item.cjs.entry.js +1 -1
  69. package/dist/cjs/save-new-payment-method.cjs.entry.js +2 -2
  70. package/dist/cjs/{schema-validations-sjRvL4KO.js → schema-validations-BDFa_oIq.js} +8 -2
  71. package/dist/cjs/table-filters-menu.cjs.entry.js +1 -1
  72. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +1 -1
  73. package/dist/cjs/{terminal.service-CmtSEgTc.js → terminal.service-C0_r_A60.js} +1 -1
  74. package/dist/cjs/utils-Ct_X5q0U.js +62 -0
  75. package/dist/cjs/webcomponents.cjs.js +1 -1
  76. package/dist/collection/collection-manifest.json +1 -1
  77. package/dist/collection/components/business-details/justifi-business-details.js +3 -3
  78. package/dist/collection/components/business-forms/business-form/justifi-business-form.js +2 -2
  79. package/dist/collection/components/business-forms/payment-provisioning/form-address-fields/form-address-fields.js +3 -2
  80. package/dist/collection/components/business-forms/payment-provisioning/justifi-payment-provisioning.js +2 -2
  81. package/dist/collection/components/business-forms/schemas/schema-validations.js +8 -1
  82. package/dist/collection/components/business-forms/utils/country-config.js +3 -2
  83. package/dist/collection/components/checkout/bank-account-form/bank-account-form.js +88 -12
  84. package/dist/collection/components/checkout/billing-form/billing-form-full.js +6 -2
  85. package/dist/collection/components/checkout/billing-form/card-billing-form-simple.js +6 -2
  86. package/dist/collection/components/checkout/card-form/card-form.js +37 -11
  87. package/dist/collection/components/checkout/justifi-checkout.js +53 -4
  88. package/dist/collection/components/checkout/message-event-types.js +2 -0
  89. package/dist/collection/components/checkout/save-new-payment-method/justifi-save-new-payment-method.js +1 -1
  90. package/dist/collection/components/checkout/save-new-payment-method/save-new-payment-method.js +1 -1
  91. package/dist/collection/components/checkout-qr-code/justifi-checkout-qr-code.js +2 -2
  92. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +2 -2
  93. package/dist/collection/components/checkouts-list/justifi-checkouts-list.js +4 -4
  94. package/dist/collection/components/dispute-management/dispute-notification.js +2 -2
  95. package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +1 -1
  96. package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +1 -1
  97. package/dist/collection/components/dispute-management/dispute-response/customer-details.js +1 -1
  98. package/dist/collection/components/dispute-management/dispute-response/dispute-response.js +3 -3
  99. package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +1 -1
  100. package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +1 -1
  101. package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +1 -1
  102. package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +1 -1
  103. package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +1 -1
  104. package/dist/collection/components/dispute-management/justifi-dispute-management.js +3 -3
  105. package/dist/collection/components/filters/table-filters-menu.js +1 -1
  106. package/dist/collection/components/gross-payment-chart/justifi-gross-payment-chart.js +2 -2
  107. package/dist/collection/components/insurance/season-interruption/justifi-season-interruption-insurance.js +2 -2
  108. package/dist/collection/components/modular-checkout/justifi-modular-checkout.js +63 -19
  109. package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-billing-form-simple.js +3 -3
  110. package/dist/collection/components/modular-checkout/sub-components/justifi-bank-account-form.js +33 -6
  111. package/dist/collection/components/modular-checkout/sub-components/justifi-billing-form-full.js +1 -1
  112. package/dist/collection/components/modular-checkout/sub-components/justifi-card-billing-form-simple.js +1 -1
  113. package/dist/collection/components/modular-checkout/sub-components/justifi-card-form.js +28 -3
  114. package/dist/collection/components/modular-checkout/sub-components/justifi-checkout-summary.js +1 -1
  115. package/dist/collection/components/modular-checkout/sub-components/payment-method-option.js +1 -1
  116. package/dist/collection/components/modular-checkout/sub-components/paypal/justifi-paypal.js +1 -1
  117. package/dist/collection/components/order-terminals/justifi-order-terminals.js +3 -3
  118. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +1 -1
  119. package/dist/collection/components/payment-details/justifi-payment-details.js +10 -10
  120. package/dist/collection/components/payment-transactions-list/justifi-payment-transactions-list.js +3 -3
  121. package/dist/collection/components/payments-list/justifi-payments-list-filters.js +2 -2
  122. package/dist/collection/components/payments-list/justifi-payments-list.js +3 -3
  123. package/dist/collection/components/payout-details/justifi-payout-details.js +5 -5
  124. package/dist/collection/components/payout-transactions-list/justifi-payout-transactions-list.js +3 -3
  125. package/dist/collection/components/payouts-list/justifi-payouts-list-filters.js +2 -2
  126. package/dist/collection/components/payouts-list/justifi-payouts-list.js +3 -3
  127. package/dist/collection/components/qr-terminal/justifi-qr-terminal.js +2 -2
  128. package/dist/collection/components/refund-payment/justifi-refund-payment.js +2 -2
  129. package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list-filters.js +3 -3
  130. package/dist/collection/components/terminal-orders-list/justifi-terminal-orders-list.js +4 -4
  131. package/dist/collection/components/terminals-list/justifi-terminals-list-filters.js +1 -1
  132. package/dist/collection/components/terminals-list/justifi-terminals-list.js +3 -3
  133. package/dist/collection/components/tokenize-payment-method/justifi-tokenize-payment-method.js +45 -6
  134. package/dist/collection/store/checkout.store.js +1 -0
  135. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  136. package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
  137. package/dist/collection/ui-components/form/form-control-date.js +2 -2
  138. package/dist/collection/ui-components/form/form-control-file-v2.js +1 -1
  139. package/dist/collection/ui-components/form/form-control-file.js +2 -2
  140. package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
  141. package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
  142. package/dist/collection/ui-components/form/form-control-number.js +2 -2
  143. package/dist/collection/ui-components/form/form-control-radio.js +2 -2
  144. package/dist/collection/ui-components/form/form-control-select.js +2 -2
  145. package/dist/collection/ui-components/form/form-control-text.js +37 -4
  146. package/dist/collection/ui-components/form/iframe-input.js +136 -14
  147. package/dist/collection/ui-components/form/utils.js +32 -0
  148. package/dist/collection/ui-components/internal-button.js +1 -1
  149. package/dist/collection/ui-components/radio-list-item.js +1 -1
  150. package/dist/collection/utils/detect-duplicate-version.js +24 -0
  151. package/dist/collection/utils/frame-comunication-service.js +6 -1
  152. package/dist/collection/utils/postal-code.js +19 -0
  153. package/dist/docs.json +315 -17
  154. package/dist/esm/{Analytics-BtMYbHD0.js → Analytics-tBzmPsnT.js} +2 -2
  155. package/dist/esm/{Api-nVK-rgbk.js → Api-BH6Wa9CT.js} +1 -1
  156. package/dist/esm/additional-questions-form-step_15.entry.js +8 -8
  157. package/dist/esm/additional-questions_4.entry.js +1 -1
  158. package/dist/esm/additional-statement_8.entry.js +8 -8
  159. package/dist/esm/bank-account-billing-form-simple_4.entry.js +13 -7
  160. package/dist/esm/bank-account-form.entry.js +64 -12
  161. package/dist/esm/{business-identity-schema-BP61Unwf.js → business-identity-schema-BLKCH6xV.js} +2 -2
  162. package/dist/esm/{business.service-Cq7H5w1T.js → business.service-XOnczlAa.js} +1 -1
  163. package/dist/esm/card-form.entry.js +12 -10
  164. package/dist/esm/{checkout.service-JA7oTq5d.js → checkout.service-DvSxk9EZ.js} +1 -1
  165. package/dist/esm/{checkout.store-B2mtQcB5.js → checkout.store-B8CGkx0o.js} +1 -0
  166. package/dist/esm/{country-config-F5YwgHgR.js → country-config-DJFj1v-Q.js} +23 -3
  167. package/dist/esm/custom-popper_2.entry.js +2 -2
  168. package/dist/esm/detect-duplicate-version-BD3-8NL2.js +27 -0
  169. package/dist/esm/dispute-notification_2.entry.js +9 -9
  170. package/dist/esm/{event-types-Dsf8IwD6.js → event-types-CM5AGGBD.js} +1 -1
  171. package/dist/esm/form-address-fields_3.entry.js +5 -5
  172. package/dist/esm/form-alert_3.entry.js +122 -16
  173. package/dist/esm/form-control-checkbox.entry.js +2 -2
  174. package/dist/esm/form-control-date.entry.js +2 -2
  175. package/dist/esm/form-control-file-v2_2.entry.js +1 -1
  176. package/dist/esm/form-control-file.entry.js +2 -2
  177. package/dist/esm/form-control-monetary.entry.js +2 -2
  178. package/dist/esm/form-control-number_2.entry.js +3 -3
  179. package/dist/esm/form-control-radio.entry.js +2 -2
  180. package/dist/esm/form-control-select_2.entry.js +22 -6
  181. package/dist/esm/{get-subaccounts-B-S2TGRa.js → get-subaccounts-P-x_RqL5.js} +1 -1
  182. package/dist/esm/internal-button.entry.js +1 -1
  183. package/dist/esm/justifi-apple-pay_12.entry.js +54 -32
  184. package/dist/esm/justifi-bank-account-billing-form-simple.entry.js +6 -6
  185. package/dist/esm/justifi-bank-account-form.entry.js +8 -7
  186. package/dist/esm/justifi-billing-form-full.entry.js +1 -1
  187. package/dist/esm/justifi-business-details.entry.js +7 -7
  188. package/dist/esm/justifi-business-form.entry.js +9 -9
  189. package/dist/esm/justifi-card-billing-form-simple.entry.js +1 -1
  190. package/dist/esm/justifi-card-form.entry.js +9 -6
  191. package/dist/esm/justifi-checkout-qr-code.entry.js +5 -5
  192. package/dist/esm/justifi-checkout.entry.js +17 -8
  193. package/dist/esm/justifi-checkouts-list-filters.entry.js +2 -2
  194. package/dist/esm/justifi-checkouts-list.entry.js +9 -9
  195. package/dist/esm/justifi-dispute-management.entry.js +7 -7
  196. package/dist/esm/justifi-gross-payment-chart.entry.js +5 -5
  197. package/dist/esm/justifi-order-terminals.entry.js +8 -8
  198. package/dist/esm/justifi-payment-details.entry.js +14 -14
  199. package/dist/esm/justifi-payment-provisioning.entry.js +6 -6
  200. package/dist/esm/justifi-payment-transactions-list.entry.js +7 -7
  201. package/dist/esm/justifi-payments-list-filters.entry.js +2 -2
  202. package/dist/esm/justifi-payments-list.entry.js +7 -7
  203. package/dist/esm/justifi-payout-details.entry.js +9 -9
  204. package/dist/esm/justifi-payout-transactions-list.entry.js +7 -7
  205. package/dist/esm/justifi-payouts-list-filters.entry.js +2 -2
  206. package/dist/esm/justifi-payouts-list.entry.js +8 -8
  207. package/dist/esm/justifi-qr-terminal.entry.js +6 -6
  208. package/dist/esm/justifi-refund-payment.entry.js +6 -6
  209. package/dist/esm/justifi-save-new-payment-method.entry.js +1 -1
  210. package/dist/esm/justifi-season-interruption-insurance.entry.js +6 -6
  211. package/dist/esm/justifi-terminal-orders-list-filters.entry.js +3 -3
  212. package/dist/esm/justifi-terminal-orders-list.entry.js +7 -7
  213. package/dist/esm/justifi-terminals-list-filters.entry.js +1 -1
  214. package/dist/esm/justifi-terminals-list.entry.js +8 -8
  215. package/dist/esm/loader.js +1 -1
  216. package/dist/esm/package-DhrQechy.js +5 -0
  217. package/dist/esm/payment-method-option.entry.js +1 -1
  218. package/dist/esm/{payment.service-B42sKlQE.js → payment.service-CBUnE4bP.js} +1 -1
  219. package/dist/esm/{payout.service-BIoAgNJJ.js → payout.service-DUYaYbeJ.js} +1 -1
  220. package/dist/esm/{plaid.service-C6Ltk2ef.js → plaid.service-Umm80G4q.js} +1 -1
  221. package/dist/esm/radio-list-item.entry.js +1 -1
  222. package/dist/esm/save-new-payment-method.entry.js +2 -2
  223. package/dist/esm/{schema-validations-De7Qe0VU.js → schema-validations-8GJ34Do1.js} +8 -2
  224. package/dist/esm/table-filters-menu.entry.js +1 -1
  225. package/dist/esm/terminal-quantity-selector.entry.js +1 -1
  226. package/dist/esm/{terminal.service-DV3qIwBy.js → terminal.service-DeunLqmo.js} +1 -1
  227. package/dist/esm/utils-Cpck08K0.js +59 -0
  228. package/dist/esm/webcomponents.js +1 -1
  229. package/dist/module/additional-statement2.js +1 -1
  230. package/dist/module/bank-account-form2.js +63 -10
  231. package/dist/module/billing-form-full2.js +6 -2
  232. package/dist/module/cancellation-policy2.js +1 -1
  233. package/dist/module/card-billing-form-simple2.js +6 -2
  234. package/dist/module/card-form2.js +12 -9
  235. package/dist/module/checkout.store.js +1 -0
  236. package/dist/module/country-config.js +23 -3
  237. package/dist/module/custom-popper2.js +2 -2
  238. package/dist/module/customer-details2.js +1 -1
  239. package/dist/module/detect-duplicate-version.js +27 -0
  240. package/dist/module/dispute-notification2.js +2 -2
  241. package/dist/module/dispute-response2.js +3 -3
  242. package/dist/module/duplicate-charge2.js +1 -1
  243. package/dist/module/electronic-evidence2.js +1 -1
  244. package/dist/module/form-address-fields2.js +3 -3
  245. package/dist/module/form-control-checkbox2.js +2 -2
  246. package/dist/module/form-control-date2.js +2 -2
  247. package/dist/module/form-control-file-v22.js +1 -1
  248. package/dist/module/form-control-file2.js +2 -2
  249. package/dist/module/form-control-monetary2.js +2 -2
  250. package/dist/module/form-control-number-masked2.js +2 -2
  251. package/dist/module/form-control-number2.js +2 -2
  252. package/dist/module/form-control-radio2.js +2 -2
  253. package/dist/module/form-control-select2.js +2 -2
  254. package/dist/module/form-control-text2.js +21 -4
  255. package/dist/module/iframe-input2.js +125 -16
  256. package/dist/module/internal-button2.js +1 -1
  257. package/dist/module/justifi-bank-account-billing-form-simple.js +3 -3
  258. package/dist/module/justifi-bank-account-form.js +6 -4
  259. package/dist/module/justifi-billing-form-full.js +1 -1
  260. package/dist/module/justifi-business-details.js +3 -3
  261. package/dist/module/justifi-business-form.js +2 -2
  262. package/dist/module/justifi-card-billing-form-simple.js +1 -1
  263. package/dist/module/justifi-card-form.js +6 -3
  264. package/dist/module/justifi-checkout-qr-code2.js +2 -2
  265. package/dist/module/justifi-checkout-summary2.js +1 -1
  266. package/dist/module/justifi-checkout.js +15 -4
  267. package/dist/module/justifi-checkouts-list-filters.js +2 -2
  268. package/dist/module/justifi-checkouts-list.js +4 -4
  269. package/dist/module/justifi-dispute-management.js +3 -3
  270. package/dist/module/justifi-gross-payment-chart.js +2 -2
  271. package/dist/module/justifi-modular-checkout2.js +43 -19
  272. package/dist/module/justifi-order-terminals.js +3 -3
  273. package/dist/module/justifi-payment-details.js +10 -10
  274. package/dist/module/justifi-payment-provisioning.js +2 -2
  275. package/dist/module/justifi-payment-transactions-list.js +3 -3
  276. package/dist/module/justifi-payments-list-filters.js +2 -2
  277. package/dist/module/justifi-payments-list.js +3 -3
  278. package/dist/module/justifi-payout-details.js +5 -5
  279. package/dist/module/justifi-payout-transactions-list.js +3 -3
  280. package/dist/module/justifi-payouts-list-filters.js +2 -2
  281. package/dist/module/justifi-payouts-list.js +3 -3
  282. package/dist/module/justifi-paypal2.js +1 -1
  283. package/dist/module/justifi-qr-terminal.js +2 -2
  284. package/dist/module/justifi-refund-payment.js +2 -2
  285. package/dist/module/justifi-save-new-payment-method.js +1 -1
  286. package/dist/module/justifi-season-interruption-insurance.js +2 -2
  287. package/dist/module/justifi-terminal-orders-list-filters.js +3 -3
  288. package/dist/module/justifi-terminal-orders-list.js +4 -4
  289. package/dist/module/justifi-terminals-list-filters.js +1 -1
  290. package/dist/module/justifi-terminals-list.js +3 -3
  291. package/dist/module/justifi-tokenize-payment-method2.js +9 -6
  292. package/dist/module/package.js +1 -3
  293. package/dist/module/payment-method-option.js +1 -1
  294. package/dist/module/product-or-service2.js +1 -1
  295. package/dist/module/radio-list-item2.js +1 -1
  296. package/dist/module/refund-policy2.js +1 -1
  297. package/dist/module/save-new-payment-method2.js +1 -1
  298. package/dist/module/schema-validations.js +8 -2
  299. package/dist/module/shipping-details2.js +1 -1
  300. package/dist/module/table-filters-menu2.js +1 -1
  301. package/dist/module/terminal-quantity-selector2.js +1 -1
  302. package/dist/module/utils4.js +33 -1
  303. package/dist/types/components/checkout/bank-account-form/bank-account-form.d.ts +8 -1
  304. package/dist/types/components/checkout/card-form/card-form.d.ts +5 -1
  305. package/dist/types/components/checkout/justifi-checkout.d.ts +9 -0
  306. package/dist/types/components/checkout/message-event-types.d.ts +2 -0
  307. package/dist/types/components/modular-checkout/justifi-modular-checkout.d.ts +9 -0
  308. package/dist/types/components/modular-checkout/sub-components/justifi-bank-account-form.d.ts +4 -1
  309. package/dist/types/components/modular-checkout/sub-components/justifi-card-form.d.ts +9 -0
  310. package/dist/types/components/tokenize-payment-method/justifi-tokenize-payment-method.d.ts +9 -0
  311. package/dist/types/components.d.ts +95 -3
  312. package/dist/types/store/checkout.store.d.ts +1 -0
  313. package/dist/types/ui-components/form/form-control-text.d.ts +1 -0
  314. package/dist/types/ui-components/form/iframe-input.d.ts +24 -0
  315. package/dist/types/ui-components/form/utils.d.ts +1 -0
  316. package/dist/types/utils/detect-duplicate-version.d.ts +7 -0
  317. package/dist/types/utils/postal-code.d.ts +3 -0
  318. package/dist/webcomponents/{p-de047614.entry.js → p-06ed3518.entry.js} +1 -1
  319. package/dist/webcomponents/p-12f5fdc0.entry.js +1 -0
  320. package/dist/webcomponents/p-1ceb65cc.entry.js +1 -0
  321. package/dist/webcomponents/{p-777470cb.entry.js → p-2272a65b.entry.js} +1 -1
  322. package/dist/webcomponents/{p-c4889a06.entry.js → p-2d25f1d1.entry.js} +1 -1
  323. package/dist/webcomponents/p-357d14ee.entry.js +1 -0
  324. package/dist/webcomponents/{p-a10beb26.entry.js → p-3d02cb78.entry.js} +1 -1
  325. package/dist/webcomponents/{p-ead48010.entry.js → p-4450dbe9.entry.js} +1 -1
  326. package/dist/webcomponents/p-4dabcfd6.entry.js +1 -0
  327. package/dist/webcomponents/p-511bc0b2.entry.js +1 -0
  328. package/dist/webcomponents/p-51238f79.entry.js +1 -0
  329. package/dist/webcomponents/p-521c534c.entry.js +1 -0
  330. package/dist/webcomponents/{p-0e9351c4.entry.js → p-5331e011.entry.js} +1 -1
  331. package/dist/webcomponents/p-5be775e8.entry.js +1 -0
  332. package/dist/webcomponents/{p-cec7164e.entry.js → p-5e196140.entry.js} +1 -1
  333. package/dist/webcomponents/{p-f40fa614.entry.js → p-5f20b0da.entry.js} +1 -1
  334. package/dist/webcomponents/p-63e02d42.entry.js +1 -0
  335. package/dist/webcomponents/{p-9e3e2e32.entry.js → p-6aaf2758.entry.js} +1 -1
  336. package/dist/webcomponents/p-6bfdc443.entry.js +1 -0
  337. package/dist/webcomponents/{p-42021e67.entry.js → p-6f3b035b.entry.js} +1 -1
  338. package/dist/webcomponents/p-6f7756b7.entry.js +1 -0
  339. package/dist/webcomponents/p-80177bcb.entry.js +1 -0
  340. package/dist/webcomponents/p-8758aec4.entry.js +1 -0
  341. package/dist/webcomponents/p-87f8d4e7.entry.js +1 -0
  342. package/dist/webcomponents/{p-88a44a02.entry.js → p-89ed2d99.entry.js} +1 -1
  343. package/dist/webcomponents/p-91358854.entry.js +1 -0
  344. package/dist/webcomponents/p-9b930446.entry.js +1 -0
  345. package/dist/webcomponents/p-9c4ac3c5.entry.js +1 -0
  346. package/dist/webcomponents/{p-B_2zgnvM.js → p-B6kC9tX2.js} +1 -1
  347. package/dist/webcomponents/{p-D7fNBSlC.js → p-BKrZL95i.js} +1 -1
  348. package/dist/webcomponents/{p-rFpPIJgu.js → p-Bo7ndXwR.js} +1 -1
  349. package/dist/webcomponents/{p-iA-Amt2z.js → p-C8J9uVEs.js} +1 -1
  350. package/dist/webcomponents/{p-DC2djVls.js → p-CEGSQXGU.js} +1 -1
  351. package/dist/webcomponents/{p-BjjKkMO1.js → p-CEHwp4sh.js} +1 -1
  352. package/dist/webcomponents/{p-C60AkJ6a.js → p-CKL24GQA.js} +1 -1
  353. package/dist/webcomponents/{p-BmaQUnqv.js → p-CRaiEpKf.js} +1 -1
  354. package/dist/webcomponents/p-CkrzG0pB.js +1 -0
  355. package/dist/webcomponents/{p-D694H6co.js → p-Cl6irPVE.js} +1 -1
  356. package/dist/webcomponents/p-Cpck08K0.js +1 -0
  357. package/dist/webcomponents/{p-C6Jq8YDT.js → p-DCpGH4xL.js} +1 -1
  358. package/dist/webcomponents/{p-pueOrhXO.js → p-DEfLsy2W.js} +1 -1
  359. package/dist/webcomponents/p-DF7oFWnO.js +1 -0
  360. package/dist/webcomponents/p-DMzYgqml.js +1 -0
  361. package/dist/webcomponents/p-DhrQechy.js +1 -0
  362. package/dist/webcomponents/p-FsWkrvEF.js +1 -0
  363. package/dist/webcomponents/p-a1e1afa4.entry.js +1 -0
  364. package/dist/webcomponents/{p-13814028.entry.js → p-a1ef7674.entry.js} +1 -1
  365. package/dist/webcomponents/p-a2c4e99f.entry.js +1 -0
  366. package/dist/webcomponents/p-a8f1c9b3.entry.js +1 -0
  367. package/dist/webcomponents/p-aba3b0dc.entry.js +1 -0
  368. package/dist/webcomponents/{p-065b854f.entry.js → p-abebb03c.entry.js} +1 -1
  369. package/dist/webcomponents/{p-1cfa634a.entry.js → p-adaa1c98.entry.js} +1 -1
  370. package/dist/webcomponents/{p-f2b3c7d5.entry.js → p-b2b0303d.entry.js} +1 -1
  371. package/dist/webcomponents/{p-59b95eae.entry.js → p-b39c7414.entry.js} +1 -1
  372. package/dist/webcomponents/p-b925d666.entry.js +1 -0
  373. package/dist/webcomponents/p-bd4d2924.entry.js +1 -0
  374. package/dist/webcomponents/p-c172decb.entry.js +1 -0
  375. package/dist/webcomponents/p-d19d7d41.entry.js +1 -0
  376. package/dist/webcomponents/p-d59d6c23.entry.js +1 -0
  377. package/dist/webcomponents/p-deff4422.entry.js +1 -0
  378. package/dist/webcomponents/p-e1fbadea.entry.js +1 -0
  379. package/dist/webcomponents/{p-1365a46b.entry.js → p-e3c7b4e5.entry.js} +1 -1
  380. package/dist/webcomponents/{p-a7c594d1.entry.js → p-e5feca94.entry.js} +1 -1
  381. package/dist/webcomponents/p-e75d1756.entry.js +1 -0
  382. package/dist/webcomponents/{p-97c6593d.entry.js → p-ebae270b.entry.js} +1 -1
  383. package/dist/webcomponents/p-ebed68aa.entry.js +1 -0
  384. package/dist/webcomponents/{p-16261d8a.entry.js → p-f0084d20.entry.js} +1 -1
  385. package/dist/webcomponents/p-f2c99647.entry.js +1 -0
  386. package/dist/webcomponents/{p-429046e1.entry.js → p-f5686720.entry.js} +1 -1
  387. package/dist/webcomponents/p-f681f747.entry.js +1 -0
  388. package/dist/webcomponents/p-fcc5af24.entry.js +1 -0
  389. package/dist/webcomponents/{p-0f7e3515.entry.js → p-fd1718e0.entry.js} +4 -4
  390. package/dist/webcomponents/p-ff67c8f7.entry.js +1 -0
  391. package/dist/webcomponents/webcomponents.esm.js +1 -1
  392. package/package.json +14 -14
  393. package/LICENSE +0 -21
  394. package/dist/cjs/check-pkg-version-CjJab8fX.js +0 -47
  395. package/dist/cjs/utils-DAyWinG2.js +0 -29
  396. package/dist/collection/utils/check-pkg-version.js +0 -42
  397. package/dist/esm/check-pkg-version-BW9zgceK.js +0 -45
  398. package/dist/esm/package-BC9n8nB2.js +0 -7
  399. package/dist/esm/utils-BnjCmwMr.js +0 -27
  400. package/dist/module/check-pkg-version.js +0 -45
  401. package/dist/types/utils/check-pkg-version.d.ts +0 -1
  402. package/dist/webcomponents/p-082f912c.entry.js +0 -1
  403. package/dist/webcomponents/p-0cd689f4.entry.js +0 -1
  404. package/dist/webcomponents/p-0fbc806f.entry.js +0 -1
  405. package/dist/webcomponents/p-10787684.entry.js +0 -1
  406. package/dist/webcomponents/p-19cabdaf.entry.js +0 -1
  407. package/dist/webcomponents/p-1fa62eba.entry.js +0 -1
  408. package/dist/webcomponents/p-2ef913b8.entry.js +0 -1
  409. package/dist/webcomponents/p-36340e63.entry.js +0 -1
  410. package/dist/webcomponents/p-388082cd.entry.js +0 -1
  411. package/dist/webcomponents/p-3a1f8c5b.entry.js +0 -1
  412. package/dist/webcomponents/p-3f2fb856.entry.js +0 -1
  413. package/dist/webcomponents/p-44ff4f2c.entry.js +0 -1
  414. package/dist/webcomponents/p-4740601b.entry.js +0 -1
  415. package/dist/webcomponents/p-6c7fca1a.entry.js +0 -1
  416. package/dist/webcomponents/p-72bb4aff.entry.js +0 -1
  417. package/dist/webcomponents/p-735d397e.entry.js +0 -1
  418. package/dist/webcomponents/p-8432cb42.entry.js +0 -1
  419. package/dist/webcomponents/p-89f0c2aa.entry.js +0 -1
  420. package/dist/webcomponents/p-9b43b90d.entry.js +0 -1
  421. package/dist/webcomponents/p-9db15fac.entry.js +0 -1
  422. package/dist/webcomponents/p-9eb00966.entry.js +0 -1
  423. package/dist/webcomponents/p-9f0ef3f3.entry.js +0 -1
  424. package/dist/webcomponents/p-BAvoKtN2.js +0 -1
  425. package/dist/webcomponents/p-BC9n8nB2.js +0 -1
  426. package/dist/webcomponents/p-BnjCmwMr.js +0 -1
  427. package/dist/webcomponents/p-Fpaf7CLD.js +0 -1
  428. package/dist/webcomponents/p-_MjmE9YT.js +0 -1
  429. package/dist/webcomponents/p-a71cc8e2.entry.js +0 -1
  430. package/dist/webcomponents/p-a8d25057.entry.js +0 -1
  431. package/dist/webcomponents/p-acb0b66c.entry.js +0 -1
  432. package/dist/webcomponents/p-b9ba7c95.entry.js +0 -1
  433. package/dist/webcomponents/p-c385f10d.entry.js +0 -1
  434. package/dist/webcomponents/p-c55fdbbf.entry.js +0 -1
  435. package/dist/webcomponents/p-ca6c5365.entry.js +0 -1
  436. package/dist/webcomponents/p-d3544e86.entry.js +0 -1
  437. package/dist/webcomponents/p-f0434a13.entry.js +0 -1
  438. package/dist/webcomponents/p-f5cb6a26.entry.js +0 -1
  439. package/dist/webcomponents/p-f9f310dc.entry.js +0 -1
  440. package/dist/webcomponents/p-fda6f27d.entry.js +0 -1
  441. package/dist/webcomponents/p-riZDHN5-.js +0 -1
@@ -83,8 +83,12 @@ export namespace Components {
83
83
  "storeFiles": (e: CustomEvent<FileSelectEvent>) => void;
84
84
  }
85
85
  interface BankAccountForm {
86
+ /**
87
+ * @default false
88
+ */
89
+ "showAccountNumberConfirmation"?: boolean;
86
90
  "tokenize": ({ clientId, paymentMethodMetadata, account }: { clientId: string; paymentMethodMetadata: any; account?: string; }) => Promise<any>;
87
- "validate": () => Promise<any>;
91
+ "validate": () => Promise<{ isValid: boolean; }>;
88
92
  }
89
93
  interface BankAccountFormInputs {
90
94
  "defaultValue": any;
@@ -192,8 +196,13 @@ export namespace Components {
192
196
  "validate": () => Promise<{ isValid: boolean; errors: any; }>;
193
197
  }
194
198
  interface CardForm {
199
+ /**
200
+ * Mask the card number to its last four digits when the field blurs.
201
+ * @default false
202
+ */
203
+ "maskCardNumber"?: boolean;
195
204
  "tokenize": ({ clientId, paymentMethodMetadata, account, }: { clientId: string; paymentMethodMetadata: any; account?: string; }) => Promise<any>;
196
- "validate": () => Promise<any>;
205
+ "validate": () => Promise<{ isValid: boolean; }>;
197
206
  }
198
207
  interface CoreInfoDetails {
199
208
  "business": Business;
@@ -463,6 +472,7 @@ export namespace Components {
463
472
  "label": string;
464
473
  "maxLength"?: number;
465
474
  "name": any;
475
+ "transformValue"?: (value: string) => string;
466
476
  }
467
477
  interface FormControlTextarea {
468
478
  "defaultValue": string;
@@ -502,6 +512,11 @@ export namespace Components {
502
512
  "iframeOrigin": string;
503
513
  "inputId": string;
504
514
  "label": string;
515
+ /**
516
+ * Opt this field into masking its value to the last four characters when it loses focus. Forwarded to the hosted field, which owns the behavior.
517
+ * @default false
518
+ */
519
+ "maskCardNumber"?: boolean;
505
520
  "reload": () => Promise<void>;
506
521
  "tokenize": (clientId: string, paymentMethodMetadata: IPaymentMethodMetadata, account?: string) => Promise<any>;
507
522
  "validate": () => Promise<any>;
@@ -570,8 +585,12 @@ export namespace Components {
570
585
  "validate": () => Promise<{ isValid: boolean; errors: any; }>;
571
586
  }
572
587
  interface JustifiBankAccountForm {
588
+ /**
589
+ * @default false
590
+ */
591
+ "showAccountNumberConfirmation"?: boolean;
573
592
  "tokenize": ({ clientId, paymentMethodMetadata, account }: { clientId: string; paymentMethodMetadata: any; account?: string; }) => Promise<any>;
574
- "validate": () => Promise<any>;
593
+ "validate": () => Promise<{ isValid: boolean; }>;
575
594
  }
576
595
  interface JustifiBillingForm {
577
596
  "getValues": () => Promise<BillingFormFields>;
@@ -629,6 +648,10 @@ export namespace Components {
629
648
  "validate": () => Promise<{ isValid: boolean; errors: any; }>;
630
649
  }
631
650
  interface JustifiCardForm {
651
+ /**
652
+ * Mask the card number to its last four digits when the field loses focus, with an eye toggle to reveal it. Defaults to false. Inside `justifi-modular-checkout` the wrapper's `mask-card-number` sets this; an explicit value here wins. Anti-shoulder-surfing only, not a secrecy boundary.
653
+ */
654
+ "maskCardNumber"?: boolean;
632
655
  "tokenize": ({ clientId, paymentMethodMetadata, account, }: { clientId: string; paymentMethodMetadata: any; account?: string; }) => Promise<any>;
633
656
  "validate": () => Promise<any>;
634
657
  }
@@ -664,7 +687,17 @@ export namespace Components {
664
687
  * @default false
665
688
  */
666
689
  "hideCardBillingForm"?: boolean;
690
+ /**
691
+ * Mask the card number to its last four digits when the field loses focus, with an eye toggle to reveal it. Defaults to false. Anti-shoulder-surfing only, not a secrecy boundary.
692
+ * @default false
693
+ */
694
+ "maskCardNumber"?: boolean;
667
695
  "preCompleteHook"?: Hook<CheckoutState>;
696
+ /**
697
+ * Renders a "Confirm Account Number" field in the bank account form.
698
+ * @default false
699
+ */
700
+ "showAccountNumberConfirmation"?: boolean;
668
701
  "validate": () => Promise<{ isValid: boolean; }>;
669
702
  }
670
703
  interface JustifiCheckoutQrCode {
@@ -745,6 +778,11 @@ export namespace Components {
745
778
  "authToken": string;
746
779
  "checkoutId": string;
747
780
  "fillBillingForm": (fields: BillingFormFields1) => Promise<void>;
781
+ /**
782
+ * Mask the card number to its last four digits when the field loses focus, with an eye toggle to reveal it. Applies to the `justifi-card-form` rendered inside this checkout. Defaults to false. Anti-shoulder-surfing only, not a secrecy boundary.
783
+ * @default false
784
+ */
785
+ "maskCardNumber"?: boolean;
748
786
  "preCompleteHook"?: Hook<CheckoutState>;
749
787
  "setSelectedPaymentMethod": (paymentMethod: SelectedPaymentMethod) => Promise<void>;
750
788
  "submitCheckout": (submitCheckoutArgs?: BillingFormFields1) => Promise<void>;
@@ -967,8 +1005,16 @@ export namespace Components {
967
1005
  "hideBankAccountBillingForm"?: boolean;
968
1006
  "hideCardBillingForm"?: boolean;
969
1007
  "hideSubmitButton"?: boolean;
1008
+ /**
1009
+ * Mask the card number to its last four digits when the field loses focus, with an eye toggle to reveal it. Defaults to false. Anti-shoulder-surfing only, not a secrecy boundary.
1010
+ */
1011
+ "maskCardNumber"?: boolean;
970
1012
  "paymentMethodGroupId"?: string;
971
1013
  "savePaymentMethodLabel"?: string;
1014
+ /**
1015
+ * Renders a "Confirm Account Number" field in the bank account form.
1016
+ */
1017
+ "showAccountNumberConfirmation"?: boolean;
972
1018
  /**
973
1019
  * @default 'Submit'
974
1020
  */
@@ -3015,6 +3061,10 @@ declare namespace LocalJSX {
3015
3061
  }
3016
3062
  interface BankAccountForm {
3017
3063
  "onError-event"?: (event: BankAccountFormCustomEvent<ComponentErrorEvent1>) => void;
3064
+ /**
3065
+ * @default false
3066
+ */
3067
+ "showAccountNumberConfirmation"?: boolean;
3018
3068
  }
3019
3069
  interface BankAccountFormInputs {
3020
3070
  "defaultValue": any;
@@ -3127,6 +3177,11 @@ declare namespace LocalJSX {
3127
3177
  "legend"?: string;
3128
3178
  }
3129
3179
  interface CardForm {
3180
+ /**
3181
+ * Mask the card number to its last four digits when the field blurs.
3182
+ * @default false
3183
+ */
3184
+ "maskCardNumber"?: boolean;
3130
3185
  "onError-event"?: (event: CardFormCustomEvent<ComponentErrorEvent1>) => void;
3131
3186
  }
3132
3187
  interface CoreInfoDetails {
@@ -3428,6 +3483,7 @@ declare namespace LocalJSX {
3428
3483
  "name": any;
3429
3484
  "onFormControlBlur"?: (event: FormControlTextCustomEvent<any>) => void;
3430
3485
  "onFormControlInput"?: (event: FormControlTextCustomEvent<any>) => void;
3486
+ "transformValue"?: (value: string) => string;
3431
3487
  }
3432
3488
  interface FormControlTextarea {
3433
3489
  "defaultValue": string;
@@ -3469,6 +3525,11 @@ declare namespace LocalJSX {
3469
3525
  "iframeOrigin": string;
3470
3526
  "inputId": string;
3471
3527
  "label": string;
3528
+ /**
3529
+ * Opt this field into masking its value to the last four characters when it loses focus. Forwarded to the hosted field, which owns the behavior.
3530
+ * @default false
3531
+ */
3532
+ "maskCardNumber"?: boolean;
3472
3533
  "onIframeLoaded"?: (event: IframeInputCustomEvent<void>) => void;
3473
3534
  }
3474
3535
  interface InternalButton {
@@ -3539,6 +3600,10 @@ declare namespace LocalJSX {
3539
3600
  "legend"?: string;
3540
3601
  }
3541
3602
  interface JustifiBankAccountForm {
3603
+ /**
3604
+ * @default false
3605
+ */
3606
+ "showAccountNumberConfirmation"?: boolean;
3542
3607
  }
3543
3608
  interface JustifiBillingForm {
3544
3609
  "hideBankAccountBillingForm"?: boolean;
@@ -3594,6 +3659,10 @@ declare namespace LocalJSX {
3594
3659
  "legend"?: string;
3595
3660
  }
3596
3661
  interface JustifiCardForm {
3662
+ /**
3663
+ * Mask the card number to its last four digits when the field loses focus, with an eye toggle to reveal it. Defaults to false. Inside `justifi-modular-checkout` the wrapper's `mask-card-number` sets this; an explicit value here wins. Anti-shoulder-surfing only, not a secrecy boundary.
3664
+ */
3665
+ "maskCardNumber"?: boolean;
3597
3666
  }
3598
3667
  interface JustifiCheckout {
3599
3668
  "authToken": string;
@@ -3626,10 +3695,20 @@ declare namespace LocalJSX {
3626
3695
  * @default false
3627
3696
  */
3628
3697
  "hideCardBillingForm"?: boolean;
3698
+ /**
3699
+ * Mask the card number to its last four digits when the field loses focus, with an eye toggle to reveal it. Defaults to false. Anti-shoulder-surfing only, not a secrecy boundary.
3700
+ * @default false
3701
+ */
3702
+ "maskCardNumber"?: boolean;
3629
3703
  "onError-event"?: (event: JustifiCheckoutCustomEvent<ComponentErrorEvent>) => void;
3630
3704
  "onLoaded"?: (event: JustifiCheckoutCustomEvent<ILoadedEventResponse>) => void;
3631
3705
  "onSubmit-event"?: (event: JustifiCheckoutCustomEvent<ComponentSubmitEvent>) => void;
3632
3706
  "preCompleteHook"?: Hook<CheckoutState>;
3707
+ /**
3708
+ * Renders a "Confirm Account Number" field in the bank account form.
3709
+ * @default false
3710
+ */
3711
+ "showAccountNumberConfirmation"?: boolean;
3633
3712
  }
3634
3713
  interface JustifiCheckoutQrCode {
3635
3714
  "checkoutId": string;
@@ -3722,6 +3801,11 @@ declare namespace LocalJSX {
3722
3801
  interface JustifiModularCheckout {
3723
3802
  "authToken": string;
3724
3803
  "checkoutId": string;
3804
+ /**
3805
+ * Mask the card number to its last four digits when the field loses focus, with an eye toggle to reveal it. Applies to the `justifi-card-form` rendered inside this checkout. Defaults to false. Anti-shoulder-surfing only, not a secrecy boundary.
3806
+ * @default false
3807
+ */
3808
+ "maskCardNumber"?: boolean;
3725
3809
  "onCheckout-changed"?: (event: JustifiModularCheckoutCustomEvent<CheckoutChangedEventDetail>) => void;
3726
3810
  "onError-event"?: (event: JustifiModularCheckoutCustomEvent<any>) => void;
3727
3811
  "onSubmit-event"?: (event: JustifiModularCheckoutCustomEvent<any>) => void;
@@ -3974,10 +4058,18 @@ declare namespace LocalJSX {
3974
4058
  "hideBankAccountBillingForm"?: boolean;
3975
4059
  "hideCardBillingForm"?: boolean;
3976
4060
  "hideSubmitButton"?: boolean;
4061
+ /**
4062
+ * Mask the card number to its last four digits when the field loses focus, with an eye toggle to reveal it. Defaults to false. Anti-shoulder-surfing only, not a secrecy boundary.
4063
+ */
4064
+ "maskCardNumber"?: boolean;
3977
4065
  "onError-event"?: (event: JustifiTokenizePaymentMethodCustomEvent<ComponentErrorEvent1>) => void;
3978
4066
  "onSubmit-event"?: (event: JustifiTokenizePaymentMethodCustomEvent<ComponentSubmitEvent1>) => void;
3979
4067
  "paymentMethodGroupId"?: string;
3980
4068
  "savePaymentMethodLabel"?: string;
4069
+ /**
4070
+ * Renders a "Confirm Account Number" field in the bank account form.
4071
+ */
4072
+ "showAccountNumberConfirmation"?: boolean;
3981
4073
  /**
3982
4074
  * @default 'Submit'
3983
4075
  */
@@ -24,6 +24,7 @@ interface IInitialState {
24
24
  disableBankAccount: boolean;
25
25
  disableCreditCard: boolean;
26
26
  disablePaymentMethodGroup: boolean;
27
+ maskCardNumber: boolean;
27
28
  paymentAmount: number;
28
29
  paymentCurrency: string;
29
30
  paymentDescription: string;
@@ -10,6 +10,7 @@ export declare class FormControlText {
10
10
  errorText?: string;
11
11
  maxLength?: number;
12
12
  keyDownHandler?: (event: any) => void;
13
+ transformValue?: (value: string) => string;
13
14
  disabled?: boolean;
14
15
  handleDefaultValueChange(newValue: string): void;
15
16
  formControlInput: EventEmitter<any>;
@@ -11,15 +11,39 @@ export declare class IframeInput {
11
11
  inputId: string;
12
12
  label: string;
13
13
  iframeOrigin: string;
14
+ /**
15
+ * Opt this field into masking its value to the last four characters when it
16
+ * loses focus. Forwarded to the hosted field, which owns the behavior.
17
+ */
18
+ maskCardNumber?: boolean;
19
+ maskCardNumberChanged(): void;
20
+ private hasLoaded;
21
+ private wrapperElement;
22
+ /**
23
+ * The <iframe> is created in the LIGHT DOM and slotted in: an iframe inside a
24
+ * shadow tree is invisible to `window.frames` (spec), so siblings could not
25
+ * resolve it. The ::part wrappers stay in the shadow tree — theming untouched.
26
+ */
27
+ componentDidLoad(): void;
28
+ /**
29
+ * Stencil runs componentDidLoad once per instance; a DOM move (framework
30
+ * reparenting, list reorder) fires disconnected → connected on the same
31
+ * instance, so the iframe has to be put back by hand.
32
+ */
33
+ connectedCallback(): void;
34
+ private mountIframe;
35
+ componentDidRender(): void;
14
36
  disconnectedCallback(): void;
15
37
  validate(): Promise<any>;
16
38
  tokenize(clientId: string, paymentMethodMetadata: IPaymentMethodMetadata, account?: string): Promise<any>;
17
39
  reload(): Promise<void>;
18
40
  private initializeFrameCommunicationService;
19
41
  private dispatchMessageEvent;
42
+ private sendMaskCardNumber;
20
43
  private get part();
21
44
  private get style();
22
45
  private get urlParams();
23
46
  private get iframeSrc();
47
+ private renderedSrc;
24
48
  render(): any;
25
49
  }
@@ -1 +1,2 @@
1
1
  export declare const numberOnlyHandler: (e: KeyboardEvent | ClipboardEvent) => void;
2
+ export declare const zipCodeOnlyHandler: (e: KeyboardEvent | ClipboardEvent) => void;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Records this bundle's version on globalThis and logs an error when a second,
3
+ * different version of @justifi/webcomponents is already on the page. The first
4
+ * version loaded wins — it has registered the custom elements, so any later
5
+ * bundle is inert.
6
+ */
7
+ export declare const detectDuplicateVersion: () => void;
@@ -0,0 +1,3 @@
1
+ export declare const US_ZIP_REGEX: RegExp;
2
+ export declare const CA_OR_US_POSTAL_REGEX: RegExp;
3
+ export declare const normalizePostalCode: (value: string) => string;
@@ -1 +1 @@
1
- import{h as t,r as e,c as s}from"./p-CV0Pyo1O.js";import{S as a}from"./p-05AWudQe.js";import{T as r,a as i,b as o,c as d,d as h,e as n,f as c,g as p,h as l,i as f,j as m,k as u,l as b}from"./p-DZr0wLGh.js";import{T as y}from"./p-CZfYo5-1.js";import{c as g}from"./p-_MjmE9YT.js";import{a6 as v,a7 as j}from"./p-Bu7gdOaV.js";import{a as w}from"./p-Ds_P-dB8.js";import"./p-B4vLfYnZ.js";import{f as T,p as C,C as k,b as _}from"./p-Dqxyi-uK.js";import{p as O}from"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{B as D,a as S}from"./p-Dz8KJn2G.js";import"./p-HXpYMWUU.js";import{g as B,a as x}from"./p-BhpaUYtS.js";import{A as P}from"./p-C6Jq8YDT.js";import{J as I}from"./p-BjjKkMO1.js";import{o as Y,g as q}from"./p-DUtecvro.js";import"./p-MPer3Rw7.js";import"./p-BC9n8nB2.js";import"./p-DgTOxu8x.js";const A={created_at:()=>t("th",{part:v,scope:"col",title:"The date and time the order was created"},"Created At"),updated_at:()=>t("th",{part:v,scope:"col",title:"The date and time the order was last updated"},"Updated At"),order_status:()=>t("th",{part:v,scope:"col",title:"The current status of the order"},"Order Status"),business_id:()=>t("th",{part:v,scope:"col",title:"The business ID associated with the order"},"Business ID"),company_name:()=>t("th",{part:v,scope:"col",title:"The business name associated with the order"},"Business Name"),provider:()=>t("th",{part:v,scope:"col",title:"The provider associated with the order"},"Provider"),order_type:()=>t("th",{part:v,scope:"col",title:"The type of order"},"Order Type"),quantity:()=>t("th",{part:v,scope:"col",title:"The number of terminals associated with the order"},"Order Quantity")},E={created_at:(e,s)=>t("td",{part:j(s)},t("div",{class:"fw-bold"},w(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},w(e.created_at,{showTime:!0}))),updated_at:(e,s)=>t("td",{part:j(s)},t("div",{class:"fw-bold"},w(e.updated_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},w(e.updated_at,{showTime:!0}))),order_status:(e,s)=>t("td",{part:j(s)},t(S,Object.assign({},{submitted:{variant:D.PRIMARY,title:"This order is submitted",text:"Submitted"},completed:{variant:D.SUCCESS,title:"This order has been completed",text:"Completed"},created:{variant:D.SECONDARY,title:"This order is created",text:"Created"},in_progress:{variant:D.PRIMARY,title:"This order is in progress",text:"In Progress"},on_hold:{variant:D.WARNING,title:"This order is on hold",text:"On Hold"},canceled:{variant:D.DANGER,title:"This order is canceled",text:"Canceled"}}[e.order_status]))),business_id:(e,s)=>t("td",{part:j(s)},e.business_id),company_name:(e,s)=>t("td",{part:j(s)},e.company_name),provider:(e,s)=>t("td",{part:j(s)},e.provider),order_type:(e,s)=>{let a;return e.order_type===T.boardingOnly?a="Boarding Only":e.order_type===T.boardingShipping&&(a="Boarding & Shipping"),t("td",{part:j(s)},a)},quantity:(e,s)=>t("td",{part:j(s)},e.terminals.length)},L=P();class M{async fetchTerminalOrders(t,e,s){return L.get({endpoint:"terminals/orders",params:s,headers:{account:t},authToken:e})}}const U=class{constructor(t){e(this,t),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.columns="created_at,updated_at,order_status,quantity",this.terminalOrders=[],this.loading=!0,this.paging=O,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:y.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:y.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const s=this.terminalOrders.find((t=>t.id===e));this.clickEvent.emit({name:y.row,data:s})}}componentWillLoad(){g(),this.analytics=new I(this),this.terminalOrdersTable=new r(this.terminalOrders,this.columns,A,E),this.initializeGetData(),this.getTerminalOrders&&this.fetchData(),Y("set",(()=>{this.pagingParams={}})),Y("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}authPropChanged(){this.initializeGetData(),this.getTerminalOrders&&this.fetchData()}pagingOrColumnsChanged(){this.getTerminalOrders&&this.fetchData()}initializeGetData(){this.accountId&&this.authToken?this.getTerminalOrders=(({id:t,authToken:e,service:s})=>async({params:a,onSuccess:r,onError:i,final:o})=>{var d,h;try{const o=await s.fetchTerminalOrders(t,e,a);if(o.error)return i({error:x(o.error),code:B(null===(h=o.error)||void 0===h?void 0:h.code),severity:k.ERROR});{const t=Object.assign({},o.page_info);r({terminalOrders:(null===(d=o.data)||void 0===d?void 0:d.map((t=>new C(t))))||[],pagingInfo:t})}}catch(t){const e=B(null==t?void 0:t.code);return i({error:t.message||t,code:e,severity:k.ERROR})}finally{o()}})({id:this.accountId,authToken:this.authToken,service:new M}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:_.MISSING_PROPS,message:this.errorMessage,severity:k.ERROR}))}fetchData(){this.getTerminalOrders&&(this.loading=!0,this.getTerminalOrders({params:this.terminalOrderParams,onSuccess:async({terminalOrders:t,pagingInfo:e})=>{this.terminalOrders=t,this.paging=e,this.terminalOrdersTable.collectionData=this.terminalOrders},onError:({error:t,code:e,severity:s})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:s})},final:()=>{this.loading=!1}}))}get terminalOrderParams(){const t=q();return Object.assign(Object.assign({},t),this.pagingParams)}get entityId(){return this.terminalOrders.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalOrdersTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return t(a,{key:"ba50fc1b4bd66163d2ed0c5f98a6bbe18d991ddb"},t(i,{key:"b3203a5765b3ef1e564bdee4e0a6ad2603ac7c09"},t(o,{key:"efd22eb95810e22ac977dc6d323dc5b807110a95"},t(d,{key:"2ded9affdda7af379ffbbd76fa05226389de0dd0"},t(h,{key:"ca48cefe5d497f0b6cbe83f498939f4d1232a45b"},this.terminalOrdersTable.columnData.map((t=>t)))),t(n,{key:"d7a38ad880b6e9334bf72d3fa8cb6eb69b0032d6"},t(c,{key:"f4bc0a54a68f29f82a8f7a1c34a5d29a80f16f65",columnSpan:this.terminalOrdersTable.columnKeys.length,isLoading:this.loading}),t(p,{key:"7a0f199dd9640efc16578fe106d5d16cf8872e5a",isEmpty:this.showEmptyState,columnSpan:this.terminalOrdersTable.columnKeys.length}),t(l,{key:"cf1bf5094f0769f0a4d81c730649769cd0870fe3",columnSpan:this.terminalOrdersTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalOrdersTable.rowData.map(((e,s)=>t(f,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},e)))),this.paging&&t(m,{key:"cd9dee54cd5f27a0ae9c56771f6c99e0ea2ff125"},t(u,{key:"877284dd9926a1889fdf175ce0bf5db841fd9066"},t(b,{key:"2558454e5a5e3eb340170d6af43ad24c12aebdb8",colSpan:this.terminalOrdersTable.columnData.length},t("pagination-menu",{key:"8cf390bed552045b9950c4fcfe80f70e308d2cee",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["authPropChanged"],authToken:["authPropChanged"],pagingParams:["pagingOrColumnsChanged"],columns:["pagingOrColumnsChanged"]}}};export{U as justifi_terminal_orders_list}
1
+ import{h as t,r as e,c as s}from"./p-CV0Pyo1O.js";import{S as a}from"./p-05AWudQe.js";import{T as r,a as i,b as o,c as d,d as h,e as n,f as c,g as p,h as l,i as m,j as u,k as f,l as b}from"./p-DZr0wLGh.js";import{T as y}from"./p-CZfYo5-1.js";import{d as g}from"./p-DF7oFWnO.js";import{a6 as v,a7 as w}from"./p-Bu7gdOaV.js";import{a as j}from"./p-Ds_P-dB8.js";import"./p-B4vLfYnZ.js";import{f as T,p as C,C as k,b as _}from"./p-Dqxyi-uK.js";import{p as O}from"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{B as D,a as S}from"./p-Dz8KJn2G.js";import"./p-HXpYMWUU.js";import{g as x,a as P}from"./p-BhpaUYtS.js";import{A as B}from"./p-DCpGH4xL.js";import{J as I}from"./p-CEHwp4sh.js";import{o as A,g as E}from"./p-DUtecvro.js";import"./p-MPer3Rw7.js";import"./p-DhrQechy.js";import"./p-DgTOxu8x.js";const L={created_at:()=>t("th",{part:v,scope:"col",title:"The date and time the order was created"},"Created At"),updated_at:()=>t("th",{part:v,scope:"col",title:"The date and time the order was last updated"},"Updated At"),order_status:()=>t("th",{part:v,scope:"col",title:"The current status of the order"},"Order Status"),business_id:()=>t("th",{part:v,scope:"col",title:"The business ID associated with the order"},"Business ID"),company_name:()=>t("th",{part:v,scope:"col",title:"The business name associated with the order"},"Business Name"),provider:()=>t("th",{part:v,scope:"col",title:"The provider associated with the order"},"Provider"),order_type:()=>t("th",{part:v,scope:"col",title:"The type of order"},"Order Type"),quantity:()=>t("th",{part:v,scope:"col",title:"The number of terminals associated with the order"},"Order Quantity")},q={created_at:(e,s)=>t("td",{part:w(s)},t("div",{class:"fw-bold"},j(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},j(e.created_at,{showTime:!0}))),updated_at:(e,s)=>t("td",{part:w(s)},t("div",{class:"fw-bold"},j(e.updated_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},j(e.updated_at,{showTime:!0}))),order_status:(e,s)=>t("td",{part:w(s)},t(S,Object.assign({},{submitted:{variant:D.PRIMARY,title:"This order is submitted",text:"Submitted"},completed:{variant:D.SUCCESS,title:"This order has been completed",text:"Completed"},created:{variant:D.SECONDARY,title:"This order is created",text:"Created"},in_progress:{variant:D.PRIMARY,title:"This order is in progress",text:"In Progress"},on_hold:{variant:D.WARNING,title:"This order is on hold",text:"On Hold"},canceled:{variant:D.DANGER,title:"This order is canceled",text:"Canceled"}}[e.order_status]))),business_id:(e,s)=>t("td",{part:w(s)},e.business_id),company_name:(e,s)=>t("td",{part:w(s)},e.company_name),provider:(e,s)=>t("td",{part:w(s)},e.provider),order_type:(e,s)=>{let a;return e.order_type===T.boardingOnly?a="Boarding Only":e.order_type===T.boardingShipping&&(a="Boarding & Shipping"),t("td",{part:w(s)},a)},quantity:(e,s)=>t("td",{part:w(s)},e.terminals.length)},G=B();class H{async fetchTerminalOrders(t,e,s){return G.get({endpoint:"terminals/orders",params:s,headers:{account:t},authToken:e})}}const U=class{constructor(t){e(this,t),this.clickEvent=s(this,"click-event",7),this.errorEvent=s(this,"error-event",7),this.columns="created_at,updated_at,order_status,quantity",this.terminalOrders=[],this.loading=!0,this.paging=O,this.pagingParams={},this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:y.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:y.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const s=this.terminalOrders.find((t=>t.id===e));this.clickEvent.emit({name:y.row,data:s})}}componentWillLoad(){g(),this.analytics=new I(this),this.terminalOrdersTable=new r(this.terminalOrders,this.columns,L,q),this.initializeGetData(),this.getTerminalOrders&&this.fetchData(),A("set",(()=>{this.pagingParams={}})),A("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}authPropChanged(){this.initializeGetData(),this.getTerminalOrders&&this.fetchData()}pagingOrColumnsChanged(){this.getTerminalOrders&&this.fetchData()}initializeGetData(){this.accountId&&this.authToken?this.getTerminalOrders=(({id:t,authToken:e,service:s})=>async({params:a,onSuccess:r,onError:i,final:o})=>{var d,h;try{const o=await s.fetchTerminalOrders(t,e,a);if(o.error)return i({error:P(o.error),code:x(null===(h=o.error)||void 0===h?void 0:h.code),severity:k.ERROR});{const t=Object.assign({},o.page_info);r({terminalOrders:(null===(d=o.data)||void 0===d?void 0:d.map((t=>new C(t))))||[],pagingInfo:t})}}catch(t){const e=x(null==t?void 0:t.code);return i({error:t.message||t,code:e,severity:k.ERROR})}finally{o()}})({id:this.accountId,authToken:this.authToken,service:new H}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:_.MISSING_PROPS,message:this.errorMessage,severity:k.ERROR}))}fetchData(){this.getTerminalOrders&&(this.loading=!0,this.getTerminalOrders({params:this.terminalOrderParams,onSuccess:async({terminalOrders:t,pagingInfo:e})=>{this.terminalOrders=t,this.paging=e,this.terminalOrdersTable.collectionData=this.terminalOrders},onError:({error:t,code:e,severity:s})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:s})},final:()=>{this.loading=!1}}))}get terminalOrderParams(){const t=E();return Object.assign(Object.assign({},t),this.pagingParams)}get entityId(){return this.terminalOrders.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.terminalOrdersTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return t(a,{key:"536aeda1d21130b0289b62a77728e06c4c925b4d"},t(i,{key:"7865e36b01c6c37f45a66465680cf545ebe4529b"},t(o,{key:"301d38dab2c6ea3e88c86ff8bc3904fe9dc37100"},t(d,{key:"0da6586396379ae6bd10dcfecc814533df737a29"},t(h,{key:"5fd721f7fdffd547d3eda557ec55a1575334c88d"},this.terminalOrdersTable.columnData.map((t=>t)))),t(n,{key:"e6568d2f0a6cc0e52d729c4e3890c896e4538ee8"},t(c,{key:"286bfd64db33d107c13961f377055785756fc6ba",columnSpan:this.terminalOrdersTable.columnKeys.length,isLoading:this.loading}),t(p,{key:"0aed85e9c5912c327755b71dab28cb8b0c43ba64",isEmpty:this.showEmptyState,columnSpan:this.terminalOrdersTable.columnKeys.length}),t(l,{key:"718c86be52dd5bdf545ed1976cd51b474072ef41",columnSpan:this.terminalOrdersTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalOrdersTable.rowData.map(((e,s)=>t(m,{"data-test-id":"table-row","data-row-entity-id":this.entityId[s],onClick:this.rowClickHandler},e)))),this.paging&&t(u,{key:"783e78b798f8bbf0b03b193c9858e5afd991af68"},t(f,{key:"29057f6fec58617a44c328076e4856bc896eb3c2"},t(b,{key:"20ff58db34905a4d388c2b9425d3abb85099ec7a",colSpan:this.terminalOrdersTable.columnData.length},t("pagination-menu",{key:"e466c95839f3aaf33cfa8bc6baa8564a30022059",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["authPropChanged"],authToken:["authPropChanged"],pagingParams:["pagingOrColumnsChanged"],columns:["pagingOrColumnsChanged"]}}};export{U as justifi_terminal_orders_list}
@@ -0,0 +1 @@
1
+ import{r as t,h as a}from"./p-CV0Pyo1O.js";import{d as o}from"./p-DF7oFWnO.js";import{J as s}from"./p-CEHwp4sh.js";import{w as i}from"./p-B4vLfYnZ.js";import{S as r}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";import"./p-DhrQechy.js";import"./p-DCpGH4xL.js";import"./p-Ds_P-dB8.js";import"./p-HXpYMWUU.js";import"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import"./p-DgTOxu8x.js";const c=class{constructor(a){t(this,a),this.showAccountNumberConfirmation=!1}async componentWillLoad(){await i(),o(),this.analytics=new s(this)}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}async validate(){return this.bankAccountFormElement?this.bankAccountFormElement.validate():{isValid:!1}}async tokenize({clientId:t,paymentMethodMetadata:a,account:o}){return this.bankAccountFormElement?this.bankAccountFormElement.tokenize({clientId:t,paymentMethodMetadata:a,account:o}):{error:{message:"Bank account form is not available."}}}render(){return a(r,{key:"3ac1f01cffa56e4ce30214c6290af227dc21fd6f"},a("bank-account-form",{key:"d6c194dd830d1ea2cfcbdc0af2c3427aaa7652aa",ref:t=>this.bankAccountFormElement=t,showAccountNumberConfirmation:this.showAccountNumberConfirmation}))}};export{c as justifi_bank_account_form}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as a,H as e}from"./p-CV0Pyo1O.js";import{q as i,u as o,v as r,w as h,x as d,y as c}from"./p-Bu7gdOaV.js";import{F as f}from"./p-BTuqVZ6O.js";import{F as n}from"./p-CLZcevBz.js";import"./p-CZfYo5-1.js";import{f as l}from"./p-Ds_P-dB8.js";import"./p-HXpYMWUU.js";const p=class{constructor(a){t(this,a),this.formControlInput=s(this,"formControlInput",7),this.formControlBlur=s(this,"formControlBlur",7),this.isFocused=!1,this.defaultValue="0",this.formatRawValue=t=>t.replace(/\D/g,""),this.formatDisplayValue=t=>l(+t,void 0,!0),this.updateInput=t=>{const s=this.formControl.name,a=this.formatRawValue(t);this.formControl.value=this.formatDisplayValue(a),this.inputHandler(s,a),this.formControlInput.emit({name:s,value:a})}}handleDefaultValueChange(t){this.updateInput(t)}componentDidLoad(){this.updateInput(this.defaultValue)}get inputPart(){return this.errorText?i:this.disabled?o:this.isFocused?r:h}render(){return a(e,{key:"c93f2282272f252f5ebc3beaa2a9c8b5354d3e27"},a("div",{key:"7ae866ddbd1f59c41aa65e1403fc4bc50e339cad",class:"form-group d-flex flex-column"},a("label",{key:"1490d1484abf2bde39b66be0decf40cb631ec74f",part:d,class:"form-label",htmlFor:this.name},this.label),a(f,{key:"22134cce2d545a2890b1b8a3c7f65ed6d16dc56d",name:this.name,helpText:this.helpText}),a("div",{key:"d1630cf3ed7523af0c5138d3aa515d005f7d960e",class:"input-group"},a("span",{key:"6513844b4374ed9cac1b8e23036086bc002ea8f0",class:"input-group-text",part:c},"$"),a("input",{key:"a59d39b8d81bef0178556d4fa0094dba0c40fd6e",ref:t=>this.formControl=t,id:this.name,name:this.name,onFocus:()=>this.isFocused=!0,onBlur:()=>{this.isFocused=!1,this.formControlBlur.emit()},onInput:t=>this.updateInput(t.target.value),onKeyDown:this.keyDownHandler,onPaste:this.keyDownHandler,maxLength:this.maxLength,part:this.inputPart,class:this.errorText?"form-control is-invalid":"form-control",type:"text",disabled:this.disabled})),a(n,{key:"777cdcb4a8872899dfea021185b83ad0f73bf153",errorText:this.errorText,name:this.name})))}static get watchers(){return{defaultValue:["handleDefaultValueChange"]}}};export{p as form_control_monetary}
@@ -1 +1 @@
1
- import{r as e,c as t,h as s}from"./p-CV0Pyo1O.js";import{S as a}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";const o=class{constructor(s){e(this,s),this.checkboxChanged=t(this,"checkboxChanged",7),this.label="Save New Payment Method"}render(){return s(a,{key:"a8b450dc8d759d10da91b81e062adfcc4ec803f1"},s("save-new-payment-method",{key:"f463f223c38e4078b96efb0a99c3d932663b3574",label:this.label,hidden:this.hidden,onCheckboxChanged:e=>this.checkboxChanged.emit(e.detail)}))}};export{o as justifi_save_new_payment_method}
1
+ import{r as e,c as t,h as s}from"./p-CV0Pyo1O.js";import{S as a}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";const o=class{constructor(s){e(this,s),this.checkboxChanged=t(this,"checkboxChanged",7),this.label="Save New Payment Method"}render(){return s(a,{key:"e5792a56b3a21bcf3d5fb0604fbf487ce536b498"},s("save-new-payment-method",{key:"f01b1546e90db73bc8da8edcab4a3d384e4f742e",label:this.label,hidden:this.hidden,onCheckboxChanged:e=>this.checkboxChanged.emit(e.detail)}))}};export{o as justifi_save_new_payment_method}
@@ -1 +1 @@
1
- import{r as e,c as t,h as s,H as a}from"./p-CV0Pyo1O.js";import{c as h}from"./p-Fpaf7CLD.js";import"./p-DgTOxu8x.js";import"./p-DEx8fQeW.js";const o=class{constructor(s){e(this,s),this.checkboxChanged=t(this,"checkboxChanged",7),this.label="Save New Payment Method",this.isChecked=!1,this.handleCheckboxChange=(e,t)=>{this.isChecked=t,h.savePaymentMethod=t,this.checkboxChanged.emit(this.isChecked)}}render(){return s(a,{key:"664463db96e3e2ce7152dbe33a9a1a940a2b2c2f",hidden:this.hidden},s("form-control-checkbox",{key:"4f90f2799f1efddc15703906a6f3e183816239e6",label:this.label||"Save New Payment Method",name:"saveNewPaymentMethod",checked:this.isChecked,inputHandler:this.handleCheckboxChange}))}};export{o as save_new_payment_method}
1
+ import{r as e,c as t,h as s,H as a}from"./p-CV0Pyo1O.js";import{c as h}from"./p-FsWkrvEF.js";import"./p-DgTOxu8x.js";import"./p-DEx8fQeW.js";const o=class{constructor(s){e(this,s),this.checkboxChanged=t(this,"checkboxChanged",7),this.label="Save New Payment Method",this.isChecked=!1,this.handleCheckboxChange=(e,t)=>{this.isChecked=t,h.savePaymentMethod=t,this.checkboxChanged.emit(this.isChecked)}}render(){return s(a,{key:"b3dd9d66db6d192d31ea2eea5d1364957b0d6048",hidden:this.hidden},s("form-control-checkbox",{key:"e40dbe64979cae47936ce53841e62aea25774840",label:this.label||"Save New Payment Method",name:"saveNewPaymentMethod",checked:this.isChecked,inputHandler:this.handleCheckboxChange}))}};export{o as save_new_payment_method}
@@ -0,0 +1 @@
1
+ import{r as e,h as a}from"./p-CV0Pyo1O.js";import{l as t}from"./p-OeJ-3w3l.js";import{c as s,a as i}from"./p-Ds_P-dB8.js";import{f as d,p as r,c as l}from"./p-BzjgvHHT.js";import{f,a as c}from"./p-Bu7gdOaV.js";import{S as o}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";import"./p-B4vLfYnZ.js";import{g as b}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-DgTOxu8x.js";const n=class{constructor(a){e(this,a),this.setParamsOnChange=(e,a)=>{d[e]=a},this.handleDateInput=(e,a)=>{const t=s(a,{setExactTime:!0});this.setParamsOnChange(e,t)}}componentWillLoad(){this.debouncedSetParamsOnChange=t.debounce(this.setParamsOnChange,300),Object.entries({terminal_id:this.terminalId,status:this.terminalStatus,terminal_order_id:this.terminalOrderId,provider_id:this.providerId,serial_number:this.serialNumber,created_after:this.createdAfter,created_before:this.createdBefore}).forEach((([e,a])=>{a&&(r[e]=a)}))}get terminalStatusOptions(){return[{label:"All",value:""},{label:"Connected",value:b.connected},{label:"Disconnected",value:b.disconnected},{label:"Unknown",value:b.unknown},{label:"Pending Configuration",value:b.pending_configuration},{label:"Archived",value:b.archived}]}render(){const e=Object.assign({},d);return a(o,{key:"26a998794ef5756de257db995ef5b7b1471e50ea"},a("table-filters-menu",{key:"c1368bddbe2ac553d92f46d7f2bdfa3fe3c04931",params:e,clearParams:l,part:f},a("div",{key:"e9f4523328d3393a75fa4e5a044baab7bf4f6134",class:"grid-cols-2 gap-3 p-1"},a("div",{key:"2589335f3b9908c30d085786c43d5829aaa3b9fe",class:"p-2"},a("form-control-text",{key:"f01cdfd58973b4bfe0b4b5aa6df0f63bce57d9d5",name:"terminal_id",label:"Terminal ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalId||d.terminal_id,disabled:!!this.terminalId,part:c})),a("div",{key:"96b1aa8711775775d57fa792fca5e66dd7d50ae9",class:"p-2"},a("form-control-text",{key:"44794ce04f2cc7d31483bd816996501aea9e3763",name:"terminal_order_id",label:"Terminal Order ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.terminalOrderId||d.terminal_order_id,disabled:!!this.terminalOrderId,part:c})),a("div",{key:"a4c47ab87e6ee27277fe07d224bf1602f6e5ac73",class:"p-2"},a("form-control-text",{key:"29b825179907ee1f1a43afe337f852f2accdcafc",name:"provider_id",label:"Device ID",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.providerId||d.provider_id,disabled:!!this.providerId,part:c})),a("div",{key:"064fe6ec6be35e72ddb23f5140e83d83d37101b1",class:"p-2"},a("form-control-text",{key:"073783ba7be15000e1511a608be6b05b9fc481fa",name:"serial_number",label:"Serial Number",inputHandler:this.debouncedSetParamsOnChange,defaultValue:this.serialNumber||d.serial_number,disabled:!!this.serialNumber,part:c})),a("div",{key:"3d3fdc0fdbec56f9a0130029473874afe97b4fac",class:"p-2"},a("form-control-select",{key:"e19f7c1838cb082bd1231e857cbfafe8f68f2f63",name:"status",label:"Status",options:this.terminalStatusOptions,inputHandler:this.setParamsOnChange,defaultValue:this.terminalStatus||d.status||"",disabled:!!this.terminalStatus,part:c})),a("div",{key:"c0dc5690ea48041fd39b185cf687a92d52f61a0a",class:"p-2"},a("form-control-date",{key:"78a1b6f1c817a67466384dc5e22d73447153bf28",name:"created_after",label:"Created After",inputHandler:this.handleDateInput,defaultValue:i(this.createdAfter||d.created_after,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdAfter,part:c})),a("div",{key:"5d3e2fd0c1a19c5692240999684efc93aead7c4c",class:"p-2"},a("form-control-date",{key:"6e47f9c0af83273c6a819cc625e31a9cb60c93e7",name:"created_before",label:"Created Before",inputHandler:this.handleDateInput,defaultValue:i(this.createdBefore||d.created_before,{showInputDateTime:!0}),showTime:!0,disabled:!!this.createdBefore,part:c})))))}};export{n as justifi_terminals_list_filters}
@@ -1 +1 @@
1
- import{h as t,r as e,c as i}from"./p-CV0Pyo1O.js";import{n as s,C as a,b as r}from"./p-Dqxyi-uK.js";import{J as n}from"./p-BjjKkMO1.js";import{c as o}from"./p-_MjmE9YT.js";import{T as c}from"./p-DC2djVls.js";import"./p-B4vLfYnZ.js";import"./p-HXpYMWUU.js";import{p as h}from"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{g as d,a as p}from"./p-BhpaUYtS.js";import{m,S as u}from"./p-iA-Amt2z.js";import{S as l}from"./p-05AWudQe.js";import{T as f,a as b,b as v,c as g,d as j,e as k,f as y,g as T,h as _,i as C,j as w,k as S,l as D}from"./p-DZr0wLGh.js";import{T as O}from"./p-CZfYo5-1.js";import{B as P,a as A}from"./p-Dz8KJn2G.js";import{a6 as x,a7 as I}from"./p-Bu7gdOaV.js";import{j as B}from"./p-Ds_P-dB8.js";import{o as E,g as Y}from"./p-BzjgvHHT.js";import"./p-BC9n8nB2.js";import"./p-C6Jq8YDT.js";import"./p-DgTOxu8x.js";import"./p-MPer3Rw7.js";const z={nickname:()=>t("th",{part:x,scope:"col",title:"The nickname associated with the terminal"},"Nickname"),model_name:()=>t("th",{part:x,scope:"col",title:"The model name of the terminal"},"Model Name"),id:()=>t("th",{part:x,scope:"col",title:"The ID of the terminal"},"ID"),provider:()=>t("th",{part:x,scope:"col",title:"The provider of the terminal"},"Provider"),provider_serial_number:()=>t("th",{part:x,scope:"col",title:"The serial number of the terminal"},"Serial Number"),device_id:()=>t("th",{part:x,scope:"col",title:"The device/provider ID of the terminal"},"Device ID"),sub_account_name:()=>t("th",{part:x,scope:"col",title:"The sub account associated with the terminal"},"Sub Account"),status:()=>t("th",{part:x,scope:"col",title:"The current status of each terminal"},"Status")},G={nickname:(e,i)=>t("td",{part:I(i)},e.nickname),model_name:(e,i)=>t("td",{part:I(i)},e.model_name),id:(e,i)=>t("td",{part:I(i)},e.id),provider:(e,i)=>t("td",{part:I(i)},B(e.provider)),provider_serial_number:(e,i)=>t("td",{part:I(i)},e.provider_serial_number),device_id:(e,i)=>t("td",{part:I(i)},e.provider_id),sub_account_name:(e,i)=>t("td",{part:I(i)},e.sub_account_name),status:(e,i)=>t("td",{part:I(i)},t(A,Object.assign({},{connected:{variant:P.SUCCESS,title:"This terminal is connected",text:"Connected"},disconnected:{variant:P.DANGER,title:"This terminal is disconnected",text:"Disconnected"},unknown:{variant:P.SECONDARY,title:"The status of this terminal is unknown",text:"Unknown"},pending_configuration:{variant:P.WARNING,title:"This terminal is pending configuration",text:"Pending configuration"},archived:{variant:P.SECONDARY,title:"This terminal is archived",text:"Archived"}}[e.status])))},M=class{constructor(t){e(this,t),this.clickEvent=i(this,"click-event",7),this.errorEvent=i(this,"error-event",7),this.terminals=[],this.subAccounts=[],this.loading=!0,this.paging=h,this.pagingParams={},this.columns="nickname,provider_serial_number,status",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:O.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:O.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const i=this.terminals.find((t=>t.id===e));this.clickEvent.emit({name:O.row,data:i})}}componentWillLoad(){o(),this.analytics=new n(this),this.terminalsTable=new f(this.terminals,this.columns,z,G),this.initializeGetData(),this.getTerminals&&this.getSubAccounts&&this.fetchData(),E("set",(()=>{this.pagingParams={}})),E("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}updateOnPropChange(){this.fetchData()}initializeGetData(){this.initializeGetTerminals(),this.initializeGetSubAccounts()}initializeGetTerminals(){this.accountId&&this.authToken?this.getTerminals=(({id:t,authToken:e,service:i})=>async({params:r,onSuccess:n,onError:o})=>{var c,h;try{const m=await i.fetchTerminals(t,e,r);if(m.error)return o({error:p(m.error),code:d(null===(h=m.error)||void 0===h?void 0:h.code),severity:a.ERROR});{const t=Object.assign({},m.page_info);n({terminals:(null===(c=m.data)||void 0===c?void 0:c.map((t=>new s(t))))||[],pagingInfo:t})}}catch(t){const e=d(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:a.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new c}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:a.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({primaryAccountId:this.accountId,authToken:this.authToken,service:new u}))}fetchData(){this.loading=!0,this.getTerminals({params:this.terminalParams,onSuccess:async({terminals:t,pagingInfo:e})=>{this.terminals=t,this.paging=e,this.terminalsTable.collectionData=this.terminals,this.terminalsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:e,severity:i})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:i}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.terminals=this.terminals.map((t=>{var e;return t.sub_account_name=null===(e=this.subAccounts.find((e=>e.id===t.account_id)))||void 0===e?void 0:e.name,t})),this.loading=!1},onError:({error:t,code:e,severity:i})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:i}),this.loading=!1}})}get terminalParams(){const t=Y();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){const 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 t(l,{key:"47fca9f9a3285303bf0edc9f771324cdeeccc81d"},t(b,{key:"08158b4b6353b0aa178bc1999372341826dacebe"},t(v,{key:"6667e38e47b157fce34912108f303c688e891d50"},t(g,{key:"4fb637073cc3ecdea161af76a4aa63dce3572749"},t(j,{key:"aaa85ad73185d77deff24c8085a794871eae2058"},this.terminalsTable.columnData.map((t=>t)))),t(k,{key:"794e1d3efc15addf7d4638583d5c269aeec270b1"},t(y,{key:"6545c145ccba03f2e8b3ee990ee1050349b428ac",columnSpan:this.terminalsTable.columnKeys.length,isLoading:this.loading}),t(T,{key:"4464655c4eb9dfa6f5da83f41e7776488b0780c5",isEmpty:this.showEmptyState,columnSpan:this.terminalsTable.columnKeys.length}),t(_,{key:"63b0460aba3b2c173d0aa94ba33c46081561d459",columnSpan:this.terminalsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalsTable.rowData.map(((e,i)=>t(C,{"data-test-id":"table-row","data-row-entity-id":this.entityId[i],onClick:this.rowClickHandler},e)))),this.paging&&t(w,{key:"4555f7a255231f691498ec3780d0df9e8a70bfbd"},t(S,{key:"ba55004c9e60032698b79d2c15a9e06a123ef6a0"},t(D,{key:"c778a569fb066ca834730cc9ac4d7a0592c420ad",colSpan:this.terminalsTable.columnData.length},t("pagination-menu",{key:"936ef5ccd9b1d1d2043daed21006ad2bc8a9011a",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"],pagingParams:["updateOnPropChange"],getTerminals:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{M as justifi_terminals_list}
1
+ import{h as t,r as e,c as i}from"./p-CV0Pyo1O.js";import{n as s,C as a,b as r}from"./p-Dqxyi-uK.js";import{J as n}from"./p-CEHwp4sh.js";import{d as o}from"./p-DF7oFWnO.js";import{T as c}from"./p-CEGSQXGU.js";import"./p-B4vLfYnZ.js";import"./p-HXpYMWUU.js";import{p as h}from"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{g as d,a as p}from"./p-BhpaUYtS.js";import{m,S as u}from"./p-C8J9uVEs.js";import{S as l}from"./p-05AWudQe.js";import{T as f,a as b,b as v,c as g,d as y,e as j,f as k,g as T,h as C,i as w,j as _,k as S,l as D}from"./p-DZr0wLGh.js";import{T as O}from"./p-CZfYo5-1.js";import{B as P,a as x}from"./p-Dz8KJn2G.js";import{a6 as A,a7 as I}from"./p-Bu7gdOaV.js";import{j as E}from"./p-Ds_P-dB8.js";import{o as G,g as B}from"./p-BzjgvHHT.js";import"./p-DhrQechy.js";import"./p-DCpGH4xL.js";import"./p-DgTOxu8x.js";import"./p-MPer3Rw7.js";const H={nickname:()=>t("th",{part:A,scope:"col",title:"The nickname associated with the terminal"},"Nickname"),model_name:()=>t("th",{part:A,scope:"col",title:"The model name of the terminal"},"Model Name"),id:()=>t("th",{part:A,scope:"col",title:"The ID of the terminal"},"ID"),provider:()=>t("th",{part:A,scope:"col",title:"The provider of the terminal"},"Provider"),provider_serial_number:()=>t("th",{part:A,scope:"col",title:"The serial number of the terminal"},"Serial Number"),device_id:()=>t("th",{part:A,scope:"col",title:"The device/provider ID of the terminal"},"Device ID"),sub_account_name:()=>t("th",{part:A,scope:"col",title:"The sub account associated with the terminal"},"Sub Account"),status:()=>t("th",{part:A,scope:"col",title:"The current status of each terminal"},"Status")},L={nickname:(e,i)=>t("td",{part:I(i)},e.nickname),model_name:(e,i)=>t("td",{part:I(i)},e.model_name),id:(e,i)=>t("td",{part:I(i)},e.id),provider:(e,i)=>t("td",{part:I(i)},E(e.provider)),provider_serial_number:(e,i)=>t("td",{part:I(i)},e.provider_serial_number),device_id:(e,i)=>t("td",{part:I(i)},e.provider_id),sub_account_name:(e,i)=>t("td",{part:I(i)},e.sub_account_name),status:(e,i)=>t("td",{part:I(i)},t(x,Object.assign({},{connected:{variant:P.SUCCESS,title:"This terminal is connected",text:"Connected"},disconnected:{variant:P.DANGER,title:"This terminal is disconnected",text:"Disconnected"},unknown:{variant:P.SECONDARY,title:"The status of this terminal is unknown",text:"Unknown"},pending_configuration:{variant:P.WARNING,title:"This terminal is pending configuration",text:"Pending configuration"},archived:{variant:P.SECONDARY,title:"This terminal is archived",text:"Archived"}}[e.status])))},z=class{constructor(t){e(this,t),this.clickEvent=i(this,"click-event",7),this.errorEvent=i(this,"error-event",7),this.terminals=[],this.subAccounts=[],this.loading=!0,this.paging=h,this.pagingParams={},this.columns="nickname,provider_serial_number,status",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:O.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:O.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const i=this.terminals.find((t=>t.id===e));this.clickEvent.emit({name:O.row,data:i})}}componentWillLoad(){o(),this.analytics=new n(this),this.terminalsTable=new f(this.terminals,this.columns,H,L),this.initializeGetData(),this.getTerminals&&this.getSubAccounts&&this.fetchData(),G("set",(()=>{this.pagingParams={}})),G("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}updateOnPropChange(){this.fetchData()}initializeGetData(){this.initializeGetTerminals(),this.initializeGetSubAccounts()}initializeGetTerminals(){this.accountId&&this.authToken?this.getTerminals=(({id:t,authToken:e,service:i})=>async({params:r,onSuccess:n,onError:o})=>{var c,h;try{const m=await i.fetchTerminals(t,e,r);if(m.error)return o({error:p(m.error),code:d(null===(h=m.error)||void 0===h?void 0:h.code),severity:a.ERROR});{const t=Object.assign({},m.page_info);n({terminals:(null===(c=m.data)||void 0===c?void 0:c.map((t=>new s(t))))||[],pagingInfo:t})}}catch(t){const e=d(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:a.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new c}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:a.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({primaryAccountId:this.accountId,authToken:this.authToken,service:new u}))}fetchData(){this.loading=!0,this.getTerminals({params:this.terminalParams,onSuccess:async({terminals:t,pagingInfo:e})=>{this.terminals=t,this.paging=e,this.terminalsTable.collectionData=this.terminals,this.terminalsTable.columnKeys.includes("sub_account_name")?await this.fetchSubAccounts():this.loading=!1},onError:({error:t,code:e,severity:i})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:i}),this.loading=!1}})}async fetchSubAccounts(){this.getSubAccounts({params:this.subAccountParams,onSuccess:({subAccounts:t})=>{this.subAccounts=t,this.terminals=this.terminals.map((t=>{var e;return t.sub_account_name=null===(e=this.subAccounts.find((e=>e.id===t.account_id)))||void 0===e?void 0:e.name,t})),this.loading=!1},onError:({error:t,code:e,severity:i})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:i}),this.loading=!1}})}get terminalParams(){const t=B();return Object.assign(Object.assign({},t),this.pagingParams)}get subAccountParams(){const 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 t(l,{key:"7aff8b07dcd19216c714f2318c1af5dbebc54147"},t(b,{key:"7daec7f4553f687b3ebbeb7d561fbf904049841b"},t(v,{key:"2f67e873333800bdd78d8c60f9db218c349097d0"},t(g,{key:"61499a69253f0add24f5e60c385b14fc3e6ba90f"},t(y,{key:"fcd5d3287d6dd3dbf4e20837ca06d9f6dcc74a16"},this.terminalsTable.columnData.map((t=>t)))),t(j,{key:"664b70934aae39f8ccceeaaf012e1933a4c27c95"},t(k,{key:"3d5e79192be7a6a8e2611d9ac7d551e15a4a4207",columnSpan:this.terminalsTable.columnKeys.length,isLoading:this.loading}),t(T,{key:"60d4263bd934af2c6d204a3d2f0aee6639043d80",isEmpty:this.showEmptyState,columnSpan:this.terminalsTable.columnKeys.length}),t(C,{key:"2d3340153f20d7a057e31f3eb2b570ec1d7c4e9f",columnSpan:this.terminalsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.terminalsTable.rowData.map(((e,i)=>t(w,{"data-test-id":"table-row","data-row-entity-id":this.entityId[i],onClick:this.rowClickHandler},e)))),this.paging&&t(_,{key:"b893b1cd12d3c0440b1c5cb015503aa8309a84e1"},t(S,{key:"532462ef72bc8c9fbbf8cae69c1f7ebd60b403b4"},t(D,{key:"c18d2a8f05cbc17f7dc21a18a814a7eb8c83d6ea",colSpan:this.terminalsTable.columnData.length},t("pagination-menu",{key:"fd1aef3373787dfb79f517a69e2d771d61d5dee3",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"],pagingParams:["updateOnPropChange"],getTerminals:["updateOnPropChange"],getSubAccounts:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{z as justifi_terminals_list}
@@ -1 +1 @@
1
- import{r as s,c as t,h as e,H as i}from"./p-CV0Pyo1O.js";import{F as c,G as h,H as a,I as r,J as o,x as f}from"./p-Bu7gdOaV.js";import{F as d}from"./p-BTuqVZ6O.js";import{F as m}from"./p-CLZcevBz.js";import"./p-CZfYo5-1.js";const n=class{constructor(e){s(this,e),this.formControlInput=t(this,"formControlInput",7),this.formControlBlur=t(this,"formControlBlur",7),this.isFocused=!1,this.errorText="",this.inputHandler=()=>{},this.disabled=!1,this.handleFormControlInput=s=>{s.preventDefault();const t=s.target,e=t.getAttribute("name");this.inputHandler(e,t.checked),this.formControlInput.emit({name:e,value:t.value})},this.updateInput=s=>{this.checkboxElement.checked=s}}get part(){return this.errorText?c:this.isFocused&&this.checked?h:this.isFocused?a:this.checked?r:o}render(){return e(i,{key:"9ea01cd4924c033667f62b7aa40d58b5faccc031"},e("div",{key:"88d3b33c11dbbe42e0fb297897488b0ba556d651",class:"form-group d-flex flex-column"},e("div",{key:"90207e47e5894596fce269e55ba2c6e9d0e01956",class:"form-check"},e("input",{key:"ab0d509ef0767fe895ee97d307e9b7c1ae4ee74c",ref:s=>this.checkboxElement=s,type:"checkbox",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-check-input is-invalid":"form-check-input",disabled:this.disabled,checked:this.checked}),e("label",{key:"3b073d6d6c8be7ed363d2fe58a23938151a38470",class:"form-check-label",htmlFor:this.name,part:f},this.label)),e(d,{key:"5e0718d4617805c9dcf80e3152df0064cf479f8b",helpText:this.helpText,name:this.name}),e(m,{key:"03480fb80e0f07d6264913f495c7cfc1a137b621",errorText:this.errorText,name:this.name})))}};export{n as form_control_checkbox}
1
+ import{r as s,c as t,h as e,H as i}from"./p-CV0Pyo1O.js";import{F as a,G as c,H as h,I as r,J as o,x as f}from"./p-Bu7gdOaV.js";import{F as d}from"./p-BTuqVZ6O.js";import{F as m}from"./p-CLZcevBz.js";import"./p-CZfYo5-1.js";const n=class{constructor(e){s(this,e),this.formControlInput=t(this,"formControlInput",7),this.formControlBlur=t(this,"formControlBlur",7),this.isFocused=!1,this.errorText="",this.inputHandler=()=>{},this.disabled=!1,this.handleFormControlInput=s=>{s.preventDefault();const t=s.target,e=t.getAttribute("name");this.inputHandler(e,t.checked),this.formControlInput.emit({name:e,value:t.value})},this.updateInput=s=>{this.checkboxElement.checked=s}}get part(){return this.errorText?a:this.isFocused&&this.checked?c:this.isFocused?h:this.checked?r:o}render(){return e(i,{key:"b4a318391a00778af627a0385a93d7ef60c4bccf"},e("div",{key:"51cc39ecf64ee93f675debb15f41826cb8313f55",class:"form-group d-flex flex-column"},e("div",{key:"6f94ae2471682353da92935d54ecfc6586c23043",class:"form-check"},e("input",{key:"0765ddf0ca90961699fb4193bc69f4d993a86605",ref:s=>this.checkboxElement=s,type:"checkbox",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-check-input is-invalid":"form-check-input",disabled:this.disabled,checked:this.checked}),e("label",{key:"1393b351ea9d57d215f57c6dab211db04456563c",class:"form-check-label",htmlFor:this.name,part:f},this.label)),e(d,{key:"e6cf1f28d5319dddce29f2e8e16d5124696f7f2d",helpText:this.helpText,name:this.name}),e(m,{key:"073b4f85a30dad86a1d71acc4f81f8be83d915d9",errorText:this.errorText,name:this.name})))}};export{n as form_control_checkbox}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as s}from"./p-CV0Pyo1O.js";import{m as i}from"./p-D7nyPi2Q.js";import{C as h}from"./p-BKrZL95i.js";import{C as r,b as o,I as a,c as l,d as n}from"./p-Dqxyi-uK.js";import{J as c}from"./p-CEHwp4sh.js";import{d}from"./p-DF7oFWnO.js";import"./p-BhpaUYtS.js";import"./p-DCpGH4xL.js";import"./p-B4vLfYnZ.js";import"./p-DgTOxu8x.js";import"./p-Ds_P-dB8.js";import"./p-HXpYMWUU.js";import"./p-DhrQechy.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";const u=class{constructor(s){t(this,s),this.checkoutCompleted=e(this,"checkout-completed",7),this.checkoutExpired=e(this,"checkout-expired",7),this.errorEvent=e(this,"error-event",7),this.pollIntervalMs=3e3,this.pollTimeoutMs=6e5,this.terminalState="loading",this.paymentStatus="",this.errorMessage="",this.pollIntervalHandle=null,this.pollTimeoutHandle=null,this.failedDismissHandle=null,this.seenCompletionCreatedAts=new Set,this.inFlight=!1}componentWillLoad(){d(),this.analytics=new c(this),this.initialize()}disconnectedCallback(){var t;this.stopAll(),null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.stopAll(),this.initialize()}suppressInnerErrors(t){t.stopPropagation()}get effectivePollInterval(){return Math.max(1e3,this.pollIntervalMs)}initialize(){this.authToken&&this.checkoutId?(this.terminalState="loading",this.getCheckout=i({authToken:this.authToken,checkoutId:this.checkoutId,service:new h}),this.getCheckout({onSuccess:({checkout:t})=>this.handleInitialLoad(t),onError:({error:t,code:e,severity:s})=>{this.terminalState="error",this.errorMessage=t,this.errorEvent.emit({message:t,errorCode:e,severity:s})}})):this.errorEvent.emit({message:"authToken and checkoutId are required",errorCode:o.MISSING_PROPS,severity:r.ERROR})}handleInitialLoad(t){var e;switch(t.status){case a.expired:this.terminalState="expired",this.checkoutExpired.emit({checkoutId:this.checkoutId}),this.errorEvent.emit({message:l.CHECKOUT_EXPIRED,errorCode:o.CHECKOUT_EXPIRED,severity:r.ERROR});break;case a.completed:this.terminalState="completed",this.paymentStatus=this.resolvePaymentStatus(t),this.checkoutCompleted.emit({checkoutId:this.checkoutId,paymentStatus:this.paymentStatus});break;default:(null!==(e=t.completions)&&void 0!==e?e:[]).forEach((t=>this.seenCompletionCreatedAts.add(t.created_at))),this.terminalState="ready",this.startPolling()}}startPolling(){this.pollTimeoutHandle=setTimeout((()=>{this.stopAll(),this.terminalState="error",this.errorMessage="Checkout polling timed out",this.errorEvent.emit({message:"Checkout polling timed out",errorCode:o.FETCH_ERROR,severity:r.ERROR})}),this.pollTimeoutMs),this.pollIntervalHandle=setInterval((()=>this.tick()),this.effectivePollInterval)}tick(){this.inFlight||(this.inFlight=!0,this.getCheckout({onSuccess:({checkout:t})=>{this.inFlight=!1,this.handlePollResult(t)},onError:({error:t,code:e,severity:s})=>{this.inFlight=!1,this.stopAll(),this.terminalState="error",this.errorMessage=t,this.errorEvent.emit({message:t,errorCode:e,severity:s})}}))}handlePollResult(t){var e;const s=(null!==(e=t.completions)&&void 0!==e?e:[]).filter((t=>!this.seenCompletionCreatedAts.has(t.created_at)&&"failed"===t.payment_status));if(s.forEach((t=>this.seenCompletionCreatedAts.add(t.created_at))),s.length>0&&(this.terminalState="payment-failed",this.failedDismissHandle&&clearTimeout(this.failedDismissHandle),this.failedDismissHandle=setTimeout((()=>{"payment-failed"===this.terminalState&&(this.terminalState="ready")}),3e3)),t.status===a.completed)return this.stopAll(),this.terminalState="completed",this.paymentStatus=this.resolvePaymentStatus(t),void this.checkoutCompleted.emit({checkoutId:this.checkoutId,paymentStatus:this.paymentStatus});t.status===a.expired&&(this.stopAll(),this.terminalState="expired",this.checkoutExpired.emit({checkoutId:this.checkoutId}),this.errorEvent.emit({message:l.CHECKOUT_EXPIRED,errorCode:o.CHECKOUT_EXPIRED,severity:r.ERROR}))}resolvePaymentStatus(t){var e,s;const i=null===(s=[...null!==(e=t.completions)&&void 0!==e?e:[]].sort(((t,e)=>new Date(e.updated_at).getTime()-new Date(t.updated_at).getTime()))[0])||void 0===s?void 0:s.payment_status;return i===n.succeeded||null==i&&t.successful_payment_id?"succeeded":"pending"}stopAll(){this.pollIntervalHandle&&(clearInterval(this.pollIntervalHandle),this.pollIntervalHandle=null),this.pollTimeoutHandle&&(clearTimeout(this.pollTimeoutHandle),this.pollTimeoutHandle=null),this.failedDismissHandle&&(clearTimeout(this.failedDismissHandle),this.failedDismissHandle=null),this.inFlight=!1}render(){return this.authToken&&this.checkoutId?s("div",null,"loading"===this.terminalState&&null,("ready"===this.terminalState||"payment-failed"===this.terminalState)&&s("div",null,s("justifi-checkout-qr-code",{checkoutId:this.checkoutId}),"payment-failed"===this.terminalState&&s("p",null,"Payment failed. Please try again."),"ready"===this.terminalState&&s("p",null,"Scan to pay")),"completed"===this.terminalState&&s("div",null,s("p",null,"succeeded"===this.paymentStatus?"Payment received":"Payment pending")),"expired"===this.terminalState&&s("p",null,"Checkout expired. Please create a new checkout."),"error"===this.terminalState&&s("p",null,this.errorMessage)):null}static get watchers(){return{authToken:["propChanged"],checkoutId:["propChanged"]}}};export{u as justifi_qr_terminal}
@@ -0,0 +1 @@
1
+ import{r as s,c as t,h as i}from"./p-CV0Pyo1O.js";import{D as e,C as r,b as o,h}from"./p-Dqxyi-uK.js";import{J as p}from"./p-CEHwp4sh.js";import{d as a}from"./p-DF7oFWnO.js";import{g as n,a as d}from"./p-BhpaUYtS.js";import{D as u,a as c}from"./p-B6kC9tX2.js";import{S as m}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";import"./p-Ds_P-dB8.js";import"./p-HXpYMWUU.js";import"./p-DhrQechy.js";import"./p-DCpGH4xL.js";import"./p-B4vLfYnZ.js";import"./p-DgTOxu8x.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";const f=class{constructor(i){s(this,i),this.errorEvent=t(this,"error-event",7),this.isLoading=!0,this.showDisputeResponseForm=!1,this.fetchDisputePending=!1}scheduleFetchDispute(){this.getDispute&&!this.fetchDisputePending&&(this.fetchDisputePending=!0,queueMicrotask((()=>{this.fetchDisputePending=!1,this.getDispute&&this.fetchData()})))}disputeResponseHandler(s){s.detail.name===u.respondToDispute&&(this.showDisputeResponseForm=!0),s.detail.name===u.cancelDispute&&(this.showDisputeResponseForm=!1)}disputeSubmittedHandler(){this.fetchData()}componentWillLoad(){a(),this.analytics=new p(this),this.initializeGetDispute()}componentDidLoad(){this.scheduleFetchDispute()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}propChanged(){this.initializeGetDispute(),this.scheduleFetchDispute()}initializeGetDispute(){this.disputeId&&this.authToken?this.getDispute=(({id:s,authToken:t,service:i})=>async({onSuccess:o,onError:h})=>{var p;try{const a=await i.fetchDispute(s,t);if(a.error)return h({error:d(a.error),code:n(null===(p=a.error)||void 0===p?void 0:p.code),severity:r.ERROR});{const s=Object.assign({},a.page_info);o({dispute:new e(a.data),pagingInfo:s})}}catch(s){const t=n(null==s?void 0:s.code);return h({error:s.message||s,code:t,severity:r.ERROR})}})({id:this.disputeId,authToken:this.authToken,service:new c}):this.errorEvent.emit({message:"Dispute ID and Auth Token are required",errorCode:o.MISSING_PROPS,severity:r.ERROR})}fetchData(){this.getDispute&&(this.isLoading=!0,this.getDispute({onSuccess:({dispute:s})=>{this.dispute=new e(s),this.isLoading=!1,this.dispute.status!==h.needsResponse&&(this.showDisputeResponseForm=!1)},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({errorCode:t,message:s,severity:i}),this.isLoading=!1}}))}render(){return i(m,{key:"536b3342783fa8e51a46da6d44ec403ffdd39bcf"},i("div",{key:"b365ed8379080dbe949065e4c2101c288da498c5"},this.showDisputeResponseForm?i("dispute-response",{disputeId:this.disputeId,disputeResponse:this.dispute.dispute_response,authToken:this.authToken}):i("dispute-notification",{dispute:this.dispute,authToken:this.authToken,isLoading:this.isLoading})))}static get watchers(){return{disputeId:["propChanged"],authToken:["propChanged"]}}};export{f as justifi_dispute_management}
@@ -0,0 +1 @@
1
+ import{h as t,r as e,c as a}from"./p-CV0Pyo1O.js";import{c as s}from"./p-B4vLfYnZ.js";import"./p-HXpYMWUU.js";import{l as i,C as r,b as o}from"./p-Dqxyi-uK.js";import{p as n}from"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{J as c}from"./p-CEHwp4sh.js";import{d}from"./p-DF7oFWnO.js";import{g as p,a as h}from"./p-BhpaUYtS.js";import{P as l}from"./p-DEfLsy2W.js";import{T as f,a as u,b as m,c as b,d as y,e as _,f as w,g,h as T,i as j,j as v,k,l as D}from"./p-DZr0wLGh.js";import{S as P}from"./p-05AWudQe.js";import{T as C}from"./p-CZfYo5-1.js";import{a as S}from"./p-Ds_P-dB8.js";import{a6 as F,a7 as I}from"./p-Bu7gdOaV.js";import"./p-DgTOxu8x.js";import"./p-DhrQechy.js";import"./p-DCpGH4xL.js";import"./p-MPer3Rw7.js";const O={id:()=>t("th",{part:F,scope:"col",title:"The unique identifier of each transaction"},"ID"),account_id:()=>t("th",{part:F,scope:"col",title:"The unique identifier of the account associated with each transaction"},"Account ID"),payout_id:()=>t("th",{part:F,scope:"col",title:"The unique identifier of the payout associated with each transaction"},"Payout ID"),financial_transaction_id:()=>t("th",{part:F,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),amount:()=>t("th",{part:F,scope:"col",title:"The dollar amount of each transaction"},"Amount"),fee:()=>t("th",{part:F,scope:"col",title:"The fee associated with each transaction"},"Fee"),net:()=>t("th",{part:F,scope:"col",title:"The net amount of each transaction"},"Net"),currency:()=>t("th",{part:F,scope:"col",title:"The currency of each transaction"},"Currency"),description:()=>t("th",{part:F,scope:"col",title:"The description of each transaction"},"Description"),source_id:()=>t("th",{part:F,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),txn_type:()=>t("th",{part:F,scope:"col",title:"The type of each transaction"},"Type"),created_at:()=>t("th",{part:F,scope:"col",title:"The date and time each transaction was made"},"Processed On"),available_on:()=>t("th",{part:F,scope:"col",title:"The date and time each transaction will be available"},"Available On"),updated_at:()=>t("th",{part:F,scope:"col",title:"The date and time each transaction was last updated"},"Updated On")},x={fee:"Fee",payment:"Payment",payout:"Payout",seller_payment_refund:"Seller Payment Refund",dispute_amount_collected:"Dispute Amount Collected",dispute_fee_collected:"Dispute Fee Collected",seller_payment:"Seller Payment",transfer:"Transfer",partner_platform_proceeds_credit:"Partner Platform Proceeds Credit",processing_fee:"Processing Fee",refund_processing_fee:"Refund Processing Fee",fee_rounding_adjustment:"Fee Rounding Adjustment",platform_fee:"Platform Fee",processing_fee_return:"Processing Fee Return",platform_fee_return:"Platform Fee Return"},q={id:e=>t("td",{part:I(e.id)},e.id),account_id:e=>t("td",{part:I(e.account_id)},e.account_id),payout_id:e=>t("td",{part:I(e.payout_id)},e.payout_id),financial_transaction_id:e=>t("td",{part:I(e.financial_transaction_id)},e.financial_transaction_id),amount:e=>t("td",{part:I(e.amount)},e.formattedPaymentAmount(e.amount)),fee:e=>t("td",{part:I(e.fee)},e.formattedPaymentAmount(e.fee)),net:e=>t("td",{part:I(e.net)},e.formattedPaymentAmount(e.net)),currency:e=>t("td",{part:I(e.currency)},e.currency),description:e=>t("td",{part:I(e.description)},e.description),source_id:e=>t("td",{part:I(e.source_id)},e.source_id),txn_type:e=>t("td",{part:I(e.txn_type)},x[e.txn_type]),created_at:e=>t("td",{part:I(e.created_at)},t("div",{class:"fw-bold"},S(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},S(e.created_at,{showTime:!0}))),available_on:e=>t("td",{part:I(e.available_on)},t("div",{class:"fw-bold"},S(e.available_on,{showDisplayDate:!0})),t("div",{class:"fw-bold"},S(e.available_on,{showTime:!0}))),updated_at:e=>t("td",{part:I(e.updated_at)},t("div",{class:"fw-bold"},S(e.updated_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},S(e.updated_at,{showTime:!0})))},E=class{constructor(t){e(this,t),this.clickEvent=a(this,"click-event",7),this.errorEvent=a(this,"error-event",7),this.balanceTransactions=[],this.isLoading=!0,this.errorMessage=null,this.paging=n,this.pagingParams={},this.columns="created_at,txn_type,description,amount,fee,net",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:C.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:C.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const a=this.balanceTransactions.find((t=>t.id===e));this.clickEvent.emit({name:C.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,O,q),d(),this.analytics=new c(this),this.initializeApi()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeApi()}handleError(t,e,a){this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:e,severity:a})}initializeApi(){this.payoutId&&this.authToken?(({accountId:t,authToken:e,service:a})=>async({params:s,onSuccess:o,onError:n,final:c})=>{var d;try{const c=await a.fetchPayoutTransactions(t,e,s);c.error?n({error:h(c.error),code:p(null===(d=c.error)||void 0===d?void 0:d.code),severity:r.ERROR}):o({balanceTransactions:c.data.map((t=>new i(t))),pagingInfo:Object.assign({},c.page_info)})}catch(t){const e=p(null==t?void 0:t.code);n({error:h(t),code:e,severity:r.ERROR})}finally{c()}})({accountId:s.accountId,authToken:this.authToken,service:new l})({params:this.requestParams,onSuccess:({balanceTransactions:t,pagingInfo:e})=>{this.balanceTransactions=t,this.paging=e,this.transactionsTable.collectionData=this.balanceTransactions},onError:({error:t,code:e,severity:a})=>{this.errorMessage=t.message,this.handleError(t,e,a)},final:()=>{this.isLoading=!1}}):(this.errorMessage="payout-id and auth-token props are required",this.handleError(o.MISSING_PROPS,this.errorMessage,r.ERROR))}get entityId(){return this.balanceTransactions.map((t=>t.id))}get showEmptyState(){return!this.isLoading&&!this.errorMessage&&this.transactionsTable.rowData.length<1}get showErrorState(){return!this.isLoading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.isLoading}get requestParams(){return Object.assign({payout_id:this.payoutId,limit:"15"},this.pagingParams)}render(){return t(P,{key:"5da092f2d4c07bbe280146ad302a1d475a166246"},t(u,{key:"4700660091131d5360a8c12f9297cee467fc3b64"},t(m,{key:"12019f0f76ced950a053945a9dfc7616a2865bbd"},t(b,{key:"6286a0ecd27b9f2433d0e4dbbe4080ebc4b0088a"},t(y,{key:"625bceb0b96b8cd61af93930d5c02198b2d1ec40"},this.transactionsTable.columnData.map((t=>t)))),t(_,{key:"681a77edec6a9272d83fec9731e7556ea284ee33"},t(w,{key:"54a1981bc9659753716ff0c4541a21bdc4ba2cfa",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(g,{key:"826e1778e976e2ce175786b78f0534ae865104bc",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(T,{key:"8032c6af307b5900bdf60c8a7b14499b476c1dd8",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(j,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(v,{key:"a9ab5fced17a007ae3db7e73217efc8ad754eb7f"},t(k,{key:"b4d7b6644ddd22292071409d75252ce5245c7a27"},t(D,{key:"447d7e0f68f39cc95bba9616eae41f80c62bf806",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"4e20b754e42cd81a334b82bb2435fb5390ce3b87",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],payoutId:["propChanged"],authToken:["propChanged"]}}};export{E as justifi_payout_transactions_list}
@@ -0,0 +1 @@
1
+ import{r as e,h as a}from"./p-CV0Pyo1O.js";import{r as t}from"./p-Bu7gdOaV.js";import{S as o}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";const d=class{constructor(a){e(this,a)}render(){return a(o,{key:"45a24177da27e09c500054f09e8d5a432fc790d6",class:"payment-method"},a("div",{key:"2d5cdef6c196b9be0c09ed109f20b44cd94eac8c",class:"radio-list-item p-3",part:t,onClick:this.clickHandler,hidden:this.radioButtonHidden},a("form-control-radio",{key:"4cc39aae8c3a1ad7dadd385e99ff854643172b38",name:"paymentMethodType",value:this.paymentMethodOptionId,checked:this.isSelected,label:this.label})))}};export{d as payment_method_option}
@@ -1 +1 @@
1
- import{h as t,r as e,c as s}from"./p-CV0Pyo1O.js";import{c as r,a as i,F as n}from"./p-D9sqTVmd.js";import{f as o}from"./p-Ds_P-dB8.js";import"./p-B4vLfYnZ.js";import{R as a,C as u,b as h,q as l}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{B as c}from"./p-CU2Dwa94.js";import{S as d}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";import{P as m}from"./p-BmaQUnqv.js";import{m as p}from"./p-C9p1gWAC.js";import{J as f}from"./p-BjjKkMO1.js";import{c as v}from"./p-_MjmE9YT.js";import{g as y,a as j}from"./p-BhpaUYtS.js";import{A as w}from"./p-C6Jq8YDT.js";import{S as b}from"./p-eBK-iWrz.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-DgTOxu8x.js";import"./p-Bu7gdOaV.js";import"./p-BC9n8nB2.js";const T=t=>{const e=+t;return i().required("Amount is required").test("max-amount",`Refund amount cannot be more than payment amount: ${o(e)}`,(function(t){return+t<=+e})).test("min-amount","Refund amount must be greater than 0",(function(t){return+t>0}))},C=t=>{if(t)return r({amount:T(t),description:i().optional(),reason:i().optional().oneOf([a.customerRequest,a.duplicate,a.fraudulent],"Select a reason")})},g=[{label:"Select a reason",value:""},{label:"Customer requested a refund",value:"customer_request"},{label:"Customer was double-charged",value:"duplicate"},{label:"Payment was reported as fraud",value:"fraudulent"}],x=w();class B{async postRefund(t,e,s,r){return x.post({endpoint:`payments/${t}/refunds`,headers:{"Sub-Account":e},body:r,authToken:s})}}const A=w();class S{async postVoid(t,e,s){return A.post({endpoint:`payments/${t}/void`,headers:{"Sub-Account":e},authToken:s})}}const k=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(b,{width:"100%",height:"40px"}))),I=()=>t(d,null,t("div",{class:"row gap-5"},t(k,null),t(k,null),t(k,null))),P=class{constructor(t){e(this,t),this.errorEvent=s(this,"error-event",7),this.submitEvent=s(this,"submit-event",7),this.refundPayload={},this.displayAmount="",this.errors={},this.paymentLoading=!0,this.refundLoading=!1,this.hideSubmitButton=!1,this.inputHandler=(t,e)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}componentWillLoad(){v(),this.analytics=new f(this),this.initializeApi(),this.formController=new n(C())}handleError(t,e,s){this.errorEvent.emit({errorCode:t,message:e,severity:s})}checkAmount(t){return t>0}handleInvalidAmount(){this.submitDisabled=!0,this.handleError(h.INVALID_REFUND_AMOUNT,"Refund amount must be greater than 0",u.ERROR)}isPaymentCreatedWithin25Minutes(){var t;if(!this.payment||!(null===(t=this.payment)||void 0===t?void 0:t.created_at))return!1;const e=new Date(this.payment.created_at);return((new Date).getTime()-e.getTime())/6e4<=25}initializeFormController(){const t=this.refundPayload.amount,e=t?t.toString():"0";this.formController=new n(C(e)),this.formController.setInitialValues({amount:e}),this.formController.values.subscribe((t=>{this.refundPayload=Object.assign({},t)})),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.paymentId&&this.authToken?p({id:this.paymentId,authToken:this.authToken,service:new m})({onSuccess:({payment:t})=>{this.payment=t,this.refundPayload=new l({amount:t.amount_refundable})},onError:({error:t,code:e,severity:s})=>{this.handleError(e,t,s)},final:()=>{this.checkAmount(this.refundPayload.amount)?this.initializeFormController():this.handleInvalidAmount(),this.paymentLoading=!1}}):this.handleError(h.MISSING_PROPS,"Payment ID and Auth Token are required",u.ERROR)}async refundPayment(t){if(t&&t.preventDefault(),!await this.formController.validate())return;const e=this.formController.values.getValue();return this.refundLoading=!0,this.isPaymentCreatedWithin25Minutes()?this.tryVoidPayment():this.processRefund(e)}async tryVoidPayment(){const t=(({authToken:t,accountId:e,paymentId:s,service:r})=>async({onSuccess:i,onError:n,final:o})=>{var a;try{const o=await r.postVoid(s,e,t);if(o.error)return n({error:j(o.error),code:y(null===(a=o.error)||void 0===a?void 0:a.code),severity:u.ERROR});i(o)}catch(t){const e=y(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:u.ERROR})}finally{o()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new S});return new Promise((e=>{let s,r=!1;const i=this.formController.values.getValue();t({onSuccess:t=>{s=t,r=!0},onError:({error:t,code:s,severity:n})=>{r=!0,this.handleError(s,t,n),this.processRefund(i).then(e)},final:()=>{s&&!s.error&&r&&(this.submitEvent.emit({response:s}),this.submitDisabled=!0,this.refundLoading=!1,e(s.data))}})}))}async processRefund(t){const e=(({authToken:t,accountId:e,paymentId:s,service:r})=>async({refundBody:i,onSuccess:n,onError:o,final:a})=>{var h;try{const a=await r.postRefund(s,e,t,i);if(a.error)return o({error:j(a.error),code:y(null===(h=a.error)||void 0===h?void 0:h.code),severity:u.ERROR});n(a)}catch(t){const e=y(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:u.ERROR})}finally{a()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new B});return new Promise((s=>{let r;e({refundBody:t,onSuccess:t=>{r=t},onError:({error:t,code:e,severity:s})=>{r=t,this.handleError(e,t,s)},final:()=>{this.submitEvent.emit({response:r}),this.submitDisabled=!0,this.refundLoading=!1,s(r.data)}})}))}render(){if(this.paymentLoading)return t(I,null);const e=this.formController.getInitialValues(),s=this.refundPayload.amount;return t(d,null,t("form",null,t("fieldset",null,t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-monetary",{name:"amount",label:"Refund Amount",defaultValue:e.amount,inputHandler:this.inputHandler,errorText:this.errors.amount})),t("div",{class:"col-12"},t("form-control-select",{name:"reason",label:"Reason for refund (optional)",defaultValue:e.reason,inputHandler:this.inputHandler,options:g,errorText:this.errors.reason})),t("div",{class:"col-12"},t("form-control-textarea",{name:"description",label:"Note (optional)",defaultValue:e.description,inputHandler:this.inputHandler,maxLength:250,errorText:this.errors.description})),t("div",{class:"form-group d-flex flex-row-reverse"},t(c,{variant:"primary",type:"submit",onClick:this.refundPayment.bind(this),isLoading:this.paymentLoading||this.refundLoading,hidden:this.hideSubmitButton,disabled:this.submitDisabled},`Refund ${o(+s)}`))))))}};export{P as justifi_refund_payment}
1
+ import{h as t,r as e,c as s}from"./p-CV0Pyo1O.js";import{c as r,a as i,F as n}from"./p-D9sqTVmd.js";import{f as o}from"./p-Ds_P-dB8.js";import"./p-B4vLfYnZ.js";import{R as a,C as u,b as h,q as l}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{B as c}from"./p-CU2Dwa94.js";import{S as d}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";import{P as m}from"./p-CRaiEpKf.js";import{m as p}from"./p-C9p1gWAC.js";import{J as f}from"./p-CEHwp4sh.js";import{d as y}from"./p-DF7oFWnO.js";import{g as v,a as j}from"./p-BhpaUYtS.js";import{A as w}from"./p-DCpGH4xL.js";import{S as b}from"./p-eBK-iWrz.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-DgTOxu8x.js";import"./p-Bu7gdOaV.js";import"./p-DhrQechy.js";const C=t=>{const e=+t;return i().required("Amount is required").test("max-amount",`Refund amount cannot be more than payment amount: ${o(e)}`,(function(t){return+t<=+e})).test("min-amount","Refund amount must be greater than 0",(function(t){return+t>0}))},g=t=>{if(t)return r({amount:C(t),description:i().optional(),reason:i().optional().oneOf([a.customerRequest,a.duplicate,a.fraudulent],"Select a reason")})},T=[{label:"Select a reason",value:""},{label:"Customer requested a refund",value:"customer_request"},{label:"Customer was double-charged",value:"duplicate"},{label:"Payment was reported as fraud",value:"fraudulent"}],x=w();class A{async postRefund(t,e,s,r){return x.post({endpoint:`payments/${t}/refunds`,headers:{"Sub-Account":e},body:r,authToken:s})}}const S=w();class D{async postVoid(t,e,s){return S.post({endpoint:`payments/${t}/void`,headers:{"Sub-Account":e},authToken:s})}}const I=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(b,{width:"100%",height:"40px"}))),k=()=>t(d,null,t("div",{class:"row gap-5"},t(I,null),t(I,null),t(I,null))),P=class{constructor(t){e(this,t),this.errorEvent=s(this,"error-event",7),this.submitEvent=s(this,"submit-event",7),this.refundPayload={},this.displayAmount="",this.errors={},this.paymentLoading=!0,this.refundLoading=!1,this.hideSubmitButton=!1,this.inputHandler=(t,e)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:e}))}}componentWillLoad(){y(),this.analytics=new f(this),this.initializeApi(),this.formController=new n(g())}handleError(t,e,s){this.errorEvent.emit({errorCode:t,message:e,severity:s})}checkAmount(t){return t>0}handleInvalidAmount(){this.submitDisabled=!0,this.handleError(h.INVALID_REFUND_AMOUNT,"Refund amount must be greater than 0",u.ERROR)}isPaymentCreatedWithin25Minutes(){var t;if(!this.payment||!(null===(t=this.payment)||void 0===t?void 0:t.created_at))return!1;const e=new Date(this.payment.created_at);return((new Date).getTime()-e.getTime())/6e4<=25}initializeFormController(){const t=this.refundPayload.amount,e=t?t.toString():"0";this.formController=new n(g(e)),this.formController.setInitialValues({amount:e}),this.formController.values.subscribe((t=>{this.refundPayload=Object.assign({},t)})),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.paymentId&&this.authToken?p({id:this.paymentId,authToken:this.authToken,service:new m})({onSuccess:({payment:t})=>{this.payment=t,this.refundPayload=new l({amount:t.amount_refundable})},onError:({error:t,code:e,severity:s})=>{this.handleError(e,t,s)},final:()=>{this.checkAmount(this.refundPayload.amount)?this.initializeFormController():this.handleInvalidAmount(),this.paymentLoading=!1}}):this.handleError(h.MISSING_PROPS,"Payment ID and Auth Token are required",u.ERROR)}async refundPayment(t){if(t&&t.preventDefault(),!await this.formController.validate())return;const e=this.formController.values.getValue();return this.refundLoading=!0,this.isPaymentCreatedWithin25Minutes()?this.tryVoidPayment():this.processRefund(e)}async tryVoidPayment(){const t=(({authToken:t,accountId:e,paymentId:s,service:r})=>async({onSuccess:i,onError:n,final:o})=>{var a;try{const o=await r.postVoid(s,e,t);if(o.error)return n({error:j(o.error),code:v(null===(a=o.error)||void 0===a?void 0:a.code),severity:u.ERROR});i(o)}catch(t){const e=v(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:u.ERROR})}finally{o()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new D});return new Promise((e=>{let s,r=!1;const i=this.formController.values.getValue();t({onSuccess:t=>{s=t,r=!0},onError:({error:t,code:s,severity:n})=>{r=!0,this.handleError(s,t,n),this.processRefund(i).then(e)},final:()=>{s&&!s.error&&r&&(this.submitEvent.emit({response:s}),this.submitDisabled=!0,this.refundLoading=!1,e(s.data))}})}))}async processRefund(t){const e=(({authToken:t,accountId:e,paymentId:s,service:r})=>async({refundBody:i,onSuccess:n,onError:o,final:a})=>{var h;try{const a=await r.postRefund(s,e,t,i);if(a.error)return o({error:j(a.error),code:v(null===(h=a.error)||void 0===h?void 0:h.code),severity:u.ERROR});n(a)}catch(t){const e=v(null==t?void 0:t.code);return o({error:t.message||t,code:e,severity:u.ERROR})}finally{a()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new A});return new Promise((s=>{let r;e({refundBody:t,onSuccess:t=>{r=t},onError:({error:t,code:e,severity:s})=>{r=t,this.handleError(e,t,s)},final:()=>{this.submitEvent.emit({response:r}),this.submitDisabled=!0,this.refundLoading=!1,s(r.data)}})}))}render(){if(this.paymentLoading)return t(k,null);const e=this.formController.getInitialValues(),s=this.refundPayload.amount;return t(d,null,t("form",null,t("fieldset",null,t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-monetary",{name:"amount",label:"Refund Amount",defaultValue:e.amount,inputHandler:this.inputHandler,errorText:this.errors.amount})),t("div",{class:"col-12"},t("form-control-select",{name:"reason",label:"Reason for refund (optional)",defaultValue:e.reason,inputHandler:this.inputHandler,options:T,errorText:this.errors.reason})),t("div",{class:"col-12"},t("form-control-textarea",{name:"description",label:"Note (optional)",defaultValue:e.description,inputHandler:this.inputHandler,maxLength:250,errorText:this.errors.description})),t("div",{class:"form-group d-flex flex-row-reverse"},t(c,{variant:"primary",type:"submit",onClick:this.refundPayment.bind(this),isLoading:this.paymentLoading||this.refundLoading,hidden:this.hideSubmitButton,disabled:this.submitDisabled},`Refund ${o(+s)}`))))))}};export{P as justifi_refund_payment}
@@ -0,0 +1 @@
1
+ import{h as t,r as e,c as a}from"./p-CV0Pyo1O.js";import{P as s}from"./p-CRaiEpKf.js";import"./p-B4vLfYnZ.js";import"./p-HXpYMWUU.js";import{e as i,C as r,b as o}from"./p-Dqxyi-uK.js";import{p as n}from"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{g as h,a as p}from"./p-BhpaUYtS.js";import{J as c}from"./p-CEHwp4sh.js";import{d}from"./p-DF7oFWnO.js";import{S as m}from"./p-05AWudQe.js";import{T as f,a as l,b as u,c as y,d as b,e as g,f as v,g as j,h as _,i as C,j as k,k as w,l as T}from"./p-DZr0wLGh.js";import{T as D}from"./p-CZfYo5-1.js";import{M as P}from"./p-Bi_GCMx0.js";import{a as O}from"./p-Ds_P-dB8.js";import{a6 as S,a7 as x}from"./p-Bu7gdOaV.js";import{o as A,g as B}from"./p-BLhz_ggG.js";import"./p-DCpGH4xL.js";import"./p-DhrQechy.js";import"./p-DgTOxu8x.js";import"./p-MPer3Rw7.js";import"./p-Dz8KJn2G.js";const E={created_at:()=>t("th",{part:S,scope:"col",title:"The date and time each payment was made"},"Date"),amount:()=>t("th",{part:S,scope:"col",title:"The dollar amount of each payment"},"Amount"),status:()=>t("th",{part:S,scope:"col",title:"The current status of each payment"},"Status"),payment_type:()=>t("th",{part:S,scope:"col",title:"The type of each payment"},"Type"),description:()=>t("th",{part:S,scope:"col",title:"The payment description, if you provided one"},"Description"),payers_name:()=>t("th",{part:S,scope:"col",title:"The name associated with the payment method"},"Account Holder"),last_four_digits:()=>t("th",{part:S,scope:"col",title:"The brand and last 4 digits of the payment method"},"Payment Method"),card_brand:()=>t("th",{part:S,scope:"col",title:"The brand of the payment method"},"Card Brand")},G={created_at:(e,a)=>t("td",{part:x(a)},t("div",{class:"fw-bold"},O(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},O(e.created_at,{showTime:!0}))),amount:(e,a)=>t("td",{part:x(a)},e.formattedPaymentAmount(e.amount)),status:(e,a)=>t("td",{part:x(a)},P(e.status)),payment_type:(e,a)=>t("td",{part:x(a)},e.payment_type),description:(e,a)=>t("td",{part:x(a)},e.description),payers_name:(e,a)=>t("td",{part:x(a)},e.payers_name),last_four_digits:(e,a)=>t("td",{part:x(a)},e.last_four_digits),card_brand:(e,a)=>{var s,i,r;return t("td",{part:x(a)},(r=(null===(s=e.payment_method.card)||void 0===s?void 0:s.brand)||(null===(i=e.payment_method.bank_account)||void 0===i?void 0:i.brand))?{visa:"VISA",mastercard:"Mastercard",american_express:"American Express",discover:"Discover",diners_club:"Diners Club",jcb:"JCB",china_unionpay:"China UnionPay",unknown:"Unknown"}[r.toLowerCase()]||r:"N/A")}},L=class{constructor(t){e(this,t),this.errorEvent=a(this,"error-event",7),this.clickEvent=a(this,"click-event",7),this.errorMessage=null,this.payments=[],this.loading=!0,this.paging=n,this.pagingParams={},this.columns="created_at,amount,status,payment_type,description,payers_name,last_four_digits,card_brand",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:D.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:D.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const a=this.payments.find((t=>t.id===e));this.clickEvent.emit({name:D.row,data:a})}}componentWillLoad(){d(),this.analytics=new c(this),this.paymentsTable=new f(this.payments,this.columns,E,G),this.initializeGetPayments(),A("set",(()=>{this.pagingParams={},this.errorMessage=""})),A("reset",(()=>{this.pagingParams={},this.errorMessage=""}))}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetPayments()}updateOnPropChange(){this.fetchData()}initializeGetPayments(){this.accountId&&this.authToken?this.getPayments=(({id:t,authToken:e,service:a})=>async({params:s,onSuccess:o,onError:n,final:c})=>{var d,m;try{const c=await a.fetchPayments(t,e,s);if(c.error)return n({error:p(c.error),code:h(null===(m=c.error)||void 0===m?void 0:m.code),severity:r.ERROR});{const t=Object.assign({},c.page_info);o({payments:(null===(d=c.data)||void 0===d?void 0:d.map((t=>new i(t))))||[],pagingInfo:t})}}catch(t){const e=h(null==t?void 0:t.code);return n({error:t.message||t,code:e,severity:r.ERROR})}finally{c()}})({id:this.accountId,authToken:this.authToken,service:new s}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:this.errorMessage,severity:r.ERROR}))}fetchData(){this.getPayments&&(this.loading=!0,this.getPayments({params:this.paymentParams,onSuccess:({payments:t,pagingInfo:e})=>{this.payments=t,this.paging=e,this.paymentsTable.collectionData=this.payments},onError:({error:t,code:e,severity:a})=>{this.errorMessage=t,this.errorEvent.emit({errorCode:e,message:t,severity:a})},final:()=>{this.loading=!1}}))}get paymentParams(){const t=B();return Object.assign(Object.assign({},t),this.pagingParams)}get entityId(){return this.payments.map((t=>t.id))}get showEmptyState(){return!this.loading&&!this.errorMessage&&this.paymentsTable.rowData.length<1}get showErrorState(){return!this.loading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.loading}render(){return t(m,{key:"fb137fb2b6a63b506fcdbb81104100b099d2e8a6"},t(l,{key:"7a40c6312ae2603179973341dee87f722879fcf4"},t(u,{key:"a9ea88cafb2855a684bd1b33293e4587d809937e"},t(y,{key:"9d706bb769ccceb1cdfae4fcb4e790a2df54d22f"},t(b,{key:"1d9fdcd72297ca3ea68303a64088a34e07921b3b"},this.paymentsTable.columnData.map((t=>t)))),t(g,{key:"aa38c971f05ed8acf1fba3f8f8c528803656fe56"},t(v,{key:"e614cce077c4f2f44d7bd1be61f316e5b1607a26",columnSpan:this.paymentsTable.columnData.length,isLoading:this.loading}),t(j,{key:"90dbc6b25ca32387c148f3a1648780c187f3fde0",isEmpty:this.showEmptyState,columnSpan:this.paymentsTable.columnData.length}),t(_,{key:"7098567bc972068166e5ac34ccc89bd6c0be55a4",columnSpan:this.paymentsTable.columnData.length,errorMessage:this.errorMessage}),this.showRowData&&this.paymentsTable.rowData.map(((e,a)=>t(C,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(k,{key:"906207a8e9913fd0ecffa03197e38ae8bb032809"},t(w,{key:"6ec53fc987659a181f9851052d472c634dbc9ef9"},t(T,{key:"f2247b1fa30f7327fd876ea4030d25243eaa849a",colSpan:this.paymentsTable.columnData.length},t("pagination-menu",{key:"dbff68af085c14a1adb8d800b2cf1acaa1d02a2b",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"],pagingParams:["updateOnPropChange"],getPayments:["updateOnPropChange"],columns:["updateOnPropChange"]}}};export{L as justifi_payments_list}
@@ -1 +1 @@
1
- import{h as s,r as t,c as i}from"./p-CV0Pyo1O.js";import{A as e}from"./p-C6Jq8YDT.js";import{C as r,b as o}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{g as a,a as n}from"./p-BhpaUYtS.js";import{J as c}from"./p-BjjKkMO1.js";import{c as l}from"./p-_MjmE9YT.js";import{c as h}from"./p-Fpaf7CLD.js";import{p as d,f as p,r as u,i as v}from"./p-Ds_P-dB8.js";import{v as m,i as y,a as f,H as j}from"./p-x2oNTAWh.js";import{t as _,z as g}from"./p-Bu7gdOaV.js";import{S as T}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";import{S as C}from"./p-eBK-iWrz.js";import"./p-B4vLfYnZ.js";import"./p-DgTOxu8x.js";import"./p-BC9n8nB2.js";import"./p-DEx8fQeW.js";import"./p-HXpYMWUU.js";const k=e();class b{async fetchQuote(s,t){return k.post({endpoint:"insurance/quotes",body:t,authToken:s})}async toggleCoverage(s,t,i){return k.post({endpoint:`insurance/quotes/${t}/toggle`,body:i,authToken:s})}}const w=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(C,{width:"35%",height:"30px"})),s("div",{class:"col-12"},s(C,{width:"70%"})),s("div",{class:"col-12"},s(C,{width:"40%"})),s("div",{class:"col-12"},s(C,{width:"40%"})),s("div",{class:"col-12"},s(C,{width:"100%"})),s("div",{class:"col-12"},s(C,{width:"80%"}))),x=class{constructor(s){t(this,s),this.insuranceUpdated=i(this,"insurance-updated",7),this.errorEvent=i(this,"error-event",7),this.isLoading=!0}async validate(){return m()}processHTMLContent(s){return d(s,[s=>u(s,"style"),s=>v(s,"a","part",_),s=>v(s,"p","part",_)])}componentWillLoad(){l(),this.analytics=new c(this),this.initializeServiceMethods(),this.getQuote&&this.fetchData()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeServiceMethods(){const s=this.authToken||h.authToken;if(!s)return void this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:"Missing authToken",severity:r.ERROR});const t={authToken:s,service:new b};this.getQuote=(({authToken:s,service:t})=>async({payload:i,onSuccess:e,onError:o})=>{var c;try{const l=await t.fetchQuote(s,i);if(l.error)return o({error:n(l.error),code:a(null===(c=l.error)||void 0===c?void 0:c.code),severity:r.ERROR});e({quote:l.data})}catch(s){const t=a(null==s?void 0:s.code);return o({error:s.message||s,code:t,severity:r.ERROR})}})(t),this.toggleCoverage=(({authToken:s,service:t})=>async({quoteId:i,payload:e,onSuccess:o,onError:c})=>{var l;try{const h=await t.toggleCoverage(s,i,e);if(h.error)return c({error:n(h.error),code:a(null===(l=h.error)||void 0===l?void 0:l.code),severity:r.ERROR});o({quote:h.data})}catch(s){const t=a(null==s?void 0:s.code);return c({error:s.message||s,code:t,severity:r.ERROR})}})(t)}fetchData(){this.isLoading=!0,this.getQuote({payload:{checkout_id:this.checkoutId||h.checkoutId,policy_type:"season_interruption",primary_identity:{state:this.primaryIdentityState,email:this.primaryIdentityEmailAddress,first_name:this.primaryIdentityFirstName,last_name:this.primaryIdentityLastName,postal_code:this.primaryIdentityPostalCode,country:this.primaryIdentityCountry},policy_attributes:{insurable_amount:this.policyAttributesInsurableAmount,start_date:this.policyAttributesStartDate,end_date:this.policyAttributesEndDate,covered_identity:{first_name:this.coveredIdentityFirstName,last_name:this.coveredIdentityLastName}}},onSuccess:({quote:s})=>{this.quote=s,this.quote.product.description=this.processHTMLContent(this.quote.product.description),this.quote.product.legal_disclaimer=this.processHTMLContent(this.quote.product.legal_disclaimer),y[s.policy_type]=s.accepted,this.isLoading=!1},onError:({error:s,code:t,severity:i})=>{this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}onChangeHandler(s,t){this.accepted=t,f[this.quote.policy_type]=!1,this.toggleCoverage({quoteId:this.quote.id,payload:{accepted:this.accepted},onSuccess:()=>{this.insuranceUpdated.emit(),y[this.quote.policy_type]=this.accepted},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}get error(){var s;return f[null===(s=this.quote)||void 0===s?void 0:s.policy_type]}render(){var t,i,e,r;return h&&!1===h.insuranceEnabled?(console.warn("[justifi-season-interruption-insurance] Insurance is disabled for this checkout (payment_settings.insurance_payments=false)."),null):s(T,null,this.isLoading?s(w,null):s("div",null,s(j,{text:null===(t=this.quote)||void 0===t?void 0:t.product.title,class:"fs-5 fw-bold pb-3"}),s("small",{part:_,innerHTML:null===(i=this.quote)||void 0===i?void 0:i.product.description}),s("form-control-radio",{label:`Accept coverage for ${p(null===(e=this.quote)||void 0===e?void 0:e.total_cents)}`,name:"opt-in",value:"true",checked:"true"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("form-control-radio",{label:"Decline coverage",name:"opt-in",value:"false",checked:"false"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("div",{class:"invalid-feedback",style:{display:this.error?"block":"none"},part:g},"Please select an option"),s("small",{part:_,innerHTML:null===(r=this.quote)||void 0===r?void 0:r.product.legal_disclaimer})))}};export{x as justifi_season_interruption_insurance}
1
+ import{h as s,r as t,c as i}from"./p-CV0Pyo1O.js";import{A as e}from"./p-DCpGH4xL.js";import{C as r,b as o}from"./p-Dqxyi-uK.js";import"./p-CLHwhyvu.js";import"./p-CTtGaVYs.js";import{g as a,a as n}from"./p-BhpaUYtS.js";import{J as c}from"./p-CEHwp4sh.js";import{d as h}from"./p-DF7oFWnO.js";import{c as l}from"./p-FsWkrvEF.js";import{p as d,f as p,r as u,i as v}from"./p-Ds_P-dB8.js";import{v as m,i as y,a as f,H as j}from"./p-x2oNTAWh.js";import{t as _,z as g}from"./p-Bu7gdOaV.js";import{S as k}from"./p-05AWudQe.js";import"./p-CZfYo5-1.js";import{S as w}from"./p-eBK-iWrz.js";import"./p-B4vLfYnZ.js";import"./p-DgTOxu8x.js";import"./p-DhrQechy.js";import"./p-DEx8fQeW.js";import"./p-HXpYMWUU.js";const C=e();class T{async fetchQuote(s,t){return C.post({endpoint:"insurance/quotes",body:t,authToken:s})}async toggleCoverage(s,t,i){return C.post({endpoint:`insurance/quotes/${t}/toggle`,body:i,authToken:s})}}const b=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(w,{width:"35%",height:"30px"})),s("div",{class:"col-12"},s(w,{width:"70%"})),s("div",{class:"col-12"},s(w,{width:"40%"})),s("div",{class:"col-12"},s(w,{width:"40%"})),s("div",{class:"col-12"},s(w,{width:"100%"})),s("div",{class:"col-12"},s(w,{width:"80%"}))),x=class{constructor(s){t(this,s),this.insuranceUpdated=i(this,"insurance-updated",7),this.errorEvent=i(this,"error-event",7),this.isLoading=!0}async validate(){return m()}processHTMLContent(s){return d(s,[s=>u(s,"style"),s=>v(s,"a","part",_),s=>v(s,"p","part",_)])}componentWillLoad(){h(),this.analytics=new c(this),this.initializeServiceMethods(),this.getQuote&&this.fetchData()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeServiceMethods(){const s=this.authToken||l.authToken;if(!s)return void this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:"Missing authToken",severity:r.ERROR});const t={authToken:s,service:new T};this.getQuote=(({authToken:s,service:t})=>async({payload:i,onSuccess:e,onError:o})=>{var c;try{const h=await t.fetchQuote(s,i);if(h.error)return o({error:n(h.error),code:a(null===(c=h.error)||void 0===c?void 0:c.code),severity:r.ERROR});e({quote:h.data})}catch(s){const t=a(null==s?void 0:s.code);return o({error:s.message||s,code:t,severity:r.ERROR})}})(t),this.toggleCoverage=(({authToken:s,service:t})=>async({quoteId:i,payload:e,onSuccess:o,onError:c})=>{var h;try{const l=await t.toggleCoverage(s,i,e);if(l.error)return c({error:n(l.error),code:a(null===(h=l.error)||void 0===h?void 0:h.code),severity:r.ERROR});o({quote:l.data})}catch(s){const t=a(null==s?void 0:s.code);return c({error:s.message||s,code:t,severity:r.ERROR})}})(t)}fetchData(){this.isLoading=!0,this.getQuote({payload:{checkout_id:this.checkoutId||l.checkoutId,policy_type:"season_interruption",primary_identity:{state:this.primaryIdentityState,email:this.primaryIdentityEmailAddress,first_name:this.primaryIdentityFirstName,last_name:this.primaryIdentityLastName,postal_code:this.primaryIdentityPostalCode,country:this.primaryIdentityCountry},policy_attributes:{insurable_amount:this.policyAttributesInsurableAmount,start_date:this.policyAttributesStartDate,end_date:this.policyAttributesEndDate,covered_identity:{first_name:this.coveredIdentityFirstName,last_name:this.coveredIdentityLastName}}},onSuccess:({quote:s})=>{this.quote=s,this.quote.product.description=this.processHTMLContent(this.quote.product.description),this.quote.product.legal_disclaimer=this.processHTMLContent(this.quote.product.legal_disclaimer),y[s.policy_type]=s.accepted,this.isLoading=!1},onError:({error:s,code:t,severity:i})=>{this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}onChangeHandler(s,t){this.accepted=t,f[this.quote.policy_type]=!1,this.toggleCoverage({quoteId:this.quote.id,payload:{accepted:this.accepted},onSuccess:()=>{this.insuranceUpdated.emit(),y[this.quote.policy_type]=this.accepted},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}get error(){var s;return f[null===(s=this.quote)||void 0===s?void 0:s.policy_type]}render(){var t,i,e,r;return l&&!1===l.insuranceEnabled?(console.warn("[justifi-season-interruption-insurance] Insurance is disabled for this checkout (payment_settings.insurance_payments=false)."),null):s(k,null,this.isLoading?s(b,null):s("div",null,s(j,{text:null===(t=this.quote)||void 0===t?void 0:t.product.title,class:"fs-5 fw-bold pb-3"}),s("small",{part:_,innerHTML:null===(i=this.quote)||void 0===i?void 0:i.product.description}),s("form-control-radio",{label:`Accept coverage for ${p(null===(e=this.quote)||void 0===e?void 0:e.total_cents)}`,name:"opt-in",value:"true",checked:"true"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("form-control-radio",{label:"Decline coverage",name:"opt-in",value:"false",checked:"false"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("div",{class:"invalid-feedback",style:{display:this.error?"block":"none"},part:g},"Please select an option"),s("small",{part:_,innerHTML:null===(r=this.quote)||void 0===r?void 0:r.product.legal_disclaimer})))}};export{x as justifi_season_interruption_insurance}