@justifi/webcomponents 4.22.2 → 4.23.0

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 (372) hide show
  1. package/dist/cjs/{Analytics-99a3c7f8.js → Analytics-25d3d168.js} +1 -1
  2. package/dist/cjs/{Payment-04a842f4.js → Payment-87b47c43.js} +7 -1
  3. package/dist/cjs/{SubAccount-cc95a4a0.js → SubAccount-fda5ec5b.js} +3 -0
  4. package/dist/cjs/additional-questions-details_5.cjs.entry.js +1 -1
  5. package/dist/cjs/{business-additional-questions-schema-d82355b0.js → business-additional-questions-schema-0cddd038.js} +2 -2
  6. package/dist/cjs/{business-identity-schema-3d241053.js → business-identity-schema-f5a3b008.js} +1 -1
  7. package/dist/cjs/{check-pkg-version-9bd49ad6.js → check-pkg-version-f5b03b02.js} +1 -1
  8. package/dist/cjs/{checkout.service-160f3a9c.js → checkout.service-aae1996c.js} +2 -2
  9. package/dist/cjs/checkouts-list-core.cjs.entry.js +7 -8
  10. package/dist/cjs/{checkouts-table-24c065ff.js → checkouts-table-00b6482f.js} +7 -7
  11. package/dist/cjs/custom-popper_4.cjs.entry.js +3 -3
  12. package/dist/cjs/form-control-checkbox_9.cjs.entry.js +5 -5
  13. package/dist/cjs/form-control-date.cjs.entry.js +6 -37
  14. package/dist/cjs/form-control-file.cjs.entry.js +1 -1
  15. package/dist/cjs/form-control-monetary.cjs.entry.js +1 -1
  16. package/dist/cjs/form-control-number-masked_2.cjs.entry.js +1 -1
  17. package/dist/cjs/form-control-number.cjs.entry.js +1 -1
  18. package/dist/cjs/form-control-radio.cjs.entry.js +1 -1
  19. package/dist/cjs/form-control-textarea.cjs.entry.js +1 -1
  20. package/dist/cjs/{get-payout-csv-12dc9540.js → get-payout-csv-1eed32ee.js} +17 -8
  21. package/dist/cjs/{get-subaccounts-8f7a930f.js → get-subaccounts-1d2fb201.js} +2 -2
  22. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +1 -1
  23. package/dist/cjs/justifi-additional-questions-form-step_10.cjs.entry.js +3 -3
  24. package/dist/cjs/justifi-additional-statement_11.cjs.entry.js +6 -6
  25. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +2 -2
  26. package/dist/cjs/justifi-billing-form_2.cjs.entry.js +4 -4
  27. package/dist/cjs/justifi-business-details.cjs.entry.js +3 -3
  28. package/dist/cjs/justifi-business-form.cjs.entry.js +8 -8
  29. package/dist/cjs/justifi-card-form.cjs.entry.js +2 -2
  30. package/dist/cjs/justifi-checkout-core.cjs.entry.js +1 -1
  31. package/dist/cjs/justifi-checkout.cjs.entry.js +6 -6
  32. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +10 -10
  33. package/dist/cjs/justifi-dispute-management-core.cjs.entry.js +2 -2
  34. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +3 -3
  35. package/dist/cjs/justifi-new-payment-method_5.cjs.entry.js +2 -2
  36. package/dist/cjs/justifi-owner-form_3.cjs.entry.js +2 -2
  37. package/dist/cjs/justifi-payment-details.cjs.entry.js +6 -6
  38. package/dist/cjs/justifi-payment-form.cjs.entry.js +6 -6
  39. package/dist/cjs/justifi-payment-method-selector.cjs.entry.js +2 -2
  40. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +3 -3
  41. package/dist/cjs/justifi-payments-list.cjs.entry.js +11 -7
  42. package/dist/cjs/justifi-payout-details.cjs.entry.js +6 -6
  43. package/dist/cjs/justifi-payouts-list.cjs.entry.js +42 -20
  44. package/dist/cjs/justifi-refund-form.cjs.entry.js +3 -3
  45. package/dist/cjs/justifi-season-interruption-insurance-core.cjs.entry.js +1 -1
  46. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +5 -5
  47. package/dist/cjs/justifi-terminals-list.cjs.entry.js +9 -9
  48. package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +4 -4
  49. package/dist/cjs/loader.cjs.js +1 -1
  50. package/dist/cjs/{package-e25f61a8.js → package-bc606eae.js} +2 -2
  51. package/dist/cjs/{pagination-menu.cjs.entry.js → pagination-menu_2.cjs.entry.js} +29 -0
  52. package/dist/cjs/payment-details-core.cjs.entry.js +2 -2
  53. package/dist/cjs/{payment.service-83da752a.js → payment.service-86871f43.js} +2 -2
  54. package/dist/cjs/payments-list-core.cjs.entry.js +18 -52
  55. package/dist/cjs/payments-list-filters.cjs.entry.js +6 -1
  56. package/dist/cjs/{payments-status-58e45b2e.js → payments-status-68ac449d.js} +2 -2
  57. package/dist/cjs/payments-table-7087e771.js +31 -0
  58. package/dist/cjs/payout-details-core.cjs.entry.js +2 -2
  59. package/dist/cjs/payouts-list-core.cjs.entry.js +66 -59
  60. package/dist/cjs/payouts-list-filters.cjs.entry.js +24 -0
  61. package/dist/cjs/payouts-table-4858eb84.js +37 -0
  62. package/dist/cjs/{schema-validations-7a9afa7c.js → schema-validations-e8a17401.js} +0 -12
  63. package/dist/cjs/{table-loading-state-8b406852.js → table-ec9ce9f7.js} +21 -0
  64. package/dist/cjs/terminals-list-core.cjs.entry.js +6 -7
  65. package/dist/cjs/terminals-list-filters.cjs.entry.js +1 -1
  66. package/dist/cjs/{terminals-table-99a7b87b.js → terminals-table-12410159.js} +4 -4
  67. package/dist/cjs/{utils-f8a6962c.js → utils-ba79e868.js} +12 -0
  68. package/dist/cjs/{utils-3d84442d.js → utils-e88fbc94.js} +49 -32
  69. package/dist/cjs/webcomponents.cjs.js +1 -1
  70. package/dist/collection/api/Payment.js +7 -1
  71. package/dist/collection/api/Payout.js +4 -0
  72. package/dist/collection/api/services/payout.service.js +15 -6
  73. package/dist/collection/api/services/terminal.service.js +1 -1
  74. package/dist/collection/collection-manifest.json +2 -1
  75. package/dist/collection/components/business-forms/schemas/business-core-info-schema.js +1 -1
  76. package/dist/collection/components/business-forms/schemas/schema-validations.js +1 -10
  77. package/dist/collection/components/checkouts-list/checkouts-list.js +2 -2
  78. package/dist/collection/components/checkouts-list/checkouts-table.js +6 -6
  79. package/dist/collection/components/dispute-management/counter-dispute/counter-dispute.js +4 -4
  80. package/dist/collection/components/dispute-management/dispute-management-core.js +3 -3
  81. package/dist/collection/components/dispute-management/dispute-notification.js +4 -4
  82. package/dist/collection/components/payment-method-form/payment-method-form.js +2 -2
  83. package/dist/collection/components/payments-list/payments-list-core.js +32 -47
  84. package/dist/collection/components/payments-list/payments-list-filters.js +6 -1
  85. package/dist/collection/components/payments-list/payments-list.js +22 -3
  86. package/dist/collection/components/payments-list/payments-status.js +2 -2
  87. package/dist/collection/components/payments-list/payments-table.js +22 -0
  88. package/dist/collection/components/payout-details/payout-details-core.js +1 -1
  89. package/dist/collection/components/payouts-list/get-payouts.js +3 -4
  90. package/dist/collection/components/payouts-list/payouts-list-core.js +102 -51
  91. package/dist/collection/components/payouts-list/payouts-list-filters.js +72 -0
  92. package/dist/collection/components/payouts-list/payouts-list.js +71 -12
  93. package/dist/collection/components/payouts-list/payouts-table.js +26 -0
  94. package/dist/collection/components/refund-form/refund-form.js +1 -1
  95. package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
  96. package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
  97. package/dist/collection/components/terminals-list/terminals-list.js +2 -2
  98. package/dist/collection/components/terminals-list/terminals-table.js +4 -4
  99. package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +1 -1
  100. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  101. package/dist/collection/ui-components/filters/utils.js +11 -0
  102. package/dist/collection/ui-components/form/form-control-checkbox.js +1 -1
  103. package/dist/collection/ui-components/form/form-control-date.js +6 -55
  104. package/dist/collection/ui-components/form/form-control-file.js +1 -1
  105. package/dist/collection/ui-components/form/form-control-monetary.js +1 -1
  106. package/dist/collection/ui-components/form/form-control-number-masked.js +1 -1
  107. package/dist/collection/ui-components/form/form-control-number.js +1 -1
  108. package/dist/collection/ui-components/form/form-control-radio.js +1 -1
  109. package/dist/collection/ui-components/form/form-control-text.js +1 -1
  110. package/dist/collection/ui-components/form/form-control-textarea.js +1 -1
  111. package/dist/collection/utils/table.js +2 -2
  112. package/dist/collection/utils/utils.js +49 -52
  113. package/dist/docs.json +276 -49
  114. package/dist/esm/{Analytics-f4e959b2.js → Analytics-810c3026.js} +1 -1
  115. package/dist/esm/{Payment-30790721.js → Payment-2a868d0c.js} +7 -1
  116. package/dist/esm/{SubAccount-7f7e4c56.js → SubAccount-99a00594.js} +3 -0
  117. package/dist/esm/additional-questions-details_5.entry.js +1 -1
  118. package/dist/esm/{business-additional-questions-schema-a5072d2b.js → business-additional-questions-schema-af4aa8ae.js} +2 -2
  119. package/dist/esm/{business-identity-schema-b31178a1.js → business-identity-schema-1a5cb306.js} +1 -1
  120. package/dist/esm/{check-pkg-version-5e658940.js → check-pkg-version-434f72bf.js} +1 -1
  121. package/dist/esm/{checkout.service-ef1549c6.js → checkout.service-c1e44e0c.js} +2 -2
  122. package/dist/esm/checkouts-list-core.entry.js +6 -7
  123. package/dist/esm/{checkouts-table-62c44909.js → checkouts-table-cd33b57c.js} +7 -7
  124. package/dist/esm/custom-popper_4.entry.js +3 -3
  125. package/dist/esm/form-control-checkbox_9.entry.js +5 -5
  126. package/dist/esm/form-control-date.entry.js +6 -37
  127. package/dist/esm/form-control-file.entry.js +1 -1
  128. package/dist/esm/form-control-monetary.entry.js +1 -1
  129. package/dist/esm/form-control-number-masked_2.entry.js +1 -1
  130. package/dist/esm/form-control-number.entry.js +1 -1
  131. package/dist/esm/form-control-radio.entry.js +1 -1
  132. package/dist/esm/form-control-textarea.entry.js +1 -1
  133. package/dist/esm/{get-payout-csv-70974763.js → get-payout-csv-3b83b088.js} +17 -8
  134. package/dist/esm/{get-subaccounts-16c8ce40.js → get-subaccounts-dd20cfa4.js} +2 -2
  135. package/dist/esm/gross-payment-chart-core.entry.js +1 -1
  136. package/dist/esm/justifi-additional-questions-form-step_10.entry.js +3 -3
  137. package/dist/esm/justifi-additional-statement_11.entry.js +6 -6
  138. package/dist/esm/justifi-bank-account-form.entry.js +2 -2
  139. package/dist/esm/justifi-billing-form_2.entry.js +4 -4
  140. package/dist/esm/justifi-business-details.entry.js +3 -3
  141. package/dist/esm/justifi-business-form.entry.js +8 -8
  142. package/dist/esm/justifi-card-form.entry.js +2 -2
  143. package/dist/esm/justifi-checkout-core.entry.js +1 -1
  144. package/dist/esm/justifi-checkout.entry.js +6 -6
  145. package/dist/esm/justifi-checkouts-list.entry.js +10 -10
  146. package/dist/esm/justifi-dispute-management-core.entry.js +2 -2
  147. package/dist/esm/justifi-gross-payment-chart.entry.js +3 -3
  148. package/dist/esm/justifi-new-payment-method_5.entry.js +2 -2
  149. package/dist/esm/justifi-owner-form_3.entry.js +2 -2
  150. package/dist/esm/justifi-payment-details.entry.js +6 -6
  151. package/dist/esm/justifi-payment-form.entry.js +6 -6
  152. package/dist/esm/justifi-payment-method-selector.entry.js +2 -2
  153. package/dist/esm/justifi-payment-provisioning.entry.js +3 -3
  154. package/dist/esm/justifi-payments-list.entry.js +11 -7
  155. package/dist/esm/justifi-payout-details.entry.js +6 -6
  156. package/dist/esm/justifi-payouts-list.entry.js +42 -20
  157. package/dist/esm/justifi-refund-form.entry.js +3 -3
  158. package/dist/esm/justifi-season-interruption-insurance-core.entry.js +1 -1
  159. package/dist/esm/justifi-season-interruption-insurance.entry.js +5 -5
  160. package/dist/esm/justifi-terminals-list.entry.js +9 -9
  161. package/dist/esm/justifi-tokenize-payment-method.entry.js +4 -4
  162. package/dist/esm/loader.js +1 -1
  163. package/dist/esm/{package-95aca142.js → package-16f4801d.js} +2 -2
  164. package/dist/esm/{pagination-menu.entry.js → pagination-menu_2.entry.js} +29 -1
  165. package/dist/esm/payment-details-core.entry.js +2 -2
  166. package/dist/esm/{payment.service-2f67410b.js → payment.service-ca6b5bc5.js} +2 -2
  167. package/dist/esm/payments-list-core.entry.js +18 -52
  168. package/dist/esm/payments-list-filters.entry.js +6 -1
  169. package/dist/esm/{payments-status-4937a170.js → payments-status-a7c18f2a.js} +2 -2
  170. package/dist/esm/payments-table-bba91324.js +27 -0
  171. package/dist/esm/payout-details-core.entry.js +2 -2
  172. package/dist/esm/payouts-list-core.entry.js +67 -60
  173. package/dist/esm/payouts-list-filters.entry.js +20 -0
  174. package/dist/esm/payouts-table-edff9bbe.js +33 -0
  175. package/dist/esm/{schema-validations-cd8c5f69.js → schema-validations-5dc879a9.js} +0 -12
  176. package/dist/esm/{table-loading-state-356c7215.js → table-44e3d1e7.js} +21 -1
  177. package/dist/esm/terminals-list-core.entry.js +6 -7
  178. package/dist/esm/terminals-list-filters.entry.js +1 -1
  179. package/dist/esm/{terminals-table-059c473e.js → terminals-table-dc787616.js} +4 -4
  180. package/dist/esm/{utils-3daada24.js → utils-1df1e55a.js} +48 -32
  181. package/dist/esm/{utils-3a4d8f3a.js → utils-4006c425.js} +12 -1
  182. package/dist/esm/webcomponents.js +1 -1
  183. package/dist/module/Payment.js +7 -1
  184. package/dist/module/SubAccount.js +3 -0
  185. package/dist/module/billing-form.js +1 -1
  186. package/dist/module/business-bank-account-form-step.js +1 -1
  187. package/dist/module/business-core-info-form-step-core.js +1 -1
  188. package/dist/module/business-core-info-schema.js +1 -1
  189. package/dist/module/business-document-upload-input-group.js +1 -1
  190. package/dist/module/business-documents-on-file.js +1 -1
  191. package/dist/module/checkouts-list-core2.js +9 -9
  192. package/dist/module/counter-dispute.js +3 -3
  193. package/dist/module/custom-popper2.js +2 -2
  194. package/dist/module/dispute-management-core.js +2 -2
  195. package/dist/module/dispute-notification.js +3 -3
  196. package/dist/module/form-control-checkbox2.js +1 -1
  197. package/dist/module/form-control-date2.js +6 -38
  198. package/dist/module/form-control-file2.js +1 -1
  199. package/dist/module/form-control-monetary2.js +1 -1
  200. package/dist/module/form-control-number-masked2.js +1 -1
  201. package/dist/module/form-control-number.js +1 -1
  202. package/dist/module/form-control-radio2.js +1 -1
  203. package/dist/module/form-control-text2.js +1 -1
  204. package/dist/module/form-control-textarea2.js +1 -1
  205. package/dist/module/get-payout-csv.js +16 -7
  206. package/dist/module/get-subaccounts.js +1 -1
  207. package/dist/module/identity-address-form.js +1 -1
  208. package/dist/module/justifi-business-details.js +1 -1
  209. package/dist/module/justifi-checkout.js +1 -1
  210. package/dist/module/justifi-checkouts-list.js +2 -2
  211. package/dist/module/justifi-gross-payment-chart.js +1 -1
  212. package/dist/module/justifi-payment-details.js +1 -1
  213. package/dist/module/justifi-payment-form.js +1 -1
  214. package/dist/module/justifi-payments-list.js +5 -3
  215. package/dist/module/justifi-payout-details.js +1 -1
  216. package/dist/module/justifi-payouts-list.js +63 -28
  217. package/dist/module/justifi-refund-form.js +1 -1
  218. package/dist/module/justifi-season-interruption-insurance.js +1 -1
  219. package/dist/module/justifi-terminals-list.js +3 -3
  220. package/dist/module/justifi-tokenize-payment-method.js +1 -1
  221. package/dist/module/legal-address-form-step-core.js +1 -1
  222. package/dist/module/legal-address-form.js +1 -1
  223. package/dist/module/package.js +2 -2
  224. package/dist/module/payment-method-form.js +2 -2
  225. package/dist/module/payment-provisioning-actions.js +1 -1
  226. package/dist/module/payments-list-core2.js +43 -52
  227. package/dist/module/payments-list-filters2.js +6 -1
  228. package/dist/module/payments-status.js +2 -2
  229. package/dist/module/payout-details-core2.js +1 -1
  230. package/dist/module/payouts-list-core2.js +118 -67
  231. package/dist/module/payouts-list-filters.d.ts +11 -0
  232. package/dist/module/payouts-list-filters.js +6 -0
  233. package/dist/module/payouts-list-filters2.js +69 -0
  234. package/dist/module/saved-payment-method.js +1 -1
  235. package/dist/module/schema-validations.js +0 -12
  236. package/dist/module/table-filters-menu2.js +2 -22
  237. package/dist/module/table.js +36 -3
  238. package/dist/module/terminals-list-core2.js +8 -8
  239. package/dist/module/terminals-list-filters2.js +1 -1
  240. package/dist/module/utils2.js +48 -32
  241. package/dist/module/utils3.js +30 -25
  242. package/dist/module/utils4.js +24 -23
  243. package/dist/module/utils5.js +27 -0
  244. package/dist/types/api/Payment.d.ts +3 -1
  245. package/dist/types/api/Payout.d.ts +8 -0
  246. package/dist/types/api/services/payout.service.d.ts +5 -5
  247. package/dist/types/components/checkouts-list/checkouts-list.d.ts +1 -1
  248. package/dist/types/components/dispute-management/counter-dispute/counter-dispute.d.ts +1 -1
  249. package/dist/types/components/dispute-management/dispute-management-core.d.ts +1 -1
  250. package/dist/types/components/dispute-management/dispute-notification.d.ts +1 -1
  251. package/dist/types/components/payments-list/payments-list-core.d.ts +4 -6
  252. package/dist/types/components/payments-list/payments-list-filters.d.ts +1 -0
  253. package/dist/types/components/payments-list/payments-list.d.ts +1 -0
  254. package/dist/types/components/payments-list/payments-status.d.ts +1 -1
  255. package/dist/types/components/payments-list/payments-table.d.ts +19 -0
  256. package/dist/types/components/payouts-list/get-payouts.d.ts +2 -1
  257. package/dist/types/components/payouts-list/payouts-list-core.d.ts +15 -7
  258. package/dist/types/components/payouts-list/payouts-list-filters.d.ts +8 -0
  259. package/dist/types/components/payouts-list/payouts-list.d.ts +8 -3
  260. package/dist/types/components/payouts-list/payouts-table.d.ts +23 -0
  261. package/dist/types/components/terminals-list/terminals-list.d.ts +1 -1
  262. package/dist/types/components.d.ts +41 -12
  263. package/dist/types/ui-components/filters/utils.d.ts +1 -0
  264. package/dist/types/ui-components/form/form-control-date.d.ts +0 -3
  265. package/dist/types/utils/utils.d.ts +15 -16
  266. package/dist/webcomponents/p-0a963f7e.entry.js +1 -0
  267. package/dist/webcomponents/{p-8e228e5a.js → p-0d6ddff2.js} +1 -1
  268. package/dist/webcomponents/p-0fbab710.entry.js +1 -0
  269. package/dist/webcomponents/{p-91711083.entry.js → p-10277025.entry.js} +1 -1
  270. package/dist/webcomponents/{p-09fb7dd6.entry.js → p-157ddb71.entry.js} +1 -1
  271. package/dist/webcomponents/p-17984027.entry.js +1 -0
  272. package/dist/webcomponents/{p-7a8c13ba.entry.js → p-229f2096.entry.js} +1 -1
  273. package/dist/webcomponents/p-286b87ab.js +1 -0
  274. package/dist/webcomponents/p-28bd6dcd.js +1 -0
  275. package/dist/webcomponents/p-2f422aad.entry.js +1 -0
  276. package/dist/webcomponents/{p-869ae0c7.entry.js → p-3186d1fb.entry.js} +1 -1
  277. package/dist/webcomponents/p-3db8b3c7.js +1 -0
  278. package/dist/webcomponents/p-3ec27a31.entry.js +1 -0
  279. package/dist/webcomponents/{p-927a147c.entry.js → p-3ed7fc42.entry.js} +1 -1
  280. package/dist/webcomponents/{p-83b01812.entry.js → p-4046e45c.entry.js} +1 -1
  281. package/dist/webcomponents/p-420adedb.entry.js +1 -0
  282. package/dist/webcomponents/{p-b459d0b0.js → p-4408a32d.js} +1 -1
  283. package/dist/webcomponents/p-448826a7.entry.js +1 -0
  284. package/dist/webcomponents/{p-22e38d5b.js → p-44d3f5ed.js} +1 -1
  285. package/dist/webcomponents/{p-6caf6f09.entry.js → p-469804a9.entry.js} +1 -1
  286. package/dist/webcomponents/{p-0de9e97b.entry.js → p-486da67e.entry.js} +1 -1
  287. package/dist/webcomponents/{p-a3143d62.entry.js → p-4a5e5574.entry.js} +1 -1
  288. package/dist/webcomponents/p-54145a37.entry.js +1 -0
  289. package/dist/webcomponents/p-544a4e7a.js +1 -0
  290. package/dist/webcomponents/p-59959934.entry.js +1 -0
  291. package/dist/webcomponents/{p-286a4e72.entry.js → p-628693c1.entry.js} +1 -1
  292. package/dist/webcomponents/{p-02cf5e6f.js → p-673cf8c4.js} +1 -1
  293. package/dist/webcomponents/{p-c30c8f39.entry.js → p-69527219.entry.js} +1 -1
  294. package/dist/webcomponents/{p-9ef4d294.entry.js → p-74340f69.entry.js} +1 -1
  295. package/dist/webcomponents/p-7fc27a1a.js +1 -0
  296. package/dist/webcomponents/{p-c458fc48.entry.js → p-81635086.entry.js} +1 -1
  297. package/dist/webcomponents/p-89f6691e.js +1 -0
  298. package/dist/webcomponents/p-91de21cc.js +1 -0
  299. package/dist/webcomponents/p-95ec39f6.entry.js +1 -0
  300. package/dist/webcomponents/p-9690eca9.entry.js +1 -0
  301. package/dist/webcomponents/{p-efb56234.entry.js → p-a7830e98.entry.js} +1 -1
  302. package/dist/webcomponents/p-a856444a.entry.js +1 -0
  303. package/dist/webcomponents/{p-a91a2152.entry.js → p-a9775002.entry.js} +1 -1
  304. package/dist/webcomponents/p-ada9ac19.entry.js +1 -0
  305. package/dist/webcomponents/{p-eed325b7.entry.js → p-b607a07f.entry.js} +1 -1
  306. package/dist/webcomponents/p-bb71cef3.js +1 -0
  307. package/dist/webcomponents/{p-c5c6e61d.js → p-bc8205ec.js} +1 -1
  308. package/dist/webcomponents/{p-a8f22d4d.js → p-c13a7d10.js} +1 -1
  309. package/dist/webcomponents/p-c3fb5d3a.entry.js +1 -0
  310. package/dist/webcomponents/p-c420cb7d.entry.js +1 -0
  311. package/dist/webcomponents/{p-90b8acc6.js → p-c5175bd7.js} +1 -1
  312. package/dist/webcomponents/p-c8243721.js +1 -0
  313. package/dist/webcomponents/p-cd19c597.entry.js +1 -0
  314. package/dist/webcomponents/{p-9e7204b5.js → p-ce94232f.js} +1 -1
  315. package/dist/webcomponents/{p-92a766d8.entry.js → p-d09e9336.entry.js} +1 -1
  316. package/dist/webcomponents/{p-7fec2bcb.js → p-d1f75fa6.js} +1 -1
  317. package/dist/webcomponents/{p-55f78fcc.entry.js → p-daa7872f.entry.js} +1 -1
  318. package/dist/webcomponents/{p-2c8c214f.entry.js → p-dcb288a3.entry.js} +1 -1
  319. package/dist/webcomponents/p-dd43bf3d.entry.js +1 -0
  320. package/dist/webcomponents/p-df3ca87f.entry.js +1 -0
  321. package/dist/webcomponents/p-df5a1202.entry.js +1 -0
  322. package/dist/webcomponents/p-e2ce097c.js +1 -0
  323. package/dist/webcomponents/{p-eeb70281.entry.js → p-e5790011.entry.js} +1 -1
  324. package/dist/webcomponents/p-e9919d54.entry.js +1 -0
  325. package/dist/webcomponents/p-e99957ff.entry.js +1 -0
  326. package/dist/webcomponents/p-eab21e1f.entry.js +1 -0
  327. package/dist/webcomponents/{p-8e2e24d8.entry.js → p-ed05a597.entry.js} +1 -1
  328. package/dist/webcomponents/p-ed95feec.entry.js +1 -0
  329. package/dist/webcomponents/{p-8f212554.entry.js → p-f698d6d9.entry.js} +1 -1
  330. package/dist/webcomponents/p-fd5f2836.js +1 -0
  331. package/dist/webcomponents/{p-5fd72c29.entry.js → p-fea520c6.entry.js} +1 -1
  332. package/dist/webcomponents/{p-2dc7751f.entry.js → p-ff4bac14.entry.js} +1 -1
  333. package/dist/webcomponents/webcomponents.esm.js +1 -1
  334. package/package.json +2 -2
  335. package/dist/cjs/table-20e9a053.js +0 -23
  336. package/dist/cjs/table-filters-menu.cjs.entry.js +0 -35
  337. package/dist/esm/table-5da154e7.js +0 -21
  338. package/dist/esm/table-filters-menu.entry.js +0 -31
  339. package/dist/module/table-loading-state.js +0 -34
  340. package/dist/webcomponents/p-0c03a971.entry.js +0 -1
  341. package/dist/webcomponents/p-0ec27543.entry.js +0 -1
  342. package/dist/webcomponents/p-0f7b9555.entry.js +0 -1
  343. package/dist/webcomponents/p-1251a3f5.entry.js +0 -1
  344. package/dist/webcomponents/p-1ab798f4.entry.js +0 -1
  345. package/dist/webcomponents/p-269ba6fe.entry.js +0 -1
  346. package/dist/webcomponents/p-2a9f48f0.entry.js +0 -1
  347. package/dist/webcomponents/p-2c2b57b3.js +0 -1
  348. package/dist/webcomponents/p-2c51d29f.js +0 -1
  349. package/dist/webcomponents/p-3f82f724.entry.js +0 -1
  350. package/dist/webcomponents/p-44f7f729.entry.js +0 -1
  351. package/dist/webcomponents/p-47dbe17d.js +0 -1
  352. package/dist/webcomponents/p-4b14abbf.entry.js +0 -1
  353. package/dist/webcomponents/p-638c6285.entry.js +0 -1
  354. package/dist/webcomponents/p-7285c687.js +0 -1
  355. package/dist/webcomponents/p-8480e3ab.entry.js +0 -1
  356. package/dist/webcomponents/p-88efdd31.js +0 -1
  357. package/dist/webcomponents/p-8ec550d7.entry.js +0 -1
  358. package/dist/webcomponents/p-919e6e67.entry.js +0 -1
  359. package/dist/webcomponents/p-935188c8.entry.js +0 -1
  360. package/dist/webcomponents/p-9f56ad71.js +0 -1
  361. package/dist/webcomponents/p-ad443df5.entry.js +0 -1
  362. package/dist/webcomponents/p-b16269d7.js +0 -1
  363. package/dist/webcomponents/p-bba131f9.entry.js +0 -1
  364. package/dist/webcomponents/p-c717646f.entry.js +0 -1
  365. package/dist/webcomponents/p-cd4eaeb7.js +0 -1
  366. package/dist/webcomponents/p-cd7e866c.entry.js +0 -1
  367. package/dist/webcomponents/p-e333620e.js +0 -1
  368. package/dist/webcomponents/p-e412a713.entry.js +0 -1
  369. package/dist/webcomponents/p-e6be8845.entry.js +0 -1
  370. package/dist/webcomponents/p-e8797be0.entry.js +0 -1
  371. package/dist/webcomponents/p-f45197b9.entry.js +0 -1
  372. package/dist/webcomponents/p-fc4de0d2.js +0 -1
