@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
@@ -2,16 +2,20 @@ import { h } from "@stencil/core";
2
2
  import BankAccountFormSkeleton from "./bank-account-form-skeleton";
3
3
  import { configState, waitForConfig } from "../../config-provider/config-state";
4
4
  import { generateTabId } from "../../../utils/utils";
5
- import { checkPkgVersion } from "../../../utils/check-pkg-version";
5
+ import { detectDuplicateVersion } from "../../../utils/detect-duplicate-version";
6
6
  import { checkoutStore } from "../../../store/checkout.store";
7
7
  import { ComponentErrorCodes, ComponentErrorMessages, ComponentErrorSeverity, } from "../../../api";
8
8
  import { Button } from "../../../ui-components";
9
9
  export class BankAccountForm {
10
10
  constructor() {
11
11
  this.iframeState = 'loading';
12
+ this.showAccountNumberConfirmation = false;
12
13
  this.hasLoggedAchDisabledWarning = false;
14
+ this.loadedInputIds = new Set();
15
+ this.watchedInputIds = '';
13
16
  this.reloadIframes = () => {
14
17
  this.iframeState = 'loading';
18
+ this.loadedInputIds.clear();
15
19
  this.iframeElements.forEach((element) => element.reload());
16
20
  this.watchIframesLoad();
17
21
  };
@@ -20,12 +24,19 @@ export class BankAccountForm {
20
24
  await waitForConfig();
21
25
  this.iframeOrigin = configState.iframeOrigin;
22
26
  this.tabId = generateTabId();
23
- checkPkgVersion();
27
+ detectDuplicateVersion();
24
28
  }
25
29
  componentDidRender() {
26
- if (this.loadAbortController || !this.iframeElements.every(Boolean)) {
30
+ if (this.iframeElements.length < this.expectedIframeCount) {
27
31
  return;
28
32
  }
33
+ // Re-watch when the rendered field set changes -- showAccountNumberConfirmation
34
+ // can flip on after the first watch already finished.
35
+ const inputIds = this.iframeElements.map((element) => element.inputId).join(',');
36
+ if (inputIds === this.watchedInputIds) {
37
+ return;
38
+ }
39
+ this.watchedInputIds = inputIds;
29
40
  this.watchIframesLoad();
30
41
  }
31
42
  disconnectedCallback() {
@@ -37,13 +48,22 @@ export class BankAccountForm {
37
48
  }
38
49
  async validate() {
39
50
  if (this.isAchDisabledForCheckout()) {
40
- return false;
51
+ return { isValid: false };
52
+ }
53
+ const elements = this.iframeElements;
54
+ // A field that has not rendered yet cannot be validated -- fail closed
55
+ // rather than report a pass for a form that is not all there.
56
+ if (elements.length < this.expectedIframeCount) {
57
+ return { isValid: false };
41
58
  }
42
- const accountNumberIsValid = await this.accountNumberIframeElement.validate();
43
- const routingNumberIsValid = await this.routingNumberIframeElement.validate();
44
- return accountNumberIsValid && routingNumberIsValid;
59
+ const results = [];
60
+ for (const element of elements) {
61
+ results.push(await element.validate());
62
+ }
63
+ return { isValid: results.every((result) => (result === null || result === void 0 ? void 0 : result.isValid) === true) };
45
64
  }
46
65
  async tokenize({ clientId, paymentMethodMetadata, account }) {
66
+ var _a, _b;
47
67
  if (this.isAchDisabledForCheckout()) {
48
68
  return {
49
69
  error: {
@@ -51,25 +71,54 @@ export class BankAccountForm {
51
71
  },
52
72
  };
53
73
  }
74
+ // tokenize() is a public @Method: an integrator with their own submit button
75
+ // can reach it without validate(), so the mismatch check has to live here too.
76
+ if (this.showAccountNumberConfirmation) {
77
+ const confirmation = await ((_a = this.accountNumberConfirmationIframeElement) === null || _a === void 0 ? void 0 : _a.validate());
78
+ if ((confirmation === null || confirmation === void 0 ? void 0 : confirmation.isValid) !== true) {
79
+ return {
80
+ error: {
81
+ code: 'validation_error',
82
+ message: ((_b = confirmation === null || confirmation === void 0 ? void 0 : confirmation.error) === null || _b === void 0 ? void 0 : _b.message) ||
83
+ 'The entered value does not match the account number',
84
+ },
85
+ };
86
+ }
87
+ }
54
88
  const result = await this.accountNumberIframeElement.tokenize(clientId, paymentMethodMetadata, account);
55
89
  return result;
56
90
  }
57
91
  get isReady() {
58
92
  return this.iframeState === 'ready';
59
93
  }
94
+ get expectedIframeCount() {
95
+ return this.showAccountNumberConfirmation ? 3 : 2;
96
+ }
60
97
  get iframeElements() {
61
98
  return [
62
99
  this.accountNumberIframeElement,
100
+ ...(this.showAccountNumberConfirmation
101
+ ? [this.accountNumberConfirmationIframeElement]
102
+ : []),
63
103
  this.routingNumberIframeElement,
64
- ];
104
+ ].filter(Boolean);
65
105
  }
66
106
  watchIframesLoad() {
67
107
  var _a;
68
108
  (_a = this.loadAbortController) === null || _a === void 0 ? void 0 : _a.abort();
69
109
  const { signal } = (this.loadAbortController = new AbortController());
70
- const pending = new Set(this.iframeElements.map((element) => element.inputId));
110
+ const pending = new Set(this.iframeElements
111
+ .filter((element) => !this.loadedInputIds.has(element.inputId))
112
+ .map((element) => element.inputId));
71
113
  const loaded = Promise.all(this.iframeElements.map((element) => (new Promise((resolve) => {
114
+ // iframeLoaded is a once: true listener, so an element that already
115
+ // loaded will never fire again on a re-watch.
116
+ if (this.loadedInputIds.has(element.inputId)) {
117
+ resolve();
118
+ return;
119
+ }
72
120
  element.addEventListener('iframeLoaded', () => {
121
+ this.loadedInputIds.add(element.inputId);
73
122
  pending.delete(element.inputId);
74
123
  resolve();
75
124
  }, { once: true, signal });
@@ -93,6 +142,9 @@ export class BankAccountForm {
93
142
  return;
94
143
  this.iframeState = 'error';
95
144
  (_a = this.loadAbortController) === null || _a === void 0 ? void 0 : _a.abort();
145
+ if (pending.has('accountNumberConfirmation')) {
146
+ console.error('[bank-account-form] "Confirm Account Number" field failed to load.');
147
+ }
96
148
  this.errorEvent.emit({
97
149
  errorCode: ComponentErrorCodes.IFRAME_LOAD_ERROR,
98
150
  message: ComponentErrorMessages.IFRAME_LOAD_ERROR,
@@ -117,9 +169,33 @@ export class BankAccountForm {
117
169
  return (h("div", null, this.iframeState === 'loading' && h(BankAccountFormSkeleton, null), this.iframeState === 'error' && this.renderIframeError(), h("hidden-input", null), h("div", { class: "container-fluid p-0", style: {
118
170
  opacity: this.isReady ? '1' : '0',
119
171
  height: this.isReady ? 'auto' : '0',
120
- } }, h("div", { class: "row mb-3" }, h("iframe-input", { inputId: "accountNumber", ref: (el) => (this.accountNumberIframeElement = el), label: "Account Number", iframeOrigin: `${this.iframeOrigin}/v2/accountNumber?tabId=${this.tabId}` })), h("div", { class: "row" }, h("iframe-input", { inputId: "routingNumber", ref: (el) => (this.routingNumberIframeElement = el), label: "Routing Number", iframeOrigin: `${this.iframeOrigin}/v2/routingNumber?tabId=${this.tabId}` })))));
172
+ } }, h("div", { class: "row mb-3" }, h("iframe-input", { inputId: "accountNumber", ref: (el) => (this.accountNumberIframeElement = el), label: "Account Number", iframeOrigin: `${this.iframeOrigin}/v2/accountNumber?tabId=${this.tabId}` })), this.showAccountNumberConfirmation && (h("div", { class: "row mb-3" }, h("iframe-input", { inputId: "accountNumberConfirmation", ref: (el) => (this.accountNumberConfirmationIframeElement = el), label: "Confirm Account Number", iframeOrigin: `${this.iframeOrigin}/v2/accountNumberConfirmation?tabId=${this.tabId}` }))), h("div", { class: "row" }, h("iframe-input", { inputId: "routingNumber", ref: (el) => (this.routingNumberIframeElement = el), label: "Routing Number", iframeOrigin: `${this.iframeOrigin}/v2/routingNumber?tabId=${this.tabId}` })))));
121
173
  }
122
174
  static get is() { return "bank-account-form"; }
175
+ static get properties() {
176
+ return {
177
+ "showAccountNumberConfirmation": {
178
+ "type": "boolean",
179
+ "mutable": false,
180
+ "complexType": {
181
+ "original": "boolean",
182
+ "resolved": "boolean",
183
+ "references": {}
184
+ },
185
+ "required": false,
186
+ "optional": true,
187
+ "docs": {
188
+ "tags": [],
189
+ "text": ""
190
+ },
191
+ "getter": false,
192
+ "setter": false,
193
+ "reflect": false,
194
+ "attribute": "show-account-number-confirmation",
195
+ "defaultValue": "false"
196
+ }
197
+ };
198
+ }
123
199
  static get states() {
124
200
  return {
125
201
  "iframeOrigin": {},
@@ -155,7 +231,7 @@ export class BankAccountForm {
155
231
  return {
156
232
  "validate": {
157
233
  "complexType": {
158
- "signature": "() => Promise<any>",
234
+ "signature": "() => Promise<{ isValid: boolean; }>",
159
235
  "parameters": [],
160
236
  "references": {
161
237
  "Promise": {
@@ -163,7 +239,7 @@ export class BankAccountForm {
163
239
  "id": "global::Promise"
164
240
  }
165
241
  },
166
- "return": "Promise<any>"
242
+ "return": "Promise<{ isValid: boolean; }>"
167
243
  },
168
244
  "docs": {
169
245
  "text": "",
@@ -5,6 +5,7 @@ import { Header3 } from "../../../ui-components";
5
5
  import checkoutBillingStateOptions from "../../../utils/checkout-billing-state-options";
6
6
  import { FormController } from "../../../ui-components/form/form";
7
7
  import { checkoutStore, onChange } from "../../../store/checkout.store";
8
+ import { normalizePostalCode } from "../../../utils/postal-code";
8
9
  export class BillingFormFull {
9
10
  constructor() {
10
11
  this.errors = {};
@@ -33,7 +34,10 @@ export class BillingFormFull {
33
34
  (_a = this.unsubscribeFromStore) === null || _a === void 0 ? void 0 : _a.call(this);
34
35
  }
35
36
  async getValues() {
36
- return this.formController.values.getValue();
37
+ const values = this.formController.values.getValue();
38
+ // checkoutStore values skip the input transform, so normalize on the way out.
39
+ return (values === null || values === void 0 ? void 0 : values.address_postal_code)
40
+ ? Object.assign(Object.assign({}, values), { address_postal_code: normalizePostalCode(values.address_postal_code) }) : values;
37
41
  }
38
42
  async validate() {
39
43
  const isValid = await this.formController.validate();
@@ -45,7 +49,7 @@ export class BillingFormFull {
45
49
  return null;
46
50
  }
47
51
  const billingFormDefaultValue = this.formController.getInitialValues();
48
- return (h("div", { part: billingForm, class: "mt-4" }, h(Header3, { text: "Billing address", class: "fs-6 fw-bold lh-lg mb-4" }), h("form", null, h("fieldset", null, this.legend && (h("legend", null, this.legend)), h("div", { class: "row gy-3" }, h("div", { class: "col-12" }, h("form-control-text", { name: 'name', label: 'Full Name', defaultValue: billingFormDefaultValue.name, errorText: this.errors.name, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-text", { name: 'address_line1', label: 'Street Address', defaultValue: billingFormDefaultValue.address_line1, errorText: this.errors.address_line1, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-text", { name: 'address_line2', label: "Apartment, Suite, etc. (optional)", defaultValue: billingFormDefaultValue.address_line2, errorText: this.errors.address_line2, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-text", { name: 'address_city', label: "City", defaultValue: billingFormDefaultValue.address_city, errorText: this.errors.address_city, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-select", { name: 'address_state', label: 'State / Province', options: checkoutBillingStateOptions, defaultValue: billingFormDefaultValue.address_state, errorText: this.errors.address_state, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-text", { name: 'address_postal_code', label: "Postal Code", defaultValue: billingFormDefaultValue.address_postal_code, errorText: this.errors.address_postal_code, inputHandler: this.inputHandler, maxLength: 7 })))))));
52
+ return (h("div", { part: billingForm, class: "mt-4" }, h(Header3, { text: "Billing address", class: "fs-6 fw-bold lh-lg mb-4" }), h("form", null, h("fieldset", null, this.legend && (h("legend", null, this.legend)), h("div", { class: "row gy-3" }, h("div", { class: "col-12" }, h("form-control-text", { name: 'name', label: 'Full Name', defaultValue: billingFormDefaultValue.name, errorText: this.errors.name, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-text", { name: 'address_line1', label: 'Street Address', defaultValue: billingFormDefaultValue.address_line1, errorText: this.errors.address_line1, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-text", { name: 'address_line2', label: "Apartment, Suite, etc. (optional)", defaultValue: billingFormDefaultValue.address_line2, errorText: this.errors.address_line2, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-text", { name: 'address_city', label: "City", defaultValue: billingFormDefaultValue.address_city, errorText: this.errors.address_city, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-select", { name: 'address_state', label: 'State / Province', options: checkoutBillingStateOptions, defaultValue: billingFormDefaultValue.address_state, errorText: this.errors.address_state, inputHandler: this.inputHandler })), h("div", { class: "col-12" }, h("form-control-text", { name: 'address_postal_code', label: "Postal Code", defaultValue: billingFormDefaultValue.address_postal_code, errorText: this.errors.address_postal_code, inputHandler: this.inputHandler, transformValue: normalizePostalCode, maxLength: 10 })))))));
49
53
  }
50
54
  static get is() { return "billing-form-full"; }
51
55
  static get properties() {
@@ -3,6 +3,7 @@ import { postalOnlySchema } from "./billing-form-schema";
3
3
  import { billingForm } from "../../../styles/parts";
4
4
  import { FormController } from "../../../ui-components/form/form";
5
5
  import { checkoutStore, onChange } from "../../../store/checkout.store";
6
+ import { normalizePostalCode } from "../../../utils/postal-code";
6
7
  export class CardBillingFormSimple {
7
8
  constructor() {
8
9
  this.errors = {};
@@ -31,7 +32,10 @@ export class CardBillingFormSimple {
31
32
  (_a = this.unsubscribeFromStore) === null || _a === void 0 ? void 0 : _a.call(this);
32
33
  }
33
34
  async getValues() {
34
- return this.formController.values.getValue();
35
+ const values = this.formController.values.getValue();
36
+ // checkoutStore values skip the input transform, so normalize on the way out.
37
+ return (values === null || values === void 0 ? void 0 : values.address_postal_code)
38
+ ? Object.assign(Object.assign({}, values), { address_postal_code: normalizePostalCode(values.address_postal_code) }) : values;
35
39
  }
36
40
  async validate() {
37
41
  const isValid = await this.formController.validate();
@@ -40,7 +44,7 @@ export class CardBillingFormSimple {
40
44
  }
41
45
  render() {
42
46
  const billingFormDefaultValue = this.formController.getInitialValues();
43
- return (h("div", { key: 'c2fa07fce39ab1b47c99539b312fdf84e782f4dc', part: billingForm }, h("form", { key: '3bd9fdcd20ca3c014472c5ea2438214ece25abc5' }, h("fieldset", { key: 'c06cc32d36e56acfcc0a0925d8c9d45040654a63' }, this.legend && (h("legend", { key: 'ec087f9940930a9efa8c6b5e92767032ba9b8b5e' }, this.legend)), h("div", { key: '003ecc05fde14a1f1a6727f73f78ddbb81678680', class: "row gy-3" }, h("div", { key: '2de4de749a16b5fd478284a0eda93122ff67f0af', class: "col-12" }, h("form-control-text", { key: '26c2b72da72e11a3d1561ace457259521bb5d74d', name: 'address_postal_code', label: "Postal Code", defaultValue: billingFormDefaultValue.address_postal_code, errorText: this.errors.address_postal_code, inputHandler: this.inputHandler, maxLength: 7 })))))));
47
+ return (h("div", { key: 'afc6ba1fc118b81d3fd2963a86db38236c0871ac', part: billingForm }, h("form", { key: 'db49c3bdb2a243615704e42d9a2cedee6fbcc469' }, h("fieldset", { key: '9aa92c3a19f81f67e9be1a2a64b72975b96204d9' }, this.legend && (h("legend", { key: 'abdc6c1c28dc142ec7635871fa0b96f14de35c4e' }, this.legend)), h("div", { key: '19f69483b9fcd39d61cd8bdc20b8fa6ee80a5477', class: "row gy-3" }, h("div", { key: 'fff29f5a5920276125839cebeec10f8417b67805', class: "col-12" }, h("form-control-text", { key: 'd257c668d29a3c8f70ae125eff529a727cf7fcca', name: 'address_postal_code', label: "Postal Code", defaultValue: billingFormDefaultValue.address_postal_code, errorText: this.errors.address_postal_code, inputHandler: this.inputHandler, transformValue: normalizePostalCode, maxLength: 10 })))))));
44
48
  }
45
49
  static get is() { return "card-billing-form-simple"; }
46
50
  static get properties() {
@@ -2,12 +2,14 @@ import { h } from "@stencil/core";
2
2
  import CardFormSkeleton from "./card-form-skeleton";
3
3
  import { configState, waitForConfig } from "../../config-provider/config-state";
4
4
  import { generateTabId } from "../../../utils/utils";
5
- import { checkPkgVersion } from "../../../utils/check-pkg-version";
5
+ import { detectDuplicateVersion } from "../../../utils/detect-duplicate-version";
6
6
  import { ComponentErrorCodes, ComponentErrorMessages, ComponentErrorSeverity, } from "../../../api";
7
7
  import { Button } from "../../../ui-components";
8
8
  export class CardForm {
9
9
  constructor() {
10
10
  this.iframeState = 'loading';
11
+ /** Mask the card number to its last four digits when the field blurs. */
12
+ this.maskCardNumber = false;
11
13
  this.reloadIframes = () => {
12
14
  this.iframeState = 'loading';
13
15
  this.iframeElements.forEach((element) => element.reload());
@@ -18,7 +20,7 @@ export class CardForm {
18
20
  await waitForConfig();
19
21
  this.iframeOrigin = configState.iframeOrigin;
20
22
  this.tabId = generateTabId();
21
- checkPkgVersion();
23
+ detectDuplicateVersion();
22
24
  }
23
25
  componentDidLoad() {
24
26
  this.watchIframesLoad();
@@ -28,11 +30,11 @@ export class CardForm {
28
30
  (_a = this.loadAbortController) === null || _a === void 0 ? void 0 : _a.abort();
29
31
  }
30
32
  async validate() {
31
- const cardNumberIsValid = await this.cardNumberIframeElement.validate();
32
- const expirationMonthIsValid = await this.expirationMonthIframeElement.validate();
33
- const expirationYearIsValid = await this.expirationYearIframeElement.validate();
34
- const cvvIsValid = await this.cvvIframeElement.validate();
35
- return cardNumberIsValid && expirationMonthIsValid && expirationYearIsValid && cvvIsValid;
33
+ const results = [];
34
+ for (const element of this.iframeElements) {
35
+ results.push(await element.validate());
36
+ }
37
+ return { isValid: results.every((result) => (result === null || result === void 0 ? void 0 : result.isValid) === true) };
36
38
  }
37
39
  async tokenize({ clientId, paymentMethodMetadata, account, }) {
38
40
  const result = await this.cardNumberIframeElement.tokenize(clientId, paymentMethodMetadata, account);
@@ -93,12 +95,36 @@ export class CardForm {
93
95
  return (h("div", null, h("form-alert", { text: ComponentErrorMessages.IFRAME_LOAD_ERROR, hideAlert: false }), h(Button, { variant: "link", clickHandler: this.reloadIframes, "aria-label": "Reload payment form", type: "button" }, "Try again")));
94
96
  }
95
97
  render() {
96
- return (h("div", { key: 'a6630edeb25e19b72a6ad2588a28003ee53bda91' }, this.iframeState === 'loading' && h(CardFormSkeleton, { key: '346df12a8dcfa70ff35381491c10550a44dee1c1' }), this.iframeState === 'error' && this.renderIframeError(), h("hidden-input", { key: 'e63dfbd08d05c929d7f25257a0832d68246aa037' }), h("div", { key: '3cffef99661c7fc1289581c3c43cf7f2c2ec4558', class: "container-fluid p-0", style: {
98
+ return (h("div", { key: 'aa9433ca84a3c5d3d12970a0533247b10ef7a39c' }, this.iframeState === 'loading' && h(CardFormSkeleton, { key: 'af68a39d4d71d665699fd53efc436158eefeae60' }), this.iframeState === 'error' && this.renderIframeError(), h("hidden-input", { key: 'aee1ab56e4777181e1598a4047b4ac873da4416d' }), h("div", { key: '0f1603b84d701da90f05f10c8b7c2d7d26d706e8', class: "container-fluid p-0", style: {
97
99
  opacity: this.isReady ? '1' : '0',
98
100
  height: this.isReady ? 'auto' : '0',
99
- } }, h("div", { key: '493e63b1e26542e502fb028192a2ed1479d85c8d', class: "mb-3" }, h("iframe-input", { key: '337b63edc91e78baa975bbfa067e17bd29a5b704', inputId: "cardNumber", ref: (el) => (this.cardNumberIframeElement = el), label: "Card Number", iframeOrigin: `${this.iframeOrigin}/v2/cardNumber?tabId=${this.tabId}` })), h("div", { key: '04628f41b2c78cbb68bcabfe7809c047dc394c50', class: "row" }, h("div", { key: '9ea7675dcab4ad6f6bce214b79527569ffc272b9', class: "col-4 align-content-end" }, h("iframe-input", { key: 'ab7f0c3e68848a048104a6644b2617e9b8b94e35', inputId: "expirationMonth", ref: (el) => (this.expirationMonthIframeElement = el), label: "Expiration", iframeOrigin: `${this.iframeOrigin}/v2/expirationMonth?tabId=${this.tabId}` })), h("div", { key: 'a24a31ef92175734aa8d5a6be241ddb37f94e4d2', class: "col-4 align-content-end" }, h("iframe-input", { key: '623fffa1cdc854b629314fc125b476d2541f2290', inputId: "expirationYear", ref: (el) => (this.expirationYearIframeElement = el), label: "", iframeOrigin: `${this.iframeOrigin}/v2/expirationYear?tabId=${this.tabId}` })), h("div", { key: 'ab7737e03a1d6ccad1e70e575cea100040de70fd', class: "col-4 align-content-end" }, h("iframe-input", { key: 'b755098bc225d91125a70bcb2cae933e4cd08f2d', inputId: "CVV", ref: (el) => (this.cvvIframeElement = el), label: "CVV", iframeOrigin: `${this.iframeOrigin}/v2/CVV?tabId=${this.tabId}` }))))));
101
+ } }, h("div", { key: '364249139cf19fa5567f9c694a2925e9ea26e4ae', class: "mb-3" }, h("iframe-input", { key: '46f1bf0510d8ca73c231f2e7cca44c14b7c8578a', inputId: "cardNumber", ref: (el) => (this.cardNumberIframeElement = el), label: "Card Number", maskCardNumber: this.maskCardNumber, iframeOrigin: `${this.iframeOrigin}/v2/cardNumber?tabId=${this.tabId}` })), h("div", { key: '630569a17973f3aa17a07b0baccc85cae4c51bcc', class: "row" }, h("div", { key: '7d9b30a60da5a45ae1f635caad6293c867d4bc0f', class: "col-4 align-content-end" }, h("iframe-input", { key: 'a1b51799646a1d53d4f3ee4b5f8b057190a8de9b', inputId: "expirationMonth", ref: (el) => (this.expirationMonthIframeElement = el), label: "Expiration", iframeOrigin: `${this.iframeOrigin}/v2/expirationMonth?tabId=${this.tabId}` })), h("div", { key: '2fdc1625946783a048a9e2b2899987e8cdc449b8', class: "col-4 align-content-end" }, h("iframe-input", { key: '174b38998fe0a1fd278da55cb08a7ca1d0e8447f', inputId: "expirationYear", ref: (el) => (this.expirationYearIframeElement = el), label: "", iframeOrigin: `${this.iframeOrigin}/v2/expirationYear?tabId=${this.tabId}` })), h("div", { key: '1238f5d1370f27ba0ac3841563e66b51a18eaaa0', class: "col-4 align-content-end" }, h("iframe-input", { key: '86d822f907b95ee86f1fcf6f2148da3449c41d48', inputId: "CVV", ref: (el) => (this.cvvIframeElement = el), label: "CVV", iframeOrigin: `${this.iframeOrigin}/v2/CVV?tabId=${this.tabId}` }))))));
100
102
  }
101
103
  static get is() { return "card-form"; }
104
+ static get properties() {
105
+ return {
106
+ "maskCardNumber": {
107
+ "type": "boolean",
108
+ "mutable": false,
109
+ "complexType": {
110
+ "original": "boolean",
111
+ "resolved": "boolean",
112
+ "references": {}
113
+ },
114
+ "required": false,
115
+ "optional": true,
116
+ "docs": {
117
+ "tags": [],
118
+ "text": "Mask the card number to its last four digits when the field blurs."
119
+ },
120
+ "getter": false,
121
+ "setter": false,
122
+ "reflect": false,
123
+ "attribute": "mask-card-number",
124
+ "defaultValue": "false"
125
+ }
126
+ };
127
+ }
102
128
  static get states() {
103
129
  return {
104
130
  "iframeOrigin": {},
@@ -134,7 +160,7 @@ export class CardForm {
134
160
  return {
135
161
  "validate": {
136
162
  "complexType": {
137
- "signature": "() => Promise<any>",
163
+ "signature": "() => Promise<{ isValid: boolean; }>",
138
164
  "parameters": [],
139
165
  "references": {
140
166
  "Promise": {
@@ -142,7 +168,7 @@ export class CardForm {
142
168
  "id": "global::Promise"
143
169
  }
144
170
  },
145
- "return": "Promise<any>"
171
+ "return": "Promise<{ isValid: boolean; }>"
146
172
  },
147
173
  "docs": {
148
174
  "text": "",
@@ -1,6 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import JustifiAnalytics from "../../api/Analytics";
3
- import { checkPkgVersion } from "../../utils/check-pkg-version";
3
+ import { detectDuplicateVersion } from "../../utils/detect-duplicate-version";
4
4
  import { checkoutStore } from "../../store/checkout.store";
5
5
  import { checkoutSummary } from "../../styles/parts";
6
6
  import { StyledHost } from "../../ui-components";
@@ -16,6 +16,15 @@ export class JustifiCheckout {
16
16
  this.disablePaymentMethodGroup = false;
17
17
  this.hideBankAccountBillingForm = false;
18
18
  this.hideCardBillingForm = false;
19
+ /** Renders a "Confirm Account Number" field in the bank account form. */
20
+ this.showAccountNumberConfirmation = false;
21
+ /**
22
+ * Mask the card number to its last four digits when the field loses focus,
23
+ * with an eye toggle to reveal it. Defaults to false.
24
+ *
25
+ * Anti-shoulder-surfing only, not a secrecy boundary.
26
+ */
27
+ this.maskCardNumber = false;
19
28
  }
20
29
  propChanged() {
21
30
  this.updateStore();
@@ -26,7 +35,7 @@ export class JustifiCheckout {
26
35
  }
27
36
  }
28
37
  componentWillLoad() {
29
- checkPkgVersion();
38
+ detectDuplicateVersion();
30
39
  this.analytics = new JustifiAnalytics(this);
31
40
  }
32
41
  disconnectedCallback() {
@@ -66,9 +75,9 @@ export class JustifiCheckout {
66
75
  }
67
76
  render() {
68
77
  var _a, _b;
69
- return (h(StyledHost, { key: 'be64697a74e404e567c718562f72ca6cf644a2a4' }, h("justifi-modular-checkout", { key: '49be0912aa949927cb11bde45c6ade0eb25744be', ref: (el) => {
78
+ return (h(StyledHost, { key: '0458037995870159b8fae4036d6b5a4d0d5acd03' }, h("justifi-modular-checkout", { key: '698f0f48e8bd6fd7bf2102ed13308419cab53390', ref: (el) => {
70
79
  this.modularCheckoutRef = el;
71
- }, authToken: this.authToken, checkoutId: this.checkoutId, preCompleteHook: this.preCompleteHook }, h("div", { key: '7ae8865515c16d119d0c951670b86f53006f5a2f', class: "row gy-3 jfi-checkout-core" }, h("div", { key: '697f67f1603f78d852c3900f424fea1559dcbbc7', class: "col-12", part: checkoutSummary }, h("justifi-header", { key: '005b320bb2318b6e5a888911fe90aeeeb8ca58f1', text: "Summary", level: "h2", class: "fs-5 fw-bold pb-3" }), h("section", { key: 'e6e4e720e0d619aa338b1a64ccc75f6bcfb53129' }, h("justifi-checkout-summary", { key: '5bbc4d7223f56fe70bcc9810ebcde55264e17943' }))), h("div", { key: '7c5f714e729c26a8c3589e912100d38e61cb3846', class: "col-12 mt-4" }, h("slot", { key: 'ae66ebfe4a0e1456aaabd706523ef17e9c2c4b50', name: "insurance" })), h("div", { key: '3d74c4078230299a0d093568f9edf61ddede06d6', class: "col-12 mt-4" }, h("justifi-header", { key: '98fad7779ad81e44f56d488f8f9bebb843c8b044', text: "Payment", level: "h2", class: "fs-5 fw-bold pb-3" }), this.showPaymentTypeHeader && (h("justifi-header", { key: 'a522e1c11e8412c0df0b272201a9eb929e8f38a5', text: "Select payment type", level: "h3", class: "fs-6 fw-bold lh-lg" })), h("div", { key: '670a875b91e3c4f41cc1f99e159ddb62d5d2cd9d', class: "d-flex flex-column" }, h("section", { key: '660a700bfdffa79b3e00da2ae186f98fbefc59de' }, h("div", { key: '3c314f058f5a6bf745800790dcad6b0f09ec9fdf' }, this.availablePaymentMethods.includes(PAYMENT_METHODS.APPLE_PAY) && (h("div", { key: '9b3003bc6a7e2a85c64d28ac1457871297fcb570', class: "mb-3" }, h("justifi-apple-pay", { key: '25fb043d7fdd2308ceaf8cef9b8e3db72c276ec8' }))), this.availablePaymentMethods.includes(PAYMENT_METHODS.GOOGLE_PAY) && (h("div", { key: '62ea38828ed1e7fe795cd92c1523e0a09dbb1249', class: "mb-3" }, h("justifi-google-pay", Object.assign({ key: '6bf9455e95950766204a4b9a16c51512961dab6d', ref: (el) => (this.googlePayRef = el) }, (this.googlePayEnv != null ? { environment: this.googlePayEnv } : {}))))), this.availablePaymentMethods.includes(PAYMENT_METHODS.PAYPAL) && (h("div", { key: 'a1af9d7ec013aced03e3eb1e768c0dcb378c8ff2', class: "mb-3" }, h("justifi-paypal", { key: '7e0106b73a4844ffc99c353cbc6365cf9c17964c' }))), h("justifi-saved-payment-methods", { key: '4f4aae6378928ebd28d1015fd9f4dde7403e20a5' }), this.availablePaymentMethods.includes(PAYMENT_METHODS.SEZZLE) && !this.disableBnpl && (h("justifi-radio-list-item", { key: 'ac9a3b1ce4d8dff5c75417ff62aeddbb1aac5aa2', name: "paymentMethodType", value: PAYMENT_METHODS.SEZZLE, checked: ((_a = checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) === PAYMENT_METHODS.SEZZLE, label: h("justifi-sezzle-payment-method", { ref: (el) => (this.sezzlePaymentMethodRef = el) }), "onRadio-click": () => { var _a; (_a = this.sezzlePaymentMethodRef) === null || _a === void 0 ? void 0 : _a.handleSelectionClick(); } })), this.availablePaymentMethods.includes(PAYMENT_METHODS.PLAID) && (h("justifi-radio-list-item", { key: '92fa98d5d28cfa4327631238b5fbf58e2a6096c9', name: "paymentMethodType", value: PAYMENT_METHODS.PLAID, checked: ((_b = checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.selectedPaymentMethod) === null || _b === void 0 ? void 0 : _b.type) === PAYMENT_METHODS.PLAID, label: h("justifi-plaid-payment-method", { ref: (el) => (this.plaidPaymentMethodRef = el) }), "onRadio-click": () => { var _a; (_a = this.plaidPaymentMethodRef) === null || _a === void 0 ? void 0 : _a.handleSelectionClick(); } })), h("justifi-tokenize-payment-method", { key: 'f40e4195ed8ef1dbff50a870b1d0136968d78fb1', ref: (el) => (this.tokenizePaymentMethodRef = el), authToken: this.authToken, accountId: checkoutStore.accountId, disableCreditCard: this.disableCreditCard, disableBankAccount: this.disableBankAccount, hideCardBillingForm: this.hideCardBillingForm, hideBankAccountBillingForm: this.hideBankAccountBillingForm, hideSubmitButton: true, paymentMethodGroupId: checkoutStore.paymentMethodGroupId }))))), h("div", { key: '3d6b6108fa078dc2ce7a7048dffd61b5767010be', class: "mt-4" }, h("justifi-button", { key: '43370805937c92ad494cce2c493d641066c0b894', text: "Pay", type: "submit", variant: "primary", clickHandler: (e) => this.submit(e), disabled: checkoutStore.isSubmitting || checkoutStore.isWalletProcessing, isLoading: checkoutStore.isSubmitting || checkoutStore.isWalletProcessing, customStyle: { width: '100%', textAlign: "center" } }))))));
80
+ }, authToken: this.authToken, checkoutId: this.checkoutId, preCompleteHook: this.preCompleteHook }, h("div", { key: '71c1ff8052866846cd898e9068fe030bd938958a', class: "row gy-3 jfi-checkout-core" }, h("div", { key: '9721762b2b13d5a06911c5bb43f6c5c987ad724d', class: "col-12", part: checkoutSummary }, h("justifi-header", { key: 'bc9728f87907b00d2a80bdc0503547f08af135f4', text: "Summary", level: "h2", class: "fs-5 fw-bold pb-3" }), h("section", { key: '210d0455eb21b1471ae5cea863a98804677b8de2' }, h("justifi-checkout-summary", { key: '9e620e15ebd88ccf028930498981d6cddd18143b' }))), h("div", { key: '0c0a66263e8da3f387fb0df78a35df6b79506f94', class: "col-12 mt-4" }, h("slot", { key: 'aaa920ceb1af4b1aba963dc2c050dcafc6b2ecc3', name: "insurance" })), h("div", { key: 'b1f39a2a4bdf421e8db41a9e47d6a02298a22566', class: "col-12 mt-4" }, h("justifi-header", { key: 'da5ef3e4baa203c17bd3549b796854cf5d70bcd3', text: "Payment", level: "h2", class: "fs-5 fw-bold pb-3" }), this.showPaymentTypeHeader && (h("justifi-header", { key: '37844f9005aca58bf4670b164f42b19ed1d057f0', text: "Select payment type", level: "h3", class: "fs-6 fw-bold lh-lg" })), h("div", { key: 'bbbff8e463752aaed1c46feb71bc984c359558c6', class: "d-flex flex-column" }, h("section", { key: '6b4d3d5484a01d508abfc859c57c2407bc85e589' }, h("div", { key: '89a788a45217da8b919f1d8e6d1b091ab44557cb' }, this.availablePaymentMethods.includes(PAYMENT_METHODS.APPLE_PAY) && (h("div", { key: '7b80b067d959b52ed86474ece9fdfa589945c816', class: "mb-3" }, h("justifi-apple-pay", { key: 'a7ff1ca0f3e00e91811f833dfc1c9f39b961cc76' }))), this.availablePaymentMethods.includes(PAYMENT_METHODS.GOOGLE_PAY) && (h("div", { key: 'a17235c7cd09f07a6c3ff765cfd4d1cd54a7605d', class: "mb-3" }, h("justifi-google-pay", Object.assign({ key: '602884b27b43a7a6848d390162e85a5c1fce973e', ref: (el) => (this.googlePayRef = el) }, (this.googlePayEnv != null ? { environment: this.googlePayEnv } : {}))))), this.availablePaymentMethods.includes(PAYMENT_METHODS.PAYPAL) && (h("div", { key: '38d3a64129e042cf5ab96ed3dddcb12f23015c5a', class: "mb-3" }, h("justifi-paypal", { key: '68dd2d65a1a4fa293a4145ef032022cf57196df4' }))), h("justifi-saved-payment-methods", { key: '6a87a633c879e700a671cb71e948128338a4c543' }), this.availablePaymentMethods.includes(PAYMENT_METHODS.SEZZLE) && !this.disableBnpl && (h("justifi-radio-list-item", { key: 'ea96bafc139515bf352dfcef3e7aa25e9d7d1406', name: "paymentMethodType", value: PAYMENT_METHODS.SEZZLE, checked: ((_a = checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.selectedPaymentMethod) === null || _a === void 0 ? void 0 : _a.type) === PAYMENT_METHODS.SEZZLE, label: h("justifi-sezzle-payment-method", { ref: (el) => (this.sezzlePaymentMethodRef = el) }), "onRadio-click": () => { var _a; (_a = this.sezzlePaymentMethodRef) === null || _a === void 0 ? void 0 : _a.handleSelectionClick(); } })), this.availablePaymentMethods.includes(PAYMENT_METHODS.PLAID) && (h("justifi-radio-list-item", { key: 'f872c215b1d45c8ca594756fbcd296dbcff923a0', name: "paymentMethodType", value: PAYMENT_METHODS.PLAID, checked: ((_b = checkoutStore === null || checkoutStore === void 0 ? void 0 : checkoutStore.selectedPaymentMethod) === null || _b === void 0 ? void 0 : _b.type) === PAYMENT_METHODS.PLAID, label: h("justifi-plaid-payment-method", { ref: (el) => (this.plaidPaymentMethodRef = el) }), "onRadio-click": () => { var _a; (_a = this.plaidPaymentMethodRef) === null || _a === void 0 ? void 0 : _a.handleSelectionClick(); } })), h("justifi-tokenize-payment-method", { key: '61354ab52513d256ca2eb29bee7403383981f487', ref: (el) => (this.tokenizePaymentMethodRef = el), authToken: this.authToken, accountId: checkoutStore.accountId, disableCreditCard: this.disableCreditCard, disableBankAccount: this.disableBankAccount, hideCardBillingForm: this.hideCardBillingForm, hideBankAccountBillingForm: this.hideBankAccountBillingForm, hideSubmitButton: true, paymentMethodGroupId: checkoutStore.paymentMethodGroupId, showAccountNumberConfirmation: this.showAccountNumberConfirmation, maskCardNumber: this.maskCardNumber }))))), h("div", { key: '87d0deb5342edf49d830df949cae666450e45404', class: "mt-4" }, h("justifi-button", { key: '0f8fa093c3442139604943768e0692370dfb7aba', text: "Pay", type: "submit", variant: "primary", clickHandler: (e) => this.submit(e), disabled: checkoutStore.isSubmitting || checkoutStore.isWalletProcessing, isLoading: checkoutStore.isSubmitting || checkoutStore.isWalletProcessing, customStyle: { width: '100%', textAlign: "center" } }))))));
72
81
  }
73
82
  static get is() { return "justifi-checkout"; }
74
83
  static get properties() {
@@ -277,6 +286,46 @@ export class JustifiCheckout {
277
286
  },
278
287
  "getter": false,
279
288
  "setter": false
289
+ },
290
+ "showAccountNumberConfirmation": {
291
+ "type": "boolean",
292
+ "mutable": false,
293
+ "complexType": {
294
+ "original": "boolean",
295
+ "resolved": "boolean",
296
+ "references": {}
297
+ },
298
+ "required": false,
299
+ "optional": true,
300
+ "docs": {
301
+ "tags": [],
302
+ "text": "Renders a \"Confirm Account Number\" field in the bank account form."
303
+ },
304
+ "getter": false,
305
+ "setter": false,
306
+ "reflect": false,
307
+ "attribute": "show-account-number-confirmation",
308
+ "defaultValue": "false"
309
+ },
310
+ "maskCardNumber": {
311
+ "type": "boolean",
312
+ "mutable": false,
313
+ "complexType": {
314
+ "original": "boolean",
315
+ "resolved": "boolean",
316
+ "references": {}
317
+ },
318
+ "required": false,
319
+ "optional": true,
320
+ "docs": {
321
+ "tags": [],
322
+ "text": "Mask the card number to its last four digits when the field loses focus,\nwith an eye toggle to reveal it. Defaults to false.\n\nAnti-shoulder-surfing only, not a secrecy boundary."
323
+ },
324
+ "getter": false,
325
+ "setter": false,
326
+ "reflect": false,
327
+ "attribute": "mask-card-number",
328
+ "defaultValue": "false"
280
329
  }
281
330
  };
282
331
  }
@@ -1,4 +1,6 @@
1
1
  export const MessageEventType = {
2
2
  tokenize: 'tokenize',
3
3
  validate: 'validate',
4
+ /** Opts a hosted field into mask-on-blur. Carries no card data. */
5
+ setMaskCardNumber: 'setMaskCardNumber',
4
6
  };
@@ -5,7 +5,7 @@ export class JustifiSaveNewPaymentMethod {
5
5
  this.label = 'Save New Payment Method';
6
6
  }
7
7
  render() {
8
- return (h(StyledHost, { key: 'a8b450dc8d759d10da91b81e062adfcc4ec803f1' }, h("save-new-payment-method", { key: 'f463f223c38e4078b96efb0a99c3d932663b3574', label: this.label, hidden: this.hidden, onCheckboxChanged: (e) => this.checkboxChanged.emit(e.detail) })));
8
+ return (h(StyledHost, { key: 'e5792a56b3a21bcf3d5fb0604fbf487ce536b498' }, h("save-new-payment-method", { key: 'f01b1546e90db73bc8da8edcab4a3d384e4f742e', label: this.label, hidden: this.hidden, onCheckboxChanged: (e) => this.checkboxChanged.emit(e.detail) })));
9
9
  }
10
10
  static get is() { return "justifi-save-new-payment-method"; }
11
11
  static get encapsulation() { return "shadow"; }
@@ -11,7 +11,7 @@ export class SaveNewPaymentMethod {
11
11
  };
12
12
  }
13
13
  render() {
14
- return (h(Host, { key: '664463db96e3e2ce7152dbe33a9a1a940a2b2c2f', hidden: this.hidden }, h("form-control-checkbox", { key: '4f90f2799f1efddc15703906a6f3e183816239e6', label: this.label || 'Save New Payment Method', name: "saveNewPaymentMethod", checked: this.isChecked, inputHandler: this.handleCheckboxChange })));
14
+ return (h(Host, { key: 'b3dd9d66db6d192d31ea2eea5d1364957b0d6048', hidden: this.hidden }, h("form-control-checkbox", { key: 'e40dbe64979cae47936ce53841e62aea25774840', label: this.label || 'Save New Payment Method', name: "saveNewPaymentMethod", checked: this.isChecked, inputHandler: this.handleCheckboxChange })));
15
15
  }
16
16
  static get is() { return "save-new-payment-method"; }
17
17
  static get properties() {
@@ -2,13 +2,13 @@ import { h } from "@stencil/core";
2
2
  import QRCode from "qrcode";
3
3
  import { ComponentErrorCodes, ComponentErrorSeverity } from "../../api/ComponentError";
4
4
  import JustifiAnalytics from "../../api/Analytics";
5
- import { checkPkgVersion } from "../../utils/check-pkg-version";
5
+ import { detectDuplicateVersion } from "../../utils/detect-duplicate-version";
6
6
  export class JustifiCheckoutQrCode {
7
7
  constructor() {
8
8
  this.size = 256;
9
9
  }
10
10
  componentWillLoad() {
11
- checkPkgVersion();
11
+ detectDuplicateVersion();
12
12
  this.analytics = new JustifiAnalytics(this);
13
13
  }
14
14
  componentDidLoad() {
@@ -53,8 +53,8 @@ export class JustifiCheckoutsListFilters {
53
53
  }
54
54
  render() {
55
55
  const filterMenuParams = Object.assign({}, filterParams);
56
- return (h(StyledHost, { key: 'eca6b148bbea71d2ae0169aa67251ab87cadc1df' }, h("table-filters-menu", { key: '87af760346bd028aca6fb5f29ad9d16d1344e0e5', params: filterMenuParams, clearParams: clearParams, part: filterMenu }, h("div", { key: '63a139d5d7f213bd0b7496f8076b2c95a36860a3', class: "grid-cols-2 gap-3 p-1" }, h("div", { key: 'ae268b747aa817dee8e8c762132008d59ed6cb6f', class: "p-2" }, h("form-control-text", { key: 'a8a0139e9a8671c0a74f7bb5cb7d40cc5c76f9e8', name: "checkout_id", label: "Checkout ID", inputHandler: this.debouncedSetParamsOnChange, defaultValue: this.checkoutId || filterParams.checkout_id, disabled: !!this.checkoutId, part: filterParam })), h("div", { key: '5fbd8588d9f64254182cf08689dda0c705755e03', class: "p-2" }, h("form-control-text", { key: '6d70a400b4936fdf3d35c00a3b95303bc3e79688', name: "successful_payment_id", label: "Successful Payment ID", inputHandler: this.debouncedSetParamsOnChange, defaultValue: this.successfulPaymentId || filterParams.successful_payment_id, disabled: !!this.successfulPaymentId, part: filterParam })), h("div", { key: '96a3b1bf5eaa46dcda3f01de50d991a14cb6f455', class: "p-2" }, h("form-control-select", { key: '06572e5d0528cfc0e36c6d95210ec6bc6db119ab', name: "status", label: "Status", options: this.checkoutStatusOptions, inputHandler: this.setParamsOnChange, defaultValue: this.checkoutStatus || filterParams.status || '', disabled: !!this.checkoutStatus, part: filterParam })), h("div", { key: '81cb0976145496cbb991b2b20d8acaee24238f65', class: "p-2" }, h("form-control-select", { key: '15db898c3fac34c2ac0262d17c07ea811ddbebd7', name: "payment_mode", label: "Payment Mode", options: this.checkoutPaymentModeOptions, inputHandler: this.setParamsOnChange, defaultValue: this.paymentMode || filterParams.payment_mode || '', disabled: !!this.paymentMode, part: filterParam })), h("div", { key: 'cbae593e372d8fcb648fff5503ac6495e75c5f2e', class: "p-2" }, h("form-control-date", { key: '06f605f92582dbf1ea654a4c14ea0089932e9aea', name: "created_after", label: "Created After", inputHandler: this.handleDateInput, defaultValue: convertToLocal(this.createdAfter, { showInputDateTime: true }) ||
57
- convertToLocal(filterParams.created_after, { showInputDateTime: true }), showTime: true, disabled: !!this.createdAfter, part: filterParam })), h("div", { key: '278400d92ded9bff800e4b2142434c046d1be397', class: "p-2" }, h("form-control-date", { key: '53a98e350078d690df0985627ac1a6f0e39f74ad', name: "created_before", label: "Created Before", inputHandler: this.handleDateInput, defaultValue: convertToLocal(this.createdBefore, { showInputDateTime: true }) ||
56
+ return (h(StyledHost, { key: 'a84f587608b49683633b26d23e548b576c5daba3' }, h("table-filters-menu", { key: 'd7a43576bb803d706755ce9deafda5f8732540c1', params: filterMenuParams, clearParams: clearParams, part: filterMenu }, h("div", { key: '6ce5861f974a8d2c7bc5bcb03b7b0df60e10d780', class: "grid-cols-2 gap-3 p-1" }, h("div", { key: '492714a0263fb27222e17794a640e3855c9ba6e1', class: "p-2" }, h("form-control-text", { key: '357b10f4f290c9500fb5fe24e4bc97ea80511e2c', name: "checkout_id", label: "Checkout ID", inputHandler: this.debouncedSetParamsOnChange, defaultValue: this.checkoutId || filterParams.checkout_id, disabled: !!this.checkoutId, part: filterParam })), h("div", { key: 'cc8535898de01f417080c984ed53f1582848fd74', class: "p-2" }, h("form-control-text", { key: '37aa831598c6496af4fd358f94c54a118f309d82', name: "successful_payment_id", label: "Successful Payment ID", inputHandler: this.debouncedSetParamsOnChange, defaultValue: this.successfulPaymentId || filterParams.successful_payment_id, disabled: !!this.successfulPaymentId, part: filterParam })), h("div", { key: '751c3f3b60b0140b9eb954de3a0e94f5feb6075f', class: "p-2" }, h("form-control-select", { key: 'afa69abd4be56a27d0cafce1508a7edeb119d7b0', name: "status", label: "Status", options: this.checkoutStatusOptions, inputHandler: this.setParamsOnChange, defaultValue: this.checkoutStatus || filterParams.status || '', disabled: !!this.checkoutStatus, part: filterParam })), h("div", { key: '86c4e7121a67e4ef1bb96fcb6ccbe9a900378556', class: "p-2" }, h("form-control-select", { key: 'eaa9e1b1214fb3955de0f0421760da4bf1a773a2', name: "payment_mode", label: "Payment Mode", options: this.checkoutPaymentModeOptions, inputHandler: this.setParamsOnChange, defaultValue: this.paymentMode || filterParams.payment_mode || '', disabled: !!this.paymentMode, part: filterParam })), h("div", { key: '8f28caa07d711135223507f1864343531d451a15', class: "p-2" }, h("form-control-date", { key: '038141b8b8fc669cca8c849d23cba1a7e2f1d5aa', name: "created_after", label: "Created After", inputHandler: this.handleDateInput, defaultValue: convertToLocal(this.createdAfter, { showInputDateTime: true }) ||
57
+ convertToLocal(filterParams.created_after, { showInputDateTime: true }), showTime: true, disabled: !!this.createdAfter, part: filterParam })), h("div", { key: 'ddb442863d596de25c392d14b8fb364db3afdaec', class: "p-2" }, h("form-control-date", { key: 'cee1d9337dd5f6f9c258892f89573a2b07c2180c', name: "created_before", label: "Created Before", inputHandler: this.handleDateInput, defaultValue: convertToLocal(this.createdBefore, { showInputDateTime: true }) ||
58
58
  convertToLocal(filterParams.created_before, { showInputDateTime: true }), showTime: true, disabled: !!this.createdBefore, part: filterParam }))))));
59
59
  }
60
60
  static get is() { return "justifi-checkouts-list-filters"; }
@@ -1,7 +1,7 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { pagingDefaults } from "../../api";
3
3
  import { makeGetCheckouts } from "../../actions/checkout/get-checkouts";
4
- import { checkPkgVersion } from "../../utils/check-pkg-version";
4
+ import { detectDuplicateVersion } from "../../utils/detect-duplicate-version";
5
5
  import JustifiAnalytics from "../../api/Analytics";
6
6
  import { CheckoutService } from "../../api/services/checkout.service";
7
7
  import { ComponentErrorCodes, ComponentErrorSeverity } from "../../api/ComponentError";
@@ -36,7 +36,7 @@ export class JustifiCheckoutsList {
36
36
  };
37
37
  }
38
38
  componentWillLoad() {
39
- checkPkgVersion();
39
+ detectDuplicateVersion();
40
40
  this.analytics = new JustifiAnalytics(this);
41
41
  this.checkoutsTable = new Table(this.checkouts, this.columns, checkoutTableColumns, checkoutTableCells);
42
42
  this.initializeGetData();
@@ -178,8 +178,8 @@ export class JustifiCheckoutsList {
178
178
  return !this.showEmptyState && !this.showErrorState && !this.loading;
179
179
  }
180
180
  render() {
181
- return (h(StyledHost, { key: 'a7b1654b627bab83958b7247b27c296ee1164cfc' }, h(TableWrapper, { key: 'e3dddb238409f778e52ad036b7cd2ec41279f3dc' }, h(TableComponent, { key: 'd0960d893904207989f88685bcc80bc6c1979b47' }, h(TableHead, { key: 'dc11347964df3a6c5d4adce407e668fd0a7683cf' }, h(TableHeadRow, { key: '5c2ee6078f1ff84b273ce843b24d47161097155e' }, this.checkoutsTable.columnData.map((column) => column))), h(TableBody, { key: '6c88b83f5369accef71b05713fa7b1fd43b01862' }, h(TableLoadingState, { key: 'f463c22c1f6cc7e80a698b0ae751f8ab7fb43cc5', columnSpan: this.checkoutsTable.columnKeys.length, isLoading: this.loading }), h(TableEmptyState, { key: 'a9414a60b8c91f87537da7853bfb32264c2c966b', isEmpty: this.showEmptyState, columnSpan: this.checkoutsTable.columnKeys.length }), h(TableErrorState, { key: '41ebd0d98fe7591a0cc93e1fd37f0a2027d249fb', columnSpan: this.checkoutsTable.columnKeys.length, errorMessage: this.errorMessage }), this.showRowData &&
182
- this.checkoutsTable.rowData.map((data, index) => (h(TableRow, { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index], onClick: this.rowClickHandler }, data)))), this.paging && (h(TableFoot, { key: 'e41929553535de5f86ce9b84f5264bb1c3a43796' }, h(TableFootRow, { key: 'c4cc91e37335f5ed9b9819364978d3eeecd6f879' }, h(TableFootCell, { key: '7f0fcab1ec2c31c9f82de6b8d524f9a8166c229b', colSpan: this.checkoutsTable.columnData.length }, h("pagination-menu", { key: '0949bb91fa20cb78dfb1b7a01c91db713cb92c00', paging: Object.assign(Object.assign({}, this.paging), { handleClickPrevious: this.handleClickPrevious, handleClickNext: this.handleClickNext }) })))))))));
181
+ return (h(StyledHost, { key: '5c72630838781f32e31d44510c9793ef71d863cd' }, h(TableWrapper, { key: '01c4456bfc252a55de1351bd54500ab6f9d22d2e' }, h(TableComponent, { key: '2a69c5b2d27caf1a648efed450e8eadf583e3858' }, h(TableHead, { key: 'f524af14960a68a035eb75cfa7d2c6255d0e0de3' }, h(TableHeadRow, { key: '2cbf9ac9228aa770da72e9d3d618e61094bb65b6' }, this.checkoutsTable.columnData.map((column) => column))), h(TableBody, { key: '2c246fa63dd49ff4bf4a29a25717d4191a904443' }, h(TableLoadingState, { key: '83fcebd9b8775ec50b614925ad2c153d6ac1888a', columnSpan: this.checkoutsTable.columnKeys.length, isLoading: this.loading }), h(TableEmptyState, { key: 'a37d1f0001e1c5f793eda759f82e58e42be49321', isEmpty: this.showEmptyState, columnSpan: this.checkoutsTable.columnKeys.length }), h(TableErrorState, { key: '57cb26d7929f007ae9e14faf63b29b06b3097828', columnSpan: this.checkoutsTable.columnKeys.length, errorMessage: this.errorMessage }), this.showRowData &&
182
+ this.checkoutsTable.rowData.map((data, index) => (h(TableRow, { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index], onClick: this.rowClickHandler }, data)))), this.paging && (h(TableFoot, { key: 'edd82eb558b69329970c93f207f840cca8de2884' }, h(TableFootRow, { key: 'deed2dee3d311b76888003cbeffd00c5397cc6c8' }, h(TableFootCell, { key: 'b9845ccc21e916ccef0c3f3dba37e1187c80769d', colSpan: this.checkoutsTable.columnData.length }, h("pagination-menu", { key: '7af1644ff5e5cb8a2ca68705f481f5991c7a09b2', paging: Object.assign(Object.assign({}, this.paging), { handleClickPrevious: this.handleClickPrevious, handleClickNext: this.handleClickNext }) })))))))));
183
183
  }
184
184
  static get is() { return "justifi-checkouts-list"; }
185
185
  static get encapsulation() { return "shadow"; }
@@ -44,8 +44,8 @@ export class DisputeNotification {
44
44
  }
45
45
  render() {
46
46
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
47
- return (h("div", { key: '0f4474fa70e6ab3895132b703ab5a3b7f810554a', class: "dispute-notification-root" }, this.isLoading && (h("div", { key: '1bd7b07c15e6a88be6215dbca5e41cbcfc6e6e68', style: { marginBottom: '8px' } }, h(Skeleton, { key: 'a4436ec5cc58b0cccdcdc9ae3d25293fdfaeac40', height: '28px', width: '70%', styles: { marginBottom: '16px' } }), h(Skeleton, { key: 'cda7ba45ed518e762239864b766f65da8488e713', height: '18px', styles: { marginBottom: '8px' } }), h(Skeleton, { key: 'a0acf3c7c0ae988f8580bfbd8b2ff2b5c349fddb', height: '18px', styles: { marginBottom: '8px' } }))), ((_a = this.dispute) === null || _a === void 0 ? void 0 : _a.needsResponse) && this.isDueDatePassed() && (h("div", { key: '2fd8a28d4c3eefc4a1a881d3bc47422428d4f016', part: text }, h("h1", { key: '243ca1a43064800b65fb27e259598ff85746e55b', class: "h4", part: heading4 }, "The due date (", (_b = this.dispute) === null || _b === void 0 ? void 0 :
48
- _b.due_date, ") for this dispute has passed"), h("p", { key: '617f7b87510fee1d64ad121cf15f1ba193f6826c' }, "You can no longer submit evidence to counter this dispute."))), ((_c = this.dispute) === null || _c === void 0 ? void 0 : _c.needsResponse) && !this.isDueDatePassed() && (h("div", { key: 'd9ad4c30643e0991c7327a800d8015aa49d227ff', part: text }, h("h1", { key: 'c6e2b6a4a012ad2ce3d371ac765359f0db018166', class: "h4", part: heading4 }, "This payment is disputed"), h("p", { key: '491ca4d83029e8aec16ee745cd3eb78854298d19' }, "The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."), h("h2", { key: '3fd51e33e3440d6fda3fb6f2aa3f83cd783255fc', class: "h5" }, "Dispute details"), h("div", { key: 'edb7c85ffccd4a1af64cdb61a702ce39c86987a9', class: "d-table gap-2" }, h("div", { key: '8d611ad34fa2a40d52f175c6874228254d235bf6', class: "d-table-row gap-2" }, h("span", { key: 'db4c9c3379b475ddb4c966336a1a9905f286335a', part: "detail-section-item-title", class: "fw-bold d-table-cell pe-4" }, "Amount"), h("span", { key: '9c61d28bc602dd3cdeaa0e99923c58fb20fb95bc', part: "detail-section-item-data", class: "flex-1 d-table-cell text-wrap" }, formatCurrency((_d = this.dispute) === null || _d === void 0 ? void 0 : _d.amount))), h("div", { key: 'd7a84cd67c59bfdc2c63b7e847b82d423d3277a4', class: "d-table-row gap-2" }, h("span", { key: 'e98e2a8a8593b3358ecf6d5b857d2f3cffae1ef5', part: "detail-section-item-title", class: "fw-bold d-table-cell pe-4" }, "Reason"), h("span", { key: '61f843068e6bf04d8bab69cefeb148e9b6792a5f', part: "detail-section-item-data", class: "flex-1 d-table-cell text-wrap" }, (_e = this.dispute) === null || _e === void 0 ? void 0 : _e.reason)), h("div", { key: '795fd5d907eb2e1456c737a201517dbe5434ea84', class: "d-table-row gap-2" }, h("span", { key: '1dae1ba0dd7323756988c8f6d65be1fdf3c155e6', part: "detail-section-item-title", class: "fw-bold d-table-cell pe-4" }, "Due Date"), h("span", { key: 'b44ff4fcfd0beb70af6468a216eee0489c566a79', part: "detail-section-item-data", class: "flex-1 d-table-cell text-wrap" }, (_f = this.dispute) === null || _f === void 0 ? void 0 : _f.due_date))), h("div", { key: 'f7e1ac7543ca231cc7904654bfb9fcb3e3f31dc1', class: "d-flex gap-2 mt-4 justify-content-end" }, h(Button, { key: '35dfa1f4e0a7f02496751dc332a4c52b542fe538', variant: "secondary", onClick: () => this.acceptDispute() }, "Accept dispute"), h(Button, { key: '0519e6959a2407315d600384121b6ad466de79eb', variant: "primary", onClick: () => this.initiateRespondToDispute() }, "Counter dispute")))), ((_g = this.dispute) === null || _g === void 0 ? void 0 : _g.underReview) && (h("div", { key: '600db9506bed0de6efc3d0367fb5df63273bba14', part: text }, h("h1", { key: '139a034878c8433edb1b936440c1b71d9d1022b2', class: "h4", part: heading4 }, "This payment is disputed and under review"), h("p", { key: 'bd9b3d46e57ec998e5e1a5bc465d981129fc1fd2' }, "The cardholder is disputing this payment. A counter dispute has been submitted and is under review."))), ((_h = this.dispute) === null || _h === void 0 ? void 0 : _h.won) && (h("div", { key: 'c03393474cea2a44b864eba0f9e36b1fe63eb256', part: text }, h("h1", { key: '3c19db3b8aefd25a363d4cd183eaaa2487d33f8c', class: "h4", part: heading4 }, "This payment was disputed"), h("p", { key: '45d95070b59c3a0da28bc5cda5356c2aa171d974' }, "The cardholder disputed this payment and the card issuer has settled it in your favor."))), ((_j = this.dispute) === null || _j === void 0 ? void 0 : _j.lost) && (h("div", { key: 'a8727df139e8d1eff3e67bc13359534281ceb795', part: text }, h("h1", { key: 'bb533bb65c20722002bda966782fcc4d165a139e', class: "h4", part: heading4 }, "This payment was disputed"), h("p", { key: '5901b10090d20523de1f96630ce7a9b71d9fdcac' }, "The cardholder disputed this payment and the card issuer has settled it in their favor.")))));
47
+ return (h("div", { key: '12cd6c17c1f4f70e136fa0e9d6ff74d37af82a1e', class: "dispute-notification-root" }, this.isLoading && (h("div", { key: '33b1c6259abe1da5d92ac2aa37cfec9033fbb3d1', style: { marginBottom: '8px' } }, h(Skeleton, { key: '1f5bc2333a37587d3d11e545b58c9b85a2a145a5', height: '28px', width: '70%', styles: { marginBottom: '16px' } }), h(Skeleton, { key: '280e35a187319c7698922c3cd3f579457a187e7a', height: '18px', styles: { marginBottom: '8px' } }), h(Skeleton, { key: '3fd7f151a3d7516dd40835d6c42d2240d7170613', height: '18px', styles: { marginBottom: '8px' } }))), ((_a = this.dispute) === null || _a === void 0 ? void 0 : _a.needsResponse) && this.isDueDatePassed() && (h("div", { key: 'e78d3cf205ba862b8df5e5358e15c4961add1003', part: text }, h("h1", { key: 'c533f650a18a75ca7c9f1cb15a6d1da517317e54', class: "h4", part: heading4 }, "The due date (", (_b = this.dispute) === null || _b === void 0 ? void 0 :
48
+ _b.due_date, ") for this dispute has passed"), h("p", { key: '14f82547639777ab5179010f350d42f7b4082845' }, "You can no longer submit evidence to counter this dispute."))), ((_c = this.dispute) === null || _c === void 0 ? void 0 : _c.needsResponse) && !this.isDueDatePassed() && (h("div", { key: 'a2eefdc255af0c3b07091183fff4c5860f66af3a', part: text }, h("h1", { key: '043801fa6ac2f90ba10e6048feeecf670cc4e4dd', class: "h4", part: heading4 }, "This payment is disputed"), h("p", { key: 'b4b115c46340ae96e43a63a1535b59f071efc7cc' }, "The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."), h("h2", { key: '451b315624efea9b5f1e619ae6b942611ba93135', class: "h5" }, "Dispute details"), h("div", { key: 'c7765f5f091a346de0eb7aa81c36d475832925d2', class: "d-table gap-2" }, h("div", { key: 'cb3ecb618099b579a488232d5ecafef28c7da235', class: "d-table-row gap-2" }, h("span", { key: '86475be18418565529a2d08a544962209f9766ac', part: "detail-section-item-title", class: "fw-bold d-table-cell pe-4" }, "Amount"), h("span", { key: '5efe0ffd6f0236b906ab9e52f32bd9a0533240a2', part: "detail-section-item-data", class: "flex-1 d-table-cell text-wrap" }, formatCurrency((_d = this.dispute) === null || _d === void 0 ? void 0 : _d.amount))), h("div", { key: '286b29d07ddb23ba80d4831aadebb4f550545c39', class: "d-table-row gap-2" }, h("span", { key: '2a8582b5e4c6e0b4ad1db9b7222148949accf10d', part: "detail-section-item-title", class: "fw-bold d-table-cell pe-4" }, "Reason"), h("span", { key: 'b8e43894965778696e0cb41204b3efe1aac9443e', part: "detail-section-item-data", class: "flex-1 d-table-cell text-wrap" }, (_e = this.dispute) === null || _e === void 0 ? void 0 : _e.reason)), h("div", { key: '4864005f755bdbdecb5ed28370452850dfc9f047', class: "d-table-row gap-2" }, h("span", { key: '64b10de9b84fe9992b07a88294caa38b2b63fdca', part: "detail-section-item-title", class: "fw-bold d-table-cell pe-4" }, "Due Date"), h("span", { key: '5198c3cd3ebf4246c42d8b59603765bd39bae06b', part: "detail-section-item-data", class: "flex-1 d-table-cell text-wrap" }, (_f = this.dispute) === null || _f === void 0 ? void 0 : _f.due_date))), h("div", { key: '29c98ba58742d3195eca08571cbf793bc9d5a7c6', class: "d-flex gap-2 mt-4 justify-content-end" }, h(Button, { key: '9ef19c0152cbb6342214aa5073ffed303fc85624', variant: "secondary", onClick: () => this.acceptDispute() }, "Accept dispute"), h(Button, { key: '558126e83a05c0729e17a1abf5ce849e02574096', variant: "primary", onClick: () => this.initiateRespondToDispute() }, "Counter dispute")))), ((_g = this.dispute) === null || _g === void 0 ? void 0 : _g.underReview) && (h("div", { key: 'f8c6fee1c63eef8cf2d2a00fb10051686c7572ae', part: text }, h("h1", { key: '23c4bb1c8ab00f4cf9a1447156c124f8ecd1f4b7', class: "h4", part: heading4 }, "This payment is disputed and under review"), h("p", { key: 'b1c469330757f22582e5c341c68adcd1aae3def3' }, "The cardholder is disputing this payment. A counter dispute has been submitted and is under review."))), ((_h = this.dispute) === null || _h === void 0 ? void 0 : _h.won) && (h("div", { key: '46c92fe084337c67ce0bfedf11d89aca38bdc5e4', part: text }, h("h1", { key: 'ac06dc25f88d88d257ff56aec620d803a45d6344', class: "h4", part: heading4 }, "This payment was disputed"), h("p", { key: '30a26bceb37855460b8ae6ef54c20591900b5fcf' }, "The cardholder disputed this payment and the card issuer has settled it in your favor."))), ((_j = this.dispute) === null || _j === void 0 ? void 0 : _j.lost) && (h("div", { key: '2320aa515a8112a27bdbd9e3f1b3a8daf2c1b28e', part: text }, h("h1", { key: '32e0cfc6e8d27afe01194ab61ad342781ec31bf8', class: "h4", part: heading4 }, "This payment was disputed"), h("p", { key: '6a8b333f0be16d81ffc23609bcdcb8f70435d515' }, "The cardholder disputed this payment and the card issuer has settled it in their favor.")))));
49
49
  }
50
50
  static get is() { return "dispute-notification"; }
51
51
  static get properties() {