@justifi/webcomponents 5.3.4 → 5.3.6

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 (481) hide show
  1. package/dist/cjs/{Checkout-1c07dc32.js → Checkout-eef27045.js} +11 -6
  2. package/dist/cjs/{SubAccount-b4811a8e.js → SubAccount-df3d28dc.js} +70 -0
  3. package/dist/cjs/additional-questions-details_5.cjs.entry.js +2 -2
  4. package/dist/cjs/{badge-86a6a7f8.js → badge-79e56b99.js} +1 -1
  5. package/dist/cjs/bank-account-document-form-inputs_4.cjs.entry.js +7 -7
  6. package/dist/cjs/bank-account-form_9.cjs.entry.js +4 -4
  7. package/dist/cjs/billing-form_3.cjs.entry.js +6 -6
  8. package/dist/cjs/business-details-core.cjs.entry.js +3 -3
  9. package/dist/cjs/{button-5f6c437f.js → button-797bb3cc.js} +1 -1
  10. package/dist/cjs/{Analytics-2fb20059.js → check-pkg-version-1f8b660c.js} +21 -1
  11. package/dist/cjs/{checkout.service-b23994d2.js → checkout.service-c01e2cd7.js} +2 -2
  12. package/dist/cjs/checkouts-list-core.cjs.entry.js +9 -10
  13. package/dist/cjs/{checkouts-table-cf3e245e.js → checkouts-table-61543249.js} +2 -2
  14. package/dist/cjs/{custom-popper_4.cjs.entry.js → custom-popper.cjs.entry.js} +2 -141
  15. package/dist/cjs/{dispute.service-c192dd33.js → dispute.service-399de502.js} +2 -2
  16. package/dist/cjs/{table-fc82fa81.js → event-types-666f1f22.js} +9 -2
  17. package/dist/cjs/form-alert_5.cjs.entry.js +1 -1
  18. package/dist/cjs/form-control-checkbox.cjs.entry.js +5 -5
  19. package/dist/cjs/form-control-date.cjs.entry.js +4 -4
  20. package/dist/cjs/{form-control-error-text-9905e3b8.js → form-control-error-text-b782cdd0.js} +1 -1
  21. package/dist/cjs/form-control-file-v2_2.cjs.entry.js +5 -4
  22. package/dist/cjs/{form-control-help-text-8d031bfb.js → form-control-help-text-ca3c8155.js} +1 -1
  23. package/dist/cjs/form-control-monetary.cjs.entry.js +5 -5
  24. package/dist/cjs/form-control-number-masked_2.cjs.entry.js +4 -4
  25. package/dist/cjs/form-control-number.cjs.entry.js +5 -5
  26. package/dist/cjs/form-control-radio.cjs.entry.js +3 -3
  27. package/dist/cjs/form-control-select_3.cjs.entry.js +145 -0
  28. package/dist/cjs/{get-payout-csv-13d68dab.js → get-payout-csv-11a983a0.js} +2 -2
  29. package/dist/cjs/{get-subaccounts-b2e6ab82.js → get-subaccounts-224f9497.js} +2 -2
  30. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +3 -3
  31. package/dist/cjs/{header-1-b202dbbb.js → header-1-ff669f3f.js} +1 -1
  32. package/dist/cjs/{header-3-5f78acd1.js → header-3-f6642390.js} +1 -1
  33. package/dist/cjs/{insurance-state-ba0c39a9.js → insurance-state-66c9bea7.js} +1 -1
  34. package/dist/cjs/justifi-additional-questions-form-step-core_6.cjs.entry.js +5 -5
  35. package/dist/cjs/justifi-additional-questions-form-step_9.cjs.entry.js +4 -4
  36. package/dist/cjs/justifi-additional-statement_8.cjs.entry.js +71 -108
  37. package/dist/cjs/justifi-business-details.cjs.entry.js +5 -6
  38. package/dist/cjs/justifi-business-form.cjs.entry.js +9 -10
  39. package/dist/cjs/justifi-business-representative-form-inputs.cjs.entry.js +1 -1
  40. package/dist/cjs/justifi-checkout-core.cjs.entry.js +6 -6
  41. package/dist/cjs/justifi-checkout.cjs.entry.js +7 -8
  42. package/dist/cjs/justifi-checkouts-list-filters.cjs.entry.js +6 -6
  43. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +10 -11
  44. package/dist/cjs/justifi-details.cjs.entry.js +2 -2
  45. package/dist/cjs/justifi-dispute-management.cjs.entry.js +6 -7
  46. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +31 -25
  47. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +5 -6
  48. package/dist/cjs/justifi-order-terminals.cjs.entry.js +187 -41
  49. package/dist/cjs/justifi-owner-form_3.cjs.entry.js +2 -2
  50. package/dist/cjs/justifi-payment-details.cjs.entry.js +8 -9
  51. package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +4 -4
  52. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +3 -4
  53. package/dist/cjs/justifi-payments-list-filters.cjs.entry.js +3 -3
  54. package/dist/cjs/justifi-payments-list.cjs.entry.js +11 -12
  55. package/dist/cjs/justifi-payout-details.cjs.entry.js +8 -9
  56. package/dist/cjs/justifi-payouts-list-filters.cjs.entry.js +3 -3
  57. package/dist/cjs/justifi-payouts-list.cjs.entry.js +12 -13
  58. package/dist/cjs/justifi-refund-form.cjs.entry.js +3 -3
  59. package/dist/cjs/justifi-season-interruption-insurance-core.cjs.entry.js +3 -3
  60. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +5 -6
  61. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +79 -13
  62. package/dist/cjs/justifi-terminals-list-filters.cjs.entry.js +4 -4
  63. package/dist/cjs/justifi-terminals-list.cjs.entry.js +13 -26
  64. package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +9 -10
  65. package/dist/cjs/loader.cjs.js +1 -1
  66. package/dist/cjs/{package-e8aa0c51.js → package-d34fcfa5.js} +1 -1
  67. package/dist/cjs/pagination-menu.cjs.entry.js +1 -1
  68. package/dist/cjs/{parts-c2655003.js → parts-1fb925c2.js} +3 -5
  69. package/dist/cjs/payment-details-core.cjs.entry.js +12 -12
  70. package/dist/cjs/{payment.service-f53022c3.js → payment.service-f369b33c.js} +2 -2
  71. package/dist/cjs/payments-list-core.cjs.entry.js +10 -11
  72. package/dist/cjs/{payments-status-92abe577.js → payments-status-ffdc54ff.js} +1 -1
  73. package/dist/cjs/{payments-table-c58e3ca8.js → payments-table-98b4e5e3.js} +2 -2
  74. package/dist/cjs/payout-details-core.cjs.entry.js +7 -7
  75. package/dist/cjs/payouts-list-core.cjs.entry.js +10 -11
  76. package/dist/cjs/{payouts-status-703d62af.js → payouts-status-64fd0c68.js} +1 -1
  77. package/dist/cjs/{payouts-table-70fc1498.js → payouts-table-ecfb826b.js} +2 -2
  78. package/dist/cjs/{skeleton-84102a44.js → skeleton-2ae76f16.js} +1 -1
  79. package/dist/cjs/{spinner-70f38e5e.js → spinner-15764f3c.js} +1 -1
  80. package/dist/cjs/table-filters-menu.cjs.entry.js +2 -2
  81. package/dist/cjs/terminal-orders-list-core.cjs.entry.js +31 -11
  82. package/dist/cjs/terminal-orders-table-f1bed365.js +56 -0
  83. package/dist/cjs/terminal-quantity-selector.cjs.entry.js +36 -0
  84. package/dist/cjs/terminal.service-4fd34835.js +35 -0
  85. package/dist/cjs/terminals-list-core.cjs.entry.js +9 -10
  86. package/dist/cjs/{terminals-table-db58a0c0.js → terminals-table-30298ce4.js} +6 -4
  87. package/dist/cjs/{utils-7c5b2837.js → utils-3e3b8061.js} +1 -1
  88. package/dist/cjs/webcomponents.cjs.js +1 -1
  89. package/dist/collection/actions/terminal/get-terminal-models.js +30 -0
  90. package/dist/collection/actions/terminal/get-terminal-orders.js +34 -0
  91. package/dist/collection/actions/terminal/order-terminals.js +29 -0
  92. package/dist/collection/api/Checkout.js +5 -0
  93. package/dist/collection/api/Terminal.js +1 -0
  94. package/dist/collection/api/TerminalModel.js +15 -0
  95. package/dist/collection/api/TerminalOrder.js +51 -0
  96. package/dist/collection/api/index.js +2 -0
  97. package/dist/collection/api/services/terminal.service.js +11 -0
  98. package/dist/collection/api/services/terminal_orders.service.js +9 -0
  99. package/dist/collection/collection-manifest.json +1 -0
  100. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning-core.js +2 -2
  101. package/dist/collection/components/checkouts-list/checkouts-list-filters.js +8 -8
  102. package/dist/collection/components/dispute-management/dispute-notification.js +1 -1
  103. package/dist/collection/components/dispute-management/dispute-response/additional-statement.js +27 -15
  104. package/dist/collection/components/dispute-management/dispute-response/cancellation-policy.js +26 -14
  105. package/dist/collection/components/dispute-management/dispute-response/customer-details.js +26 -14
  106. package/dist/collection/components/dispute-management/dispute-response/dispute-response-core.js +22 -14
  107. package/dist/collection/components/dispute-management/dispute-response/duplicate-charge.js +26 -14
  108. package/dist/collection/components/dispute-management/dispute-response/electronic-evidence.js +26 -14
  109. package/dist/collection/components/dispute-management/dispute-response/file-input-handler.js +11 -0
  110. package/dist/collection/components/dispute-management/dispute-response/product-or-service.js +26 -14
  111. package/dist/collection/components/dispute-management/dispute-response/refund-policy.js +26 -14
  112. package/dist/collection/components/dispute-management/dispute-response/shipping-details.js +26 -12
  113. package/dist/collection/components/order-terminals/order-terminals-loading.js +1 -1
  114. package/dist/collection/components/order-terminals/order-terminals.js +159 -35
  115. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector-loading.js +5 -0
  116. package/dist/collection/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js +153 -0
  117. package/dist/collection/components/payment-details/payment-details-core.js +7 -7
  118. package/dist/collection/components/payments-list/payments-list-core.js +1 -1
  119. package/dist/collection/components/payments-list/payments-list-filters.js +2 -2
  120. package/dist/collection/components/payments-list/payments-list.js +1 -1
  121. package/dist/collection/components/payout-details/payout-details-core.js +1 -1
  122. package/dist/collection/components/payouts-list/payouts-list-core.js +1 -1
  123. package/dist/collection/components/payouts-list/payouts-list-filters.js +2 -2
  124. package/dist/collection/components/payouts-list/payouts-list.js +1 -1
  125. package/dist/collection/components/refund-form/refund-form.js +1 -1
  126. package/dist/collection/components/terminal-orders-list/terminal-order-status.js +23 -0
  127. package/dist/collection/components/terminal-orders-list/terminal-orders-list-core.js +53 -7
  128. package/dist/collection/components/terminal-orders-list/terminal-orders-list.js +52 -11
  129. package/dist/collection/components/terminal-orders-list/terminal-orders-table.js +17 -5
  130. package/dist/collection/components/terminals-list/terminals-list-core.js +1 -1
  131. package/dist/collection/components/terminals-list/terminals-list-filters.js +1 -1
  132. package/dist/collection/components/terminals-list/terminals-list.js +1 -1
  133. package/dist/collection/components/terminals-list/terminals-table.js +4 -2
  134. package/dist/collection/components/tokenize-payment-method/tokenize-payment-method.js +1 -1
  135. package/dist/collection/styles/parts.js +3 -0
  136. package/dist/collection/ui-components/custom-popper/custom-popper.js +2 -2
  137. package/dist/collection/ui-components/form/form-control-checkbox.js +2 -2
  138. package/dist/collection/ui-components/form/form-control-date.js +2 -2
  139. package/dist/collection/ui-components/form/form-control-file-v2.js +2 -1
  140. package/dist/collection/ui-components/form/form-control-file.js +2 -2
  141. package/dist/collection/ui-components/form/form-control-monetary.js +2 -2
  142. package/dist/collection/ui-components/form/form-control-number-masked.js +2 -2
  143. package/dist/collection/ui-components/form/form-control-number.js +2 -2
  144. package/dist/collection/ui-components/form/form-control-radio.js +2 -2
  145. package/dist/collection/ui-components/form/form-control-text.js +2 -2
  146. package/dist/collection/ui-components/form/form-control-textarea.js +2 -2
  147. package/dist/collection/ui-components/form/hidden-input.js +1 -1
  148. package/dist/collection/ui-components/form/iframe-input.js +3 -3
  149. package/dist/docs.json +530 -50
  150. package/dist/esm/{Checkout-919eb1ba.js → Checkout-2bc873fb.js} +6 -1
  151. package/dist/esm/{SubAccount-9aad3891.js → SubAccount-dbd4e50c.js} +69 -1
  152. package/dist/esm/additional-questions-details_5.entry.js +2 -2
  153. package/dist/esm/{badge-2eb79416.js → badge-6f5acf30.js} +1 -1
  154. package/dist/esm/bank-account-document-form-inputs_4.entry.js +7 -7
  155. package/dist/esm/bank-account-form_9.entry.js +4 -4
  156. package/dist/esm/billing-form_3.entry.js +6 -6
  157. package/dist/esm/business-details-core.entry.js +3 -3
  158. package/dist/esm/{button-cc455199.js → button-79dcea75.js} +1 -1
  159. package/dist/esm/{Analytics-759c7da5.js → check-pkg-version-8e7e585e.js} +21 -2
  160. package/dist/esm/{checkout.service-bb45d248.js → checkout.service-382a16ec.js} +2 -2
  161. package/dist/esm/checkouts-list-core.entry.js +7 -8
  162. package/dist/esm/{checkouts-table-53981285.js → checkouts-table-8a53cef9.js} +2 -2
  163. package/dist/esm/{custom-popper_4.entry.js → custom-popper.entry.js} +4 -140
  164. package/dist/esm/{dispute.service-9008b3b7.js → dispute.service-97887804.js} +2 -2
  165. package/dist/esm/{table-e287f1c0.js → event-types-82515a49.js} +10 -3
  166. package/dist/esm/form-alert_5.entry.js +1 -1
  167. package/dist/esm/form-control-checkbox.entry.js +5 -5
  168. package/dist/esm/form-control-date.entry.js +4 -4
  169. package/dist/esm/{form-control-error-text-74c6b38a.js → form-control-error-text-466c252b.js} +1 -1
  170. package/dist/esm/form-control-file-v2_2.entry.js +5 -4
  171. package/dist/esm/{form-control-help-text-76a4196e.js → form-control-help-text-242916e3.js} +1 -1
  172. package/dist/esm/form-control-monetary.entry.js +5 -5
  173. package/dist/esm/form-control-number-masked_2.entry.js +4 -4
  174. package/dist/esm/form-control-number.entry.js +5 -5
  175. package/dist/esm/form-control-radio.entry.js +3 -3
  176. package/dist/esm/form-control-select_3.entry.js +139 -0
  177. package/dist/esm/{get-payout-csv-8450b60d.js → get-payout-csv-6826271a.js} +2 -2
  178. package/dist/esm/{get-subaccounts-3af0844a.js → get-subaccounts-f21220dc.js} +2 -2
  179. package/dist/esm/gross-payment-chart-core.entry.js +3 -3
  180. package/dist/esm/{header-1-797ca789.js → header-1-b43590e5.js} +1 -1
  181. package/dist/esm/{header-3-544afa0b.js → header-3-b90e161e.js} +1 -1
  182. package/dist/esm/{insurance-state-307335d6.js → insurance-state-9e4a3359.js} +1 -1
  183. package/dist/esm/justifi-additional-questions-form-step-core_6.entry.js +5 -5
  184. package/dist/esm/justifi-additional-questions-form-step_9.entry.js +4 -4
  185. package/dist/esm/justifi-additional-statement_8.entry.js +71 -108
  186. package/dist/esm/justifi-business-details.entry.js +4 -5
  187. package/dist/esm/justifi-business-form.entry.js +8 -9
  188. package/dist/esm/justifi-business-representative-form-inputs.entry.js +1 -1
  189. package/dist/esm/justifi-checkout-core.entry.js +6 -6
  190. package/dist/esm/justifi-checkout.entry.js +6 -7
  191. package/dist/esm/justifi-checkouts-list-filters.entry.js +6 -6
  192. package/dist/esm/justifi-checkouts-list.entry.js +9 -10
  193. package/dist/esm/justifi-details.entry.js +2 -2
  194. package/dist/esm/justifi-dispute-management.entry.js +5 -6
  195. package/dist/esm/justifi-dispute-notification_3.entry.js +30 -24
  196. package/dist/esm/justifi-gross-payment-chart.entry.js +4 -5
  197. package/dist/esm/justifi-order-terminals.entry.js +187 -41
  198. package/dist/esm/justifi-owner-form_3.entry.js +2 -2
  199. package/dist/esm/justifi-payment-details.entry.js +7 -8
  200. package/dist/esm/justifi-payment-provisioning-core.entry.js +4 -4
  201. package/dist/esm/justifi-payment-provisioning.entry.js +2 -3
  202. package/dist/esm/justifi-payments-list-filters.entry.js +3 -3
  203. package/dist/esm/justifi-payments-list.entry.js +10 -11
  204. package/dist/esm/justifi-payout-details.entry.js +7 -8
  205. package/dist/esm/justifi-payouts-list-filters.entry.js +3 -3
  206. package/dist/esm/justifi-payouts-list.entry.js +11 -12
  207. package/dist/esm/justifi-refund-form.entry.js +3 -3
  208. package/dist/esm/justifi-season-interruption-insurance-core.entry.js +3 -3
  209. package/dist/esm/justifi-season-interruption-insurance.entry.js +4 -5
  210. package/dist/esm/justifi-terminal-orders-list.entry.js +80 -14
  211. package/dist/esm/justifi-terminals-list-filters.entry.js +4 -4
  212. package/dist/esm/justifi-terminals-list.entry.js +11 -24
  213. package/dist/esm/justifi-tokenize-payment-method.entry.js +8 -9
  214. package/dist/esm/loader.js +1 -1
  215. package/dist/esm/{package-49477570.js → package-46c7f3a6.js} +1 -1
  216. package/dist/esm/pagination-menu.entry.js +1 -1
  217. package/dist/esm/{parts-489f0af6.js → parts-2c5c609b.js} +3 -4
  218. package/dist/esm/payment-details-core.entry.js +12 -12
  219. package/dist/esm/{payment.service-a8ee345c.js → payment.service-a8aa5be7.js} +2 -2
  220. package/dist/esm/payments-list-core.entry.js +9 -10
  221. package/dist/esm/{payments-status-35255b2c.js → payments-status-6e203ce4.js} +1 -1
  222. package/dist/esm/{payments-table-6e97396a.js → payments-table-4c6093e1.js} +2 -2
  223. package/dist/esm/payout-details-core.entry.js +7 -7
  224. package/dist/esm/payouts-list-core.entry.js +9 -10
  225. package/dist/esm/{payouts-status-a0cc00c5.js → payouts-status-66e830f1.js} +1 -1
  226. package/dist/esm/{payouts-table-6b8ba8f1.js → payouts-table-46fbedb6.js} +2 -2
  227. package/dist/esm/{skeleton-74fbfb68.js → skeleton-122648e6.js} +1 -1
  228. package/dist/esm/{spinner-6b708842.js → spinner-14cd9ac7.js} +1 -1
  229. package/dist/esm/table-filters-menu.entry.js +2 -2
  230. package/dist/esm/terminal-orders-list-core.entry.js +30 -10
  231. package/dist/esm/terminal-orders-table-83b905fd.js +52 -0
  232. package/dist/esm/terminal-quantity-selector.entry.js +32 -0
  233. package/dist/esm/terminal.service-20445fc1.js +33 -0
  234. package/dist/esm/terminals-list-core.entry.js +8 -9
  235. package/dist/esm/{terminals-table-c6258344.js → terminals-table-dbbf9a99.js} +6 -4
  236. package/dist/esm/{utils-6c26bccc.js → utils-4cb0d852.js} +1 -1
  237. package/dist/esm/webcomponents.js +1 -1
  238. package/dist/module/Checkout.js +6 -1
  239. package/dist/module/SubAccount.js +69 -1
  240. package/dist/module/additional-statement.js +9 -14
  241. package/dist/module/cancellation-policy.js +9 -14
  242. package/dist/module/check-pkg-version.js +80 -1
  243. package/dist/module/checkouts-list-core2.js +1 -2
  244. package/dist/module/custom-popper2.js +2 -2
  245. package/dist/module/customer-details.js +9 -14
  246. package/dist/module/dispute-notification.js +1 -1
  247. package/dist/module/dispute-response-core.js +22 -14
  248. package/dist/module/dispute-response.js +1 -2
  249. package/dist/module/duplicate-charge.js +9 -14
  250. package/dist/module/electronic-evidence.js +9 -14
  251. package/dist/module/event-types2.js +55 -1
  252. package/dist/module/{dispute-response-form-types.js → file-input-handler.js} +23 -13
  253. package/dist/module/form-control-checkbox2.js +2 -2
  254. package/dist/module/form-control-date2.js +2 -2
  255. package/dist/module/form-control-file-v22.js +2 -1
  256. package/dist/module/form-control-file2.js +2 -2
  257. package/dist/module/form-control-monetary2.js +2 -2
  258. package/dist/module/form-control-number-masked2.js +2 -2
  259. package/dist/module/form-control-number.js +2 -2
  260. package/dist/module/form-control-radio2.js +2 -2
  261. package/dist/module/form-control-text2.js +2 -2
  262. package/dist/module/form-control-textarea2.js +2 -2
  263. package/dist/module/hidden-input2.js +1 -1
  264. package/dist/module/iframe-input2.js +3 -3
  265. package/dist/module/justifi-business-details.js +1 -2
  266. package/dist/module/justifi-business-form.js +1 -2
  267. package/dist/module/justifi-checkout.js +2 -3
  268. package/dist/module/justifi-checkouts-list-filters.js +4 -4
  269. package/dist/module/justifi-checkouts-list.js +1 -2
  270. package/dist/module/justifi-dispute-management.js +1 -2
  271. package/dist/module/justifi-gross-payment-chart.js +1 -2
  272. package/dist/module/justifi-order-terminals.js +211 -41
  273. package/dist/module/justifi-payment-details.js +1 -2
  274. package/dist/module/justifi-payment-provisioning.js +1 -2
  275. package/dist/module/justifi-payments-list-filters.js +3 -3
  276. package/dist/module/justifi-payments-list.js +2 -3
  277. package/dist/module/justifi-payout-details.js +1 -2
  278. package/dist/module/justifi-payouts-list-filters.js +3 -3
  279. package/dist/module/justifi-payouts-list.js +2 -3
  280. package/dist/module/justifi-refund-form.js +1 -1
  281. package/dist/module/justifi-season-interruption-insurance.js +1 -2
  282. package/dist/module/justifi-terminal-orders-list.js +75 -12
  283. package/dist/module/justifi-terminals-list-filters.js +2 -2
  284. package/dist/module/justifi-terminals-list.js +4 -18
  285. package/dist/module/justifi-tokenize-payment-method.js +3 -4
  286. package/dist/module/package.js +1 -1
  287. package/dist/module/parts.js +3 -4
  288. package/dist/module/payment-details-core2.js +7 -7
  289. package/dist/module/payment-provisioning-core.js +2 -2
  290. package/dist/module/payments-list-core2.js +2 -3
  291. package/dist/module/payout-details-core2.js +1 -1
  292. package/dist/module/payouts-list-core2.js +2 -3
  293. package/dist/module/product-or-service.js +17 -16
  294. package/dist/module/refund-policy.js +9 -14
  295. package/dist/module/shipping-details.js +9 -12
  296. package/dist/module/terminal-orders-list-core2.js +67 -10
  297. package/dist/module/terminal-quantity-selector.d.ts +11 -0
  298. package/dist/module/terminal-quantity-selector.js +6 -0
  299. package/dist/module/terminal-quantity-selector2.js +66 -0
  300. package/dist/module/terminal.service.js +33 -0
  301. package/dist/module/terminals-list-core2.js +6 -5
  302. package/dist/types/actions/terminal/get-terminal-models.d.ts +8 -0
  303. package/dist/types/actions/terminal/get-terminal-orders.d.ts +11 -0
  304. package/dist/types/actions/terminal/order-terminals.d.ts +8 -0
  305. package/dist/types/api/Checkout.d.ts +4 -0
  306. package/dist/types/api/Terminal.d.ts +2 -0
  307. package/dist/types/api/TerminalModel.d.ts +31 -0
  308. package/dist/types/api/TerminalOrder.d.ts +53 -0
  309. package/dist/types/api/index.d.ts +2 -0
  310. package/dist/types/api/services/terminal.service.d.ts +4 -0
  311. package/dist/types/api/services/terminal_orders.service.d.ts +7 -0
  312. package/dist/types/components/business-forms/payment-provisioning/payment-provisioning-core.d.ts +0 -1
  313. package/dist/types/components/checkouts-list/checkouts-list-filters.d.ts +3 -3
  314. package/dist/types/components/dispute-management/dispute-response/additional-statement.d.ts +4 -2
  315. package/dist/types/components/dispute-management/dispute-response/cancellation-policy.d.ts +4 -2
  316. package/dist/types/components/dispute-management/dispute-response/customer-details.d.ts +5 -2
  317. package/dist/types/components/dispute-management/dispute-response/dispute-response-core.d.ts +5 -4
  318. package/dist/types/components/dispute-management/dispute-response/duplicate-charge.d.ts +4 -2
  319. package/dist/types/components/dispute-management/dispute-response/electronic-evidence.d.ts +4 -2
  320. package/dist/types/components/dispute-management/dispute-response/file-input-handler.d.ts +2 -0
  321. package/dist/types/components/dispute-management/dispute-response/product-or-service.d.ts +4 -2
  322. package/dist/types/components/dispute-management/dispute-response/refund-policy.d.ts +5 -2
  323. package/dist/types/components/dispute-management/dispute-response/shipping-details.d.ts +4 -1
  324. package/dist/types/components/order-terminals/order-terminals.d.ts +30 -3
  325. package/dist/types/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector-loading.d.ts +1 -0
  326. package/dist/types/components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.d.ts +17 -0
  327. package/dist/types/components/terminal-orders-list/terminal-order-status.d.ts +2 -0
  328. package/dist/types/components/terminal-orders-list/terminal-orders-list-core.d.ts +7 -5
  329. package/dist/types/components/terminal-orders-list/terminal-orders-list.d.ts +8 -2
  330. package/dist/types/components/terminal-orders-list/terminal-orders-table.d.ts +16 -5
  331. package/dist/types/components/terminals-list/terminals-table.d.ts +3 -1
  332. package/dist/types/components.d.ts +87 -8
  333. package/dist/types/global.d.ts +1 -0
  334. package/dist/types/styles/parts.d.ts +2 -0
  335. package/dist/webcomponents/p-0137575f.entry.js +1 -0
  336. package/dist/webcomponents/{p-f7d9ea0b.entry.js → p-030a8806.entry.js} +1 -1
  337. package/dist/webcomponents/p-039a09b8.entry.js +1 -0
  338. package/dist/webcomponents/{p-29688e30.js → p-046ecd01.js} +1 -1
  339. package/dist/webcomponents/{p-1278dedf.js → p-087758d3.js} +1 -1
  340. package/dist/webcomponents/{p-060896c4.entry.js → p-0a60d356.entry.js} +1 -1
  341. package/dist/webcomponents/p-0ba77d53.entry.js +1 -0
  342. package/dist/webcomponents/p-0c22225c.entry.js +1 -0
  343. package/dist/webcomponents/{p-5a96a2a2.entry.js → p-0cefd846.entry.js} +1 -1
  344. package/dist/webcomponents/{p-ae271c06.entry.js → p-10a14943.entry.js} +1 -1
  345. package/dist/webcomponents/p-10e32428.entry.js +1 -0
  346. package/dist/webcomponents/p-1705af62.js +1 -0
  347. package/dist/webcomponents/{p-553dba95.entry.js → p-19b8c3c8.entry.js} +1 -1
  348. package/dist/webcomponents/p-1a48d917.entry.js +1 -0
  349. package/dist/webcomponents/{p-300a99ee.js → p-1e300d41.js} +1 -1
  350. package/dist/webcomponents/p-2027145a.entry.js +1 -0
  351. package/dist/webcomponents/p-222fa126.entry.js +1 -0
  352. package/dist/webcomponents/{p-a31ba276.entry.js → p-33a17e80.entry.js} +1 -1
  353. package/dist/webcomponents/p-34e18d17.entry.js +1 -0
  354. package/dist/webcomponents/{p-e3e0d791.entry.js → p-36edba41.entry.js} +1 -1
  355. package/dist/webcomponents/p-3732aa87.js +1 -0
  356. package/dist/webcomponents/p-382ab4e8.js +1 -0
  357. package/dist/webcomponents/p-3947a309.entry.js +1 -0
  358. package/dist/webcomponents/p-3cbdca1b.js +1 -0
  359. package/dist/webcomponents/{p-939d0a35.entry.js → p-4d5c553d.entry.js} +1 -1
  360. package/dist/webcomponents/{p-8b16a20f.js → p-547b51e9.js} +1 -1
  361. package/dist/webcomponents/p-5ee67fad.js +1 -0
  362. package/dist/webcomponents/p-5efe9572.entry.js +1 -0
  363. package/dist/webcomponents/p-638b91ff.entry.js +1 -0
  364. package/dist/webcomponents/{p-e007002a.entry.js → p-685c7028.entry.js} +1 -1
  365. package/dist/webcomponents/{p-14f40baa.js → p-694078d2.js} +1 -1
  366. package/dist/webcomponents/p-69ac2640.entry.js +1 -0
  367. package/dist/webcomponents/p-6a2d6298.entry.js +1 -0
  368. package/dist/webcomponents/{p-b57cfe54.entry.js → p-6ef3de11.entry.js} +1 -1
  369. package/dist/webcomponents/p-71897cbc.js +1 -0
  370. package/dist/webcomponents/{p-4fbdf440.entry.js → p-759f25a1.entry.js} +1 -1
  371. package/dist/webcomponents/p-7dc9fb75.js +1 -0
  372. package/dist/webcomponents/p-7e93eac9.entry.js +1 -0
  373. package/dist/webcomponents/p-7ed52fbc.entry.js +1 -0
  374. package/dist/webcomponents/{p-8a7266b4.js → p-8066b866.js} +1 -1
  375. package/dist/webcomponents/p-830f0971.entry.js +1 -0
  376. package/dist/webcomponents/{p-020e7d5d.entry.js → p-833ef79e.entry.js} +1 -1
  377. package/dist/webcomponents/p-8971f9da.entry.js +1 -0
  378. package/dist/webcomponents/p-8c461ebc.entry.js +1 -0
  379. package/dist/webcomponents/p-8fad4359.entry.js +1 -0
  380. package/dist/webcomponents/{p-dfebd7a4.js → p-9dc9aaba.js} +1 -1
  381. package/dist/webcomponents/p-9f1a3199.js +1 -0
  382. package/dist/webcomponents/{p-19063270.entry.js → p-a07afdcc.entry.js} +1 -1
  383. package/dist/webcomponents/p-a173ccd5.entry.js +1 -0
  384. package/dist/webcomponents/p-a3d75257.js +1 -0
  385. package/dist/webcomponents/p-a957612b.entry.js +1 -0
  386. package/dist/webcomponents/p-aa21cdb1.entry.js +1 -0
  387. package/dist/webcomponents/p-aa923138.entry.js +1 -0
  388. package/dist/webcomponents/p-ad473d5c.entry.js +1 -0
  389. package/dist/webcomponents/p-b11468b5.entry.js +1 -0
  390. package/dist/webcomponents/{p-3b680e50.js → p-b5addd78.js} +1 -1
  391. package/dist/webcomponents/p-b62403c2.entry.js +1 -0
  392. package/dist/webcomponents/{p-bfe339d5.js → p-b69beb1c.js} +1 -1
  393. package/dist/webcomponents/{p-78a204f9.entry.js → p-b76f755a.entry.js} +1 -1
  394. package/dist/webcomponents/p-b8ee505d.entry.js +1 -0
  395. package/dist/webcomponents/p-b92aac9b.entry.js +1 -0
  396. package/dist/webcomponents/{p-fea43254.entry.js → p-b92f125b.entry.js} +1 -1
  397. package/dist/webcomponents/{p-a90d8f4f.entry.js → p-bd2340f7.entry.js} +1 -1
  398. package/dist/webcomponents/{p-b2d57b2c.entry.js → p-bd2d9d29.entry.js} +1 -1
  399. package/dist/webcomponents/p-bdf0ab42.js +1 -0
  400. package/dist/webcomponents/p-c406c0fa.js +1 -0
  401. package/dist/webcomponents/{p-09496255.js → p-c54f54ed.js} +1 -1
  402. package/dist/webcomponents/p-c5cc443e.entry.js +1 -0
  403. package/dist/webcomponents/p-cd68707b.entry.js +1 -0
  404. package/dist/webcomponents/p-d5a481e4.entry.js +1 -0
  405. package/dist/webcomponents/{p-389e1eb7.js → p-daf0303f.js} +1 -1
  406. package/dist/webcomponents/p-e366ef1e.js +1 -0
  407. package/dist/webcomponents/p-e400e31f.entry.js +1 -0
  408. package/dist/webcomponents/{p-235abbd1.entry.js → p-e4514af8.entry.js} +1 -1
  409. package/dist/webcomponents/{p-06f5b709.js → p-e60867c6.js} +1 -1
  410. package/dist/webcomponents/{p-89ecfbf4.entry.js → p-e754d8e7.entry.js} +1 -1
  411. package/dist/webcomponents/p-eb05bd1e.entry.js +1 -0
  412. package/dist/webcomponents/p-ede13cc8.js +1 -0
  413. package/dist/webcomponents/{p-df2559c7.js → p-ee9d433f.js} +1 -1
  414. package/dist/webcomponents/{p-ebbe93ac.entry.js → p-f04dbd80.entry.js} +1 -1
  415. package/dist/webcomponents/p-f2111e68.js +1 -0
  416. package/dist/webcomponents/p-f3061f2a.entry.js +1 -0
  417. package/dist/webcomponents/{p-906a6027.js → p-fa987dcf.js} +1 -1
  418. package/dist/webcomponents/p-fae67ab3.js +1 -0
  419. package/dist/webcomponents/p-fd4607f9.entry.js +1 -0
  420. package/dist/webcomponents/p-ffd0c24b.entry.js +1 -0
  421. package/dist/webcomponents/webcomponents.esm.js +1 -1
  422. package/package.json +1 -1
  423. package/dist/cjs/check-pkg-version-f5a3d421.js +0 -24
  424. package/dist/cjs/event-types-b6d34593.js +0 -8
  425. package/dist/cjs/terminal-orders-table-61081532.js +0 -18
  426. package/dist/esm/check-pkg-version-1d6e48c8.js +0 -22
  427. package/dist/esm/event-types-0a83d0b4.js +0 -8
  428. package/dist/esm/terminal-orders-table-765c44d5.js +0 -14
  429. package/dist/module/Analytics.js +0 -82
  430. package/dist/module/table.js +0 -55
  431. package/dist/webcomponents/p-08a17c5c.entry.js +0 -1
  432. package/dist/webcomponents/p-0b38cfbf.js +0 -1
  433. package/dist/webcomponents/p-0f4d851d.entry.js +0 -1
  434. package/dist/webcomponents/p-1aa22806.js +0 -1
  435. package/dist/webcomponents/p-1f4e26f3.entry.js +0 -1
  436. package/dist/webcomponents/p-1f99a902.js +0 -1
  437. package/dist/webcomponents/p-27c72b92.entry.js +0 -1
  438. package/dist/webcomponents/p-29fbbc93.js +0 -1
  439. package/dist/webcomponents/p-2e0ae487.js +0 -1
  440. package/dist/webcomponents/p-2f9af679.js +0 -1
  441. package/dist/webcomponents/p-37b7b200.entry.js +0 -1
  442. package/dist/webcomponents/p-39a63e0c.entry.js +0 -1
  443. package/dist/webcomponents/p-3ab7a49e.entry.js +0 -1
  444. package/dist/webcomponents/p-3d486f37.entry.js +0 -1
  445. package/dist/webcomponents/p-42a48c59.js +0 -1
  446. package/dist/webcomponents/p-49df4962.entry.js +0 -1
  447. package/dist/webcomponents/p-4a71c90b.entry.js +0 -1
  448. package/dist/webcomponents/p-4b6256e0.entry.js +0 -1
  449. package/dist/webcomponents/p-53b660a3.entry.js +0 -1
  450. package/dist/webcomponents/p-56697a12.entry.js +0 -1
  451. package/dist/webcomponents/p-595479da.entry.js +0 -1
  452. package/dist/webcomponents/p-66ae2a0e.entry.js +0 -1
  453. package/dist/webcomponents/p-670296bf.entry.js +0 -1
  454. package/dist/webcomponents/p-75b7dfe7.entry.js +0 -1
  455. package/dist/webcomponents/p-794cce10.entry.js +0 -1
  456. package/dist/webcomponents/p-7c541199.entry.js +0 -1
  457. package/dist/webcomponents/p-7d2538d9.entry.js +0 -1
  458. package/dist/webcomponents/p-7ee5a90e.entry.js +0 -1
  459. package/dist/webcomponents/p-8548edd6.entry.js +0 -1
  460. package/dist/webcomponents/p-9055aa6e.entry.js +0 -1
  461. package/dist/webcomponents/p-9a4d0e1d.entry.js +0 -1
  462. package/dist/webcomponents/p-9cbbe9cb.entry.js +0 -1
  463. package/dist/webcomponents/p-9edd6ad8.js +0 -1
  464. package/dist/webcomponents/p-a0082e77.entry.js +0 -1
  465. package/dist/webcomponents/p-a6b66c88.entry.js +0 -1
  466. package/dist/webcomponents/p-acca56ec.entry.js +0 -1
  467. package/dist/webcomponents/p-af945fc0.entry.js +0 -1
  468. package/dist/webcomponents/p-c2196cb8.entry.js +0 -1
  469. package/dist/webcomponents/p-c4ca0038.js +0 -1
  470. package/dist/webcomponents/p-cba89310.entry.js +0 -1
  471. package/dist/webcomponents/p-cbe05f11.js +0 -1
  472. package/dist/webcomponents/p-d279545a.entry.js +0 -1
  473. package/dist/webcomponents/p-d398ce81.js +0 -1
  474. package/dist/webcomponents/p-d432f0fd.entry.js +0 -1
  475. package/dist/webcomponents/p-d5c41ec6.js +0 -1
  476. package/dist/webcomponents/p-e8cd9691.js +0 -1
  477. package/dist/webcomponents/p-e9e80a62.js +0 -1
  478. package/dist/webcomponents/p-ec019b89.js +0 -1
  479. package/dist/webcomponents/p-fa843aad.entry.js +0 -1
  480. package/dist/webcomponents/p-fc3d2a9e.entry.js +0 -1
  481. package/dist/webcomponents/p-ff1f2d65.js +0 -1