@@ -1,17 +1,14 @@
1
- import { h, r as registerInstance, c as createEvent } from './index-57431c24.js';
1
+ import { r as registerInstance, c as createEvent, h } from './index-57431c24.js';
2
2
  import './Checkout-0b4086f8.js';
3
3
  import { p as pagingDefaults } from './Pagination-afc8f96d.js';
4
- import './Payment-30790721.js';
5
- import './SubAccount-7f7e4c56.js';
6
- import { a as formatDate, f as formatTime, b as formatCurrency } from './utils-3daada24.js';
4
+ import './Payment-2a868d0c.js';
5
+ import './SubAccount-99a00594.js';
7
6
  import { a as ComponentErrorCodes, C as ComponentErrorSeverity } from './ComponentError-3ce7f437.js';
8
- import { T as TableLoadingState, a as TableEmptyState, b as TableErrorState } from './table-loading-state-356c7215.js';
9
- import { M as MapPayoutStatusToBadge } from './payouts-status-cd58e525.js';
10
-
11
- const DownloadIcon = (props) => (h("svg", Object.assign({ xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 24 24' }, props),
12
- h("path", { d: 'M12 15.5l-5-5 1.41-1.41L12 12.67l3.59-3.58L17 10.5l-5 5z' }),
13
- h("path", { d: 'M11 4h2v9h-2z' }),
14
- h("path", { d: 'M5 18h14v2H5z' })));
7
+ import { T as Table, a as TableLoadingState, b as TableEmptyState, c as TableErrorState } from './table-44e3d1e7.js';
8
+ import { o as onFilterChange } from './utils-4006c425.js';
9
+ import { p as payoutTableColumns, a as payoutTableCells } from './payouts-table-edff9bbe.js';
10
+ import './utils-1df1e55a.js';
11
+ import './payouts-status-cd58e525.js';
15
12
 
16
13
  const PayoutsListCore = class {
17
14
  constructor(hostRef) {
@@ -30,9 +27,6 @@ const PayoutsListCore = class {
30
27
  },
31
28
  });
32
29
  };
33
- this.handleDateChange = (name, value) => {
34
- this.params = Object.assign(Object.assign({}, this.params), { [name]: value });
35
- };
36
30
  this.handleClickPrevious = (beforeCursor) => {
37
31
  const newParams = Object.assign({}, this.params);
38
32
  delete newParams.after_cursor;
@@ -49,29 +43,72 @@ const PayoutsListCore = class {
49
43
  return;
50
44
  this.rowClicked.emit(this.payouts.find((payout) => payout.id === clickedPayoutID));
51
45
  };
46
+ this.setParamsOnChange = (name, value) => {
47
+ let newParams = { [name]: value };
48
+ this.params = onFilterChange(newParams, this.params);
49
+ };
50
+ this.clearParams = () => {
51
+ this.errorMessage = '';
52
+ this.params = {};
53
+ };
52
54
  this.getPayouts = undefined;
55
+ this.getSubAccounts = undefined;
53
56
  this.getPayoutCSV = undefined;
57
+ this.columns = undefined;
54
58
  this.payouts = [];
59
+ this.payoutsTable = undefined;
60
+ this.subAccounts = [];
55
61
  this.loading = true;
56
62
  this.errorMessage = undefined;
57
63
  this.paging = pagingDefaults;
58
- this.params = undefined;
64
+ this.params = {};
59
65
  }
60
66
  updateOnPropChange() {
61
- this.fetchData();
67
+ this.fetchPayouts();
62
68
  }
63
69
  componentWillLoad() {
64
- if (this.getPayouts) {
65
- this.fetchData();
70
+ this.payoutsTable = new Table(this.payouts, this.columns, payoutTableColumns, payoutTableCells(this.downloadCSV));
71
+ if (this.getPayouts && this.getSubAccounts) {
72
+ this.fetchPayouts();
66
73
  }
67
74
  }
68
- fetchData() {
75
+ fetchPayouts() {
69
76
  this.loading = true;
70
77
  this.getPayouts({
71
78
  params: this.params,
72
79
  onSuccess: ({ payouts, pagingInfo }) => {
73
80
  this.payouts = payouts;
74
81
  this.paging = pagingInfo;
82
+ this.payoutsTable.collectionData = this.payouts;
83
+ const shouldFetchSubAccounts = this.payoutsTable.columnKeys.includes('sub_account_name');
84
+ if (shouldFetchSubAccounts) {
85
+ this.fetchSubAccounts();
86
+ }
87
+ else {
88
+ this.loading = false;
89
+ }
90
+ },
91
+ onError: ({ error, code, severity }) => {
92
+ this.errorMessage = error;
93
+ this.errorEvent.emit({
94
+ errorCode: code,
95
+ message: error,
96
+ severity,
97
+ });
98
+ this.loading = false;
99
+ },
100
+ });
101
+ }
102
+ async fetchSubAccounts() {
103
+ this.getSubAccounts({
104
+ params: this.subAccountParams,
105
+ onSuccess: ({ subAccounts }) => {
106
+ this.subAccounts = subAccounts;
107
+ this.payouts = this.payouts.map((payout) => {
108
+ var _a;
109
+ payout.sub_account_name = (_a = this.subAccounts.find((subAccount) => subAccount.id === payout.account_id)) === null || _a === void 0 ? void 0 : _a.name;
110
+ return payout;
111
+ });
75
112
  this.loading = false;
76
113
  },
77
114
  onError: ({ error, code, severity }) => {
@@ -85,61 +122,31 @@ const PayoutsListCore = class {
85
122
  },
86
123
  });
87
124
  }
125
+ get subAccountParams() {
126
+ let accountIdNumbers = this.payouts.map((payout) => payout.account_id);
127
+ let uniqueAccountIds = [...new Set(accountIdNumbers)];
128
+ let accountIdString = uniqueAccountIds.join(',');
129
+ return { sub_account_id: accountIdString };
130
+ }
88
131
  get entityId() {
89
132
  return this.payouts.map((payout) => payout.id);
90
133
  }
91
- get columnData() {
92
- return [
93
- ['Paid Out On', 'The date each transaction occurred'],
94
- ['Type', 'The type of each transaction'],
95
- ['Account', 'The ID of the account associated with each payout'],
96
- ['Paid Out To', 'The bank account to which each payout was transferred'],
97
- ['Payments', 'Sum of payments in each payout'],
98
- ['Refunds', 'Sum of refunds in each payout'],
99
- ['Fees', 'Sum of fees in each payout'],
100
- ['Other', 'Sum of less common transactions in each payout'],
101
- ['Payout Amount', 'The net sum of all transactions in each payout'],
102
- ['Status', 'The real-time status of each payout'],
103
- ['Actions', ''],
104
- ];
105
- }
106
- get rowData() {
107
- return this.payouts.map((payout) => [
108
- {
109
- type: 'head',
110
- value: `
111
- <div class='fw-bold'>${formatDate(payout.created_at)}</div>
112
- <div class='fw-bold'>${formatTime(payout.created_at)}</div>
113
- `,
114
- },
115
- payout.payout_type,
116
- payout.account_id,
117
- `${payout.bank_account.full_name} ${payout.bank_account.account_number_last4}`,
118
- formatCurrency(payout.payments_total),
119
- formatCurrency(payout.refunds_total),
120
- formatCurrency(payout.fees_total),
121
- formatCurrency(payout.other_total),
122
- formatCurrency(payout.amount),
123
- { type: 'inner', value: MapPayoutStatusToBadge(payout.status) },
124
- (h(DownloadIcon, { title: "Export CSV", onClick: () => this.downloadCSV(payout.id), style: { height: '24px', width: '24px', cursor: 'pointer' } })),
125
- ]);
126
- }
127
134
  get showEmptyState() {
128
- return !this.loading && !this.errorMessage && this.rowData.length < 1;
135
+ return !this.loading && !this.errorMessage && this.payoutsTable.rowData.length < 1;
129
136
  }
130
137
  get showErrorState() {
131
138
  return !this.loading && !!this.errorMessage;
132
139
  }
133
140
  get showRowData() {
134
- return !this.showEmptyState && !this.showErrorState;
141
+ return !this.showEmptyState && !this.showErrorState && !this.loading;
135
142
  }
136
143
  render() {
137
- return (h("div", { key: '536d8a921bb7b6517dc65afd307507668e74e92f' }, h("div", { key: '5d33c651af05927db51e7d855772ff1c60f71ef0', class: "row gy-3 mb-4" }, h("div", { key: '53f246db4d96ef4ac445c0b57d4da3471c9fdbdb', class: "col-2" }, h("form-control-date", { key: 'd6e711e3e92e53cff8e2ee4a8c4a3788584c0f77', name: "created_after", label: "Date from:", inputHandler: this.handleDateChange })), h("div", { key: '86ab746d1e7f9e11dfeca4cd185909d9d447fe85', class: "col-2" }, h("form-control-date", { key: '232edbf8284d14ed3659a199b144eb5596e22b88', name: "created_before", label: "Date to:", inputHandler: this.handleDateChange }))), h("div", { key: '10c720e38bd24ff9431d59a28ec46f62bd8c04a7', class: "table-wrapper" }, h("table", { key: 'fdbf0978c018315d5e67caf9273e59bf4e50205c', class: "table table-hover" }, h("thead", { key: 'f3fc1532a46f8b92eff8d385462fe8ba9448840b', class: "table-head sticky-top", part: "table-head" }, h("tr", { key: 'fe552206bf026258b40031c10a030fb32f98879d', class: "table-light text-nowrap", part: "table-head-row" }, this.columnData.map((column) => (h("th", { part: "table-head-cell", scope: "col", title: Array.isArray(column) ? column[1] : '' }, Array.isArray(column) ? column[0] : column))))), h("tbody", { key: '1247efd4d95cfb257d052acf9dbcac84203aaaaf', class: "table-body", part: "table-body" }, h(TableLoadingState, { key: '1107d1a965651133504db486d4d0b692fe9735e9', columnSpan: this.columnData.length, isLoading: this.loading }), h(TableEmptyState, { key: '8435806053ae9d16a05cc031f33d3b97e4d02248', isEmpty: this.showEmptyState, columnSpan: this.columnData.length }), h(TableErrorState, { key: '01213ac9d7f63e0eaa11c38f4aebe59aef3650d9', columnSpan: this.columnData.length, errorMessage: this.errorMessage }), this.showRowData &&
138
- this.rowData.map((data, index) => (h("tr", { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index], onClick: this.rowClickHandler, part: `table-row ${index % 2 ? 'table-row-even' : 'table-row-odd'}` }, data.map((dataEntry) => ((dataEntry === null || dataEntry === void 0 ? void 0 : dataEntry.type) ? (h("td", { part: "table-cell", innerHTML: dataEntry.value })) : (h("td", { part: "table-cell" }, dataEntry)))))))), this.paging && (h("tfoot", { key: 'd2a1b0dd2340cf64816ad05c1c03f136b21df0a6', class: "sticky-bottom" }, h("tr", { key: 'abb87b7c026475da175a6bec772887bf3ac08933', class: "table-light align-middle" }, h("td", { key: '32070f512aebc77a42693a93e717d31ef9ed4509', part: "pagination-bar", colSpan: this.columnData.length }, h("pagination-menu", { key: '57ee656553f4afee96f5dbdac5866f103cde97eb', paging: Object.assign(Object.assign({}, this.paging), { handleClickPrevious: this.handleClickPrevious, handleClickNext: this.handleClickNext }), params: this.params })))))))));
144
+ return (h("div", { key: '3768192e14155536f0fb53d2abc5f1e92b04cc01' }, h("payouts-list-filters", { key: '3fec8cfc6b9d68798148e9eea0725079d32e3406', params: this.params, setParamsOnChange: this.setParamsOnChange, clearParams: this.clearParams }), h("div", { key: '291b7a53bb5657c87568169ebccc1dead39d10c9', class: "table-wrapper" }, h("table", { key: '624389fddf8b00dcaf70a75693b542b2f4af4982', class: "table table-hover" }, h("thead", { key: '1e28a2a6988eac106c40b8f029d9fa2118cbdb6d', class: "table-head sticky-top", part: "table-head" }, h("tr", { key: '1f05dd4c54fb350545cf6b1b3e86b80d96932585', class: "table-light text-nowrap", part: "table-head-row" }, this.payoutsTable.columnData.map((column) => column))), h("tbody", { key: '3af09dc61461f31f61c2cfdf7896b7dfe9441450', class: "table-body", part: "table-body" }, h(TableLoadingState, { key: '715a3d0732e45810bdfdcbe5c7db8f29934a1a62', columnSpan: this.payoutsTable.columnKeys.length, isLoading: this.loading }), h(TableEmptyState, { key: '3aac2554828eac0c6b0645da5df811b5e5463235', isEmpty: this.showEmptyState, columnSpan: this.payoutsTable.columnKeys.length }), h(TableErrorState, { key: 'cf2b312830b9f59550346085f00bc519e496b2b2', columnSpan: this.payoutsTable.columnKeys.length, errorMessage: this.errorMessage }), this.showRowData && this.payoutsTable.rowData.map((data, index) => (h("tr", { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index], onClick: this.rowClickHandler, part: `table-row ${index % 2 ? "table-row-even" : "table-row-odd"}` }, data)))), this.paging && (h("tfoot", { key: '3d7389fb825a7eafcd456b3ae95b115a4218fea3', class: "sticky-bottom" }, h("tr", { key: '4c10aa64144a281d8303b04f013bfcc2390f4d04', class: "table-light align-middle" }, h("td", { key: '63614e636203a5f15beb26b4d19eed393b6ea481', part: "pagination-bar", colSpan: this.payoutsTable.columnData.length }, h("pagination-menu", { key: '7708ac8b21d2db0ec9ade773dd46cd944374ede5', paging: Object.assign(Object.assign({}, this.paging), { handleClickPrevious: this.handleClickPrevious, handleClickNext: this.handleClickNext }), params: this.params })))))))));
139
145
  }
140
146
  static get watchers() { return {
141
147
  "params": ["updateOnPropChange"],
142
- "getPayouts": ["updateOnPropChange"]
148
+ "getPayouts": ["updateOnPropChange"],
149
+ "getSubAccounts": ["updateOnPropChange"]
143
150
  }; }
144
151
  };
145
152
 
@@ -0,0 +1,20 @@
1
+ import { r as registerInstance, h } from './index-57431c24.js';
2
+ import { g as convertToUTC, c as convertToLocal } from './utils-1df1e55a.js';
3
+
4
+ const PayoutsListFilters = class {
5
+ constructor(hostRef) {
6
+ registerInstance(this, hostRef);
7
+ this.handleDateInput = (name, value) => {
8
+ const utcDate = convertToUTC(value, { setEndOfDay: true });
9
+ this.setParamsOnChange(name, utcDate);
10
+ };
11
+ this.params = undefined;
12
+ this.setParamsOnChange = undefined;
13
+ this.clearParams = undefined;
14
+ }
15
+ render() {
16
+ return (h("table-filters-menu", { key: '2f80b6ac3308af53f20f1c8c8fbc596937eeda1d', params: this.params, clearParams: this.clearParams }, h("div", { key: '6e0bf319268d1bcbbd81e922f0855eb1c497815f', class: "grid-cols-2 gap-3 p-1" }, h("div", { key: '8c29a63ea0c4836a0b002db9adc75ea69cdde988', class: "p-2" }, h("form-control-date", { key: '74399fdd150d71758f817454944ef34c9b443240', name: "created_after", label: "Created After", inputHandler: this.handleDateInput, defaultValue: convertToLocal(this.params.created_after, { showInputDate: true }) })), h("div", { key: 'e98911d5b92ed5a6642d8f59b23abbebf4f1f85b', class: "p-2" }, h("form-control-date", { key: '4f233e95aeae496357938c69f25336123fbf1f0f', name: "created_before", label: "Created Before", inputHandler: this.handleDateInput, defaultValue: convertToLocal(this.params.created_before, { showInputDate: true }) })))));
17
+ }
18
+ };
19
+
20
+ export { PayoutsListFilters as payouts_list_filters };
@@ -0,0 +1,33 @@
1
+ import { h } from './index-57431c24.js';
2
+ import { c as convertToLocal, b as formatCurrency } from './utils-1df1e55a.js';
3
+ import { M as MapPayoutStatusToBadge } from './payouts-status-cd58e525.js';
4
+
5
+ const defaultColumnsKeys = 'created_at,amount,status,payments_total,refunds_total,fees_total,other_total,csv';
6
+ const payoutTableColumns = {
7
+ created_at: () => (h("th", { part: "table-head-cell", scope: "col", title: "The date the payout was deposited" }, "Created")),
8
+ sub_account_name: () => (h("th", { part: "table-head-cell", scope: "col", title: "The sub account associated with the payout" }, "Sub Account")),
9
+ payments_total: () => (h("th", { part: "table-head-cell", scope: "col", title: "The total payments amount associated with the payout" }, "Payments")),
10
+ refunds_total: () => (h("th", { part: "table-head-cell", scope: "col", title: "The total refunds amount associated with the payout" }, "Refunds")),
11
+ fees_total: () => (h("th", { part: "table-head-cell", scope: "col", title: "The total fees amount associated with the payout" }, "Fees")),
12
+ other_total: () => (h("th", { part: "table-head-cell", scope: "col", title: "The total other amount" }, "Other")),
13
+ amount: () => (h("th", { part: "table-head-cell", scope: "col", title: "The total amount of the payout" }, "Amount")),
14
+ status: () => (h("th", { part: "table-head-cell", scope: "col", title: "The real-time status of each payout" }, "Status")),
15
+ csv: () => (h("th", { part: "table-head-cell", scope: "col", title: "Export CSV" })),
16
+ };
17
+ const payoutTableCells = (downloadCSV) => ({
18
+ created_at: (value) => (h("td", { part: "table-cell" },
19
+ h("div", { class: "fw-bold" },
20
+ convertToLocal(value, { showDisplayDate: true }),
21
+ " "))),
22
+ sub_account_name: (value) => (h("td", { part: "table-cell" }, value)),
23
+ payments_total: (value) => (h("td", { part: "table-cell" }, formatCurrency(value))),
24
+ refunds_total: (value) => (h("td", { part: "table-cell" }, formatCurrency(value))),
25
+ fees_total: (value) => (h("td", { part: "table-cell" }, formatCurrency(value))),
26
+ other_total: (value) => (h("td", { part: "table-cell" }, formatCurrency(value))),
27
+ amount: (value) => (h("td", { part: "table-cell" }, formatCurrency(value))),
28
+ status: (value) => (h("td", { part: "table-cell", innerHTML: MapPayoutStatusToBadge(value) })),
29
+ csv: (value) => (h("td", { part: "table-cell" },
30
+ h("a", { href: "#", onClick: (event) => { event.preventDefault(); downloadCSV(value); } }, "CSV"))),
31
+ });
32
+
33
+ export { payoutTableCells as a, defaultColumnsKeys as d, payoutTableColumns as p };
@@ -18,13 +18,10 @@ const validateRoutingNumber = (routingNumber) => {
18
18
  }
19
19
  return false;
20
20
  };
