@justifi/webcomponents 4.8.3 → 4.9.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 (327) hide show
  1. package/dist/cjs/{Business-42d0c522.js → Business-64dffab7.js} +6 -7
  2. package/dist/cjs/{BusinessFormEventTypes-863f48e9.js → BusinessFormEventTypes-62990815.js} +1 -1
  3. package/dist/cjs/{Payout-44b49b2d.js → Payment-89a8bc21.js} +0 -43
  4. package/dist/cjs/Payout-a2dd7b01.js +45 -0
  5. package/dist/cjs/{SubAccount-2a803b22.js → SubAccount-f8144025.js} +1 -1
  6. package/dist/cjs/additional-questions-details_5.cjs.entry.js +24 -10
  7. package/dist/{webcomponents/p-4ee44c76.entry.js → cjs/business-details-core.cjs.entry.js} +55 -1
  8. package/dist/cjs/form-control-datepart_3.cjs.entry.js +1 -1
  9. package/dist/cjs/form-control-monetary.cjs.entry.js +1 -1
  10. package/dist/cjs/form-control-select_2.cjs.entry.js +1 -1
  11. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +11036 -0
  12. package/dist/cjs/{index-55950669.js → index-07ddbad2.js} +0 -3
  13. package/dist/cjs/justifi-additional-questions_5.cjs.entry.js +2 -2
  14. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +1 -1
  15. package/dist/cjs/{select-input_2.cjs.entry.js → justifi-billing-form_4.cjs.entry.js} +1811 -1
  16. package/dist/cjs/justifi-business-details.cjs.entry.js +43 -57
  17. package/dist/cjs/justifi-business-form-stepped.cjs.entry.js +5 -4
  18. package/dist/cjs/justifi-business-form.cjs.entry.js +5 -4
  19. package/dist/cjs/justifi-business-list.cjs.entry.js +5 -4
  20. package/dist/cjs/justifi-business-owners.cjs.entry.js +1 -1
  21. package/dist/cjs/justifi-card-form.cjs.entry.js +1 -1
  22. package/dist/cjs/justifi-checkout-core.cjs.entry.js +95 -0
  23. package/dist/cjs/justifi-checkout.cjs.entry.js +99 -0
  24. package/dist/cjs/justifi-details.cjs.entry.js +2 -2
  25. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +39 -11008
  26. package/dist/cjs/justifi-new-payment-method_3.cjs.entry.js +168 -0
  27. package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +5 -4
  28. package/dist/cjs/justifi-payment-details.cjs.entry.js +6 -5
  29. package/dist/cjs/justifi-payment-form.cjs.entry.js +5 -4
  30. package/dist/cjs/{justifi-billing-form_2.cjs.entry.js → justifi-payment-method-selector.cjs.entry.js} +4 -79
  31. package/dist/cjs/justifi-payments-list.cjs.entry.js +6 -5
  32. package/dist/cjs/justifi-payout-details.cjs.entry.js +5 -4
  33. package/dist/cjs/justifi-payouts-list.cjs.entry.js +5 -4
  34. package/dist/cjs/justifi-proceeds-list.cjs.entry.js +4 -3
  35. package/dist/cjs/justifi-refund-form.cjs.entry.js +3 -2
  36. package/dist/cjs/justifi-subaccount-details.cjs.entry.js +6 -5
  37. package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +5 -4
  38. package/dist/cjs/justifi-table_2.cjs.entry.js +1 -1
  39. package/dist/cjs/loader.cjs.js +2 -2
  40. package/dist/cjs/payment-details-core.cjs.entry.js +10 -4
  41. package/dist/cjs/{payment.service-605896dc.js → payment.service-0b0086dc.js} +2 -1
  42. package/dist/cjs/payments-list-core.cjs.entry.js +4 -3
  43. package/dist/cjs/payout-details-core.cjs.entry.js +4 -4
  44. package/dist/cjs/{payout.service-b39f2739.js → payout.service-5cc3b4e9.js} +2 -1
  45. package/dist/cjs/payouts-list-core.cjs.entry.js +4 -3
  46. package/dist/cjs/subaccount-account-details_4.cjs.entry.js +7 -7
  47. package/dist/cjs/subaccount-bank-details.cjs.entry.js +3 -3
  48. package/dist/cjs/subaccount-terms-details.cjs.entry.js +3 -3
  49. package/dist/cjs/{utils-d126d17c.js → utils-5c3e442d.js} +5 -5
  50. package/dist/cjs/{utils-29a8a91d.js → utils-84208d99.js} +11 -2
  51. package/dist/cjs/webcomponents.cjs.js +2 -2
  52. package/dist/collection/api/Business.js +6 -7
  53. package/dist/collection/api/Checkout.js +1 -0
  54. package/dist/collection/api/index.js +1 -0
  55. package/dist/collection/api/services/business.service.js +8 -0
  56. package/dist/collection/api/services/checkout.service.js +12 -0
  57. package/dist/collection/api/services/reports.service.js +9 -0
  58. package/dist/collection/collection-manifest.json +7 -0
  59. package/dist/collection/components/billing-form/billing-form.js +1 -2
  60. package/dist/collection/components/business-details/additional-questions-details/additional-questions-details.js +5 -2
  61. package/dist/collection/components/business-details/additional-questions-details/test/additional-questions.spec.js +16 -0
  62. package/dist/collection/components/business-details/business-details-core.js +86 -0
  63. package/dist/collection/components/business-details/business-details.js +20 -65
  64. package/dist/collection/components/business-details/generic-info-details/generic-info-details.js +4 -2
  65. package/dist/collection/components/business-details/generic-info-details/test/generic-info-details.spec.js +16 -0
  66. package/dist/collection/components/business-details/get-business.js +17 -0
  67. package/dist/collection/components/business-details/legal-address-details/legal-address-details.js +5 -2
  68. package/dist/collection/components/business-details/legal-address-details/test/legal-address-details.spec.js +16 -0
  69. package/dist/collection/components/business-details/owner-details/owner-details.js +10 -12
  70. package/dist/collection/components/business-details/owner-details/test/owner-details.spec.js +16 -0
  71. package/dist/collection/components/business-details/representative-details/representative-details.js +5 -3
  72. package/dist/collection/components/business-details/representative-details/test/representative-details.spec.js +16 -0
  73. package/dist/collection/components/business-details/test/busines-details-core.spec.js +53 -0
  74. package/dist/collection/components/business-details/test/business-details.spec.js +40 -0
  75. package/dist/collection/components/business-details/test/get-business.spec.js +60 -0
  76. package/dist/collection/components/checkout/checkout-actions.js +33 -0
  77. package/dist/collection/components/checkout/checkout-core.css +2604 -0
  78. package/dist/collection/components/checkout/checkout-core.js +248 -0
  79. package/dist/collection/components/checkout/checkout.js +112 -0
  80. package/dist/collection/components/checkout/new-payment-method.js +188 -0
  81. package/dist/collection/components/checkout/payment-method-option-utils.js +19 -0
  82. package/dist/collection/components/checkout/payment-method-options.css +7073 -0
  83. package/dist/collection/components/checkout/payment-method-options.js +248 -0
  84. package/dist/collection/components/checkout/saved-payment-method.js +123 -0
  85. package/dist/collection/components/checkout/test/checkout.js +22 -0
  86. package/dist/collection/components/checkout/test/checkout.spec.js +166 -0
  87. package/dist/collection/components/checkout/test/mockCheckout.js +19 -0
  88. package/dist/collection/components/details/utils.js +4 -1
  89. package/dist/collection/components/gross-payment-chart/get-gross-payment-chart-data.js +14 -0
  90. package/dist/collection/components/gross-payment-chart/gross-payment-chart-core.js +119 -0
  91. package/dist/collection/components/gross-payment-chart/gross-payment-chart.js +25 -73
  92. package/dist/collection/components/gross-payment-chart/test/get-gross-payment-chart-data.spec.js +69 -0
  93. package/dist/collection/components/gross-payment-chart/test/gross-payment-chart-core.spec.js +64 -0
  94. package/dist/collection/components/gross-payment-chart/test/gross-payment-chart.spec.js +23 -8
  95. package/dist/collection/components/payment-details/payment-details-core.js +8 -2
  96. package/dist/collection/components/payment-details/payment-details.js +0 -1
  97. package/dist/collection/components/payment-form/payment-form.js +1 -1
  98. package/dist/collection/components/payment-method-form/payment-method-form.js +1 -1
  99. package/dist/collection/components/payout-details/payout-details-core.js +2 -2
  100. package/dist/collection/components/subaccount-details/subaccount-account-details/subaccount-account-details.js +2 -2
  101. package/dist/collection/components/subaccount-details/subaccount-bank-details/subaccount-bank-details.js +2 -2
  102. package/dist/collection/components/subaccount-details/subaccount-merchant-details/subaccount-merchant-details.js +2 -2
  103. package/dist/collection/components/subaccount-details/subaccount-owners-details/subaccount-owners-details.js +2 -2
  104. package/dist/collection/components/subaccount-details/subaccount-representative-details/subaccount-representative-details.js +2 -2
  105. package/dist/collection/components/subaccount-details/subaccount-terms-details/subaccount-terms-details.js +2 -2
  106. package/dist/collection/utils/utils.js +9 -3
  107. package/dist/docs.json +1152 -187
  108. package/dist/esm/{Business-e9340f6b.js → Business-9921d35f.js} +6 -7
  109. package/dist/esm/{BusinessFormEventTypes-989960ba.js → BusinessFormEventTypes-182e20be.js} +1 -1
  110. package/dist/esm/{Payout-dc5f009c.js → Payment-55886c86.js} +1 -43
  111. package/dist/esm/Payout-dfe15b00.js +43 -0
  112. package/dist/esm/{SubAccount-46b4c2b1.js → SubAccount-76f6d565.js} +1 -1
  113. package/dist/esm/additional-questions-details_5.entry.js +24 -10
  114. package/dist/esm/business-details-core.entry.js +51 -0
  115. package/dist/esm/form-control-datepart_3.entry.js +1 -1
  116. package/dist/esm/form-control-monetary.entry.js +1 -1
  117. package/dist/esm/form-control-select_2.entry.js +1 -1
  118. package/dist/esm/gross-payment-chart-core.entry.js +11032 -0
  119. package/dist/esm/{index-62b8aa8a.js → index-fb5ca346.js} +0 -3
  120. package/dist/esm/justifi-additional-questions_5.entry.js +2 -2
  121. package/dist/esm/justifi-bank-account-form.entry.js +1 -1
  122. package/dist/esm/{select-input_2.entry.js → justifi-billing-form_4.entry.js} +1810 -2
  123. package/dist/esm/justifi-business-details.entry.js +42 -56
  124. package/dist/esm/justifi-business-form-stepped.entry.js +5 -4
  125. package/dist/esm/justifi-business-form.entry.js +5 -4
  126. package/dist/esm/justifi-business-list.entry.js +5 -4
  127. package/dist/esm/justifi-business-owners.entry.js +1 -1
  128. package/dist/esm/justifi-card-form.entry.js +1 -1
  129. package/dist/esm/justifi-checkout-core.entry.js +91 -0
  130. package/dist/esm/justifi-checkout.entry.js +95 -0
  131. package/dist/esm/justifi-details.entry.js +2 -2
  132. package/dist/esm/justifi-gross-payment-chart.entry.js +39 -11008
  133. package/dist/esm/justifi-new-payment-method_3.entry.js +162 -0
  134. package/dist/esm/justifi-payment-balance-transactions.entry.js +4 -3
  135. package/dist/esm/justifi-payment-details.entry.js +5 -4
  136. package/dist/esm/justifi-payment-form.entry.js +4 -3
  137. package/dist/esm/{justifi-billing-form_2.entry.js → justifi-payment-method-selector.entry.js} +4 -78
  138. package/dist/esm/justifi-payments-list.entry.js +5 -4
  139. package/dist/esm/justifi-payout-details.entry.js +5 -4
  140. package/dist/esm/justifi-payouts-list.entry.js +5 -4
  141. package/dist/esm/justifi-proceeds-list.entry.js +4 -3
  142. package/dist/esm/justifi-refund-form.entry.js +3 -2
  143. package/dist/esm/justifi-subaccount-details.entry.js +6 -5
  144. package/dist/esm/justifi-subaccounts-list.entry.js +5 -4
  145. package/dist/esm/justifi-table_2.entry.js +1 -1
  146. package/dist/esm/loader.js +3 -3
  147. package/dist/esm/payment-details-core.entry.js +10 -4
  148. package/dist/esm/{payment.service-bea02ccf.js → payment.service-f274ef98.js} +2 -1
  149. package/dist/esm/payments-list-core.entry.js +4 -3
  150. package/dist/esm/payout-details-core.entry.js +4 -4
  151. package/dist/esm/{payout.service-92e56814.js → payout.service-af293f61.js} +2 -1
  152. package/dist/esm/payouts-list-core.entry.js +4 -3
  153. package/dist/esm/subaccount-account-details_4.entry.js +7 -7
  154. package/dist/esm/subaccount-bank-details.entry.js +3 -3
  155. package/dist/esm/subaccount-terms-details.entry.js +3 -3
  156. package/dist/esm/{utils-76a93600.js → utils-5193fcd7.js} +10 -3
  157. package/dist/esm/{utils-576874df.js → utils-a3e96d9f.js} +5 -5
  158. package/dist/esm/webcomponents.js +3 -3
  159. package/dist/module/Business.js +6 -7
  160. package/dist/module/Payment.js +138 -0
  161. package/dist/module/Payout.js +1 -138
  162. package/dist/module/SubAccount.js +1 -1
  163. package/dist/module/additional-questions-details2.js +5 -2
  164. package/dist/module/billing-form.js +1 -2
  165. package/dist/module/business-details-core.d.ts +11 -0
  166. package/dist/module/business-details-core.js +6 -0
  167. package/dist/module/business-details-core2.js +101 -0
  168. package/dist/module/checkout-core.js +163 -0
  169. package/dist/module/generic-info-details2.js +4 -2
  170. package/dist/module/gross-payment-chart-core.d.ts +11 -0
  171. package/dist/module/gross-payment-chart-core.js +6 -0
  172. package/dist/module/gross-payment-chart-core2.js +11055 -0
  173. package/dist/module/justifi-business-details.js +51 -60
  174. package/dist/module/justifi-business-form-stepped.js +1 -0
  175. package/dist/module/justifi-business-form.js +1 -0
  176. package/dist/module/justifi-business-list.js +2 -1
  177. package/dist/module/justifi-checkout-core.d.ts +11 -0
  178. package/dist/module/justifi-checkout-core.js +6 -0
  179. package/dist/module/justifi-checkout.d.ts +11 -0
  180. package/dist/module/justifi-checkout.js +172 -0
  181. package/dist/module/justifi-gross-payment-chart.js +49 -11016
  182. package/dist/module/justifi-new-payment-method.d.ts +11 -0
  183. package/dist/module/justifi-new-payment-method.js +6 -0
  184. package/dist/module/justifi-payment-balance-transactions.js +3 -2
  185. package/dist/module/justifi-payment-details.js +2 -1
  186. package/dist/module/justifi-payment-form.js +2 -1
  187. package/dist/module/justifi-payment-method-options.d.ts +11 -0
  188. package/dist/module/justifi-payment-method-options.js +6 -0
  189. package/dist/module/justifi-payments-list.js +2 -1
  190. package/dist/module/justifi-payout-details.js +2 -1
  191. package/dist/module/justifi-payouts-list.js +2 -1
  192. package/dist/module/justifi-proceeds-list.js +2 -1
  193. package/dist/module/justifi-refund-form.js +1 -0
  194. package/dist/module/justifi-saved-payment-method.d.ts +11 -0
  195. package/dist/module/justifi-saved-payment-method.js +6 -0
  196. package/dist/module/justifi-subaccount-details.js +2 -1
  197. package/dist/module/justifi-subaccounts-list.js +2 -1
  198. package/dist/module/legal-address-details2.js +5 -2
  199. package/dist/module/new-payment-method.js +105 -0
  200. package/dist/module/owner-details2.js +10 -4
  201. package/dist/module/payment-details-core2.js +9 -3
  202. package/dist/module/payment-method-form.js +4 -10
  203. package/dist/module/payment-method-options.js +128 -0
  204. package/dist/module/payment-method-selector.js +2 -1
  205. package/dist/module/payment.service.js +1 -0
  206. package/dist/module/payments-list-core2.js +2 -1
  207. package/dist/module/payout-details-core2.js +3 -3
  208. package/dist/module/payout.service.js +1 -0
  209. package/dist/module/payouts-list-core2.js +3 -2
  210. package/dist/module/representative-details2.js +5 -3
  211. package/dist/module/saved-payment-method.js +66 -0
  212. package/dist/module/subaccount-account-details2.js +2 -2
  213. package/dist/module/subaccount-bank-details.js +2 -2
  214. package/dist/module/subaccount-merchant-details2.js +3 -3
  215. package/dist/module/subaccount-owners-details2.js +2 -2
  216. package/dist/module/subaccount-representative-details2.js +2 -2
  217. package/dist/module/subaccount-terms-details.js +2 -2
  218. package/dist/module/utils.js +4 -4
  219. package/dist/module/utils2.js +10 -3
  220. package/dist/types/api/Api.d.ts +1 -1
  221. package/dist/types/api/Checkout.d.ts +14 -0
  222. package/dist/types/api/index.d.ts +1 -0
  223. package/dist/types/api/services/business.service.d.ts +8 -0
  224. package/dist/types/api/services/checkout.service.d.ts +9 -0
  225. package/dist/types/api/services/reports.service.d.ts +5 -0
  226. package/dist/types/components/billing-form/billing-form.d.ts +0 -1
  227. package/dist/types/components/business-details/business-details-core.d.ts +16 -0
  228. package/dist/types/components/business-details/business-details.d.ts +3 -13
  229. package/dist/types/components/business-details/get-business.d.ts +8 -0
  230. package/dist/types/components/business-details/owner-details/owner-details.d.ts +0 -8
  231. package/dist/types/components/checkout/checkout-actions.d.ts +17 -0
  232. package/dist/types/components/checkout/checkout-core.d.ts +28 -0
  233. package/dist/types/components/checkout/checkout.d.ts +12 -0
  234. package/dist/types/components/checkout/new-payment-method.d.ts +17 -0
  235. package/dist/types/components/checkout/payment-method-option-utils.d.ts +16 -0
  236. package/dist/types/components/checkout/payment-method-options.d.ts +18 -0
  237. package/dist/types/components/checkout/saved-payment-method.d.ts +11 -0
  238. package/dist/types/components/checkout/test/checkout.d.ts +1 -0
  239. package/dist/types/components/checkout/test/mockCheckout.d.ts +19 -0
  240. package/dist/types/components/details/utils.d.ts +1 -1
  241. package/dist/types/components/gross-payment-chart/get-gross-payment-chart-data.d.ts +11 -0
  242. package/dist/types/components/gross-payment-chart/gross-payment-chart-core.d.ts +18 -0
  243. package/dist/types/components/gross-payment-chart/gross-payment-chart.d.ts +4 -14
  244. package/dist/types/components/payment-details/payment-details.d.ts +0 -1
  245. package/dist/types/components/payment-method-form/payment-method-responses.d.ts +3 -9
  246. package/dist/types/components.d.ts +217 -32
  247. package/dist/types/utils/utils.d.ts +1 -0
  248. package/dist/webcomponents/p-018b71f5.entry.js +1 -0
  249. package/dist/webcomponents/p-0923e39c.js +1 -0
  250. package/dist/webcomponents/{p-7a1a06c0.entry.js → p-09b94d22.entry.js} +1 -1
  251. package/dist/webcomponents/p-1b04d091.entry.js +1 -0
  252. package/dist/webcomponents/{p-0a0cf2e6.entry.js → p-1bac1674.entry.js} +1 -1
  253. package/dist/webcomponents/p-1cbdca15.entry.js +1 -0
  254. package/dist/webcomponents/p-2f0653f4.entry.js +1 -0
  255. package/dist/webcomponents/p-3134ab82.entry.js +1 -0
  256. package/dist/webcomponents/{p-22c1acd6.js → p-34f9fe6b.js} +1 -1
  257. package/dist/webcomponents/p-3bae0ed3.entry.js +1 -0
  258. package/dist/webcomponents/p-41031759.entry.js +1 -0
  259. package/dist/webcomponents/p-41490d96.entry.js +1 -0
  260. package/dist/webcomponents/{p-081cf5f6.entry.js → p-4ed3a9f5.entry.js} +1 -1
  261. package/dist/webcomponents/{p-6478f3ca.js → p-4edd9721.js} +1 -1
  262. package/dist/webcomponents/p-51b0bf2a.entry.js +1 -0
  263. package/dist/webcomponents/p-531844f6.entry.js +1 -0
  264. package/dist/webcomponents/{p-4fa27a28.entry.js → p-591e29bf.entry.js} +1 -1
  265. package/dist/webcomponents/p-5d5d7550.entry.js +1 -0
  266. package/dist/webcomponents/{p-810b72b5.js → p-5ea274b8.js} +1 -1
  267. package/dist/webcomponents/{p-4ba2c711.entry.js → p-5f785ede.entry.js} +1 -1
  268. package/dist/webcomponents/p-63296409.js +1 -0
  269. package/dist/webcomponents/{p-4f14df36.js → p-6d05174c.js} +1 -1
  270. package/dist/webcomponents/p-72d1ad98.entry.js +1 -0
  271. package/dist/webcomponents/{p-40349ffc.entry.js → p-796cf44f.entry.js} +1 -1
  272. package/dist/webcomponents/p-7b2cddc7.js +1 -0
  273. package/dist/webcomponents/{p-7c0f91fa.entry.js → p-7cd06ada.entry.js} +1 -1
  274. package/dist/webcomponents/p-8f895ec3.entry.js +1 -0
  275. package/dist/webcomponents/p-92a55427.entry.js +1 -0
  276. package/dist/webcomponents/p-97c42345.entry.js +1 -0
  277. package/dist/webcomponents/p-99a8b7d0.entry.js +1 -0
  278. package/dist/webcomponents/p-9a63eec9.entry.js +1 -0
  279. package/dist/webcomponents/p-9c310f5c.entry.js +1 -0
  280. package/dist/webcomponents/p-9e3771b7.entry.js +19 -0
  281. package/dist/webcomponents/{p-6d0725ef.entry.js → p-a81229a5.entry.js} +1 -1
  282. package/dist/webcomponents/{p-234bc840.entry.js → p-adc96df1.entry.js} +1 -1
  283. package/dist/webcomponents/p-baafa7f5.js +1 -0
  284. package/dist/webcomponents/p-babd292f.entry.js +1 -0
  285. package/dist/webcomponents/{p-5c0310ee.js → p-bb037696.js} +1 -1
  286. package/dist/webcomponents/p-bb7f6095.entry.js +1 -0
  287. package/dist/webcomponents/p-c032b216.entry.js +1 -0
  288. package/dist/webcomponents/{p-08833966.entry.js → p-c2c3d5d1.entry.js} +1 -1
  289. package/dist/webcomponents/p-c8d51336.entry.js +1 -0
  290. package/dist/webcomponents/{p-4c01df65.entry.js → p-dc05b5c5.entry.js} +1 -1
  291. package/dist/webcomponents/p-e3fab0e2.js +1 -0
  292. package/dist/webcomponents/p-e536a4c1.entry.js +1 -0
  293. package/dist/webcomponents/p-e6939585.entry.js +1 -0
  294. package/dist/webcomponents/p-ec358d69.entry.js +1 -0
  295. package/dist/webcomponents/p-f55ac955.entry.js +1 -0
  296. package/dist/webcomponents/p-f64a85cf.entry.js +1 -0
  297. package/dist/webcomponents/webcomponents.esm.js +1 -1
  298. package/package.json +3 -2
  299. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +0 -1747
  300. package/dist/esm/justifi-payment-method-form.entry.js +0 -1743
  301. package/dist/webcomponents/p-0bc8b02e.entry.js +0 -1
  302. package/dist/webcomponents/p-112acd3c.entry.js +0 -1
  303. package/dist/webcomponents/p-1555e6b1.js +0 -1
  304. package/dist/webcomponents/p-16f41fd0.entry.js +0 -1
  305. package/dist/webcomponents/p-17715325.js +0 -1
  306. package/dist/webcomponents/p-3a4d4869.entry.js +0 -1
  307. package/dist/webcomponents/p-3cb0b96d.js +0 -1
  308. package/dist/webcomponents/p-5422a24b.entry.js +0 -1
  309. package/dist/webcomponents/p-578e0a05.entry.js +0 -1
  310. package/dist/webcomponents/p-640d90dc.entry.js +0 -1
  311. package/dist/webcomponents/p-663bfe87.js +0 -1
  312. package/dist/webcomponents/p-696396c7.entry.js +0 -1
  313. package/dist/webcomponents/p-6ab67031.entry.js +0 -1
  314. package/dist/webcomponents/p-8516d602.entry.js +0 -1
  315. package/dist/webcomponents/p-894a7475.entry.js +0 -19
  316. package/dist/webcomponents/p-94ebfafb.entry.js +0 -1
  317. package/dist/webcomponents/p-9cb3ff78.entry.js +0 -1
  318. package/dist/webcomponents/p-9e81808f.entry.js +0 -1
  319. package/dist/webcomponents/p-a432110c.entry.js +0 -1
  320. package/dist/webcomponents/p-b1881723.entry.js +0 -1
  321. package/dist/webcomponents/p-b5aba473.entry.js +0 -1
  322. package/dist/webcomponents/p-bd099662.entry.js +0 -1
  323. package/dist/webcomponents/p-bfd917b8.entry.js +0 -1
  324. package/dist/webcomponents/p-c90fa055.entry.js +0 -1
  325. package/dist/webcomponents/p-ebb91944.entry.js +0 -1
  326. package/dist/webcomponents/p-ec4f27e7.entry.js +0 -1
  327. package/dist/webcomponents/p-fa495a43.entry.js +0 -1