@@ -0,0 +1,29 @@
1
+ import { ComponentErrorSeverity } from "../../api";
2
+ import { getErrorCode, getErrorMessage } from "../../api/services/utils";
3
+ export const makeOrderTerminals = ({ authToken, service }) => async ({ terminalOrder, onSuccess, onError }) => {
4
+ var _a;
5
+ try {
6
+ const response = await service.orderTerminals(authToken, terminalOrder);
7
+ if (!response.error) {
8
+ const { data } = response;
9
+ onSuccess({ data });
10
+ }
11
+ else {
12
+ const responseError = getErrorMessage(response.error);
13
+ const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
14
+ return onError({
15
+ error: responseError,
16
+ code,
17
+ severity: ComponentErrorSeverity.ERROR,
18
+ });
19
+ }
20
+ }
21
+ catch (error) {
22
+ const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
23
+ return onError({
24
+ error: error.message || error,
25
+ code,
26
+ severity: ComponentErrorSeverity.ERROR,
27
+ });
28
+ }
29
+ };
@@ -79,6 +79,11 @@ export var ICheckoutPaymentMode;
79
79
  ICheckoutPaymentMode["card_present"] = "Card Present";
80
80
  ICheckoutPaymentMode["unknown"] = "";
81
81
  })(ICheckoutPaymentMode || (ICheckoutPaymentMode = {}));