21
- const businessNameRegex = /^(?!^\s+$)[a-zA-Z0-9\s,&.-]*$/;
22
21
  const phoneRegex = /^\d{10}$/;
23
22
  const urlRegex = /^(?:http(s)?:\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/;
24
- const stringLettersOnlyRegex = /^(?!^\s+$)[a-zA-Z\s]*$/;
25
23
  const numbersOnlyRegex = /^\d+$/;
26
24
  const ssnRegex = /^(?!000|666|9\d{2})\d{3}(?!00)\d{2}(?!0000)\d{4}$/;
27
- const streetAddressRegex = /^(?!^\s+$)[a-zA-Z0-9\s,&.-]*$/;
28
25
  const poBoxRegex = /P\.?\s?O\.?\s?Box|Postal\sBox/i;
29
26
 
30
27
  var EntityDocumentType;
@@ -92,12 +89,10 @@ const phoneValidation = create$6()
92
89
  const businessNameValidation = create$6()
93
90
  .min(2, 'Name must be at least 2 characters')
94
91
  .max(100, 'Name must be less than 100 characters')
95
- .matches(businessNameRegex, 'Enter valid business name')
96
92
  .transform(transformEmptyString);
97
93
  const doingBusinessAsValidation = create$6()
98
94
  .min(2, 'Name must be at least 2 characters')
99
95
  .max(100, 'Name must be less than 100 characters')
100
- .matches(businessNameRegex, 'Enter valid doing business as')
101
96
  .transform(transformEmptyString);
102
97
  const websiteUrlValidation = create$6()
103
98
  .matches(urlRegex, 'Enter valid website url')
@@ -108,7 +103,6 @@ const businessClassificationValidation = create$6()
108
103
  const industryValidation = create$6()
109
104
  .min(2, 'Industry must be at least 2 characters')
110
105
  .max(50, 'Industry must be less than 50 characters')
111
- .matches(stringLettersOnlyRegex, 'Enter valid industry')
112
106
  .transform(transformEmptyString);
113
107
  const taxIdValidation = create$6()
114
108
  .matches(numbersOnlyRegex, 'Enter valid tax id, SSN, or EIN')
@@ -134,7 +128,6 @@ const identityNameValidation = create$6()
134
128
  const identityTitleValidation = create$6()
135
129
  .min(2, 'Title must be at least 2 characters')
136
130
  .max(50, 'Title must be less than 50 characters')
137
- .matches(stringLettersOnlyRegex, 'Enter valid title')
138
131
  .transform(transformEmptyString);
139
132
  const dobValidation = (role) => {
140
133
  return (create$6()
@@ -169,14 +162,12 @@ const ssnValidation = create$6()
169
162
  const lineOneValidation = create$6()
170
163
  .min(5, 'Address must be at least 5 characters')
171
164
  .max(100, 'Address must be less than 100 characters')
172
- .matches(streetAddressRegex, 'Enter valid address line 1')
173
165
  .test('not-po-box', 'A PO Box is not a valid address entry', (value) => {
174
166
  return !poBoxRegex.test(value);
175
167
  })
176
168
  .transform(transformEmptyString);
177
169
  const lineTwoValidation = create$6()
178
170
  .max(100, 'Address must be less than 100 characters')
179
- .matches(streetAddressRegex, 'Enter valid address line 2')
180
171
  .test('not-po-box', 'A PO Box is not a valid address entry', (value) => {
181
172
  return !poBoxRegex.test(value);
182
173
  })
@@ -184,7 +175,6 @@ const lineTwoValidation = create$6()
184
175
  const cityValidation = create$6()
185
176
  .min(2, 'City must be at least 2 characters')
186
177
  .max(50, 'City must be less than 50 characters')
187
- .matches(stringLettersOnlyRegex, 'Enter valid city')
188
178
  .transform(transformEmptyString);
189
179
  const stateValidation = create$6()
190
180
  .oneOf(StateOptions.map((option) => option.value), 'Select state')
@@ -221,12 +211,10 @@ const otherPaymentDetailsValidation = create$6()
221
211
  const bankNameValidation = create$6()
222
212
  .min(2, 'Name must be at least 2 characters')
223
213
  .max(50, 'Name must be less than 50 characters')
224
- .matches(stringLettersOnlyRegex, 'Enter valid bank name')
225
214
  .transform(transformEmptyString);
226
215
  const nicknameValidation = create$6()
227
216
  .min(2, 'Name must be at least 2 characters')
228
217
  .max(50, 'Name must be less than 50 characters')
229
- .matches(stringLettersOnlyRegex, 'Enter valid nickname')
230
218
  .transform(transformEmptyString);
231
219
  const accountTypeValidation = create$6()
232
220
  .oneOf(bankAccountTypeOptions.map((option) => option.value), 'Select account type')
@@ -31,4 +31,24 @@ const TableLoadingState = (props) => {
31
31
  h("span", { class: "visually-hidden" }, "Loading...")))));
