@justifi/webcomponents 4.19.3-rc-2 → 4.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (383) hide show
  1. package/dist/cjs/{Analytics-adc90fc6.js → Analytics-03981aad.js} +4 -3
  2. package/dist/cjs/{Api-3bc6e43f.js → Api-b98b256f.js} +3 -3
  3. package/dist/cjs/{Business-aacbe893.js → Business-aa799fec.js} +104 -9
  4. package/dist/cjs/additional-questions-details_5.cjs.entry.js +1 -1
  5. package/dist/cjs/{business-additional-questions-schema-cf545610.js → business-additional-questions-schema-26b0eecb.js} +1 -1
  6. package/dist/cjs/business-details-core.cjs.entry.js +1 -1
  7. package/dist/cjs/{business-form-options-582467fe.js → business-form-options-5db0bd5e.js} +2 -2
  8. package/dist/cjs/{payload-parsers-1cbc3b57.js → business-identity-schema-503ecb77.js} +1 -47
  9. package/dist/cjs/{business.service-090a21e1.js → business.service-031c0084.js} +7 -6
  10. package/dist/cjs/check-pkg-version-89d6d146.js +24 -0
  11. package/dist/cjs/config-05767cba.js +15 -0
  12. package/dist/cjs/custom-popper.cjs.entry.js +1894 -0
  13. package/dist/cjs/form-alert_5.cjs.entry.js +2 -2
  14. package/dist/cjs/form-control-checkbox_9.cjs.entry.js +26 -26
  15. package/dist/cjs/form-control-date_3.cjs.entry.js +4 -4
  16. package/dist/cjs/form-control-error-text_4.cjs.entry.js +9 -9
  17. package/dist/cjs/{get-payout-csv-238e839a.js → get-payout-csv-3a3260ec.js} +5 -4
  18. package/dist/cjs/gross-payment-chart-core.cjs.entry.js +1 -1
  19. package/dist/cjs/justifi-additional-questions-form-step_10.cjs.entry.js +15 -14
  20. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +6 -5
  21. package/dist/cjs/justifi-billing-form_2.cjs.entry.js +4 -4
  22. package/dist/cjs/justifi-business-details.cjs.entry.js +8 -5
  23. package/dist/cjs/justifi-business-form.cjs.entry.js +17 -14
  24. package/dist/cjs/justifi-card-form.cjs.entry.js +6 -5
  25. package/dist/cjs/justifi-checkout-core.cjs.entry.js +5 -5
  26. package/dist/cjs/justifi-checkout.cjs.entry.js +10 -7
  27. package/dist/cjs/justifi-details.cjs.entry.js +1 -1
  28. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +7 -4
  29. package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +10 -12
  30. package/dist/cjs/justifi-owner-form_3.cjs.entry.js +12 -11
  31. package/dist/cjs/justifi-payment-details.cjs.entry.js +7 -4
  32. package/dist/cjs/justifi-payment-form.cjs.entry.js +11 -8
  33. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +2 -2
  34. package/dist/cjs/justifi-payment-provisioning-core.cjs.entry.js +1 -1
  35. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +9 -6
  36. package/dist/cjs/justifi-payments-list.cjs.entry.js +7 -4
  37. package/dist/cjs/justifi-payout-details.cjs.entry.js +7 -4
  38. package/dist/cjs/justifi-payouts-list.cjs.entry.js +7 -4
  39. package/dist/cjs/justifi-refund-form.cjs.entry.js +5 -4
  40. package/dist/cjs/justifi-season-interruption-insurance-core.cjs.entry.js +2 -2
  41. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +9 -6
  42. package/dist/cjs/loader.cjs.js +1 -1
  43. package/dist/cjs/{package-22d30c5d.js → package-7fdd14b9.js} +4 -2
  44. package/dist/cjs/payment-details-core.cjs.entry.js +2 -2
  45. package/dist/cjs/{payment.service-c92635c8.js → payment.service-4b1c0a20.js} +4 -3
  46. package/dist/cjs/payments-list-core.cjs.entry.js +18 -13
  47. package/dist/cjs/payments-list-filters_2.cjs.entry.js +17266 -0
  48. package/dist/cjs/payout-details-core.cjs.entry.js +3 -3
  49. package/dist/cjs/payouts-list-core.cjs.entry.js +4 -4
  50. package/dist/cjs/{schema-validations-2733de42.js → schema-validations-0a7e46a3.js} +1 -1
  51. package/dist/cjs/styled-host-9e0b67b3.js +14 -0
  52. package/dist/cjs/{utils-89d86e29.js → utils-af1b60a9.js} +0 -16
  53. package/dist/cjs/utils-f8a6962c.js +25 -0
  54. package/dist/cjs/webcomponents.cjs.js +1 -1
  55. package/dist/collection/api/Api.js +3 -3
  56. package/dist/collection/api/Business.js +66 -7
  57. package/dist/collection/api/Identity.js +39 -3
  58. package/dist/collection/api/services/analytics.service.js +2 -1
  59. package/dist/collection/api/services/business.service.js +6 -5
  60. package/dist/collection/api/services/checkout.service.js +3 -2
  61. package/dist/collection/api/services/insurance.service.js +3 -2
  62. package/dist/collection/api/services/payment.service.js +3 -2
  63. package/dist/collection/api/services/payout.service.js +4 -3
  64. package/dist/collection/api/services/provision.service.js +2 -1
  65. package/dist/collection/api/services/reports.service.js +2 -1
  66. package/dist/collection/collection-manifest.json +4 -1
  67. package/dist/collection/components/bank-account-form/bank-account-form.js +4 -3
  68. package/dist/collection/components/business-details/business-details.js +2 -0
  69. package/dist/collection/components/business-forms/business-form/business-form.js +7 -5
  70. package/dist/collection/components/business-forms/owner-form/owner-form-core.js +4 -5
  71. package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step-core.js +3 -3
  72. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +4 -3
  73. package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step-core.js +3 -5
  74. package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step-core.js +3 -3
  75. package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step-core.js +3 -4
  76. package/dist/collection/components/business-forms/payment-provisioning/document-uploads/business-document-upload-form-step.js +4 -3
  77. package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step-core.js +3 -4
  78. package/dist/collection/components/business-forms/payment-provisioning/payment-provisioning.js +3 -1
  79. package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +4 -3
  80. package/dist/collection/components/business-forms/utils/business-form-options.js +1 -1
  81. package/dist/collection/components/card-form/card-form.js +4 -3
  82. package/dist/collection/components/checkout/checkout-core.js +4 -4
  83. package/dist/collection/components/checkout/checkout.js +4 -2
  84. package/dist/collection/components/checkout/new-payment-method.js +4 -6
  85. package/dist/collection/components/checkout/payment-method-options.js +4 -3
  86. package/dist/collection/components/checkout/saved-payment-method.js +4 -3
  87. package/dist/collection/components/checkout/sezzle-payment-method.js +4 -3
  88. package/dist/collection/components/form/form-control-date.js +26 -28
  89. package/dist/collection/components/form/form-control-select.js +45 -45
  90. package/dist/collection/components/form/form-control-text.js +34 -34
  91. package/dist/collection/components/gross-payment-chart/gross-payment-chart.js +2 -0
  92. package/dist/collection/components/insurance/season-interruption/season-interruption-insurance.js +3 -1
  93. package/dist/collection/components/payment-details/payment-details.js +2 -0
  94. package/dist/collection/components/payment-form/payment-form.js +6 -3
  95. package/dist/collection/components/payments-list/payments-list-core.js +14 -9
  96. package/dist/collection/components/payments-list/payments-list-filters.js +84 -0
  97. package/dist/collection/components/payments-list/payments-list.js +2 -0
  98. package/dist/collection/components/payout-details/payout-details-core.js +1 -1
  99. package/dist/collection/components/payout-details/payout-details.js +2 -0
  100. package/dist/collection/components/payouts-list/payouts-list-core.js +2 -2
  101. package/dist/collection/components/payouts-list/payouts-list.js +2 -0
  102. package/dist/collection/components/refund-form/refund-form.js +3 -2
  103. package/dist/collection/ui-components/custom-popper/custom-popper.js +239 -0
  104. package/dist/collection/ui-components/filters/table-filters-menu.js +89 -0
  105. package/dist/collection/ui-components/filters/utils.js +20 -0
  106. package/dist/collection/utils/check-pkg-version.js +19 -0
  107. package/dist/config.js +11 -0
  108. package/dist/docs.json +531 -27
  109. package/dist/{webcomponents/p-15eafa87.js → esm/Analytics-3103f8e9.js} +4 -3
  110. package/dist/esm/{Api-b09a2f6a.js → Api-c8abc2e0.js} +3 -3
  111. package/dist/esm/{Business-e218b4f4.js → Business-b73d5055.js} +104 -9
  112. package/dist/esm/additional-questions-details_5.entry.js +1 -1
  113. package/dist/esm/{business-additional-questions-schema-956e3caf.js → business-additional-questions-schema-a5583cf8.js} +1 -1
  114. package/dist/esm/business-details-core.entry.js +1 -1
  115. package/dist/esm/{business-form-options-7a9a74fc.js → business-form-options-d790973e.js} +2 -2
  116. package/dist/esm/{payload-parsers-acb719d1.js → business-identity-schema-9e3269fb.js} +2 -44
  117. package/dist/esm/{business.service-37d0cc72.js → business.service-1f589b6e.js} +7 -6
  118. package/dist/esm/check-pkg-version-44e6ad15.js +22 -0
  119. package/dist/esm/config-27764a9d.js +13 -0
  120. package/dist/esm/custom-popper.entry.js +1890 -0
  121. package/dist/esm/form-alert_5.entry.js +2 -2
  122. package/dist/esm/form-control-checkbox_9.entry.js +21 -21
  123. package/dist/esm/form-control-date_3.entry.js +4 -4
  124. package/dist/esm/form-control-error-text_4.entry.js +9 -9
  125. package/dist/esm/{get-payout-csv-a702a0d9.js → get-payout-csv-93427146.js} +5 -4
  126. package/dist/esm/gross-payment-chart-core.entry.js +1 -1
  127. package/dist/esm/justifi-additional-questions-form-step_10.entry.js +15 -14
  128. package/dist/esm/justifi-bank-account-form.entry.js +6 -5
  129. package/dist/esm/justifi-billing-form_2.entry.js +4 -4
  130. package/dist/esm/justifi-business-details.entry.js +8 -5
  131. package/dist/esm/justifi-business-form.entry.js +16 -13
  132. package/dist/esm/justifi-card-form.entry.js +6 -5
  133. package/dist/esm/justifi-checkout-core.entry.js +5 -5
  134. package/dist/esm/justifi-checkout.entry.js +10 -7
  135. package/dist/esm/justifi-details.entry.js +1 -1
  136. package/dist/esm/justifi-gross-payment-chart.entry.js +7 -4
  137. package/dist/esm/justifi-new-payment-method_4.entry.js +10 -12
  138. package/dist/esm/justifi-owner-form_3.entry.js +11 -10
  139. package/dist/esm/justifi-payment-details.entry.js +7 -4
  140. package/dist/esm/justifi-payment-form.entry.js +11 -8
  141. package/dist/esm/justifi-payment-method-form.entry.js +2 -2
  142. package/dist/esm/justifi-payment-provisioning-core.entry.js +1 -1
  143. package/dist/esm/justifi-payment-provisioning.entry.js +9 -6
  144. package/dist/esm/justifi-payments-list.entry.js +7 -4
  145. package/dist/esm/justifi-payout-details.entry.js +7 -4
  146. package/dist/esm/justifi-payouts-list.entry.js +7 -4
  147. package/dist/esm/justifi-refund-form.entry.js +5 -4
  148. package/dist/esm/justifi-season-interruption-insurance-core.entry.js +2 -2
  149. package/dist/esm/justifi-season-interruption-insurance.entry.js +9 -6
  150. package/dist/esm/loader.js +1 -1
  151. package/dist/{webcomponents/p-2e8f4937.js → esm/package-0e3cc41e.js} +4 -2
  152. package/dist/esm/payment-details-core.entry.js +2 -2
  153. package/dist/esm/{payment.service-9359fe15.js → payment.service-02c596b9.js} +4 -3
  154. package/dist/esm/payments-list-core.entry.js +16 -11
  155. package/dist/esm/payments-list-filters_2.entry.js +17261 -0
  156. package/dist/esm/payout-details-core.entry.js +3 -3
  157. package/dist/esm/payouts-list-core.entry.js +4 -4
  158. package/dist/esm/{schema-validations-a83ff220.js → schema-validations-e725d701.js} +2 -2
  159. package/dist/esm/styled-host-3171ae1f.js +12 -0
  160. package/dist/esm/utils-3a4d8f3a.js +22 -0
  161. package/dist/{webcomponents/p-83125497.js → esm/utils-e66d8bca.js} +1 -16
  162. package/dist/esm/webcomponents.js +1 -1
  163. package/dist/module/Analytics.js +2 -1
  164. package/dist/module/Api.js +3 -3
  165. package/dist/module/Business.js +104 -9
  166. package/dist/module/business-additional-questions-form-step-core.js +3 -3
  167. package/dist/module/business-bank-account-form-step.js +4 -3
  168. package/dist/module/business-core-info-form-step-core.js +3 -5
  169. package/dist/module/business-document-upload-form-step.js +4 -3
  170. package/dist/module/business-document-upload-input-group.js +1 -1
  171. package/dist/module/business-documents-on-file.js +1 -1
  172. package/dist/module/business-form-options.js +1 -1
  173. package/dist/module/business-owners-form-step-core.js +3 -3
  174. package/dist/module/business-representative-form-step-core.js +3 -4
  175. package/dist/module/business-terms-conditions-form-step.js +4 -3
  176. package/dist/module/business.service.js +6 -5
  177. package/dist/module/check-pkg-version.js +22 -0
  178. package/dist/module/checkout-core.js +3 -3
  179. package/dist/module/config.js +13 -0
  180. package/dist/module/custom-popper.d.ts +11 -0
  181. package/dist/module/custom-popper.js +6 -0
  182. package/dist/module/custom-popper2.js +1912 -0
  183. package/dist/module/form-control-date2.js +7 -7
  184. package/dist/module/form-control-select2.js +9 -9
  185. package/dist/module/form-control-text2.js +7 -7
  186. package/dist/module/get-payout-csv.js +4 -3
  187. package/dist/module/justifi-bank-account-form.js +3 -2
  188. package/dist/module/justifi-business-details.js +2 -0
  189. package/dist/module/justifi-business-form.js +7 -5
  190. package/dist/module/justifi-card-form.js +3 -2
  191. package/dist/module/justifi-checkout.js +7 -4
  192. package/dist/module/justifi-gross-payment-chart.js +4 -1
  193. package/dist/module/justifi-payment-details.js +2 -0
  194. package/dist/module/justifi-payment-form.js +6 -3
  195. package/dist/module/justifi-payment-provisioning.js +5 -2
  196. package/dist/module/justifi-payments-list.js +42 -10
  197. package/dist/module/justifi-payout-details.js +2 -0
  198. package/dist/module/justifi-payouts-list.js +2 -0
  199. package/dist/module/justifi-refund-form.js +3 -2
  200. package/dist/module/justifi-season-interruption-insurance.js +6 -3
  201. package/dist/module/legal-address-form-step-core.js +3 -4
  202. package/dist/module/new-payment-method.js +3 -5
  203. package/dist/module/owner-form-core2.js +4 -5
  204. package/dist/module/package.js +4 -2
  205. package/dist/module/payment-details-core2.js +1 -1
  206. package/dist/module/payment-method-options.js +3 -2
  207. package/dist/module/payment.service.js +3 -2
  208. package/dist/module/payments-list-core2.js +52 -18
  209. package/dist/module/payments-list-filters.d.ts +11 -0
  210. package/dist/module/payments-list-filters.js +6 -0
  211. package/dist/module/payments-list-filters2.js +17294 -0
  212. package/dist/module/payout-details-core2.js +2 -2
  213. package/dist/module/payouts-list-core2.js +3 -3
  214. package/dist/module/saved-payment-method.js +4 -3
  215. package/dist/module/sezzle-payment-method.js +3 -2
  216. package/dist/module/styled-host.js +1 -1
  217. package/dist/module/table-filters-menu.d.ts +11 -0
  218. package/dist/module/table-filters-menu.js +6 -0
  219. package/dist/module/table-filters-menu2.js +80 -0
  220. package/dist/module/utils2.js +1 -16
  221. package/dist/types/api/Business.d.ts +87 -1
  222. package/dist/types/api/Identity.d.ts +45 -1
  223. package/dist/types/api/Payment.d.ts +8 -0
  224. package/dist/types/components/business-forms/owner-form/owner-form-core.d.ts +44 -1
  225. package/dist/types/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step-core.d.ts +11 -1
  226. package/dist/types/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step-core.d.ts +11 -1
  227. package/dist/types/components/business-forms/payment-provisioning/business-representative/business-representative-form-step-core.d.ts +24 -1
  228. package/dist/types/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step-core.d.ts +11 -1
  229. package/dist/types/components/checkout/new-payment-method.d.ts +0 -1
  230. package/dist/types/components/form/form-control-date.d.ts +4 -4
  231. package/dist/types/components/form/form-control-select.d.ts +6 -6
  232. package/dist/types/components/form/form-control-text.d.ts +4 -4
  233. package/dist/types/components/payments-list/payments-list-core.d.ts +6 -5
  234. package/dist/types/components/payments-list/payments-list-filters.d.ts +13 -0
  235. package/dist/types/components.d.ts +89 -10
  236. package/dist/types/home/runner/work/web-component-library/web-component-library/packages/webcomponents/.stencil/packages/webcomponents/config.d.ts +11 -0
  237. package/dist/types/ui-components/custom-popper/custom-popper.d.ts +21 -0
  238. package/dist/types/ui-components/filters/table-filters-menu.d.ts +11 -0
  239. package/dist/types/ui-components/filters/utils.d.ts +2 -0
  240. package/dist/types/utils/check-pkg-version.d.ts +1 -0
  241. package/dist/webcomponents/index.esm.js +0 -1
  242. package/dist/webcomponents/p-056e75be.entry.js +1 -0
  243. package/dist/webcomponents/p-05718341.entry.js +1 -0
  244. package/dist/webcomponents/p-08b0fb31.js +1 -41
  245. package/dist/webcomponents/p-0de026dd.entry.js +1 -0
  246. package/dist/webcomponents/p-0e84986e.entry.js +10 -0
  247. package/dist/webcomponents/p-0f7b9555.entry.js +1 -0
  248. package/dist/webcomponents/p-14c91ffd.js +1 -20
  249. package/dist/webcomponents/p-1612894d.js +1 -0
  250. package/dist/webcomponents/p-1815a43b.js +1 -0
  251. package/dist/webcomponents/p-1ad5995e.js +1 -3599
  252. package/dist/webcomponents/p-1eee25f3.entry.js +19 -0
  253. package/dist/webcomponents/p-1ff8810b.js +1 -29
  254. package/dist/webcomponents/p-20dafb46.entry.js +1 -0
  255. package/dist/webcomponents/p-2338affa.js +1 -213
  256. package/dist/webcomponents/p-277aee05.js +1 -0
  257. package/dist/webcomponents/p-2b6c9c4f.js +1 -7
  258. package/dist/webcomponents/p-2c51d29f.js +1 -0
  259. package/dist/webcomponents/p-2eab3c90.js +1 -3052
  260. package/dist/webcomponents/p-3a1f19f3.entry.js +1 -0
  261. package/dist/webcomponents/p-3c7fac29.entry.js +1 -0
  262. package/dist/webcomponents/p-401d6607.js +1 -0
  263. package/dist/webcomponents/p-428e9b64.entry.js +1 -0
  264. package/dist/webcomponents/p-430f81c6.entry.js +1 -0
  265. package/dist/webcomponents/p-437f9114.js +1 -0
  266. package/dist/webcomponents/p-44055818.js +1 -0
  267. package/dist/webcomponents/p-4628cc9b.entry.js +1 -0
  268. package/dist/webcomponents/p-4cc9df76.entry.js +1 -0
  269. package/dist/webcomponents/p-5022f21c.js +1 -0
  270. package/dist/webcomponents/p-525db3e8.js +1 -22
  271. package/dist/webcomponents/p-55182a59.js +1 -0
  272. package/dist/webcomponents/p-5540a47c.entry.js +1 -0
  273. package/dist/webcomponents/p-56f6ce4c.js +1 -10
  274. package/dist/webcomponents/p-570a0f02.entry.js +1 -0
  275. package/dist/webcomponents/p-5968ff8a.js +1 -178
  276. package/dist/webcomponents/p-59cf5391.entry.js +1 -0
  277. package/dist/webcomponents/p-5a62fca2.js +1 -0
  278. package/dist/webcomponents/p-5e2c9ec8.js +1 -0
  279. package/dist/webcomponents/p-5e7c60d8.js +1 -0
  280. package/dist/webcomponents/p-6078a370.js +1 -244
  281. package/dist/webcomponents/p-6ac806ff.entry.js +1 -0
  282. package/dist/webcomponents/p-7bdffc78.entry.js +1 -0
  283. package/dist/webcomponents/p-7d3be485.js +1 -0
  284. package/dist/webcomponents/p-7d85af5c.js +1 -16
  285. package/dist/webcomponents/p-7ddfce86.entry.js +1 -0
  286. package/dist/webcomponents/p-7fe67d7f.entry.js +1 -0
  287. package/dist/webcomponents/p-7ff329b1.js +1 -0
  288. package/dist/webcomponents/p-804c0f1f.entry.js +1 -0
  289. package/dist/webcomponents/p-8115b2f4.js +1 -28
  290. package/dist/webcomponents/p-8281f09a.js +1 -0
  291. package/dist/webcomponents/p-8921a478.entry.js +1 -0
  292. package/dist/webcomponents/p-8a7112a0.entry.js +1 -0
  293. package/dist/webcomponents/p-8c83b73e.entry.js +1 -0
  294. package/dist/webcomponents/p-8d03a7bd.entry.js +1 -0
  295. package/dist/webcomponents/p-8df7bde8.js +1 -27
  296. package/dist/webcomponents/p-938bf2b4.entry.js +1 -0
  297. package/dist/webcomponents/p-9b154d98.entry.js +1 -0
  298. package/dist/webcomponents/p-9c9c7dac.js +1 -24
  299. package/dist/webcomponents/p-ad47f37c.entry.js +1 -0
  300. package/dist/webcomponents/p-aedb421f.entry.js +1 -0
  301. package/dist/webcomponents/p-b14da2fd.entry.js +1 -0
  302. package/dist/webcomponents/p-bbed6107.entry.js +1 -0
  303. package/dist/webcomponents/p-bdc91c61.entry.js +1 -0
  304. package/dist/webcomponents/p-c64ce69d.entry.js +1 -0
  305. package/dist/webcomponents/p-d76002d5.entry.js +1 -0
  306. package/dist/webcomponents/p-d8355f91.entry.js +1 -0
  307. package/dist/webcomponents/p-d89bad72.js +1 -39
  308. package/dist/webcomponents/p-da1d174d.entry.js +1 -0
  309. package/dist/webcomponents/p-dbc1d7b3.entry.js +1 -0
  310. package/dist/webcomponents/p-dce846bf.js +1 -27
  311. package/dist/webcomponents/p-df21aaad.js +1 -120
  312. package/dist/webcomponents/p-e1255160.js +1 -3
  313. package/dist/webcomponents/p-e2c88817.entry.js +1 -0
  314. package/dist/webcomponents/p-e31f0f3e.entry.js +1 -0
  315. package/dist/webcomponents/p-e333620e.js +1 -34
  316. package/dist/webcomponents/p-e3f4a2a6.js +1 -0
  317. package/dist/webcomponents/p-e3fab0e2.js +1 -43
  318. package/dist/webcomponents/p-eea79a55.entry.js +1 -0
  319. package/dist/webcomponents/p-f0866375.entry.js +1 -0
  320. package/dist/webcomponents/p-f6a2dc78.entry.js +1 -0
  321. package/dist/webcomponents/p-fad19d75.js +2 -1638
  322. package/dist/webcomponents/webcomponents.css +4 -362
  323. package/dist/webcomponents/webcomponents.esm.js +1 -20
  324. package/package.json +4 -2
  325. package/dist/cjs/styled-host-cc053016.js +0 -14
  326. package/dist/collection/components/business-forms/utils/payload-parsers.js +0 -41
  327. package/dist/esm/Analytics-a8eb7344.js +0 -77
  328. package/dist/esm/package-ccb774a9.js +0 -79
  329. package/dist/esm/styled-host-ab9da520.js +0 -12
  330. package/dist/esm/utils-3c1dd2fa.js +0 -4027
  331. package/dist/module/payload-parsers.js +0 -43
  332. package/dist/types/components/business-forms/utils/payload-parsers.d.ts +0 -4
  333. package/dist/webcomponents/p-01a404ca.entry.js +0 -44
  334. package/dist/webcomponents/p-03d35880.entry.js +0 -130
  335. package/dist/webcomponents/p-06ff0429.entry.js +0 -65
  336. package/dist/webcomponents/p-0e1bc91e.js +0 -28
  337. package/dist/webcomponents/p-10875f3d.entry.js +0 -97
  338. package/dist/webcomponents/p-157acba8.entry.js +0 -98
  339. package/dist/webcomponents/p-18fa0479.entry.js +0 -131
  340. package/dist/webcomponents/p-1a5120f4.entry.js +0 -145
  341. package/dist/webcomponents/p-24dc023a.entry.js +0 -791
  342. package/dist/webcomponents/p-25d8cd65.entry.js +0 -102
  343. package/dist/webcomponents/p-27d87fe2.entry.js +0 -133
  344. package/dist/webcomponents/p-29c0b182.js +0 -114
  345. package/dist/webcomponents/p-3395e896.entry.js +0 -74
  346. package/dist/webcomponents/p-3fd13ca3.js +0 -52
  347. package/dist/webcomponents/p-47d79529.js +0 -18
  348. package/dist/webcomponents/p-53ecc8b9.entry.js +0 -261
  349. package/dist/webcomponents/p-5482d030.entry.js +0 -21
  350. package/dist/webcomponents/p-576826b1.entry.js +0 -43
  351. package/dist/webcomponents/p-5f835b89.entry.js +0 -606
  352. package/dist/webcomponents/p-6124b1b3.entry.js +0 -80
  353. package/dist/webcomponents/p-70a2aa74.entry.js +0 -76
  354. package/dist/webcomponents/p-7582b554.entry.js +0 -18
  355. package/dist/webcomponents/p-75fd6367.entry.js +0 -149
  356. package/dist/webcomponents/p-79646550.entry.js +0 -61
  357. package/dist/webcomponents/p-800d31fe.entry.js +0 -162
  358. package/dist/webcomponents/p-85fc69e5.js +0 -90
  359. package/dist/webcomponents/p-89887332.js +0 -301
  360. package/dist/webcomponents/p-8eb774df.entry.js +0 -54
  361. package/dist/webcomponents/p-9e17630d.entry.js +0 -1684
  362. package/dist/webcomponents/p-9f94bbb6.entry.js +0 -118
  363. package/dist/webcomponents/p-a4e8573e.entry.js +0 -94
  364. package/dist/webcomponents/p-a5a225d9.entry.js +0 -125
  365. package/dist/webcomponents/p-a5fb51dc.entry.js +0 -131
  366. package/dist/webcomponents/p-ab4816e1.entry.js +0 -117
  367. package/dist/webcomponents/p-ac086069.entry.js +0 -58
  368. package/dist/webcomponents/p-af244664.js +0 -126
  369. package/dist/webcomponents/p-b4b8b531.js +0 -44
  370. package/dist/webcomponents/p-b82c146f.entry.js +0 -111
  371. package/dist/webcomponents/p-ba4bae6f.js +0 -12
  372. package/dist/webcomponents/p-ba5fae28.js +0 -90
  373. package/dist/webcomponents/p-bd66f9d2.entry.js +0 -101
  374. package/dist/webcomponents/p-cc39384f.entry.js +0 -99
  375. package/dist/webcomponents/p-d17aee2b.entry.js +0 -26
  376. package/dist/webcomponents/p-dad3e069.entry.js +0 -298
  377. package/dist/webcomponents/p-e1e7525b.entry.js +0 -73
  378. package/dist/webcomponents/p-e356f280.entry.js +0 -29
  379. package/dist/webcomponents/p-e9a5cb95.entry.js +0 -94
  380. package/dist/webcomponents/p-ec854a3e.entry.js +0 -11053
  381. package/dist/webcomponents/p-edc37d1f.entry.js +0 -75
  382. package/dist/webcomponents/p-f02b75dc.entry.js +0 -96
  383. package/dist/{globals.d.ts → types/global.d.ts} +1 -1
