@justifi/webcomponents 4.19.1-rc → 4.19.1-rc-4

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 (224) hide show
  1. package/dist/cjs/{Analytics-0b3db49d.js → Analytics-985bc298.js} +2 -3
  2. package/dist/cjs/{business.service-c384784d.js → business.service-6bb7ac82.js} +5 -6
  3. package/dist/cjs/{get-payout-csv-51a02be7.js → get-payout-csv-1391ff3e.js} +3 -4
  4. package/dist/cjs/justifi-additional-questions-form-step_10.cjs.entry.js +7 -8
  5. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +4 -5
  6. package/dist/cjs/justifi-business-details.cjs.entry.js +3 -4
  7. package/dist/cjs/justifi-business-form.cjs.entry.js +4 -5
  8. package/dist/cjs/justifi-card-form.cjs.entry.js +4 -5
  9. package/dist/cjs/justifi-checkout-core.cjs.entry.js +3 -3
  10. package/dist/cjs/justifi-checkout.cjs.entry.js +4 -5
  11. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +3 -4
  12. package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +11 -9
  13. package/dist/cjs/justifi-owner-form_3.cjs.entry.js +1 -2
  14. package/dist/cjs/justifi-payment-details.cjs.entry.js +3 -4
  15. package/dist/cjs/justifi-payment-form.cjs.entry.js +5 -6
  16. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +1 -1
  17. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +5 -6
  18. package/dist/cjs/justifi-payments-list.cjs.entry.js +3 -4
  19. package/dist/cjs/justifi-payout-details.cjs.entry.js +3 -4
  20. package/dist/cjs/justifi-payouts-list.cjs.entry.js +3 -4
  21. package/dist/cjs/justifi-refund-form.cjs.entry.js +2 -3
  22. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +4 -5
  23. package/dist/cjs/{package-39dc73ed.js → package-cbc08fe3.js} +2 -4
  24. package/dist/cjs/{payment.service-2dbfb83d.js → payment.service-dfcfa19b.js} +2 -3
  25. package/dist/collection/api/services/analytics.service.js +1 -2
  26. package/dist/collection/api/services/business.service.js +5 -6
  27. package/dist/collection/api/services/checkout.service.js +2 -3
  28. package/dist/collection/api/services/insurance.service.js +2 -3
  29. package/dist/collection/api/services/payment.service.js +2 -3
  30. package/dist/collection/api/services/payout.service.js +3 -4
  31. package/dist/collection/api/services/provision.service.js +2 -4
  32. package/dist/collection/api/services/reports.service.js +1 -2
  33. package/dist/collection/components/bank-account-form/bank-account-form.js +3 -4
  34. package/dist/collection/components/business-forms/business-form/business-form.js +2 -3
  35. package/dist/collection/components/business-forms/payment-provisioning/bank-account/business-bank-account-form-step.js +2 -3
  36. package/dist/collection/components/business-forms/payment-provisioning/document-uploads/business-document-upload-form-step.js +2 -3
  37. package/dist/collection/components/business-forms/payment-provisioning/terms-and-conditions/business-terms-conditions-form-step.js +2 -3
  38. package/dist/collection/components/card-form/card-form.js +3 -4
  39. package/dist/collection/components/checkout/checkout-core.js +4 -4
  40. package/dist/collection/components/checkout/new-payment-method.js +6 -4
  41. package/dist/collection/components/checkout/payment-method-options.js +3 -4
  42. package/dist/collection/components/checkout/saved-payment-method.js +3 -4
  43. package/dist/collection/components/checkout/sezzle-payment-method.js +3 -4
  44. package/dist/collection/components/payment-form/payment-form.js +3 -4
  45. package/dist/collection/components/refund-form/refund-form.js +2 -3
  46. package/dist/docs.json +8 -8
  47. package/dist/esm/{Analytics-37556050.js → Analytics-79e20e2d.js} +2 -3
  48. package/dist/esm/{business.service-eee46ab1.js → business.service-f45decfc.js} +5 -6
  49. package/dist/esm/{get-payout-csv-4d6b29d8.js → get-payout-csv-e784a2ab.js} +3 -4
  50. package/dist/esm/justifi-additional-questions-form-step_10.entry.js +7 -8
  51. package/dist/esm/justifi-bank-account-form.entry.js +4 -5
  52. package/dist/esm/justifi-business-details.entry.js +3 -4
  53. package/dist/esm/justifi-business-form.entry.js +4 -5
  54. package/dist/esm/justifi-card-form.entry.js +4 -5
  55. package/dist/esm/justifi-checkout-core.entry.js +3 -3
  56. package/dist/esm/justifi-checkout.entry.js +4 -5
  57. package/dist/esm/justifi-gross-payment-chart.entry.js +3 -4
  58. package/dist/esm/justifi-new-payment-method_4.entry.js +11 -9
  59. package/dist/esm/justifi-owner-form_3.entry.js +1 -2
  60. package/dist/esm/justifi-payment-details.entry.js +3 -4
  61. package/dist/esm/justifi-payment-form.entry.js +5 -6
  62. package/dist/esm/justifi-payment-method-form.entry.js +1 -1
  63. package/dist/esm/justifi-payment-provisioning.entry.js +5 -6
  64. package/dist/esm/justifi-payments-list.entry.js +3 -4
  65. package/dist/esm/justifi-payout-details.entry.js +3 -4
  66. package/dist/esm/justifi-payouts-list.entry.js +3 -4
  67. package/dist/esm/justifi-refund-form.entry.js +2 -3
  68. package/dist/esm/justifi-season-interruption-insurance.entry.js +4 -5
  69. package/dist/esm/{package-e2a7aa3f.js → package-cf64a48c.js} +2 -4
  70. package/dist/esm/{payment.service-9005a501.js → payment.service-dad5153b.js} +2 -3
  71. package/dist/globals.d.ts +2 -0
  72. package/dist/module/Analytics.js +1 -2
  73. package/dist/module/business-bank-account-form-step.js +2 -3
  74. package/dist/module/business-document-upload-form-step.js +2 -3
  75. package/dist/module/business-terms-conditions-form-step.js +2 -3
  76. package/dist/module/business.service.js +5 -6
  77. package/dist/module/checkout-core.js +3 -3
  78. package/dist/module/get-payout-csv.js +3 -4
  79. package/dist/module/justifi-bank-account-form.js +2 -3
  80. package/dist/module/justifi-business-form.js +2 -3
  81. package/dist/module/justifi-card-form.js +2 -3
  82. package/dist/module/justifi-checkout.js +2 -3
  83. package/dist/module/justifi-gross-payment-chart.js +1 -2
  84. package/dist/module/justifi-payment-form.js +3 -4
  85. package/dist/module/justifi-payment-provisioning.js +2 -3
  86. package/dist/module/justifi-refund-form.js +2 -3
  87. package/dist/module/justifi-season-interruption-insurance.js +2 -3
  88. package/dist/module/new-payment-method.js +5 -3
  89. package/dist/module/package.js +2 -4
  90. package/dist/module/payment-method-options.js +2 -3
  91. package/dist/module/payment.service.js +2 -3
  92. package/dist/module/saved-payment-method.js +2 -3
  93. package/dist/module/sezzle-payment-method.js +2 -3
  94. package/dist/types/components/checkout/new-payment-method.d.ts +1 -0
  95. package/dist/webcomponents/index.esm.js +1 -0
  96. package/dist/webcomponents/p-01a404ca.entry.js +44 -0
  97. package/dist/webcomponents/p-02c58e00.entry.js +97 -0
  98. package/dist/webcomponents/p-03d35880.entry.js +130 -0
  99. package/dist/webcomponents/p-05f46d63.entry.js +99 -0
  100. package/dist/webcomponents/p-06ff0429.entry.js +65 -0
  101. package/dist/webcomponents/p-08b0fb31.js +41 -1
  102. package/dist/webcomponents/p-14c91ffd.js +20 -1
  103. package/dist/webcomponents/p-1ad5995e.js +3599 -1
  104. package/dist/webcomponents/p-1ff8810b.js +29 -1
  105. package/dist/webcomponents/p-2338affa.js +213 -1
  106. package/dist/webcomponents/p-258b1ee2.entry.js +149 -0
  107. package/dist/webcomponents/p-25d8cd65.entry.js +102 -0
  108. package/dist/webcomponents/p-29c0b182.js +114 -1
  109. package/dist/webcomponents/p-2b6c9c4f.js +7 -1
  110. package/dist/webcomponents/p-2eab3c90.js +3052 -1
  111. package/dist/webcomponents/p-3e9ef4a8.js +28 -0
  112. package/dist/webcomponents/p-3fd13ca3.js +52 -1
  113. package/dist/webcomponents/p-492588bf.js +79 -0
  114. package/dist/webcomponents/p-525db3e8.js +22 -1
  115. package/dist/webcomponents/p-5482d030.entry.js +21 -0
  116. package/dist/webcomponents/p-56f6ce4c.js +10 -1
  117. package/dist/webcomponents/p-576826b1.entry.js +43 -0
  118. package/dist/webcomponents/p-5968ff8a.js +178 -1
  119. package/dist/webcomponents/p-5cb3f0b2.entry.js +261 -0
  120. package/dist/webcomponents/p-5f835b89.entry.js +606 -0
  121. package/dist/webcomponents/p-6053809a.entry.js +80 -0
  122. package/dist/webcomponents/p-6078a370.js +244 -1
  123. package/dist/webcomponents/p-66e4869f.entry.js +75 -0
  124. package/dist/webcomponents/p-6f1c56d4.entry.js +94 -0
  125. package/dist/webcomponents/p-70a2aa74.entry.js +76 -0
  126. package/dist/webcomponents/p-7582b554.entry.js +18 -0
  127. package/dist/webcomponents/p-79646550.entry.js +61 -0
  128. package/dist/webcomponents/p-7a70ff09.entry.js +133 -0
  129. package/dist/webcomponents/p-7bbf73bd.entry.js +117 -0
  130. package/dist/webcomponents/p-7d85af5c.js +16 -1
  131. package/dist/webcomponents/p-800d31fe.entry.js +162 -0
  132. package/dist/webcomponents/p-8115b2f4.js +28 -1
  133. package/dist/webcomponents/p-83125497.js +4027 -1
  134. package/dist/webcomponents/p-85fc69e5.js +90 -1
  135. package/dist/webcomponents/p-890088fc.entry.js +298 -0
  136. package/dist/webcomponents/p-89887332.js +301 -1
  137. package/dist/webcomponents/p-8df7bde8.js +27 -1
  138. package/dist/webcomponents/p-8eb774df.entry.js +54 -0
  139. package/dist/webcomponents/p-9282eab8.js +77 -0
  140. package/dist/webcomponents/p-96c12fef.entry.js +73 -0
  141. package/dist/webcomponents/p-9c9c7dac.js +24 -1
  142. package/dist/webcomponents/p-9f94bbb6.entry.js +118 -0
  143. package/dist/webcomponents/p-9fd108be.entry.js +74 -0
  144. package/dist/webcomponents/p-a5a225d9.entry.js +125 -0
  145. package/dist/webcomponents/p-a5c5821e.entry.js +101 -0
  146. package/dist/webcomponents/p-a5fb51dc.entry.js +131 -0
  147. package/dist/webcomponents/p-a6d04afc.js +44 -0
  148. package/dist/webcomponents/p-ac086069.entry.js +58 -0
  149. package/dist/webcomponents/p-acbac8b8.entry.js +131 -0
  150. package/dist/webcomponents/p-adc30a61.entry.js +145 -0
  151. package/dist/webcomponents/p-af244664.js +126 -1
  152. package/dist/webcomponents/p-b6e3d7ed.entry.js +94 -0
  153. package/dist/webcomponents/p-b82c146f.entry.js +111 -0
  154. package/dist/webcomponents/p-ba4bae6f.js +12 -1
  155. package/dist/webcomponents/p-ba5fae28.js +90 -1
  156. package/dist/webcomponents/p-c636f563.entry.js +791 -0
  157. package/dist/webcomponents/p-cb26f708.js +18 -0
  158. package/dist/webcomponents/p-d17aee2b.entry.js +26 -0
  159. package/dist/webcomponents/p-d89bad72.js +39 -1
  160. package/dist/webcomponents/p-dce846bf.js +27 -1
  161. package/dist/webcomponents/p-df21aaad.js +120 -1
  162. package/dist/webcomponents/p-e1255160.js +3 -1
  163. package/dist/webcomponents/p-e333620e.js +34 -1
  164. package/dist/webcomponents/p-e356f280.entry.js +29 -0
  165. package/dist/webcomponents/p-e3e5f95f.entry.js +98 -0
  166. package/dist/webcomponents/p-e3fab0e2.js +43 -1
  167. package/dist/webcomponents/p-eb5dbd23.entry.js +1684 -0
  168. package/dist/webcomponents/p-ec854a3e.entry.js +11053 -0
  169. package/dist/webcomponents/p-f02b75dc.entry.js +96 -0
  170. package/dist/webcomponents/p-fad19d75.js +1638 -2
  171. package/dist/webcomponents/webcomponents.css +362 -4
  172. package/dist/webcomponents/webcomponents.esm.js +20 -1
  173. package/package.json +2 -4
  174. package/dist/cjs/config-037e67d0.js +0 -15
  175. package/dist/config.js +0 -11
  176. package/dist/esm/config-58e393e2.js +0 -13
  177. package/dist/module/config.js +0 -13
  178. package/dist/types/home/runner/work/web-component-library/web-component-library/packages/webcomponents/.stencil/packages/webcomponents/config.d.ts +0 -11
  179. package/dist/webcomponents/p-023779ee.entry.js +0 -1
  180. package/dist/webcomponents/p-037763f4.entry.js +0 -1
  181. package/dist/webcomponents/p-07109641.entry.js +0 -1
  182. package/dist/webcomponents/p-0f7b9555.entry.js +0 -1
  183. package/dist/webcomponents/p-17e4246f.entry.js +0 -1
  184. package/dist/webcomponents/p-1a43e355.entry.js +0 -19
  185. package/dist/webcomponents/p-1f6afff9.entry.js +0 -1
  186. package/dist/webcomponents/p-246a6c6a.entry.js +0 -1
  187. package/dist/webcomponents/p-2d3b1692.entry.js +0 -1
  188. package/dist/webcomponents/p-30a493cd.entry.js +0 -1
  189. package/dist/webcomponents/p-32286934.js +0 -1
  190. package/dist/webcomponents/p-3f5e7e86.js +0 -1
  191. package/dist/webcomponents/p-462dc522.entry.js +0 -1
  192. package/dist/webcomponents/p-487b72a8.entry.js +0 -1
  193. package/dist/webcomponents/p-4abc17f0.entry.js +0 -1
  194. package/dist/webcomponents/p-52021fa1.entry.js +0 -1
  195. package/dist/webcomponents/p-53e64f15.entry.js +0 -1
  196. package/dist/webcomponents/p-57e1f2fd.js +0 -1
  197. package/dist/webcomponents/p-5f095525.entry.js +0 -1
  198. package/dist/webcomponents/p-62b32c4c.entry.js +0 -1
  199. package/dist/webcomponents/p-69faef3f.entry.js +0 -1
  200. package/dist/webcomponents/p-6c078cd1.js +0 -1
  201. package/dist/webcomponents/p-8e541a32.entry.js +0 -1
  202. package/dist/webcomponents/p-8f325782.entry.js +0 -1
  203. package/dist/webcomponents/p-987b5de2.entry.js +0 -1
  204. package/dist/webcomponents/p-a63fc384.entry.js +0 -1
  205. package/dist/webcomponents/p-a8220709.entry.js +0 -1
  206. package/dist/webcomponents/p-ae530971.entry.js +0 -1
  207. package/dist/webcomponents/p-b7cf49f4.entry.js +0 -1
  208. package/dist/webcomponents/p-b87b27ba.js +0 -1
  209. package/dist/webcomponents/p-bbed6107.entry.js +0 -1
  210. package/dist/webcomponents/p-be39c802.entry.js +0 -1
  211. package/dist/webcomponents/p-c28db166.js +0 -1
  212. package/dist/webcomponents/p-c9f8f7ec.entry.js +0 -1
  213. package/dist/webcomponents/p-d8355f91.entry.js +0 -1
  214. package/dist/webcomponents/p-e2c88817.entry.js +0 -1
  215. package/dist/webcomponents/p-e31f0f3e.entry.js +0 -1
  216. package/dist/webcomponents/p-edac2b43.entry.js +0 -1
  217. package/dist/webcomponents/p-ef23c091.entry.js +0 -1
  218. package/dist/webcomponents/p-f06910aa.entry.js +0 -1
  219. package/dist/webcomponents/p-f0866375.entry.js +0 -1
  220. package/dist/webcomponents/p-f0a06884.entry.js +0 -1
  221. package/dist/webcomponents/p-f2f94d9f.entry.js +0 -1
  222. package/dist/webcomponents/p-f49b7170.entry.js +0 -1
  223. package/dist/webcomponents/p-fb58feb5.entry.js +0 -1
  224. package/dist/webcomponents/p-fe33151d.entry.js +0 -1
