@justifi/webcomponents 4.19.3-rc-1 → 4.19.3-rc-2

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 (164) hide show
  1. package/dist/cjs/{Analytics-84cccd4a.js → Analytics-adc90fc6.js} +1 -1
  2. package/dist/cjs/justifi-bank-account-form.cjs.entry.js +2 -2
  3. package/dist/cjs/justifi-business-details.cjs.entry.js +2 -2
  4. package/dist/cjs/justifi-business-form.cjs.entry.js +2 -2
  5. package/dist/cjs/justifi-card-form.cjs.entry.js +2 -2
  6. package/dist/cjs/justifi-checkout-core.cjs.entry.js +2 -1
  7. package/dist/cjs/justifi-checkout.cjs.entry.js +2 -2
  8. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +2 -2
  9. package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +4 -1
  10. package/dist/cjs/justifi-payment-details.cjs.entry.js +2 -2
  11. package/dist/cjs/justifi-payment-form.cjs.entry.js +2 -2
  12. package/dist/cjs/justifi-payment-method-form.cjs.entry.js +1 -1
  13. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +2 -2
  14. package/dist/cjs/justifi-payments-list.cjs.entry.js +2 -2
  15. package/dist/cjs/justifi-payout-details.cjs.entry.js +2 -2
  16. package/dist/cjs/justifi-payouts-list.cjs.entry.js +2 -2
  17. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +2 -2
  18. package/dist/cjs/{package-d2e04416.js → package-22d30c5d.js} +1 -1
  19. package/dist/collection/components/checkout/checkout-core.js +2 -1
  20. package/dist/collection/components/checkout/new-payment-method.js +4 -1
  21. package/dist/docs.json +1 -1
  22. package/dist/esm/{Analytics-a742f6d2.js → Analytics-a8eb7344.js} +1 -1
  23. package/dist/esm/justifi-bank-account-form.entry.js +2 -2
  24. package/dist/esm/justifi-business-details.entry.js +2 -2
  25. package/dist/esm/justifi-business-form.entry.js +2 -2
  26. package/dist/esm/justifi-card-form.entry.js +2 -2
  27. package/dist/esm/justifi-checkout-core.entry.js +2 -1
  28. package/dist/esm/justifi-checkout.entry.js +2 -2
  29. package/dist/esm/justifi-gross-payment-chart.entry.js +2 -2
  30. package/dist/esm/justifi-new-payment-method_4.entry.js +4 -1
  31. package/dist/esm/justifi-payment-details.entry.js +2 -2
  32. package/dist/esm/justifi-payment-form.entry.js +2 -2
  33. package/dist/esm/justifi-payment-method-form.entry.js +1 -1
  34. package/dist/esm/justifi-payment-provisioning.entry.js +2 -2
  35. package/dist/esm/justifi-payments-list.entry.js +2 -2
  36. package/dist/esm/justifi-payout-details.entry.js +2 -2
  37. package/dist/esm/justifi-payouts-list.entry.js +2 -2
  38. package/dist/esm/justifi-season-interruption-insurance.entry.js +2 -2
  39. package/dist/esm/{package-a70c900f.js → package-ccb774a9.js} +1 -1
  40. package/dist/module/checkout-core.js +2 -1
  41. package/dist/module/new-payment-method.js +4 -1
  42. package/dist/module/package.js +1 -1
  43. package/dist/types/components/checkout/new-payment-method.d.ts +1 -0
  44. package/dist/webcomponents/index.esm.js +1 -0
  45. package/dist/webcomponents/p-01a404ca.entry.js +44 -0
  46. package/dist/webcomponents/p-03d35880.entry.js +130 -0
  47. package/dist/webcomponents/p-06ff0429.entry.js +65 -0
  48. package/dist/webcomponents/p-08b0fb31.js +41 -1
  49. package/dist/webcomponents/p-0e1bc91e.js +28 -1
  50. package/dist/webcomponents/p-10875f3d.entry.js +97 -0
  51. package/dist/webcomponents/p-14c91ffd.js +20 -1
  52. package/dist/webcomponents/p-157acba8.entry.js +98 -0
  53. package/dist/webcomponents/p-15eafa87.js +77 -0
  54. package/dist/webcomponents/p-18fa0479.entry.js +131 -0
  55. package/dist/webcomponents/p-1a5120f4.entry.js +145 -0
  56. package/dist/webcomponents/p-1ad5995e.js +3599 -1
  57. package/dist/webcomponents/p-1ff8810b.js +29 -1
  58. package/dist/webcomponents/p-2338affa.js +213 -1
  59. package/dist/webcomponents/p-24dc023a.entry.js +791 -0
  60. package/dist/webcomponents/p-25d8cd65.entry.js +102 -0
  61. package/dist/webcomponents/p-27d87fe2.entry.js +133 -0
  62. package/dist/webcomponents/p-29c0b182.js +114 -1
  63. package/dist/webcomponents/p-2b6c9c4f.js +7 -1
  64. package/dist/webcomponents/p-2e8f4937.js +79 -0
  65. package/dist/webcomponents/p-2eab3c90.js +3052 -1
  66. package/dist/webcomponents/p-3395e896.entry.js +74 -0
  67. package/dist/webcomponents/p-3fd13ca3.js +52 -1
  68. package/dist/webcomponents/p-47d79529.js +18 -1
  69. package/dist/webcomponents/p-525db3e8.js +22 -1
  70. package/dist/webcomponents/p-53ecc8b9.entry.js +261 -0
  71. package/dist/webcomponents/p-5482d030.entry.js +21 -0
  72. package/dist/webcomponents/p-56f6ce4c.js +10 -1
  73. package/dist/webcomponents/p-576826b1.entry.js +43 -0
  74. package/dist/webcomponents/p-5968ff8a.js +178 -1
  75. package/dist/webcomponents/p-5f835b89.entry.js +606 -0
  76. package/dist/webcomponents/p-6078a370.js +244 -1
  77. package/dist/webcomponents/p-6124b1b3.entry.js +80 -0
  78. package/dist/webcomponents/p-70a2aa74.entry.js +76 -0
  79. package/dist/webcomponents/p-7582b554.entry.js +18 -0
  80. package/dist/webcomponents/p-75fd6367.entry.js +149 -0
  81. package/dist/webcomponents/p-79646550.entry.js +61 -0
  82. package/dist/webcomponents/p-7d85af5c.js +16 -1
  83. package/dist/webcomponents/p-800d31fe.entry.js +162 -0
  84. package/dist/webcomponents/p-8115b2f4.js +28 -1
  85. package/dist/webcomponents/p-83125497.js +4027 -1
  86. package/dist/webcomponents/p-85fc69e5.js +90 -1
  87. package/dist/webcomponents/p-89887332.js +301 -1
  88. package/dist/webcomponents/p-8df7bde8.js +27 -1
  89. package/dist/webcomponents/p-8eb774df.entry.js +54 -0
  90. package/dist/webcomponents/p-9c9c7dac.js +24 -1
  91. package/dist/webcomponents/p-9e17630d.entry.js +1684 -0
  92. package/dist/webcomponents/p-9f94bbb6.entry.js +118 -0
  93. package/dist/webcomponents/p-a4e8573e.entry.js +94 -0
  94. package/dist/webcomponents/p-a5a225d9.entry.js +125 -0
  95. package/dist/webcomponents/p-a5fb51dc.entry.js +131 -0
  96. package/dist/webcomponents/p-ab4816e1.entry.js +117 -0
  97. package/dist/webcomponents/p-ac086069.entry.js +58 -0
  98. package/dist/webcomponents/p-af244664.js +126 -1
  99. package/dist/webcomponents/p-b4b8b531.js +44 -1
  100. package/dist/webcomponents/p-b82c146f.entry.js +111 -0
  101. package/dist/webcomponents/p-ba4bae6f.js +12 -1
  102. package/dist/webcomponents/p-ba5fae28.js +90 -1
  103. package/dist/webcomponents/p-bd66f9d2.entry.js +101 -0
  104. package/dist/webcomponents/p-cc39384f.entry.js +99 -0
  105. package/dist/webcomponents/p-d17aee2b.entry.js +26 -0
  106. package/dist/webcomponents/p-d89bad72.js +39 -1
  107. package/dist/webcomponents/p-dad3e069.entry.js +298 -0
  108. package/dist/webcomponents/p-dce846bf.js +27 -1
  109. package/dist/webcomponents/p-df21aaad.js +120 -1
  110. package/dist/webcomponents/p-e1255160.js +3 -1
  111. package/dist/webcomponents/p-e1e7525b.entry.js +73 -0
  112. package/dist/webcomponents/p-e333620e.js +34 -1
  113. package/dist/webcomponents/p-e356f280.entry.js +29 -0
  114. package/dist/webcomponents/p-e3fab0e2.js +43 -1
  115. package/dist/webcomponents/p-e9a5cb95.entry.js +94 -0
  116. package/dist/webcomponents/p-ec854a3e.entry.js +11053 -0
  117. package/dist/webcomponents/p-edc37d1f.entry.js +75 -0
  118. package/dist/webcomponents/p-f02b75dc.entry.js +96 -0
  119. package/dist/webcomponents/p-fad19d75.js +1638 -2
  120. package/dist/webcomponents/webcomponents.css +362 -4
  121. package/dist/webcomponents/webcomponents.esm.js +20 -1
  122. package/package.json +1 -1
  123. package/dist/webcomponents/p-07109641.entry.js +0 -1
  124. package/dist/webcomponents/p-080fedb5.entry.js +0 -1
  125. package/dist/webcomponents/p-0e3e3544.entry.js +0 -1
  126. package/dist/webcomponents/p-0f7b9555.entry.js +0 -1
  127. package/dist/webcomponents/p-1295970b.entry.js +0 -1
  128. package/dist/webcomponents/p-15b9b267.entry.js +0 -1
  129. package/dist/webcomponents/p-17e4246f.entry.js +0 -1
  130. package/dist/webcomponents/p-1a43e355.entry.js +0 -19
  131. package/dist/webcomponents/p-232278e0.entry.js +0 -1
  132. package/dist/webcomponents/p-30a493cd.entry.js +0 -1
  133. package/dist/webcomponents/p-32211b2f.entry.js +0 -1
  134. package/dist/webcomponents/p-3352353a.entry.js +0 -1
  135. package/dist/webcomponents/p-462dc522.entry.js +0 -1
  136. package/dist/webcomponents/p-487b72a8.entry.js +0 -1
  137. package/dist/webcomponents/p-4abc17f0.entry.js +0 -1
  138. package/dist/webcomponents/p-52021fa1.entry.js +0 -1
  139. package/dist/webcomponents/p-53e64f15.entry.js +0 -1
  140. package/dist/webcomponents/p-62b32c4c.entry.js +0 -1
  141. package/dist/webcomponents/p-701e03a8.entry.js +0 -1
  142. package/dist/webcomponents/p-79cfbcfa.entry.js +0 -1
  143. package/dist/webcomponents/p-8e263202.js +0 -1
  144. package/dist/webcomponents/p-8e541a32.entry.js +0 -1
  145. package/dist/webcomponents/p-99899e7e.entry.js +0 -1
  146. package/dist/webcomponents/p-9993e959.entry.js +0 -1
  147. package/dist/webcomponents/p-b29f5084.entry.js +0 -1
  148. package/dist/webcomponents/p-bbed6107.entry.js +0 -1
  149. package/dist/webcomponents/p-be39c802.entry.js +0 -1
  150. package/dist/webcomponents/p-c9f8f7ec.entry.js +0 -1
  151. package/dist/webcomponents/p-cc97f21b.entry.js +0 -1
  152. package/dist/webcomponents/p-cd37a87e.entry.js +0 -1
  153. package/dist/webcomponents/p-d4c94340.entry.js +0 -1
  154. package/dist/webcomponents/p-d5c9e036.entry.js +0 -1
  155. package/dist/webcomponents/p-d6a998e4.js +0 -1
  156. package/dist/webcomponents/p-d8355f91.entry.js +0 -1
  157. package/dist/webcomponents/p-e2c88817.entry.js +0 -1
  158. package/dist/webcomponents/p-e31f0f3e.entry.js +0 -1
  159. package/dist/webcomponents/p-ea3598f3.entry.js +0 -1
  160. package/dist/webcomponents/p-eca70b1d.entry.js +0 -1
  161. package/dist/webcomponents/p-f0866375.entry.js +0 -1
  162. package/dist/webcomponents/p-f117d1d1.entry.js +0 -1
  163. package/dist/webcomponents/p-fb58feb5.entry.js +0 -1
  164. package/dist/webcomponents/p-fe33151d.entry.js +0 -1
