@justifi/webcomponents 4.22.2 → 4.23.1

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 (370) hide show
  1. package/dist/cjs/{Analytics-99a3c7f8.js → Analytics-7ab90cae.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-f5591026.js} +2 -2
  6. package/dist/cjs/{business-identity-schema-3d241053.js → business-identity-schema-804a4bd7.js} +1 -1
  7. package/dist/cjs/{check-pkg-version-9bd49ad6.js → check-pkg-version-fe8c72a9.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-6d1daab8.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-f0363047.js} +1 -13
  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 +2 -11
  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-77dc80f3.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-d94f8975.js} +2 -2
  119. package/dist/esm/{business-identity-schema-b31178a1.js → business-identity-schema-2756dbc6.js} +1 -1
  120. package/dist/esm/{check-pkg-version-5e658940.js → check-pkg-version-fbf01ce7.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-627f73c1.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-93a9d504.js} +1 -13
  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 +1 -13
  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-22e38d5b.js → p-25d2ed4c.js} +1 -1
  270. package/dist/webcomponents/p-286b87ab.js +1 -0
  271. package/dist/webcomponents/p-28bd6dcd.js +1 -0
  272. package/dist/webcomponents/{p-90b8acc6.js → p-297faf3d.js} +1 -1
  273. package/dist/webcomponents/{p-5fd72c29.entry.js → p-29c8fa3d.entry.js} +1 -1
  274. package/dist/webcomponents/p-2f422aad.entry.js +1 -0
  275. package/dist/webcomponents/{p-869ae0c7.entry.js → p-3186d1fb.entry.js} +1 -1
  276. package/dist/webcomponents/p-3bfb4f80.entry.js +1 -0
  277. package/dist/webcomponents/p-3db8b3c7.js +1 -0
  278. package/dist/webcomponents/{p-927a147c.entry.js → p-3ed7fc42.entry.js} +1 -1
  279. package/dist/webcomponents/{p-eed325b7.entry.js → p-404a847c.entry.js} +1 -1
  280. package/dist/webcomponents/{p-a91a2152.entry.js → p-41c1c1f7.entry.js} +1 -1
  281. package/dist/webcomponents/{p-c458fc48.entry.js → p-41c7ee13.entry.js} +1 -1
  282. package/dist/webcomponents/p-420adedb.entry.js +1 -0
  283. package/dist/webcomponents/{p-83b01812.entry.js → p-431d7a9e.entry.js} +1 -1
  284. package/dist/webcomponents/p-448826a7.entry.js +1 -0
  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-4cf7f4ae.js +1 -0
  289. package/dist/webcomponents/{p-09fb7dd6.entry.js → p-52f9d8a0.entry.js} +1 -1
  290. package/dist/webcomponents/p-54145a37.entry.js +1 -0
  291. package/dist/webcomponents/p-544a4e7a.js +1 -0
  292. package/dist/webcomponents/{p-b459d0b0.js → p-57125bd1.js} +1 -1
  293. package/dist/webcomponents/p-5ec82df8.entry.js +1 -0
  294. package/dist/webcomponents/{p-286a4e72.entry.js → p-628693c1.entry.js} +1 -1
  295. package/dist/webcomponents/{p-02cf5e6f.js → p-673cf8c4.js} +1 -1
  296. package/dist/webcomponents/{p-c30c8f39.entry.js → p-69527219.entry.js} +1 -1
  297. package/dist/webcomponents/p-6d51aed8.entry.js +1 -0
  298. package/dist/webcomponents/{p-9e7204b5.js → p-8037704c.js} +1 -1
  299. package/dist/webcomponents/p-89f6691e.js +1 -0
  300. package/dist/webcomponents/p-91de21cc.js +1 -0
  301. package/dist/webcomponents/{p-55f78fcc.entry.js → p-942be28b.entry.js} +1 -1
  302. package/dist/webcomponents/p-95ec39f6.entry.js +1 -0
  303. package/dist/webcomponents/p-9690eca9.entry.js +1 -0
  304. package/dist/webcomponents/{p-efb56234.entry.js → p-a7830e98.entry.js} +1 -1
  305. package/dist/webcomponents/p-abe513e6.entry.js +1 -0
  306. package/dist/webcomponents/p-ada9ac19.entry.js +1 -0
  307. package/dist/webcomponents/p-b0311e88.js +1 -0
  308. package/dist/webcomponents/{p-91711083.entry.js → p-b0dc68b3.entry.js} +1 -1
  309. package/dist/webcomponents/p-b3cac576.entry.js +1 -0
  310. package/dist/webcomponents/{p-0c03a971.entry.js → p-b97233cc.entry.js} +1 -1
  311. package/dist/webcomponents/p-bb71cef3.js +1 -0
  312. package/dist/webcomponents/{p-2a9f48f0.entry.js → p-bc1984ec.entry.js} +1 -1
  313. package/dist/webcomponents/{p-c5c6e61d.js → p-bc8205ec.js} +1 -1
  314. package/dist/webcomponents/{p-a8f22d4d.js → p-c13a7d10.js} +1 -1
  315. package/dist/webcomponents/p-c3fb5d3a.entry.js +1 -0
  316. package/dist/webcomponents/p-c420cb7d.entry.js +1 -0
  317. package/dist/webcomponents/p-c8243721.js +1 -0
  318. package/dist/webcomponents/p-cd19c597.entry.js +1 -0
  319. package/dist/webcomponents/{p-7fec2bcb.js → p-d1f75fa6.js} +1 -1
  320. package/dist/webcomponents/{p-2dc7751f.entry.js → p-d291dc4c.entry.js} +1 -1
  321. package/dist/webcomponents/{p-7a8c13ba.entry.js → p-da176d01.entry.js} +1 -1
  322. package/dist/webcomponents/{p-2c8c214f.entry.js → p-dcb288a3.entry.js} +1 -1
  323. package/dist/webcomponents/p-df3ca87f.entry.js +1 -0
  324. package/dist/webcomponents/p-df5a1202.entry.js +1 -0
  325. package/dist/webcomponents/p-e2ce097c.js +1 -0
  326. package/dist/webcomponents/{p-eeb70281.entry.js → p-e5790011.entry.js} +1 -1
  327. package/dist/webcomponents/{p-8e2e24d8.entry.js → p-e8be1b55.entry.js} +1 -1
  328. package/dist/webcomponents/p-e99957ff.entry.js +1 -0
  329. package/dist/webcomponents/p-ed95feec.entry.js +1 -0
  330. package/dist/webcomponents/{p-92a766d8.entry.js → p-f28a4c03.entry.js} +1 -1
  331. package/dist/webcomponents/{p-8f212554.entry.js → p-f698d6d9.entry.js} +1 -1
  332. package/dist/webcomponents/{p-9ef4d294.entry.js → p-fc6f697d.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-0ec27543.entry.js +0 -1
  341. package/dist/webcomponents/p-0f7b9555.entry.js +0 -1
  342. package/dist/webcomponents/p-1251a3f5.entry.js +0 -1
  343. package/dist/webcomponents/p-1ab798f4.entry.js +0 -1
  344. package/dist/webcomponents/p-269ba6fe.entry.js +0 -1
  345. package/dist/webcomponents/p-2c2b57b3.js +0 -1
  346. package/dist/webcomponents/p-2c51d29f.js +0 -1
  347. package/dist/webcomponents/p-3f82f724.entry.js +0 -1
  348. package/dist/webcomponents/p-44f7f729.entry.js +0 -1
  349. package/dist/webcomponents/p-47dbe17d.js +0 -1
  350. package/dist/webcomponents/p-4b14abbf.entry.js +0 -1
  351. package/dist/webcomponents/p-638c6285.entry.js +0 -1
  352. package/dist/webcomponents/p-7285c687.js +0 -1
  353. package/dist/webcomponents/p-8480e3ab.entry.js +0 -1
  354. package/dist/webcomponents/p-88efdd31.js +0 -1
  355. package/dist/webcomponents/p-8ec550d7.entry.js +0 -1
  356. package/dist/webcomponents/p-919e6e67.entry.js +0 -1
  357. package/dist/webcomponents/p-935188c8.entry.js +0 -1
  358. package/dist/webcomponents/p-9f56ad71.js +0 -1
  359. package/dist/webcomponents/p-ad443df5.entry.js +0 -1
  360. package/dist/webcomponents/p-b16269d7.js +0 -1
  361. package/dist/webcomponents/p-bba131f9.entry.js +0 -1
  362. package/dist/webcomponents/p-c717646f.entry.js +0 -1
  363. package/dist/webcomponents/p-cd4eaeb7.js +0 -1
  364. package/dist/webcomponents/p-cd7e866c.entry.js +0 -1
  365. package/dist/webcomponents/p-e333620e.js +0 -1
  366. package/dist/webcomponents/p-e412a713.entry.js +0 -1
  367. package/dist/webcomponents/p-e6be8845.entry.js +0 -1
  368. package/dist/webcomponents/p-e8797be0.entry.js +0 -1
  369. package/dist/webcomponents/p-f45197b9.entry.js +0 -1
  370. package/dist/webcomponents/p-fc4de0d2.js +0 -1
@@ -5,17 +5,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-fb499e95.js');
6
6
  require('./Checkout-a528241d.js');
7
7
  const Pagination = require('./Pagination-0da8f095.js');
8
- require('./Payment-04a842f4.js');
9
- require('./SubAccount-cc95a4a0.js');
10
- const utils = require('./utils-3d84442d.js');
8
+ require('./Payment-87b47c43.js');
9
+ require('./SubAccount-fda5ec5b.js');
11
10
  const ComponentError = require('./ComponentError-233ac749.js');
12
- const tableLoadingState = require('./table-loading-state-8b406852.js');
13
- const payoutsStatus = require('./payouts-status-2f7be07d.js');
14
-
15
- const DownloadIcon = (props) => (index.h("svg", Object.assign({ xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 24 24' }, props),
16
- index.h("path", { d: 'M12 15.5l-5-5 1.41-1.41L12 12.67l3.59-3.58L17 10.5l-5 5z' }),
17
- index.h("path", { d: 'M11 4h2v9h-2z' }),
18
- index.h("path", { d: 'M5 18h14v2H5z' })));
11
+ const table = require('./table-ec9ce9f7.js');
12
+ const utils = require('./utils-ba79e868.js');
13
+ const payoutsTable = require('./payouts-table-4858eb84.js');
14
+ require('./utils-e88fbc94.js');
15
+ require('./payouts-status-2f7be07d.js');
19
16
 
20
17
  const PayoutsListCore = class {
21
18
  constructor(hostRef) {
@@ -34,9 +31,6 @@ const PayoutsListCore = class {
34
31
  },
35
32
  });
36
33
  };
37
- this.handleDateChange = (name, value) => {
38
- this.params = Object.assign(Object.assign({}, this.params), { [name]: value });
39
- };
40
34
  this.handleClickPrevious = (beforeCursor) => {
41
35
  const newParams = Object.assign({}, this.params);
42
36
  delete newParams.after_cursor;
@@ -53,29 +47,72 @@ const PayoutsListCore = class {
53
47
  return;
54
48
  this.rowClicked.emit(this.payouts.find((payout) => payout.id === clickedPayoutID));
55
49
  };
50
+ this.setParamsOnChange = (name, value) => {
51
+ let newParams = { [name]: value };
52
+ this.params = utils.onFilterChange(newParams, this.params);
53
+ };
54
+ this.clearParams = () => {
55
+ this.errorMessage = '';
56
+ this.params = {};
57
+ };
56
58
  this.getPayouts = undefined;
59
+ this.getSubAccounts = undefined;
57
60
  this.getPayoutCSV = undefined;
61
+ this.columns = undefined;
58
62
  this.payouts = [];
63
+ this.payoutsTable = undefined;
64
+ this.subAccounts = [];
59
65
  this.loading = true;
60
66
  this.errorMessage = undefined;
61
67
  this.paging = Pagination.pagingDefaults;
62
- this.params = undefined;
68
+ this.params = {};
63
69
  }
64
70
  updateOnPropChange() {
65
- this.fetchData();
71
+ this.fetchPayouts();
66
72
  }
67
73
  componentWillLoad() {
68
- if (this.getPayouts) {
69
- this.fetchData();
74
+ this.payoutsTable = new table.Table(this.payouts, this.columns, payoutsTable.payoutTableColumns, payoutsTable.payoutTableCells(this.downloadCSV));
75
+ if (this.getPayouts && this.getSubAccounts) {
76
+ this.fetchPayouts();
70
77
  }
71
78
  }
72
- fetchData() {
79
+ fetchPayouts() {
73
80
  this.loading = true;
74
81
  this.getPayouts({
75
82
  params: this.params,
76
83
  onSuccess: ({ payouts, pagingInfo }) => {
77
84
  this.payouts = payouts;
78
85
  this.paging = pagingInfo;
86
+ this.payoutsTable.collectionData = this.payouts;
87
+ const shouldFetchSubAccounts = this.payoutsTable.columnKeys.includes('sub_account_name');
88
+ if (shouldFetchSubAccounts) {
89
+ this.fetchSubAccounts();
90
+ }
91
+ else {
92
+ this.loading = false;
93
+ }
94
+ },
95
+ onError: ({ error, code, severity }) => {
96
+ this.errorMessage = error;
97
+ this.errorEvent.emit({
98
+ errorCode: code,
99
+ message: error,
100
+ severity,
101
+ });
102
+ this.loading = false;
103
+ },
104
+ });
105
+ }
106
+ async fetchSubAccounts() {
107
+ this.getSubAccounts({
108
+ params: this.subAccountParams,
109
+ onSuccess: ({ subAccounts }) => {
110
+ this.subAccounts = subAccounts;
111
+ this.payouts = this.payouts.map((payout) => {
112
+ var _a;
113
+ payout.sub_account_name = (_a = this.subAccounts.find((subAccount) => subAccount.id === payout.account_id)) === null || _a === void 0 ? void 0 : _a.name;
114
+ return payout;
115
+ });
79
116
  this.loading = false;
80
117
  },
81
118
  onError: ({ error, code, severity }) => {
@@ -89,61 +126,31 @@ const PayoutsListCore = class {
89
126
  },
90
127
  });
91
128
  }
129
+ get subAccountParams() {
130
+ let accountIdNumbers = this.payouts.map((payout) => payout.account_id);
131
+ let uniqueAccountIds = [...new Set(accountIdNumbers)];
132
+ let accountIdString = uniqueAccountIds.join(',');
133
+ return { sub_account_id: accountIdString };
134
+ }
92
135
  get entityId() {
93
136
  return this.payouts.map((payout) => payout.id);
94
137
  }
95
- get columnData() {
96
- return [
97
- ['Paid Out On', 'The date each transaction occurred'],
98
- ['Type', 'The type of each transaction'],
99
- ['Account', 'The ID of the account associated with each payout'],
100
- ['Paid Out To', 'The bank account to which each payout was transferred'],
101
- ['Payments', 'Sum of payments in each payout'],
102
- ['Refunds', 'Sum of refunds in each payout'],
103
- ['Fees', 'Sum of fees in each payout'],
104
- ['Other', 'Sum of less common transactions in each payout'],
105
- ['Payout Amount', 'The net sum of all transactions in each payout'],
106
- ['Status', 'The real-time status of each payout'],
107
- ['Actions', ''],
108
- ];
109
- }
110
- get rowData() {
111
- return this.payouts.map((payout) => [
112
- {
113
- type: 'head',
114
- value: `
115
- <div class='fw-bold'>${utils.formatDate(payout.created_at)}</div>
116
- <div class='fw-bold'>${utils.formatTime(payout.created_at)}</div>
117
- `,
118
- },
119
- payout.payout_type,
120
- payout.account_id,
121
- `${payout.bank_account.full_name} ${payout.bank_account.account_number_last4}`,
122
- utils.formatCurrency(payout.payments_total),
123
- utils.formatCurrency(payout.refunds_total),
124
- utils.formatCurrency(payout.fees_total),
125
- utils.formatCurrency(payout.other_total),
126
- utils.formatCurrency(payout.amount),
127
- { type: 'inner', value: payoutsStatus.MapPayoutStatusToBadge(payout.status) },
128
- (index.h(DownloadIcon, { title: "Export CSV", onClick: () => this.downloadCSV(payout.id), style: { height: '24px', width: '24px', cursor: 'pointer' } })),
129
- ]);
130
- }
131
138
  get showEmptyState() {
132
- return !this.loading && !this.errorMessage && this.rowData.length < 1;
139
+ return !this.loading && !this.errorMessage && this.payoutsTable.rowData.length < 1;
133
140
  }
134
141
  get showErrorState() {
135
142
  return !this.loading && !!this.errorMessage;
136
143
  }
137
144
  get showRowData() {
138
- return !this.showEmptyState && !this.showErrorState;
145
+ return !this.showEmptyState && !this.showErrorState && !this.loading;
139
146
  }
140
147
  render() {
141
- return (index.h("div", { key: '536d8a921bb7b6517dc65afd307507668e74e92f' }, index.h("div", { key: '5d33c651af05927db51e7d855772ff1c60f71ef0', class: "row gy-3 mb-4" }, index.h("div", { key: '53f246db4d96ef4ac445c0b57d4da3471c9fdbdb', class: "col-2" }, index.h("form-control-date", { key: 'd6e711e3e92e53cff8e2ee4a8c4a3788584c0f77', name: "created_after", label: "Date from:", inputHandler: this.handleDateChange })), index.h("div", { key: '86ab746d1e7f9e11dfeca4cd185909d9d447fe85', class: "col-2" }, index.h("form-control-date", { key: '232edbf8284d14ed3659a199b144eb5596e22b88', name: "created_before", label: "Date to:", inputHandler: this.handleDateChange }))), index.h("div", { key: '10c720e38bd24ff9431d59a28ec46f62bd8c04a7', class: "table-wrapper" }, index.h("table", { key: 'fdbf0978c018315d5e67caf9273e59bf4e50205c', class: "table table-hover" }, index.h("thead", { key: 'f3fc1532a46f8b92eff8d385462fe8ba9448840b', class: "table-head sticky-top", part: "table-head" }, index.h("tr", { key: 'fe552206bf026258b40031c10a030fb32f98879d', class: "table-light text-nowrap", part: "table-head-row" }, this.columnData.map((column) => (index.h("th", { part: "table-head-cell", scope: "col", title: Array.isArray(column) ? column[1] : '' }, Array.isArray(column) ? column[0] : column))))), index.h("tbody", { key: '1247efd4d95cfb257d052acf9dbcac84203aaaaf', class: "table-body", part: "table-body" }, index.h(tableLoadingState.TableLoadingState, { key: '1107d1a965651133504db486d4d0b692fe9735e9', columnSpan: this.columnData.length, isLoading: this.loading }), index.h(tableLoadingState.TableEmptyState, { key: '8435806053ae9d16a05cc031f33d3b97e4d02248', isEmpty: this.showEmptyState, columnSpan: this.columnData.length }), index.h(tableLoadingState.TableErrorState, { key: '01213ac9d7f63e0eaa11c38f4aebe59aef3650d9', columnSpan: this.columnData.length, errorMessage: this.errorMessage }), this.showRowData &&
142
- this.rowData.map((data, index$1) => (index.h("tr", { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index$1], onClick: this.rowClickHandler, part: `table-row ${index$1 % 2 ? 'table-row-even' : 'table-row-odd'}` }, data.map((dataEntry) => ((dataEntry === null || dataEntry === void 0 ? void 0 : dataEntry.type) ? (index.h("td", { part: "table-cell", innerHTML: dataEntry.value })) : (index.h("td", { part: "table-cell" }, dataEntry)))))))), this.paging && (index.h("tfoot", { key: 'd2a1b0dd2340cf64816ad05c1c03f136b21df0a6', class: "sticky-bottom" }, index.h("tr", { key: 'abb87b7c026475da175a6bec772887bf3ac08933', class: "table-light align-middle" }, index.h("td", { key: '32070f512aebc77a42693a93e717d31ef9ed4509', part: "pagination-bar", colSpan: this.columnData.length }, index.h("pagination-menu", { key: '57ee656553f4afee96f5dbdac5866f103cde97eb', paging: Object.assign(Object.assign({}, this.paging), { handleClickPrevious: this.handleClickPrevious, handleClickNext: this.handleClickNext }), params: this.params })))))))));
148
+ return (index.h("div", { key: '3768192e14155536f0fb53d2abc5f1e92b04cc01' }, index.h("payouts-list-filters", { key: '3fec8cfc6b9d68798148e9eea0725079d32e3406', params: this.params, setParamsOnChange: this.setParamsOnChange, clearParams: this.clearParams }), index.h("div", { key: '291b7a53bb5657c87568169ebccc1dead39d10c9', class: "table-wrapper" }, index.h("table", { key: '624389fddf8b00dcaf70a75693b542b2f4af4982', class: "table table-hover" }, index.h("thead", { key: '1e28a2a6988eac106c40b8f029d9fa2118cbdb6d', class: "table-head sticky-top", part: "table-head" }, index.h("tr", { key: '1f05dd4c54fb350545cf6b1b3e86b80d96932585', class: "table-light text-nowrap", part: "table-head-row" }, this.payoutsTable.columnData.map((column) => column))), index.h("tbody", { key: '3af09dc61461f31f61c2cfdf7896b7dfe9441450', class: "table-body", part: "table-body" }, index.h(table.TableLoadingState, { key: '715a3d0732e45810bdfdcbe5c7db8f29934a1a62', columnSpan: this.payoutsTable.columnKeys.length, isLoading: this.loading }), index.h(table.TableEmptyState, { key: '3aac2554828eac0c6b0645da5df811b5e5463235', isEmpty: this.showEmptyState, columnSpan: this.payoutsTable.columnKeys.length }), index.h(table.TableErrorState, { key: 'cf2b312830b9f59550346085f00bc519e496b2b2', columnSpan: this.payoutsTable.columnKeys.length, errorMessage: this.errorMessage }), this.showRowData && this.payoutsTable.rowData.map((data, index$1) => (index.h("tr", { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index$1], onClick: this.rowClickHandler, part: `table-row ${index$1 % 2 ? "table-row-even" : "table-row-odd"}` }, data)))), this.paging && (index.h("tfoot", { key: '3d7389fb825a7eafcd456b3ae95b115a4218fea3', class: "sticky-bottom" }, index.h("tr", { key: '4c10aa64144a281d8303b04f013bfcc2390f4d04', class: "table-light align-middle" }, index.h("td", { key: '63614e636203a5f15beb26b4d19eed393b6ea481', part: "pagination-bar", colSpan: this.payoutsTable.columnData.length }, index.h("pagination-menu", { key: '7708ac8b21d2db0ec9ade773dd46cd944374ede5', paging: Object.assign(Object.assign({}, this.paging), { handleClickPrevious: this.handleClickPrevious, handleClickNext: this.handleClickNext }), params: this.params })))))))));
143
149
  }
144
150
  static get watchers() { return {
145
151
  "params": ["updateOnPropChange"],
146
- "getPayouts": ["updateOnPropChange"]
152
+ "getPayouts": ["updateOnPropChange"],
153
+ "getSubAccounts": ["updateOnPropChange"]
147
154
  }; }
148
155
  };
149
156
 
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-fb499e95.js');
6
+ const utils = require('./utils-e88fbc94.js');
7
+
8
+ const PayoutsListFilters = class {
9
+ constructor(hostRef) {
10
+ index.registerInstance(this, hostRef);
11
+ this.handleDateInput = (name, value) => {
12
+ const utcDate = utils.convertToUTC(value, { setEndOfDay: true });
13
+ this.setParamsOnChange(name, utcDate);
14
+ };
15
+ this.params = undefined;
16
+ this.setParamsOnChange = undefined;
17
+ this.clearParams = undefined;
18
+ }
19
+ render() {
20
+ return (index.h("table-filters-menu", { key: '2f80b6ac3308af53f20f1c8c8fbc596937eeda1d', params: this.params, clearParams: this.clearParams }, index.h("div", { key: '6e0bf319268d1bcbbd81e922f0855eb1c497815f', class: "grid-cols-2 gap-3 p-1" }, index.h("div", { key: '8c29a63ea0c4836a0b002db9adc75ea69cdde988', class: "p-2" }, index.h("form-control-date", { key: '74399fdd150d71758f817454944ef34c9b443240', name: "created_after", label: "Created After", inputHandler: this.handleDateInput, defaultValue: utils.convertToLocal(this.params.created_after, { showInputDate: true }) })), index.h("div", { key: 'e98911d5b92ed5a6642d8f59b23abbebf4f1f85b', class: "p-2" }, index.h("form-control-date", { key: '4f233e95aeae496357938c69f25336123fbf1f0f', name: "created_before", label: "Created Before", inputHandler: this.handleDateInput, defaultValue: utils.convertToLocal(this.params.created_before, { showInputDate: true }) })))));
21
+ }
22
+ };
23
+
24
+ exports.payouts_list_filters = PayoutsListFilters;
@@ -0,0 +1,37 @@
1
+ 'use strict';
2
+
3
+ const index = require('./index-fb499e95.js');
4
+ const utils = require('./utils-e88fbc94.js');
5
+ const payoutsStatus = require('./payouts-status-2f7be07d.js');
6
+
7
+ const defaultColumnsKeys = 'created_at,amount,status,payments_total,refunds_total,fees_total,other_total,csv';
8
+ const payoutTableColumns = {
9
+ created_at: () => (index.h("th", { part: "table-head-cell", scope: "col", title: "The date the payout was deposited" }, "Created")),
10
+ sub_account_name: () => (index.h("th", { part: "table-head-cell", scope: "col", title: "The sub account associated with the payout" }, "Sub Account")),
11
+ payments_total: () => (index.h("th", { part: "table-head-cell", scope: "col", title: "The total payments amount associated with the payout" }, "Payments")),
12
+ refunds_total: () => (index.h("th", { part: "table-head-cell", scope: "col", title: "The total refunds amount associated with the payout" }, "Refunds")),
13
+ fees_total: () => (index.h("th", { part: "table-head-cell", scope: "col", title: "The total fees amount associated with the payout" }, "Fees")),
14
+ other_total: () => (index.h("th", { part: "table-head-cell", scope: "col", title: "The total other amount" }, "Other")),
15
+ amount: () => (index.h("th", { part: "table-head-cell", scope: "col", title: "The total amount of the payout" }, "Amount")),
16
+ status: () => (index.h("th", { part: "table-head-cell", scope: "col", title: "The real-time status of each payout" }, "Status")),
17
+ csv: () => (index.h("th", { part: "table-head-cell", scope: "col", title: "Export CSV" })),
18
+ };
19
+ const payoutTableCells = (downloadCSV) => ({
20
+ created_at: (value) => (index.h("td", { part: "table-cell" },
21
+ index.h("div", { class: "fw-bold" },
22
+ utils.convertToLocal(value, { showDisplayDate: true }),
23
+ " "))),
24
+ sub_account_name: (value) => (index.h("td", { part: "table-cell" }, value)),
25
+ payments_total: (value) => (index.h("td", { part: "table-cell" }, utils.formatCurrency(value))),
26
+ refunds_total: (value) => (index.h("td", { part: "table-cell" }, utils.formatCurrency(value))),
27
+ fees_total: (value) => (index.h("td", { part: "table-cell" }, utils.formatCurrency(value))),
28
+ other_total: (value) => (index.h("td", { part: "table-cell" }, utils.formatCurrency(value))),
29
+ amount: (value) => (index.h("td", { part: "table-cell" }, utils.formatCurrency(value))),
30
+ status: (value) => (index.h("td", { part: "table-cell", innerHTML: payoutsStatus.MapPayoutStatusToBadge(value) })),
31
+ csv: (value) => (index.h("td", { part: "table-cell" },
32
+ index.h("a", { href: "#", onClick: (event) => { event.preventDefault(); downloadCSV(value); } }, "CSV"))),
33
+ });
34
+
35
+ exports.defaultColumnsKeys = defaultColumnsKeys;
36
+ exports.payoutTableCells = payoutTableCells;
37
+ exports.payoutTableColumns = payoutTableColumns;
@@ -20,13 +20,10 @@ const validateRoutingNumber = (routingNumber) => {
20
20
  }
21
21
  return false;
22
22
  };
23
- const businessNameRegex = /^(?!^\s+$)[a-zA-Z0-9\s,&.-]*$/;
24
23
  const phoneRegex = /^\d{10}$/;
25
24
  const urlRegex = /^(?:http(s)?:\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/;
26
- const stringLettersOnlyRegex = /^(?!^\s+$)[a-zA-Z\s]*$/;
27
25
  const numbersOnlyRegex = /^\d+$/;
28
26
  const ssnRegex = /^(?!000|666|9\d{2})\d{3}(?!00)\d{2}(?!0000)\d{4}$/;
29
- const streetAddressRegex = /^(?!^\s+$)[a-zA-Z0-9\s,&.-]*$/;
30
27
  const poBoxRegex = /P\.?\s?O\.?\s?Box|Postal\sBox/i;
31
28
 
32
29
  exports.EntityDocumentType = void 0;
@@ -94,12 +91,10 @@ const phoneValidation = index_esm.create$6()
94
91
  const businessNameValidation = index_esm.create$6()
95
92
  .min(2, 'Name must be at least 2 characters')
96
93
  .max(100, 'Name must be less than 100 characters')
97
- .matches(businessNameRegex, 'Enter valid business name')
98
94
  .transform(transformEmptyString);
99
95
  const doingBusinessAsValidation = index_esm.create$6()
100
96
  .min(2, 'Name must be at least 2 characters')
101
97
  .max(100, 'Name must be less than 100 characters')
102
- .matches(businessNameRegex, 'Enter valid doing business as')
103
98
  .transform(transformEmptyString);
104
99
  const websiteUrlValidation = index_esm.create$6()
105
100
  .matches(urlRegex, 'Enter valid website url')
@@ -110,7 +105,6 @@ const businessClassificationValidation = index_esm.create$6()
110
105
  const industryValidation = index_esm.create$6()
111
106
  .min(2, 'Industry must be at least 2 characters')
112
107
  .max(50, 'Industry must be less than 50 characters')
113
- .matches(stringLettersOnlyRegex, 'Enter valid industry')
114
108
  .transform(transformEmptyString);
115
109
  const taxIdValidation = index_esm.create$6()
116
110
  .matches(numbersOnlyRegex, 'Enter valid tax id, SSN, or EIN')
@@ -136,7 +130,6 @@ const identityNameValidation = index_esm.create$6()
136
130
  const identityTitleValidation = index_esm.create$6()
137
131
  .min(2, 'Title must be at least 2 characters')
138
132
  .max(50, 'Title must be less than 50 characters')
139
- .matches(stringLettersOnlyRegex, 'Enter valid title')
140
133
  .transform(transformEmptyString);
141
134
  const dobValidation = (role) => {
142
135
  return (index_esm.create$6()
@@ -171,14 +164,12 @@ const ssnValidation = index_esm.create$6()
171
164
  const lineOneValidation = index_esm.create$6()
172
165
  .min(5, 'Address must be at least 5 characters')
173
166
  .max(100, 'Address must be less than 100 characters')
174
- .matches(streetAddressRegex, 'Enter valid address line 1')
175
167
  .test('not-po-box', 'A PO Box is not a valid address entry', (value) => {
176
168
  return !poBoxRegex.test(value);
177
169
  })
178
170
  .transform(transformEmptyString);
179
171
  const lineTwoValidation = index_esm.create$6()
180
172
  .max(100, 'Address must be less than 100 characters')
181
- .matches(streetAddressRegex, 'Enter valid address line 2')
182
173
  .test('not-po-box', 'A PO Box is not a valid address entry', (value) => {
183
174
  return !poBoxRegex.test(value);
184
175
  })
@@ -186,7 +177,6 @@ const lineTwoValidation = index_esm.create$6()
186
177
  const cityValidation = index_esm.create$6()
187
178
  .min(2, 'City must be at least 2 characters')
188
179
  .max(50, 'City must be less than 50 characters')
189
- .matches(stringLettersOnlyRegex, 'Enter valid city')
190
180
  .transform(transformEmptyString);
191
181
  const stateValidation = index_esm.create$6()
192
182
  .oneOf(stateOptions.StateOptions.map((option) => option.value), 'Select state')
@@ -223,18 +213,16 @@ const otherPaymentDetailsValidation = index_esm.create$6()
223
213
  const bankNameValidation = index_esm.create$6()
224
214
  .min(2, 'Name must be at least 2 characters')
225
215
  .max(50, 'Name must be less than 50 characters')
226
- .matches(stringLettersOnlyRegex, 'Enter valid bank name')
227
216
  .transform(transformEmptyString);
228
217
  const nicknameValidation = index_esm.create$6()
229
218
  .min(2, 'Name must be at least 2 characters')
230
219
  .max(50, 'Name must be less than 50 characters')
231
- .matches(stringLettersOnlyRegex, 'Enter valid nickname')
232
220
  .transform(transformEmptyString);
233
221
  const accountTypeValidation = index_esm.create$6()
234
222
  .oneOf(businessFormOptions.bankAccountTypeOptions.map((option) => option.value), 'Select account type')
235
223
  .transform(transformEmptyString);
236
224
  const accountNumberValidation = index_esm.create$6()
237
- .min(8, 'Account number must be at least 8 digits')
225
+ .min(7, 'Account number must be at least 7 digits')
238
226
  .max(17, 'Account number must be less than 17 digits')
239
227
  .matches(numbersOnlyRegex, 'Enter valid account number')
240
228
  .test('not-repeat', 'Enter valid account number', (value) => {
@@ -33,6 +33,27 @@ const TableLoadingState = (props) => {
33
33
  index.h("span", { class: "visually-hidden" }, "Loading...")))));
34
34
  };
35
35
 
36
+ class Table {
37
+ get columnData() {
38
+ return this.columnKeys.map((key) => this.tableColumns[key]());
39
+ }
40
+ get rowData() {
41
+ return this.collection.map((dataEntry) => {
42
+ return this.columnKeys.map((key) => this.tableCells[key](dataEntry[key]));
43
+ });
44
+ }
45
+ set collectionData(collection) {
46
+ this.collection = collection;
47
+ }
48
+ constructor(collection, columns, tableColumns, tableCells) {
49
+ this.columnKeys = columns.split(',');
50
+ this.collection = collection;
51
+ this.tableColumns = tableColumns;
52
+ this.tableCells = tableCells;
53
+ }
54
+ }
55
+
56
+ exports.Table = Table;
36
57
  exports.TableEmptyState = TableEmptyState;
37
58
  exports.TableErrorState = TableErrorState;
38
59
  exports.TableLoadingState = TableLoadingState;
@@ -5,12 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-fb499e95.js');
6
6
  require('./Checkout-a528241d.js');
7
7
  const Pagination = require('./Pagination-0da8f095.js');
8
- require('./Payment-04a842f4.js');
9
- require('./SubAccount-cc95a4a0.js');
10
- const tableLoadingState = require('./table-loading-state-8b406852.js');
11
- const utils = require('./utils-f8a6962c.js');
12
- const terminalsTable = require('./terminals-table-99a7b87b.js');
13
- const table = require('./table-20e9a053.js');
8
+ require('./Payment-87b47c43.js');
9
+ require('./SubAccount-fda5ec5b.js');
10
+ const table = require('./table-ec9ce9f7.js');
11
+ const utils = require('./utils-ba79e868.js');
12
+ const terminalsTable = require('./terminals-table-12410159.js');
14
13
 
15
14
  const TerminalsListCore = class {
16
15
  constructor(hostRef) {
@@ -130,7 +129,7 @@ const TerminalsListCore = class {
130
129
  return !this.showEmptyState && !this.showErrorState && !this.loading;
131
130
  }
132
131
  render() {
133
- return (index.h("div", { key: '7f8bc3f39c1250281c2f2ad6fe081fc71bb20e79' }, index.h("terminals-list-filters", { key: 'd1184427fc74d970bd69d56a00d0ef4b7672516b', params: this.params, setParamsOnChange: this.setParamsOnChange, clearParams: this.clearParams }), index.h("div", { key: '582e37429a153cd17bf3c7ebb16e7330c774f986', class: "table-wrapper" }, index.h("table", { key: '1c03b2ddc8ca2da6b1f2147113f7832b3f27ec1d', class: "table table-hover" }, index.h("thead", { key: '811d48219cc04256f4a37854504252ff53392bd9', class: "table-head sticky-top", part: "table-head" }, index.h("tr", { key: 'fafa54ac3abba993dcf38ca2e47f248031226041', class: "table-light text-nowrap", part: "table-head-row" }, this.terminalsTable.columnData.map((column) => column))), index.h("tbody", { key: '8c9072bf6ebb7f720f1fad0faa47c72c8ed84dd2', class: "table-body", part: "table-body" }, index.h(tableLoadingState.TableLoadingState, { key: 'abddb3ce09e39245c0455893f09e54cc631b26bf', columnSpan: this.terminalsTable.columnKeys.length, isLoading: this.loading }), index.h(tableLoadingState.TableEmptyState, { key: '166a461ee8aaf7405fc0a2b12cd17e1e1e9553f3', isEmpty: this.showEmptyState, columnSpan: this.terminalsTable.columnKeys.length }), index.h(tableLoadingState.TableErrorState, { key: '969bbfcce66b6bcee4dadabe465eaef37022d13b', columnSpan: this.terminalsTable.columnKeys.length, errorMessage: this.errorMessage }), this.showRowData && this.terminalsTable.rowData.map((data, index$1) => (index.h("tr", { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index$1], onClick: this.rowClickHandler, part: `table-row ${index$1 % 2 ? "table-row-even" : "table-row-odd"}` }, data)))), this.paging && (index.h("tfoot", { key: 'c63268c11facddaa44452c58743ad9c03f492898', class: "sticky-bottom" }, index.h("tr", { key: '0e247f8968ad4ed7e8c001354b1c29d5bf7976aa', class: "table-light align-middle" }, index.h("td", { key: '51c5157453d911f5bf370ba2ac6a556dd1592f24', part: "pagination-bar", colSpan: this.terminalsTable.columnData.length }, index.h("pagination-menu", { key: '3a3ba65f31099125e9c01bc9c8c001c6437ed720', paging: Object.assign(Object.assign({}, this.paging), { handleClickPrevious: this.handleClickPrevious, handleClickNext: this.handleClickNext }), params: this.params })))))))));
132
+ return (index.h("div", { key: 'd022a41666a6483bcb405bfe477b7eba1e5ca5dd' }, index.h("terminals-list-filters", { key: 'cb0d38d4b51c5cb9482c1f567dce4462bf12a055', params: this.params, setParamsOnChange: this.setParamsOnChange, clearParams: this.clearParams }), index.h("div", { key: '82cbf05382d9ecaf0d01c4e0b5f61618b1442690', class: "table-wrapper" }, index.h("table", { key: '5c8bd36b6523cf56542b016e3195188781b2cb03', class: "table table-hover" }, index.h("thead", { key: 'f35d86ae84f673437e0fc51ad3e26b1839153590', class: "table-head sticky-top", part: "table-head" }, index.h("tr", { key: '7727a4e30dddd62d6dc3c405c7ca505f91a71643', class: "table-light text-nowrap", part: "table-head-row" }, this.terminalsTable.columnData.map((column) => column))), index.h("tbody", { key: '4e0ee2053a33622037e7961ec289036e52632e3f', class: "table-body", part: "table-body" }, index.h(table.TableLoadingState, { key: '96cb647d4f5c2e4a1ecb33be46b868e1318762ca', columnSpan: this.terminalsTable.columnKeys.length, isLoading: this.loading }), index.h(table.TableEmptyState, { key: '062aeeb69a149b2f15e49c81bb3bd16a6d5a5dfd', isEmpty: this.showEmptyState, columnSpan: this.terminalsTable.columnKeys.length }), index.h(table.TableErrorState, { key: '750a04c3ecb53271b3affced7e9245733c64bd57', columnSpan: this.terminalsTable.columnKeys.length, errorMessage: this.errorMessage }), this.showRowData && this.terminalsTable.rowData.map((data, index$1) => (index.h("tr", { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index$1], onClick: this.rowClickHandler, part: `table-row ${index$1 % 2 ? "table-row-even" : "table-row-odd"}` }, data)))), this.paging && (index.h("tfoot", { key: '19edc599b2ccd6212c03045b754fe251335fa665', class: "sticky-bottom" }, index.h("tr", { key: 'dd793c33355dd6b0448e327a62b3cc08a0d09bad', class: "table-light align-middle" }, index.h("td", { key: '0b142d2c1b658e1bb084741fa461d7f350c3449c', part: "pagination-bar", colSpan: this.terminalsTable.columnData.length }, index.h("pagination-menu", { key: '757d9ba17e1a768aa0bcf573a2d02b455bac3df3', paging: Object.assign(Object.assign({}, this.paging), { handleClickPrevious: this.handleClickPrevious, handleClickNext: this.handleClickNext }), params: this.params })))))))));
134
133
  }
135
134
  static get watchers() { return {
136
135
  "params": ["updateOnPropChange"],
@@ -25,7 +25,7 @@ const TerminalsListFilters = class {
25
25
  ];
26
26
  }
27
27
  render() {
28
- return (index.h("table-filters-menu", { key: '4bfd04cf078878811b2692ff166598deb22b7d92', params: this.params, clearParams: this.clearParams }, index.h("div", { key: '470d4eb34429c887d03beb0caedd8c9486d18900', class: "grid-cols-2 gap-3 p-1" }, index.h("div", { key: '34d34e8c90c36b7cab1fb3442cb04e58f9ebb334', class: "p-2" }, index.h("form-control-text", { key: '5234008261646f1a090686fc0d795a6e846c9e04', name: "terminal_id", label: "Terminal ID", inputHandler: this.debouncedSetParamsOnChange, defaultValue: this.params.terminal_id })), index.h("div", { key: 'fdd089fa29bf030ed3825993ff4e50a9ecefa1dc', class: "p-2" }, index.h("form-control-select", { key: '0c078ec1ecffea26e0cec5633cb4748337a75643', name: "status", label: "Status", options: this.terminalStatusOptions, inputHandler: this.setParamsOnChange, defaultValue: this.params.status || '' })))));
28
+ return (index.h("table-filters-menu", { key: '486847f69064b497b72521312d27097690eb19b2', params: this.params, clearParams: this.clearParams }, index.h("div", { key: '622e3572ff1cf85a60ffa30c4fa5d39780375abb', class: "grid-cols-2 gap-3 p-1" }, index.h("div", { key: '2cef9085c3d09e96907cdaa8330e8b8b80d8ceec', class: "p-2" }, index.h("form-control-text", { key: 'a3922b71cbdc93bbdddd519e44bad25379c6b5f4', name: "terminal_id", label: "Terminal ID", inputHandler: this.debouncedSetParamsOnChange, defaultValue: this.params.terminal_id })), index.h("div", { key: '1027edf52dc1ceacc4779b29bda4b7d08c8a3c8c', class: "p-2" }, index.h("form-control-select", { key: 'e1f122b2868282a64dccc99b3e9d19fe7cc768fb', name: "status", label: "Status", options: this.terminalStatusOptions, inputHandler: this.setParamsOnChange, defaultValue: this.params.status || '' })))));
29
29
  }
30
30
  };
31
31
 
@@ -21,10 +21,10 @@ const terminalTableColumns = {
21
21
  status: () => (index.h("th", { part: "table-head-cell", scope: "col", title: "The current status of each terminal" }, "Status")),
22
22
  };
23
23
  const terminalTableCells = {
24
- nickname: (value) => (index.h("td", null, value)),
25
- provider_id: (value) => (index.h("td", null, value)),
26
- sub_account_name: (value) => (index.h("td", null, value)),
27
- status: (value) => (index.h("td", { innerHTML: MapTerminalStatusToBadge(value) })),
24
+ nickname: (value) => (index.h("td", { part: "table-cell" }, value)),
25
+ provider_id: (value) => (index.h("td", { part: "table-cell" }, value)),
26
+ sub_account_name: (value) => (index.h("td", { part: "table-cell" }, value)),
27
+ status: (value) => (index.h("td", { part: "table-cell", innerHTML: MapTerminalStatusToBadge(value) })),
28
28
  };
29
29
 
30
30
  exports.defaultColumnsKeys = defaultColumnsKeys;
@@ -1,5 +1,16 @@
1
1
  'use strict';
2
2
 
3
+ function composeQueryParams(values) {
4
+ const queryParams = values.map((value) => {
5
+ if (value === values[0]) {
6
+ return (value = `?${value}`);
7
+ }
8
+ else {
9
+ return (value = `&${value}`);
10
+ }
11
+ });
12
+ return queryParams.join('');
13
+ }
3
14
  const onFilterChange = (newFilters, params) => {
4
15
  let newParams = Object.assign({}, params);
5
16
  delete newParams.before_cursor;
@@ -21,5 +32,6 @@ const hasFilters = (params) => {
21
32
  return !!filterKeys.length;
22
33
  };
23
34
 
35
+ exports.composeQueryParams = composeQueryParams;
24
36
  exports.hasFilters = hasFilters;
25
37
  exports.onFilterChange = onFilterChange;
@@ -3850,6 +3850,7 @@ var Dinero = function Dinero(options) {
3850
3850
 
3851
3851
  var dinero = Object.assign(Dinero, Defaults, Globals, Static);
3852
3852
 
3853
+ // Currency Formatting
3853
3854
  function formatCurrency(amount, withSymbol = true, withCurrencyName = false) {
3854
3855
  if (!amount)
3855
3856
  amount = 0;
@@ -3860,13 +3861,13 @@ function formatCurrency(amount, withSymbol = true, withCurrencyName = false) {
3860
3861
  const formattedAmount = amount < 0 ? `(${format(-amount)})` : format(amount);
3861
3862
  return withCurrencyName ? `${formattedAmount} USD` : formattedAmount;
3862
3863
  }
3864
+ // Date Formatting and Conversion
3863
3865
  function formatDate(dateString) {
3864
3866
  if (!dateString)
3865
3867
  return '';
3866
3868
  const date = new Date(dateString);
3867
3869
  return format(date, 'MMM d, yyyy');
3868
3870
  }
3869
- // eg. Oct 9, 2023
3870
3871
  function formatMediumDate(input) {
3871
3872
  // Check if input is a string and convert to Date object
3872
3873
  if (typeof input === 'string') {
@@ -3906,21 +3907,40 @@ function formatTimeSeconds(dateString) {
3906
3907
  const date = new Date(dateString);
3907
3908
  return format(date, 'h:mm:ssaaa');
3908
3909
  }
3909
- function extractComputedFontsToLoad() {
3910
- var _a;
3911
- const computedStyles = getComputedStyle(document.body);
3912
- 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);
3913
- }
3914
- /**
3915
- * Converts a snake_case string to a human-readable format by replacing underscores with spaces and capitalizing the first letter of each word.
3916
- *
3917
- * @param snakeCaseStr - The string in snake_case format.
3918
- * @returns The string transformed into a human-readable format.
3919
- *
3920
- * @example
3921
- * const readable = toReadableString('sole_proprietorship');
3922
- * console.log(readable); // Outputs: "Sole Proprietorship"
3923
- */
3910
+ const convertToUTC = (dateString, options) => {
3911
+ const { setEndOfDay, setExactTime } = options;
3912
+ if (!dateString)
3913
+ return '';
3914
+ const dateObj = new Date(dateString);
3915
+ if (setEndOfDay) {
3916
+ // Adjust the time to be at the very end of the day
3917
+ dateObj.setUTCHours(23, 59, 59, 999);
3918
+ return new Date(dateObj.toUTCString()).toISOString();
3919
+ }
3920
+ else if (setExactTime) {
3921
+ return new Date(dateObj.toUTCString()).toISOString();
3922
+ }
3923
+ };
3924
+ const convertToLocal = (dateString, options) => {
3925
+ const { showDisplayDate, showInputDate, showTime, showInputDateTime } = options;
3926
+ if (!dateString)
3927
+ return '';
3928
+ const dateObj = new Date(dateString);
3929
+ const localDate = new Date(dateObj.toLocaleString('en-US', { timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone }));
3930
+ if (showDisplayDate) {
3931
+ return format(localDate, 'MMM d, yyyy');
3932
+ }
3933
+ else if (showInputDate) {
3934
+ return format(localDate, 'yyyy-MM-dd');
3935
+ }
3936
+ else if (showTime) {
3937
+ return format(localDate, 'h:mmaaa');
3938
+ }
3939
+ else if (showInputDateTime) {
3940
+ return format(localDate, 'yyyy-MM-dd\'T\'HH:mm');
3941
+ }
3942
+ };
3943
+ // String Manipulation
3924
3944
  function snakeCaseToHumanReadable(snakeCaseStr) {
3925
3945
  if (!snakeCaseStr)
3926
3946
  return '';
@@ -3934,17 +3954,14 @@ function snakeToCamel(str) {
3934
3954
  return '';
3935
3955
  return str.replace(/([-_][a-z])/g, (group) => group.toUpperCase().replace('-', '').replace('_', ''));
3936
3956
  }
3937
- function composeQueryParams(values) {
3938
- const queryParams = values.map((value) => {
3939
- if (value === values[0]) {
3940
- return (value = `?${value}`);
3941
- }
3942
- else {
3943
- return (value = `&${value}`);
3944
- }
3945
- });
3946
- return queryParams.join('');
3957
+ // Object Utilities
3958
+ function isEmptyObject(obj) {
3959
+ return Object.keys(obj).length === 0 && obj.constructor === Object;
3947
3960
  }
3961
+ const isInRange = (num, min, max) => {
3962
+ return num >= min && num <= max;
3963
+ };
3964
+ // Font Loading
3948
3965
  async function loadFontsOnParent() {
3949
3966
  const parent = document.body;
3950
3967
  const fontsToLoad = extractComputedFontsToLoad();
@@ -3965,14 +3982,14 @@ async function loadFontsOnParent() {
3965
3982
  fonts.href = fontHref;
3966
3983
  parent.append(fonts);
3967
3984
  }
3968
- function isEmptyObject(obj) {
3969
- return Object.keys(obj).length === 0 && obj.constructor === Object;
3985
+ function extractComputedFontsToLoad() {
3986
+ var _a;
3987
+ const computedStyles = getComputedStyle(document.body);
3988
+ 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);
3970
3989
  }
3971
- const isInRange = (num, min, max) => {
3972
- return num >= min && num <= max;
3973
- };
3974
3990
 
3975
- exports.composeQueryParams = composeQueryParams;
3991
+ exports.convertToLocal = convertToLocal;
3992
+ exports.convertToUTC = convertToUTC;
3976
3993
  exports.formatCurrency = formatCurrency;
3977
3994
  exports.formatDate = formatDate;
3978
3995
  exports.formatDisplayDate = formatDisplayDate;