@justifi/webcomponents 4.19.1-rc-5 → 4.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/dist/cjs/{Analytics-8949ea18.js → Analytics-f870b3ee.js} +3 -2
  2. package/dist/cjs/{business-additional-questions-schema-cf545610.js → business-additional-questions-schema-11ce0005.js} +1 -1
  3. package/dist/cjs/{business-form-options-582467fe.js → business-form-options-26f9900c.js} +1 -1
  4. package/dist/cjs/{business.service-6bb7ac82.js → business.service-f63650f5.js} +6 -5
  5. package/dist/cjs/config-ff2dda66.js +15 -0
  6. package/dist/cjs/form-alert_5.cjs.entry.js +1 -1
  7. package/dist/cjs/form-control-checkbox_9.cjs.entry.js +4 -4
  8. package/dist/cjs/{get-payout-csv-1391ff3e.js → get-payout-csv-f3aee6d0.js} +4 -3
  9. package/dist/cjs/justifi-additional-questions-form-step_10.cjs.entry.js +10 -9
  10. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +5 -4
  11. package/dist/cjs/justifi-billing-form_2.cjs.entry.js +2 -2
  12. package/dist/cjs/justifi-business-details.cjs.entry.js +4 -3
  13. package/dist/cjs/justifi-business-form.cjs.entry.js +9 -8
  14. package/dist/cjs/justifi-card-form.cjs.entry.js +5 -4
  15. package/dist/cjs/justifi-checkout-core.cjs.entry.js +3 -3
  16. package/dist/cjs/justifi-checkout.cjs.entry.js +5 -4
  17. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +4 -3
  18. package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +9 -11
  19. package/dist/cjs/justifi-owner-form_3.cjs.entry.js +5 -4
  20. package/dist/cjs/justifi-payment-details.cjs.entry.js +4 -3
  21. package/dist/cjs/justifi-payment-form.cjs.entry.js +6 -5
  22. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +1 -1
  23. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +6 -5
  24. package/dist/cjs/justifi-payments-list.cjs.entry.js +4 -3
  25. package/dist/cjs/justifi-payout-details.cjs.entry.js +4 -3
  26. package/dist/cjs/justifi-payouts-list.cjs.entry.js +4 -3
  27. package/dist/cjs/justifi-refund-form.cjs.entry.js +3 -2
  28. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +5 -4
  29. package/dist/cjs/{package-a3cbc925.js → package-1321b070.js} +4 -2
  30. package/dist/cjs/{payload-parsers-1cbc3b57.js → payload-parsers-969ab9b6.js} +1 -1
  31. package/dist/cjs/{payment.service-dfcfa19b.js → payment.service-0a64f9cd.js} +3 -2
  32. package/dist/cjs/{schema-validations-2733de42.js → schema-validations-f3db892c.js} +1 -1
  33. package/dist/collection/api/services/analytics.service.js +2 -1
  34. package/dist/collection/api/services/business.service.js +6 -5
  35. package/dist/collection/api/services/checkout.service.js +3 -2
  36. package/dist/collection/api/services/insurance.service.js +3 -2
  37. package/dist/collection/api/services/payment.service.js +3 -2
  38. package/dist/collection/api/services/payout.service.js +4 -3
  39. package/dist/collection/api/services/provision.service.js +4 -2
  40. package/dist/collection/api/services/reports.service.js +2 -1
  41. package/dist/collection/components/bank-account-form/bank-account-form.js +4 -3
  42. package/dist/collection/components/business-forms/business-form/business-form.js +3 -2
  43. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +3 -2
  44. package/dist/collection/components/business-forms/payment-provisioning/document-uploads/business-document-upload-form-step.js +3 -2
  45. package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +3 -2
  46. package/dist/collection/components/business-forms/utils/business-form-options.js +1 -1
  47. package/dist/collection/components/card-form/card-form.js +4 -3
  48. package/dist/collection/components/checkout/checkout-core.js +4 -4
  49. package/dist/collection/components/checkout/new-payment-method.js +4 -6
  50. package/dist/collection/components/checkout/payment-method-options.js +4 -3
  51. package/dist/collection/components/checkout/saved-payment-method.js +4 -3
  52. package/dist/collection/components/checkout/sezzle-payment-method.js +4 -3
  53. package/dist/collection/components/payment-form/payment-form.js +4 -3
  54. package/dist/collection/components/refund-form/refund-form.js +3 -2
  55. package/dist/config.js +11 -0
  56. package/dist/docs.json +8 -8
  57. package/dist/esm/{Analytics-38d3bafb.js → Analytics-262cdde5.js} +3 -2
  58. package/dist/esm/{business-additional-questions-schema-956e3caf.js → business-additional-questions-schema-e39bc781.js} +1 -1
  59. package/dist/esm/{business-form-options-7a9a74fc.js → business-form-options-0b08e08c.js} +1 -1
  60. package/dist/esm/{business.service-f45decfc.js → business.service-74bd1212.js} +6 -5
  61. package/dist/esm/config-476c7241.js +13 -0
  62. package/dist/esm/form-alert_5.entry.js +1 -1
  63. package/dist/esm/form-control-checkbox_9.entry.js +4 -4
  64. package/dist/esm/{get-payout-csv-e784a2ab.js → get-payout-csv-b494abfe.js} +4 -3
  65. package/dist/esm/justifi-additional-questions-form-step_10.entry.js +10 -9
  66. package/dist/esm/justifi-bank-account-form.entry.js +5 -4
  67. package/dist/esm/justifi-billing-form_2.entry.js +2 -2
  68. package/dist/esm/justifi-business-details.entry.js +4 -3
  69. package/dist/esm/justifi-business-form.entry.js +9 -8
  70. package/dist/esm/justifi-card-form.entry.js +5 -4
  71. package/dist/esm/justifi-checkout-core.entry.js +3 -3
  72. package/dist/esm/justifi-checkout.entry.js +5 -4
  73. package/dist/esm/justifi-gross-payment-chart.entry.js +4 -3
  74. package/dist/esm/justifi-new-payment-method_4.entry.js +9 -11
  75. package/dist/esm/justifi-owner-form_3.entry.js +5 -4
  76. package/dist/esm/justifi-payment-details.entry.js +4 -3
  77. package/dist/esm/justifi-payment-form.entry.js +6 -5
  78. package/dist/esm/justifi-payment-method-form.entry.js +1 -1
  79. package/dist/esm/justifi-payment-provisioning.entry.js +6 -5
  80. package/dist/esm/justifi-payments-list.entry.js +4 -3
  81. package/dist/esm/justifi-payout-details.entry.js +4 -3
  82. package/dist/esm/justifi-payouts-list.entry.js +4 -3
  83. package/dist/esm/justifi-refund-form.entry.js +3 -2
  84. package/dist/esm/justifi-season-interruption-insurance.entry.js +5 -4
  85. package/dist/esm/{package-89734008.js → package-d88677e9.js} +4 -2
  86. package/dist/esm/{payload-parsers-acb719d1.js → payload-parsers-62f443e1.js} +1 -1
  87. package/dist/esm/{payment.service-dad5153b.js → payment.service-3ca4a492.js} +3 -2
  88. package/dist/esm/{schema-validations-a83ff220.js → schema-validations-2f4fdebb.js} +1 -1
  89. package/dist/module/Analytics.js +2 -1
  90. package/dist/module/business-bank-account-form-step.js +3 -2
  91. package/dist/module/business-document-upload-form-step.js +3 -2
  92. package/dist/module/business-form-options.js +1 -1
  93. package/dist/module/business-terms-conditions-form-step.js +3 -2
  94. package/dist/module/business.service.js +6 -5
  95. package/dist/module/checkout-core.js +3 -3
  96. package/dist/module/config.js +13 -0
  97. package/dist/module/get-payout-csv.js +4 -3
  98. package/dist/module/justifi-bank-account-form.js +3 -2
  99. package/dist/module/justifi-business-form.js +3 -2
  100. package/dist/module/justifi-card-form.js +3 -2
  101. package/dist/module/justifi-checkout.js +3 -2
  102. package/dist/module/justifi-gross-payment-chart.js +2 -1
  103. package/dist/module/justifi-payment-form.js +4 -3
  104. package/dist/module/justifi-payment-provisioning.js +3 -2
  105. package/dist/module/justifi-refund-form.js +3 -2
  106. package/dist/module/justifi-season-interruption-insurance.js +3 -2
  107. package/dist/module/new-payment-method.js +3 -5
  108. package/dist/module/package.js +4 -2
  109. package/dist/module/payment-method-options.js +3 -2
  110. package/dist/module/payment.service.js +3 -2
  111. package/dist/module/saved-payment-method.js +3 -2
  112. package/dist/module/sezzle-payment-method.js +3 -2
  113. package/dist/types/components/checkout/new-payment-method.d.ts +0 -1
  114. package/dist/types/home/runner/work/web-component-library/web-component-library/packages/webcomponents/.stencil/packages/webcomponents/config.d.ts +11 -0
  115. package/dist/webcomponents/index.esm.js +0 -1
  116. package/dist/webcomponents/p-04a0dbb6.js +1 -0
  117. package/dist/webcomponents/p-061dcb79.entry.js +1 -0
  118. package/dist/webcomponents/p-07109641.entry.js +1 -0
  119. package/dist/webcomponents/p-08b0fb31.js +1 -41
  120. package/dist/webcomponents/p-0f7b9555.entry.js +1 -0
  121. package/dist/webcomponents/p-14c91ffd.js +1 -20
  122. package/dist/webcomponents/p-198994c0.entry.js +1 -0
  123. package/dist/webcomponents/p-1a43e355.entry.js +19 -0
  124. package/dist/webcomponents/p-1ad5995e.js +1 -3599
  125. package/dist/webcomponents/p-1f70fa27.entry.js +1 -0
  126. package/dist/webcomponents/p-1ff8810b.js +1 -29
  127. package/dist/webcomponents/p-2338affa.js +1 -213
  128. package/dist/webcomponents/p-241b0ed9.js +1 -0
  129. package/dist/webcomponents/p-2799383d.entry.js +1 -0
  130. package/dist/webcomponents/p-29c0b182.js +1 -114
  131. package/dist/webcomponents/p-2b6c9c4f.js +1 -7
  132. package/dist/webcomponents/p-2eab3c90.js +1 -3052
  133. package/dist/webcomponents/p-3affadfc.entry.js +1 -0
  134. package/dist/webcomponents/p-3d4d566d.entry.js +1 -0
  135. package/dist/webcomponents/p-3dd4c6c3.entry.js +1 -0
  136. package/dist/webcomponents/p-462dc522.entry.js +1 -0
  137. package/dist/webcomponents/p-46f679a9.js +1 -0
  138. package/dist/webcomponents/p-487b72a8.entry.js +1 -0
  139. package/dist/webcomponents/p-48ae16e0.entry.js +1 -0
  140. package/dist/webcomponents/p-4abc17f0.entry.js +1 -0
  141. package/dist/webcomponents/p-4bac636e.entry.js +1 -0
  142. package/dist/webcomponents/p-52021fa1.entry.js +1 -0
  143. package/dist/webcomponents/p-525db3e8.js +1 -22
  144. package/dist/webcomponents/p-53948ff8.entry.js +1 -0
  145. package/dist/webcomponents/p-53e64f15.entry.js +1 -0
  146. package/dist/webcomponents/p-554a3c18.js +1 -0
  147. package/dist/webcomponents/p-56f6ce4c.js +1 -10
  148. package/dist/webcomponents/p-5968ff8a.js +1 -178
  149. package/dist/webcomponents/p-6078a370.js +1 -244
  150. package/dist/webcomponents/p-60a370fc.entry.js +1 -0
  151. package/dist/webcomponents/p-62b32c4c.entry.js +1 -0
  152. package/dist/webcomponents/p-65b561da.entry.js +1 -0
  153. package/dist/webcomponents/p-72c9e6b3.entry.js +1 -0
  154. package/dist/webcomponents/p-75b4daef.js +1 -0
  155. package/dist/webcomponents/p-7d85af5c.js +1 -16
  156. package/dist/webcomponents/p-8115b2f4.js +1 -28
  157. package/dist/webcomponents/p-83125497.js +1 -4027
  158. package/dist/webcomponents/p-8603348a.js +1 -0
  159. package/dist/webcomponents/p-890b3254.entry.js +1 -0
  160. package/dist/webcomponents/p-8df7bde8.js +1 -27
  161. package/dist/webcomponents/p-92bb1e5f.entry.js +1 -0
  162. package/dist/webcomponents/p-9c9c7dac.js +1 -24
  163. package/dist/webcomponents/p-9ccfa1c9.entry.js +1 -0
  164. package/dist/webcomponents/p-9dc36f76.entry.js +1 -0
  165. package/dist/webcomponents/p-ad41c8c7.entry.js +1 -0
  166. package/dist/webcomponents/p-ae263544.js +1 -0
  167. package/dist/webcomponents/p-af244664.js +1 -126
  168. package/dist/webcomponents/p-b16dfd5d.entry.js +1 -0
  169. package/dist/webcomponents/p-ba4bae6f.js +1 -12
  170. package/dist/webcomponents/p-bbed6107.entry.js +1 -0
  171. package/dist/webcomponents/p-bc92235c.entry.js +1 -0
  172. package/dist/webcomponents/p-be39c802.entry.js +1 -0
  173. package/dist/webcomponents/p-c9f8f7ec.entry.js +1 -0
  174. package/dist/webcomponents/p-d101c5db.js +1 -0
  175. package/dist/webcomponents/p-d1c8d794.entry.js +1 -0
  176. package/dist/webcomponents/p-d25c2f12.js +1 -0
  177. package/dist/webcomponents/p-d2a5054f.entry.js +1 -0
  178. package/dist/webcomponents/p-d765d638.js +1 -0
  179. package/dist/webcomponents/p-d8355f91.entry.js +1 -0
  180. package/dist/webcomponents/p-d89bad72.js +1 -39
  181. package/dist/webcomponents/p-dce846bf.js +1 -27
  182. package/dist/webcomponents/p-df21aaad.js +1 -120
  183. package/dist/webcomponents/p-e1255160.js +1 -3
  184. package/dist/webcomponents/p-e2c88817.entry.js +1 -0
  185. package/dist/webcomponents/p-e31f0f3e.entry.js +1 -0
  186. package/dist/webcomponents/p-e333620e.js +1 -34
  187. package/dist/webcomponents/p-e3fab0e2.js +1 -43
  188. package/dist/webcomponents/p-f0866375.entry.js +1 -0
  189. package/dist/webcomponents/p-fad19d75.js +2 -1638
  190. package/dist/webcomponents/p-fb58feb5.entry.js +1 -0
  191. package/dist/webcomponents/p-fe33151d.entry.js +1 -0
  192. package/dist/webcomponents/webcomponents.css +4 -362
  193. package/dist/webcomponents/webcomponents.esm.js +1 -20
  194. package/package.json +4 -2
  195. package/dist/globals.d.ts +0 -2
  196. package/dist/webcomponents/p-0179fbb2.entry.js +0 -1684
  197. package/dist/webcomponents/p-01a404ca.entry.js +0 -44
  198. package/dist/webcomponents/p-03d35880.entry.js +0 -130
  199. package/dist/webcomponents/p-06ff0429.entry.js +0 -65
  200. package/dist/webcomponents/p-220fc2cc.entry.js +0 -98
  201. package/dist/webcomponents/p-258b1ee2.entry.js +0 -149
  202. package/dist/webcomponents/p-25d8cd65.entry.js +0 -102
  203. package/dist/webcomponents/p-2988ac56.js +0 -79
  204. package/dist/webcomponents/p-2e405359.entry.js +0 -73
  205. package/dist/webcomponents/p-3e9ef4a8.js +0 -28
  206. package/dist/webcomponents/p-3fd13ca3.js +0 -52
  207. package/dist/webcomponents/p-5482d030.entry.js +0 -21
  208. package/dist/webcomponents/p-576826b1.entry.js +0 -43
  209. package/dist/webcomponents/p-5cb3f0b2.entry.js +0 -261
  210. package/dist/webcomponents/p-5f835b89.entry.js +0 -606
  211. package/dist/webcomponents/p-6fed319e.entry.js +0 -99
  212. package/dist/webcomponents/p-70a2aa74.entry.js +0 -76
  213. package/dist/webcomponents/p-74d0d0e1.entry.js +0 -75
  214. package/dist/webcomponents/p-7582b554.entry.js +0 -18
  215. package/dist/webcomponents/p-79646550.entry.js +0 -61
  216. package/dist/webcomponents/p-7b0400cd.entry.js +0 -131
  217. package/dist/webcomponents/p-800d31fe.entry.js +0 -162
  218. package/dist/webcomponents/p-85fc69e5.js +0 -90
  219. package/dist/webcomponents/p-890088fc.entry.js +0 -298
  220. package/dist/webcomponents/p-89887332.js +0 -301
  221. package/dist/webcomponents/p-8eb774df.entry.js +0 -54
  222. package/dist/webcomponents/p-9f94bbb6.entry.js +0 -118
  223. package/dist/webcomponents/p-a2da97f2.entry.js +0 -145
  224. package/dist/webcomponents/p-a5a225d9.entry.js +0 -125
  225. package/dist/webcomponents/p-a5c5821e.entry.js +0 -101
  226. package/dist/webcomponents/p-a5fb51dc.entry.js +0 -131
  227. package/dist/webcomponents/p-a6d04afc.js +0 -44
  228. package/dist/webcomponents/p-ac086069.entry.js +0 -58
  229. package/dist/webcomponents/p-ad5cfa9d.js +0 -77
  230. package/dist/webcomponents/p-b82c146f.entry.js +0 -111
  231. package/dist/webcomponents/p-b9a41ec2.entry.js +0 -74
  232. package/dist/webcomponents/p-ba5fae28.js +0 -90
  233. package/dist/webcomponents/p-c636f563.entry.js +0 -791
  234. package/dist/webcomponents/p-c64abefc.entry.js +0 -117
  235. package/dist/webcomponents/p-cb26f708.js +0 -18
  236. package/dist/webcomponents/p-cbf2437a.entry.js +0 -80
  237. package/dist/webcomponents/p-d17aee2b.entry.js +0 -26
  238. package/dist/webcomponents/p-d894aed2.entry.js +0 -133
  239. package/dist/webcomponents/p-e356f280.entry.js +0 -29
  240. package/dist/webcomponents/p-e837a453.entry.js +0 -94
  241. package/dist/webcomponents/p-e84a2dcb.entry.js +0 -97
  242. package/dist/webcomponents/p-ec2bd24f.entry.js +0 -94
  243. package/dist/webcomponents/p-ec854a3e.entry.js +0 -11053
  244. package/dist/webcomponents/p-f02b75dc.entry.js +0 -96