@@ -0,0 +1,58 @@
1
+ import { r as registerInstance, c as createEvent, h } from './p-fad19d75.js';
2
+ import { M as MapPaymentStatusToBadge, f as formatCurrency, b as formatDate, c as formatTime, s as snakeCaseToHumanReadable } from './p-83125497.js';
3
+ import { a as EntityHeadInfo, b as EntityHeadInfoItem, D as DetailSectionTitle, c as DetailItem, C as CodeBlock, E as ErrorState, L as LoadingState } from './p-dce846bf.js';
4
+ import { S as StyledHost } from './p-ba4bae6f.js';
5
+
6
+ const PaymentDetailsCore = class {
7
+ constructor(hostRef) {
8
+ registerInstance(this, hostRef);
9
+ this.errorEvent = createEvent(this, "error-event", 7);
10
+ this.getPaymentDetails = undefined;
11
+ this.payment = undefined;
12
+ this.loading = true;
13
+ this.errorMessage = undefined;
14
+ }
15
+ componentWillLoad() {
16
+ if (this.getPaymentDetails) {
17
+ this.fetchData();
18
+ }
19
+ }
20
+ updateOnPropChange() {
21
+ this.fetchData();
22
+ }
23
+ fetchData() {
24
+ this.loading = true;
25
+ this.getPaymentDetails({
26
+ onSuccess: ({ payment }) => {
27
+ this.payment = payment;
28
+ this.loading = false;
29
+ this.errorMessage = null;
30
+ },
31
+ onError: ({ error, code, severity }) => {
32
+ this.errorMessage = error;
33
+ this.errorEvent.emit({
34
+ errorCode: code,
35
+ message: error,
36
+ severity,
37
+ });
38
+ this.loading = false;
39
+ },
40
+ });
41
+ }
42
+ render() {
43
+ var _a;
44
+ return (h(StyledHost, { key: 'aaaea4076938af5a74197256dba1093265f0e2d6' }, this.loading && LoadingState(), !this.loading && this.errorMessage && ErrorState(this.errorMessage), !this.loading && !this.errorMessage &&
45
+ this.payment && (h("justifi-details", { key: '12f06fa05915380403e244cbed053d0c04bfa1d4', "error-message": this.errorMessage }, h(EntityHeadInfo, { key: '4d496def6abfc728e6f184fb0729ac648fb2deaf', slot: "head-info", badge: h("span", { slot: 'badge', innerHTML: MapPaymentStatusToBadge(this.payment.status) }), title: `${formatCurrency(this.payment.amount)} ${(_a = this.payment) === null || _a === void 0 ? void 0 : _a.currency.toUpperCase()}` }, h(EntityHeadInfoItem, { key: '78dcff13206646d594bdc80f6297d45dc9932694', classes: "border-1 border-end", title: "Updated At", value: `${formatDate(this.payment.updated_at)} ${formatTime(this.payment.updated_at)}` }), h(EntityHeadInfoItem, { key: 'dfa0de667ebd28efd217b6bdf548b9b1b728b57e', classes: "border-1 border-end", title: "Created At", value: `${formatDate(this.payment.created_at)} ${formatTime(this.payment.created_at)}` }), h(EntityHeadInfoItem, { key: 'b449b180034f28504007a9c2fb0598607dc00efb', title: "ID", value: this.payment.id })), h("div", { key: '62af84e244e38b24b32f791d13f1b21b49942597', slot: 'detail-sections' }, h(DetailSectionTitle, { key: '0ddb0366b4ab737c7b08a37764b8ce2f7ec4a1e9', sectionTitle: "Details" }), h("div", { key: 'cb699194db16cb8608834779f560e882f6f9da7c', class: "d-table gap-2 w-100" }, h(DetailItem, { key: '3b6eb4a8b782668951bba90be3b5d522f3f7c69b', title: "Amount", value: formatCurrency(this.payment.amount) }), h(DetailItem, { key: '7a59ab0b12a263c38c40a98acbff6492d370b28b', title: "Fees", value: formatCurrency(this.payment.fee_amount) }), h(DetailItem, { key: 'a9eaa5d1959425205c144dc2aa7c7fad77014290', title: "Refunded", value: formatCurrency(this.payment.amount_refunded) }), h(DetailItem, { key: 'd70c3a4bf48c9c69625d5f27f1095f9b0744a71e', title: "Net", value: formatCurrency(this.payment.balance) }), h(DetailItem, { key: '28f526b1adcd475c2ae88a8bf09ae4aea7935df6', title: "Status", value: MapPaymentStatusToBadge(this.payment.status) }), h(DetailItem, { key: '700f51d787f20f575e3e11aa72a8da29a9587c2a', title: "Payment ID", value: this.payment.id }), h(DetailItem, { key: 'ea72ecc9c2f5055d4b0f6b37cd16cb318f9a797c', title: "Processing Fees", value: formatCurrency(this.payment.fee_amount) }), h(DetailItem, { key: '9d66af2c0c0baef4e8b7b021daf0b4d6adb267d2', title: "Statement Descriptor", value: this.payment.statement_descriptor }), h(DetailItem, { key: '3f21501c1e08feeee1e7427a42faf1c5d1d9c84d', title: "Description", value: this.payment.description })), this.payment.payment_method.card && [
46
+ h(DetailSectionTitle, { key: 'b7767b93e090c0195aca6c99b66b48d61b6134b3', sectionTitle: "Payment Method" }),
47
+ h("div", { key: 'a363c7a7e69932a8ffeddb5e0d53f7df13119a9a', class: "d-table gap-2 w-100" }, h(DetailItem, { key: 'fb0e1f64fcec23e513590b3048593565685d8400', title: "ID", value: this.payment.payment_method.card.id }), h(DetailItem, { key: 'bc181b1b94039e1aad341a8e563ba923976c806b', title: "Payment Type", value: "Card" }), h(DetailItem, { key: '88b21dd2368b88232cd0f464c381d4423fe3c774', title: "Last 4 Numbers", value: this.payment.payment_method.lastFourDigits }), h(DetailItem, { key: '040fd71315ead633f9c89e9a9dad906889759d77', title: "Brand", value: snakeCaseToHumanReadable(this.payment.payment_method.card.brand) }), h(DetailItem, { key: '35ebc74de2c5c8fafd95fc5b15ff4f2ca85220cc', title: "Cardholder", value: this.payment.payment_method.payersName }))
48
+ ], this.payment.payment_method.bank_account && [
49
+ h(DetailSectionTitle, { key: 'f10eef0b4e4067fb78dbff16719a6f266f4e6bab', sectionTitle: "Payment Method" }),
50
+ h("div", { key: '6c1ef713b5dcabba5b516f3cbbd088d098873303', class: "d-table gap-2 w-100" }, h(DetailItem, { key: '8880fd0fb2b16ee6f177aba15d6f4485c95af252', title: "ID", value: this.payment.payment_method.bank_account.id }), h(DetailItem, { key: 'baa70304d2972f69ce8a5d077a076b16f986745b', title: "Last 4 Numbers", value: this.payment.payment_method.lastFourDigits }), h(DetailItem, { key: 'dcb63b9258bea698bf2d165c611dfa05cb320f30', title: "Bank Name", value: this.payment.payment_method.bank_account.brand }), h(DetailItem, { key: '806696c15aa5ef242c230d9c9aea642ddfdfd93d', title: "Account Owner", value: this.payment.payment_method.payersName }))
51
+ ], h(DetailSectionTitle, { key: '83289d8f2cf57a624678260555f00af4ea96a566', sectionTitle: 'Metadata' }), h("div", { key: '02e248b962e0c06f4d83bae75a5759b234fea36b', class: "d-table gap-2 w-100" }, h(CodeBlock, { key: '5d81879c7815102219ed010dab9f573ad6b7985d', metadata: this.payment.metadata })))))));
52
+ }
53
+ static get watchers() { return {
54
+ "getPaymentDetails": ["updateOnPropChange"]
55
+ }; }
56
+ };
57
+
58
+ export { PaymentDetailsCore as payment_details_core };
@@ -1 +1,126 @@
1
- import{f as s,c as t,g as i}from"./p-1ff8810b.js";class h{constructor(i){this.address=Object.assign({},new r(i.address||{})),this.created_at=i.created_at,this.dob_day=s(i.dob_day),this.dob_month=s(i.dob_month),this.dob_year=i.dob_year,this.dob_full=t(this.dob_year,this.dob_month,this.dob_day)||"",this.documents=i.documents,this.email=i.email,this.id=i.id,this.business_id=i.business_id,this.is_owner=i.is_owner,this.metadata=i.metadata,this.name=i.name,this.phone=i.phone,this.platform_account_id=i.platform_account_id,this.identification_number=i.identification_number,this.ssn_last4=i.ssn_last4,this.title=i.title,this.updated_at=i.updated_at}}class c{constructor(i){this.address=Object.assign({},new r(i.address||{})),this.created_at=i.created_at,this.dob_day=s(i.dob_day),this.dob_month=s(i.dob_month),this.dob_year=i.dob_year,this.dob_full=t(this.dob_year,this.dob_month,this.dob_day)||"",this.documents=i.documents,this.email=i.email,this.id=i.id,this.business_id=i.business_id,this.is_owner=i.is_owner,this.metadata=i.metadata,this.name=i.name,this.phone=i.phone,this.platform_account_id=i.platform_account_id,this.identification_number=i.identification_number,this.ssn_last4=i.ssn_last4,this.title=i.title,this.updated_at=i.updated_at}}var o;!function(s){s.sole_proprietor="sole_proprietor",s.partnership="partnership",s.corporation="corporation",s.public_company="public_company",s.limited="limited",s.non_profit="non_profit",s.government="government"}(o||(o={}));class r{constructor(s){this.id=s.id,this.platform_account_id=s.platform_account_id,this.line1=s.line1,this.line2=s.line2,this.postal_code=s.postal_code,this.city=s.city,this.state=i(s.state),this.country=s.country||"USA",this.created_at=s.created_at,this.updated_at=s.updated_at}}class a{constructor(s){this.business_revenue=s.business_revenue,this.business_payment_volume=s.business_payment_volume,this.business_when_service_received=s.business_when_service_received,this.business_recurring_payments=s.business_recurring_payments,this.business_recurring_payments_percentage=s.business_recurring_payments_percentage,this.business_seasonal=s.business_seasonal,this.business_other_payment_details=s.business_other_payment_details}}class n{constructor(s){this.classification=s.classification,this.legal_name=s.legal_name,this.doing_business_as=s.doing_business_as,this.industry=s.industry,this.tax_id=s.tax_id,this.website_url=s.website_url,this.email=s.email,this.phone=s.phone,this.date_of_incorporation=s.date_of_incorporation}}class e{constructor(s){this.additional_questions=Object.assign({},new a(s.additional_questions||{})),this.associated_accounts=s.associated_accounts,this.classification=s.classification,this.bank_accounts=s.bank_accounts,this.created_at=s.created_at,this.documents=s.documents,this.doing_business_as=s.doing_business_as,this.email=s.email,this.id=s.id,this.industry=s.industry,this.legal_address=Object.assign({},new r(s.legal_address||{})),this.legal_name=s.legal_name,this.metadata=s.metadata,this.owners=s.owners,this.phone=s.phone,this.platform_account_id=s.platform_account_id,this.product_categories=s.product_categories,this.representative=Object.assign({},new c(s.representative||{})),this.tax_id=s.tax_id,this.terms_conditions_accepted=s.terms_conditions_accepted,this.updated_at=s.updated_at,this.website_url=s.website_url,this.date_of_incorporation=s.date_of_incorporation}}export{a as A,e as B,n as C,h as O,c as R,o as a,r as b}
1
+ import { f as filterNumber, c as constructDate, g as getStateAbbreviation } from './p-1ff8810b.js';
2
+
3
+ class Owner {
4
+ constructor(owner) {
5
+ this.address = Object.assign({}, new Address(owner.address || {}));
6
+ this.created_at = owner.created_at;
7
+ this.dob_day = filterNumber(owner.dob_day);
8
+ this.dob_month = filterNumber(owner.dob_month);
9
+ this.dob_year = owner.dob_year;
10
+ this.dob_full = constructDate(this.dob_year, this.dob_month, this.dob_day) || '';
11
+ this.documents = owner.documents;
12
+ this.email = owner.email;
13
+ this.id = owner.id;
14
+ this.business_id = owner.business_id;
15
+ this.is_owner = owner.is_owner;
16
+ this.metadata = owner.metadata;
17
+ this.name = owner.name;
18
+ this.phone = owner.phone;
19
+ this.platform_account_id = owner.platform_account_id;
20
+ this.identification_number = owner.identification_number;
21
+ this.ssn_last4 = owner.ssn_last4;
22
+ this.title = owner.title;
23
+ this.updated_at = owner.updated_at;
24
+ }
25
+ }
26
+ class Representative {
27
+ constructor(representative) {
28
+ this.address = Object.assign({}, new Address(representative.address || {}));
29
+ this.created_at = representative.created_at;
30
+ this.dob_day = filterNumber(representative.dob_day);
31
+ this.dob_month = filterNumber(representative.dob_month);
32
+ this.dob_year = representative.dob_year;
33
+ this.dob_full = constructDate(this.dob_year, this.dob_month, this.dob_day) || '';
34
+ this.documents = representative.documents;
35
+ this.email = representative.email;
36
+ this.id = representative.id;
37
+ this.business_id = representative.business_id;
38
+ this.is_owner = representative.is_owner;
39
+ this.metadata = representative.metadata;
40
+ this.name = representative.name;
41
+ this.phone = representative.phone;
42
+ this.platform_account_id = representative.platform_account_id;
43
+ this.identification_number = representative.identification_number;
44
+ this.ssn_last4 = representative.ssn_last4;
45
+ this.title = representative.title;
46
+ this.updated_at = representative.updated_at;
47
+ }
48
+ }
49
+
50
+ var BusinessClassification;
51
+ (function (BusinessClassification) {
52
+ BusinessClassification["sole_proprietor"] = "sole_proprietor";
53
+ BusinessClassification["partnership"] = "partnership";
54
+ BusinessClassification["corporation"] = "corporation";
55
+ BusinessClassification["public_company"] = "public_company";
56
+ BusinessClassification["limited"] = "limited";
57
+ BusinessClassification["non_profit"] = "non_profit";
58
+ BusinessClassification["government"] = "government";
59
+ })(BusinessClassification || (BusinessClassification = {}));
60
+ class Address {
61
+ constructor(address) {
62
+ this.id = address.id;
63
+ this.platform_account_id = address.platform_account_id;
64
+ this.line1 = address.line1;
65
+ this.line2 = address.line2;
66
+ this.postal_code = address.postal_code;
67
+ this.city = address.city;
68
+ this.state = getStateAbbreviation(address.state);
69
+ this.country = address.country || 'USA';
70
+ this.created_at = address.created_at;
71
+ this.updated_at = address.updated_at;
72
+ }
73
+ }
74
+ class AdditionalQuestions {
75
+ constructor(additionalQuestions) {
76
+ this.business_revenue = additionalQuestions.business_revenue;
77
+ this.business_payment_volume = additionalQuestions.business_payment_volume;
78
+ this.business_when_service_received = additionalQuestions.business_when_service_received;
79
+ this.business_recurring_payments = additionalQuestions.business_recurring_payments;
80
+ this.business_recurring_payments_percentage = additionalQuestions.business_recurring_payments_percentage;
81
+ this.business_seasonal = additionalQuestions.business_seasonal;
82
+ this.business_other_payment_details = additionalQuestions.business_other_payment_details;
83
+ }
84
+ }
85
+ class CoreBusinessInfo {
86
+ constructor(coreBusinessInfo) {
87
+ this.classification = coreBusinessInfo.classification;
88
+ this.legal_name = coreBusinessInfo.legal_name;
89
+ this.doing_business_as = coreBusinessInfo.doing_business_as;
90
+ this.industry = coreBusinessInfo.industry;
91
+ this.tax_id = coreBusinessInfo.tax_id;
92
+ this.website_url = coreBusinessInfo.website_url;
93
+ this.email = coreBusinessInfo.email;
94
+ this.phone = coreBusinessInfo.phone;
95
+ this.date_of_incorporation = coreBusinessInfo.date_of_incorporation;
96
+ }
97
+ }
98
+ class Business {
99
+ constructor(business) {
100
+ this.additional_questions = Object.assign({}, new AdditionalQuestions(business.additional_questions || {}));
101
+ this.associated_accounts = business.associated_accounts;
102
+ this.classification = business.classification;
103
+ this.bank_accounts = business.bank_accounts;
104
+ this.created_at = business.created_at;
105
+ this.documents = business.documents;
106
+ this.doing_business_as = business.doing_business_as;
107
+ this.email = business.email;
108
+ this.id = business.id;
109
+ this.industry = business.industry;
110
+ this.legal_address = Object.assign({}, new Address(business.legal_address || {}));
111
+ this.legal_name = business.legal_name;
112
+ this.metadata = business.metadata;
113
+ this.owners = business.owners;
114
+ this.phone = business.phone;
115
+ this.platform_account_id = business.platform_account_id;
116
+ this.product_categories = business.product_categories;
117
+ this.representative = Object.assign({}, new Representative(business.representative || {}));
118
+ this.tax_id = business.tax_id;
119
+ this.terms_conditions_accepted = business.terms_conditions_accepted;
120
+ this.updated_at = business.updated_at;
121
+ this.website_url = business.website_url;
122
+ this.date_of_incorporation = business.date_of_incorporation;
123
+ }
124
+ }
125
+
126
+ export { AdditionalQuestions as A, Business as B, CoreBusinessInfo as C, Owner as O, Representative as R, BusinessClassification as a, Address as b };
@@ -1 +1,44 @@
1
- import{A as a}from"./p-29c0b182.js";import"./p-56f6ce4c.js";import"./p-df21aaad.js";import"./p-e3fab0e2.js";import{C as t}from"./p-14c91ffd.js";import{g as o,a as r}from"./p-8115b2f4.js";class s{async fetchPayouts(t,o,r){return a({authToken:o,apiOrigin:""}).get(`account/${t}/payouts`,r)}async fetchPayout(t,o){return a({authToken:o,apiOrigin:""}).get(`payouts/${t}`)}async fetchCSV(t,o){return a({authToken:o,apiOrigin:""}).get(`reports/payouts/${t}`)}}const e=({authToken:a,service:s})=>async({payoutId:e,onError:c})=>{try{const{data:t}=await s.fetchCSV(e,a),o=document.createElement("a");o.href=t.csv_url,o.click()}catch(a){c({error:o(a),code:r(null==a?void 0:a.code),severity:t.ERROR})}};export{s as P,e as m}
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
+ import { C as ComponentErrorSeverity } from './p-14c91ffd.js';
6
+ import { g as getErrorMessage, a as getErrorCode } from './p-8115b2f4.js';
7
+
8
+ class PayoutService {
9
+ async fetchPayouts(accountId, authToken, params) {
10
+ const api = Api({ authToken, apiOrigin: "" });
11
+ const endpoint = `account/${accountId}/payouts`;
12
+ return api.get(endpoint, params);
13
+ }
14
+ async fetchPayout(payoutId, authToken) {
15
+ const api = Api({ authToken, apiOrigin: "" });
16
+ const endpoint = `payouts/${payoutId}`;
17
+ return api.get(endpoint);
18
+ }
19
+ async fetchCSV(payoutId, authToken) {
20
+ const api = Api({ authToken, apiOrigin: "" });
21
+ const endpoint = `reports/payouts/${payoutId}`;
22
+ return api.get(endpoint);
23
+ }
24
+ }
25
+
26
+ const makeGetPayoutCSV = ({ authToken, service }) => async ({ payoutId, onError }) => {
27
+ try {
28
+ const { data } = await service.fetchCSV(payoutId, authToken);
29
+ const a = document.createElement('a');
30
+ a.href = data.csv_url;
31
+ a.click();
32
+ }
33
+ catch (error) {
34
+ const errorMessage = getErrorMessage(error);
35
+ const code = getErrorCode(error === null || error === void 0 ? void 0 : error.code);
36
+ onError({
37
+ error: errorMessage,
38
+ code,
39
+ severity: ComponentErrorSeverity.ERROR,
40
+ });
41
+ }
42
+ };
43
+
44
+ export { PayoutService as P, makeGetPayoutCSV as m };
@@ -0,0 +1,111 @@
1
+ import { r as registerInstance, h, c as createEvent, H as Host, g as getElement } from './p-fad19d75.js';
2
+
3
+ const FormControlErrorText = class {
4
+ constructor(hostRef) {
5
+ registerInstance(this, hostRef);
6
+ this.errorText = undefined;
7
+ this.name = undefined;
8
+ }
9
+ render() {
10
+ if (!this.errorText) {
11
+ return null;
12
+ }
13
+ return (h("small", { class: 'form-text text-danger', id: `form-error-text-${this.name}` }, this.errorText));
14
+ }
15
+ };
16
+
17
+ const FormControlHelpText = class {
18
+ constructor(hostRef) {
19
+ registerInstance(this, hostRef);
20
+ this.helpText = undefined;
21
+ this.name = undefined;
22
+ }
23
+ render() {
24
+ if (!this.helpText) {
25
+ return null;
26
+ }
27
+ return (h("small", { class: 'form-text text-muted', id: `form-help-text-${this.name}` }, this.helpText));
28
+ }
29
+ };
30
+
31
+ const SelectInput = class {
32
+ constructor(hostRef) {
33
+ registerInstance(this, hostRef);
34
+ this.formControlInput = createEvent(this, "formControlInput", 7);
35
+ this.formControlBlur = createEvent(this, "formControlBlur", 7);
36
+ this.handleFormControlInput = (event) => {
37
+ const target = event.target;
38
+ const name = target.getAttribute('name');
39
+ this.inputHandler(name, target.value);
40
+ this.formControlInput.emit(target.value);
41
+ };
42
+ this.updateInput = (newValue) => {
43
+ this.selectElement.value = newValue;
44
+ };
45
+ this.label = undefined;
46
+ this.name = undefined;
47
+ this.helpText = undefined;
48
+ this.errorText = undefined;
49
+ this.defaultValue = undefined;
50
+ this.inputHandler = undefined;
51
+ this.options = undefined;
52
+ this.disabled = undefined;
53
+ }
54
+ handleDefaultValueChange(newValue) {
55
+ this.updateInput(newValue);
56
+ }
57
+ componentDidLoad() {
58
+ this.updateInput(this.defaultValue);
59
+ }
60
+ render() {
61
+ var _a;
62
+ return (h(Host, { key: '99449e3724103b12af7f2a4573831961074a484a', exportparts: "label,input,input-invalid" }, h("div", { key: 'd73e89d43da9968b687afece24794d9472fec6b5', class: "form-group d-flex flex-column" }, h("label", { key: '6964c55858fc3cf96a137e1061c7f66831105348', part: "label", class: "form-label", htmlFor: this.name }, this.label), h("select", { key: '5b1a09a607ad9638915f5e70f2164f6010020438', ref: el => (this.selectElement = el), id: this.name, name: this.name, onBlur: this.formControlBlur.emit, onInput: this.handleFormControlInput, part: `input ${this.errorText ? 'input-invalid' : ''}`, class: this.errorText ? 'form-select is-invalid' : 'form-select', disabled: this.disabled }, (_a = this.options) === null || _a === void 0 ? void 0 : _a.map(option => (h("option", { value: option.value }, option.label)))), h("form-control-help-text", { key: '62d862921d463c98e56888293c878624f7311548', helpText: this.helpText, name: this.name }), h("form-control-error-text", { key: '0b1c4d4752965fb058208c72c7f1c3872d1e0561', errorText: this.errorText, name: this.name }))));
63
+ }
64
+ static get watchers() { return {
65
+ "defaultValue": ["handleDefaultValueChange"]
66
+ }; }
67
+ };
68
+
69
+ const TextInput = class {
70
+ constructor(hostRef) {
71
+ registerInstance(this, hostRef);
72
+ this.formControlInput = createEvent(this, "formControlInput", 7);
73
+ this.formControlBlur = createEvent(this, "formControlBlur", 7);
74
+ this.handleFormControlInput = (event) => {
75
+ const target = event.target;
76
+ const name = target.getAttribute('name');
77
+ this.inputHandler(name, target.value);
78
+ this.formControlInput.emit({ name, value: target.value });
79
+ };
80
+ this.updateInput = (newValue) => {
81
+ const inputElement = this.el.querySelector('input');
82
+ if (inputElement) {
83
+ inputElement.value = newValue || '';
84
+ }
85
+ };
86
+ this.label = undefined;
87
+ this.name = undefined;
88
+ this.helpText = undefined;
89
+ this.errorText = undefined;
90
+ this.defaultValue = undefined;
91
+ this.maxLength = undefined;
92
+ this.inputHandler = undefined;
93
+ this.keyDownHandler = undefined;
94
+ this.disabled = undefined;
95
+ }
96
+ handleDefaultValueChange(newValue) {
97
+ this.updateInput(newValue);
98
+ }
99
+ componentDidLoad() {
100
+ this.updateInput(this.defaultValue);
101
+ }
102
+ render() {
103
+ return (h(Host, { key: '1194532f81831734543bad80860da14f8a5ad856', exportparts: "label,input,input-invalid" }, h("div", { key: '296538cf90b62f8041e21620aa06b4074f68b71a', class: "form-group d-flex flex-column" }, h("label", { key: '7c009ce96124e58f9657dba2565ef298225f10f7', part: "label", class: "form-label", htmlFor: this.name }, this.label), h("input", { key: '4b33cb700aecf4d0a359366ba2e0d248c602d904', id: this.name, name: this.name, onBlur: this.formControlBlur.emit, onInput: this.handleFormControlInput, onKeyDown: this.keyDownHandler, onPaste: this.keyDownHandler, maxLength: this.maxLength, part: `input ${this.errorText ? 'input-invalid ' : ''}${this.disabled ? ' input-disabled' : ''}`, class: this.errorText ? 'form-control is-invalid' : 'form-control', type: "text", disabled: this.disabled }), h("form-control-help-text", { key: '7a279d72bb262fcb044b5b0cc31703878ce9f444', helpText: this.helpText, name: this.name }), h("form-control-error-text", { key: '00bea288a99f626806697a98b6dca3f3298dc0b3', errorText: this.errorText, name: this.name }))));
104
+ }
105
+ get el() { return getElement(this); }
106
+ static get watchers() { return {
107
+ "defaultValue": ["handleDefaultValueChange"]
108
+ }; }
109
+ };
110
+
111
+ export { FormControlErrorText as form_control_error_text, FormControlHelpText as form_control_help_text, SelectInput as form_control_select, TextInput as form_control_text };