82
+ export var ICheckoutPaymentModeParam;
83
+ (function (ICheckoutPaymentModeParam) {
84
+ ICheckoutPaymentModeParam["bnpl"] = "bnpl";
85
+ ICheckoutPaymentModeParam["ecom"] = "ecom";
86
+ })(ICheckoutPaymentModeParam || (ICheckoutPaymentModeParam = {}));
82
87
  export var ICheckoutStatus;
83
88
  (function (ICheckoutStatus) {
84
89
  ICheckoutStatus["created"] = "created";
@@ -16,6 +16,7 @@ export class Terminal {
16
16
  this.platform_account_id = data.platform_account_id || '';
17
17
  this.provider = data.provider || '';
18
18
  this.provider_id = data.provider_id || '';
19
+ this.provider_serial_number = data.provider_serial_number || '';
19
20
  this.created_at = data.created_at || '';
20
21
  this.updated_at = data.updated_at || '';
21
22
  this.verified_at = data.verified_at || '';
@@ -0,0 +1,15 @@
1
+ export var TerminalModelName;
2
+ (function (TerminalModelName) {
3
+ TerminalModelName["v400"] = "v400";
4
+ TerminalModelName["p400"] = "p400+";
5
+ TerminalModelName["e285"] = "e285";
6
+ })(TerminalModelName || (TerminalModelName = {}));
7
+ export class TerminalModel {
8
+ constructor(data) {
9
+ this.id = data.id;
10
+ this.model_name = data.model_name;
11
+ this.description = data.description;
12
+ this.image_url = data.image_url;
13
+ this.help_url = data.help_url;
14
+ }
15
+ }
@@ -0,0 +1,51 @@
1
+ import { TerminalProviders } from "./Terminal";
2
+ export var TerminalOrderType;
3
+ (function (TerminalOrderType) {
4
+ TerminalOrderType["boardingOnly"] = "boarding_only";
5
+ TerminalOrderType["boardingShipping"] = "boarding_shipping";
6
+ })(TerminalOrderType || (TerminalOrderType = {}));
7
+ export var TerminalOrderStatus;
8
+ (function (TerminalOrderStatus) {
9
+ TerminalOrderStatus["created"] = "created";
10
+ TerminalOrderStatus["submitted"] = "submitted";
11
+ TerminalOrderStatus["completed"] = "completed";
12
+ })(TerminalOrderStatus || (TerminalOrderStatus = {}));
13
+ export class TerminalOrder {
14
+ constructor(data) {
15
+ this.id = data.id;
16
+ this.business_id = data.business_id;
17
+ this.account_id = data.account_id;
18
+ this.provider = data.provider || TerminalProviders.verifone;
19
+ this.order_items = [];
20
+ this.order_type = data.order_type;
21
+ this.order_status = data.order_status;
22
+ this.terminals = data.terminals;
23
+ this.created_at = data.created_at;
24
+ this.updated_at = data.updated_at;
25
+ }
26
+ get payload() {
27
+ return {
28
+ business_id: this.business_id,
29
+ account_id: this.account_id,
30
+ order_type: this.order_type,
31
+ order_items: this.order_items,
32
+ };
33
+ }
34
+ get totalQuantity() {
35
+ return this.order_items.reduce((acc, item) => acc + item.quantity, 0);
36
+ }
37
+ updateTerminal(model_name, quantity) {
38
+ // if quantity is 0, remove terminal
39
+ if (quantity === 0) {
40
+ this.order_items = this.order_items.filter((t) => t.model_name !== model_name);
41
+ return;
42
+ }
43
+ const terminal = this.order_items.find((t) => t.model_name === model_name);
44
+ if (terminal) {
45
+ terminal.quantity = quantity;
46
+ }
47
+ else {
48
+ this.order_items.push({ model_name, quantity });
49
+ }
50
+ }
51
+ }
@@ -8,6 +8,8 @@ export * from './Pagination';
8
8
  export * from './Payment';
9
9
  export * from './Payout';
10
10
  export * from './Terminal';
11
+ export * from './TerminalOrder';
12
+ export * from './TerminalModel';
11
13
  export * from './SubAccount';
12
14
  export * from './Document';
13
15
  // In a future PR I would like to update the naming of the BankAccount Payment Method class in Payment.ts so this import can be updated to be written the same as the others in this file.
@@ -10,4 +10,15 @@ export class TerminalService {
10
10
  const endpoint = `terminals/${terminalId}`;
11
11
  return Api({ authToken, apiOrigin: apiOrigin }).get(endpoint);
12
12
  }
13
+ async fetchTerminalModels(accountId, authToken, apiOrigin = API_ORIGIN) {
14
+ const headers = { 'sub-account': accountId };
15
+ const api = Api({ authToken, apiOrigin });
16
+ const endpoint = 'terminals/order_models';
17
+ return api.get(endpoint, null, null, headers);
18
+ }
19
+ async orderTerminals(authToken, terminalOrder, apiOrigin = API_ORIGIN) {
20
+ const api = Api({ authToken, apiOrigin });
21
+ const endpoint = 'terminals/orders';
22
+ return api.post(endpoint, terminalOrder);
23
+ }
13
24
  }
@@ -0,0 +1,9 @@
1
+ import { Api } from "..";
2
+ export class TerminalOrderService {
3
+ async fetchTerminalOrders(accountId, authToken, params, apiOrigin = PROXY_API_ORIGIN) {
4
+ const headers = { account: accountId };
5
+ const api = Api({ authToken, apiOrigin });
6
+ const endpoint = 'terminals/orders';
7
+ return api.get(endpoint, params, null, headers);
8
+ }
9
+ }
@@ -74,6 +74,7 @@
74
74
  "components/insurance/season-interruption/season-interruption-insurance-core.js",
75
75
  "components/insurance/season-interruption/season-interruption-insurance.js",
76
76
  "components/order-terminals/order-terminals.js",
77
+ "components/order-terminals/terminal-quantity-selector/terminal-quantity-selector.js",
77
78
  "components/payment-details/payment-details-core.js",
78
79
  "components/payment-details/payment-details.js",
79
80
  "components/payments-list/payments-list-core.js",
@@ -75,7 +75,7 @@ export class PaymentProvisioningCore {
75
75
  }
76
76
  componentWillLoad() {
77
77
  this.getBusiness && this.setBusinessProvisioned();
78
- this.refs = [this.coreInfoRef, this.legalAddressRef, this.additionalQuestionsRef, this.representativeRef, this.ownersRef, this.bankAccountRef, this.documentUploadRef, this.termsRef];
78
+ this.refs = [this.coreInfoRef, this.legalAddressRef, this.additionalQuestionsRef, this.representativeRef, this.ownersRef, this.bankAccountRef, this.termsRef];
79
79
  }
80
80
  get businessEndpoint() {
81
81
  return `entities/business/${this.businessId}`;
@@ -93,7 +93,7 @@ export class PaymentProvisioningCore {
93
93
  this.loading = event.detail;
94
94
  }
95
95
  render() {
96
- return (h(StyledHost, { key: '03dc39eadbac2f9a9a4326bab1355bfc300c392e' }, h("div", { key: '86e6e57fc104c87696c5825119a15c0a642c4bd2', class: 'row gap-3' }, h(Header1, { key: 'd4df3ead1037464624fb8cc465427c6b90bd0e36', text: this.formTitle }), h("justifi-payment-provisioning-form-steps", { key: '7f3d977b8dfbb29c03125c173e9d41558de08322', businessId: this.businessId, authToken: this.authToken, refs: this.refs, currentStep: this.currentStep, allowOptionalFields: this.allowOptionalFields, handleFormLoading: this.handleFormLoading }), h("div", { key: '283568d94267850b0eb41fa6a52dbc6b0abf4642', class: 'd-flex justify-content-between align-items-center' }, h("div", { key: '6abf09f174e71767087b57180e976546c057499f', class: 'd-flex align-items-center', part: text }, this.stepCounter), h("justifi-payment-provisioning-form-buttons", { key: 'b38ed082d216556c6ae93bde3ec1324e69f8fcee', currentStep: this.currentStep, totalSteps: this.totalSteps, formLoading: this.loading, formDisabled: this.formDisabled, previousStepButtonOnClick: this.previousStepButtonOnClick, nextStepButtonOnClick: this.nextStepButtonOnClick })))));
96
+ return (h(StyledHost, { key: '498b6e0a593808dd761b9cefdb7e94124d445348' }, h("div", { key: 'd746caba6329ac82e75978bd19fbc09c8a43d60f', class: 'row gap-3' }, h(Header1, { key: '439425337ed7767ce4fc8c94e31f6997aa1b62d8', text: this.formTitle }), h("justifi-payment-provisioning-form-steps", { key: 'fd95a40c0a72c94cbb146cbc866d6b057cbfc5c0', businessId: this.businessId, authToken: this.authToken, refs: this.refs, currentStep: this.currentStep, allowOptionalFields: this.allowOptionalFields, handleFormLoading: this.handleFormLoading }), h("div", { key: '350fc615685f872cb6ba5537dc2de5d2a205e5cc', class: 'd-flex justify-content-between align-items-center' }, h("div", { key: '3f9a36bc1d58efdfe81b4d7022647b0c1fbc1911', class: 'd-flex align-items-center', part: text }, this.stepCounter), h("justifi-payment-provisioning-form-buttons", { key: 'e1c061aa840b3b8ac1bad472d763fcd54c902681', currentStep: this.currentStep, totalSteps: this.totalSteps, formLoading: this.loading, formDisabled: this.formDisabled, previousStepButtonOnClick: this.previousStepButtonOnClick, nextStepButtonOnClick: this.nextStepButtonOnClick })))));
97
97
  }
98
98
  static get is() { return "justifi-payment-provisioning-core"; }
99
99
  static get properties() {
@@ -1,5 +1,5 @@
1
1
  import { h } from "@stencil/core";
2
- import { ICheckoutPaymentMode, ICheckoutStatus } from "../../api";
2
+ import { ICheckoutPaymentModeParam, ICheckoutStatus } from "../../api";
3
3
  import { filterParams, propsParams, clearParams } from "./checkouts-list-params-state";
4
4
  import { StyledHost } from "../../ui-components";
5
5
  import { checkoutsListFilterMenu, paymentModeCheckoutsListFilterParam, statusCheckoutsListFilterParam } from "../../styles/parts";
@@ -34,13 +34,13 @@ export class CheckoutsListFilters {
34
34
  get checkoutPaymentModeOptions() {
35
35
  return [
36
36
  { label: 'All', value: '' },
37
- { label: 'E-commerce', value: ICheckoutPaymentMode.ecom },
38
- { label: 'BNPL', value: ICheckoutPaymentMode.bnpl },
37
+ { label: 'E-commerce', value: ICheckoutPaymentModeParam.ecom },
38
+ { label: 'BNPL', value: ICheckoutPaymentModeParam.bnpl },
39
39
  ];
40
40
  }
41
41
  render() {
42
42
  const filterMenuParams = Object.assign({}, filterParams);
43
- return (h(StyledHost, { key: 'cd70cc85372ea03d544340c36de1bc559cce757d' }, h("table-filters-menu", { key: '332fbf23bcf5e542aa3439b93bcfe046889b89b0', params: filterMenuParams, clearParams: clearParams, part: checkoutsListFilterMenu }, h("div", { key: 'a95f24fa9b92cd35e0dd15a7fc5cafb2cca84c9f', class: "grid-cols-2 gap-3 p-1" }, h("div", { key: 'd58366e790b1bb2fb3aa8605a806a8197ea4f5c9', class: "p-2" }, h("form-control-select", { key: '1e48969ede334298a5d058f22bf5b1e39c78f535', name: "status", label: "Status", options: this.checkoutStatusOptions, inputHandler: this.setParamsOnChange, defaultValue: this.checkoutStatus || filterParams.status, disabled: !!this.checkoutStatus, part: statusCheckoutsListFilterParam })), h("div", { key: '33d8d552c77a6355423e9252779f85b288e123d1', class: "p-2" }, h("form-control-select", { key: 'a1ae23979fb00d92a9a1c7972c375494cabde720', name: "payment_mode", label: "Payment Mode", options: this.checkoutPaymentModeOptions, inputHandler: this.setParamsOnChange, defaultValue: this.paymentMode || filterParams.payment_mode, disabled: !!this.paymentMode, part: paymentModeCheckoutsListFilterParam }))))));
43
+ return (h(StyledHost, { key: 'bcae6fee83117dde40a29ebcab8e85089bcdc37e' }, h("table-filters-menu", { key: '56c6a5d205836fe010917f0f0d978507cf227a3f', params: filterMenuParams, clearParams: clearParams, part: checkoutsListFilterMenu }, h("div", { key: 'c82691f9b863368a2b7523dc7d9d348c3fe2e776', class: "grid-cols-2 gap-3 p-1" }, h("div", { key: '9abbb01e53139ebd376a638400b199d88288b175', class: "p-2" }, h("form-control-select", { key: '3859777cf1f4ee451a65440a90dfe9e5f4a2f069', name: "status", label: "Status", options: this.checkoutStatusOptions, inputHandler: this.setParamsOnChange, defaultValue: this.checkoutStatus || filterParams.status, disabled: !!this.checkoutStatus, part: statusCheckoutsListFilterParam })), h("div", { key: '3c23d4b820ea2424d6ddc01e6952c8c46cd7d975', class: "p-2" }, h("form-control-select", { key: 'c376228f82419b959b3fefa6b32d25c584c6ea3b', name: "payment_mode", label: "Payment Mode", options: this.checkoutPaymentModeOptions, inputHandler: this.setParamsOnChange, defaultValue: this.paymentMode || filterParams.payment_mode, disabled: !!this.paymentMode, part: paymentModeCheckoutsListFilterParam }))))));
44
44
  }
45
45
  static get is() { return "justifi-checkouts-list-filters"; }
46
46
  static get encapsulation() { return "shadow"; }
@@ -73,13 +73,13 @@ export class CheckoutsListFilters {
73
73
  "type": "string",
74
74
  "mutable": false,
75
75
  "complexType": {
76
- "original": "ICheckoutPaymentMode",
77
- "resolved": "ICheckoutPaymentMode.bank_account | ICheckoutPaymentMode.bnpl | ICheckoutPaymentMode.card | ICheckoutPaymentMode.card_present | ICheckoutPaymentMode.ecom | ICheckoutPaymentMode.unknown",
76
+ "original": "ICheckoutPaymentModeParam",
77
+ "resolved": "ICheckoutPaymentModeParam.bnpl | ICheckoutPaymentModeParam.ecom",
78
78
  "references": {
79
- "ICheckoutPaymentMode": {
79
+ "ICheckoutPaymentModeParam": {
80
80
  "location": "import",
81
81
  "path": "../../api",
82
- "id": "src/api/index.ts::ICheckoutPaymentMode"
82
+ "id": "src/api/index.ts::ICheckoutPaymentModeParam"
83
83
  }
84
84
  }
85
85
  },
@@ -35,7 +35,7 @@ export class DisputeNotification {
35
35
  }
36
36
  render() {
37
37
  var _a, _b, _c, _d, _e, _f, _g;
38
- return (h(StyledHost, { key: '77119b1227200909f4742e24df0a45e1f631c65c' }, this.isLoading && (h("div", { key: 'f0766ff057fb2f4b75b34c7d4a386bde43e49652', style: { marginBottom: '8px' } }, h(Skeleton, { key: 'd7268194dea5ac2a3b87aea8e17573b4768e308f', height: '28px', width: '70%', styles: { marginBottom: '16px' } }), h(Skeleton, { key: 'f8863e45a917f56be302ca1b0b3d472119f6465c', height: '18px', styles: { marginBottom: '8px' } }), h(Skeleton, { key: 'c7b8c9c89d9488eea3be8ea0b4536f98a8151487', height: '18px', styles: { marginBottom: '8px' } }))), ((_a = this.dispute) === null || _a === void 0 ? void 0 : _a.needsResponse) && (h("div", { key: '875fe7def317ce1c4547e04e83baf2b232209058', part: text }, h("h1", { key: '09646afc2aac3bf4ef9737bc12442660bbafb2dd', class: "h4", part: heading4 }, "This payment is disputed"), h("p", { key: '14224cffb16726eaa589118be954e0f844ffaee8' }, "The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."), h("h2", { key: '415028b91872a2391796872fdffdbee837a2a511', class: "h5" }, "Dispute details"), h("div", { key: 'c2b8c6be3132f98eb8c686ab88a5a6a68f92a60e', class: "d-table gap-2" }, h("div", { key: 'd11bd8b3bc680183e8bee40281cc2c294aedbd5a', class: "d-table-row gap-2" }, h("span", { key: 'd77796c0d2764329c3b482ae49ceb8b4cac03d37', part: "detail-section-item-title", class: "fw-bold d-table-cell pe-4" }, "Amount"), h("span", { key: '716d8af2a250c3237af6e23b43bf50e032e9f203', part: "detail-section-item-data", class: "flex-1 d-table-cell text-wrap" }, formatCurrency((_b = this.dispute) === null || _b === void 0 ? void 0 : _b.amount))), h("div", { key: 'daba4379197533d2a4b246e81139d81cd15761c6', class: "d-table-row gap-2" }, h("span", { key: 'a039fbf47aff16445e3411c33a7b53716c42866d', part: "detail-section-item-title", class: "fw-bold d-table-cell pe-4" }, "Reason"), h("span", { key: '19087aba5c516d0c71e9f84e8b3323a044ae532a', part: "detail-section-item-data", class: "flex-1 d-table-cell text-wrap" }, (_c = this.dispute) === null || _c === void 0 ? void 0 : _c.reason)), h("div", { key: '68ef78b15627df3b22bcde4b90f7c216466e7468', class: "d-table-row gap-2" }, h("span", { key: '9463c281d76b5e201a55c2993253fc22d04168dc', part: "detail-section-item-title", class: "fw-bold d-table-cell pe-4" }, "Dispute ID"), h("span", { key: '5cffed27038f5571f37377c5023a88c8b7773a59', part: "detail-section-item-data", class: "flex-1 d-table-cell text-wrap" }, (_d = this.dispute) === null || _d === void 0 ? void 0 : _d.id))), h("div", { key: 'e856d924edac10116781425f6d7c4c8c6b26ced2', class: "d-flex gap-2 mt-4 justify-content-end" }, h(Button, { key: '6d5278a91f79c2fe8fbdd9e391b109a6491b13b6', variant: "secondary", onClick: () => this.acceptDispute() }, "Accept dispute"), h(Button, { key: '242b9076b482aae731ab6bedc1592a1a826e24c5', variant: "primary", onClick: () => this.initiateRespondToDispute() }, "Counter dispute")))), ((_e = this.dispute) === null || _e === void 0 ? void 0 : _e.underReview) && (h("div", { key: 'f3711546ce5bf8b6a4a8689f5db3fdbf58f45bf4' }, h("h1", { key: '06e39be43cfacf667919adbd2f4f8c596702c340', class: "h4" }, "This payment is disputed and under review"), h("p", { key: 'b3bfef2d40e197f8dc9df6f71d9f13017a4b923d' }, "The cardholder is disputing this payment. A counter dispute has been submitEvent and is under review."))), ((_f = this.dispute) === null || _f === void 0 ? void 0 : _f.won) && (h("div", { key: 'cb6185865417d70ab67734db37b880f67160ea62' }, h("h1", { key: '96dfe178f6d5de97f190f0df6bb0bf19e7b04227', class: "h4" }, "This payment was disputed"), h("p", { key: '4f6e8bdd940b69d34c1d84564b83f0a1f8c76059' }, "The cardholder disputed this payment and the card issuer has settled it in your favor."))), ((_g = this.dispute) === null || _g === void 0 ? void 0 : _g.lost) && (h("div", { key: '3852f5221f59739d5079ad0e56b99409167678b0' }, h("h1", { key: 'f6052feaabc3b94c727465a8f02534805ba968c8', class: "h4" }, "This payment was disputed"), h("p", { key: 'b0c91b828828842bf7a706e794124d0a8404c25e' }, "The cardholder disputed this payment and the card issuer has settled it their favor.")))));
38
+ return (h(StyledHost, { key: '77119b1227200909f4742e24df0a45e1f631c65c' }, this.isLoading && (h("div", { key: 'f0766ff057fb2f4b75b34c7d4a386bde43e49652', style: { marginBottom: '8px' } }, h(Skeleton, { key: 'd7268194dea5ac2a3b87aea8e17573b4768e308f', height: '28px', width: '70%', styles: { marginBottom: '16px' } }), h(Skeleton, { key: 'f8863e45a917f56be302ca1b0b3d472119f6465c', height: '18px', styles: { marginBottom: '8px' } }), h(Skeleton, { key: 'c7b8c9c89d9488eea3be8ea0b4536f98a8151487', height: '18px', styles: { marginBottom: '8px' } }))), ((_a = this.dispute) === null || _a === void 0 ? void 0 : _a.needsResponse) && (h("div", { key: '875fe7def317ce1c4547e04e83baf2b232209058', part: text }, h("h1", { key: '09646afc2aac3bf4ef9737bc12442660bbafb2dd', class: "h4", part: heading4 }, "This payment is disputed"), h("p", { key: '14224cffb16726eaa589118be954e0f844ffaee8' }, "The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."), h("h2", { key: '415028b91872a2391796872fdffdbee837a2a511', class: "h5" }, "Dispute details"), h("div", { key: 'c2b8c6be3132f98eb8c686ab88a5a6a68f92a60e', class: "d-table gap-2" }, h("div", { key: 'd11bd8b3bc680183e8bee40281cc2c294aedbd5a', class: "d-table-row gap-2" }, h("span", { key: 'd77796c0d2764329c3b482ae49ceb8b4cac03d37', part: "detail-section-item-title", class: "fw-bold d-table-cell pe-4" }, "Amount"), h("span", { key: '716d8af2a250c3237af6e23b43bf50e032e9f203', part: "detail-section-item-data", class: "flex-1 d-table-cell text-wrap" }, formatCurrency((_b = this.dispute) === null || _b === void 0 ? void 0 : _b.amount))), h("div", { key: 'daba4379197533d2a4b246e81139d81cd15761c6', class: "d-table-row gap-2" }, h("span", { key: 'a039fbf47aff16445e3411c33a7b53716c42866d', part: "detail-section-item-title", class: "fw-bold d-table-cell pe-4" }, "Reason"), h("span", { key: '19087aba5c516d0c71e9f84e8b3323a044ae532a', part: "detail-section-item-data", class: "flex-1 d-table-cell text-wrap" }, (_c = this.dispute) === null || _c === void 0 ? void 0 : _c.reason)), h("div", { key: '68ef78b15627df3b22bcde4b90f7c216466e7468', class: "d-table-row gap-2" }, h("span", { key: '9463c281d76b5e201a55c2993253fc22d04168dc', part: "detail-section-item-title", class: "fw-bold d-table-cell pe-4" }, "Dispute ID"), h("span", { key: '5cffed27038f5571f37377c5023a88c8b7773a59', part: "detail-section-item-data", class: "flex-1 d-table-cell text-wrap" }, (_d = this.dispute) === null || _d === void 0 ? void 0 : _d.id))), h("div", { key: 'e856d924edac10116781425f6d7c4c8c6b26ced2', class: "d-flex gap-2 mt-4 justify-content-end" }, h(Button, { key: '6d5278a91f79c2fe8fbdd9e391b109a6491b13b6', variant: "secondary", onClick: () => this.acceptDispute() }, "Accept dispute"), h(Button, { key: '242b9076b482aae731ab6bedc1592a1a826e24c5', variant: "primary", onClick: () => this.initiateRespondToDispute() }, "Counter dispute")))), ((_e = this.dispute) === null || _e === void 0 ? void 0 : _e.underReview) && (h("div", { key: 'f3711546ce5bf8b6a4a8689f5db3fdbf58f45bf4' }, h("h1", { key: '06e39be43cfacf667919adbd2f4f8c596702c340', class: "h4" }, "This payment is disputed and under review"), h("p", { key: 'b3bfef2d40e197f8dc9df6f71d9f13017a4b923d' }, "The cardholder is disputing this payment. A counter dispute has been submitted and is under review."))), ((_f = this.dispute) === null || _f === void 0 ? void 0 : _f.won) && (h("div", { key: '580144b1439d6e017726b9731b7bb15e71900092' }, h("h1", { key: '42d74d215d23409672449af86e25c945aac33ea1', class: "h4" }, "This payment was disputed"), h("p", { key: '4c337e89a32f62c8f03a53eb84737785f4b0bdb4' }, "The cardholder disputed this payment and the card issuer has settled it in your favor."))), ((_g = this.dispute) === null || _g === void 0 ? void 0 : _g.lost) && (h("div", { key: '66c0f7bbada42053683dd25776a7c0abdb708315' }, h("h1", { key: '273f2d82dbe73a15da3186946763579be2801aa4', class: "h4" }, "This payment was disputed"), h("p", { key: '22172d1c6833eb5407c19dd31b85db805d07d177' }, "The cardholder disputed this payment and the card issuer has settled it in their favor.")))));
39
39
  }
40
40
  static get is() { return "justifi-dispute-notification"; }
41
41
  static get encapsulation() { return "shadow"; }
@@ -1,31 +1,25 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { FormController } from "../../../ui-components/form/form";
3
3
  import AdditionalStatementSchema from "./schemas/additional-statement-schema";
4
- import { DisputeEvidenceDocument } from "../../../api/DisputeEvidenceDocument";
5
4
  import { DisputeResponseFormStep } from "./dispute-response-form-types";
6
5
  import { heading5 } from "../../../styles/parts";
6
+ import fileInputHandler from "./file-input-handler";
7
7
  export class AdditionalStatement {
8
8
  constructor() {
9
9
  this.inputHandler = (name, value) => {
10
10
  this.form.setValues(Object.assign(Object.assign({}, this.form.values.getValue()), { [name]: value }));
11
11
  };
12
- this.handleFileSelection = (e) => {
13
- const target = e.target;
14
- const name = target.name;
15
- const files = target.files;
16
- for (const file of files) {
17
- this.documentList.push(new DisputeEvidenceDocument(file, name));
18
- }
19
- };
20
12
  this.disputeResponse = undefined;
13
+ this.documentErrors = {};
21
14
  this.form = undefined;
22
15
  this.errors = {};
23
- this.documentList = [];
24
16
  this.acceptedTerms = false;
25
17
  this.acceptedTermsErrorText = undefined;
18
+ this.documents = { uncategorized_file: [] };
26
19
  }
27
20
  async validateAndSubmit(onSuccess) {
28
- this.form.validateAndSubmit((formData) => onSuccess(formData, this.documentList, DisputeResponseFormStep.additionalStatement));
21
+ const documentList = Object.values(this.documents).flat();
22
+ this.form.validateAndSubmit((formData) => onSuccess(formData, documentList, DisputeResponseFormStep.additionalStatement));
29
23
  }
30
24
  ;
31
25
  componentWillLoad() {
@@ -37,8 +31,8 @@ export class AdditionalStatement {
37
31
  });
38
32
  }
39
33
  render() {
40
- var _a;
41
- return (h("div", { key: '083f14b645e1e04bdcbf966ae3b7849559c41104' }, h("div", { key: '08bfee9d04c586bb56a5a077363f05c39aad1330', class: "row gy-3" }, h("div", { key: 'd118d863cfd771562eea8ab95027e0c68f78fb83', class: "col-12" }, h("h2", { key: 'ed467dd3210f8a7f8da11e0c38ab6e2b30cf7137', class: "h5", part: heading5 }, "Additional Evidence")), h("div", { key: 'aabe0f4f662cd44db39b28d17bd37514aa7e3be0', class: "col-12" }, h("form-control-textarea", { key: 'ea4c86dd49d91ed386db8e00bf42315813a0ee62', label: "Is there anything else you would like to say about this dispute?", name: "additional_statement", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.additional_statement, inputHandler: this.inputHandler, errorText: this.errors.additional_statement })), h("div", { key: 'a9279734278c970e210795ca6a52c1fd9e44de91', class: "col-12" }, h("form-control-file-v2", { key: 'edc1e80a9a2115ca0b0aacaf43bec320edcce150', label: "Additional files", name: "uncategorized_file", multiple: true, helpText: "Upload any additional pieces of evidence that have not already been provided.", onChange: this.handleFileSelection })))));
34
+ var _a, _b;
35
+ return (h("div", { key: '5e572a30ed53b4fbcf3808ba545ce2fdf5b988aa' }, h("div", { key: '90870dc58e0eab72e64ae03bdaa25bb1749d8e23', class: "row gy-3" }, h("div", { key: 'cc3b6f19687d02e047744e8a53d22a2f91a8b968', class: "col-12" }, h("h2", { key: '230c20dc3f75e48afa4008369374fd8c175cb7ea', class: "h5", part: heading5 }, "Additional Evidence")), h("div", { key: '7b49c8012cfc07c44399969f8505db786389b38b', class: "col-12" }, h("form-control-textarea", { key: '349a8a2ebda338e170c90266801ae93b6f9482ea', label: "Is there anything else you would like to say about this dispute?", name: "additional_statement", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.additional_statement, inputHandler: this.inputHandler, errorText: this.errors.additional_statement })), h("div", { key: '01cd368a2278c5de462f0998a50ba4ca5889be26', class: "col-12" }, h("form-control-file-v2", { key: 'f95d0b78704f9a1fd154003edbbffb062659ae27', label: "Additional files", name: "uncategorized_file", multiple: true, helpText: "Upload any additional pieces of evidence that have not already been provided.", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_b = this.documentErrors) === null || _b === void 0 ? void 0 : _b.uncategorized_file })))));
42
36
  }
43
37
  static get is() { return "justifi-additional-statement"; }
44
38
  static get properties() {
@@ -59,6 +53,24 @@ export class AdditionalStatement {
59
53
  },
60
54
  "attribute": "dispute-response",
61
55
  "reflect": false
56
+ },
57
+ "documentErrors": {
58
+ "type": "any",
59
+ "mutable": false,
60
+ "complexType": {
61
+ "original": "any",
62
+ "resolved": "any",
63
+ "references": {}
64
+ },
65
+ "required": false,
66
+ "optional": false,
67
+ "docs": {
68
+ "tags": [],
69
+ "text": ""
70
+ },
71
+ "attribute": "document-errors",
72
+ "reflect": false,
73
+ "defaultValue": "{}"
62
74
  }
63
75
  };
64
76
  }
@@ -66,9 +78,9 @@ export class AdditionalStatement {
66
78
  return {
67
79
  "form": {},
68
80
  "errors": {},
69
- "documentList": {},
70
81
  "acceptedTerms": {},
71
- "acceptedTermsErrorText": {}
82
+ "acceptedTermsErrorText": {},
83
+ "documents": {}
72
84
  };
73
85
  }
74
86
  static get methods() {
@@ -1,29 +1,23 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { FormController } from "../../../ui-components/form/form";
3
3
  import CancellationPolicySchema from "./schemas/cancellation-policy-schema";
4
- import { DisputeEvidenceDocument } from "../../../api/DisputeEvidenceDocument";
5
4
  import { DisputeResponseFormStep } from "./dispute-response-form-types";
6
5
  import { heading5 } from "../../../styles/parts";
6
+ import fileInputHandler from "./file-input-handler";
7
7
  export class CancellationPolicy {
8
8
  constructor() {
9
9
  this.inputHandler = (name, value) => {
10
10
  this.form.setValues(Object.assign(Object.assign({}, this.form.values.getValue()), { [name]: value }));
11
11
  };
12
- this.handleFileSelection = (e) => {
13
- const target = e.target;
14
- const name = target.name;
15
- const files = target.files;
16
- for (const file of files) {
17
- this.documentList.push(new DisputeEvidenceDocument(file, name));
18
- }
19
- };
20
12
  this.disputeResponse = undefined;
13
+ this.documentErrors = {};
21
14
  this.form = undefined;
22
15
  this.errors = {};
23
- this.documentList = [];
16
+ this.documents = { cancellation_policy: [] };
24
17
  }
25
18
  async validateAndSubmit(onSuccess) {
26
- this.form.validateAndSubmit((formData) => onSuccess(formData, this.documentList, DisputeResponseFormStep.cancellationPolicy));
19
+ const documentList = Object.values(this.documents).flat();
20
+ this.form.validateAndSubmit((formData) => onSuccess(formData, documentList, DisputeResponseFormStep.cancellationPolicy));
27
21
  }
28
22
  ;
29
23
  componentWillLoad() {
@@ -35,8 +29,8 @@ export class CancellationPolicy {
35
29
  });
36
30
  }
37
31
  render() {
38
- var _a, _b;
39
- return (h("div", { key: 'a3547f9f1e7f9a00e08a63302138574b1e21ac77' }, h("div", { key: '5cb90af6d52f208e70e82abe7486f8f02320b94b', class: "row gy-3" }, h("div", { key: 'b042e320b7017a836f0d075ca9131dfeaf696eaf', class: "col-12" }, h("h2", { key: '6d055390874e5679f073a4641933aa979864c916', class: "h5", part: heading5 }, "Cancellation Policy")), h("div", { key: 'd05a7f01f33b16b887fcd08d8dbccd6656286cc6', class: "col-12" }, h("form-control-textarea", { key: 'd6a09e94f42aee41d7147be39df6cd1771ea4b36', label: "Cancellation Policy Disclosure", name: "cancellation_policy_disclosure", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.cancellation_policy_disclosure, inputHandler: this.inputHandler, errorText: this.errors.cancellation_policy_disclosure })), h("div", { key: '4d72c534c23013caa94ba3f61a3570f742194c45', class: "col-12" }, h("form-control-textarea", { key: 'b63ddec49b8ca7e10b1a7003d6cbab7e22c667d6', label: "Cancellation Rebuttal", name: "cancellation_rebuttal", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.cancellation_rebuttal, inputHandler: this.inputHandler, errorText: this.errors.cancellation_rebuttal })), h("div", { key: '13f3dddacbf160789af2364455e138ea156929b9', class: "col-12" }, h("form-control-file-v2", { key: '9f950b05c37edf21f342ef880d0c784df93b11d5', label: "Upload Cancellation Policy", name: "cancellation_policy_file", onChange: this.handleFileSelection })))));
32
+ var _a, _b, _c;
33
+ return (h("div", { key: '6dc5100426e8e4124d19a375250f85f8e15b28d4' }, h("div", { key: 'fb950108be5fd4096a7717c88943938261787f99', class: "row gy-3" }, h("div", { key: '08f85a06288e19939a16d3fa52ef3b3199c56f36', class: "col-12" }, h("h2", { key: 'a585b93921814b1ffbb95c6f9c1de37d4104049b', class: "h5", part: heading5 }, "Cancellation Policy")), h("div", { key: '3b7c620518006738d2e36863b62a72142f167733', class: "col-12" }, h("form-control-textarea", { key: '70a76160b0d29648a9e0598dd5b867a382935e03', label: "Cancellation Policy Disclosure", name: "cancellation_policy_disclosure", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.cancellation_policy_disclosure, inputHandler: this.inputHandler, errorText: this.errors.cancellation_policy_disclosure })), h("div", { key: 'e06d4c794bad47e366ca702e764307fdab5e33a8', class: "col-12" }, h("form-control-textarea", { key: '1b783920c5a5b94bff60d4b061cc7cc6666cc184', label: "Cancellation Rebuttal", name: "cancellation_rebuttal", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.cancellation_rebuttal, inputHandler: this.inputHandler, errorText: this.errors.cancellation_rebuttal })), h("div", { key: '3cb3371c1d3727e55140ea60a0cff96bc0f42702', class: "col-12" }, h("form-control-file-v2", { key: '738a456bf4653240180963fa7e5ab20a7a4add7c', label: "Upload Cancellation Policy", name: "cancellation_policy", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_c = this.documentErrors) === null || _c === void 0 ? void 0 : _c.cancellation_policy })))));
40
34
  }
41
35
  static get is() { return "justifi-cancellation-policy"; }
42
36
  static get properties() {
@@ -57,6 +51,24 @@ export class CancellationPolicy {
57
51
  },
58
52
  "attribute": "dispute-response",
59
53
  "reflect": false
54
+ },
55
+ "documentErrors": {
56
+ "type": "any",
57
+ "mutable": false,
58
+ "complexType": {
59
+ "original": "any",
60
+ "resolved": "any",
61
+ "references": {}
62
+ },
63
+ "required": false,
64
+ "optional": false,
65
+ "docs": {
66
+ "tags": [],
67
+ "text": ""
68
+ },
69
+ "attribute": "document-errors",
70
+ "reflect": false,
71
+ "defaultValue": "{}"
60
72
  }
61
73
  };
62
74
  }
@@ -64,7 +76,7 @@ export class CancellationPolicy {
64
76
  return {
65
77
  "form": {},
66
78
  "errors": {},
67
- "documentList": {}
79
+ "documents": {}
68
80
  };
69
81
  }
70
82
  static get methods() {
@@ -1,29 +1,23 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { FormController } from "../../../ui-components/form/form";
3
3
  import CustomerDetailsSchema from "./schemas/customer-details-schema";
4
- import { DisputeEvidenceDocument } from "../../../api/DisputeEvidenceDocument";
5
4
  import { DisputeResponseFormStep } from "./dispute-response-form-types";
6
5
  import { heading5 } from "../../../styles/parts";
6
+ import fileInputHandler from "./file-input-handler";
7
7
  export class CustomerDetails {
8
8
  constructor() {
9
9
  this.inputHandler = (name, value) => {
10
10
  this.form.setValues(Object.assign(Object.assign({}, this.form.values.getValue()), { [name]: value }));
11
11
  };
12
- this.handleFileSelection = (e) => {
13
- const target = e.target;
14
- const name = target.name;
15
- const files = target.files;
16
- for (const file of files) {
17
- this.documentList.push(new DisputeEvidenceDocument(file, name));
18
- }
19
- };
20
12
  this.disputeResponse = undefined;
13
+ this.documentErrors = {};
21
14
  this.form = undefined;
22
15
  this.errors = {};
23
- this.documentList = [];
16
+ this.documents = { customer_signature: [], customer_communication: [] };
24
17
  }
25
18
  async validateAndSubmit(onSuccess) {
26
- this.form.validateAndSubmit((formData) => onSuccess(formData, this.documentList, DisputeResponseFormStep.customerDetails));
19
+ const documentList = Object.values(this.documents).flat();
20
+ this.form.validateAndSubmit((formData) => onSuccess(formData, documentList, DisputeResponseFormStep.customerDetails));
27
21
  }
28
22
  ;
29
23
  componentWillLoad() {
@@ -35,8 +29,8 @@ export class CustomerDetails {
35
29
  });
36
30
  }
37
31
  render() {
38
- var _a, _b, _c;
39
- return (h("div", { key: '7c8bb0293eee2006e4e8e7aa65a692b3ce211c43' }, h("div", { key: '677de6f4bbf636dbbba97f5a188b076985fc6f0a', class: "row gy-3" }, h("div", { key: 'b1044548517ab9bc2f8a873965e1f81fd98a6216', class: "col-12" }, h("h2", { key: 'e3c6706441eee0adbfdf540528511353686d1fb9', class: "h5", part: heading5 }, "Customer Details")), h("div", { key: '2e5e5eda8c07941358a02430aa06bcd4ce13a5ca', class: "col-12" }, h("form-control-text", { key: '6271fd7c5def3e501501f5a8af00bcbc77b5e67d', label: "Full Name", name: "customer_name", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.customer_name, inputHandler: this.inputHandler, errorText: this.errors.customer_name })), h("div", { key: '4347830601eda422e863cbdd70cf4d9862d19fb2', class: "col-12" }, h("form-control-text", { key: '4dbb512ac5a81de067d2fb9c2b9edeffda1f199b', label: "Email", name: "customer_email_address", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.customer_email_address, inputHandler: this.inputHandler, errorText: this.errors.customer_email_address })), h("div", { key: 'ee16ae4bd2ea9c4e3949af9705e05fd6709b7f5d', class: "col-12" }, h("form-control-textarea", { key: 'd2339c6ebc8ffbe24f68ce079f0d623f7107cf29', label: "Billing Address", name: "customer_billing_address", defaultValue: (_c = this.disputeResponse) === null || _c === void 0 ? void 0 : _c.customer_billing_address, inputHandler: this.inputHandler, errorText: this.errors.customer_billing_address })), h("div", { key: 'eff1fb76a8cab96b0fba6e7b8a1aab2b6dc405e7', class: "col-12" }, h("form-control-file-v2", { key: 'ece727a3d010e0ba4741874992ed3e92d711b338', label: "Customer Signature", name: "customer_signature", onChange: this.handleFileSelection })), h("div", { key: 'b585af6033d79e16a71ff8ff9ee34176910ae109', class: "col-12" }, h("form-control-file-v2", { key: '74473ea1ac14a7efaa4a0032bea1d2c4b5ca6339', label: "Customer Communication", name: "customer_communication", onChange: this.handleFileSelection })))));
32
+ var _a, _b, _c, _d, _e;
33
+ return (h("div", { key: '70e29d650d5304522f927c15b4eb5e62e203c5e0' }, h("div", { key: 'f50422b29cb2a4f3bca911ced94dc681adb3fc41', class: "row gy-3" }, h("div", { key: 'f29816d9281ea4c4db5018d3b7edb1600569357a', class: "col-12" }, h("h2", { key: 'a2889c95c293bf0bbf97c16e4486e307ca87729c', class: "h5", part: heading5 }, "Customer Details")), h("div", { key: '9cd45719434a1740f67b73c13fd08e0fe562168e', class: "col-12" }, h("form-control-text", { key: '5a30a3aef7fbe2d3013c46e43a437724dae41213', label: "Full Name", name: "customer_name", defaultValue: (_a = this.disputeResponse) === null || _a === void 0 ? void 0 : _a.customer_name, inputHandler: this.inputHandler, errorText: this.errors.customer_name })), h("div", { key: '9812e1f9f6df949b9f15b2c3f28857db7dcf5cb7', class: "col-12" }, h("form-control-text", { key: '10b146053a399039e8dbd42c3cab53b4b55c0ec3', label: "Email", name: "customer_email_address", defaultValue: (_b = this.disputeResponse) === null || _b === void 0 ? void 0 : _b.customer_email_address, inputHandler: this.inputHandler, errorText: this.errors.customer_email_address })), h("div", { key: '2742a0922a223bd60d6e3d08a55190742ecf5112', class: "col-12" }, h("form-control-textarea", { key: '41491e238c75716520d747cbf9f1bcc329a2d686', label: "Billing Address", name: "customer_billing_address", defaultValue: (_c = this.disputeResponse) === null || _c === void 0 ? void 0 : _c.customer_billing_address, inputHandler: this.inputHandler, errorText: this.errors.customer_billing_address })), h("div", { key: '71074f31e565c24107b91b04d9aa16da77ba618c', class: "col-12" }, h("form-control-file-v2", { key: '17f70cf96927b01e65430e13c2d21209e9170603', label: "Customer Signature", name: "customer_signature", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_d = this.documentErrors) === null || _d === void 0 ? void 0 : _d.customer_signature })), h("div", { key: 'ec696695191e68c7ceb0cc41f99f9e53f2d59da1', class: "col-12" }, h("form-control-file-v2", { key: '562ff8b3819f536d491f2e2e55a85a55fcda0e1c', label: "Customer Communication", name: "customer_communication", onChange: (e) => fileInputHandler(e, this.documents), errorText: (_e = this.documentErrors) === null || _e === void 0 ? void 0 : _e.customer_communication })))));
40
34
  }
41
35
  static get is() { return "justifi-customer-details"; }
42
36
  static get properties() {
@@ -57,6 +51,24 @@ export class CustomerDetails {
57
51
  },
58
52
  "attribute": "dispute-response",
59
53
  "reflect": false
54
+ },
55
+ "documentErrors": {
56
+ "type": "any",
57
+ "mutable": false,
58
+ "complexType": {
59
+ "original": "any",
60
+ "resolved": "any",
61
+ "references": {}
62
+ },
63
+ "required": false,
64
+ "optional": false,
65
+ "docs": {
66
+ "tags": [],
67
+ "text": ""
68
+ },
69
+ "attribute": "document-errors",
70
+ "reflect": false,
71
+ "defaultValue": "{}"
60
72
  }
61
73
  };
62
74
  }