32
32
  };
33
33
 
34
- export { TableLoadingState as T, TableEmptyState as a, TableErrorState as b };
34
+ class Table {
35
+ get columnData() {
36
+ return this.columnKeys.map((key) => this.tableColumns[key]());
37
+ }
38
+ get rowData() {
39
+ return this.collection.map((dataEntry) => {
40
+ return this.columnKeys.map((key) => this.tableCells[key](dataEntry[key]));
41
+ });
42
+ }
43
+ set collectionData(collection) {
44
+ this.collection = collection;
45
+ }
46
+ constructor(collection, columns, tableColumns, tableCells) {
47
+ this.columnKeys = columns.split(',');
48
+ this.collection = collection;
49
+ this.tableColumns = tableColumns;
50
+ this.tableCells = tableCells;
51
+ }
52
+ }
53
+
54
+ export { Table as T, TableLoadingState as a, TableEmptyState as b, TableErrorState as c };
@@ -1,12 +1,11 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-57431c24.js';
2
2
  import './Checkout-0b4086f8.js';
3
3
  import { p as pagingDefaults } from './Pagination-afc8f96d.js';
4
- import './Payment-30790721.js';
5
- import './SubAccount-7f7e4c56.js';
6
- import { T as TableLoadingState, a as TableEmptyState, b as TableErrorState } from './table-loading-state-356c7215.js';
7
- import { o as onFilterChange } from './utils-3a4d8f3a.js';
8
- import { t as terminalTableColumns, a as terminalTableCells } from './terminals-table-059c473e.js';
9
- import { T as Table } from './table-5da154e7.js';
4
+ import './Payment-2a868d0c.js';
5
+ import './SubAccount-99a00594.js';
6
+ import { T as Table, a as TableLoadingState, b as TableEmptyState, c as TableErrorState } from './table-44e3d1e7.js';
7
+ import { o as onFilterChange } from './utils-4006c425.js';
8
+ import { t as terminalTableColumns, a as terminalTableCells } from './terminals-table-dc787616.js';
10
9
 