@@ -0,0 +1,133 @@
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-9282eab8.js';
9
+ import { B as Button } from './p-9c9c7dac.js';
10
+ import { S as StyledHost } from './p-ba4bae6f.js';
11
+ import './p-492588bf.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 };
@@ -0,0 +1,117 @@
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-9282eab8.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-492588bf.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 +1,16 @@
1
- import{d as b}from"./p-1ff8810b.js";const t=(b,t)=>{b.setValues(Object.assign(Object.assign({},b.values.getValue()),t))},e=(b,e)=>{t(b,{address:Object.assign(Object.assign({},b.values.getValue().address),e)})},o=(e,o)=>{const s=b(e.detail);t(o,Object.assign(Object.assign({},o.values.getValue()),{dob_day:s.dob_day,dob_month:s.dob_month,dob_year:s.dob_year}))};export{e as a,o as b,t as u}
1
+ import { d as deconstructDate } from './p-1ff8810b.js';
2
+
3
+ const updateFormValues = (formController, newValues) => {
4
+ formController.setValues(Object.assign(Object.assign({}, formController.values.getValue()), newValues));
5
+ };
6
+ const updateAddressFormValues = (formController, newValues) => {
7
+ updateFormValues(formController, {
8
+ address: Object.assign(Object.assign({}, formController.values.getValue().address), newValues),
9
+ });
10
+ };
11
+ const updateDateOfBirthFormValues = (event, formController) => {
12
+ const dob_values = deconstructDate(event.detail);
13
+ updateFormValues(formController, Object.assign(Object.assign({}, formController.values.getValue()), { dob_day: dob_values.dob_day, dob_month: dob_values.dob_month, dob_year: dob_values.dob_year }));
14
+ };
15
+
16
+ export { updateAddressFormValues as a, updateDateOfBirthFormValues as b, updateFormValues as u };
@@ -0,0 +1,162 @@
1
+ import { h, r as registerInstance, c as createEvent } from './p-fad19d75.js';
2
+ import { p as pagingDefaults } from './p-56f6ce4c.js';
3
+ import './p-df21aaad.js';
4
+ import { a as PayoutStatuses, b as PayoutStatusesSafeNames } from './p-e3fab0e2.js';
5
+ import { b as formatDate, c as formatTime, f as formatCurrency } from './p-83125497.js';
6
+ import { a as ComponentErrorCodes, C as ComponentErrorSeverity } from './p-14c91ffd.js';
7
+ import { t as tableExportedParts } from './p-2b6c9c4f.js';
8
+ import { S as StyledHost } from './p-ba4bae6f.js';
9
+ import { T as TableLoadingState, a as TableEmptyState, b as TableErrorState } from './p-e333620e.js';
10
+
11
+ const DownloadIcon = (props) => (h("svg", Object.assign({ xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 24 24' }, props),
12
+ h("path", { d: 'M12 15.5l-5-5 1.41-1.41L12 12.67l3.59-3.58L17 10.5l-5 5z' }),
13
+ h("path", { d: 'M11 4h2v9h-2z' }),
14
+ h("path", { d: 'M5 18h14v2H5z' })));
15
+
16
+ const PayoutsListCore = class {
17
+ constructor(hostRef) {
18
+ registerInstance(this, hostRef);
19
+ this.rowClicked = createEvent(this, "payout-row-clicked", 7);
20
+ this.errorEvent = createEvent(this, "error-event", 7);
21
+ this.downloadCSV = (payoutId) => {
22
+ this.getPayoutCSV({
23
+ payoutId,
24
+ onError: () => {
25
+ this.errorEvent.emit({
26
+ errorCode: ComponentErrorCodes.FETCH_ERROR,
27
+ message: 'Failed to download CSV',
28
+ severity: ComponentErrorSeverity.ERROR,
29
+ });
30
+ },
31
+ });
32
+ };
33
+ this.handleDateChange = (name, value) => {
34
+ this.params = Object.assign(Object.assign({}, this.params), { [name]: value });
35
+ };
36
+ this.handleClickPrevious = (beforeCursor) => {
37
+ const newParams = Object.assign({}, this.params);
38
+ delete newParams.after_cursor;
39
+ this.params = Object.assign(Object.assign({}, newParams), { before_cursor: beforeCursor });
40
+ };
41
+ this.handleClickNext = (afterCursor) => {
42
+ const newParams = Object.assign({}, this.params);
43
+ delete newParams.before_cursor;
44
+ this.params = Object.assign(Object.assign({}, newParams), { after_cursor: afterCursor });
45
+ };
46
+ this.mapStatusToBadge = (status) => {
47
+ switch (status) {
48
+ case PayoutStatuses.scheduled:
49
+ return `<span class="badge bg-primary" title='Batched and scheduled to be transferred'>${PayoutStatusesSafeNames[status]}</span>`;
50
+ case PayoutStatuses.in_transit:
51
+ return `<span class="badge bg-primary" title='Transfer to your bank account has been initiated'>${PayoutStatusesSafeNames[status]}</span>`;
52
+ case PayoutStatuses.failed:
53
+ return `<span class="badge bg-danger" title='Transfer to your bank account failed'>${PayoutStatusesSafeNames[status]}</span>`;
54
+ case PayoutStatuses.canceled:
55
+ return `<span class="badge bg-danger" title='Transfer to your bank account failed'>${PayoutStatusesSafeNames[status]}</span>`;
56
+ case PayoutStatuses.forwarded:
57
+ return `<span class="badge bg-secondary" title='The funds have been forwarded to your next successful payout'>${PayoutStatusesSafeNames[status]}</span>`;
58
+ case PayoutStatuses.paid:
59
+ return `<span class="badge bg-success" title='Successfully deposited into your bank account'>${PayoutStatusesSafeNames[status]}</span>`;
60
+ }
61
+ };
62
+ this.rowClickHandler = (e) => {
63
+ const clickedPayoutID = e.target.closest('tr').dataset.rowEntityId;
64
+ if (!clickedPayoutID)
65
+ return;
66
+ this.rowClicked.emit(this.payouts.find((payout) => payout.id === clickedPayoutID));
67
+ };
68
+ this.getPayouts = undefined;
69
+ this.getPayoutCSV = undefined;
70
+ this.payouts = [];
71
+ this.loading = true;
72
+ this.errorMessage = undefined;
73
+ this.paging = pagingDefaults;
74
+ this.params = undefined;
75
+ }
76
+ updateOnPropChange() {
77
+ this.fetchData();
78
+ }
79
+ componentWillLoad() {
80
+ if (this.getPayouts) {
81
+ this.fetchData();
82
+ }
83
+ }
84
+ fetchData() {
85
+ this.loading = true;
86
+ this.getPayouts({
87
+ params: this.params,
88
+ onSuccess: ({ payouts, pagingInfo }) => {
89
+ this.payouts = payouts;
90
+ this.paging = pagingInfo;
91
+ this.loading = false;
92
+ },
93
+ onError: ({ error, code, severity }) => {
94
+ this.errorMessage = error;
95
+ this.errorEvent.emit({
96
+ errorCode: code,
97
+ message: error,
98
+ severity,
99
+ });
100
+ this.loading = false;
101
+ },
102
+ });
103
+ }
104
+ get entityId() {
105
+ return this.payouts.map((payout) => payout.id);
106
+ }
107
+ get columnData() {
108
+ return [
109
+ ['Paid Out On', 'The date each transaction occurred'],
110
+ ['Type', 'The type of each transaction'],
111
+ ['Account', 'The ID of the account associated with each payout'],
112
+ ['Paid Out To', 'The bank account to which each payout was transferred'],
113
+ ['Payments', 'Sum of payments in each payout'],
114
+ ['Refunds', 'Sum of refunds in each payout'],
115
+ ['Fees', 'Sum of fees in each payout'],
116
+ ['Other', 'Sum of less common transactions in each payout'],
117
+ ['Payout Amount', 'The net sum of all transactions in each payout'],
118
+ ['Status', 'The real-time status of each payout'],
119
+ ['Actions', ''],
120
+ ];
121
+ }
122
+ get rowData() {
123
+ return this.payouts.map((payout) => [
124
+ {
125
+ type: 'head',
126
+ value: `
127
+ <div class='fw-bold'>${formatDate(payout.created_at)}</div>
128
+ <div class='fw-bold'>${formatTime(payout.created_at)}</div>
129
+ `,
130
+ },
131
+ payout.payout_type,
132
+ payout.account_id,
133
+ `${payout.bank_account.full_name} ${payout.bank_account.account_number_last4}`,
134
+ formatCurrency(payout.payments_total),
135
+ formatCurrency(payout.refunds_total),
136
+ formatCurrency(payout.fees_total),
137
+ formatCurrency(payout.other_total),
138
+ formatCurrency(payout.amount),
139
+ { type: 'inner', value: this.mapStatusToBadge(payout.status) },
140
+ (h(DownloadIcon, { title: "Export CSV", onClick: () => this.downloadCSV(payout.id), style: { height: '24px', width: '24px', cursor: 'pointer' } })),
141
+ ]);
142
+ }
143
+ get showEmptyState() {
144
+ return !this.loading && !this.errorMessage && this.rowData.length < 1;
145
+ }
146
+ get showErrorState() {
147
+ return !this.loading && !!this.errorMessage;
148
+ }
149
+ get showRowData() {
150
+ return !this.showEmptyState && !this.showErrorState;
151
+ }
152
+ render() {
153
+ return (h(StyledHost, { key: '594c52003f897f4c50f79935e42a7042fb5ec168', exportedparts: tableExportedParts }, h("div", { key: 'f2b1d971e1e7bc5596459c071c3aa931ba4cb4b9', class: "row gy-3 mb-4" }, h("div", { key: 'd98e3ed56421493a60bd0a285079aa99ae705506', class: "col-2" }, h("form-control-date", { key: 'c9c899884bcc6fa6d306b95473ef0a7354e57bd5', name: "created_after", label: "Date from:", inputHandler: this.handleDateChange })), h("div", { key: '0059a75bf2f478b107d59bd9d7cc29de10dffe57', class: "col-2" }, h("form-control-date", { key: 'ef9a31ac8a8e7336386664b70289ee34677152a4', name: "created_before", label: "Date to:", inputHandler: this.handleDateChange }))), h("div", { key: '65da1114a66ac4cdf8d6ec012a42b2f760af5c76', class: "table-wrapper" }, h("table", { key: 'd68d8f61835cc4dc5dc988ff61843e6254494ace', class: "table table-hover" }, h("thead", { key: 'aa691db8fbfbcdad59acbdc1ef38497b552928ab', class: "table-head sticky-top", part: "table-head" }, h("tr", { key: 'aa9f61cbf05b9420026861cb14e6a30a6c9e347e', class: "table-light text-nowrap", part: "table-head-row" }, this.columnData.map((column) => (h("th", { part: "table-head-cell", scope: "col", title: Array.isArray(column) ? column[1] : '' }, Array.isArray(column) ? column[0] : column))))), h("tbody", { key: 'cf0127f26e8bc5b7afbbfc4a36fab4de948d1727', class: "table-body", part: "table-body" }, h(TableLoadingState, { key: 'd6b832786c4959176974c7a343442c8d1c50b5c2', columnSpan: this.columnData.length, isLoading: this.loading }), h(TableEmptyState, { key: '398a20957f76ba14e1b0677fbd6fbfbacce61fbb', isEmpty: this.showEmptyState, columnSpan: this.columnData.length }), h(TableErrorState, { key: 'd9f755a07a6f8cd4967eac60beff92f36322dcdd', columnSpan: this.columnData.length, errorMessage: this.errorMessage }), this.showRowData &&
154
+ this.rowData.map((data, index) => (h("tr", { "data-test-id": "table-row", "data-row-entity-id": this.entityId[index], onClick: this.rowClickHandler, part: `table-row ${index % 2 ? 'table-row-even' : 'table-row-odd'}` }, data.map((dataEntry) => ((dataEntry === null || dataEntry === void 0 ? void 0 : dataEntry.type) ? (h("td", { part: "table-cell", innerHTML: dataEntry.value })) : (h("td", { part: "table-cell" }, dataEntry)))))))), this.paging && (h("tfoot", { key: '503fa3a3a7ffe5d52b614153b286dd0326c02091', class: "sticky-bottom" }, h("tr", { key: 'e3af74b96bfc1f5ac1f0f0655eaed096102d0e89', class: "table-light align-middle" }, h("td", { key: 'a53f9d37181ea29a9fcb6ab46b2daf7cc66509be', part: "pagination-bar", colSpan: this.columnData.length }, h("pagination-menu", { key: 'b0779289444747e0b18bb63e6a17cdc89bd390ca', paging: Object.assign(Object.assign({}, this.paging), { handleClickPrevious: this.handleClickPrevious, handleClickNext: this.handleClickNext }), params: this.params })))))))));
155
+ }
156
+ static get watchers() { return {
157
+ "params": ["updateOnPropChange"],
158
+ "getPayouts": ["updateOnPropChange"]
159
+ }; }
160
+ };
161
+
162
+ export { PayoutsListCore as payouts_list_core };
@@ -1 +1,28 @@
1
- import{a as t}from"./p-14c91ffd.js";const a=t=>"string"==typeof t?t:t.message,e=a=>{switch(a){case"not_authenticated":return t.NOT_AUTHENTICATED;case"invalid_parameter":return t.INVALID_PARAMETER;default:return t.FETCH_ERROR}};export{e as a,a as g}
1
+ import { a as ComponentErrorCodes } from './p-14c91ffd.js';
2
+
3
+ // Errors on [capital]/config/locales/en.yml
4
+ // Add more errors as needed
5
+ const API_ERRORS = {
6
+ NOT_AUTHENTICATED: 'not_authenticated',
7
+ INVALID_PARAMETER: 'invalid_parameter',
8
+ };
9
+
10
+ const getErrorMessage = (error) => {
11
+ if (typeof error === 'string') {
12
+ return error;
13
+ }
14
+ return error.message;
15
+ };
16
+ const getErrorCode = (code) => {
17
+ switch (code) {
18
+ case API_ERRORS.NOT_AUTHENTICATED:
19
+ return ComponentErrorCodes.NOT_AUTHENTICATED;
20
+ case API_ERRORS.INVALID_PARAMETER:
21
+ return ComponentErrorCodes.INVALID_PARAMETER;
22
+ // add more cases as needed
23
+ default:
24
+ return ComponentErrorCodes.FETCH_ERROR;
25
+ }
26
+ };
27
+
28
+ export { getErrorCode as a, getErrorMessage as g };