@@ -64,7 +76,7 @@ export class CustomerDetails {
64
76
  return {
65
77
  "form": {},
66
78
  "errors": {},
67
- "documentList": {}
79
+ "documents": {}
68
80
  };
69
81
  }
70
82
  static get methods() {
@@ -5,14 +5,14 @@ import { Button } from "../../../ui-components/button";
5
5
  export class DisputeResponseCore {
6
6
  constructor() {
7
7
  this.componentStepMapping = [
8
- () => h("justifi-product-or-service", { ref: (el) => this.currentStepComponentRef = el, disputeResponse: this.disputeResponse }),
9
- () => h("justifi-customer-details", { ref: (el) => this.currentStepComponentRef = el, disputeResponse: this.disputeResponse }),
10
- () => h("justifi-cancellation-policy", { ref: (el) => this.currentStepComponentRef = el, disputeResponse: this.disputeResponse }),
11
- () => h("justifi-refund-policy", { ref: (el) => this.currentStepComponentRef = el, disputeResponse: this.disputeResponse }),
12
- () => h("justifi-duplicate-charge", { ref: (el) => this.currentStepComponentRef = el, disputeResponse: this.disputeResponse }),
13
- () => h("justifi-electronic-evidence", { ref: (el) => this.currentStepComponentRef = el, disputeResponse: this.disputeResponse }),
14
- () => h("justifi-shipping-details", { ref: (el) => this.currentStepComponentRef = el, disputeResponse: this.disputeResponse }),
15
- () => h("justifi-additional-statement", { ref: (el) => this.currentStepComponentRef = el, disputeResponse: this.disputeResponse }),
8
+ () => h("justifi-product-or-service", { ref: (el) => this.currentStepComponentRef = el, disputeResponse: this.disputeResponse, documentErrors: this.documentErrors }),
9
+ () => h("justifi-customer-details", { ref: (el) => this.currentStepComponentRef = el, disputeResponse: this.disputeResponse, documentErrors: this.documentErrors }),
10
+ () => h("justifi-cancellation-policy", { ref: (el) => this.currentStepComponentRef = el, disputeResponse: this.disputeResponse, documentErrors: this.documentErrors }),
11
+ () => h("justifi-refund-policy", { ref: (el) => this.currentStepComponentRef = el, disputeResponse: this.disputeResponse, documentErrors: this.documentErrors }),
12
+ () => h("justifi-duplicate-charge", { ref: (el) => this.currentStepComponentRef = el, disputeResponse: this.disputeResponse, documentErrors: this.documentErrors }),
13
+ () => h("justifi-electronic-evidence", { ref: (el) => this.currentStepComponentRef = el, disputeResponse: this.disputeResponse, documentErrors: this.documentErrors }),
14
+ () => h("justifi-shipping-details", { ref: (el) => this.currentStepComponentRef = el, disputeResponse: this.disputeResponse, documentErrors: this.documentErrors }),
15
+ () => h("justifi-additional-statement", { ref: (el) => this.currentStepComponentRef = el, disputeResponse: this.disputeResponse, documentErrors: this.documentErrors }),
16
16
  ];
17
17
  this.saveData = async (formData, formStep) => {
18
18
  const hasFormData = Object.keys(formData).length;
@@ -74,15 +74,15 @@ export class DisputeResponseCore {
74
74
  },
75
75
  onSuccess: (response) => {
76
76
  document.presignedUrl = response.data.presigned_url;
77
- this.isLoading = false;
78
77
  },
79
78
  onError: ({ error, code, severity }) => {
79
+ const errors = { [document.dispute_evidence_type]: error };
80
+ this.documentErrors = Object.assign(Object.assign({}, this.documentErrors), errors);
80
81
  this.errorEvent.emit({
81
82
  errorCode: code,
82
83
  message: error,
83
84
  severity,
84
85
  });
85
- this.isLoading = false;
86
86
  },
87
87
  });
88
88
  };
@@ -97,20 +97,26 @@ export class DisputeResponseCore {
97
97
  });
