@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
@@ -1,6 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { StyledHost } from "../../ui-components";
3
- import { checkPkgVersion } from "../../utils/check-pkg-version";
3
+ import { detectDuplicateVersion } from "../../utils/detect-duplicate-version";
4
4
  import JustifiAnalytics from "../../api/Analytics";
5
5
  import { ComponentErrorCodes, ComponentErrorSeverity, } from "../../api";
6
6
  import { checkoutStore } from "../../store/checkout.store";
@@ -37,7 +37,7 @@ export class JustifiTokenizePaymentMethod {
37
37
  }
38
38
  }
39
39
  componentWillLoad() {
40
- checkPkgVersion();
40
+ detectDuplicateVersion();
41
41
  this.analytics = new JustifiAnalytics(this);
42
42
  }
43
43
  handleRadioClick(event) {
@@ -92,9 +92,10 @@ export class JustifiTokenizePaymentMethod {
92
92
  this.billingFormRef.validate(),
93
93
  this.paymentMethodFormRef.validate(),
94
94
  ]);
95
+ // Field-level messages stay inside the hosted iframes, so only billing contributes errors.
95
96
  const result = {
96
97
  isValid: billingValidation.isValid && paymentMethodValidation.isValid,
97
- errors: Object.assign(Object.assign({}, billingValidation.errors), paymentMethodValidation.errors),
98
+ errors: Object.assign({}, billingValidation.errors),
98
99
  };
99
100
  return result;
100
101
  }
@@ -256,13 +257,13 @@ export class JustifiTokenizePaymentMethod {
256
257
  return paymentMethodType === PAYMENT_METHODS.NEW_CARD ? (h("card-form", { ref: (el) => {
257
258
  if (el)
258
259
  this.paymentMethodFormRef = el;
259
- } })) : (h("bank-account-form", { ref: (el) => {
260
+ }, maskCardNumber: this.maskCardNumber })) : (h("bank-account-form", { ref: (el) => {
260
261
  if (el)
261
262
  this.paymentMethodFormRef = el;
262
- } }));
263
+ }, showAccountNumberConfirmation: this.showAccountNumberConfirmation }));
263
264
  }
264
265
  render() {
265
- return (h(StyledHost, { key: '16a5a47febb09295c95f141ddc96a849e530c477' }, h("form", { key: 'e1ac3ac80435b32cb0a742198d814778bffd635c' }, h("fieldset", { key: '68d0f984d3e66a6abc794e8b2086e27f26ecc809' }, h("div", { key: 'b1759ec1b9c94a976da992947b06da6d8f48f553', class: "row gy-3" }, h("div", { key: 'bc1ef82406d3da36c5d4d97b1a10259de87fdd09', class: "col-12" }, this.availablePaymentMethods.map((method) => this.renderPaymentMethodOption(method))), h("div", { key: 'ed26f2908aa90daba5ab320a668369566b9dacfa', class: "col-12" }, h("internal-button", { key: '094cdacb592825374ad33dd80a05091747bfec4b', text: this.submitButtonText, variant: "primary", type: "submit", clickHandler: (e) => this.tokenizePaymentMethod(e), isLoading: this.isLoading, "data-testid": "submit-button", hidden: this.computedHideSubmitButton })))))));
266
+ return (h(StyledHost, { key: 'd065263c69beef410298f14a3c8e595460149267' }, h("form", { key: 'cbf67700b366e26eb9a6aa1fe07afd3f7baf5c52' }, h("fieldset", { key: '3fd1ccefca659985eb2b90c1080c71c0f2ffe99a' }, h("div", { key: '7181cff13f4cc7aa6c00f4023757bac96625e87b', class: "row gy-3" }, h("div", { key: 'c04c382e858eab02206902d23e3921d15d2bfebc', class: "col-12" }, this.availablePaymentMethods.map((method) => this.renderPaymentMethodOption(method))), h("div", { key: '9faa4417ba3e5dba526103f8d92fd5a88ce2df7d', class: "col-12" }, h("internal-button", { key: 'e4fc2482631553212e5cf62b07f2f44f32239b75', text: this.submitButtonText, variant: "primary", type: "submit", clickHandler: (e) => this.tokenizePaymentMethod(e), isLoading: this.isLoading, "data-testid": "submit-button", hidden: this.computedHideSubmitButton })))))));
266
267
  }
267
268
  static get is() { return "justifi-tokenize-payment-method"; }
268
269
  static get encapsulation() { return "shadow"; }
@@ -420,6 +421,25 @@ export class JustifiTokenizePaymentMethod {
420
421
  "reflect": false,
421
422
  "attribute": "payment-method-group-id"
422
423
  },
424
+ "showAccountNumberConfirmation": {
425
+ "type": "boolean",
426
+ "mutable": false,
427
+ "complexType": {
428
+ "original": "boolean",
429
+ "resolved": "boolean",
430
+ "references": {}
431
+ },
432
+ "required": false,
433
+ "optional": true,
434
+ "docs": {
435
+ "tags": [],
436
+ "text": "Renders a \"Confirm Account Number\" field in the bank account form."
437
+ },
438
+ "getter": false,
439
+ "setter": false,
440
+ "reflect": false,
441
+ "attribute": "show-account-number-confirmation"
442
+ },
423
443
  "submitButtonText": {
424
444
  "type": "string",
425
445
  "mutable": false,
@@ -458,6 +478,25 @@ export class JustifiTokenizePaymentMethod {
458
478
  "setter": false,
459
479
  "reflect": false,
460
480
  "attribute": "save-payment-method-label"
481
+ },
482
+ "maskCardNumber": {
483
+ "type": "boolean",
484
+ "mutable": false,
485
+ "complexType": {
486
+ "original": "boolean",
487
+ "resolved": "boolean",
488
+ "references": {}
489
+ },
490
+ "required": false,
491
+ "optional": true,
492
+ "docs": {
493
+ "tags": [],
494
+ "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."
495
+ },
496
+ "getter": false,
497
+ "setter": false,
498
+ "reflect": false,
499
+ "attribute": "mask-card-number"
461
500
  }
462
501
  };
463
502
  }