@@ -2,11 +2,12 @@ import { h } from "@stencil/core";
2
2
  import { FormController } from "../../form/form";
3
3
  import { businessFormSchema } from "../schemas/business-form-schema";
4
4
  import { Api } from "../../../api";
5
- import { parseBusiness } from "../utils/payload-parsers";
5
+ import { config } from "../../../../config";
6
6
  import { BusinessFormClickActions, BusinessFormServerErrors } from "../utils/business-form-types";
7
7
  import { Business } from "../../../api/Business";
8
8
  import JustifiAnalytics from "../../../api/Analytics";
9
9
  import { StyledHost } from "../../../ui-components";
10
+ import { checkPkgVersion } from "../../../utils/check-pkg-version";
10
11
  /**
11
12
  * @exportedPart label: Label for inputs
12
13
  * @exportedPart input: The input fields
@@ -23,8 +24,8 @@ export class BusinessForm {
23
24
  try {
24
25
  const values = this.formController.values.getValue();
25
26
  const initialValues = this.formController.getInitialValues();
26
- const payload = parseBusiness(values, initialValues);
27
- const response = await this.api.patch(this.businessEndpoint, JSON.stringify(payload));
27
+ const payload = new Business(Object.assign(Object.assign({}, initialValues), values)).payload;
28
+ const response = await this.api.patch(this.businessEndpoint, payload);
28
29
  this.handleReponse(response);
29
30
  }
30
31
  catch (error) {
@@ -60,6 +61,7 @@ export class BusinessForm {
60
61
  this.errorMessage = undefined;
61
62
  }
62
63
  componentWillLoad() {
64
+ checkPkgVersion();
63
65
  this.analytics = new JustifiAnalytics(this);
64
66
  const missingAuthTokenMessage = 'Warning: Missing auth-token. The form will not be functional without it.';
65
67
  const missingBusinessIdMessage = 'Warning: Missing business-id. The form requires an existing business-id to function.';
@@ -68,7 +70,7 @@ export class BusinessForm {
68
70
  if (!this.businessId)
69
71
  console.error(missingBusinessIdMessage);
70
72
  this.formController = new FormController(businessFormSchema);
71
- this.api = Api({ authToken: this.authToken, apiOrigin: PROXY_API_ORIGIN });
73
+ this.api = Api({ authToken: this.authToken, apiOrigin: config.proxyApiOrigin });
72
74
  this.fetchData();
73
75
  }
74
76
  disconnectedCallback() {
@@ -96,7 +98,7 @@ export class BusinessForm {
96
98
  this.instantiateBusiness(response.data);
97
99
  }
98
100
  render() {
99
- return (h(StyledHost, { key: '8fb79d577c13246fcf3ec1ee8460713fee07d01a', exportparts: "label,input,input-invalid" }, h("form", { key: '1fe23a8cc8714aee257b6c73c6b7b096d684ea1c', onSubmit: this.validateAndSubmit }, h("div", { key: 'e501f6963ed5bfd9eb80f67df13108289db6eba7', class: "row gap-3" }, h("h1", { key: 'f81f22704bda1480c467b872cd3fd309505b0e94' }, this.title), h("form-alert", { key: '15b2ff75d4db6447bfd1892542e8e972ede0ac7e', text: this.errorMessage, hideAlert: this.hideErrors }), h("div", { key: 'fd6a375fd187426940df3f28262be7aec3fedbe5', class: "col-12 mb-4" }, h("justifi-business-core-info", { key: 'd16818a2124cb04dd5a5e84ea40639991fb04a80', formController: this.formController })), h("div", { key: 'd48b04718cf938484cf65cc956bf798f44ed17a7', class: "col-12 mb-4" }, h("justifi-legal-address-form", { key: '3a2bc6babfe8a0a265b2a7f9e7bea1abebd3eb43', formController: this.formController })), h("div", { key: '5c4d5d1fa1e2aba32f42c2bb9e97c0d796ecf709', class: "col-12 mb-4" }, h("justifi-additional-questions", { key: 'c888fb627380d05302cb106c5642e39b1f2652fa', formController: this.formController })), h("div", { key: '623e94d84976cfe29f4501a781c750d1bb537605', class: "col-12 mb-4" }, h("justifi-business-representative", { key: '594c893c0976b58a309679a031f6f1c787e66f48', formController: this.formController })), h("div", { key: '9fbc36ed183b1ebf171da14276092195c7aaf3a9', class: "col-12 d-flex flex-row-reverse" }, h("button", { key: 'a60da6fdda5193d3c41c589b00b040c05ae425ac', type: "submit", class: "btn btn-primary jfi-submit-button", disabled: this.disabledState, onClick: () => this.fireClickEvents({ name: BusinessFormClickActions.submit }) }, this.isLoading ? 'Loading...' : 'Submit'))))));
101
+ return (h(StyledHost, { key: '2f28b3e44c64d6ea1ac0d8584946927f6c9c3d05', exportparts: "label,input,input-invalid" }, h("form", { key: '5e57787b7dcd649c3523dc49d0a6946138643c7c', onSubmit: this.validateAndSubmit }, h("div", { key: '0ee6212aa6157ade79ab9b2ff5eb700549a8a916', class: "row gap-3" }, h("h1", { key: '84824314dd924cdab149c2b62b7e01b07dbf5d28' }, this.title), h("form-alert", { key: 'dca6d7ef6bcddd3090f44e5ccf9199bbd441dc87', text: this.errorMessage, hideAlert: this.hideErrors }), h("div", { key: 'a022912c284d63afbf9ce698b145d964d720b110', class: "col-12 mb-4" }, h("justifi-business-core-info", { key: 'be264b806255b790a166b8a3349d78845c6c8225', formController: this.formController })), h("div", { key: 'b3a52da227a71f941941f66b758f718cdc3b7800', class: "col-12 mb-4" }, h("justifi-legal-address-form", { key: '258dc5ebabc0e2dfaa8de28534238ef80a4f951d', formController: this.formController })), h("div", { key: '9dd5d30daf37d90a689333640cd1630000ee5e25', class: "col-12 mb-4" }, h("justifi-additional-questions", { key: 'aa1cdf3a39170fcefbd07afcce193ed36430dc5b', formController: this.formController })), h("div", { key: 'a8cd6655a6408bef11c9ad442ecae7a0b5e3c50d', class: "col-12 mb-4" }, h("justifi-business-representative", { key: '33db8cd22d22b694917332941b89b7535bd19201', formController: this.formController })), h("div", { key: '99d46400c8d46e5a3ca6747e5bae70bf5652a367', class: "col-12 d-flex flex-row-reverse" }, h("button", { key: '8b858727a11d5ec5f855c446f34da3c1d6253563', type: "submit", class: "btn btn-primary jfi-submit-button", disabled: this.disabledState, onClick: () => this.fireClickEvents({ name: BusinessFormClickActions.submit }) }, this.isLoading ? 'Loading...' : 'Submit'))))));
100
102
  }
101
103
  static get is() { return "justifi-business-form"; }
102
104
  static get encapsulation() { return "shadow"; }
@@ -3,7 +3,6 @@ import { FormController } from "../../form/form";
3
3
  import { Owner } from "../../../api/Identity";
4
4
  import { BusinessFormClickActions } from "../utils/business-form-types";
5
5
  import { identitySchema } from "../schemas/business-identity-schema";
6
- import { parseIdentityInfo } from "../utils/payload-parsers";
7
6
  import { Button } from "../../../ui-components";
8
7
  export class BusinessOwnerFormCore {
9
8
  loadingWatcher() {
@@ -128,12 +127,12 @@ export class BusinessOwnerFormCore {
128
127
  }
129
128
  }
130
129
  get payload() {
131
- let formValues = parseIdentityInfo(this.formController.values.getValue());
130
+ let formValues = new Owner(this.formController.values.getValue()).payload;
132
131
  if (this.ownerId) {
133
- return JSON.stringify(formValues);
132
+ return formValues;
134
133
  }
135
134
  else {
136
- return JSON.stringify(Object.assign(Object.assign({}, formValues), { business_id: this.businessId }));
135
+ return Object.assign(Object.assign({}, formValues), { business_id: this.businessId });
137
136
  }
138
137
  }
139
138
  get formTitle() {
@@ -164,7 +163,7 @@ export class BusinessOwnerFormCore {
164
163
  this.formController.errors.subscribe(errors => (this.errors = Object.assign({}, errors)));
165
164
  }
166
165
  render() {
167
- return (h("form", { key: 'b2e2aaced859260e9d2ef59bc3f8a0763d05872c', onSubmit: this.validateAndSubmit }, h("fieldset", { key: '2a93ddb4c945be0ec081ce31d6d9eff4b302d622' }, h("legend", { key: 'ea9859e55099e3f8263024d884edfb48b3666eaa', class: "fw-semibold fs-5" }, this.formTitle), h("br", { key: 'f646c1ecc544c358d87e701aba8e151fcb96c54e' }), h("div", { key: '874bf4ebd7cef0afbdee96fa4d5679b6d683b0f0', class: "row gy-3" }, h("owner-form-inputs", { key: '866dbf0002ec1ac70d7942c6011c67f8cd144960', ownerDefaultValue: this.formController.getInitialValues(), errors: this.errors, formController: this.formController }), h("div", { key: '15d907270ecf3d16769cedea39ba279d7ffb0748', class: "d-flex gap-2 justify-content-start" }, h(Button, { key: '84c09ef594e7fa387e64a09014de81ed713cc765', variant: "secondary", type: "button", onClick: this.handleRemoveOwner, hidden: !this.showRemoveButton }, "Remove"), h(Button, { key: '1dafd97aa7b84644c9d011224a152ad7f99ce620', variant: "primary", type: "submit", onClick: this.handleAddOwner, disabled: this.isLoading }, this.submitButtonText))), h("hr", { key: 'f1f31da4d147afcd01ef96acd01d63ee9497dd6b' }))));
166
+ return (h("form", { key: '27f0d989f017bd03b84cf8c994fa96f9a65aad08', onSubmit: this.validateAndSubmit }, h("fieldset", { key: '2c793f1f8777181e5db0a4cae5b9994d9188685e' }, h("legend", { key: 'a8951fcd990c8136cf6672424869f5c96def3cef', class: "fw-semibold fs-5" }, this.formTitle), h("br", { key: 'faaf0cc27c448452a5172ad7fcfcf510ec586d2b' }), h("div", { key: '486638ad24414a05f84ada3f37a89d0cc12e7ffb', class: "row gy-3" }, h("owner-form-inputs", { key: 'bdfe7cb3305f31d93321319ef14eee3e5b331381', ownerDefaultValue: this.formController.getInitialValues(), errors: this.errors, formController: this.formController }), h("div", { key: '9e5c63e0637e0bffe5ab77a1f73c203704115479', class: "d-flex gap-2 justify-content-start" }, h(Button, { key: '85de4b69c697ebf96778f538b1535bd1fb2c43e7', variant: "secondary", type: "button", onClick: this.handleRemoveOwner, hidden: !this.showRemoveButton }, "Remove"), h(Button, { key: '1dd026432f19f84ae2142101191e511ebd62c2b3', variant: "primary", type: "submit", onClick: this.handleAddOwner, disabled: this.isLoading }, this.submitButtonText))), h("hr", { key: '2570611bbe663e2e128f03806ecb036ce750c80b' }))));
168
167
  }
169
168
  static get is() { return "owner-form-core"; }
170
169
  static get properties() {
@@ -61,8 +61,8 @@ export class AdditionalQuestionsFormStepCore {
61
61
  }
62
62
  ;
63
63
  get patchPayload() {
64
- let formValues = this.formController.values.getValue();
65
- return JSON.stringify({ additional_questions: formValues });
64
+ let formValues = new AdditionalQuestions(this.formController.values.getValue()).payload;
65
+ return { additional_questions: formValues };
66
66
  }
67
67
  componentWillLoad() {
68
68
  this.getBusiness && this.getData();
@@ -76,7 +76,7 @@ export class AdditionalQuestionsFormStepCore {
76
76
  render() {
77
77
  var _a, _b, _c, _d, _e, _f, _g;
78
78
  const additionalQuestionsDefaultValue = this.formController.getInitialValues();
79
- return (h("form", { key: 'f5a3d2826c65e84e90325000973c5cdc2922c643' }, h("fieldset", { key: '8dfecfc242e62ca523c3950b9f29e159ee8debc5' }, h("legend", { key: '192071e8d05c1d075ad79678890b47fe116577d2' }, "Additional Questions"), h("hr", { key: 'e2b7369711b4ba285522200233c5112ad5320a74' }), h("div", { key: '3ef5edae7215eb35835cfc6dd373c311ba7446a5', class: 'row gy-3' }, h("div", { key: '6af600e3612b03b505c0d2c1ddbfdb9520b9df9d', class: 'col-12 col-md-6' }, h("form-control-monetary", { key: '8afb46cdad6b2ceab63227bd6f659f7f8b2a9153', name: 'business_revenue', label: 'What is the business\u2019 estimated annual revenue from its primary business activities?', inputHandler: this.inputHandler, errorText: (_a = this.errors) === null || _a === void 0 ? void 0 : _a.business_revenue, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_revenue, maskOptions: CURRENCY_MASK.WHOLE })), h("div", { key: 'ae94caaafd45e4c46899d802337ce0a3a8d5b3aa', class: 'col-12 col-md-6' }, h("form-control-monetary", { key: '6b86e3a15934a15ecfbf7a1ac369c8ed9ee2f6a4', name: 'business_payment_volume', label: "What is the business' annual credit card & ACH volume anticipated to process?", inputHandler: this.inputHandler, errorText: (_b = this.errors) === null || _b === void 0 ? void 0 : _b.business_payment_volume, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_payment_volume, maskOptions: CURRENCY_MASK.WHOLE })), h("div", { key: '4b8fe3214082368c111183fcb1b76abf2c1ba5a1', class: 'col-12' }, h("form-control-select", { key: '88e5c2593bc1b55a797e1d67e103759c5e2e29e8', name: 'business_when_service_received', label: 'On average, how long after paying will your customers typically receive their goods or services?', inputHandler: this.inputHandler, errorText: (_c = this.errors) === null || _c === void 0 ? void 0 : _c.business_when_service_received, options: businessServiceReceivedOptions, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_when_service_received })), h("div", { key: 'a914e7114fd6fd4e44136ba8b986c20d1984dba8', class: 'col-12' }, h("form-control-select", { key: '38c9934952884a6d1dc70f4ebd61f03a87bd8091', name: 'business_recurring_payments', label: 'Does your business offer recurring payments?', inputHandler: this.inputHandler, errorText: (_d = this.errors) === null || _d === void 0 ? void 0 : _d.business_recurring_payments, options: recurringPaymentsOptions, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_recurring_payments })), h("div", { key: '7a6d2a527e7486cff7dfa1d594e2f0378e66b583', class: 'col-12' }, h("form-control-text", { key: '6e445ff593a7970967040ae5bfd3b8056e17c129', name: 'business_recurring_payments_percentage', label: 'What percent of revenue is generated from each recurring payment type offered?', inputHandler: this.inputHandler, errorText: (_e = this.errors) === null || _e === void 0 ? void 0 : _e.business_recurring_payments_percentage, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_recurring_payments_percentage })), h("div", { key: 'cf00fad8a096be8e28ef12bde563ead6f8b5ef6d', class: 'col-12' }, h("form-control-select", { key: '7cf9edd70b0ceaf25d2fd5947ecaf2760e76dd75', name: 'business_seasonal', label: 'Is this business seasonal?', inputHandler: this.inputHandler, errorText: (_f = this.errors) === null || _f === void 0 ? void 0 : _f.business_seasonal, options: seasonalBusinessOptions, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_seasonal })), h("div", { key: 'ceb6355fef7bae249330e0f39758be1812ff8cbe', class: 'col-12' }, h("form-control-text", { key: '689edc0fb02f926112c529301366e31d6d130aa6', name: 'business_other_payment_details', label: 'Is there anything else you would like us to know about how your customers pay the business?', inputHandler: this.inputHandler, errorText: (_g = this.errors) === null || _g === void 0 ? void 0 : _g.business_other_payment_details, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_other_payment_details }))))));
79
+ return (h("form", { key: '275b193388d360ab6dacfb70ea9e06d68d68cbf8' }, h("fieldset", { key: '740ce0b08ad00efa1345f69cf977e64283307533' }, h("legend", { key: '7f531cdf699ad93234bbdd5d9336ee782e770597' }, "Additional Questions"), h("hr", { key: 'cb81b0b4dc9e6a52ff9bf70571a200fee50e8146' }), h("div", { key: '9100fdb4857a5a9a2b42f0188cfac075974afbeb', class: 'row gy-3' }, h("div", { key: 'ee0885251b8e49cb33359a42897097552e9d0ff9', class: 'col-12 col-md-6' }, h("form-control-monetary", { key: '555b00e0b6728dca26a42813991f35dec41e2577', name: 'business_revenue', label: 'What is the business\u2019 estimated annual revenue from its primary business activities?', inputHandler: this.inputHandler, errorText: (_a = this.errors) === null || _a === void 0 ? void 0 : _a.business_revenue, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_revenue, maskOptions: CURRENCY_MASK.WHOLE })), h("div", { key: '689ecc46bffe9cfe7190428e191802332485f139', class: 'col-12 col-md-6' }, h("form-control-monetary", { key: '19a4269b31af12f9e07655c9dc0d9db1de46caa2', name: 'business_payment_volume', label: "What is the business' annual credit card & ACH volume anticipated to process?", inputHandler: this.inputHandler, errorText: (_b = this.errors) === null || _b === void 0 ? void 0 : _b.business_payment_volume, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_payment_volume, maskOptions: CURRENCY_MASK.WHOLE })), h("div", { key: 'f6eebbdd589cf4eb506d3d94502a027e639889d9', class: 'col-12' }, h("form-control-select", { key: '112bb7ee88335d9b8e8f9300ff190f164b750b39', name: 'business_when_service_received', label: 'On average, how long after paying will your customers typically receive their goods or services?', inputHandler: this.inputHandler, errorText: (_c = this.errors) === null || _c === void 0 ? void 0 : _c.business_when_service_received, options: businessServiceReceivedOptions, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_when_service_received })), h("div", { key: '49864b5aeca86d221cc12690e2f9976fe9ee86ef', class: 'col-12' }, h("form-control-select", { key: 'a07159d8e7e49b9b1df5bcf2dcede994d0059595', name: 'business_recurring_payments', label: 'Does your business offer recurring payments?', inputHandler: this.inputHandler, errorText: (_d = this.errors) === null || _d === void 0 ? void 0 : _d.business_recurring_payments, options: recurringPaymentsOptions, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_recurring_payments })), h("div", { key: '3a03321d7dd9202c290443d756105bb2565a3e55', class: 'col-12' }, h("form-control-text", { key: '319a5fcb7ac6e975c41cfd5b19d5de0e98504f5d', name: 'business_recurring_payments_percentage', label: 'What percent of revenue is generated from each recurring payment type offered?', inputHandler: this.inputHandler, errorText: (_e = this.errors) === null || _e === void 0 ? void 0 : _e.business_recurring_payments_percentage, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_recurring_payments_percentage })), h("div", { key: 'e108f26d04e7f9510f89ab09daab53e86f5c30e1', class: 'col-12' }, h("form-control-select", { key: '45fb9296592415ddb947b55e3c7c73d198b96fac', name: 'business_seasonal', label: 'Is this business seasonal?', inputHandler: this.inputHandler, errorText: (_f = this.errors) === null || _f === void 0 ? void 0 : _f.business_seasonal, options: seasonalBusinessOptions, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_seasonal })), h("div", { key: '0b40ac8429c07279acb3d360124853a608a01664', class: 'col-12' }, h("form-control-text", { key: '880e00acdfa51f95b643f1ecc8d6fccba1167e6c', name: 'business_other_payment_details', label: 'Is there anything else you would like us to know about how your customers pay the business?', inputHandler: this.inputHandler, errorText: (_g = this.errors) === null || _g === void 0 ? void 0 : _g.business_other_payment_details, defaultValue: additionalQuestionsDefaultValue === null || additionalQuestionsDefaultValue === void 0 ? void 0 : additionalQuestionsDefaultValue.business_other_payment_details }))))));
80
80
  }
81
81
  static get is() { return "justifi-additional-questions-form-step-core"; }
82
82
  static get properties() {
@@ -4,6 +4,7 @@ import { BusinessFormStep } from "../../utils/business-form-types";
4
4
  import { businessBankAccountSchema } from "../../schemas/business-bank-account-schema";
5
5
  import { bankAccountTypeOptions } from "../../utils/business-form-options";
6
6
  import { Api } from "../../../../api";
7
+ import { config } from "../../../../../config";
7
8
  import { numberOnlyHandler } from "../../../form/utils";
8
9
  import { BankAccount } from "../../../../api/BankAccount";
9
10
  import { ComponentErrorCodes, ComponentErrorSeverity } from "../../../../api/ComponentError";
@@ -48,7 +49,7 @@ export class BusinessBankAccountFormStep {
48
49
  try {
49
50
  const formValues = this.formController.values.getValue();
50
51
  const payload = Object.assign(Object.assign({}, formValues), { business_id: this.businessId });
51
- const response = await this.api.post(this.bankAccountEndpoint, JSON.stringify(payload));
52
+ const response = await this.api.post(this.bankAccountEndpoint, payload);
52
53
  this.handleResponse(response, onSuccess);
53
54
  }
54
55
  catch (error) {
@@ -104,7 +105,7 @@ export class BusinessBankAccountFormStep {
104
105
  ;
105
106
  componentWillLoad() {
106
107
  this.formController = new FormController(businessBankAccountSchema(this.allowOptionalFields));
107
- this.api = Api({ authToken: this.authToken, apiOrigin: PROXY_API_ORIGIN });
108
+ this.api = Api({ authToken: this.authToken, apiOrigin: config.proxyApiOrigin });
108
109
  if (this.businessId && this.authToken) {
109
110
  this.fetchData();
110
111
  }
@@ -117,7 +118,7 @@ export class BusinessBankAccountFormStep {
117
118
  }
118
119
  render() {
119
120
  const bankAccountDefaultValue = this.formController.getInitialValues();
120
- return (h("form", { key: 'bc16efe8af48103ce07d8f5c6ecb040bbb957868' }, h("fieldset", { key: 'aaada7411cd43e678be3fe14bd60462e39f54527' }, h("legend", { key: '165b78cff91b553a37e7f070a40c4941db2929df' }, "Bank Account Info"), h("hr", { key: '006315c63bd21554dfa30d763122b9c9f259aba9' }), h("div", { key: 'f080fa734567a23c43ee7123bf2718aad5f1efa1', class: "row gy-3" }, h("div", { key: '674fab37279d21761f6e588338ebdcdb9e5520aa', class: "col-12" }, h("form-control-text", { key: '68f1a9aa2200e204c4db2a36eb5f4f168ab18bab', name: "bank_name", label: "Bank Name", defaultValue: bankAccountDefaultValue.bank_name, errorText: this.errors.bank_name, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: '085f33f93096bd9ecba304715ea1c3ec879396b4', class: "col-12" }, h("form-control-text", { key: 'c684ee2722f992ed61c51f87fd2c234c7278eb21', name: "nickname", label: "Nickname", defaultValue: bankAccountDefaultValue.nickname, errorText: this.errors.nickname, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: 'c0afbdb31f2faa8f73158e659b232230099e8b9f', class: "col-12" }, h("form-control-text", { key: '3d0e3ca9794beed0c542b6ca18a01eebec48366f', name: "account_owner_name", label: "Account Owner Name", defaultValue: bankAccountDefaultValue.account_owner_name, errorText: this.errors.account_owner_name, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: '40fd8191645312efaadc633061451bd744f2a31a', class: "col-12" }, h("form-control-select", { key: '40e40cc75dcaf8ef9ba47bdf109eb14798f28436', name: "account_type", label: "Account Type", options: bankAccountTypeOptions, defaultValue: bankAccountDefaultValue.account_type, errorText: this.errors.account_type, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: '2af9c012bca9d413a5eb5b3b27f685f88137888b', class: "col-12" }, h("form-control-text", { key: '6386c601520152cb758dfe30ea7c6a8cdb1b249a', name: "account_number", label: "Account Number", defaultValue: bankAccountDefaultValue.account_number, maxLength: 17, errorText: this.errors.account_number, inputHandler: this.inputHandler, keyDownHandler: numberOnlyHandler, disabled: this.formDisabled })), h("div", { key: '8dac645db4cb8f18f4cdd138a02bc2467d2fcdd4', class: "col-12" }, h("form-control-text", { key: 'b8abe9231edd0fd07c21c9b3874e8f4f792a1eda', name: "routing_number", label: "Routing Number", defaultValue: bankAccountDefaultValue.routing_number, maxLength: 9, errorText: this.errors.routing_number, inputHandler: this.inputHandler, keyDownHandler: numberOnlyHandler, disabled: this.formDisabled }))))));
121
+ return (h("form", { key: 'c2bdcd5ab6301d1a39e4d774df101281c41e2002' }, h("fieldset", { key: '7f6b607be5b7bc5fcd0dc1687adaa1ad00d7d2e9' }, h("legend", { key: '91b68746c65bb68f4fbd2eef151258e6915f8e35' }, "Bank Account Info"), h("hr", { key: '5eceedbf59faef10757c9e2b04d4dc4cd6b88a9b' }), h("div", { key: 'd3185db7fceb9851ccb44c1c89f8cbe5a37c24e0', class: "row gy-3" }, h("div", { key: '625caf0e9b93c244d94c69174ffff57126d39fa1', class: "col-12" }, h("form-control-text", { key: 'ddf3206b09047dfea56df850babe6c8f92ed33ee', name: "bank_name", label: "Bank Name", defaultValue: bankAccountDefaultValue.bank_name, errorText: this.errors.bank_name, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: 'd7d498353eec8e1947ce748aa35cbee63e793817', class: "col-12" }, h("form-control-text", { key: 'a80050dcd088db0209c2e5da65b310d7fc7877f5', name: "nickname", label: "Nickname", defaultValue: bankAccountDefaultValue.nickname, errorText: this.errors.nickname, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: 'ea5578470e0e4d0fd5b973807475a02c7764c9c8', class: "col-12" }, h("form-control-text", { key: 'dd8c77b43ddfca61cfd5ed39ce6e142654f18d9f', name: "account_owner_name", label: "Account Owner Name", defaultValue: bankAccountDefaultValue.account_owner_name, errorText: this.errors.account_owner_name, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: 'cb3256226c5fdfa5ff2a02c456a6c384e06d16a6', class: "col-12" }, h("form-control-select", { key: 'a865f48350a0ae6b6a2a540dc2d54de72a8af074', name: "account_type", label: "Account Type", options: bankAccountTypeOptions, defaultValue: bankAccountDefaultValue.account_type, errorText: this.errors.account_type, inputHandler: this.inputHandler, disabled: this.formDisabled })), h("div", { key: 'aa9062a25dade06db1f175d4233f2e5bb4e7ecd7', class: "col-12" }, h("form-control-text", { key: '1a87920e4df50178625446c770e4182d918664c7', name: "account_number", label: "Account Number", defaultValue: bankAccountDefaultValue.account_number, maxLength: 17, errorText: this.errors.account_number, inputHandler: this.inputHandler, keyDownHandler: numberOnlyHandler, disabled: this.formDisabled })), h("div", { key: 'c72858a29aa1289b367c0eb89d6cc0eded23346d', class: "col-12" }, h("form-control-text", { key: 'b7fb93bcf16c01689245d5aca11142b013fe6adc', name: "routing_number", label: "Routing Number", defaultValue: bankAccountDefaultValue.routing_number, maxLength: 9, errorText: this.errors.routing_number, inputHandler: this.inputHandler, keyDownHandler: numberOnlyHandler, disabled: this.formDisabled }))))));
121
122
  }
122
123
  static get is() { return "justifi-business-bank-account-form-step"; }
123
124
  static get properties() {
@@ -4,8 +4,6 @@ import { FormController } from "../../../form/form";
4
4
  import { CoreBusinessInfo } from "../../../../api/Business";
5
5
  import { businessClassificationOptions } from "../../utils/business-form-options";
6
6
  import { PHONE_MASKS } from "../../../../utils/form-input-masks";
7
- import { parseCoreInfo } from "../../utils/payload-parsers";
8
- import { flattenNestedObject } from "../../../../utils/utils";
9
7
  import { numberOnlyHandler } from "../../../form/utils";
10
8
  export class BusinessCoreInfoFormStepCore {
11
9
  constructor() {
@@ -65,8 +63,8 @@ export class BusinessCoreInfoFormStepCore {
65
63
  }
66
64
  ;
67
65
  get patchPayload() {
68
- let formValues = parseCoreInfo(flattenNestedObject(this.formController.values.getValue()));
69
- return JSON.stringify(formValues);
66
+ let formValues = new CoreBusinessInfo(this.formController.values.getValue()).payload;
67
+ return formValues;
70
68
  }
71
69
  componentWillLoad() {
72
70
  this.getBusiness && this.getData();
@@ -79,7 +77,7 @@ export class BusinessCoreInfoFormStepCore {
79
77
  }
80
78
  render() {
81
79
  const coreInfoDefaultValue = this.formController.getInitialValues();
82
- return (h("form", { key: 'c91c42a7b3d48789f2304f6f3e7b9cab228e7e86' }, h("fieldset", { key: '159f23468da4ed60e89be108c3640c3e4f19a32a' }, h("legend", { key: '7666498459afce82b88114c880dba4f697ec422e' }, "General Info"), h("hr", { key: 'f9d253d811ba1f9b7438888f5c2e9813fb6371a9' }), h("div", { key: '9bc73f86956d81ed4028cabb4ec083e7524ad973', class: 'row gy-3' }, h("div", { key: '86bc9d41f88ee46e727a11b6371ecdb7d9dac6f3', class: 'col-12' }, h("form-control-text", { key: '2f470cdd65f25993a2671f1ab1938a214acfa625', name: 'legal_name', label: 'Legal Name', defaultValue: coreInfoDefaultValue.legal_name, errorText: this.errors.legal_name, inputHandler: this.inputHandler })), h("div", { key: '38af9153a77c6f121a2f1af626a325a525b8be36', class: 'col-12' }, h("form-control-text", { key: '5912ab4555f9522f973ef67240249fb44e89bcab', name: 'doing_business_as', label: 'Doing Business As (DBA)', defaultValue: coreInfoDefaultValue.doing_business_as, errorText: this.errors.doing_business_as, inputHandler: this.inputHandler })), h("div", { key: 'a48d44f28b473c3873aa16468a01f45f46e99c5e', class: 'col-12 col-md-8' }, h("form-control-select", { key: '7fa00ac1122a43fd1645dd81c6d9fbaf6b10131d', name: 'classification', label: 'Business Classification', options: businessClassificationOptions, defaultValue: coreInfoDefaultValue.classification, errorText: this.errors.classification, inputHandler: this.inputHandler })), h("div", { key: 'cd4e235392581af33d79d0eeb7a950fe51291bb4', class: 'col-12 col-md-4' }, h("form-control-date", { key: '43f65e71b7ea53fb82f8a97d4160b3df9b1ceacf', name: 'date_of_incorporation', label: 'Date of Incorporation', defaultValue: coreInfoDefaultValue.date_of_incorporation, errorText: this.errors.date_of_incorporation, inputHandler: this.inputHandler })), h("div", { key: '37ba3bc3731eec0281ab6c4ae942649ac25e4eba', class: 'col-12 col-md-6' }, h("form-control-text", { key: 'b48172d98fd70130fe60c47f31b077e8644ed2e7', name: 'industry', label: 'Industry', defaultValue: coreInfoDefaultValue.industry, errorText: this.errors.industry, inputHandler: this.inputHandler })), h("div", { key: '3212bfe272b22b896ef6602f639b2779ace36857', class: 'col-12 col-md-6' }, h("form-control-text", { key: '523a2e4b1df12723e936f224ad1518d657acc38e', name: 'tax_id', label: 'Tax ID (EIN or SSN)', defaultValue: coreInfoDefaultValue.tax_id, errorText: this.errors.tax_id, inputHandler: this.inputHandler, keyDownHandler: numberOnlyHandler, maxLength: 9 })), h("div", { key: '4018cec1595a3c2b92d92faaec10c6c917364721', class: 'col-12' }, h("form-control-text", { key: 'f5dfb03af25b7eeeb1720191acff2fff510b8114', name: 'website_url', label: 'Website URL', defaultValue: coreInfoDefaultValue.website_url, errorText: this.errors.website_url, inputHandler: this.inputHandler })), h("div", { key: '3dbe9c55e93c35b68d6783f4dd73dab45970289b', class: 'col-12 col-md-6' }, h("form-control-text", { key: '5de21e1a7c0647b4fe6e66b51a32288c96ae82a7', name: 'email', label: 'Email Address', defaultValue: coreInfoDefaultValue.email, errorText: this.errors.email, inputHandler: this.inputHandler })), h("div", { key: '93c06e619ea76c69eb7723c3d050edfb0539635d', class: 'col-12 col-md-6' }, h("form-control-number-masked", { key: '4dc5a4ee1bb04075ee20d58e87fec1711b0683a8', name: 'phone', label: 'Phone Number', defaultValue: coreInfoDefaultValue.phone, errorText: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US }))))));
80
+ return (h("form", { key: 'ab0ae9821e19c2a2d1e87ce16b23cfe56bafb31b' }, h("fieldset", { key: 'eec949b50436218cee02c6410c34959a6b10ebf8' }, h("legend", { key: '34b37dddcb967275ddd3d561dd2931b74103c0ce' }, "General Info"), h("hr", { key: 'af37f3171790265c3b7d22d2328c31842c5a12ea' }), h("div", { key: 'ba4780eec04a8b34f644895913e99ea49c587f81', class: 'row gy-3' }, h("div", { key: '8109ee7485afc5a5ee3e38c947ef9387cab5daa4', class: 'col-12' }, h("form-control-text", { key: '885bc9f67fc4738cb5abc6165bf1f6f5b3382a90', name: 'legal_name', label: 'Legal Name', defaultValue: coreInfoDefaultValue.legal_name, errorText: this.errors.legal_name, inputHandler: this.inputHandler })), h("div", { key: '453b4e25b812015a50f72e76159111818d0065f5', class: 'col-12' }, h("form-control-text", { key: 'a63ec6c1e936ab1104b92e6fdd5f6a350559009c', name: 'doing_business_as', label: 'Doing Business As (DBA)', defaultValue: coreInfoDefaultValue.doing_business_as, errorText: this.errors.doing_business_as, inputHandler: this.inputHandler })), h("div", { key: '8a39b25c7d9c414569e22e73a98d7b136b0623dd', class: 'col-12 col-md-8' }, h("form-control-select", { key: '41d6d3a45431953746e86a5aea6ebb0a39674009', name: 'classification', label: 'Business Classification', options: businessClassificationOptions, defaultValue: coreInfoDefaultValue.classification, errorText: this.errors.classification, inputHandler: this.inputHandler })), h("div", { key: 'd98e5f2ee6e7d3ddc23ba5501db4f698cc88ba40', class: 'col-12 col-md-4' }, h("form-control-date", { key: '4ea36622261e3a649b934700ee676c062789c519', name: 'date_of_incorporation', label: 'Date of Incorporation', defaultValue: coreInfoDefaultValue.date_of_incorporation, errorText: this.errors.date_of_incorporation, inputHandler: this.inputHandler })), h("div", { key: '8617887e16cbc3a40b0c1ab56597d7098c7ac62f', class: 'col-12 col-md-6' }, h("form-control-text", { key: '9357ddb686194100fe705111bbc965c2956dddb4', name: 'industry', label: 'Industry', defaultValue: coreInfoDefaultValue.industry, errorText: this.errors.industry, inputHandler: this.inputHandler })), h("div", { key: '968b0f492f354279736b531295a1e4813a5de0b0', class: 'col-12 col-md-6' }, h("form-control-text", { key: 'd082445d9f876794e525839fb35457f114e89dac', name: 'tax_id', label: 'Tax ID (EIN or SSN)', defaultValue: coreInfoDefaultValue.tax_id, errorText: this.errors.tax_id, inputHandler: this.inputHandler, keyDownHandler: numberOnlyHandler, maxLength: 9 })), h("div", { key: 'a0e041bb3fa323e378d2b9730dd9055c9ecf1dfc', class: 'col-12' }, h("form-control-text", { key: '4994efe8c6cb5faf84accd0f2965b508d084144e', name: 'website_url', label: 'Website URL', defaultValue: coreInfoDefaultValue.website_url, errorText: this.errors.website_url, inputHandler: this.inputHandler })), h("div", { key: '0f7f1548e704095aaef9d4fccd7c81284ff7bbed', class: 'col-12 col-md-6' }, h("form-control-text", { key: 'e1cffd24b03e5e3655649b68900c74fcc89513c5', name: 'email', label: 'Email Address', defaultValue: coreInfoDefaultValue.email, errorText: this.errors.email, inputHandler: this.inputHandler })), h("div", { key: '1732635477c58d1f57aa5b8dc0c560ae0c215501', class: 'col-12 col-md-6' }, h("form-control-number-masked", { key: '04979d08463efc69557b782fda772702935349a7', name: 'phone', label: 'Phone Number', defaultValue: coreInfoDefaultValue.phone, errorText: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US }))))));
83
81
  }
84
82
  static get is() { return "justifi-business-core-info-form-step-core"; }
85
83
  static get properties() {
@@ -37,7 +37,7 @@ export class BusinessOwnersFormStepCore {
37
37
  let submittedData;
38
38
  this.formLoading.emit(true);
39
39
  this.patchBusiness({
40
- payload: JSON.stringify({ owners: this.ownersPayload }),
40
+ payload: { owners: this.ownersPayload },
41
41
  onSuccess: (response) => {
42
42
  submittedData = response;
43
43
  onSuccess();
@@ -111,9 +111,9 @@ export class BusinessOwnersFormStepCore {
111
111
  this.ownersPayload = updatedOwners;
112
112
  }
113
113
  render() {
114
- return (h("div", { key: '5958d46ae5bc3abb7a82f5c67c597be46898284e' }, h("legend", { key: 'e10085a37e93b96901187e0a926127167ca6dbc5' }, "Owners"), h("hr", { key: 'eb7f84185271c80b87397e49f2ee5c6e20faad99' }), h("div", { key: '0f791f3d3f6c7f6aa363004d0618bd90e16f185b', class: 'row gy-3' }, this.ownersPayload.map((owner) => {
114
+ return (h("div", { key: 'f2358952d2d28841fb8e6bc66e9846eb2cdcc97e' }, h("legend", { key: 'ab3f7e6758cc50760681a9fdd07f8e137da65980' }, "Owners"), h("hr", { key: '57828746f9991da89e77a1f96b51f6df2d33d666' }), h("div", { key: '4f7f58bf1b5d40079228eef118946e17b407db63', class: 'row gy-3' }, this.ownersPayload.map((owner) => {
115
115
  return (h("justifi-owner-form", { key: owner.id, authToken: this.authToken, businessId: this.businessId, ownerId: owner.id, removeOwner: this.removeOwnerForm, newFormOpen: this.newFormOpen, ownersLength: this.ownersPayload.length, allowOptionalFields: this.allowOptionalFields, ref: (ref) => this.matchRef(ref, owner.id) }));
116
- })), h("div", { key: 'd1f6414e9213d9600eaea7e9c1e033d250f8e49a', class: 'd-flex justify-content-start' }, h("div", { key: 'fd96248f6dddfa0d973744d11e3f1f121353e398', class: 'gap-2' }, h(Button, { key: '514e549632c8f11b4b51c061949b026734ae0113', variant: 'primary', onClick: () => this.addOwnerForm(true), hidden: !this.showAddOwnerButton }, "Add Owner")))));
116
+ })), h("div", { key: '88dad43cc24d7c1e1220acb6b7791c2172074d61', class: 'd-flex justify-content-start' }, h("div", { key: '9359481d78e5c3ba9599d2fce5837c5fdfe1d6f0', class: 'gap-2' }, h(Button, { key: '04ee1c49c34567b079432df8fb2b1b298fb7d7a3', variant: 'primary', onClick: () => this.addOwnerForm(true), hidden: !this.showAddOwnerButton }, "Add Owner")))));
117
117
  }
118
118
  static get is() { return "justifi-business-owners-form-step-core"; }
119
119
  static get properties() {
@@ -1,6 +1,5 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { Representative } from "../../../../api/Identity";
3
- import { parseIdentityInfo } from "../../utils/payload-parsers";
4
3
  import { FormController } from "../../../form/form";
5
4
  import { identitySchema } from "../../schemas/business-identity-schema";
6
5
  export class BusinessRepresentativeFormStepCore {
@@ -56,8 +55,8 @@ export class BusinessRepresentativeFormStepCore {
56
55
  this.formController.validateAndSubmit(() => this.sendData(onSuccess));
57
56
  }
58
57
  get patchPayload() {
59
- let formValues = parseIdentityInfo(this.formController.values.getValue());
60
- return JSON.stringify({ representative: formValues });
58
+ let formValues = new Representative(this.formController.values.getValue()).payload;
59
+ return { representative: formValues };
61
60
  }
62
61
  componentWillLoad() {
63
62
  this.getBusiness && this.getData();
@@ -69,7 +68,7 @@ export class BusinessRepresentativeFormStepCore {
69
68
  });
70
69
  }
71
70
  render() {
72
- return (h("justifi-business-representative-form-inputs", { key: 'bfe9944ea9fc78fda577944f2c968ab9decf7f00', representativeDefaultValue: this.formController.getInitialValues(), errors: this.errors, formController: this.formController }));
71
+ return (h("justifi-business-representative-form-inputs", { key: '855736c2c1565b0b9e2cf57131a72298ccc889d5', representativeDefaultValue: this.formController.getInitialValues(), errors: this.errors, formController: this.formController }));
73
72
  }
74
73
  static get is() { return "justifi-business-representative-form-step-core"; }
75
74
  static get properties() {
@@ -3,6 +3,7 @@ import { FormController } from "../../../form/form";
3
3
  import { BusinessFormStep } from "../../utils/business-form-types";
4
4
  import { Business } from "../../../../api/Business";
5
5
  import Api from "../../../../api/Api";
6
+ import { config } from "../../../../../config";
6
7
  import { businessDocumentSchema } from "../../schemas/business-document-upload-schema";
7
8
  import { EntityDocument, EntityDocumentStorage } from "../../../../api/Document";
8
9
  import { ComponentErrorCodes, ComponentErrorSeverity } from "../../../../api/ComponentError";
@@ -46,7 +47,7 @@ export class BusinessDocumentFormStep {
46
47
  this.formLoading.emit(true);
47
48
  const payload = docData.record_data;
48
49
  try {
49
- const response = await this.api.post(this.documentEndpoint, JSON.stringify(payload));
50
+ const response = await this.api.post(this.documentEndpoint, payload);
50
51
  return this.handleDocRecordResponse(docData, response);
51
52
  }
52
53
  catch (error) {
@@ -145,7 +146,7 @@ export class BusinessDocumentFormStep {
145
146
  return 'entities/document';
146
147
  }
147
148
  componentWillLoad() {
148
- this.api = Api({ authToken: this.authToken, apiOrigin: PROXY_API_ORIGIN });
149
+ this.api = Api({ authToken: this.authToken, apiOrigin: config.proxyApiOrigin });
149
150
  if (this.businessId && this.authToken) {
150
151
  this.fetchData();
151
152
  }
@@ -178,7 +179,7 @@ export class BusinessDocumentFormStep {
178
179
  return (h("justifi-business-document-upload-input-group", { paymentVolume: this.paymentVolume, inputHandler: this.inputHandler, storeFiles: this.storeFiles, errors: this.errors }));
179
180
  }
180
181
  render() {
181
- return (h("form", { key: '4905c2dacbca9b1390fd7e316993be5d33117ee5' }, h("fieldset", { key: '22dc71452b1917be0d9dc237b1ac27739b922e65' }, h("legend", { key: '7c705b2b00a13f7fe690b2e5169dd1809934f892' }, "Document Uploads"), h("p", { key: 'e0ad37456d88496a589c1c79e8e3e9a0fc101577' }, "Various file formats such as PDF, DOC, DOCX, JPEG, and others are accepted. Multiple files can be uploaded for each document category."), h("hr", { key: '4ac6afc1c6ce6c6e81d4fcf05ee1c5c58b66f520' }), this.documentsOnFile, h("div", { key: 'bf8aa49a47a2d53f5c0a1179474d8dd885a5a363', class: "d-flex flex-column" }, this.formInputs))));
182
+ return (h("form", { key: '38bb9070ca04f773ec092ebb14ce8ad20f33d8cf' }, h("fieldset", { key: '9c736d11200bb9c5a37c1319f3bfb349b7a5e93f' }, h("legend", { key: '92ed2fb864e85e38532af364518c25ef4bd275a5' }, "Document Uploads"), h("p", { key: 'f5803df74a5d0bc4e544c6cc968333f2a3f77385' }, "Various file formats such as PDF, DOC, DOCX, JPEG, and others are accepted. Multiple files can be uploaded for each document category."), h("hr", { key: '0c696d1bdb614bdacb3cbadeee66c95149efda68' }), this.documentsOnFile, h("div", { key: '7919205dfda677526d810a9fa1507ed8a55eafb8', class: "d-flex flex-column" }, this.formInputs))));
182
183
  }
183
184
  static get is() { return "justifi-business-document-upload-form-step"; }
184
185
  static get properties() {
@@ -3,7 +3,6 @@ import { addressSchema } from "../../schemas/business-address-schema";
3
3
  import { FormController } from "../../../form/form";
4
4
  import { Address } from "../../../../api/Business";
5
5
  import StateOptions from "../../../../utils/state-options";
6
- import { parseAddressInfo } from "../../utils/payload-parsers";
7
6
  import { numberOnlyHandler } from "../../../form/utils";
8
7
  export class LegalAddressFormStepCore {
9
8
  constructor() {
@@ -62,8 +61,8 @@ export class LegalAddressFormStepCore {
62
61
  }
63
62
  ;
64
63
  get patchPayload() {
65
- let formValues = parseAddressInfo(this.formController.values.getValue());
66
- return JSON.stringify({ legal_address: formValues });
64
+ let formValues = new Address(this.formController.values.getValue()).payload;
65
+ return { legal_address: formValues };
67
66
  }
68
67
  componentWillLoad() {
69
68
  this.getBusiness && this.getData();
@@ -77,7 +76,7 @@ export class LegalAddressFormStepCore {
77
76
  render() {
78
77
  var _a, _b, _c, _d, _e, _f;
79
78
  const legalAddressDefaultValue = this.formController.getInitialValues();
80
- return (h("form", { key: 'ef8d88ebced702b5a0b89eaddb22320f24e7081f' }, h("fieldset", { key: '9f70633b36559e6f8de8d67f39a19df365116bcd' }, h("legend", { key: '6b6b0e42fd0f00a28d24bf9d1e4818e54264ff96' }, "Business Legal Address"), h("hr", { key: '8b7b1a9f0f9448c4fd3b918f20e7b51337d3e5ee' }), h("div", { key: 'f45b643ec057356d9a6e04a19829c562ec521bd2', class: 'row gy-3' }, h("div", { key: 'f115c4e4163126d2d8c998c8de775821e7fc0e65', class: 'col-12' }, h("form-control-text", { key: '066a1ea25ef086dda05e32cde738e7e77dcbb322', name: 'line1', label: 'Legal Address', inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.line1, errorText: (_a = this.errors) === null || _a === void 0 ? void 0 : _a.line1 })), h("div", { key: 'e8432ea00cd5da5b08cc97efe8f3a9817a14b5b1', class: 'col-12' }, h("form-control-text", { key: '099ab7197940d5de8869682cbda41dc0d6ee0e1d', name: 'line2', label: 'Address Line 2', inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.line2, errorText: (_b = this.errors) === null || _b === void 0 ? void 0 : _b.line2 })), h("div", { key: '9514757f732d6a445e48eb85d3654f79cf2320db', class: 'col-12' }, h("form-control-text", { key: '37db927ef6c735699a4954ad51d43f4666eea9a0', name: 'city', label: 'City', inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.city, errorText: (_c = this.errors) === null || _c === void 0 ? void 0 : _c.city })), h("div", { key: 'f3c82def0d67fcc0d7e4ca03e80afc166a36ffbb', class: 'col-12' }, h("form-control-select", { key: 'cbcfafe876997e0f9181cf117eeaf465ca424c68', name: 'state', label: 'State', options: StateOptions, inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.state, errorText: (_d = this.errors) === null || _d === void 0 ? void 0 : _d.state })), h("div", { key: '4f32ffbe520d1fbe2406d41e7fb76a9f0f450299', class: 'col-12' }, h("form-control-text", { key: '5a2fcc4726b543e8ef6c5456e965cc479d91ce4e', name: 'postal_code', label: 'Postal Code', inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.postal_code, errorText: (_e = this.errors) === null || _e === void 0 ? void 0 : _e.postal_code, maxLength: 5, keyDownHandler: numberOnlyHandler })), h("div", { key: 'd4bdbfa4d3999bae59b812e84394bb4c0974d6b3', class: 'col-12' }, h("form-control-select", { key: '95eec216f50d119016c7627074bf29b9a21b1cd1', name: 'country', label: 'Country', options: [{ label: 'United States', value: 'USA' }], inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.country, errorText: (_f = this.errors) === null || _f === void 0 ? void 0 : _f.country,
79
+ return (h("form", { key: '5a95fe5a130deded7e160e6fe4ba1d09e6a6aabc' }, h("fieldset", { key: '2011fac5c860b7beee5eaac28e697b284067f2e6' }, h("legend", { key: 'dbe411d80d10a71bc63f18fcdb58a40b124e8eaf' }, "Business Legal Address"), h("hr", { key: '4a91dd5e67e5770778d2dd59716e1e532d644ee9' }), h("div", { key: 'cd53516a98498ab82ab347a1f7c836be262b9fdb', class: 'row gy-3' }, h("div", { key: '14cd5fee5661681ccff95eabf8cd6f2d4cff2296', class: 'col-12' }, h("form-control-text", { key: 'e4b0a5e30fc1a35e5127a76710211874fb68898b', name: 'line1', label: 'Legal Address', inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.line1, errorText: (_a = this.errors) === null || _a === void 0 ? void 0 : _a.line1 })), h("div", { key: '2c35da509732e73e2abb4365d6d9e2056d7ce771', class: 'col-12' }, h("form-control-text", { key: 'c8ae2a5c75d0fe8c5ddd46d9150590b8a4f99a5e', name: 'line2', label: 'Address Line 2', inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.line2, errorText: (_b = this.errors) === null || _b === void 0 ? void 0 : _b.line2 })), h("div", { key: '07649ebd5a848eee63398965c30e8e30fcc88354', class: 'col-12' }, h("form-control-text", { key: 'cb25047c3458124f7d837b7948e807214f1a0a0a', name: 'city', label: 'City', inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.city, errorText: (_c = this.errors) === null || _c === void 0 ? void 0 : _c.city })), h("div", { key: 'ce3ddc5f3639503dbc02668aea7139ffff376545', class: 'col-12' }, h("form-control-select", { key: '00d18b4af1f415828b40404888a6c69d0611d0cc', name: 'state', label: 'State', options: StateOptions, inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.state, errorText: (_d = this.errors) === null || _d === void 0 ? void 0 : _d.state })), h("div", { key: '1988bd739af107d9595f6fed897f257da13ac997', class: 'col-12' }, h("form-control-text", { key: '55144c39845d4cc36704170b73458f761f311d00', name: 'postal_code', label: 'Postal Code', inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.postal_code, errorText: (_e = this.errors) === null || _e === void 0 ? void 0 : _e.postal_code, maxLength: 5, keyDownHandler: numberOnlyHandler })), h("div", { key: 'cccba799a75280693f461f390121b13006877f35', class: 'col-12' }, h("form-control-select", { key: 'e49b21a781280fb2e9cc9f6b88ddcc6d7408c5f8', name: 'country', label: 'Country', options: [{ label: 'United States', value: 'USA' }], inputHandler: this.inputHandler, defaultValue: legalAddressDefaultValue === null || legalAddressDefaultValue === void 0 ? void 0 : legalAddressDefaultValue.country, errorText: (_f = this.errors) === null || _f === void 0 ? void 0 : _f.country,
81
80
  // just for now so we skip handling country specificities
82
81
  disabled: true }))))));
83
82
  }
@@ -4,6 +4,7 @@ import { ComponentErrorCodes, ComponentErrorSeverity } from "../../../api/Compon
4
4
  import { makeGetBusiness, makePostProvisioning } from "./payment-provisioning-actions";
5
5
  import { BusinessService } from "../../../api/services/business.service";
6
6
  import { ProvisionService } from "../../../api/services/provision.service";
7
+ import { checkPkgVersion } from "../../../utils/check-pkg-version";
7
8
  /**
8
9
  * @exportedPart label: Label for inputs
9
10
  * @exportedPart input: The input fields
@@ -22,6 +23,7 @@ export class PaymentProvisioning {
22
23
  this.initializeApi();
23
24
  }
24
25
  componentWillLoad() {
26
+ checkPkgVersion();
25
27
  this.analytics = new JustifiAnalytics(this);
26
28
  this.initializeApi();
27
29
  }
@@ -51,7 +53,7 @@ export class PaymentProvisioning {
51
53
  }
52
54
  }
53
55
  render() {
54
- return (h("justifi-payment-provisioning-core", { key: 'a93ee23fabf4bdeb381e924bfdf684ddd183075a', businessId: this.businessId, authToken: this.authToken, allowOptionalFields: this.allowOptionalFields, formTitle: this.formTitle, getBusiness: this.getBusiness, postProvisioning: this.postProvisioning }));
56
+ return (h("justifi-payment-provisioning-core", { key: '82b3601d3349a92bed1aa93e2a847039d7493c04', businessId: this.businessId, authToken: this.authToken, allowOptionalFields: this.allowOptionalFields, formTitle: this.formTitle, getBusiness: this.getBusiness, postProvisioning: this.postProvisioning }));
55
57
  }
56
58
  static get is() { return "justifi-payment-provisioning"; }
57
59
  static get properties() {
@@ -1,6 +1,7 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { FormController } from "../../../form/form";
3
3
  import { BusinessFormStep } from "../../utils/business-form-types";
4
+ import { config } from "../../../../../config";
4
5
  import { businessTermsConditionsSchema } from "../../schemas/business-terms-conditions-schema";
5
6
  import { Api } from "../../../../api";
6
7
  import { ComponentErrorCodes, ComponentErrorSeverity } from "../../../../api/ComponentError";
@@ -27,7 +28,7 @@ export class BusinessTermsConditionsFormStep {
27
28
  this.sendData = async (onSuccess) => {
28
29
  this.formLoading.emit(true);
29
30
  try {
30
- const payload = JSON.stringify(this.termsPayload);
31
+ const payload = this.termsPayload;
31
32
  const response = await this.api.post(this.termsConditionsEndpoint, payload);
32
33
  this.handleResponse(response, onSuccess);
33
34
  }
@@ -70,7 +71,7 @@ export class BusinessTermsConditionsFormStep {
70
71
  };
71
72
  }
72
73
  async componentWillLoad() {
73
- this.api = Api({ authToken: this.authToken, apiOrigin: PROXY_API_ORIGIN });
74
+ this.api = Api({ authToken: this.authToken, apiOrigin: config.proxyApiOrigin });
74
75
  this.formController = new FormController(businessTermsConditionsSchema(this.allowOptionalFields));
75
76
  if (this.businessId && this.authToken) {
76
77
  this.fetchData();
@@ -106,7 +107,7 @@ export class BusinessTermsConditionsFormStep {
106
107
  });
107
108
  }
108
109
  render() {
109
- return (h("form", { key: 'e7eb6730d5b975ae91057a5218ed062a23d3f0ef' }, h("fieldset", { key: '9dc69375e2c988dc11c4e76f757bde1fe18febea' }, h("legend", { key: '0202cf805071e011f0c087f244c0a43191632b7c' }, "Terms and Conditions"), h("hr", { key: 'a38e7b058d4269406c929abf4f57ddcdc16aa4fd' }), h("justifi-business-terms-conditions-text", { key: '8b87b016198c87c3c52c3e280353489573aff90c' }), h("br", { key: '6c7107e3975a40e44ba4375025ebea0e811630fe' }), h("div", { key: '3667f0455c95bc0d22472598eb2ca3cd7093b9d5', class: "row-gy-3" }, h("div", { key: '1169946dc47b48cd2f8f1a2adfa9ff9b149447f1', class: "col-12" }, h("form-control-checkbox", { key: '66942238443b1e27bb3902ddeba0f6fce973b319', name: "accepted", label: "I agree to the terms and conditions", inputHandler: this.inputHandler, errorText: this.errors.accepted, disabled: this.acceptedTermsBefore, helpText: this.formHelperText }))))));
110
+ return (h("form", { key: 'a292e2b1b69d152009000d9e7009e5ab07698bc8' }, h("fieldset", { key: '30843e9ed0029f64abcf076512af82974dd99598' }, h("legend", { key: '6453679a074056668bdd93cb91d2d725b73fb0da' }, "Terms and Conditions"), h("hr", { key: '6a44c1128e3dceb770b16533aa61fb5e81f5dda2' }), h("justifi-business-terms-conditions-text", { key: '714c9f81c1d1f91712a276259acf4eb6734b40d4' }), h("br", { key: '5e955908e53af5ade77fca9f2a47e8a9d10e7ad8' }), h("div", { key: '7c6ca9d2634c7cc6988292ffedf86b64c3865557', class: "row-gy-3" }, h("div", { key: 'e8f01c4bdcc07e0063e3b8f5f1acbabc9b3310f7', class: "col-12" }, h("form-control-checkbox", { key: 'e09eeb02dc30a9461e958bf43685d2c58f4a608f', name: "accepted", label: "I agree to the terms and conditions", inputHandler: this.inputHandler, errorText: this.errors.accepted, disabled: this.acceptedTermsBefore, helpText: this.formHelperText }))))));
110
111
  }
111
112
  static get is() { return "justifi-business-terms-conditions-form-step"; }
112
113
  static get properties() {
@@ -21,7 +21,7 @@ export const businessClassificationOptions = [
21
21
  value: BusinessClassification.public_company,
22
22
  },
23
23
  {
24
- label: 'Limited',
24
+ label: 'Limited Liability Company (LLC)',
25
25
  value: BusinessClassification.limited,
26
26
  },
27
27
  {
@@ -1,9 +1,10 @@
1
1
  import { h } from "@stencil/core";
2
+ import { config } from "../../../config";
2
3
  import JustifiAnalytics from "../../api/Analytics";
3
4
  export class CardForm {
4
5
  constructor() {
5
6
  this.validationMode = undefined;
6
- this.iframeOrigin = IFRAME_ORIGIN;
7
+ this.iframeOrigin = config.iframeOrigin;
7
8
  this.singleLine = false;
8
9
  this.internalStyleOverrides = undefined;
9
10
  }
@@ -56,7 +57,7 @@ export class CardForm {
56
57
  return this.childRef.resize();
57
58
  }
58
59
  render() {
59
- return (h("justifi-payment-method-form", { key: 'cc0ad5d8a262ff5c8422d247caed469a8dea3488', ref: el => {
60
+ return (h("justifi-payment-method-form", { key: '58843b8a47f35d716845de11f6a66d8960bc0776', ref: el => {
60
61
  if (el) {
61
62
  this.childRef = el;
62
63
  }
@@ -98,7 +99,7 @@ export class CardForm {
98
99
  },
99
100
  "attribute": "iframe-origin",
100
101
  "reflect": false,
101
- "defaultValue": "IFRAME_ORIGIN"
102
+ "defaultValue": "config.iframeOrigin"
102
103
  },
103
104
  "singleLine": {
104
105
  "type": "boolean",
@@ -1,5 +1,6 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { formatCurrency } from "../../utils/utils";
3
+ import { config } from "../../../config";
3
4
  import { Checkout } from "../../api/Checkout";
4
5
  import { ComponentErrorSeverity } from "../../api/ComponentError";
5
6
  import { insuranceValues, insuranceValuesOn, validateInsuranceValues } from "../insurance/insurance-state";
@@ -26,7 +27,7 @@ export class CheckoutCore {
26
27
  });
27
28
  this.renderState = 'error';
28
29
  };
29
- this.iframeOrigin = IFRAME_ORIGIN;
30
+ this.iframeOrigin = config.iframeOrigin;
30
31
  this.authToken = undefined;
31
32
  this.getCheckout = undefined;
32
33
  this.complete = undefined;
@@ -46,7 +47,6 @@ export class CheckoutCore {
46
47
  this.paymentMethodOptionsRef.fillBillingForm(fields);
47
48
  }
48
49
  componentWillLoad() {
49
- console.log('CheckoutCore: componentWillLoad iframeOrigin', this, this.iframeOrigin);
50
50
  if (this.getCheckout) {
51
51
  this.fetchData();
52
52
  // Refresh the checkout data when insurance is added or removed
@@ -123,7 +123,7 @@ export class CheckoutCore {
123
123
  return (h("section", null, h("div", { class: !this.isLoading && 'visually-hidden' }, h(Skeleton, { height: "24px" })), h("div", { class: this.isLoading && 'visually-hidden' }, h("div", { class: "jfi-payment-description" }, (_a = this.checkout) === null || _a === void 0 ? void 0 : _a.payment_description), h("div", { class: "jfi-payment-total" }, h("span", { class: "jfi-payment-total-label" }, "Total"), "\u00A0", h("span", { class: "jfi-payment-total-amount" }, formatCurrency(+((_b = this.checkout) === null || _b === void 0 ? void 0 : _b.total_amount)))))));
124
124
  }
125
125
  render() {
126
- return (h(StyledHost, { key: '991ae6970e426028ace0d1e8327119bc197639b0' }, h("div", { key: '1e57ee21429b494240e644235a2d5815ced99d43', class: "row gy-3 jfi-checkout-core" }, h("div", { key: '70023ce10dea6ff8d5bd8e30c7d474f774682c65', class: "col-12" }, h("h2", { key: '8b09b03c1998e4d60e174fefb3d196e48d50b84a', class: "fs-5 fw-bold pb-3 jfi-header" }, "Summary"), this.summary), h("div", { key: 'e3bbdaaaf010451a31fe9c60bdf81e89bdd142f2', class: "col-12" }, h("slot", { key: '442a01184960f42b5e1f6694798633d3e7219bf5', name: "insurance" })), h("div", { key: '716e26e3dc675e9d72a3a992b1cb212ce48ffb1a', class: "col-12 mt-4" }, h("h2", { key: '762cfc8549b20d16583d0fd8748bde8035042c00', class: "fs-5 fw-bold pb-3 jfi-header" }, "Payment"), h("h3", { key: 'f07d716a87f3e2bd44471f7e93f7af5f5d20440e', class: "fs-6 fw-bold lh-lg" }, "Select payment type"), h("div", { key: '1156291dd748b90d64a08916ffb98c3123132175', class: "d-flex flex-column" }, this.paymentType)), h("div", { key: 'a5bd142a1c72c5abb29338a2cf24c180119d4ea7', class: "col-12" }, h("div", { key: '5a94ed9d54fd3dd24cfe3e34c23ee3c4995eca6d', class: "d-flex justify-content-end" }, h(Button, { key: '7fce3940d8fe562aa7c23e38201b5d2924157288', type: "submit", variant: "primary", onClick: (e) => this.submit(e), disabled: this.isLoading, isLoading: this.isLoading, style: { width: '100%' } }, "Pay"))))));
126
+ return (h(StyledHost, { key: 'e322f280a57bb0baab61174bca21f0a7e9afa3c1' }, h("div", { key: '4ad8cc4f6243de8ddc03fb184ac4e960a04280eb', class: "row gy-3 jfi-checkout-core" }, h("div", { key: '7f13e26b36790558c8eb455f4d5ab3d0952b4e62', class: "col-12" }, h("h2", { key: 'c5e4b6fc30f51821537915f3ce5d4830ed3f8da9', class: "fs-5 fw-bold pb-3 jfi-header" }, "Summary"), this.summary), h("div", { key: '164b7a2cc51d871ad4a92044d0f7240e376bd4b3', class: "col-12" }, h("slot", { key: 'a98b7c6a0bb9e4d1b102e832ee7aa43218432298', name: "insurance" })), h("div", { key: '415d3aac64b4190f54d785695c50a92ce02a76c2', class: "col-12 mt-4" }, h("h2", { key: '6d7f0df1165ec359877459a8bada855ef353c3b3', class: "fs-5 fw-bold pb-3 jfi-header" }, "Payment"), h("h3", { key: 'be8495d792cf065d2cbc7d3b46648c887951e313', class: "fs-6 fw-bold lh-lg" }, "Select payment type"), h("div", { key: '5c9d8baffb50b0b10e9911463f307581cad7619c', class: "d-flex flex-column" }, this.paymentType)), h("div", { key: '9351832b69a8e5285cae35534299b51193248719', class: "col-12" }, h("div", { key: '5b0e382836c858369caf93a287272922024ce72b', class: "d-flex justify-content-end" }, h(Button, { key: 'f76d37000f7b026e97f083e7cf817bed8f84f34f', type: "submit", variant: "primary", onClick: (e) => this.submit(e), disabled: this.isLoading, isLoading: this.isLoading, style: { width: '100%' } }, "Pay"))))));
127
127
  }
128
128
  static get is() { return "justifi-checkout-core"; }
129
129
  static get encapsulation() { return "shadow"; }
@@ -155,7 +155,7 @@ export class CheckoutCore {
155
155
  },
156
156
  "attribute": "iframe-origin",
157
157
  "reflect": false,
158
- "defaultValue": "IFRAME_ORIGIN"
158
+ "defaultValue": "config.iframeOrigin"
159
159
  },
160
160
  "authToken": {
161
161
  "type": "string",
@@ -3,6 +3,7 @@ import { makeGetCheckout, makeCheckoutComplete } from "./checkout-actions";
3
3
  import { CheckoutService } from "../../api/services/checkout.service";
4
4
  import { ComponentErrorCodes, ComponentErrorSeverity } from "../../api/ComponentError";
5
5
  import JustifiAnalytics from "../../api/Analytics";
6
+ import { checkPkgVersion } from "../../utils/check-pkg-version";
6
7
  export class Checkout {
7
8
  constructor() {
8
9
  this.iframeOrigin = undefined;
@@ -17,6 +18,7 @@ export class Checkout {
17
18
  this.errorMessage = '';
18
19
  }
19
20
  componentWillLoad() {
21
+ checkPkgVersion();
20
22
  this.analytics = new JustifiAnalytics(this);
21
23
  this.initializeGetCheckout();
22
24
  }
@@ -51,11 +53,11 @@ export class Checkout {
51
53
  this.checkoutCoreRef.fillBillingForm(fields);
52
54
  }
53
55
  render() {
54
- return (h("justifi-checkout-core", { key: 'd2f6bfed1be767edcf4ba21cddc503ff5efbec1a', getCheckout: this.getCheckout, authToken: this.authToken, complete: this.complete, disableCreditCard: this.disableCreditCard, disableBankAccount: this.disableBankAccount, disableBnpl: this.disableBnpl, disablePaymentMethodGroup: this.disablePaymentMethodGroup, ref: el => {
56
+ return (h("justifi-checkout-core", { key: 'ea50f0df79dae86294ccfdf2ec523f0fb81433e4', getCheckout: this.getCheckout, authToken: this.authToken, complete: this.complete, disableCreditCard: this.disableCreditCard, disableBankAccount: this.disableBankAccount, disableBnpl: this.disableBnpl, disablePaymentMethodGroup: this.disablePaymentMethodGroup, ref: el => {
55
57
  if (el) {
56
58
  this.checkoutCoreRef = el;
57
59
  }
58
- } }, h("div", { key: '45ac1bea74ca8ef7999211b51fe7791225d61f00', slot: "insurance" }, h("slot", { key: '13e051844cc7cb4aed98076ccd64954b2dd68228', name: "insurance" }))));
60
+ } }, h("div", { key: '301247cf7c916ba1c6c5464e3c2f0226d0f6f041', slot: "insurance" }, h("slot", { key: 'a75ff85e5a6d954e7c0d3c24abac518a2765f889', name: "insurance" }))));
59
61
  }
60
62
  static get is() { return "justifi-checkout"; }
61
63
  static get properties() {
@@ -1,4 +1,5 @@
1
1
  import { h } from "@stencil/core";
2
+ import { config } from "../../../config";
2
3
  const PaymentMethodTypeLabels = {
3
4
  bankAccount: 'New bank account',
4
5
  card: 'New credit or debit card',
@@ -8,7 +9,7 @@ export class NewPaymentMethod {
8
9
  this.onPaymentMethodOptionClick = () => {
9
10
  this.paymentMethodOptionSelected.emit(this.paymentMethodOption);
10
11
  };
11
- this.iframeOrigin = IFRAME_ORIGIN;
12
+ this.iframeOrigin = config.iframeOrigin;
12
13
  this.authToken = undefined;
13
14
  this.accountId = undefined;
14
15
  this.paymentMethodOption = undefined;
@@ -16,9 +17,6 @@ export class NewPaymentMethod {
16
17
  this.isSelected = undefined;
17
18
  this.saveNewPaymentMethodChecked = false;
18
19
  }
19
- componentWillLoad() {
20
- console.log('NewPaymentMethod: componentWillLoad iframeOrigin', this, this.iframeOrigin);
21
- }
22
20
  handleCheckboxChanged(event) {
23
21
  this.saveNewPaymentMethodChecked = event.detail;
24
22
  }
@@ -71,7 +69,7 @@ export class NewPaymentMethod {
71
69
  }
72
70
  render() {
73
71
  var _a, _b, _c, _d;
74
- return (h("div", { key: 'd597ba8b0ac2a650a14a79d002a91ef3edf604a4', class: "payment-method" }, h("div", { key: 'a287f7ffd480f17f0f1093d71b9d02fe3db39e0f', class: `payment-method-header p-3`, onClick: () => this.onPaymentMethodOptionClick() }, h("input", { key: 'f53d08d048cc242414fcf6794614ad2334db81bb', type: "radio", name: "paymentMethodType", id: (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id, value: (_b = this.paymentMethodOption) === null || _b === void 0 ? void 0 : _b.id, onClick: (event) => event.preventDefault(), checked: this.isSelected, class: "form-check-input me-2" }), h("label", { key: '01712a80a30df19a7b540434532cffb4cb3b61e8', htmlFor: (_c = this.paymentMethodOption) === null || _c === void 0 ? void 0 : _c.id, class: "form-check-label" }, PaymentMethodTypeLabels[(_d = this.paymentMethodOption) === null || _d === void 0 ? void 0 : _d.id])), this.isSelected ? this.showNewPaymentMethodForm() : null));
72
+ return (h("div", { key: '7b17c9f060764f959286e739a2c05a43d1363f0e', class: "payment-method" }, h("div", { key: '5f09658f3be4cf75ee6df659d02b9bb29a0af2c3', class: `payment-method-header p-3`, onClick: () => this.onPaymentMethodOptionClick() }, h("input", { key: '5187b4d23e10272df064b554130b856332b77e43', type: "radio", name: "paymentMethodType", id: (_a = this.paymentMethodOption) === null || _a === void 0 ? void 0 : _a.id, value: (_b = this.paymentMethodOption) === null || _b === void 0 ? void 0 : _b.id, onClick: (event) => event.preventDefault(), checked: this.isSelected, class: "form-check-input me-2" }), h("label", { key: '1814812e3246a5f9a5734cbb40af529a61e73f21', htmlFor: (_c = this.paymentMethodOption) === null || _c === void 0 ? void 0 : _c.id, class: "form-check-label" }, PaymentMethodTypeLabels[(_d = this.paymentMethodOption) === null || _d === void 0 ? void 0 : _d.id])), this.isSelected ? this.showNewPaymentMethodForm() : null));
75
73
  }
76
74
  static get is() { return "justifi-new-payment-method"; }
77
75
  static get properties() {
@@ -92,7 +90,7 @@ export class NewPaymentMethod {
92
90
  },
93
91
  "attribute": "iframe-origin",
94
92
  "reflect": false,
95
- "defaultValue": "IFRAME_ORIGIN"
93
+ "defaultValue": "config.iframeOrigin"
96
94
  },
97
95
  "authToken": {
98
96
  "type": "string",