11
10
  const TerminalsListCore = class {
12
11
  constructor(hostRef) {
@@ -126,7 +125,7 @@ const TerminalsListCore = class {
126
125
  return !this.showEmptyState && !this.showErrorState && !this.loading;
127
126
  }
128
127
  render() {
129
- return (h("div", { key: '7f8bc3f39c1250281c2f2ad6fe081fc71bb20e79' }, h("terminals-list-filters", { key: 'd1184427fc74d970bd69d56a00d0ef4b7672516b', params: this.params, setParamsOnChange: this.setParamsOnChange, clearParams: this.clearParams }), h("div", { key: '582e37429a153cd17bf3c7ebb16e7330c774f986', class: "table-wrapper" }, h("table", { key: '1c03b2ddc8ca2da6b1f2147113f7832b3f27ec1d', class: "table table-hover" }, h("thead", { key: '811d48219cc04256f4a37854504252ff53392bd9', class: "table-head sticky-top", part: "table-head" }, h("tr", { key: 'fafa54ac3abba993dcf38ca2e47f248031226041', class: "table-light text-nowrap", part: "table-head-row" }, this.terminalsTable.columnData.map((column) => column))), h("tbody", { key: '8c9072bf6ebb7f720f1fad0faa47c72c8ed84dd2', class: "table-body", part: "table-body" }, h(TableLoadingState, { key: 'abddb3ce09e39245c0455893f09e54cc631b26bf', columnSpan: this.terminalsTable.columnKeys.length, isLoading: this.loading }), h(TableEmptyState, { key: '166a461ee8aaf7405fc0a2b12cd17e1e1e9553f3', isEmpty: this.showEmptyState, columnSpan: this.terminalsTable.columnKeys.length }), h(TableErrorState, { key: '969bbfcce66b6bcee4dadabe465eaef37022d13b', columnSpan: this.terminalsTable.columnKeys.length, errorMessage: this.errorMessage }), this.showRowData && this.terminalsTable.rowData.map((data, index) => (h("tr", { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index], onClick: this.rowClickHandler, part: `table-row ${index % 2 ? "table-row-even" : "table-row-odd"}` }, data)))), this.paging && (h("tfoot", { key: 'c63268c11facddaa44452c58743ad9c03f492898', class: "sticky-bottom" }, h("tr", { key: '0e247f8968ad4ed7e8c001354b1c29d5bf7976aa', class: "table-light align-middle" }, h("td", { key: '51c5157453d911f5bf370ba2ac6a556dd1592f24', part: "pagination-bar", colSpan: this.terminalsTable.columnData.length }, h("pagination-menu", { key: '3a3ba65f31099125e9c01bc9c8c001c6437ed720', paging: Object.assign(Object.assign({}, this.paging), { handleClickPrevious: this.handleClickPrevious, handleClickNext: this.handleClickNext }), params: this.params })))))))));
128
+ return (h("div", { key: 'd022a41666a6483bcb405bfe477b7eba1e5ca5dd' }, h("terminals-list-filters", { key: 'cb0d38d4b51c5cb9482c1f567dce4462bf12a055', params: this.params, setParamsOnChange: this.setParamsOnChange, clearParams: this.clearParams }), h("div", { key: '82cbf05382d9ecaf0d01c4e0b5f61618b1442690', class: "table-wrapper" }, h("table", { key: '5c8bd36b6523cf56542b016e3195188781b2cb03', class: "table table-hover" }, h("thead", { key: 'f35d86ae84f673437e0fc51ad3e26b1839153590', class: "table-head sticky-top", part: "table-head" }, h("tr", { key: '7727a4e30dddd62d6dc3c405c7ca505f91a71643', class: "table-light text-nowrap", part: "table-head-row" }, this.terminalsTable.columnData.map((column) => column))), h("tbody", { key: '4e0ee2053a33622037e7961ec289036e52632e3f', class: "table-body", part: "table-body" }, h(TableLoadingState, { key: '96cb647d4f5c2e4a1ecb33be46b868e1318762ca', columnSpan: this.terminalsTable.columnKeys.length, isLoading: this.loading }), h(TableEmptyState, { key: '062aeeb69a149b2f15e49c81bb3bd16a6d5a5dfd', isEmpty: this.showEmptyState, columnSpan: this.terminalsTable.columnKeys.length }), h(TableErrorState, { key: '750a04c3ecb53271b3affced7e9245733c64bd57', columnSpan: this.terminalsTable.columnKeys.length, errorMessage: this.errorMessage }), this.showRowData && this.terminalsTable.rowData.map((data, index) => (h("tr", { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index], onClick: this.rowClickHandler, part: `table-row ${index % 2 ? "table-row-even" : "table-row-odd"}` }, data)))), this.paging && (h("tfoot", { key: '19edc599b2ccd6212c03045b754fe251335fa665', class: "sticky-bottom" }, h("tr", { key: 'dd793c33355dd6b0448e327a62b3cc08a0d09bad', class: "table-light align-middle" }, h("td", { key: '0b142d2c1b658e1bb084741fa461d7f350c3449c', part: "pagination-bar", colSpan: this.terminalsTable.columnData.length }, h("pagination-menu", { key: '757d9ba17e1a768aa0bcf573a2d02b455bac3df3', paging: Object.assign(Object.assign({}, this.paging), { handleClickPrevious: this.handleClickPrevious, handleClickNext: this.handleClickNext }), params: this.params })))))))));
130
129
  }