@@ -1,117 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h } from './p-fad19d75.js';
2
- import { c as create$3, F as FormController } from './p-2eab3c90.js';
3
- import { b as businessCoreInfoSchema, a as additionalQuestionsSchema } from './p-3fd13ca3.js';
4
- import { a as addressSchema, i as identitySchema, p as parseBusiness } from './p-85fc69e5.js';
5
- import { A as Api } from './p-29c0b182.js';
6
- import './p-56f6ce4c.js';
7
- import './p-df21aaad.js';
8
- import './p-e3fab0e2.js';
9
- import { B as BusinessFormServerErrors, a as BusinessFormClickActions } from './p-d89bad72.js';
10
- import { B as Business } from './p-af244664.js';
11
- import { J as JustifiAnalytics } from './p-ad5cfa9d.js';
12
- import { S as StyledHost } from './p-ba4bae6f.js';
13
- import './p-89887332.js';
14
- import './p-6078a370.js';
15
- import './p-ba5fae28.js';
16
- import './p-1ff8810b.js';
17
- import './p-2988ac56.js';
18
-
19
- const businessFormSchema = create$3(Object.assign(Object.assign({}, businessCoreInfoSchema().fields), { legal_address: addressSchema(), additional_questions: additionalQuestionsSchema(), representative: identitySchema('representative') }));
20
-
21
- const businessFormCss = ":host{display:block}*::part(label){color:var(--jfi-form-label-color);font-family:var(--jfi-form-label-font-family);font-weight:var(--jfi-form-label-font-weight);font-size:var(--jfi-form-label-font-size);margin:var(--jfi-form-label-margin)}*::part(input){font-family:var(--jfi-layout-font-family);background-color:var(--jfi-form-control-background-color);border-color:var(--jfi-form-control-border-color);border-width:var(--jfi-form-control-border-width);border-bottom-width:var(--jfi-form-control-border-bottom-width);border-left-width:var(--jfi-form-control-border-left-width);border-right-width:var(--jfi-form-control-border-right-width);border-top-width:var(--jfi-form-control-border-top-width);border-radius:var(--jfi-form-control-border-radius);border-style:var(--jfi-form-control-border-style);box-shadow:var(--jfi-form-control-box-shadow);color:var(--jfi-form-control-color);font-size:var(--jfi-form-control-font-size);font-weight:var(--jfi-form-control-font-weight);line-height:var(--jfi-form-control-line-height);margin:var(--jfi-form-control-margin);padding:var(--jfi-form-control-padding)}*::part(input):focus{color:var(--jfi-form-control-color-focus);border-color:var(--jfi-form-control-border-color-focus);box-shadow:var(--jfi-form-control-box-shadow-focus)}*::part(input-checkbox){font-family:var(--jfi-layout-font-family);border-color:var(--jfi-form-control-border-color);border-width:var(--jfi-form-control-border-width);border-bottom-width:var(--jfi-form-control-border-bottom-width);border-left-width:var(--jfi-form-control-border-left-width);border-right-width:var(--jfi-form-control-border-right-width);border-top-width:var(--jfi-form-control-border-top-width);border-style:var(--jfi-form-control-border-style);box-shadow:var(--jfi-form-control-box-shadow);color:var(--jfi-form-control-color);line-height:var(--jfi-form-control-line-height)}*::part(input-checkbox):focus{color:var(--jfi-form-control-color-focus);border-color:var(--jfi-form-control-border-color-focus);box-shadow:var(--jfi-form-control-box-shadow-focus)}*::part(input-checkbox-invalid){border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error)}*::part(input-checkbox-invalid):focus{border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error-focus)}*::part(input-invalid){border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error)}*::part(input-invalid):focus{border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error-focus)}.jfi-submit-button{font-family:var(--jfi-layout-font-family);color:var(--jfi-submit-button-color);background-color:var(--jfi-submit-button-background-color);border-color:var(--jfi-submit-button-border-color);padding:var(--jfi-submit-button-padding);font-size:var(--jfi-submit-button-font-size);border-radius:var(--jfi-submit-button-border-radius);width:var(--jfi-submit-button-width);box-shadow:var(--jfi-submit-button-box-shadow)}.jfi-submit-button:hover{color:var(--jfi-submit-button-color-hover);background-color:var(--jfi-submit-button-background-color-hover);border-color:var(--jfi-submit-button-border-color-hover)}.jfi-submit-button:focus{color:var(--jfi-submit-button-color-focus);background-color:var(--jfi-submit-button-background-color-focus);border-color:var(--jfi-submit-button-border-color-focus)}.btn.jfi-submit-button:active{color:var(--jfi-submit-button-color-active);background-color:var(--jfi-submit-button-background-color-active);border-color:var(--jfi-submit-button-border-color-active)}.btn.jfi-submit-button-loading{min-width:75px;color:var(--jfi-submit-button-color-loading);background-color:var(--jfi-submit-button-background-color-loading);border-color:var(--jfi-submit-button-border-color-loading)}.btn.jfi-submit-button-loading .spinner-border{border-top-color:var(--jfi-submit-button-color-loading);border-bottom-color:var(--jfi-submit-button-color-loading);border-left-color:var(--jfi-submit-button-color-loading)}";
22
- const JustifiBusinessFormStyle0 = businessFormCss;
23
-
24
- const BusinessForm = class {
25
- constructor(hostRef) {
26
- registerInstance(this, hostRef);
27
- this.submitted = createEvent(this, "submitted", 7);
28
- this.clickEventNew = createEvent(this, "click-event", 7);
29
- this.clickEventOld = createEvent(this, "clickEvent", 7);
30
- this.instantiateBusiness = (data) => {
31
- const business = new Business(data);
32
- this.formController.setInitialValues(Object.assign({}, business));
33
- };
34
- this.sendData = async () => {
35
- this.isLoading = true;
36
- try {
37
- const values = this.formController.values.getValue();
38
- const initialValues = this.formController.getInitialValues();
39
- const payload = parseBusiness(values, initialValues);
40
- const response = await this.api.patch(this.businessEndpoint, JSON.stringify(payload));
41
- this.handleReponse(response);
42
- }
43
- catch (error) {
44
- this.errorMessage = BusinessFormServerErrors.patchData;
45
- }
46
- finally {
47
- this.isLoading = false;
48
- }
49
- };
50
- this.fetchData = async () => {
51
- this.isLoading = true;
52
- try {
53
- const response = await this.api.get(this.businessEndpoint);
54
- this.instantiateBusiness(response.data);
55
- }
56
- catch (error) {
57
- this.errorMessage = BusinessFormServerErrors.fetchData;
58
- }
59
- finally {
60
- this.isLoading = false;
61
- }
62
- };
63
- this.validateAndSubmit = (event) => {
64
- event.preventDefault();
65
- this.formController.validateAndSubmit(this.sendData);
66
- };
67
- this.authToken = undefined;
68
- this.businessId = undefined;
69
- this.hideErrors = false;
70
- this.formTitle = 'Business Information';
71
- this.removeTitle = false;
72
- this.isLoading = false;
73
- this.errorMessage = undefined;
74
- }
75
- componentWillLoad() {
76
- this.analytics = new JustifiAnalytics(this);
77
- const missingAuthTokenMessage = 'Warning: Missing auth-token. The form will not be functional without it.';
78
- const missingBusinessIdMessage = 'Warning: Missing business-id. The form requires an existing business-id to function.';
79
- if (!this.authToken)
80
- console.error(missingAuthTokenMessage);
81
- if (!this.businessId)
82
- console.error(missingBusinessIdMessage);
83
- this.formController = new FormController(businessFormSchema);
84
- this.api = Api({ authToken: this.authToken, apiOrigin: undefined });
85
- this.fetchData();
86
- }
87
- disconnectedCallback() {
88
- this.analytics.cleanup();
89
- }
90
- fireClickEvents(event) {
91
- console.warn('`clickEvent` is deprecated and will be removed in the next major release. Please use `click-event` instead.');
92
- this.clickEventNew.emit(event);
93
- this.clickEventOld.emit(event);
94
- }
95
- get title() {
96
- return this.removeTitle ? '' : this.formTitle;
97
- }
98
- get disabledState() {
99
- return this.isLoading;
100
- }
101
- get businessEndpoint() {
102
- return `entities/business/${this.businessId}`;
103
- }
104
- handleReponse(response) {
105
- if (response.error) {
106
- this.errorMessage = BusinessFormServerErrors.patchData;
107
- }
108
- this.submitted.emit({ data: response });
109
- this.instantiateBusiness(response.data);
110
- }
111
- render() {
112
- 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'))))));
113
- }
114
- };
115
- BusinessForm.style = JustifiBusinessFormStyle0;
116
-
117
- export { BusinessForm as justifi_business_form };
@@ -1,18 +0,0 @@
1
- import { A as Api } from './p-29c0b182.js';
2
- import './p-56f6ce4c.js';
3
- import './p-df21aaad.js';
4
- import './p-e3fab0e2.js';
5
-
6
- class PaymentService {
7
- async fetchPayments(accountId, authToken, params) {
8
- const api = Api({ authToken, apiOrigin: undefined });
9
- const endpoint = `account/${accountId}/payments`;
10
- return api.get(endpoint, params);
11
- }
12
- async fetchPayment(paymentId, authToken) {
13
- const endpoint = `payments/${paymentId}`;
14
- return Api({ authToken, apiOrigin: undefined }).get(endpoint);
15
- }
16
- }
17
-
18
- export { PaymentService as P };
@@ -1,80 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './p-fad19d75.js';
2
- import { E as ErrorState } from './p-dce846bf.js';
3
- import { B as BusinessService } from './p-3e9ef4a8.js';
4
- import { B as Business } from './p-af244664.js';
5
- import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './p-14c91ffd.js';
6
- import { g as getErrorMessage, a as getErrorCode } from './p-8115b2f4.js';
7
- import { J as JustifiAnalytics } from './p-ad5cfa9d.js';
8
- import './p-29c0b182.js';
9
- import './p-1ff8810b.js';
10
- import './p-6078a370.js';
11
- import './p-2988ac56.js';
12
-
13
- const makeGetBusiness = ({ id, authToken, service }) => async ({ onSuccess, onError }) => {
14
- var _a;
15
- try {
16
- const response = await service.fetchBusiness(id, authToken);
17
- if (!response.error) {
18
- onSuccess({ business: new Business(response.data) });
19
- }
20
- else {
21
- const responseError = getErrorMessage(response.error);
22
- const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
23
- return onError({
24
- error: responseError,
25
- code,
26
- severity: ComponentErrorSeverity.ERROR,
27
- });
28
- }
29
- }
30
- catch (error) {
31
- const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
32
- return onError({
33
- error: error.message || error,
34
- code,
35
- severity: ComponentErrorSeverity.ERROR,
36
- });
37
- }
38
- };
39
-
40
- const BusinessDetails = class {
41
- constructor(hostRef) {
42
- registerInstance(this, hostRef);
43
- this.errorEvent = createEvent(this, "error-event", 7);
44
- this.businessId = undefined;
45
- this.authToken = undefined;
46
- this.errorMessage = undefined;
47
- this.getBusiness = undefined;
48
- }
49
- componentWillLoad() {
50
- this.analytics = new JustifiAnalytics(this);
51
- this.initializeGetBusiness();
52
- }
53
- disconnectedCallback() {
54
- this.analytics.cleanup();
55
- }
56
- initializeGetBusiness() {
57
- if (!this.businessId || !this.authToken) {
58
- this.errorMessage = 'Invalid business id or auth token';
59
- this.errorEvent.emit({
60
- errorCode: ComponentErrorCodes.MISSING_PROPS,
61
- message: this.errorMessage,
62
- severity: ComponentErrorSeverity.ERROR,
63
- });
64
- return;
65
- }
66
- this.getBusiness = makeGetBusiness({
67
- id: this.businessId,
68
- authToken: this.authToken,
69
- service: new BusinessService(),
70
- });
71
- }
72
- render() {
73
- if (this.errorMessage) {
74
- return h(Host, null, ErrorState(this.errorMessage));
75
- }
76
- return (h(Host, null, h("business-details-core", { getBusiness: this.getBusiness })));
77
- }
78
- };
79
-
80
- export { BusinessDetails as justifi_business_details };
@@ -1,26 +0,0 @@
1
- import { r as registerInstance, h } from './p-fad19d75.js';
2
- import { u as updateFormValues, a as updateAddressFormValues, b as updateDateOfBirthFormValues } from './p-7d85af5c.js';
3
- import { P as PHONE_MASKS, S as SSN_MASK } from './p-525db3e8.js';
4
- import './p-1ff8810b.js';
5
- import './p-6078a370.js';
6
-
7
- const RepresentativeFormInputs = class {
8
- constructor(hostRef) {
9
- registerInstance(this, hostRef);
10
- this.inputHandler = (name, value) => {
11
- updateFormValues(this.formController, { [name]: value });
12
- };
13
- this.onAddressFormUpdate = (values) => {
14
- updateAddressFormValues(this.formController, Object.assign(Object.assign({}, this.formController.values.getValue().address), values));
15
- };
16
- this.representativeDefaultValue = undefined;
17
- this.errors = undefined;
18
- this.formController = undefined;
19
- }
20
- render() {
21
- var _a, _b, _c, _d, _e, _f, _g;
22
- return (h("form", { key: '8b46b3b30681c7e7f30395a2cac575a7bd7ac998' }, h("fieldset", { key: 'e6b8f2ebca22c295fd6897c0e8862200171c2b4d' }, h("legend", { key: '8f8f52240f5ccc3f5d43507681dc970b4260bb1b' }, "Representative"), h("hr", { key: '8b07c69a514534ab731e7c01b6ee4c7a0e59e06e' }), h("div", { key: '79f44ba9dcbcf9d010aed92e332f686ca7127285', class: 'row gy-3' }, h("div", { key: '2a1aeb5ddee1dafc40e108cfb2e9ed6f4d8bc183', class: 'col-12 col-md-8' }, h("form-control-text", { key: '6e089f2d4f734da266e94b38ec1435dc3f461d5f', name: 'name', label: 'Full Name', defaultValue: (_a = this.representativeDefaultValue) === null || _a === void 0 ? void 0 : _a.name, errorText: this.errors.name, inputHandler: this.inputHandler })), h("div", { key: 'c86421e524752e017180aef58e01229bf751e941', class: 'col-12 col-md-4' }, h("form-control-text", { key: 'ad8105f6d9a46397eb481666c19468376716544c', name: 'title', label: 'Title', defaultValue: (_b = this.representativeDefaultValue) === null || _b === void 0 ? void 0 : _b.title, errorText: this.errors.title, inputHandler: this.inputHandler })), h("div", { key: '7775905e46c00337a98ab668c8453e14d27bfc4d', class: 'col-12 col-md-6' }, h("form-control-text", { key: 'e810f2395101a1e48d8d3ff66617ac82d0ec90b3', name: 'email', label: 'Email Address', defaultValue: (_c = this.representativeDefaultValue) === null || _c === void 0 ? void 0 : _c.email, errorText: this.errors.email, inputHandler: this.inputHandler })), h("div", { key: '66a91e85d1902e32668407e684774820c02dce67', class: 'col-12 col-md-6' }, h("form-control-number-masked", { key: 'aad97ca95c5b2ec728ea00916a46ff4b84661b96', name: 'phone', label: 'Phone Number', defaultValue: (_d = this.representativeDefaultValue) === null || _d === void 0 ? void 0 : _d.phone, errorText: this.errors.phone, inputHandler: this.inputHandler, mask: PHONE_MASKS.US })), h("div", { key: '3cd56ea0ac1e472e905c8113f6335868c39882f1', class: 'col-12 col-md-4' }, h("form-control-date", { key: '2f6d505220cacc08a80029ada089370f3841d9ed', name: 'dob_full', label: 'Birth Date', defaultValue: (_e = this.representativeDefaultValue) === null || _e === void 0 ? void 0 : _e.dob_full, errorText: this.errors.dob_full, inputHandler: this.inputHandler, onFormControlInput: (e) => updateDateOfBirthFormValues(e, this.formController) })), h("div", { key: 'cf2df0af006a50d3533b798607025b4d6ee82ca0', class: 'col-12 col-md-8' }, h("form-control-number-masked", { key: '033e4264a1466d300891b2328c0bfaced7acb04d', name: 'identification_number', label: 'SSN', defaultValue: (_f = this.representativeDefaultValue) === null || _f === void 0 ? void 0 : _f.identification_number, errorText: this.errors.identification_number, inputHandler: this.inputHandler, mask: SSN_MASK })), h("div", { key: '2dc7be12d65203da4d4e0bdd995256a7bdc5bf37', class: 'col-12' }, h("justifi-identity-address-form", { key: '47916ab24bf990be3541b72bfa2dc46cccca5a31', errors: this.errors.address, defaultValues: (_g = this.representativeDefaultValue) === null || _g === void 0 ? void 0 : _g.address, handleFormUpdate: this.onAddressFormUpdate }))))));
23
- }
24
- };
25
-
26
- export { RepresentativeFormInputs as justifi_business_representative_form_inputs };
@@ -1,133 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h } from './p-fad19d75.js';
2
- import './p-56f6ce4c.js';
3
- import { a as PaymentMethodTypes } from './p-df21aaad.js';
4
- import './p-e3fab0e2.js';
5
- import { l as loadFontsOnParent } from './p-83125497.js';
6
- import { a as ComponentErrorCodes, C as ComponentErrorSeverity } from './p-14c91ffd.js';
7
- import { g as getErrorMessage } from './p-8115b2f4.js';
8
- import { J as JustifiAnalytics } from './p-ad5cfa9d.js';
9
- import { B as Button } from './p-9c9c7dac.js';
10
- import { S as StyledHost } from './p-ba4bae6f.js';
11
- import './p-2988ac56.js';
12
- import './p-29c0b182.js';
13
-
14
- const paymentFormCss = ":host{display:block}justifi-payment-method-form{display:block;margin-left:calc(var(--jfi-layout-padding) * -1);margin-right:calc(var(--jfi-layout-padding) * -1)}*::part(label){color:var(--jfi-form-label-color);font-family:var(--jfi-form-label-font-family);font-weight:var(--jfi-form-label-font-weight);font-size:var(--jfi-form-label-font-size);margin:var(--jfi-form-label-margin)}*::part(input){font-family:var(--jfi-layout-font-family);background-color:var(--jfi-form-control-background-color);border-color:var(--jfi-form-control-border-color);border-width:var(--jfi-form-control-border-width);border-bottom-width:var(--jfi-form-control-border-bottom-width);border-left-width:var(--jfi-form-control-border-left-width);border-right-width:var(--jfi-form-control-border-right-width);border-top-width:var(--jfi-form-control-border-top-width);border-radius:var(--jfi-form-control-border-radius);border-style:var(--jfi-form-control-border-style);box-shadow:var(--jfi-form-control-box-shadow);color:var(--jfi-form-control-color);font-size:var(--jfi-form-control-font-size);font-weight:var(--jfi-form-control-font-weight);line-height:var(--jfi-form-control-line-height);margin:var(--jfi-form-control-margin);padding:var(--jfi-form-control-padding)}*::part(input):focus{color:var(--jfi-form-control-color-focus);border-color:var(--jfi-form-control-border-color-focus);box-shadow:var(--jfi-form-control-box-shadow-focus)}*::part(input-invalid){border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error)}*::part(input-invalid):focus{border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error-focus)}.jfi-submit-button{font-family:var(--jfi-layout-font-family);color:var(--jfi-submit-button-color);background-color:var(--jfi-submit-button-background-color);border-color:var(--jfi-submit-button-border-color);padding:var(--jfi-submit-button-padding);font-size:var(--jfi-submit-button-font-size);border-radius:var(--jfi-submit-button-border-radius);width:var(--jfi-submit-button-width);box-shadow:var(--jfi-submit-button-box-shadow)}.jfi-submit-button:hover{color:var(--jfi-submit-button-color-hover);background-color:var(--jfi-submit-button-background-color-hover);border-color:var(--jfi-submit-button-border-color-hover)}.jfi-submit-button:focus{color:var(--jfi-submit-button-color-focus);background-color:var(--jfi-submit-button-background-color-focus);border-color:var(--jfi-submit-button-border-color-focus)}.btn.jfi-submit-button:active{color:var(--jfi-submit-button-color-active);background-color:var(--jfi-submit-button-background-color-active);border-color:var(--jfi-submit-button-border-color-active)}.btn.jfi-submit-button-loading{min-width:75px;color:var(--jfi-submit-button-color-loading);background-color:var(--jfi-submit-button-background-color-loading);border-color:var(--jfi-submit-button-border-color-loading)}.btn.jfi-submit-button-loading .spinner-border{border-top-color:var(--jfi-submit-button-color-loading);border-bottom-color:var(--jfi-submit-button-color-loading);border-left-color:var(--jfi-submit-button-color-loading)}";
15
- const JustifiPaymentFormStyle0 = paymentFormCss;
16
-
17
- const PaymentForm = class {
18
- constructor(hostRef) {
19
- registerInstance(this, hostRef);
20
- this.submitted = createEvent(this, "submitted", 7);
21
- this.errorEvent = createEvent(this, "error-event", 7);
22
- this.bankAccount = undefined;
23
- this.card = undefined;
24
- this.email = undefined;
25
- this.clientId = undefined;
26
- this.authToken = undefined;
27
- this.accountId = undefined;
28
- this.submitButtonText = undefined;
29
- this.submitButtonEnabled = true;
30
- this.isLoading = false;
31
- this.selectedPaymentMethodType = PaymentMethodTypes.card;
32
- }
33
- componentWillLoad() {
34
- this.analytics = new JustifiAnalytics(this);
35
- if (!this.validateProps()) {
36
- this.errorEvent.emit({
37
- errorCode: ComponentErrorCodes.MISSING_PROPS,
38
- message: 'clientId or authToken is required',
39
- severity: ComponentErrorSeverity.ERROR
40
- });
41
- this.submitButtonEnabled = false;
42
- }
43
- }
44
- connectedCallback() {
45
- loadFontsOnParent();
46
- }
47
- disconnectedCallback() {
48
- this.analytics.cleanup();
49
- }
50
- async fillBillingForm(fields) {
51
- this.billingFormRef.fill(fields);
52
- }
53
- async enableSubmitButton() {
54
- this.submitButtonEnabled = true;
55
- }
56
- async disableSubmitButton() {
57
- this.submitButtonEnabled = false;
58
- }
59
- showPaymentMethodTypeSelector() {
60
- return this.card && this.bankAccount;
61
- }
62
- getSelectedPaymentMethodType() {
63
- if (this.showPaymentMethodTypeSelector()) {
64
- return this.selectedPaymentMethodType;
65
- }
66
- else if (this.card) {
67
- return PaymentMethodTypes.card;
68
- }
69
- else if (this.bankAccount) {
70
- return PaymentMethodTypes.bankAccount;
71
- }
72
- else {
73
- return PaymentMethodTypes.card;
74
- }
75
- }
76
- paymentMethodSelectedHandler(event) {
77
- const paymentMethodType = event.detail;
78
- this.selectedPaymentMethodType = paymentMethodType;
79
- }
80
- validateProps() {
81
- return !!(this.clientId || this.authToken);
82
- }
83
- getToken() {
84
- return this.authToken || this.clientId;
85
- }
86
- async submit(event) {
87
- event.preventDefault();
88
- if (!this.paymentMethodFormRef || !this.billingFormRef)
89
- return;
90
- const billingFormValidation = await this.billingFormRef.validate();
91
- const paymentMethodFormValidation = await this.paymentMethodFormRef.validate();
92
- if (!billingFormValidation.isValid || !paymentMethodFormValidation.isValid)
93
- return;
94
- this.isLoading = true;
95
- try {
96
- const billingFormFieldValues = await this.billingFormRef.getValues();
97
- const paymentMethodData = Object.assign({ email: this.email }, billingFormFieldValues);
98
- const tokenizeResponse = await this.paymentMethodFormRef.tokenize(this.getToken(), paymentMethodData, this.accountId);
99
- if (tokenizeResponse.error) {
100
- this.errorEvent.emit({
101
- errorCode: ComponentErrorCodes.TOKENIZE_ERROR,
102
- message: tokenizeResponse.error.message,
103
- severity: ComponentErrorSeverity.ERROR
104
- });
105
- }
106
- this.submitted.emit(tokenizeResponse);
107
- }
108
- catch (error) {
109
- this.errorEvent.emit({
110
- errorCode: ComponentErrorCodes.UNKNOWN_ERROR,
111
- message: getErrorMessage(error),
112
- severity: ComponentErrorSeverity.ERROR
113
- });
114
- }
115
- finally {
116
- this.isLoading = false;
117
- }
118
- }
119
- render() {
120
- return (h(StyledHost, { key: '8cb6e3903a0045fbffed5f17dc29aacc6b57ad7f' }, h("form", { key: '4e8f00c3d29c0db0bc99fd79da46abe7c40e3e30', class: "row gy-3" }, this.showPaymentMethodTypeSelector() && (h("div", { key: '344a1356f6f482493a35015c32f8e9a9b4cc8a80', class: "col-12" }, h("justifi-payment-method-selector", { key: '36b9dd7a9bc8336b4bef0d12f56c811effbc0a0b', selectedPaymentMethodType: this.getSelectedPaymentMethodType(), onPaymentMethodSelected: event => this.paymentMethodSelectedHandler(event) }))), h("div", { key: '225a260f817f9dd02a7f0a5b25562179ab80f7de', class: "col-12" }, h("justifi-payment-method-form", { key: '52e2bf20b265cc96ab556571a323370cc27ac278', "payment-method-form-type": this.getSelectedPaymentMethodType(), iframeOrigin: undefined, ref: el => {
121
- if (el) {
122
- this.paymentMethodFormRef = el;
123
- }
124
- } })), h("div", { key: '433a8ac42c0eec9180e37da222da1dbb1112e48e', class: "col-12" }, h("justifi-billing-form", { key: '4f24f1c8b4083e2d9e5bb2272d32d20bb5cc225d', legend: "Billing Info", ref: el => {
125
- if (el) {
126
- this.billingFormRef = el;
127
- }
128
- } })), h("slot", { key: '9397ae7fdd2677cd61a425fcf5818ae14fabbed0', name: 'insurance' }), h("div", { key: 'db9131f6f35165e69d3b59da7fa25b95f1e46168', class: "col-12" }, h(Button, { key: 'c280836cf6445a7132ff9202a09b6fdac8e29f77', variant: "primary", type: "submit", onClick: event => this.submit(event), disabled: !this.submitButtonEnabled || this.isLoading, isLoading: this.isLoading, "data-testid": "submit-button", style: { width: '100%' } }, this.submitButtonText || 'Submit')))));
129
- }
130
- };
131
- PaymentForm.style = JustifiPaymentFormStyle0;
132
-
133
- export { PaymentForm as justifi_payment_form };
@@ -1,29 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, F as Fragment } from './p-fad19d75.js';
2
- import './p-56f6ce4c.js';
3
- import { a as PaymentMethodTypes } from './p-df21aaad.js';
4
- import './p-e3fab0e2.js';
5
-
6
- const paymentMethodSelectorCss = ":host{display:block}.jfi-btn-radio+.jfi-btn-radio-label{color:var(--jfi-radio-button-color);background-color:var(--jfi-radio-button-background-color);border-color:var(--jfi-radio-button-border-color);padding:var(--jfi-radio-button-padding);font-size:var(--jfi-radio-button-font-size)}.jfi-btn-radio:focus+.jfi-btn-radio-label{box-shadow:var(--jfi-box-shadow-focus)}.jfi-btn-radio+.jfi-btn-radio-label:hover{color:var(--jfi-radio-button-color-hover);border-color:var(--jfi-radio-button-border-color-hover);background-color:var(--jfi-radio-button-background-color-hover)}.jfi-btn-radio:checked+.jfi-btn-radio-label:hover{color:var(--jfi-radio-button-color-selected-hover);border-color:var(--jfi-radio-button-border-color-selected-hover);background-color:var(--jfi-radio-button-background-color-selected-hover)}.jfi-btn-radio:checked+.jfi-btn-radio-label{color:var(--jfi-radio-button-color-selected);background-color:var(--jfi-radio-button-background-color-selected);border-color:var(--jfi-radio-button-border-color-selected)}.jfi-btn-radio-group{font-family:var(--jfi-layout-font-family);display:inline-flex;width:var(--jfi-radio-button-group-width)}";
7
- const JustifiPaymentMethodSelectorStyle0 = paymentMethodSelectorCss;
8
-
9
- const PaymentMethodLabels = {
10
- bankAccount: 'Bank Account',
11
- card: 'Card',
12
- };
13
- const PaymentMethodSelector = class {
14
- constructor(hostRef) {
15
- registerInstance(this, hostRef);
16
- this.paymentMethodSelected = createEvent(this, "paymentMethodSelected", 7);
17
- this.paymentMethodTypes = [PaymentMethodTypes.card, PaymentMethodTypes.bankAccount];
18
- this.selectedPaymentMethodType = undefined;
19
- }
20
- onChangeHandler(event) {
21
- this.paymentMethodSelected.emit(event.target.value);
22
- }
23
- render() {
24
- return (h("div", { key: 'a0cd592094f7f69955469de84addde1d4bc5af4d', class: "btn-group jfi-btn-radio-group", role: "group", "aria-label": "Radio toggle group for payment method" }, this.paymentMethodTypes.map((paymentMethodType) => (h(Fragment, null, h("input", { id: paymentMethodType, type: "radio", name: "paymentMethodType", value: paymentMethodType, onChange: (event) => this.onChangeHandler(event), checked: this.selectedPaymentMethodType === paymentMethodType, class: "btn-check jfi-btn-radio" }), h("label", { htmlFor: paymentMethodType, class: "btn btn-outline-primary jfi-btn-radio-label" }, PaymentMethodLabels[paymentMethodType]))))));
25
- }
26
- };
27
- PaymentMethodSelector.style = JustifiPaymentMethodSelectorStyle0;
28
-
29
- export { PaymentMethodSelector as justifi_payment_method_selector };
@@ -1,94 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h } from './p-fad19d75.js';
2
- import { P as PaymentService } from './p-cb26f708.js';
3
- import './p-56f6ce4c.js';
4
- import { P as Payment } from './p-df21aaad.js';
5
- import './p-e3fab0e2.js';
6
- import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './p-14c91ffd.js';
7
- import { g as getErrorMessage, a as getErrorCode } from './p-8115b2f4.js';
8
- import { E as ErrorState } from './p-dce846bf.js';
9
- import { J as JustifiAnalytics } from './p-ad5cfa9d.js';
10
- import './p-29c0b182.js';
11
- import './p-2988ac56.js';
12
-
13
- const makeGetPaymentDetails = ({ id, authToken, service }) => async ({ onSuccess, onError }) => {
14
- var _a;
15
- try {
16
- const response = await service.fetchPayment(id, authToken);
17
- if (!response.error) {
18
- onSuccess({ payment: new Payment(response.data) });
19
- }
20
- else {
21
- const responseError = getErrorMessage(response.error);
22
- const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
23
- onError({
24
- error: responseError,
25
- code,
26
- severity: ComponentErrorSeverity.ERROR,
27
- });
28
- }
29
- }
30
- catch (error) {
31
- const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
32
- onError({
33
- error: getErrorMessage(error),
34
- code,
35
- severity: ComponentErrorSeverity.ERROR,
36
- });
37
- }
38
- };
39
-
40
- const PaymentDetails = class {
41
- constructor(hostRef) {
42
- registerInstance(this, hostRef);
43
- this.errorEvent = createEvent(this, "error-event", 7);
44
- this.paymentService = new PaymentService();
45
- this.handleErrorEvent = event => {
46
- this.errorMessage = event.detail.message;
47
- this.errorEvent.emit(event.detail);
48
- };
49
- this.paymentId = undefined;
50
- this.authToken = undefined;
51
- this.getPaymentDetails = undefined;
52
- this.errorMessage = null;
53
- }
54
- componentWillLoad() {
55
- this.analytics = new JustifiAnalytics(this);
56
- this.initializeGetPaymentDetails();
57
- }
58
- disconnectedCallback() {
59
- this.analytics.cleanup();
60
- }
61
- ;
62
- propChanged() {
63
- this.initializeGetPaymentDetails();
64
- }
65
- initializeGetPaymentDetails() {
66
- if (this.paymentId && this.authToken) {
67
- this.getPaymentDetails = makeGetPaymentDetails({
68
- id: this.paymentId,
69
- authToken: this.authToken,
70
- service: new PaymentService(),
71
- });
72
- }
73
- else {
74
- this.errorMessage = 'Payment ID and Auth Token are required';
75
- this.errorEvent.emit({
76
- message: this.errorMessage,
77
- errorCode: ComponentErrorCodes.MISSING_PROPS,
78
- severity: ComponentErrorSeverity.ERROR,
79
- });
80
- }
81
- }
82
- render() {
83
- if (this.errorMessage) {
84
- return ErrorState(this.errorMessage);
85
- }
86
- return (h("payment-details-core", { getPaymentDetails: this.getPaymentDetails, "onError-event": this.handleErrorEvent }));
87
- }
88
- static get watchers() { return {
89
- "paymentId": ["propChanged"],
90
- "authToken": ["propChanged"]
91
- }; }
92
- };
93
-
94
- export { PaymentDetails as justifi_payment_details };
@@ -1,97 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h } from './p-fad19d75.js';
2
- import { A as Api } from './p-29c0b182.js';
3
- import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './p-14c91ffd.js';
4
- import { g as getErrorMessage, a as getErrorCode } from './p-8115b2f4.js';
5
- import { E as ErrorState } from './p-dce846bf.js';
6
- import { J as JustifiAnalytics } from './p-ad5cfa9d.js';
7
- import './p-2988ac56.js';
8
-
9
- class ReportsService {
10
- async fetchGrossVolumeChartData(accountId, authToken) {
11
- const api = Api({ authToken: authToken, apiOrigin: undefined });
12
- const endpoint = `account/${accountId}/reports/gross_volume`;
13
- return api.get(endpoint);
14
- }
15
- }
16
-
17
- const makeGetGrossPaymentChartData = ({ id, authToken, service }) => async ({ onSuccess, onError }) => {
18
- var _a;
19
- try {
20
- const response = await service.fetchGrossVolumeChartData(id, authToken);
21
- if (!response.error) {
22
- onSuccess(response.data);
23
- }
24
- else {
25
- const errorMessage = getErrorMessage(response.error);
26
- const code = getErrorCode((_a = response.error) === null || _a === void 0 ? void 0 : _a.code);
27
- onError({
28
- error: errorMessage,
29
- code,
30
- severity: ComponentErrorSeverity.ERROR,
31
- });
32
- }
33
- }
34
- catch (error) {
35
- const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
36
- const errorMessage = getErrorMessage(error);
37
- onError({
38
- error: errorMessage,
39
- code,
40
- severity: ComponentErrorSeverity.ERROR,
41
- });
42
- }
43
- };
44
-
45
- const GrossPaymentChart = class {
46
- constructor(hostRef) {
47
- registerInstance(this, hostRef);
48
- this.errorEvent = createEvent(this, "error-event", 7);
49
- this.handleErrorEvent = (event) => {
50
- this.errorMessage = event.detail.message;
51
- this.errorEvent.emit(event.detail);
52
- };
53
- this.accountId = undefined;
54
- this.authToken = undefined;
55
- this.getGrossPayment = undefined;
56
- this.errorMessage = null;
57
- }
58
- componentWillLoad() {
59
- this.analytics = new JustifiAnalytics(this);
60
- this.initializeGetGrossPayment();
61
- }
62
- disconnectedCallback() {
63
- this.analytics.cleanup();
64
- }
65
- propChanged() {
66
- this.initializeGetGrossPayment();
67
- }
68
- initializeGetGrossPayment() {
69
- if (this.accountId && this.authToken) {
70
- this.getGrossPayment = makeGetGrossPaymentChartData({
71
- id: this.accountId,
72
- authToken: this.authToken,
73
- service: new ReportsService(),
74
- });
75
- }
76
- else {
77
- this.errorMessage = 'Account ID and Auth Token are required';
78
- this.errorEvent.emit({
79
- errorCode: ComponentErrorCodes.MISSING_PROPS,
80
- message: this.errorMessage,
81
- severity: ComponentErrorSeverity.ERROR,
82
- });
83
- }
84
- }
85
- render() {
86
- if (this.errorMessage) {
87
- return ErrorState(this.errorMessage);
88
- }
89
- return (h("gross-payment-chart-core", { getGrossPayment: this.getGrossPayment, "onError-event": this.handleErrorEvent }));
90
- }
91
- static get watchers() { return {
92
- "accountId": ["propChanged"],
93
- "authToken": ["propChanged"]
94
- }; }
95
- };
96
-
97
- export { GrossPaymentChart as justifi_gross_payment_chart };