@@ -3889,7 +3889,9 @@ function formatMediumDate(input) {
3889
3889
  }
3890
3890
  function formatDisplayDate(value, endDate) {
3891
3891
  const isEndingDate = value === endDate;
3892
- return (isEndingDate) ? 'Today' : format(new Date(value.replace(/-/g, '/')), 'MMM d');
3892
+ return isEndingDate
3893
+ ? 'Today'
3894
+ : format(new Date(value.replace(/-/g, '/')), 'MMM d');
3893
3895
  }
3894
3896
  function formatTime(dateString) {
3895
3897
  if (!dateString)
@@ -3974,9 +3976,11 @@ const MapSubAccountStatusToBadge = (status) => {
3974
3976
  * console.log(readable); // Outputs: "Sole Proprietorship"
3975
3977
  */
3976
3978
  function snakeCaseToHumanReadable(snakeCaseStr) {
3979
+ if (!snakeCaseStr)
3980
+ return '';
3977
3981
  return snakeCaseStr
3978
3982
  .split('_')
3979
- .map(word => word.charAt(0).toUpperCase() + word.slice(1))
3983
+ .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
3980
3984
  .join(' ');
3981
3985
  }
3982
3986
  function composeQueryParams(values) {
@@ -4010,11 +4014,15 @@ async function loadFontsOnParent() {
4010
4014
  fonts.href = fontHref;
4011
4015
  parent.append(fonts);
4012
4016
  }
4017
+ function isEmptyObject(obj) {
4018
+ return Object.keys(obj).length === 0 && obj.constructor === Object;
4019
+ }
4013
4020
 
4014
4021
  exports.MapPaymentStatusToBadge = MapPaymentStatusToBadge;
4015
4022
  exports.MapPayoutStatusToBadge = MapPayoutStatusToBadge;
4016
4023
  exports.MapSubAccountStatusToBadge = MapSubAccountStatusToBadge;
4017
4024
  exports.composeQueryParams = composeQueryParams;
4025
+ exports.extractComputedFontsToLoad = extractComputedFontsToLoad;
4018
4026
  exports.formatCurrency = formatCurrency;
4019
4027
  exports.formatDate = formatDate;
4020
4028
  exports.formatDisplayDate = formatDisplayDate;
@@ -4022,5 +4030,6 @@ exports.formatLegalAddress = formatLegalAddress;
4022
4030
  exports.formatMediumDate = formatMediumDate;
4023
4031
  exports.formatPercentage = formatPercentage;
4024
4032
  exports.formatTime = formatTime;
4033
+ exports.isEmptyObject = isEmptyObject;
4025
4034
  exports.loadFontsOnParent = loadFontsOnParent;
4026
4035
  exports.snakeCaseToHumanReadable = snakeCaseToHumanReadable;
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const index = require('./index-55950669.js');
5
+ const index = require('./index-07ddbad2.js');
6
6
 
7
7
  /*
8
8
  Stencil Client Patch Browser v4.10.0 | MIT Licensed | https://stenciljs.com
@@ -17,7 +17,7 @@ const patchBrowser = () => {
17
17
  };
18
18
 
19
19
  patchBrowser().then(options => {
20
- return index.bootstrapLazy([["justifi-business-form.cjs",[[0,"justifi-business-form",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"hideErrors":[4,"hide-errors"],"isLoading":[32],"serverError":[32],"errorMessage":[32]}]]],["justifi-business-form-stepped.cjs",[[0,"justifi-business-form-stepped",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"testMode":[4,"test-mode"],"hideErrors":[4,"hide-errors"],"isLoading":[32],"currentStep":[32],"totalSteps":[32],"serverError":[32],"errorMessage":[32]}]]],["justifi-business-details.cjs",[[1,"justifi-business-details",{"businessId":[1,"business-id"],"authToken":[1,"auth-token"],"business":[32],"renderState":[32],"errorMessage":[32]}]]],["justifi-payment-form.cjs",[[1,"justifi-payment-form",{"bankAccount":[4,"bank-account"],"card":[4],"email":[1],"clientId":[1,"client-id"],"accountId":[1,"account-id"],"submitButtonText":[1,"submit-button-text"],"submitButtonEnabled":[32],"isLoading":[32],"selectedPaymentMethodType":[32],"fillBillingForm":[64],"enableSubmitButton":[64]}]]],["justifi-subaccount-details.cjs",[[1,"justifi-subaccount-details",{"accountId":[1,"account-id"],"subaccountId":[1,"subaccount-id"],"authToken":[1,"auth-token"],"onboardingData":[32],"subaccount":[32],"loading":[32],"errorMessage":[32]},null,{"subaccountId":["updateOnPropChange"],"authToken":["updateOnPropChange"]}]]],["justifi-business-owners.cjs",[[0,"justifi-business-owners",{"formController":[16],"errors":[32],"owners":[32]}]]],["justifi-payments-list.cjs",[[1,"justifi-payments-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"getPayments":[32],"errorMessage":[32]},null,{"accountId":["propChanged"],"authToken":["propChanged"]}]]],["justifi-payouts-list.cjs",[[1,"justifi-payouts-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"getPayouts":[32],"errorMessage":[32]},null,{"accountId":["propChanged"],"authToken":["propChanged"]}]]],["justifi-business-list.cjs",[[1,"justifi-business-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"businesses":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]},null,{"accountId":["updateOnPropChange"],"authToken":["updateOnPropChange"],"params":["updateOnPropChange"]}]]],["justifi-payment-balance-transactions.cjs",[[1,"justifi-payment-balance-transactions",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"paymentId":[1,"payment-id"],"balanceTransactions":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]},null,{"params":["updateOnPropChange"]}]]],["justifi-payment-details.cjs",[[1,"justifi-payment-details",{"paymentId":[1,"payment-id"],"authToken":[1,"auth-token"],"getPaymentDetails":[32],"errorMessage":[32]},null,{"paymentId":["propChanged"],"authToken":["propChanged"]}]]],["justifi-payout-details.cjs",[[1,"justifi-payout-details",{"payoutId":[1,"payout-id"],"authToken":[1,"auth-token"],"getPayout":[32],"errorMessage":[32]},null,{"payoutId":["propChanged"],"authToken":["propChanged"]}]]],["justifi-proceeds-list.cjs",[[1,"justifi-proceeds-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"proceeds":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]},null,{"accountId":["updateOnPropChange"],"authToken":["updateOnPropChange"],"params":["updateOnPropChange"]}]]],["justifi-refund-form.cjs",[[1,"justifi-refund-form",{"authToken":[1,"auth-token"],"paymentId":[1,"payment-id"],"amount":[2],"submitButtonText":[1,"submit-button-text"],"withButton":[4,"with-button"],"refundInfoText":[1,"refund-info-text"],"errors":[32],"isSubmitting":[32]}]]],["justifi-subaccounts-list.cjs",[[1,"justifi-subaccounts-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"subaccounts":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]},null,{"accountId":["updateOnPropChange"],"authToken":["updateOnPropChange"],"params":["updateOnPropChange"]}]]],["justifi-bank-account-form.cjs",[[0,"justifi-bank-account-form",{"validationMode":[1025,"validation-mode"],"iframeOrigin":[1025,"iframe-origin"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64],"resize":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenized","tokenizeHandler"],[0,"paymentMethodFormValidated","validateHandler"]]]]],["justifi-card-form.cjs",[[0,"justifi-card-form",{"validationMode":[1025,"validation-mode"],"iframeOrigin":[1025,"iframe-origin"],"singleLine":[4,"single-line"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64],"resize":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenized","tokenizeHandler"],[0,"paymentMethodFormValidated","validateHandler"]]]]],["justifi-gross-payment-chart.cjs",[[1,"justifi-gross-payment-chart",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"data":[32],"total":[32],"dates":[32],"endDate":[32],"loading":[32],"errorMessage":[32]},null,{"accountId":["updateOnPropChange"],"authToken":["updateOnPropChange"]}]]],["subaccount-bank-details.cjs",[[1,"subaccount-bank-details",{"data":[16]}]]],["subaccount-terms-details.cjs",[[1,"subaccount-terms-details",{"data":[16]}]]],["payments-list-core.cjs",[[0,"payments-list-core",{"getPayments":[16],"payments":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]},null,{"params":["updateOnPropChange"],"getPayments":["updateOnPropChange"]}]]],["payouts-list-core.cjs",[[0,"payouts-list-core",{"getPayouts":[16],"payouts":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]},null,{"params":["updateOnPropChange"],"getPayouts":["updateOnPropChange"]}]]],["payment-details-core.cjs",[[0,"payment-details-core",{"getPaymentDetails":[16],"payment":[32],"loading":[32],"errorMessage":[32]},null,{"getPaymentDetails":["updateOnPropChange"]}]]],["payout-details-core.cjs",[[0,"payout-details-core",{"getPayout":[16],"payout":[32],"loading":[32],"errorMessage":[32]},null,{"getPayout":["getPayoutWatcher"]}]]],["justifi-billing-form_2.cjs",[[1,"justifi-billing-form",{"legend":[1025],"billingFields":[32],"billingFieldsErrors":[32],"fill":[64],"validate":[64],"getValues":[64]},[[0,"fieldReceivedInput","setFormValue"]]],[1,"justifi-payment-method-selector",{"selectedPaymentMethodType":[1,"selected-payment-method-type"]}]]],["justifi-payment-method-form.cjs",[[0,"justifi-payment-method-form",{"paymentMethodFormType":[1,"payment-method-form-type"],"paymentMethodFormValidationMode":[1025,"payment-method-form-validation-mode"],"iframeOrigin":[1,"iframe-origin"],"singleLine":[4,"single-line"],"resize":[64],"tokenize":[64],"validate":[64]}]]],["subaccount-account-details_4.cjs",[[1,"subaccount-account-details",{"subaccount":[16],"onboardingData":[16]}],[1,"subaccount-merchant-details",{"onboardingData":[16]}],[1,"subaccount-owners-details",{"data":[16]}],[1,"subaccount-representative-details",{"data":[16]}]]],["select-input_2.cjs",[[1,"select-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"options":[16],"internalValue":[32]}],[1,"text-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"internalValue":[32]}]]],["form-control-monetary.cjs",[[1,"form-control-monetary",{"label":[1],"name":[8],"error":[1],"defaultValue":[1,"default-value"],"inputHandler":[16]},null,{"defaultValue":["handleDefaultValueChange"]}]]],["additional-questions-details_5.cjs",[[1,"additional-questions-details",{"additionalQuestions":[16]}],[1,"generic-info-details",{"business":[16]}],[1,"legal-address-details",{"legalAddress":[16]}],[1,"owner-details",{"owners":[16]}],[1,"representative-details",{"representative":[16]}]]],["justifi-details.cjs",[[1,"justifi-details",{"errorMessage":[1,"error-message"]}]]],["form-control-select_2.cjs",[[1,"form-control-select",{"label":[1],"name":[8],"error":[1],"defaultValue":[1,"default-value"],"inputHandler":[16],"options":[16],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}],[1,"form-control-text",{"label":[1],"name":[8],"error":[1],"defaultValue":[1,"default-value"],"disabled":[4],"inputHandler":[16],"input":[32]},null,{"defaultValue":["handleDefaultValueChange"]}]]],["form-control-datepart_3.cjs",[[1,"form-control-datepart",{"label":[1],"name":[1],"error":[1],"defaultValue":[1,"default-value"],"type":[1],"inputHandler":[16],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}],[1,"form-control-number-masked",{"label":[1],"name":[8],"error":[1],"defaultValue":[1,"default-value"],"inputHandler":[16],"mask":[1],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}],[1,"form-control-number",{"label":[1],"name":[8],"error":[1],"defaultValue":[1,"default-value"],"inputHandler":[16],"disabled":[4],"input":[32]},null,{"defaultValue":["handleDefaultValueChange"]}]]],["justifi-additional-questions_5.cjs",[[0,"justifi-business-representative",{"formController":[16],"errors":[32],"representative":[32]}],[0,"justifi-business-generic-info",{"formController":[16],"errors":[32],"genericInfo":[32]}],[0,"justifi-legal-address-form",{"formController":[16],"errors":[32],"legal_address":[32]}],[0,"justifi-additional-questions",{"formController":[16],"errors":[32],"additional_questions":[32]}],[1,"justifi-business-address-form",{"onFormUpdate":[16],"errors":[8],"defaultValues":[8,"default-values"],"address":[32]},null,{"address":["handleAddressChange"]}]]],["justifi-table_2.cjs",[[1,"justifi-table",{"loading":[4],"errorMessage":[1,"error-message"],"rowData":[16],"columnData":[16],"paging":[16],"params":[8],"entityId":[16],"rowClickHandler":[16]}],[1,"pagination-menu",{"paging":[16],"params":[16]}]]]], options);
20
+ return index.bootstrapLazy(JSON.parse("[[\"justifi-business-form.cjs\",[[0,\"justifi-business-form\",{\"authToken\":[1,\"auth-token\"],\"businessId\":[1,\"business-id\"],\"hideErrors\":[4,\"hide-errors\"],\"isLoading\":[32],\"serverError\":[32],\"errorMessage\":[32]}]]],[\"justifi-business-form-stepped.cjs\",[[0,\"justifi-business-form-stepped\",{\"authToken\":[1,\"auth-token\"],\"businessId\":[1,\"business-id\"],\"testMode\":[4,\"test-mode\"],\"hideErrors\":[4,\"hide-errors\"],\"isLoading\":[32],\"currentStep\":[32],\"totalSteps\":[32],\"serverError\":[32],\"errorMessage\":[32]}]]],[\"justifi-checkout.cjs\",[[1,\"justifi-checkout\",{\"iframeOrigin\":[1,\"iframe-origin\"],\"authToken\":[1,\"auth-token\"],\"checkoutId\":[1,\"checkout-id\"],\"getCheckout\":[32],\"pay\":[32],\"errorMessage\":[32]},null,{\"authToken\":[\"propChanged\"],\"checkoutId\":[\"propChanged\"]}]]],[\"justifi-business-details.cjs\",[[1,\"justifi-business-details\",{\"businessId\":[1,\"business-id\"],\"authToken\":[1,\"auth-token\"],\"errorMessage\":[32],\"getBusiness\":[32]}]]],[\"justifi-payment-form.cjs\",[[1,\"justifi-payment-form\",{\"bankAccount\":[4,\"bank-account\"],\"card\":[4],\"email\":[1],\"clientId\":[1,\"client-id\"],\"accountId\":[1,\"account-id\"],\"submitButtonText\":[1,\"submit-button-text\"],\"submitButtonEnabled\":[32],\"isLoading\":[32],\"selectedPaymentMethodType\":[32],\"fillBillingForm\":[64],\"enableSubmitButton\":[64]}]]],[\"justifi-subaccount-details.cjs\",[[1,\"justifi-subaccount-details\",{\"accountId\":[1,\"account-id\"],\"subaccountId\":[1,\"subaccount-id\"],\"authToken\":[1,\"auth-token\"],\"onboardingData\":[32],\"subaccount\":[32],\"loading\":[32],\"errorMessage\":[32]},null,{\"subaccountId\":[\"updateOnPropChange\"],\"authToken\":[\"updateOnPropChange\"]}]]],[\"justifi-business-owners.cjs\",[[0,\"justifi-business-owners\",{\"formController\":[16],\"errors\":[32],\"owners\":[32]}]]],[\"justifi-payments-list.cjs\",[[1,\"justifi-payments-list\",{\"accountId\":[1,\"account-id\"],\"authToken\":[1,\"auth-token\"],\"getPayments\":[32],\"errorMessage\":[32]},null,{\"accountId\":[\"propChanged\"],\"authToken\":[\"propChanged\"]}]]],[\"justifi-payouts-list.cjs\",[[1,\"justifi-payouts-list\",{\"accountId\":[1,\"account-id\"],\"authToken\":[1,\"auth-token\"],\"getPayouts\":[32],\"errorMessage\":[32]},null,{\"accountId\":[\"propChanged\"],\"authToken\":[\"propChanged\"]}]]],[\"justifi-business-list.cjs\",[[1,\"justifi-business-list\",{\"accountId\":[1,\"account-id\"],\"authToken\":[1,\"auth-token\"],\"businesses\":[32],\"loading\":[32],\"errorMessage\":[32],\"paging\":[32],\"params\":[32]},null,{\"accountId\":[\"updateOnPropChange\"],\"authToken\":[\"updateOnPropChange\"],\"params\":[\"updateOnPropChange\"]}]]],[\"justifi-payment-balance-transactions.cjs\",[[1,\"justifi-payment-balance-transactions\",{\"accountId\":[1,\"account-id\"],\"authToken\":[1,\"auth-token\"],\"paymentId\":[1,\"payment-id\"],\"balanceTransactions\":[32],\"loading\":[32],\"errorMessage\":[32],\"paging\":[32],\"params\":[32]},null,{\"params\":[\"updateOnPropChange\"]}]]],[\"justifi-payment-details.cjs\",[[1,\"justifi-payment-details\",{\"paymentId\":[1,\"payment-id\"],\"authToken\":[1,\"auth-token\"],\"getPaymentDetails\":[32],\"errorMessage\":[32]},null,{\"paymentId\":[\"propChanged\"],\"authToken\":[\"propChanged\"]}]]],[\"justifi-payout-details.cjs\",[[1,\"justifi-payout-details\",{\"payoutId\":[1,\"payout-id\"],\"authToken\":[1,\"auth-token\"],\"getPayout\":[32],\"errorMessage\":[32]},null,{\"payoutId\":[\"propChanged\"],\"authToken\":[\"propChanged\"]}]]],[\"justifi-proceeds-list.cjs\",[[1,\"justifi-proceeds-list\",{\"accountId\":[1,\"account-id\"],\"authToken\":[1,\"auth-token\"],\"proceeds\":[32],\"loading\":[32],\"errorMessage\":[32],\"paging\":[32],\"params\":[32]},null,{\"accountId\":[\"updateOnPropChange\"],\"authToken\":[\"updateOnPropChange\"],\"params\":[\"updateOnPropChange\"]}]]],[\"justifi-refund-form.cjs\",[[1,\"justifi-refund-form\",{\"authToken\":[1,\"auth-token\"],\"paymentId\":[1,\"payment-id\"],\"amount\":[2],\"submitButtonText\":[1,\"submit-button-text\"],\"withButton\":[4,\"with-button\"],\"refundInfoText\":[1,\"refund-info-text\"],\"errors\":[32],\"isSubmitting\":[32]}]]],[\"justifi-subaccounts-list.cjs\",[[1,\"justifi-subaccounts-list\",{\"accountId\":[1,\"account-id\"],\"authToken\":[1,\"auth-token\"],\"subaccounts\":[32],\"loading\":[32],\"errorMessage\":[32],\"paging\":[32],\"params\":[32]},null,{\"accountId\":[\"updateOnPropChange\"],\"authToken\":[\"updateOnPropChange\"],\"params\":[\"updateOnPropChange\"]}]]],[\"justifi-billing-form_4.cjs\",[[1,\"justifi-billing-form\",{\"legend\":[1025],\"billingFields\":[32],\"billingFieldsErrors\":[32],\"fill\":[64],\"validate\":[64],\"getValues\":[64]},[[0,\"fieldReceivedInput\",\"setFormValue\"]]],[1,\"select-input\",{\"name\":[1],\"label\":[1],\"defaultValue\":[1,\"default-value\"],\"error\":[1],\"options\":[16],\"internalValue\":[32]}],[1,\"text-input\",{\"name\":[1],\"label\":[1],\"defaultValue\":[1,\"default-value\"],\"error\":[1],\"internalValue\":[32]}],[0,\"justifi-payment-method-form\",{\"paymentMethodFormType\":[1,\"payment-method-form-type\"],\"paymentMethodFormValidationMode\":[1025,\"payment-method-form-validation-mode\"],\"iframeOrigin\":[1,\"iframe-origin\"],\"singleLine\":[4,\"single-line\"],\"resize\":[64],\"tokenize\":[64],\"validate\":[64]}]]],[\"justifi-bank-account-form.cjs\",[[0,\"justifi-bank-account-form\",{\"validationMode\":[1025,\"validation-mode\"],\"iframeOrigin\":[1025,\"iframe-origin\"],\"internalStyleOverrides\":[32],\"tokenize\":[64],\"validate\":[64],\"resize\":[64]},[[0,\"paymentMethodFormReady\",\"readyHandler\"],[0,\"paymentMethodFormTokenized\",\"tokenizeHandler\"],[0,\"paymentMethodFormValidated\",\"validateHandler\"]]]]],[\"justifi-card-form.cjs\",[[0,\"justifi-card-form\",{\"validationMode\":[1025,\"validation-mode\"],\"iframeOrigin\":[1025,\"iframe-origin\"],\"singleLine\":[4,\"single-line\"],\"internalStyleOverrides\":[32],\"tokenize\":[64],\"validate\":[64],\"resize\":[64]},[[0,\"paymentMethodFormReady\",\"readyHandler\"],[0,\"paymentMethodFormTokenized\",\"tokenizeHandler\"],[0,\"paymentMethodFormValidated\",\"validateHandler\"]]]]],[\"justifi-gross-payment-chart.cjs\",[[1,\"justifi-gross-payment-chart\",{\"accountId\":[1,\"account-id\"],\"authToken\":[1,\"auth-token\"],\"getGrossPayment\":[32],\"errorMessage\":[32]},null,{\"accountId\":[\"propChanged\"],\"authToken\":[\"propChanged\"]}]]],[\"subaccount-bank-details.cjs\",[[1,\"subaccount-bank-details\",{\"data\":[16]}]]],[\"subaccount-terms-details.cjs\",[[1,\"subaccount-terms-details\",{\"data\":[16]}]]],[\"justifi-checkout-core.cjs\",[[1,\"justifi-checkout-core\",{\"iframeOrigin\":[1025,\"iframe-origin\"],\"authToken\":[1,\"auth-token\"],\"getCheckout\":[16],\"pay\":[16],\"checkoutId\":[1,\"checkout-id\"],\"hasLoadedFonts\":[32],\"isLoading\":[32],\"checkout\":[32],\"serverError\":[32],\"errorMessage\":[32],\"creatingNewPaymentMethod\":[32],\"selectedPaymentMethodToken\":[32],\"loadFontsOnParent\":[64]}]]],[\"business-details-core.cjs\",[[0,\"business-details-core\",{\"getBusiness\":[16],\"business\":[32],\"renderState\":[32],\"errorMessage\":[32]}]]],[\"payments-list-core.cjs\",[[0,\"payments-list-core\",{\"getPayments\":[16],\"payments\":[32],\"loading\":[32],\"errorMessage\":[32],\"paging\":[32],\"params\":[32]},null,{\"params\":[\"updateOnPropChange\"],\"getPayments\":[\"updateOnPropChange\"]}]]],[\"payouts-list-core.cjs\",[[0,\"payouts-list-core\",{\"getPayouts\":[16],\"payouts\":[32],\"loading\":[32],\"errorMessage\":[32],\"paging\":[32],\"params\":[32]},null,{\"params\":[\"updateOnPropChange\"],\"getPayouts\":[\"updateOnPropChange\"]}]]],[\"justifi-details.cjs\",[[1,\"justifi-details\",{\"errorMessage\":[1,\"error-message\"]}]]],[\"payment-details-core.cjs\",[[0,\"payment-details-core\",{\"getPaymentDetails\":[16],\"payment\":[32],\"loading\":[32],\"errorMessage\":[32]},null,{\"getPaymentDetails\":[\"updateOnPropChange\"]}]]],[\"payout-details-core.cjs\",[[0,\"payout-details-core\",{\"getPayout\":[16],\"payout\":[32],\"loading\":[32],\"errorMessage\":[32]},null,{\"getPayout\":[\"getPayoutWatcher\"]}]]],[\"gross-payment-chart-core.cjs\",[[0,\"gross-payment-chart-core\",{\"getGrossPayment\":[16],\"grossVolumeReport\":[32],\"loading\":[32],\"errorMessage\":[32]},null,{\"getGrossPayment\":[\"propChanged\"],\"grossVolumeReport\":[\"grossVolumeReportChanged\"]}]]],[\"justifi-payment-method-selector.cjs\",[[1,\"justifi-payment-method-selector\",{\"selectedPaymentMethodType\":[1,\"selected-payment-method-type\"]}]]],[\"subaccount-account-details_4.cjs\",[[1,\"subaccount-account-details\",{\"subaccount\":[16],\"onboardingData\":[16]}],[1,\"subaccount-merchant-details\",{\"onboardingData\":[16]}],[1,\"subaccount-owners-details\",{\"data\":[16]}],[1,\"subaccount-representative-details\",{\"data\":[16]}]]],[\"form-control-monetary.cjs\",[[1,\"form-control-monetary\",{\"label\":[1],\"name\":[8],\"error\":[1],\"defaultValue\":[1,\"default-value\"],\"inputHandler\":[16]},null,{\"defaultValue\":[\"handleDefaultValueChange\"]}]]],[\"justifi-new-payment-method_3.cjs\",[[0,\"justifi-payment-method-options\",{\"showCard\":[4,\"show-card\"],\"showAch\":[4,\"show-ach\"],\"clientId\":[1,\"client-id\"],\"accountId\":[1,\"account-id\"],\"iframeOrigin\":[1025,\"iframe-origin\"],\"savedPaymentMethods\":[16],\"selectedPaymentMethodId\":[1,\"selected-payment-method-id\"],\"paymentMethodOptions\":[32],\"getPaymentMethodToken\":[64]},[[0,\"paymentMethodOptionSelected\",\"paymentMethodOptionSelected\"]],{\"savedPaymentMethods\":[\"paymentMethodsChanged\"]}],[0,\"justifi-new-payment-method\",{\"iframeOrigin\":[1025,\"iframe-origin\"],\"clientId\":[1,\"client-id\"],\"accountId\":[1,\"account-id\"],\"paymentMethodOption\":[16],\"isSelected\":[4,\"is-selected\"],\"getPaymentMethodToken\":[64]}],[0,\"justifi-saved-payment-method\",{\"iframeOrigin\":[1025,\"iframe-origin\"],\"paymentMethodOption\":[16],\"isSelected\":[4,\"is-selected\"],\"getPaymentMethodToken\":[64]}]]],[\"additional-questions-details_5.cjs\",[[1,\"additional-questions-details\",{\"additionalQuestions\":[16]}],[1,\"generic-info-details\",{\"business\":[16]}],[1,\"legal-address-details\",{\"legalAddress\":[16]}],[1,\"owner-details\",{\"owners\":[16]}],[1,\"representative-details\",{\"representative\":[16]}]]],[\"form-control-select_2.cjs\",[[1,\"form-control-select\",{\"label\":[1],\"name\":[8],\"error\":[1],\"defaultValue\":[1,\"default-value\"],\"inputHandler\":[16],\"options\":[16],\"disabled\":[4]},null,{\"defaultValue\":[\"handleDefaultValueChange\"]}],[1,\"form-control-text\",{\"label\":[1],\"name\":[8],\"error\":[1],\"defaultValue\":[1,\"default-value\"],\"disabled\":[4],\"inputHandler\":[16],\"input\":[32]},null,{\"defaultValue\":[\"handleDefaultValueChange\"]}]]],[\"form-control-datepart_3.cjs\",[[1,\"form-control-datepart\",{\"label\":[1],\"name\":[1],\"error\":[1],\"defaultValue\":[1,\"default-value\"],\"type\":[1],\"inputHandler\":[16],\"disabled\":[4]},null,{\"defaultValue\":[\"handleDefaultValueChange\"]}],[1,\"form-control-number-masked\",{\"label\":[1],\"name\":[8],\"error\":[1],\"defaultValue\":[1,\"default-value\"],\"inputHandler\":[16],\"mask\":[1],\"disabled\":[4]},null,{\"defaultValue\":[\"handleDefaultValueChange\"]}],[1,\"form-control-number\",{\"label\":[1],\"name\":[8],\"error\":[1],\"defaultValue\":[1,\"default-value\"],\"inputHandler\":[16],\"disabled\":[4],\"input\":[32]},null,{\"defaultValue\":[\"handleDefaultValueChange\"]}]]],[\"justifi-additional-questions_5.cjs\",[[0,\"justifi-business-representative\",{\"formController\":[16],\"errors\":[32],\"representative\":[32]}],[0,\"justifi-business-generic-info\",{\"formController\":[16],\"errors\":[32],\"genericInfo\":[32]}],[0,\"justifi-legal-address-form\",{\"formController\":[16],\"errors\":[32],\"legal_address\":[32]}],[0,\"justifi-additional-questions\",{\"formController\":[16],\"errors\":[32],\"additional_questions\":[32]}],[1,\"justifi-business-address-form\",{\"onFormUpdate\":[16],\"errors\":[8],\"defaultValues\":[8,\"default-values\"],\"address\":[32]},null,{\"address\":[\"handleAddressChange\"]}]]],[\"justifi-table_2.cjs\",[[1,\"justifi-table\",{\"loading\":[4],\"errorMessage\":[1,\"error-message\"],\"rowData\":[16],\"columnData\":[16],\"paging\":[16],\"params\":[8],\"entityId\":[16],\"rowClickHandler\":[16]}],[1,\"pagination-menu\",{\"paging\":[16],\"params\":[16]}]]]]"), options);
21
21
  });
22
22
 
23
23
  exports.setNonce = index.setNonce;
@@ -50,27 +50,26 @@ export class CoreBusinessInfo {
50
50
  }
51
51
  export class Business {
52
52
  constructor(business) {
53
+ this.additional_questions = business.additional_questions || {};
54
+ this.bank_accounts = business.bank_accounts;
53
55
  this.business_structure = business.business_structure;
54
56
  this.business_type = business.business_type;
55
- this.bank_accounts = business.bank_accounts;
56
57
  this.created_at = business.created_at;
57
58
  this.documents = business.documents;
58
59
  this.doing_business_as = business.doing_business_as;
59
60
  this.email = business.email;
60
61
  this.id = business.id;
61
62
  this.industry = business.industry;
63
+ this.legal_address = Object.assign({}, new Address(business.legal_address || {}));
62
64
  this.legal_name = business.legal_name;
63
65
  this.metadata = business.metadata;
66
+ this.owners = business.owners;
64
67
  this.phone = business.phone;
65
68
  this.platform_account_id = business.platform_account_id;
69
+ this.product_categories = business.product_categories;
70
+ this.representative = business.representative || {};
66
71
  this.tax_id = business.tax_id;
67
72
  this.updated_at = business.updated_at;
68
73
  this.website_url = business.website_url;
69
- this.product_categories = business.product_categories;
70
- // Form sections
71
- this.legal_address = Object.assign({}, new Address(business.legal_address || {}));
72
- this.representative = business.representative || {};
73
- this.additional_questions = business.additional_questions || {};
74
- this.owners = business.owners;
75
74
  }
76
75
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,6 @@
1
1
  export { default as Api } from './Api';
2
2
  export * from './Api';
3
+ export * from './Checkout';
3
4
  export * from './Pagination';
4
5
  export * from './Payment';
5
6
  export * from './Payout';
@@ -0,0 +1,8 @@
1
+ import { config } from "../../../config";
2
+ import Api from "../Api";
3
+ export class BusinessService {
4
+ async fetchBusiness(businessId, authToken) {
5
+ const endpoint = `entities/business/${businessId}`;
6
+ return Api(authToken, config.proxyApiOrigin).get(endpoint);
7
+ }
8
+ }
@@ -0,0 +1,12 @@
1
+ import { Api } from "..";
2
+ import { config } from "../../../config";
3
+ export class CheckoutService {
4
+ async fetchCheckout(authToken, checkoutId) {
5
+ const endpoint = `checkouts/${checkoutId}`;
6
+ return Api(authToken, config.proxyApiOrigin).get(endpoint);
7
+ }
8
+ async pay(authToken, checkoutId, paymentMethodToken) {
9
+ const endpoint = `checkouts/${checkoutId}/pay`;
10
+ return Api(authToken, config.proxyApiOrigin).post(endpoint, JSON.stringify({ token: paymentMethodToken }));
11
+ }
12
+ }
@@ -0,0 +1,9 @@
1
+ import { config } from "../../../config";
2
+ import Api from "../Api";
3
+ export class ReportsService {
4
+ async fetchGrossVolumeChartData(accountId, authToken) {
5
+ const api = Api(authToken, config.proxyApiOrigin);
6
+ const endpoint = `account/${accountId}/reports/gross_volume`;
7
+ return api.get(endpoint);
8
+ }
9
+ }
@@ -5,6 +5,7 @@
5
5
  "components/bank-account-form/bank-account-form.js",
6
6
  "components/payment-method-form/payment-method-form.js",
7
7
  "components/billing-form/billing-form.js",
8
+ "components/business-details/business-details-core.js",
8
9
  "components/business-details/business-details.js",
9
10
  "components/business-details/additional-questions-details/additional-questions-details.js",
10
11
  "components/business-details/generic-info-details/generic-info-details.js",
@@ -21,6 +22,11 @@
21
22
  "components/business-form/legal-address-form/legal-address-form.js",
22
23
  "components/business-list/business-list.js",
23
24
  "components/card-form/card-form.js",
25
+ "components/checkout/checkout-core.js",
26
+ "components/checkout/checkout.js",
27
+ "components/checkout/new-payment-method.js",
28
+ "components/checkout/payment-method-options.js",
29
+ "components/checkout/saved-payment-method.js",
24
30
  "components/details/details.js",
25
31
  "components/form/form-control-datepart.js",
26
32
  "components/form/form-control-monetary.js",
@@ -28,6 +34,7 @@
28
34
  "components/form/form-control-number.js",
29
35
  "components/form/form-control-select.js",
30
36
  "components/form/form-control-text.js",
37
+ "components/gross-payment-chart/gross-payment-chart-core.js",
31
38
  "components/gross-payment-chart/gross-payment-chart.js",
32
39
  "components/payment-balance-transactions/payment-balance-transactions.js",
33
40
  "components/payment-details/payment-details-core.js",
@@ -8,7 +8,6 @@ import StateOptions from "./state-options";
8
8
  */
9
9
  export class BillingForm {
10
10
  constructor() {
11
- this.legendBlock = (h("legend", null, this.legend));
12
11
  this.legend = undefined;
13
12
  this.billingFields = {
14
13
  name: '',
@@ -61,7 +60,7 @@ export class BillingForm {
61
60
  return this.billingFields;
62
61
  }
63
62
  render() {
64
- return (h(Host, { exportparts: "label,input,input-invalid" }, h("fieldset", null, this.legend && this.legendBlock, h("div", { class: "row gy-3" }, h("div", { class: "col-12" }, h("text-input", { name: "name", label: "Full Name", defaultValue: this.billingFields.name, error: this.billingFieldsErrors.name })), h("div", { class: "col-12" }, h("text-input", { name: "address_line1", label: "Street Address", defaultValue: this.billingFields.address_line1, error: this.billingFieldsErrors.address_line1 })), h("div", { class: "col-12" }, h("text-input", { name: "address_line2", label: "Apartment, Suite, etc. (optional)", defaultValue: this.billingFields.address_line2, error: this.billingFieldsErrors.address_line2 })), h("div", { class: "col-12" }, h("text-input", { name: "address_city", label: "City", defaultValue: this.billingFields.address_city, error: this.billingFieldsErrors.address_city })), h("div", { class: "col-12" }, h("select-input", { name: "address_state", label: "State", options: StateOptions, defaultValue: this.billingFields.address_state, error: this.billingFieldsErrors.address_state })), h("div", { class: "col-12" }, h("text-input", { name: "address_postal_code", label: "ZIP", defaultValue: this.billingFields.address_postal_code, error: this.billingFieldsErrors.address_postal_code }))))));
63
+ return (h(Host, { exportparts: "label,input,input-invalid" }, h("fieldset", null, this.legend && h("legend", null, this.legend), h("div", { class: "row gy-3" }, h("div", { class: "col-12" }, h("text-input", { name: "name", label: "Full Name", defaultValue: this.billingFields.name, error: this.billingFieldsErrors.name })), h("div", { class: "col-12" }, h("text-input", { name: "address_line1", label: "Street Address", defaultValue: this.billingFields.address_line1, error: this.billingFieldsErrors.address_line1 })), h("div", { class: "col-12" }, h("text-input", { name: "address_line2", label: "Apartment, Suite, etc. (optional)", defaultValue: this.billingFields.address_line2, error: this.billingFieldsErrors.address_line2 })), h("div", { class: "col-12" }, h("text-input", { name: "address_city", label: "City", defaultValue: this.billingFields.address_city, error: this.billingFieldsErrors.address_city })), h("div", { class: "col-12" }, h("select-input", { name: "address_state", label: "State", options: StateOptions, defaultValue: this.billingFields.address_state, error: this.billingFieldsErrors.address_state })), h("div", { class: "col-12" }, h("text-input", { name: "address_postal_code", label: "ZIP", defaultValue: this.billingFields.address_postal_code, error: this.billingFieldsErrors.address_postal_code }))))));
65
64
  }
66
65
  static get is() { return "justifi-billing-form"; }
67
66
  static get encapsulation() { return "shadow"; }
@@ -1,5 +1,6 @@
1
1
  import { Host, h } from "@stencil/core";
2
- import { DetailSection, DetailItem } from "../../details/utils";
2
+ import { DetailSectionTitle, DetailItem } from "../../details/utils";
3
+ import { isEmptyObject } from "../../../utils/utils";
3
4
  /**
4
5
  *
5
6
  * @exportedPart detail-section
@@ -14,7 +15,9 @@ export class AdditionalQuestionsDetails {
14
15
  }
15
16
  render() {
16
17
  var _a, _b, _c, _d;
17
- return (h(Host, null, h(DetailSection, { sectionTitle: "Additional Questions" }, h("div", { class: "row gy-3" }, h("div", { class: "col-12 col-md-6" }, h(DetailItem, { title: "Business Revenue", value: (_a = this.additionalQuestions.business_revenue) === null || _a === void 0 ? void 0 : _a.toString() }), h(DetailItem, { title: "Business Payment Volume", value: (_b = this.additionalQuestions.business_payment_volume) === null || _b === void 0 ? void 0 : _b.toString() })), h("div", { class: "col-12 col-md-6" }, h(DetailItem, { title: "Business Dispute Volume", value: (_c = this.additionalQuestions.business_dispute_volume) === null || _c === void 0 ? void 0 : _c.toString() }), h(DetailItem, { title: "Business Receivable Volume", value: (_d = this.additionalQuestions.business_receivable_volume) === null || _d === void 0 ? void 0 : _d.toString() }))))));
18
+ if (isEmptyObject(this.additionalQuestions))
19
+ return null;
20
+ return (h(Host, null, h(DetailSectionTitle, { sectionTitle: "Additional Questions" }), h("div", { class: "d-table gap-2 w-100" }, h("div", { class: "row gy-3" }, h("div", { class: "col-12 col-md-6" }, h(DetailItem, { title: "Business Revenue", value: (_a = this.additionalQuestions.business_revenue) === null || _a === void 0 ? void 0 : _a.toString() }), h(DetailItem, { title: "Business Payment Volume", value: (_b = this.additionalQuestions.business_payment_volume) === null || _b === void 0 ? void 0 : _b.toString() })), h("div", { class: "col-12 col-md-6" }, h(DetailItem, { title: "Business Dispute Volume", value: (_c = this.additionalQuestions.business_dispute_volume) === null || _c === void 0 ? void 0 : _c.toString() }), h(DetailItem, { title: "Business Receivable Volume", value: (_d = this.additionalQuestions.business_receivable_volume) === null || _d === void 0 ? void 0 : _d.toString() }))))));
18
21
  }
19
22
  static get is() { return "additional-questions-details"; }
20
23
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,16 @@
1
+ import { h } from "@stencil/core";
2
+ import { newSpecPage } from "@stencil/core/testing";
3
+ import { AdditionalQuestionsDetails } from "../additional-questions-details";
4
+ import { Business } from "../../../../api/Business";
5
+ import mockedBusinessDetails from "../../../../api/mockData/mockBusinessDetails.json";
6
+ describe('additional-questions-details', () => {
7
+ it('should render additional-questions-details', async () => {
8
+ const businessDetails = new Business(mockedBusinessDetails.data);
9
+ const page = await newSpecPage({
10
+ components: [AdditionalQuestionsDetails],
11
+ template: () => h("additional-questions-details", { additionalQuestions: businessDetails.additional_questions })
12
+ });
13
+ await page.waitForChanges();
14
+ expect(page.root).toMatchSnapshot();
15
+ });
16
+ });
@@ -0,0 +1,86 @@
1
+ import { Host, h } from "@stencil/core";
2
+ import { ErrorState, LoadingState } from "../details/utils";
3
+ var RENDER_STATES;
4
+ (function (RENDER_STATES) {
5
+ RENDER_STATES["LOADING"] = "loading";
6
+ RENDER_STATES["READY"] = "ready";
7
+ RENDER_STATES["ERROR"] = "error";
8
+ })(RENDER_STATES || (RENDER_STATES = {}));
9
+ export class BusinessDetailsCore {
10
+ constructor() {
11
+ this.getBusiness = undefined;
12
+ this.business = undefined;
13
+ this.renderState = RENDER_STATES.LOADING;
14
+ this.errorMessage = 'An error ocurred.';
15
+ }
16
+ async componentWillLoad() {
17
+ if (this.getBusiness) {
18
+ this.fetchData();
19
+ }
20
+ }
21
+ fetchData() {
22
+ this.renderState = RENDER_STATES.LOADING;
23
+ this.getBusiness({
24
+ onSuccess: ({ business }) => {
25
+ this.business = business;
26
+ this.renderState = RENDER_STATES.READY;
27
+ },
28
+ onError: ({ error }) => {
29
+ console.error(error);
30
+ this.errorMessage = error;
31
+ this.renderState = RENDER_STATES.ERROR;
32
+ }
33
+ });
34
+ }
35
+ render() {
36
+ if (this.renderState === RENDER_STATES.LOADING) {
37
+ return h(Host, null, LoadingState());
38
+ }
39
+ if (this.renderState === RENDER_STATES.ERROR) {
40
+ return h(Host, null, ErrorState(this.errorMessage));
41
+ }
42
+ return (h(Host, null, h("generic-info-details", { business: this.business }), h("legal-address-details", { legalAddress: this.business.legal_address }), h("representative-details", { representative: this.business.representative }), h("owner-details", { owners: this.business.owners }), h("additional-questions-details", { additionalQuestions: this.business.additional_questions })));
43
+ }
44
+ static get is() { return "business-details-core"; }
45
+ static get originalStyleUrls() {
46
+ return {
47
+ "$": ["business-details.scss"]
48
+ };
49
+ }
50
+ static get styleUrls() {
51
+ return {
52
+ "$": ["business-details.css"]
53
+ };
54
+ }
55
+ static get properties() {
56
+ return {
57
+ "getBusiness": {
58
+ "type": "unknown",
59
+ "mutable": false,
60
+ "complexType": {
61
+ "original": "Function",
62
+ "resolved": "Function",
63
+ "references": {
64
+ "Function": {
65
+ "location": "global",
66
+ "id": "global::Function"
67
+ }
68
+ }
69
+ },
70
+ "required": false,
71
+ "optional": false,
72
+ "docs": {
73
+ "tags": [],
74
+ "text": ""
75
+ }
76
+ }
77
+ };
78
+ }
79
+ static get states() {
80
+ return {
81
+ "business": {},
82
+ "renderState": {},
83
+ "errorMessage": {}
84
+ };
85
+ }
86
+ }
@@ -1,14 +1,7 @@
1
1
  import { Host, h } from "@stencil/core";
2
- import { Business } from "../../api/Business";
3
- import { Api } from "../../api";
4
- import { ErrorState, LoadingState } from "../details/utils";
5
- import { config } from "../../../config";
6
- var RENDER_STATES;
7
- (function (RENDER_STATES) {
8
- RENDER_STATES["LOADING"] = "loading";
9
- RENDER_STATES["READY"] = "ready";
10
- RENDER_STATES["ERROR"] = "error";
11
- })(RENDER_STATES || (RENDER_STATES = {}));
2
+ import { ErrorState } from "../details/utils";
3
+ import { BusinessService } from "../../api/services/business.service";
4
+ import { makeGetBusiness } from "./get-business";
12
5
  /**
13
6
  *
14
7
  * @exportedPart detail-section
@@ -21,68 +14,31 @@ export class BusinessDetails {
21
14
  constructor() {
22
15
  this.businessId = undefined;
23
16
  this.authToken = undefined;
24
- this.business = undefined;
25
- this.renderState = RENDER_STATES.LOADING;
26
- this.errorMessage = 'An error ocurred.';
27
- this.fetchBusiness = this.fetchBusiness.bind(this);
17
+ this.errorMessage = undefined;
18
+ this.getBusiness = undefined;
28
19
  }
29
- async componentWillLoad() {
30
- if (!this.authToken) {
31
- this.errorMessage = 'Missing auth-token. The form will not be functional without it.';
32
- console.error(this.errorMessage);
33
- return;
34
- }
35
- if (!this.businessId) {
36
- this.errorMessage = 'Missing business-id. The form will not be functional without it.';
37
- console.error(this.errorMessage);
38
- return;
39
- }
40
- this.api = Api(this.authToken, config.proxyApiOrigin);
41
- await this.fetchBusiness(this.businessId);
20
+ componentWillLoad() {
21
+ this.initializeGetBusiness();
42
22
  }
43
- async fetchBusiness(businessId) {
44
- this.renderState = RENDER_STATES.LOADING;
45
- try {
46
- const response = await this.api.get(`entities/business/${businessId}`);
47
- if (response.error) {
48
- this.errorMessage = `${this.errorMessage}: ${response.error}`;
49
- console.error(this.errorMessage);
50
- this.renderState = RENDER_STATES.ERROR;
51
- return;
52
- }
53
- this.business = new Business(response.data);
54
- this.renderState = RENDER_STATES.READY;
55
- }
56
- catch (error) {
57
- this.errorMessage = `${this.errorMessage}: ${error}`;
58
- console.error(this.errorMessage);
59
- this.renderState = RENDER_STATES.ERROR;
60
- }
61
- finally {
62
- this.renderState = RENDER_STATES.READY;
23
+ initializeGetBusiness() {
24
+ if (!this.businessId || !this.authToken) {
25
+ this.errorMessage = 'Invalid business id or auth token';
26
+ return;
63
27
  }
28
+ this.getBusiness = makeGetBusiness({
29
+ id: this.businessId,
30
+ authToken: this.authToken,
31
+ service: new BusinessService(),
32
+ });
64
33
  }
65
34
  render() {
66
- if (this.renderState === RENDER_STATES.LOADING) {
67
- return h(Host, null, LoadingState);
68
- }
69
- if (this.renderState === RENDER_STATES.ERROR) {
35
+ if (this.errorMessage) {
70
36
  return h(Host, null, ErrorState(this.errorMessage));
71
37
  }
72
- return (h(Host, null, h("generic-info-details", { business: this.business }), h("legal-address-details", { legalAddress: this.business.legal_address }), h("representative-details", { representative: this.business.representative }), h("owner-details", { owners: this.business.owners }), h("additional-questions-details", { additionalQuestions: this.business.additional_questions })));
38
+ return (h(Host, null, h("business-details-core", { getBusiness: this.getBusiness })));
73
39
  }
74
40
  static get is() { return "justifi-business-details"; }
75
41
  static get encapsulation() { return "shadow"; }
76
- static get originalStyleUrls() {
77
- return {
78
- "$": ["business-details.scss"]
79
- };
80
- }
81
- static get styleUrls() {
82
- return {
83
- "$": ["business-details.css"]
84
- };
85
- }
86
42
  static get properties() {
87
43
  return {
88
44
  "businessId": {
@@ -123,9 +79,8 @@ export class BusinessDetails {
123
79
  }
124
80
  static get states() {
125
81
  return {
126
- "business": {},
127
- "renderState": {},
128
- "errorMessage": {}
82
+ "errorMessage": {},
83
+ "getBusiness": {}
129
84
  };
130
85
  }
131
86
  }
@@ -1,5 +1,5 @@
1
1
  import { Host, h } from "@stencil/core";
2
- import { DetailSection, DetailItem } from "../../details/utils";
2
+ import { DetailSectionTitle, DetailItem } from "../../details/utils";
3
3
  import { snakeCaseToHumanReadable } from "../../../utils/utils";
4
4
  export class GenericInfoDetails {
5
5
  constructor() {
@@ -7,7 +7,9 @@ export class GenericInfoDetails {
7
7
  }
8
8
  render() {
9
9
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
10
- return (h(Host, null, h(DetailSection, { sectionTitle: "Business Generic Info Details" }, h("div", { class: "row gy-3" }, h("div", { class: "col-12 col-md-6" }, h(DetailItem, { title: "Legal Name", value: (_a = this.business) === null || _a === void 0 ? void 0 : _a.legal_name }), h(DetailItem, { title: "Doing Business As (DBA)", value: (_b = this.business) === null || _b === void 0 ? void 0 : _b.doing_business_as }), h(DetailItem, { title: "Business Type", value: snakeCaseToHumanReadable((_c = this.business) === null || _c === void 0 ? void 0 : _c.business_type) }), h(DetailItem, { title: "Business Structure", value: snakeCaseToHumanReadable((_d = this.business) === null || _d === void 0 ? void 0 : _d.business_structure) }), h(DetailItem, { title: "Industry", value: (_e = this.business) === null || _e === void 0 ? void 0 : _e.industry })), h("div", { class: "col-12 col-md-6" }, h(DetailItem, { title: "Tax ID", value: (_f = this.business) === null || _f === void 0 ? void 0 : _f.tax_id }), h(DetailItem, { title: "Website URL", value: (_g = this.business) === null || _g === void 0 ? void 0 : _g.website_url }), h(DetailItem, { title: "Email Address", value: (_h = this.business) === null || _h === void 0 ? void 0 : _h.email }), h(DetailItem, { title: "Phone Number", value: (_j = this.business) === null || _j === void 0 ? void 0 : _j.phone }))))));
10
+ if (!this.business)
11
+ return null;
12
+ return (h(Host, null, h(DetailSectionTitle, { sectionTitle: "Business Generic Info Details" }), h("div", { class: "d-table gap-2 w-100" }, h("div", { class: "row gy-3" }, h("div", { class: "col-12 col-md-6" }, h(DetailItem, { title: "Legal Name", value: (_a = this.business) === null || _a === void 0 ? void 0 : _a.legal_name }), h(DetailItem, { title: "Doing Business As (DBA)", value: (_b = this.business) === null || _b === void 0 ? void 0 : _b.doing_business_as }), h(DetailItem, { title: "Business Type", value: snakeCaseToHumanReadable((_c = this.business) === null || _c === void 0 ? void 0 : _c.business_type) }), h(DetailItem, { title: "Business Structure", value: snakeCaseToHumanReadable((_d = this.business) === null || _d === void 0 ? void 0 : _d.business_structure) }), h(DetailItem, { title: "Industry", value: (_e = this.business) === null || _e === void 0 ? void 0 : _e.industry })), h("div", { class: "col-12 col-md-6" }, h(DetailItem, { title: "Tax ID", value: (_f = this.business) === null || _f === void 0 ? void 0 : _f.tax_id }), h(DetailItem, { title: "Website URL", value: (_g = this.business) === null || _g === void 0 ? void 0 : _g.website_url }), h(DetailItem, { title: "Email Address", value: (_h = this.business) === null || _h === void 0 ? void 0 : _h.email }), h(DetailItem, { title: "Phone Number", value: (_j = this.business) === null || _j === void 0 ? void 0 : _j.phone }))))));
11
13
  }
12
14
  static get is() { return "generic-info-details"; }
13
15
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,16 @@
1
+ import { h } from "@stencil/core";
2
+ import { newSpecPage } from "@stencil/core/testing";
3
+ import { Business } from "../../../../api/Business";
4
+ import { GenericInfoDetails } from "../generic-info-details";
5
+ import mockedBusinessDetails from "../../../../api/mockData/mockBusinessDetails.json";
6
+ describe('GenericInfoDetails', () => {
7
+ it('should render', async () => {
8
+ const businessDetails = new Business(mockedBusinessDetails.data);
9
+ const page = await newSpecPage({
10
+ components: [GenericInfoDetails],
11
+ template: () => (h("generic-info-details", { business: businessDetails })),
12
+ });
13
+ await page.waitForChanges();
14
+ expect(page.root).toMatchSnapshot();
15
+ });
16
+ });
@@ -0,0 +1,17 @@
1
+ import { Business } from "../../api/Business";
2
+ import { getErrorMessage } from "../../api/services/utils";
3
+ export const makeGetBusiness = ({ id, authToken, service }) => async ({ onSuccess, onError }) => {
4
+ try {
5
+ const response = await service.fetchBusiness(id, authToken);
6
+ if (!response.error) {
7
+ onSuccess({ business: new Business(response.data) });
8
+ }
9
+ else {
10
+ const responseError = getErrorMessage(response.error);
11
+ return onError({ error: responseError });
12
+ }
13
+ }
14
+ catch (error) {
15
+ return onError({ error: error.message || error });
16
+ }
17
+ };
@@ -1,12 +1,15 @@
1
1
  import { Host, h } from "@stencil/core";
2
- import { DetailSection, DetailItem } from "../../details/utils";
2
+ import { DetailSectionTitle, DetailItem } from "../../details/utils";
3
+ import { isEmptyObject } from "../../../utils/utils";
3
4
  export class LegalAddressDetails {
4
5
  constructor() {
5
6
  this.legalAddress = undefined;
6
7
  }
7
8
  render() {
8
9
  var _a, _b, _c, _d, _e, _f, _g;
9
- return (h(Host, null, h(DetailSection, { sectionTitle: "Business Legal Address Details" }, h("div", { class: "row gy-3" }, h("div", { class: "col-12 col-md-6" }, h(DetailItem, { title: "Legal Address", value: (_a = this.legalAddress) === null || _a === void 0 ? void 0 : _a.line1 }), h(DetailItem, { title: "Address Line 2", value: (_b = this.legalAddress) === null || _b === void 0 ? void 0 : _b.line2 }), h(DetailItem, { title: "City", value: (_c = this.legalAddress) === null || _c === void 0 ? void 0 : _c.city })), h("div", { class: "col-12 col-md-6" }, h(DetailItem, { title: "State", value: (_d = this.legalAddress) === null || _d === void 0 ? void 0 : _d.state }), h(DetailItem, { title: "Postal Code", value: (_f = (_e = this.legalAddress) === null || _e === void 0 ? void 0 : _e.postal_code) === null || _f === void 0 ? void 0 : _f.toString() }), h(DetailItem, { title: "Country", value: (_g = this.legalAddress) === null || _g === void 0 ? void 0 : _g.country }))))));
10
+ if (isEmptyObject(this.legalAddress))
11
+ return null;
12
+ return (h(Host, null, h(DetailSectionTitle, { sectionTitle: "Business Legal Address Details" }), h("div", { class: "d-table gap-2 w-100" }, h("div", { class: "row gy-3" }, h("div", { class: "col-12 col-md-6" }, h(DetailItem, { title: "Country", value: (_a = this.legalAddress) === null || _a === void 0 ? void 0 : _a.country }), h(DetailItem, { title: "Legal Address", value: (_b = this.legalAddress) === null || _b === void 0 ? void 0 : _b.line1 }), h(DetailItem, { title: "Address Line 2", value: (_c = this.legalAddress) === null || _c === void 0 ? void 0 : _c.line2 })), h("div", { class: "col-12 col-md-6" }, h(DetailItem, { title: "City", value: (_d = this.legalAddress) === null || _d === void 0 ? void 0 : _d.city }), h(DetailItem, { title: "State", value: (_e = this.legalAddress) === null || _e === void 0 ? void 0 : _e.state }), h(DetailItem, { title: "Postal Code", value: (_g = (_f = this.legalAddress) === null || _f === void 0 ? void 0 : _f.postal_code) === null || _g === void 0 ? void 0 : _g.toString() }))))));
10
13
  }
11
14
  static get is() { return "legal-address-details"; }
12
15
  static get encapsulation() { return "shadow"; }
@@ -0,0 +1,16 @@
1
+ import { h } from "@stencil/core";
2
+ import { newSpecPage } from "@stencil/core/testing";
3
+ import { Business } from "../../../../api/Business";
4
+ import { LegalAddressDetails } from "../legal-address-details";
5
+ import mockedBusinessDetails from "../../../../api/mockData/mockBusinessDetails.json";
6
+ describe('LegalAddressDetails', () => {
7
+ it('should render', async () => {
8
+ const businessDetails = new Business(mockedBusinessDetails.data);
9
+ const page = await newSpecPage({
10
+ components: [LegalAddressDetails],
11
+ template: () => (h("legal-address-details", { legalAddress: businessDetails.legal_address })),
12
+ });
13
+ await page.waitForChanges();
14
+ expect(page.root).toMatchSnapshot();
15
+ });
16
+ });