131
130
  static get watchers() { return {
132
131
  "params": ["updateOnPropChange"],
@@ -21,7 +21,7 @@ const TerminalsListFilters = class {
21
21
  ];
22
22
  }
23
23
  render() {
24
- return (h("table-filters-menu", { key: '4bfd04cf078878811b2692ff166598deb22b7d92', params: this.params, clearParams: this.clearParams }, h("div", { key: '470d4eb34429c887d03beb0caedd8c9486d18900', class: "grid-cols-2 gap-3 p-1" }, h("div", { key: '34d34e8c90c36b7cab1fb3442cb04e58f9ebb334', class: "p-2" }, h("form-control-text", { key: '5234008261646f1a090686fc0d795a6e846c9e04', name: "terminal_id", label: "Terminal ID", inputHandler: this.debouncedSetParamsOnChange, defaultValue: this.params.terminal_id })), h("div", { key: 'fdd089fa29bf030ed3825993ff4e50a9ecefa1dc', class: "p-2" }, h("form-control-select", { key: '0c078ec1ecffea26e0cec5633cb4748337a75643', name: "status", label: "Status", options: this.terminalStatusOptions, inputHandler: this.setParamsOnChange, defaultValue: this.params.status || '' })))));
24
+ return (h("table-filters-menu", { key: '486847f69064b497b72521312d27097690eb19b2', params: this.params, clearParams: this.clearParams }, h("div", { key: '622e3572ff1cf85a60ffa30c4fa5d39780375abb', class: "grid-cols-2 gap-3 p-1" }, h("div", { key: '2cef9085c3d09e96907cdaa8330e8b8b80d8ceec', class: "p-2" }, h("form-control-text", { key: 'a3922b71cbdc93bbdddd519e44bad25379c6b5f4', name: "terminal_id", label: "Terminal ID", inputHandler: this.debouncedSetParamsOnChange, defaultValue: this.params.terminal_id })), h("div", { key: '1027edf52dc1ceacc4779b29bda4b7d08c8a3c8c', class: "p-2" }, h("form-control-select", { key: 'e1f122b2868282a64dccc99b3e9d19fe7cc768fb', name: "status", label: "Status", options: this.terminalStatusOptions, inputHandler: this.setParamsOnChange, defaultValue: this.params.status || '' })))));
25
25
  }
26
26
  };