@@ -26,6 +26,7 @@ const initialState = {
26
26
  disableBankAccount: false,
27
27
  disableCreditCard: false,
28
28
  disablePaymentMethodGroup: false,
29
+ maskCardNumber: false,
29
30
  paymentAmount: 0,
30
31
  paymentCurrency: 'USD',
31
32
  paymentDescription: '',
@@ -108,7 +108,7 @@ export class CustomPopper {
108
108
  this.hideEvent.emit();
109
109
  }
110
110
  render() {
111
- return (h("div", { key: '673bffd40c2c3ca346f45a3eb6cf0eacb1bc0420' }, h("style", { key: '1a22ba743c813e67a72db15bbb8847c5e5f5407f' }, `
111
+ return (h("div", { key: '1af0c9c11ffd5c3d0b7a1505e1730e68a8a52c88' }, h("style", { key: '6d16cbe171506d3ed398bbf051da1e1023648f7f' }, `
112
112
  .popper-content {
113
113
  display: none;
114
114
  }
@@ -116,7 +116,7 @@ export class CustomPopper {
116
116
  display: block;
117
117
  z-index: 1030;
118
118
  }
119
- `), h("div", { key: '0626834e4395eb59afda87b93653f47e9641b79a', class: "popper-content", ref: (el) => this.popperContentRef = el }, h("slot", { key: '26895f103accf6acce333928c2100c55dcdd1f5d' }))));
119
+ `), h("div", { key: 'fb4e6914fe3ef58e986baa320887b2b5c77b1e6b', class: "popper-content", ref: (el) => this.popperContentRef = el }, h("slot", { key: 'a4e4db117f4cae28e84e7b9cd7f810a8d27e50ad' }))));
120
120
  }
121
121
  static get is() { return "custom-popper"; }
122
122
  static get properties() {
@@ -34,10 +34,10 @@ export class FormControlCheckbox {
34
34
  return inputCheckbox;
35
35
  }
36
36
  render() {
37
- return (h(Host, { key: '9ea01cd4924c033667f62b7aa40d58b5faccc031' }, h("div", { key: '88d3b33c11dbbe42e0fb297897488b0ba556d651', class: 'form-group d-flex flex-column' }, h("div", { key: '90207e47e5894596fce269e55ba2c6e9d0e01956', class: "form-check" }, h("input", { key: 'ab0d509ef0767fe895ee97d307e9b7c1ae4ee74c', ref: el => (this.checkboxElement = el), type: "checkbox", id: this.name, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
37
+ return (h(Host, { key: 'b4a318391a00778af627a0385a93d7ef60c4bccf' }, h("div", { key: '51cc39ecf64ee93f675debb15f41826cb8313f55', class: 'form-group d-flex flex-column' }, h("div", { key: '6f94ae2471682353da92935d54ecfc6586c23043', class: "form-check" }, h("input", { key: '0765ddf0ca90961699fb4193bc69f4d993a86605', ref: el => (this.checkboxElement = el), type: "checkbox", id: this.name, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
38
38
  this.isFocused = false;
39
39
  this.formControlBlur.emit();
40
- }, onInput: this.handleFormControlInput, part: this.part, class: this.errorText ? 'form-check-input is-invalid' : 'form-check-input', disabled: this.disabled, checked: this.checked }), h("label", { key: '3b073d6d6c8be7ed363d2fe58a23938151a38470', class: "form-check-label", htmlFor: this.name, part: label }, this.label)), h(FormControlHelpText, { key: '5e0718d4617805c9dcf80e3152df0064cf479f8b', helpText: this.helpText, name: this.name }), h(FormControlErrorText, { key: '03480fb80e0f07d6264913f495c7cfc1a137b621', errorText: this.errorText, name: this.name }))));
40
+ }, onInput: this.handleFormControlInput, part: this.part, class: this.errorText ? 'form-check-input is-invalid' : 'form-check-input', disabled: this.disabled, checked: this.checked }), h("label", { key: '1393b351ea9d57d215f57c6dab211db04456563c', class: "form-check-label", htmlFor: this.name, part: label }, this.label)), h(FormControlHelpText, { key: 'e6cf1f28d5319dddce29f2e8e16d5124696f7f2d', helpText: this.helpText, name: this.name }), h(FormControlErrorText, { key: '073b4f85a30dad86a1d71acc4f81f8be83d915d9', errorText: this.errorText, name: this.name }))));
41
41
  }
42
42
  static get is() { return "form-control-checkbox"; }
43
43
  static get properties() {
@@ -42,10 +42,10 @@ export class FormControlDate {
42
42
  return part;
43
43
  }
44
44
  render() {
45
- return (h(Host, { key: 'f13cdd01d9c9c182cac6775b8c425c6b8c6a28a4' }, h("div", { key: '7c384c55489845aaa4c43f15b9a8a1cba78336f0', class: "form-group d-flex flex-column" }, h("div", { key: '49537b1c0411dc5af79c8029e31f7ee81c024b3b', class: "d-flex gap-2" }, h("label", { key: 'a628a20b2a2ad6c0793e8dbdcc1b4d7cd2903426', part: label, class: "form-label", htmlFor: this.name }, this.label), h("form-control-tooltip", { key: 'e093066be7c17c3cc0d36a552f2c96b878b84add', helpText: this.helpText })), h("input", { key: 'f2f1e4cd80dd57391fb661199473a30c2f564e84', type: this.showTime ? 'datetime-local' : 'date', ref: el => (this.dateInput = el), id: this.name, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
45
+ return (h(Host, { key: '94251f3df294348460dafe736036018fda20cfb7' }, h("div", { key: '16f9e5a436bd58f5e1baf42cc5b6e5f47082cbef', class: "form-group d-flex flex-column" }, h("div", { key: 'f4f00eacfe91e033121f3e4e01b3d664dce14319', class: "d-flex gap-2" }, h("label", { key: '085aa90a2eb929073227ed1dd8a12541b3d3ab8d', part: label, class: "form-label", htmlFor: this.name }, this.label), h("form-control-tooltip", { key: '87c826650b1e5f82db9110464c7e7f9c16cd6353', helpText: this.helpText })), h("input", { key: '824e104137bcb77a87e9691c0ae19b57b2812a85', type: this.showTime ? 'datetime-local' : 'date', ref: el => (this.dateInput = el), id: this.name, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
46
46
  this.isFocused = false;
47
47
  this.formControlBlur.emit();
48
- }, onInput: this.handleFormControlInput, part: this.part, class: this.errorText ? 'form-control is-invalid' : 'form-control', disabled: this.disabled, max: this.maxDate }), h(FormControlErrorText, { key: 'ce8212d07db5141ffdef577153a945f11f7ab368', errorText: this.errorText, name: this.name }))));
48
+ }, onInput: this.handleFormControlInput, part: this.part, class: this.errorText ? 'form-control is-invalid' : 'form-control', disabled: this.disabled, max: this.maxDate }), h(FormControlErrorText, { key: '20566bdcd0149a9e464d547596b617ef9c95df27', errorText: this.errorText, name: this.name }))));
49
49
  }