98
98
  return response;
99
99
  };
100
- this.onCancel = () => {
101
- this.clickEvent.emit({ name: DisputeManagementClickActions.cancelDispute });
102
- };
103
100
  this.handleSubmit = async (formData, documentList, formStep) => {
104
101
  this.isLoading = true;
105
102
  if (documentList.length) {
103
+ this.documentErrors = {};
106
104
  this.documentList = documentList;
107
105
  await this.initializeMakePresignedURLs();
106
+ const hasPresigningErrors = Object.keys(this.documentErrors).length;
107
+ if (hasPresigningErrors) {
108
+ this.isLoading = false;
109
+ throw new Error('Could not presign all documents');
110
+ }
108
111
  await this.initializeFileUploads();
109
112
  }
110
113
  // this needs to happen last because it fires the 'submit-event' and 'complete-form-step-event' event
111
114
  await this.saveData(formData, formStep);
112
115
  this.isLoading = false;
113
116
  };
117
+ this.onCancel = () => {
118
+ this.clickEvent.emit({ name: DisputeManagementClickActions.cancelDispute });
119
+ };
114
120
  // after each of these steps where validateAndSubmit is called, reload the dispute
115
121
  // and set isLoading, and pass defaults into each step
116
122
  this.onBack = async () => {
@@ -140,6 +146,7 @@ export class DisputeResponseCore {
140
146
  this.disputeResponse = {};
141
147
  this.isLoading = false;
142
148
  this.documentList = [];
149
+ this.documentErrors = {};
143
150
  this.currentStep = 0;
144
151
  this.currentStepComponentRef = undefined;
145
152
  }
@@ -153,7 +160,7 @@ export class DisputeResponseCore {
153
160
  return this.currentStep === 0;
154
161
  }
155
162
  render() {
156
- return (h("div", { key: 'a031de7ea80f4f31c6e841be4b4640a8b7db7dcd', class: "row gy-3" }, h("div", { key: 'cd7ef54b4643e1a74022ed7c2e075e75076c4c44', class: "col-12" }, h("h1", { key: '705612783bc67e0d01f4d24e01c9c09d1b2a7362', class: "h4", part: heading4 }, "Counter dispute")), h("div", { key: '72c35e89dc87377fe4dbcbb9fe2e2c1b58767a21', class: "col-12" }, this.currentStepComponent), h("div", { key: '37d85a8980293390f15b45271f8b2a8fa4cadb29', class: "col-12" }, h("div", { key: 'c3b281e02b19598b11acdb09a34212edf1745173', class: "d-flex gap-2 mt-4 justify-content-end" }, this.isFirstStep ? (h(Button, { variant: "secondary", onClick: () => this.onCancel(), disabled: this.isLoading, isLoading: this.isLoading }, "Cancel")) : (h(Button, { variant: "secondary", onClick: () => this.onBack(), disabled: this.isLoading, isLoading: this.isLoading }, "Back")), this.isLastStep ? (h(Button, { variant: "primary", onClick: () => this.onSubmit(), disabled: this.isLoading, isLoading: this.isLoading }, "Submit Counter Dispute")) : (h(Button, { variant: "primary", onClick: () => this.onNext(), disabled: this.isLoading, isLoading: this.isLoading }, "Next"))))));
163
+ return (h("div", { key: '452cfcf106f40c27f34df05ae2923c0909de9245', class: "row gy-3" }, h("div", { key: 'd9b608a8d880310b96e98cd4a00cabfcca77dc79', class: "col-12" }, h("h1", { key: '050aef1fa636d09880edc7d738d56eab2cf62e52', class: "h4", part: heading4 }, "Counter dispute")), h("div", { key: '4e6094f9240d4db3d4bc03c59754ab3d04fed5bc', class: "col-12" }, this.currentStepComponent), h("div", { key: '9c1739bc4ed1a9104fd04531a11e02cbbb4f11cc', class: "col-12" }, h("div", { key: 'd37cda5a7689d8bf9263283eb24e1074ee3d97a0', class: "d-flex gap-2 mt-4 justify-content-end" }, this.isFirstStep ? (h(Button, { variant: "secondary", onClick: () => this.onCancel(), disabled: this.isLoading, isLoading: this.isLoading }, "Cancel")) : (h(Button, { variant: "secondary", onClick: () => this.onBack(), disabled: this.isLoading, isLoading: this.isLoading }, "Back")), this.isLastStep ? (h(Button, { variant: "primary", onClick: () => this.onSubmit(), disabled: this.isLoading, isLoading: this.isLoading }, "Submit Counter Dispute")) : (h(Button, { variant: "primary", onClick: () => this.onNext(), disabled: this.isLoading, isLoading: this.isLoading }, "Next"))))));
157
164
  }
158
165
  static get is() { return "justifi-dispute-response-core"; }
159
166
  static get properties() {
@@ -267,6 +274,7 @@ export class DisputeResponseCore {
267
274
  return {
268
275
  "isLoading": {},
269
276
  "documentList": {},
277
+ "documentErrors": {},
270
278
  "currentStep": {},
271
279
  "currentStepComponentRef": {}
272
280
  };