27
27
 
@@ -19,10 +19,10 @@ const terminalTableColumns = {
19
19
  status: () => (h("th", { part: "table-head-cell", scope: "col", title: "The current status of each terminal" }, "Status")),
20
20
  };
21
21
  const terminalTableCells = {
22
- nickname: (value) => (h("td", null, value)),
23
- provider_id: (value) => (h("td", null, value)),
24
- sub_account_name: (value) => (h("td", null, value)),
25
- status: (value) => (h("td", { innerHTML: MapTerminalStatusToBadge(value) })),
22
+ nickname: (value) => (h("td", { part: "table-cell" }, value)),
23
+ provider_id: (value) => (h("td", { part: "table-cell" }, value)),
24
+ sub_account_name: (value) => (h("td", { part: "table-cell" }, value)),
25
+ status: (value) => (h("td", { part: "table-cell", innerHTML: MapTerminalStatusToBadge(value) })),
26
26
  };
27
27
 
28
28
  export { terminalTableCells as a, defaultColumnsKeys as d, terminalTableColumns as t };
@@ -3848,6 +3848,7 @@ var Dinero = function Dinero(options) {
3848
3848
 
3849
3849
  var dinero = Object.assign(Dinero, Defaults, Globals, Static);
3850
3850
 
3851
+ // Currency Formatting
3851
3852
  function formatCurrency(amount, withSymbol = true, withCurrencyName = false) {
3852
3853
  if (!amount)
3853
3854
  amount = 0;
@@ -3858,13 +3859,13 @@ function formatCurrency(amount, withSymbol = true, withCurrencyName = false) {
3858
3859
  const formattedAmount = amount < 0 ? `(${format(-amount)})` : format(amount);
3859
3860
  return withCurrencyName ? `${formattedAmount} USD` : formattedAmount;
3860
3861
  }
3862
+ // Date Formatting and Conversion
3861
3863
  function formatDate(dateString) {
3862
3864
  if (!dateString)
3863
3865
  return '';
3864
3866
  const date = new Date(dateString);
3865
3867
  return format(date, 'MMM d, yyyy');
3866
3868
  }
3867
- // eg. Oct 9, 2023
3868
3869
  function formatMediumDate(input) {
3869
3870
  // Check if input is a string and convert to Date object
3870
3871
  if (typeof input === 'string') {
@@ -3904,21 +3905,40 @@ function formatTimeSeconds(dateString) {
3904
3905
  const date = new Date(dateString);
3905
3906
  return format(date, 'h:mm:ssaaa');
3906
3907
  }
3907
- function extractComputedFontsToLoad() {
3908
- var _a;
3909
- const computedStyles = getComputedStyle(document.body);
3910
- return (((_a = computedStyles === null || computedStyles === void 0 ? void 0 : computedStyles.getPropertyValue('--jfi-load-google-font')) === null || _a === void 0 ? void 0 : _a.trim().replace(/'|"/g, '').replace(' ', '+')) || null);
3911
- }
3912
- /**
3913
- * Converts a snake_case string to a human-readable format by replacing underscores with spaces and capitalizing the first letter of each word.
3914
- *
3915
- * @param snakeCaseStr - The string in snake_case format.
3916
- * @returns The string transformed into a human-readable format.
3917
- *
3918
- * @example
3919
- * const readable = toReadableString('sole_proprietorship');
3920
- * console.log(readable); // Outputs: "Sole Proprietorship"
3921
- */
3908
+ const convertToUTC = (dateString, options) => {
3909
+ const { setEndOfDay, setExactTime } = options;
3910
+ if (!dateString)
3911
+ return '';
3912
+ const dateObj = new Date(dateString);
3913
+ if (setEndOfDay) {
3914
+ // Adjust the time to be at the very end of the day
3915
+ dateObj.setUTCHours(23, 59, 59, 999);
3916
+ return new Date(dateObj.toUTCString()).toISOString();
3917
+ }
3918
+ else if (setExactTime) {
3919
+ return new Date(dateObj.toUTCString()).toISOString();
3920
+ }
3921
+ };
3922
+ const convertToLocal = (dateString, options) => {
3923
+ const { showDisplayDate, showInputDate, showTime, showInputDateTime } = options;
3924
+ if (!dateString)
3925
+ return '';
3926
+ const dateObj = new Date(dateString);
3927
+ const localDate = new Date(dateObj.toLocaleString('en-US', { timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone }));
3928
+ if (showDisplayDate) {
3929
+ return format(localDate, 'MMM d, yyyy');
3930
+ }
3931
+ else if (showInputDate) {
3932
+ return format(localDate, 'yyyy-MM-dd');
3933
+ }
3934
+ else if (showTime) {
3935
+ return format(localDate, 'h:mmaaa');
3936
+ }
3937
+ else if (showInputDateTime) {
3938
+ return format(localDate, 'yyyy-MM-dd\'T\'HH:mm');
3939
+ }
3940
+ };
3941
+ // String Manipulation
3922
3942
  function snakeCaseToHumanReadable(snakeCaseStr) {
3923
3943
  if (!snakeCaseStr)
3924
3944
  return '';
@@ -3932,17 +3952,14 @@ function snakeToCamel(str) {
3932
3952
  return '';
3933
3953
  return str.replace(/([-_][a-z])/g, (group) => group.toUpperCase().replace('-', '').replace('_', ''));
3934
3954
  }
3935
- function composeQueryParams(values) {
3936
- const queryParams = values.map((value) => {
3937
- if (value === values[0]) {
3938
- return (value = `?${value}`);
3939
- }
3940
- else {
3941
- return (value = `&${value}`);
3942
- }
3943
- });
3944
- return queryParams.join('');
3955
+ // Object Utilities
3956
+ function isEmptyObject(obj) {
3957
+ return Object.keys(obj).length === 0 && obj.constructor === Object;
3945
3958
  }
3959
+ const isInRange = (num, min, max) => {
3960
+ return num >= min && num <= max;
3961
+ };
3962
+ // Font Loading
3946
3963
  async function loadFontsOnParent() {
3947
3964
  const parent = document.body;
3948
3965
  const fontsToLoad = extractComputedFontsToLoad();
@@ -3963,11 +3980,10 @@ async function loadFontsOnParent() {
3963
3980
  fonts.href = fontHref;
3964
3981
  parent.append(fonts);
3965
3982
  }
3966
- function isEmptyObject(obj) {
3967
- return Object.keys(obj).length === 0 && obj.constructor === Object;
3983
+ function extractComputedFontsToLoad() {
3984
+ var _a;
3985
+ const computedStyles = getComputedStyle(document.body);
3986
+ return (((_a = computedStyles === null || computedStyles === void 0 ? void 0 : computedStyles.getPropertyValue('--jfi-load-google-font')) === null || _a === void 0 ? void 0 : _a.trim().replace(/'|"/g, '').replace(' ', '+')) || null);
3968
3987
  }
3969
- const isInRange = (num, min, max) => {
3970
- return num >= min && num <= max;
3971
- };
3972
3988
 
3973
- export { formatDate as a, formatCurrency as b, formatDisplayDate as c, formatMediumDate as d, snakeToCamel as e, formatTime as f, isInRange as g, formatTimeSeconds as h, isEmptyObject as i, composeQueryParams as j, loadFontsOnParent as l, snakeCaseToHumanReadable as s };
3989
+ export { formatDate as a, formatCurrency as b, convertToLocal as c, formatDisplayDate as d, formatMediumDate as e, formatTime as f, convertToUTC as g, snakeToCamel as h, isEmptyObject as i, isInRange as j, formatTimeSeconds as k, loadFontsOnParent as l, snakeCaseToHumanReadable as s };
@@ -1,3 +1,14 @@
1
+ function composeQueryParams(values) {
2
+ const queryParams = values.map((value) => {
3
+ if (value === values[0]) {
4
+ return (value = `?${value}`);
5
+ }
6
+ else {
7
+ return (value = `&${value}`);
8
+ }
9
+ });
10
+ return queryParams.join('');
11
+ }
1
12
  const onFilterChange = (newFilters, params) => {
2
13
  let newParams = Object.assign({}, params);
3
14
  delete newParams.before_cursor;
@@ -19,4 +30,4 @@ const hasFilters = (params) => {
19
30
  return !!filterKeys.length;
20
31
  };
21
32
 
22
- export { hasFilters as h, onFilterChange as o };
33
+ export { composeQueryParams as c, hasFilters as h, onFilterChange as o };