50
50
  static get is() { return "form-control-date"; }
51
51
  static get properties() {
@@ -7,7 +7,7 @@ export class FormControlFileV2 {
7
7
  this.disabled = false;
8
8
  }
9
9
  render() {
10
- return (h(Host, { key: '8f1a2e7469bf052321e464d3d7d4434a8e1b94eb', exportparts: "label,input,input-invalid" }, h("div", { key: 'a930b47727ba05e965ec5df7b042d2416d38db2c', class: "form-group d-flex flex-column" }, h("div", { key: 'e1040ac692c0f597c0461bcaa27f562c69056c30', class: "d-flex align-items-start gap-2" }, h("label", { key: '387e3d18da10274de2cf9ef680d9483d7855e77e', part: "label", class: "form-label", htmlFor: this.name }, this.label), h("form-control-tooltip", { key: '4bc4aab440ec7cca2eb6af7105d2d9078922376a', helpText: this.helpText })), h("input", { key: '4050a93b51b5b1ecadfe9cff53c5794321c77d13', type: "file", name: this.name, part: `input ${this.errorText ? "input-invalid " : ""}${this.disabled ? "input-disabled" : ""}`, class: this.errorText ? "form-control is-invalid" : "form-control", multiple: this.multiple, disabled: this.disabled, onBlur: () => this.formControlBlur.emit(), onChange: () => this.errorText = "" }), h(FormControlErrorText, { key: 'aee21aa5cd54e48f2e7eca3763a07051dd942653', errorText: this.errorText, name: this.name }))));
10
+ return (h(Host, { key: 'da210da60328a5f8ee71a88b5fa8d4d67220239b', exportparts: "label,input,input-invalid" }, h("div", { key: 'f77db6dd47f4d9d64beace790a6d4fcd937c381c', class: "form-group d-flex flex-column" }, h("div", { key: 'ce25b3f690fed13cefa402d07f0afffc7c168f46', class: "d-flex align-items-start gap-2" }, h("label", { key: '82d2d2cebee0b98849c90ab90a67cb56be8c239e', part: "label", class: "form-label", htmlFor: this.name }, this.label), h("form-control-tooltip", { key: '2593993d8ed2824c8ceaf0c7c9da194361edac25', helpText: this.helpText })), h("input", { key: '04d5a84a8c1a92b20ef26f47463b3a836027c8cb', type: "file", name: this.name, part: `input ${this.errorText ? "input-invalid " : ""}${this.disabled ? "input-disabled" : ""}`, class: this.errorText ? "form-control is-invalid" : "form-control", multiple: this.multiple, disabled: this.disabled, onBlur: () => this.formControlBlur.emit(), onChange: () => this.errorText = "" }), h(FormControlErrorText, { key: 'ccb9cc9b8e138f3f9e1ed96fe660f3d784de004f', errorText: this.errorText, name: this.name }))));
11
11
  }
12
12
  static get is() { return "form-control-file-v2"; }
13
13
  static get properties() {
@@ -40,10 +40,10 @@ export class FormControlFile {
40
40
  return part;
41
41
  }
42
42
  render() {
43
- return (h(Host, { key: '9ea17017850bd5e83a213b5247af2fe64f11db6c' }, h("div", { key: '6cb7715a542d193a1ef1579dad6889fb0191e195', class: "form-group d-flex flex-column" }, h("div", { key: 'c643268b004611f98b4d24c341a46d0bce9a8944', class: "d-flex align-items-start gap-2" }, h("label", { key: '3541f24060c2279f0cfb604f7bdec355462196a8', part: label, class: "form-label", htmlFor: this.name }, this.label), h("form-control-tooltip", { key: '66f62e7d0ab51765fefc92d8674402a439671792', helpText: this.helpText })), h("input", { key: '564819ed2423c923f16329dc4ccb7a96f50e7ddd', ref: (el) => this.fileInput = el, type: "file", name: this.name, part: this.part, class: this.errorText ? "form-control is-invalid" : "form-control", multiple: this.multiple, disabled: this.disabled, onChange: this.changeHandler, onInput: this.handleFormControlInput, onFocus: () => this.isFocused = true, onBlur: () => {
43
+ return (h(Host, { key: 'fd3e5af54ba42014196b5cd26e4fb91ae7b04e68' }, h("div", { key: 'a982526be770395d5863d55612f8b7667a134526', class: "form-group d-flex flex-column" }, h("div", { key: 'bc99a3c94724653ff964ba327a165d4ab4314df0', class: "d-flex align-items-start gap-2" }, h("label", { key: '5273169e3315ca56cbea084cdb1609bb2ecaf574', part: label, class: "form-label", htmlFor: this.name }, this.label), h("form-control-tooltip", { key: '289c5af9aedae97a62e1b406f8c955f95b29ae55', helpText: this.helpText })), h("input", { key: '98dab3b8bb3afbd9f15ddcfc3e5e2bb73df7d857', ref: (el) => this.fileInput = el, type: "file", name: this.name, part: this.part, class: this.errorText ? "form-control is-invalid" : "form-control", multiple: this.multiple, disabled: this.disabled, onChange: this.changeHandler, onInput: this.handleFormControlInput, onFocus: () => this.isFocused = true, onBlur: () => {
44
44
  this.isFocused = false;
45
45
  this.formControlBlur.emit();
46
- } }), h(FormControlErrorText, { key: '2bbc1831fa7aaf773c24860ac47a8318b2eef93d', errorText: this.errorText, name: this.name }))));
46
+ } }), h(FormControlErrorText, { key: '9c78c3dd8138e90f0de3d806c61e02c85f918817', errorText: this.errorText, name: this.name }))));
47
47
  }
48
48
  static get is() { return "form-control-file"; }
49
49
  static get properties() {
@@ -42,10 +42,10 @@ export class FormControlMonetary {
42
42
  return input;
43
43
  }
44
44
  render() {
45
- return (h(Host, { key: '0e155ea412884f0d45702620cf31aa3910940e88' }, h("div", { key: 'bdf371cf77ec32483c8f984fdc68133ae05be865', class: "form-group d-flex flex-column" }, h("label", { key: 'b8b30aa3bb6ebc5e423593737fd646090a584272', part: label, class: "form-label", htmlFor: this.name }, this.label), h(FormControlHelpText, { key: '6ba6701d1b54eb1b7e4e9de2f6386346b055d516', name: this.name, helpText: this.helpText }), h("div", { key: 'cf6893c681afe85d9e435a9e8920683dd9864c14', class: "input-group" }, h("span", { key: 'de56ce422d29f38028dcbefd8f35be3210223f67', class: "input-group-text", part: inputAdornment }, "$"), h("input", { key: '234592cf95dc5e613fee8da90a5a4e40389b5bc4', ref: el => this.formControl = el, id: this.name, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
45
+ return (h(Host, { key: 'c93f2282272f252f5ebc3beaa2a9c8b5354d3e27' }, h("div", { key: '7ae866ddbd1f59c41aa65e1403fc4bc50e339cad', class: "form-group d-flex flex-column" }, h("label", { key: '1490d1484abf2bde39b66be0decf40cb631ec74f', part: label, class: "form-label", htmlFor: this.name }, this.label), h(FormControlHelpText, { key: '22134cce2d545a2890b1b8a3c7f65ed6d16dc56d', name: this.name, helpText: this.helpText }), h("div", { key: 'd1630cf3ed7523af0c5138d3aa515d005f7d960e', class: "input-group" }, h("span", { key: '6513844b4374ed9cac1b8e23036086bc002ea8f0', class: "input-group-text", part: inputAdornment }, "$"), h("input", { key: 'a59d39b8d81bef0178556d4fa0094dba0c40fd6e', ref: el => this.formControl = el, id: this.name, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
46
46
  this.isFocused = false;
47
47
  this.formControlBlur.emit();
48
- }, onInput: (event) => this.updateInput(event.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 })), h(FormControlErrorText, { key: '2e66376501c5a7718f41c2714a66acf74bb6cde4', errorText: this.errorText, name: this.name }))));
48
+ }, onInput: (event) => this.updateInput(event.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 })), h(FormControlErrorText, { key: '777cdcb4a8872899dfea021185b83ad0f73bf153', errorText: this.errorText, name: this.name }))));
49
49
  }
50
50
  static get is() { return "form-control-monetary"; }
51
51
  static get properties() {
@@ -63,10 +63,10 @@ export class FormControlNumberMasked {
63
63
  return input;
64
64
  }
65
65
  render() {
66
- return (h(Host, { key: '63f9e8fbdf09ad22d7744b074d1646e6ea620b61' }, h("div", { key: 'a9fb05c711ebd9de3d3022a2ec17a9c666e7e2aa', class: "form-group d-flex flex-column" }, h("div", { key: 'e726ecfce3bd700fab74b6b3f81bdcba0d43428f', class: "d-flex align-items-start gap-2" }, h("label", { key: '7940a4f3d8b3c894d0ee54871935e9989899c894', part: label, class: "form-label", htmlFor: this.name }, this.label), h("form-control-tooltip", { key: '5c1782d425686b096e0b91c411e7543b794b969f', helpText: this.helpText })), h("input", { key: '3b8533a7cd4e0fe1907c6d5e01008063cf70d120', ref: el => (this.textInput = el), id: this.name, name: this.name, onFocus: () => (this.isFocused = true), onBlur: () => {
66
+ return (h(Host, { key: '9d164bbf77f8a5227128ab5c606d6f9eb8b5e260' }, h("div", { key: '780108deefb44f3bec06093bcbf830ba0f0d32d5', class: "form-group d-flex flex-column" }, h("div", { key: '8d1d98b481f68227d0843842fbdb0b768c2325fc', class: "d-flex align-items-start gap-2" }, h("label", { key: 'fe3fa6fbc9ddc286ddc60041d90b412b548dcdbc', part: label, class: "form-label", htmlFor: this.name }, this.label), h("form-control-tooltip", { key: '3c93c47f498e8f15f7fddd8f284e0b577bf8f35c', helpText: this.helpText })), h("input", { key: 'c5c1f8d85996ea3c45d8312fdc27e22e02ab2e8d', ref: el => (this.textInput = el), id: this.name, name: this.name, onFocus: () => (this.isFocused = true), onBlur: () => {
67
67
  this.isFocused = false;
68
68
  this.formControlBlur.emit();
69
- }, onInput: this.handleFormControlInput, part: this.part, class: this.errorText ? 'form-control is-invalid' : 'form-control', type: "text", disabled: this.disabled }), h(FormControlErrorText, { key: '085b4f0ee135c12c6ea9293593e4c722091f895e', errorText: this.errorText, name: this.name }))));
69
+ }, onInput: this.handleFormControlInput, part: this.part, class: this.errorText ? 'form-control is-invalid' : 'form-control', type: "text", disabled: this.disabled }), h(FormControlErrorText, { key: 'dac687b433cdd1f480ae8f67cbdd762eda83492a', errorText: this.errorText, name: this.name }))));
70
70
  }
71
71
  static get is() { return "form-control-number-masked"; }
72
72
  static get properties() {
@@ -37,10 +37,10 @@ export class FormControlNumber {
37
37
  return input;
38
38
  }
39
39
  render() {
40
- return (h(Host, { key: 'e21694c1c7611df6ede999aa75fece02977f66f3' }, h("div", { key: '8ea4a38832865e82ffeebcceaabc704d10403966', class: 'form-group d-flex flex-column' }, h("label", { key: '396ab2f79a7168080538ae46da735506b0797311', part: label, class: "form-label", htmlFor: this.name }, this.label), h("input", { key: '715cb6bfbf439fdd4f659e6d21091b047cbca94d', id: this.name, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
40
+ return (h(Host, { key: '9081f9d76b976b6362c1523e1de634b26b296c23' }, h("div", { key: '45c974d7715ed72a4a87f9f22ed83e2d817f2f06', class: 'form-group d-flex flex-column' }, h("label", { key: '4d106b3a4216f8972578a824ef325c7ca61cd95f', part: label, class: "form-label", htmlFor: this.name }, this.label), h("input", { key: 'daa202084755debd61a2472ca43c1af5f7d01be6', id: this.name, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
41
41
  this.isFocused = false;
42
42
  this.formControlBlur.emit();
43
- }, onInput: this.handleFormControlInput, part: this.part, class: this.errorText ? 'form-control is-invalid' : 'form-control', type: "number", disabled: this.disabled }), h(FormControlHelpText, { key: 'f8695d85c9b447644b5bdf02d4df9e1c1e3e5da7', helpText: this.helpText, name: this.name }), h(FormControlErrorText, { key: 'e736f720d89f5d5aeee6982cb15ea11f63c5dd93', errorText: this.errorText, name: this.name }))));
43
+ }, onInput: this.handleFormControlInput, part: this.part, class: this.errorText ? 'form-control is-invalid' : 'form-control', type: "number", disabled: this.disabled }), h(FormControlHelpText, { key: 'b3f6136f2922dd6774fe39c8d60d44c3ba73acbc', helpText: this.helpText, name: this.name }), h(FormControlErrorText, { key: 'fc3e430004b05c8e57f211de263a9ebbb067f076', errorText: this.errorText, name: this.name }))));
44
44
  }
45
45
  static get is() { return "form-control-number"; }
46
46
  static get properties() {
@@ -29,10 +29,10 @@ export class FormControlRadio {
29
29
  return inputRadio;
30
30
  }
31
31
  render() {
32
- return (h(Host, { key: 'ffbfee5a2bffb9dc2d6c2489faa9daa60a36604e', class: 'form-group d-flex flex-column' }, h("div", { key: '93e4d129fd0a67d6b6f021b2af4e816683f8b926', class: "form-check" }, h("input", { key: 'e100d93d9750db95262e63aaaf75ff413dbc0928', ref: el => (this.radioElement = el), type: "radio", id: `${this.name}-${this.value}`, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
32
+ return (h(Host, { key: 'f5746b8ab344d7d859495c3889c08166fc2eb6f9', class: 'form-group d-flex flex-column' }, h("div", { key: '65387cf2b9d2881115b3c6bc2751443b12a04631', class: "form-check" }, h("input", { key: 'b645faa1c0d03716f9b77467376a2b45d4bd50f1', ref: el => (this.radioElement = el), type: "radio", id: `${this.name}-${this.value}`, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
33
33
  this.isFocused = false;
34
34
  this.formControlBlur.emit();
35
- }, onChange: this.handleFormControlInput, part: this.part, class: this.errorText ? 'form-check-input is-invalid' : 'form-check-input', disabled: this.disabled, value: this.value, checked: this.checked }), h("label", { key: '14a8bb0f48683405413245f572d3186d8948de41', class: "form-check-label", htmlFor: `${this.name}-${this.value}`, part: label }, this.label)), h("form-control-help-text", { key: 'ca497838c5f52e0c9a528c9503b2e17785239d23', helpText: this.helpText, name: this.name }), h("form-control-error-text", { key: '6f1f5d3ac8e1fe55d9c676f5e5f96633de777d01', errorText: this.errorText, name: this.name })));
35
+ }, onChange: this.handleFormControlInput, part: this.part, class: this.errorText ? 'form-check-input is-invalid' : 'form-check-input', disabled: this.disabled, value: this.value, checked: this.checked }), h("label", { key: '131481024b5a7b720f8af4f3884a3fb9b7ced09a', class: "form-check-label", htmlFor: `${this.name}-${this.value}`, part: label }, this.label)), h("form-control-help-text", { key: '1ebbffbbc0b596aa74c603a739208792f25f4b35', helpText: this.helpText, name: this.name }), h("form-control-error-text", { key: '006b4e0446be98b63aaed435bc26fea81d377f26', errorText: this.errorText, name: this.name })));
36
36
  }
37
37
  static get is() { return "form-control-radio"; }
38
38
  static get properties() {
@@ -35,10 +35,10 @@ export class FormControlSelect {
35
35
  }
36
36
  render() {
37
37
  var _a;
38
- return (h(Host, { key: '1bf4b5a98883ea56ee00cc10c8e665c5816322f9' }, h("div", { key: '9c36f16f9fad894ffe4ae9e665fae50839fbac58', class: "form-group d-flex flex-column" }, h("div", { key: 'f81841ffb7bf19c6460a087cec95617aa3a983a2', class: "d-flex align-items-start gap-2" }, h("label", { key: 'd17ae46135877411c2aa15b5a2390c31ca791955', part: label, class: "form-label", htmlFor: this.name }, this.label), h("form-control-tooltip", { key: '2e0c07c7f0421547271c18fa1919e97b1735a6ba', helpText: this.helpText })), h("select", { key: '5c68fb7f1ae8c55b3c52730286f2b33391b619cc', ref: el => (this.selectElement = el), id: this.name, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
38
+ return (h(Host, { key: '7ae757edb683563ddbd741dc2b47ca8f60036739' }, h("div", { key: 'eddf24df01b1e4c77a79190900368804427142c6', class: "form-group d-flex flex-column" }, h("div", { key: '5b28bcdecb5e2f5ebe8bed6450634bc62587ec09', class: "d-flex align-items-start gap-2" }, h("label", { key: 'bb6d3a3cede9e07f05ee3fbfaff4b64ff4ecce36', part: label, class: "form-label", htmlFor: this.name }, this.label), h("form-control-tooltip", { key: 'cb1ff06b81428b8bc9801d8b11f76dc0b6103460', helpText: this.helpText })), h("select", { key: '68c958cd97b38b3a5cf505ee79fff79b5c99b671', ref: el => (this.selectElement = el), id: this.name, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
39
39
  this.isFocused = false;
40
40
  this.formControlBlur.emit();
41
- }, onInput: this.handleFormControlInput, part: this.part, class: this.errorText ? 'form-select is-invalid' : 'form-select', disabled: this.disabled }, (_a = this.options) === null || _a === void 0 ? void 0 : _a.map(option => (h("option", { value: option.value }, option.label)))), h(FormControlErrorText, { key: '43c4397970628eabb1554d9352808566aa219a7a', errorText: this.errorText, name: this.name }))));
41
+ }, onInput: this.handleFormControlInput, part: this.part, class: this.errorText ? 'form-select is-invalid' : 'form-select', disabled: this.disabled }, (_a = this.options) === null || _a === void 0 ? void 0 : _a.map(option => (h("option", { value: option.value }, option.label)))), h(FormControlErrorText, { key: '37efe1a0cefba96986546f3efe338855ad7e1142', errorText: this.errorText, name: this.name }))));
42
42
  }
43
43
  static get is() { return "form-control-select"; }
44
44
  static get properties() {
@@ -5,10 +5,26 @@ export class FormControlText {
5
5
  constructor() {
6
6
  this.isFocused = false;
7
7
  this.handleFormControlInput = (event) => {
8
+ var _a, _b;
8
9
  const target = event.target;
9
10
  const name = target.getAttribute('name');
10
- this.inputHandler(name, target.value);
11
- this.formControlInput.emit({ name, value: target.value });
11
+ const raw = target.value;
12
+ const value = this.transformValue ? this.transformValue(raw) : raw;
13
+ if (value !== raw) {
14
+ // Writing back to the input drops the caret at the end, which is wrong
15
+ // mid-string — and with a transform that uppercases, that would happen on
16
+ // every lowercase keystroke. Shift the caret by whatever the transform added.
17
+ const caret = (_a = target.selectionStart) !== null && _a !== void 0 ? _a : raw.length;
18
+ const atEnd = caret >= raw.length;
19
+ target.value = value;
20
+ const next = atEnd
21
+ ? value.length
22
+ : Math.max(0, Math.min(caret + (value.length - raw.length), value.length));
23
+ // Stencil's mock DOM does not implement setSelectionRange.
24
+ (_b = target.setSelectionRange) === null || _b === void 0 ? void 0 : _b.call(target, next, next);
25
+ }
26
+ this.inputHandler(name, value);
27
+ this.formControlInput.emit({ name, value });
12
28
  };
13
29
  this.updateInput = (newValue) => {
14
30
  const inputElement = this.el.querySelector('input');
@@ -36,10 +52,10 @@ export class FormControlText {
36
52
  return input;
37
53
  }
38
54
  render() {
39
- return (h(Host, { key: '0a275b26c5e6604a478bd4618f8955264205b4f8' }, h("div", { key: 'c495cf0113cfd1ddd6a4d586dfb96d67ec7e92f1', class: "form-group d-flex flex-column" }, h("div", { key: '6a97e6086faaf4b43c41da9615568f359760343c', class: "d-flex align-items-start gap-2" }, h("label", { key: '39c1d7b7d281874a81125374e7a351783de14207', part: label, class: "form-label", htmlFor: this.name }, this.label), h("form-control-tooltip", { key: '646caf4cd154574488610f47a593a8fbfff0778f', helpText: this.helpText })), h("input", { key: '540637afeb21d3da93c304710568a0ed8ad99dc4', id: this.name, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
55
+ return (h(Host, { key: '4808c4fb58073827260e3b9cacb29bf255dc1be0' }, h("div", { key: '2b98cc1e67fefbc4c7209138399a8878db18415a', class: "form-group d-flex flex-column" }, h("div", { key: 'a2ee4c060e34cb7631b6d0a910c8e924a671ec7c', class: "d-flex align-items-start gap-2" }, h("label", { key: 'e30e5db079b64f78f34024bf57894875148a7da4', part: label, class: "form-label", htmlFor: this.name }, this.label), h("form-control-tooltip", { key: '2eb82b47a70fd2acc2ca6c41485a0d4ede0cfa3a', helpText: this.helpText })), h("input", { key: '518f7b015ce95d515733e51a4bcf55a5326ac02e', id: this.name, name: this.name, onFocus: () => this.isFocused = true, onBlur: () => {
40
56
  this.isFocused = false;
41
57
  this.formControlBlur.emit();
42
- }, onInput: this.handleFormControlInput, onKeyDown: this.keyDownHandler, onPaste: this.keyDownHandler, maxLength: this.maxLength, part: this.part, class: this.errorText ? "form-control is-invalid" : "form-control", type: "text", disabled: this.disabled }), h(FormControlErrorText, { key: '1a8246dbf9908c7e56ae2cc0cbea65934c3a33ce', errorText: this.errorText, name: this.name }))));
58
+ }, onInput: this.handleFormControlInput, onKeyDown: this.keyDownHandler, onPaste: this.keyDownHandler, maxLength: this.maxLength, part: this.part, class: this.errorText ? "form-control is-invalid" : "form-control", type: "text", disabled: this.disabled }), h(FormControlErrorText, { key: 'fc648459c0d9ef21fdf861286e940d6bb8ac2004', errorText: this.errorText, name: this.name }))));
43
59
  }
44
60
  static get is() { return "form-control-text"; }
45
61
  static get properties() {
@@ -192,6 +208,23 @@ export class FormControlText {
192
208
  "getter": false,
193
209
  "setter": false
194
210
  },
211
+ "transformValue": {
212
+ "type": "unknown",
213
+ "mutable": false,
214
+ "complexType": {
215
+ "original": "(value: string) => string",
216
+ "resolved": "(value: string) => string",
217
+ "references": {}
218
+ },
219
+ "required": false,
220
+ "optional": true,
221
+ "docs": {
222
+ "tags": [],
223
+ "text": ""
224
+ },
225
+ "getter": false,
226
+ "setter": false
227
+ },
195
228
  "disabled": {
196
229
  "type": "boolean",
197
230
  "mutable": false,
@@ -10,11 +10,24 @@ export class IframeInput {
10
10
  constructor() {
11
11
  this.isFocused = false;
12
12
  this.isValid = true;
13
+ /**
14
+ * Opt this field into masking its value to the last four characters when it
15
+ * loses focus. Forwarded to the hosted field, which owns the behavior.
16
+ */
17
+ this.maskCardNumber = false;
18
+ this.hasLoaded = false;
13
19
  this.dispatchMessageEvent = (event) => {
14
20
  const { eventType, data } = event.data;
15
21
  if ((data === null || data === void 0 ? void 0 : data.id) !== this.inputId) {
16
22
  return;
17
23
  }
24
+ if (eventType === 'loaded') {
25
+ this.hasLoaded = true;
26
+ // Re-sent on every load, not just the first: componentDidRender swaps
27
+ // the iframe src once the style store fills, so the frame can reload
28
+ // and would otherwise come back without the flag.
29
+ this.sendMaskCardNumber();
30
+ }
18
31
  if (eventType === 'focused') {
19
32
  this.isFocused = true;
20
33
  }
@@ -23,8 +36,91 @@ export class IframeInput {
23
36
  }
24
37
  };
25
38
  }
39
+ maskCardNumberChanged() {
40
+ if (this.hasLoaded)
41
+ this.sendMaskCardNumber();
42
+ }
43
+ /**
44
+ * The <iframe> is created in the LIGHT DOM and slotted in: an iframe inside a
45
+ * shadow tree is invisible to `window.frames` (spec), so siblings could not
46
+ * resolve it. The ::part wrappers stay in the shadow tree — theming untouched.
47
+ */
48
+ componentDidLoad() {
49
+ const iframe = document.createElement('iframe');
50
+ iframe.setAttribute('name', this.inputId);
51
+ iframe.setAttribute('width', '100%');
52
+ // Light-DOM element: merchant CSS reaches it, so pin the box inline.
53
+ iframe.style.border = '0';
54
+ iframe.style.display = 'block';
55
+ iframe.style.width = '100%';
56
+ iframe.style.boxSizing = 'border-box';
57
+ iframe.addEventListener('load', () => {
58
+ iFrameResize({
59
+ log: false,
60
+ onResized: () => {
61
+ this.iframeLoaded.emit();
62
+ }
63
+ }, iframe);
64
+ });
65
+ this.iframeElement = iframe;
66
+ this.initializeFrameCommunicationService();
67
+ iframe.setAttribute('src', this.iframeSrc);
68
+ this.mountIframe();
69
+ }
70
+ /**
71
+ * Stencil runs componentDidLoad once per instance; a DOM move (framework
72
+ * reparenting, list reorder) fires disconnected → connected on the same
73
+ * instance, so the iframe has to be put back by hand.
74
+ */
75
+ connectedCallback() {
76
+ var _a;
77
+ if (this.iframeElement && !this.iframeElement.isConnected) {
78
+ (_a = this.frameService) === null || _a === void 0 ? void 0 : _a.addMessageListener(this.dispatchMessageEvent);
79
+ this.mountIframe();
80
+ }
81
+ }
82
+ mountIframe() {
83
+ const root = this.el.getRootNode();
84
+ // Duck-typed: ShadowRoot is not a global in Stencil's mock-doc.
85
+ const host = root.nodeType === 11 && root.host ? root.host : null;
86
+ const iframe = this.iframeElement;
87
+ if (host) {
88
+ if (host.getRootNode() !== document) {
89
+ // A host nested in another shadow tree keeps the iframe out of the
90
+ // document tree; sibling fields fall back to BroadcastChannel.
91
+ console.warn(`[justifi] hosted field "${this.inputId}" is inside a nested shadow tree; window.frames cannot reach it`);
92
+ }
93
+ // Real <slot> element, not JSX: Stencil's slot polyfill for shadow:false
94
+ // components would otherwise replace it with a virtual slot.
95
+ if (!this.wrapperElement.querySelector(`slot[name="${this.inputId}"]`)) {
96
+ const slot = document.createElement('slot');
97
+ slot.name = this.inputId;
98
+ this.wrapperElement.appendChild(slot);
99
+ }
100
+ iframe.setAttribute('slot', this.inputId);
101
+ host.appendChild(iframe);
102
+ }
103
+ else {
104
+ iframe.removeAttribute('slot');
105
+ this.wrapperElement.appendChild(iframe);
106
+ }
107
+ }
108
+ componentDidRender() {
109
+ // iframeSrc depends on the iframeInputStyles store, which is filled after
110
+ // first paint; keep the light-DOM iframe in sync like the old JSX src did.
111
+ if (this.iframeElement && this.iframeElement.getAttribute('src') !== this.renderedSrc) {
112
+ this.iframeElement.setAttribute('src', this.renderedSrc);
113
+ }
114
+ }
26
115
  disconnectedCallback() {
27
- this.frameService.removeMessageListener(this.dispatchMessageEvent);
116
+ var _a, _b, _c, _d, _e;
117
+ // Stencil defers this call; on a DOM move the element is already back in
118
+ // the document (its light-DOM iframe moved with the host), so leave it be.
119
+ if (this.el.isConnected)
120
+ return;
121
+ (_a = this.frameService) === null || _a === void 0 ? void 0 : _a.removeMessageListener(this.dispatchMessageEvent);
122
+ (_d = (_c = (_b = this.iframeElement) === null || _b === void 0 ? void 0 : _b.iFrameResizer) === null || _c === void 0 ? void 0 : _c.removeListeners) === null || _d === void 0 ? void 0 : _d.call(_c);
123
+ (_e = this.iframeElement) === null || _e === void 0 ? void 0 : _e.remove();
28
124
  }
29
125
  async validate() {
30
126
  const response = await this.frameService
@@ -49,6 +145,12 @@ export class IframeInput {
49
145
  this.frameService = new FrameCommunicationService(this.iframeElement, this.iframeOrigin);
50
146
  (_a = this.frameService) === null || _a === void 0 ? void 0 : _a.addMessageListener(this.dispatchMessageEvent);
51
147
  }
148
+ sendMaskCardNumber() {
149
+ var _a;
150
+ (_a = this.frameService) === null || _a === void 0 ? void 0 : _a.postMessage(MessageEventType.setMaskCardNumber, {
151
+ enabled: !!this.maskCardNumber,
152
+ });
153
+ }
52
154
  get part() {
53
155
  if (this.isFocused && !this.isValid) {
54
156
  return inputInvalidAndFocused;
@@ -80,23 +182,17 @@ export class IframeInput {
80
182
  return params;
81
183
  }
82
184
  get iframeSrc() {
83
- return `${this.iframeOrigin}?${this.urlParams}`;
185
+ // iframeOrigin already carries ?tabId=…; a second '?' would fold the
186
+ // style params into the tabId value on the iframe side.
187
+ const separator = this.iframeOrigin.includes('?') ? '&' : '?';
188
+ return `${this.iframeOrigin}${separator}${this.urlParams}`;
84
189
  }
85
190
  render() {
86
- return (h(Host, { key: '7116bdbe3d3a69fac28965fa011d016d35ec5025', class: "form-group d-flex flex-column" }, h("div", { key: 'e784c6f81476eb282a07714d5b789f41342c4a2a', style: {
191
+ this.renderedSrc = this.iframeSrc;
192
+ return (h(Host, { key: '4e4844f10dec9ddcb6f3f4ccaa5ffe7f254f1a33', class: "form-group d-flex flex-column" }, h("div", { key: '65cf8392e8e5925560a2bfa80fb15209ec14e267', style: {
87
193
  visibility: this.iframeLoaded ? 'visible' : 'hidden',
88
194
  height: this.iframeLoaded ? 'auto' : '0',
89
- } }, h("label", { key: 'd0b4341c92a4c957ec4a03485357d6cef7f22426', class: "form-label", htmlFor: "", part: label }, this.label || ''), h("div", { key: '9be8449ee6b3d37aa3607ff31d5649c73e3f4206', class: `p-0 d-flex form-control ${this.isValid ? '' : 'is-invalid'}`, part: this.part, style: Object.assign(Object.assign({}, this.style), { overflow: 'hidden' }) }, h("iframe", { key: '093b48e69a6e8a15a4fd9877424bb0c9a3f58ad7', id: this.inputId, name: this.inputId, src: this.iframeSrc, ref: el => {
90
- this.iframeElement = el;
91
- this.initializeFrameCommunicationService();
92
- }, width: "100%", onLoad: () => {
93
- iFrameResize({
94
- log: false,
95
- onResized: () => {
96
- this.iframeLoaded.emit();
97
- }
98
- }, this.iframeElement);
99
- } })), h(FormControlErrorText, { key: 'f5897f95387e6400f35c997b2921a60fb5f4f11b', errorText: this.errorText, name: this.inputId }))));
195
+ } }, h("label", { key: 'c33c671e062b2d91a6c7dcdc938faa973a320ac8', class: "form-label", htmlFor: "", part: label }, this.label || ''), h("div", { key: 'dd294ff2efac3747af3ec6baa73fc74aaad8b46b', ref: el => (this.wrapperElement = el), class: `p-0 d-flex form-control ${this.isValid ? '' : 'is-invalid'}`, part: this.part, style: Object.assign(Object.assign({}, this.style), { overflow: 'hidden' }) }), h(FormControlErrorText, { key: 'a6a65814a1ba0fcb2ec4eff7f6b334a134763a8e', errorText: this.errorText, name: this.inputId }))));
100
196
  }
101
197
  static get is() { return "iframe-input"; }
102
198
  static get properties() {
@@ -157,6 +253,26 @@ export class IframeInput {
157
253
  "setter": false,
158
254
  "reflect": false,
159
255
  "attribute": "iframe-origin"
256
+ },
257
+ "maskCardNumber": {
258
+ "type": "boolean",
259
+ "mutable": false,
260
+ "complexType": {
261
+ "original": "boolean",
262
+ "resolved": "boolean",
263
+ "references": {}
264
+ },
265
+ "required": false,
266
+ "optional": true,
267
+ "docs": {
268
+ "tags": [],
269
+ "text": "Opt this field into masking its value to the last four characters when it\nloses focus. Forwarded to the hosted field, which owns the behavior."
270
+ },
271
+ "getter": false,
272
+ "setter": false,
273
+ "reflect": false,
274
+ "attribute": "mask-card-number",
275
+ "defaultValue": "false"
160
276
  }
161
277
  };
162
278
  }
@@ -258,4 +374,10 @@ export class IframeInput {
258
374
  };
259
375
  }
260
376
  static get elementRef() { return "el"; }
377
+ static get watchers() {
378
+ return [{
379
+ "propName": "maskCardNumber",
380
+ "methodName": "maskCardNumberChanged"
381
+ }];
382
+ }
261
383
  }
@@ -23,3 +23,35 @@ export const numberOnlyHandler = (e) => {
23
23
  e.preventDefault();
24
24
  }
25
25
  };
26
+ // A US ZIP+4 ("44240-5555") carries a hyphen, which numberOnlyHandler blocks,
27
+ // so the postal field gets its own handler: digits plus a single hyphen.
28
+ export const zipCodeOnlyHandler = (e) => {
29
+ var _a, _b, _c;
30
+ const specialKeys = ['Backspace', 'Tab', 'Enter', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Delete'];
31
+ // Handle paste event. `ClipboardEvent` is not a global in the spec
32
+ // environment, so the paste branch is recognized by its payload.
33
+ if ('clipboardData' in e) {
34
+ const clipboardData = (_a = e.clipboardData) === null || _a === void 0 ? void 0 : _a.getData('text');
35
+ if (clipboardData && !/^\d+(-\d+)?$/.test(clipboardData)) {
36
+ e.preventDefault();
37
+ }
38
+ return;
39
+ }
40
+ // Check if the key is a special key
41
+ if (specialKeys.includes(e.key)) {
42
+ return;
43
+ }
44
+ // Allow Ctrl+V / Command+V for pasting
45
+ if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === 'v') {
46
+ return;
47
+ }
48
+ // A single hyphen separates the ZIP from the +4; a second one never does.
49
+ const alreadyHyphenated = !!((_c = (_b = e.target) === null || _b === void 0 ? void 0 : _b.value) === null || _c === void 0 ? void 0 : _c.includes('-'));
50
+ if (e.key === '-' && !alreadyHyphenated) {
51
+ return;
52
+ }
53
+ // Prevent default action if the key is not a digit
54
+ if (!/^\d$/.test(e.key)) {
55
+ e.preventDefault();
56
+ }
57
+ };
@@ -6,7 +6,7 @@ export class InternalButton {
6
6
  this.type = 'button';
7
7
  }
8
8
  render() {
9
- return (h(Button, { key: '4048996761c978279f2aefbb43bbbb249fe445d9', variant: this.variant, isLoading: this.isLoading, clickHandler: this.clickHandler, class: this.class, type: this.type, disabled: this.disabled, style: this.customStyle, hidden: this.hidden }, this.text));
9
+ return (h(Button, { key: '11cadb5b781ec348014026437735c904aa32e254', variant: this.variant, isLoading: this.isLoading, clickHandler: this.clickHandler, class: this.class, type: this.type, disabled: this.disabled, style: this.customStyle, hidden: this.hidden }, this.text));
10
10
  }
11
11
  static get is() { return "internal-button"; }
12
12
  static get properties() {
@@ -9,7 +9,7 @@ export class RadioListItem {
9
9
  };
10
10
  }
11
11
  render() {
12
- return (h(Host, { key: '254375c6a1fd52924a84392bfd36d21ac60e4c0b' }, h("div", { key: 'df0f6abdeb91cbbe3c1b7e91f42cd7950379d8bf', class: `radio-list-item p-3 ${this.class || ''}`, part: radioListItem, onClick: this.handleClick, hidden: this.hidden }, h("form-control-radio", { key: '4c7e8e499b76bc83e83504b0cf22785fe2fdf6ec', name: this.name, value: this.value, checked: this.checked, label: this.label, inputHandler: () => null }))));
12
+ return (h(Host, { key: 'dde5efa79bdc1d9a7367474308d1a5955e134c9b' }, h("div", { key: '0da16408e69f19e68d65031ab0579b3d1c972af8', class: `radio-list-item p-3 ${this.class || ''}`, part: radioListItem, onClick: this.handleClick, hidden: this.hidden }, h("form-control-radio", { key: '56ea84930e14226280818def685cfc8148f31c5a', name: this.name, value: this.value, checked: this.checked, label: this.label, inputHandler: () => null }))));
13
13
  }
14
14
  static get is() { return "radio-list-item"; }
15
15
  static get properties() {