@justifi/webcomponents 6.5.1-rc.4 → 6.5.1-rc.5

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 (111) hide show
  1. package/dist/cjs/{check-pkg-version-Bj0XkWnL.js → check-pkg-version-T54BeR4n.js} +1 -1
  2. package/dist/cjs/hidden-input_2.cjs.entry.js +1 -1
  3. package/dist/cjs/internal-tokenize-payment-method_7.cjs.entry.js +2 -2
  4. package/dist/cjs/justifi-apple-pay_7.cjs.entry.js +2 -2
  5. package/dist/cjs/justifi-business-details.cjs.entry.js +2 -2
  6. package/dist/cjs/justifi-business-form.cjs.entry.js +2 -2
  7. package/dist/cjs/justifi-checkout.cjs.entry.js +2 -2
  8. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +2 -2
  9. package/dist/cjs/justifi-dispute-management.cjs.entry.js +2 -2
  10. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +2 -2
  11. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +2 -2
  12. package/dist/cjs/justifi-order-terminals.cjs.entry.js +2 -2
  13. package/dist/cjs/justifi-payment-details.cjs.entry.js +2 -2
  14. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +2 -2
  15. package/dist/cjs/justifi-payment-transactions-list.cjs.entry.js +2 -2
  16. package/dist/cjs/justifi-payments-list.cjs.entry.js +2 -2
  17. package/dist/cjs/justifi-payout-details.cjs.entry.js +2 -2
  18. package/dist/cjs/justifi-payout-transactions-list.cjs.entry.js +2 -2
  19. package/dist/cjs/justifi-payouts-list.cjs.entry.js +2 -2
  20. package/dist/cjs/justifi-refund-payment.cjs.entry.js +2 -2
  21. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +2 -2
  22. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +2 -2
  23. package/dist/cjs/justifi-terminals-list.cjs.entry.js +2 -2
  24. package/dist/cjs/{package-Dptg-P5y.js → package-JstJdxIu.js} +1 -1
  25. package/dist/docs.json +1 -1
  26. package/dist/esm/{check-pkg-version-D6a-vvrO.js → check-pkg-version-C8hgGLFx.js} +1 -1
  27. package/dist/esm/hidden-input_2.entry.js +1 -1
  28. package/dist/esm/internal-tokenize-payment-method_7.entry.js +2 -2
  29. package/dist/esm/justifi-apple-pay_7.entry.js +2 -2
  30. package/dist/esm/justifi-business-details.entry.js +2 -2
  31. package/dist/esm/justifi-business-form.entry.js +2 -2
  32. package/dist/esm/justifi-checkout.entry.js +2 -2
  33. package/dist/esm/justifi-checkouts-list.entry.js +2 -2
  34. package/dist/esm/justifi-dispute-management.entry.js +2 -2
  35. package/dist/esm/justifi-dispute-notification_3.entry.js +2 -2
  36. package/dist/esm/justifi-gross-payment-chart.entry.js +2 -2
  37. package/dist/esm/justifi-order-terminals.entry.js +2 -2
  38. package/dist/esm/justifi-payment-details.entry.js +2 -2
  39. package/dist/esm/justifi-payment-provisioning.entry.js +2 -2
  40. package/dist/esm/justifi-payment-transactions-list.entry.js +2 -2
  41. package/dist/esm/justifi-payments-list.entry.js +2 -2
  42. package/dist/esm/justifi-payout-details.entry.js +2 -2
  43. package/dist/esm/justifi-payout-transactions-list.entry.js +2 -2
  44. package/dist/esm/justifi-payouts-list.entry.js +2 -2
  45. package/dist/esm/justifi-refund-payment.entry.js +2 -2
  46. package/dist/esm/justifi-season-interruption-insurance.entry.js +2 -2
  47. package/dist/esm/justifi-terminal-orders-list.entry.js +2 -2
  48. package/dist/esm/justifi-terminals-list.entry.js +2 -2
  49. package/dist/esm/{package-czPIvHxt.js → package-DEhd71m_.js} +1 -1
  50. package/dist/module/package.js +1 -1
  51. package/dist/webcomponents/{p-0b760c4f.entry.js → p-04b23547.entry.js} +1 -1
  52. package/dist/webcomponents/{p-9ef4288b.entry.js → p-04ed045b.entry.js} +1 -1
  53. package/dist/webcomponents/{p-9d67209d.entry.js → p-20608f0c.entry.js} +1 -1
  54. package/dist/webcomponents/{p-2bd821a8.entry.js → p-266a9aee.entry.js} +1 -1
  55. package/dist/webcomponents/{p-5981869a.entry.js → p-2bafa257.entry.js} +1 -1
  56. package/dist/webcomponents/{p-deda2e9d.entry.js → p-3101565c.entry.js} +1 -1
  57. package/dist/webcomponents/{p-d7a06b34.entry.js → p-42c3bda4.entry.js} +1 -1
  58. package/dist/webcomponents/p-5a3687bf.entry.js +1 -0
  59. package/dist/webcomponents/{p-e00fb7b1.entry.js → p-7128920a.entry.js} +1 -1
  60. package/dist/webcomponents/{p-db17bc59.entry.js → p-73388c68.entry.js} +1 -1
  61. package/dist/webcomponents/{p-306c7c33.entry.js → p-7a3d9c24.entry.js} +1 -1
  62. package/dist/webcomponents/{p-50a4d4c4.entry.js → p-8c07d9f0.entry.js} +1 -1
  63. package/dist/webcomponents/{p-21c060ce.entry.js → p-8cfda6c1.entry.js} +1 -1
  64. package/dist/webcomponents/p-90de8098.entry.js +1 -0
  65. package/dist/webcomponents/{p-c9b50493.entry.js → p-9efd1bce.entry.js} +1 -1
  66. package/dist/webcomponents/{p-aec7a3c8.entry.js → p-9fef2496.entry.js} +1 -1
  67. package/dist/webcomponents/{p-CApezhx9.js → p-C6wS5-M7.js} +1 -1
  68. package/dist/webcomponents/p-DEhd71m_.js +1 -0
  69. package/dist/webcomponents/{p-e07bf523.entry.js → p-a9bd4e27.entry.js} +1 -1
  70. package/dist/webcomponents/{p-3aaedf9d.entry.js → p-c364c76d.entry.js} +1 -1
  71. package/dist/webcomponents/{p-75f3161c.entry.js → p-cfd858be.entry.js} +1 -1
  72. package/dist/webcomponents/{p-26e95adb.entry.js → p-d1951301.entry.js} +1 -1
  73. package/dist/webcomponents/{p-f6ec50c9.entry.js → p-de35abb6.entry.js} +1 -1
  74. package/dist/webcomponents/{p-38ff97ea.entry.js → p-e47a2592.entry.js} +1 -1
  75. package/dist/webcomponents/webcomponents.esm.js +1 -1
  76. package/docs/entities/businessdetails/index.mdx +5 -2
  77. package/docs/entities/businessform/index.mdx +1 -2
  78. package/docs/entities/payment-provisioning/index.mdx +1 -1
  79. package/docs/helpers/PartsTable.js +50 -0
  80. package/docs/helpers/PropsTable.js +56 -0
  81. package/docs/helpers/index.js +4 -0
  82. package/docs/helpers/version.js +32 -0
  83. package/docs/merchant-tools/checkouts-list/index.mdx +1 -1
  84. package/docs/merchant-tools/gross-payments-chart/index.mdx +1 -1
  85. package/docs/merchant-tools/order-terminals/index.mdx +1 -1
  86. package/docs/merchant-tools/payment-details/index.mdx +1 -2
  87. package/docs/merchant-tools/payment-transactions-list/index.mdx +1 -1
  88. package/docs/merchant-tools/payments-list/index.mdx +1 -1
  89. package/docs/merchant-tools/payout-details/index.mdx +1 -1
  90. package/docs/merchant-tools/payout-transactions-list/index.mdx +1 -1
  91. package/docs/merchant-tools/payouts-list/index.mdx +1 -1
  92. package/docs/merchant-tools/terminal-orders-list/index.mdx +1 -1
  93. package/docs/merchant-tools/terminals-list/index.mdx +1 -1
  94. package/docs/modular-checkout/introduction/index.mdx +1 -1
  95. package/docs/modular-checkout/sub-components/apple-pay.mdx +1 -2
  96. package/docs/modular-checkout/sub-components/bank-account-form.mdx +1 -2
  97. package/docs/modular-checkout/sub-components/card-form.mdx +1 -2
  98. package/docs/modular-checkout/sub-components/payment-method-options.mdx +1 -1
  99. package/docs/modular-checkout/sub-components/plaid-payment-method.mdx +1 -2
  100. package/docs/modular-checkout/sub-components/saved-payment-methods.mdx +1 -2
  101. package/docs/modular-checkout/sub-components/season-interruption-insurance.mdx +1 -2
  102. package/docs/modular-checkout/sub-components/sezzle-payment-method.mdx +1 -2
  103. package/docs/modular-checkout/sub-components/summary.mdx +1 -2
  104. package/docs/payment-facilitation/dispute-management/index.mdx +1 -1
  105. package/docs/payment-facilitation/refund-payment/index.mdx +1 -2
  106. package/docs/payment-facilitation/tokenize-payment-method/index.mdx +1 -2
  107. package/docs/payment-facilitation/unified-fintech-checkout/342/204/242/index.mdx +1 -1
  108. package/package.json +1 -1
  109. package/dist/webcomponents/p-7661c41a.entry.js +0 -1
  110. package/dist/webcomponents/p-92a43706.entry.js +0 -1
  111. package/dist/webcomponents/p-czPIvHxt.js +0 -1
@@ -3,7 +3,7 @@ import { P as PaymentService } from './payment.service-nExZY_sU.js';
3
3
  import { m as makeGetPaymentDetails } from './get-payment-details-CakzKvOr.js';
4
4
  import { E as ErrorState } from './utils-BX7Rjm1M.js';
5
5
  import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './ComponentError-Cjcsf8ku.js';
6
- import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D6a-vvrO.js';
6
+ import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-C8hgGLFx.js';
7
7
  import './Api-DX-IWyBw.js';
8
8
  import './config-state-C2NXATwF.js';
9
9
  import './index-B-fWxE5e.js';
@@ -15,7 +15,7 @@ import './Pagination-CLHwhyvu.js';
15
15
  import './Business-B5rtFhtR.js';
16
16
  import './utils-BeQLScSm.js';
17
17
  import './parts-wtuY7MT2.js';
18
- import './package-czPIvHxt.js';
18
+ import './package-DEhd71m_.js';
19
19
 
20
20
  const PaymentDetails = class {
21
21
  constructor(hostRef) {
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-DwYM91AU.js';
2
- import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D6a-vvrO.js';
2
+ import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-C8hgGLFx.js';
3
3
  import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './ComponentError-Cjcsf8ku.js';
4
4
  import { m as makeGetBusiness, a as makePostProvisioning } from './payment-provisioning-actions-ONP8lDnV.js';
5
5
  import { B as BusinessService } from './business.service-pWcc3kfX.js';
@@ -8,7 +8,7 @@ import './Refund-BugCdfRo.js';
8
8
  import './Pagination-CLHwhyvu.js';
9
9
  import './Business-B5rtFhtR.js';
10
10
  import './Dispute-BH0Xfn-F.js';
11
- import './package-czPIvHxt.js';
11
+ import './package-DEhd71m_.js';
12
12
  import './utils-BeQLScSm.js';
13
13
  import './config-state-C2NXATwF.js';
14
14
  import './index-B-fWxE5e.js';
@@ -6,7 +6,7 @@ import { g as PaymentBalanceTransaction } from './Refund-BugCdfRo.js';
6
6
  import { p as pagingDefaults } from './Pagination-CLHwhyvu.js';
7
7
  import './Business-B5rtFhtR.js';
8
8
  import './Dispute-BH0Xfn-F.js';
9
- import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D6a-vvrO.js';
9
+ import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-C8hgGLFx.js';
10
10
  import { g as getErrorCode, a as getErrorMessage } from './utils-BeQLScSm.js';
11
11
  import { P as PaymentService } from './payment.service-nExZY_sU.js';
12
12
  import { T as Table, l as TableWrapper, a as TableComponent, b as TableHead, c as TableHeadRow, d as TableBody, e as TableLoadingState, f as TableEmptyState, g as TableErrorState, h as TableRow, i as TableFoot, j as TableFootRow, k as TableFootCell } from './table-Cjq1A6mO.js';
@@ -15,7 +15,7 @@ import { T as TableClickActions } from './event-types-CZfYo5-1.js';
15
15
  import { a as convertToLocal } from './utils-CIaHqjQt.js';
16
16
  import { S as tableHeadCell, T as getAlternateTableCellPart } from './parts-wtuY7MT2.js';
17
17
  import './index-B-fWxE5e.js';
18
- import './package-czPIvHxt.js';
18
+ import './package-DEhd71m_.js';
19
19
  import './Api-DX-IWyBw.js';
20
20
  import './spinner-tU4D9iak.js';
21
21
 
@@ -8,14 +8,14 @@ import './Pagination-CLHwhyvu.js';
8
8
  import './Business-B5rtFhtR.js';
9
9
  import './Dispute-BH0Xfn-F.js';
10
10
  import { g as getErrorCode, a as getErrorMessage } from './utils-BeQLScSm.js';
11
- import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D6a-vvrO.js';
11
+ import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-C8hgGLFx.js';
12
12
  import { S as StyledHost } from './styled-host-DhOcKWqZ.js';
13
13
  import './event-types-CZfYo5-1.js';
14
14
  import { d as defaultColumnsKeys } from './payments-table-CK9BRZEz.js';
15
15
  import './Api-DX-IWyBw.js';
16
16
  import './utils-CIaHqjQt.js';
17
17
  import './index-B-fWxE5e.js';
18
- import './package-czPIvHxt.js';
18
+ import './package-DEhd71m_.js';
19
19
  import './payments-status-Dypl6WFL.js';
20
20
  import './badge-Bgosx-DC.js';
21
21
  import './parts-wtuY7MT2.js';
@@ -9,13 +9,13 @@ import './Business-B5rtFhtR.js';
9
9
  import './Dispute-BH0Xfn-F.js';
10
10
  import { g as getErrorCode, a as getErrorMessage } from './utils-BeQLScSm.js';
11
11
  import { E as ErrorState } from './utils-BX7Rjm1M.js';
12
- import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D6a-vvrO.js';
12
+ import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-C8hgGLFx.js';
13
13
  import { m as makeGetPayoutCSV } from './get-payout-csv-D-Lnooki.js';
14
14
  import './Api-DX-IWyBw.js';
15
15
  import './utils-CIaHqjQt.js';
16
16
  import './index-B-fWxE5e.js';
17
17
  import './parts-wtuY7MT2.js';
18
- import './package-czPIvHxt.js';
18
+ import './package-DEhd71m_.js';
19
19
 
20
20
  const makeGetPayoutDetails = ({ id, authToken, service }) => async ({ onSuccess, onError }) => {
21
21
  var _a;
@@ -6,7 +6,7 @@ import { h as PayoutBalanceTransaction } from './Refund-BugCdfRo.js';
6
6
  import { p as pagingDefaults } from './Pagination-CLHwhyvu.js';
7
7
  import './Business-B5rtFhtR.js';
8
8
  import './Dispute-BH0Xfn-F.js';
9
- import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D6a-vvrO.js';
9
+ import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-C8hgGLFx.js';
10
10
  import { g as getErrorCode, a as getErrorMessage } from './utils-BeQLScSm.js';
11
11
  import { P as PayoutService } from './payout.service-B9-JQqU6.js';
12
12
  import { T as Table, l as TableWrapper, a as TableComponent, b as TableHead, c as TableHeadRow, d as TableBody, e as TableLoadingState, f as TableEmptyState, g as TableErrorState, h as TableRow, i as TableFoot, j as TableFootRow, k as TableFootCell } from './table-Cjq1A6mO.js';
@@ -15,7 +15,7 @@ import { T as TableClickActions } from './event-types-CZfYo5-1.js';
15
15
  import { a as convertToLocal } from './utils-CIaHqjQt.js';
16
16
  import { S as tableHeadCell, T as getAlternateTableCellPart } from './parts-wtuY7MT2.js';
17
17
  import './index-B-fWxE5e.js';
18
- import './package-czPIvHxt.js';
18
+ import './package-DEhd71m_.js';
19
19
  import './Api-DX-IWyBw.js';
20
20
  import './spinner-tU4D9iak.js';
21
21
 
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-DwYM91AU.js';
2
2
  import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './ComponentError-Cjcsf8ku.js';
3
- import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D6a-vvrO.js';
3
+ import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-C8hgGLFx.js';
4
4
  import { P as PayoutService } from './payout.service-B9-JQqU6.js';
5
5
  import './config-state-C2NXATwF.js';
6
6
  import './dinero-HXpYMWUU.js';
@@ -14,7 +14,7 @@ import { m as makeGetSubAccounts, S as SubAccountService } from './get-subaccoun
14
14
  import { S as StyledHost } from './styled-host-DhOcKWqZ.js';
15
15
  import './event-types-CZfYo5-1.js';
16
16
  import { d as defaultColumnsKeys } from './payouts-table-Dd8IDBBX.js';
17
- import './package-czPIvHxt.js';
17
+ import './package-DEhd71m_.js';
18
18
  import './Api-DX-IWyBw.js';
19
19
  import './utils-CIaHqjQt.js';
20
20
  import './index-B-fWxE5e.js';
@@ -12,7 +12,7 @@ import { S as StyledHost } from './styled-host-DhOcKWqZ.js';
12
12
  import './event-types-CZfYo5-1.js';
13
13
  import { P as PaymentService } from './payment.service-nExZY_sU.js';
14
14
  import { m as makeGetPaymentDetails } from './get-payment-details-CakzKvOr.js';
15
- import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D6a-vvrO.js';
15
+ import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-C8hgGLFx.js';
16
16
  import { g as getErrorCode, a as getErrorMessage } from './utils-BeQLScSm.js';
17
17
  import { A as Api } from './Api-DX-IWyBw.js';
18
18
  import { S as Skeleton } from './skeleton-BmRZRW5K.js';
@@ -20,7 +20,7 @@ import './_commonjsHelpers-BFTU3MAI.js';
20
20
  import './dinero-HXpYMWUU.js';
21
21
  import './index-B-fWxE5e.js';
22
22
  import './parts-wtuY7MT2.js';
23
- import './package-czPIvHxt.js';
23
+ import './package-DEhd71m_.js';
24
24
 
25
25
  const amountValidation = (maxAmount) => {
26
26
  const max = +maxAmount;
@@ -6,7 +6,7 @@ import './Pagination-CLHwhyvu.js';
6
6
  import './Business-B5rtFhtR.js';
7
7
  import './Dispute-BH0Xfn-F.js';
8
8
  import { g as getErrorCode, a as getErrorMessage } from './utils-BeQLScSm.js';
9
- import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D6a-vvrO.js';
9
+ import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-C8hgGLFx.js';
10
10
  import { c as checkoutStore } from './checkout.store-CaS_htQd.js';
11
11
  import { p as processHTML, f as formatCurrency, r as removeAttribute, j as addAttribute } from './utils-CIaHqjQt.js';
12
12
  import { v as validateInsuranceValues, i as insuranceValues, a as insuranceErrors, H as Header2 } from './insurance-state-DRe0g_wf.js';
@@ -16,7 +16,7 @@ import './event-types-CZfYo5-1.js';
16
16
  import { S as Skeleton } from './skeleton-BmRZRW5K.js';
17
17
  import './config-state-C2NXATwF.js';
18
18
  import './index-B-fWxE5e.js';
19
- import './package-czPIvHxt.js';
19
+ import './package-DEhd71m_.js';
20
20
  import './index-DCIW8z1f.js';
21
21
  import './dinero-HXpYMWUU.js';
22
22
 
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-DwYM91AU.js';
2
2
  import { S as StyledHost } from './styled-host-DhOcKWqZ.js';
3
3
  import './event-types-CZfYo5-1.js';
4
- import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D6a-vvrO.js';
4
+ import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-C8hgGLFx.js';
5
5
  import { d as defaultColumnsKeys } from './terminal-orders-table-DsrpmD9F.js';
6
6
  import './config-state-C2NXATwF.js';
7
7
  import './dinero-HXpYMWUU.js';
@@ -12,7 +12,7 @@ import './Business-B5rtFhtR.js';
12
12
  import './Dispute-BH0Xfn-F.js';
13
13
  import { g as getErrorCode, a as getErrorMessage } from './utils-BeQLScSm.js';
14
14
  import { A as Api } from './Api-DX-IWyBw.js';
15
- import './package-czPIvHxt.js';
15
+ import './package-DEhd71m_.js';
16
16
  import './parts-wtuY7MT2.js';
17
17
  import './utils-CIaHqjQt.js';
18
18
  import './badge-Bgosx-DC.js';
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-DwYM91AU.js';
2
2
  import { C as ComponentErrorSeverity, a as ComponentErrorCodes } from './ComponentError-Cjcsf8ku.js';
3
- import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-D6a-vvrO.js';
3
+ import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-C8hgGLFx.js';
4
4
  import { T as TerminalService } from './terminal.service-DvFiKAKV.js';
5
5
  import './config-state-C2NXATwF.js';
6
6
  import './dinero-HXpYMWUU.js';
@@ -13,7 +13,7 @@ import { m as makeGetSubAccounts, S as SubAccountService } from './get-subaccoun
13
13
  import { S as StyledHost } from './styled-host-DhOcKWqZ.js';
14
14
  import './event-types-CZfYo5-1.js';
15
15
  import { d as defaultColumnsKeys } from './terminals-table-D9okETJr.js';
16
- import './package-czPIvHxt.js';
16
+ import './package-DEhd71m_.js';
17
17
  import './Api-DX-IWyBw.js';
18
18
  import './utils-CIaHqjQt.js';
19
19
  import './index-B-fWxE5e.js';
@@ -1,5 +1,5 @@
1
1
  const name = "@justifi/webcomponents";
2
- const version = "6.5.1-rc.4";
2
+ const version = "6.5.1-rc.5";
3
3
  var packageJson = {
4
4
  name: name,
5
5
  version: version};
@@ -1,5 +1,5 @@
1
1
  const name = "@justifi/webcomponents";
2
- const version = "6.5.1-rc.4";
2
+ const version = "6.5.1-rc.5";
3
3
  var webcomponentsPackageJson = {
4
4
  name: name,
5
5
  version: version};
@@ -1 +1 @@
1
- import{r as t,c as s,h as i}from"./p-DwYM91AU.js";import{C as e,a as r}from"./p-Cjcsf8ku.js";import{c as o,J as p}from"./p-CApezhx9.js";import{D as a}from"./p-BH0Xfn-F.js";import{g as n,a as h}from"./p-D2muobcE.js";import{D as c}from"./p-D_IJC4HG.js";import"./p-czPIvHxt.js";import"./p-C8yN3uBj.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-HXpYMWUU.js";import"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";const u=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){o(),this.analytics=new p(this),this.initializeGetDispute()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetDispute()}initializeGetDispute(){this.disputeId&&this.authToken?this.getDispute=(({id:t,authToken:s,service:i})=>async({onSuccess:r,onError:o})=>{var p;try{const c=await i.fetchDispute(t,s);if(c.error)return o({error:h(c.error),code:n(null===(p=c.error)||void 0===p?void 0:p.code),severity:e.ERROR});{const t=Object.assign({},c.page_info);r({dispute:new a(c.data),pagingInfo:t})}}catch(t){const s=n(null==t?void 0:t.code);return o({error:t.message||t,code:s,severity:e.ERROR})}})({id:this.disputeId,authToken:this.authToken,service:new c}):(this.errorMessage="Dispute ID and Auth Token are required",this.errorEvent.emit({message:this.errorMessage,errorCode:r.MISSING_PROPS,severity:e.ERROR}))}render(){return i("justifi-dispute-management-core",{key:"60b2220edc8d7862cda6388040e7b1f9434100fc",getDispute:this.getDispute,disputeId:this.disputeId,authToken:this.authToken,"onError-event":this.handleErrorEvent})}static get watchers(){return{disputeId:["propChanged"],authToken:["propChanged"]}}};export{u as justifi_dispute_management}
1
+ import{r as t,c as s,h as i}from"./p-DwYM91AU.js";import{C as e,a as r}from"./p-Cjcsf8ku.js";import{c as o,J as p}from"./p-C6wS5-M7.js";import{D as a}from"./p-BH0Xfn-F.js";import{g as n,a as h}from"./p-D2muobcE.js";import{D as c}from"./p-D_IJC4HG.js";import"./p-DEhd71m_.js";import"./p-C8yN3uBj.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-HXpYMWUU.js";import"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";const d=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){o(),this.analytics=new p(this),this.initializeGetDispute()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetDispute()}initializeGetDispute(){this.disputeId&&this.authToken?this.getDispute=(({id:t,authToken:s,service:i})=>async({onSuccess:r,onError:o})=>{var p;try{const c=await i.fetchDispute(t,s);if(c.error)return o({error:h(c.error),code:n(null===(p=c.error)||void 0===p?void 0:p.code),severity:e.ERROR});{const t=Object.assign({},c.page_info);r({dispute:new a(c.data),pagingInfo:t})}}catch(t){const s=n(null==t?void 0:t.code);return o({error:t.message||t,code:s,severity:e.ERROR})}})({id:this.disputeId,authToken:this.authToken,service:new c}):(this.errorMessage="Dispute ID and Auth Token are required",this.errorEvent.emit({message:this.errorMessage,errorCode:r.MISSING_PROPS,severity:e.ERROR}))}render(){return i("justifi-dispute-management-core",{key:"60b2220edc8d7862cda6388040e7b1f9434100fc",getDispute:this.getDispute,disputeId:this.disputeId,authToken:this.authToken,"onError-event":this.handleErrorEvent})}static get watchers(){return{disputeId:["propChanged"],authToken:["propChanged"]}}};export{d as justifi_dispute_management}
@@ -1 +1 @@
1
- import{r as t,c as s,h as r}from"./p-DwYM91AU.js";import{A as o}from"./p-C8yN3uBj.js";import{C as e,a as i}from"./p-Cjcsf8ku.js";import"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as a,a as p}from"./p-D2muobcE.js";import{E as n}from"./p-BNqo3kt0.js";import{c as h,J as c}from"./p-CApezhx9.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-HXpYMWUU.js";import"./p-wtuY7MT2.js";import"./p-czPIvHxt.js";const m=o();class u{async fetchGrossVolumeChartData(t,s){return m.get({endpoint:`account/${t}/reports/gross_volume`,authToken:s})}}const d=class{constructor(r){t(this,r),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){h(),this.analytics=new c(this),this.initializeGetGrossPayment()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetGrossPayment()}initializeGetGrossPayment(){this.accountId&&this.authToken?this.getGrossPayment=(({id:t,authToken:s,service:r})=>async({onSuccess:o,onError:i})=>{var n;try{const h=await r.fetchGrossVolumeChartData(t,s);h.error?i({error:p(h.error),code:a(null===(n=h.error)||void 0===n?void 0:n.code),severity:e.ERROR}):o(h.data)}catch(t){const s=a(null==t?void 0:t.code);i({error:p(t),code:s,severity:e.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new u}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:i.MISSING_PROPS,message:this.errorMessage,severity:e.ERROR}))}render(){return this.errorMessage?n(this.errorMessage):r("gross-payment-chart-core",{getGrossPayment:this.getGrossPayment,"onError-event":this.handleErrorEvent})}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{d as justifi_gross_payment_chart}
1
+ import{r as t,c as s,h as r}from"./p-DwYM91AU.js";import{A as o}from"./p-C8yN3uBj.js";import{C as i,a as e}from"./p-Cjcsf8ku.js";import"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-D2muobcE.js";import{E as p}from"./p-BNqo3kt0.js";import{c as h,J as c}from"./p-C6wS5-M7.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-HXpYMWUU.js";import"./p-wtuY7MT2.js";import"./p-DEhd71m_.js";const m=o();class u{async fetchGrossVolumeChartData(t,s){return m.get({endpoint:`account/${t}/reports/gross_volume`,authToken:s})}}const d=class{constructor(r){t(this,r),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){h(),this.analytics=new c(this),this.initializeGetGrossPayment()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetGrossPayment()}initializeGetGrossPayment(){this.accountId&&this.authToken?this.getGrossPayment=(({id:t,authToken:s,service:r})=>async({onSuccess:o,onError:e})=>{var p;try{const h=await r.fetchGrossVolumeChartData(t,s);h.error?e({error:n(h.error),code:a(null===(p=h.error)||void 0===p?void 0:p.code),severity:i.ERROR}):o(h.data)}catch(t){const s=a(null==t?void 0:t.code);e({error:n(t),code:s,severity:i.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new u}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:e.MISSING_PROPS,message:this.errorMessage,severity:i.ERROR}))}render(){return this.errorMessage?p(this.errorMessage):r("gross-payment-chart-core",{getGrossPayment:this.getGrossPayment,"onError-event":this.handleErrorEvent})}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{d as justifi_gross_payment_chart}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i}from"./p-DwYM91AU.js";import{C as o,a as r}from"./p-Cjcsf8ku.js";import{c as e,J as p}from"./p-CApezhx9.js";import{P as a}from"./p-CPtsjcdm.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{d as c}from"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as n,a as h}from"./p-D2muobcE.js";import{m}from"./p-DYGIC0QH.js";import{m as u,S as d}from"./p-BojLBYsY.js";import{S as j}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{d as f}from"./p-KPmnq8xf.js";import"./p-czPIvHxt.js";import"./p-C8yN3uBj.js";import"./p-BS7OgSQe.js";import"./p-BYsgavgS.js";import"./p-bolTb61p.js";import"./p-DOLBAxYf.js";import"./p-wtuY7MT2.js";const l=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=f,this.handleOnError=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){e(),this.analytics=new p(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializePayoutsServices(),this.initializeGetSubAccounts()}initializePayoutsServices(){if(this.accountId&&this.authToken){const t={id:this.accountId,authToken:this.authToken,service:new a};this.getPayouts=(({id:t,authToken:s,service:i})=>async({params:r,onSuccess:e,onError:p})=>{var a,m;try{const u=await i.fetchPayouts(t,s,r);if(u.error)return p({error:h(u.error),code:n(null===(m=u.error)||void 0===m?void 0:m.code),severity:o.ERROR});{const t=Object.assign({},u.page_info);e({payouts:(null===(a=u.data)||void 0===a?void 0:a.map((t=>new c(t))))||[],pagingInfo:t})}}catch(t){const s=n(null==t?void 0:t.code);return p({error:t.message||t,code:s,severity:o.ERROR})}})(t),this.getPayoutCSV=m(t)}else this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR})}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=u({accountId:this.accountId,authToken:this.authToken,service:new d}))}render(){return i(j,{key:"5ec4cfd9c227dc5c993fe82972124649d7468617"},i("payouts-list-core",{key:"8e862e8b6c6cf861d342e72afec20d527f34f5c1",getPayouts:this.getPayouts,getPayoutCSV:this.getPayoutCSV,getSubAccounts:this.getSubAccounts,"onError-event":this.handleOnError,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{l as justifi_payouts_list}
1
+ import{r as t,c as s,h as i}from"./p-DwYM91AU.js";import{C as o,a as r}from"./p-Cjcsf8ku.js";import{c as e,J as p}from"./p-C6wS5-M7.js";import{P as a}from"./p-CPtsjcdm.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{d as c}from"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as n,a as h}from"./p-D2muobcE.js";import{m}from"./p-DYGIC0QH.js";import{m as u,S as d}from"./p-BojLBYsY.js";import{S as j}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{d as f}from"./p-KPmnq8xf.js";import"./p-DEhd71m_.js";import"./p-C8yN3uBj.js";import"./p-BS7OgSQe.js";import"./p-BYsgavgS.js";import"./p-bolTb61p.js";import"./p-DOLBAxYf.js";import"./p-wtuY7MT2.js";const l=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=f,this.handleOnError=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){e(),this.analytics=new p(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializePayoutsServices(),this.initializeGetSubAccounts()}initializePayoutsServices(){if(this.accountId&&this.authToken){const t={id:this.accountId,authToken:this.authToken,service:new a};this.getPayouts=(({id:t,authToken:s,service:i})=>async({params:r,onSuccess:e,onError:p})=>{var a,m;try{const u=await i.fetchPayouts(t,s,r);if(u.error)return p({error:h(u.error),code:n(null===(m=u.error)||void 0===m?void 0:m.code),severity:o.ERROR});{const t=Object.assign({},u.page_info);e({payouts:(null===(a=u.data)||void 0===a?void 0:a.map((t=>new c(t))))||[],pagingInfo:t})}}catch(t){const s=n(null==t?void 0:t.code);return p({error:t.message||t,code:s,severity:o.ERROR})}})(t),this.getPayoutCSV=m(t)}else this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR})}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=u({accountId:this.accountId,authToken:this.authToken,service:new d}))}render(){return i(j,{key:"5ec4cfd9c227dc5c993fe82972124649d7468617"},i("payouts-list-core",{key:"8e862e8b6c6cf861d342e72afec20d527f34f5c1",getPayouts:this.getPayouts,getPayoutCSV:this.getPayoutCSV,getSubAccounts:this.getSubAccounts,"onError-event":this.handleOnError,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{l as justifi_payouts_list}
@@ -1 +1 @@
1
- import{h as t,r as s,c as e}from"./p-DwYM91AU.js";import{c as r,a as i,F as o}from"./p-DiJD6Iqx.js";import{f as n}from"./p-BS7OgSQe.js";import"./p-tGDdRx0W.js";import{C as a,a as u}from"./p-Cjcsf8ku.js";import{R as l,k as h}from"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{B as m}from"./p-Bqlcv3ZV.js";import{S as c}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{P as p}from"./p-C8QOezo8.js";import{m as d}from"./p-Ch9cTPyq.js";import{c as f,J as v}from"./p-CApezhx9.js";import{g as j,a as y}from"./p-D2muobcE.js";import{A as b}from"./p-C8yN3uBj.js";import{S as w}from"./p-c7MCfTgE.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-BYsgavgS.js";import"./p-wtuY7MT2.js";import"./p-czPIvHxt.js";const g=t=>{const s=+t;return i().required("Amount is required").test("max-amount",`Refund amount cannot be more than payment amount: ${n(s)}`,(function(t){return+t<=+s})).test("min-amount","Refund amount must be greater than 0",(function(t){return+t>0}))},x=t=>{if(t)return r({amount:g(t),description:i().optional(),reason:i().optional().oneOf([l.customerRequest,l.duplicate,l.fraudulent],"Select a reason")})},C=[{label:"Select a reason",value:""},{label:"Customer requested a refund",value:"customer_request"},{label:"Customer was double-charged",value:"duplicate"},{label:"Payment was reported as fraud",value:"fraudulent"}],T=b();class B{async postRefund(t,s,e,r){return T.post({endpoint:`payments/${t}/refunds`,headers:{"Sub-Account":s},body:r,authToken:e})}}const A=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(w,{width:"100%",height:"40px"}))),S=()=>t(c,null,t("div",{class:"row gap-5"},t(A,null),t(A,null),t(A,null))),I=class{constructor(t){s(this,t),this.errorEvent=e(this,"error-event"),this.submitEvent=e(this,"submit-event"),this.refundPayload={},this.displayAmount="",this.errors={},this.paymentLoading=!0,this.refundLoading=!1,this.hideSubmitButton=!1,this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}componentWillLoad(){f(),this.analytics=new v(this),this.initializeApi(),this.formController=new o(x())}handleError(t,s,e){this.errorEvent.emit({errorCode:t,message:s,severity:e})}checkAmount(t){return t>0}handleInvalidAmount(){this.submitDisabled=!0,this.handleError(u.INVALID_REFUND_AMOUNT,"Refund amount must be greater than 0",a.ERROR)}initializeFormController(){const t=this.refundPayload.amount,s=t?t.toString():"0";this.formController=new o(x(s)),this.formController.setInitialValues({amount:s}),this.formController.values.subscribe((t=>{this.refundPayload=Object.assign({},t)})),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.paymentId&&this.authToken?d({id:this.paymentId,authToken:this.authToken,service:new p})({onSuccess:({payment:t})=>{this.refundPayload=new h({amount:t.amount_refundable})},onError:({error:t,code:s,severity:e})=>{this.handleError(s,t,e)},final:()=>{this.checkAmount(this.refundPayload.amount)?this.initializeFormController():this.handleInvalidAmount(),this.paymentLoading=!1}}):this.handleError(u.MISSING_PROPS,"Payment ID and Auth Token are required",a.ERROR)}async refundPayment(t){if(t&&t.preventDefault(),!await this.formController.validate())return;const s=(({authToken:t,accountId:s,paymentId:e,service:r})=>async({refundBody:i,onSuccess:o,onError:n,final:u})=>{var l;try{const u=await r.postRefund(e,s,t,i);if(u.error)return n({error:y(u.error),code:j(null===(l=u.error)||void 0===l?void 0:l.code),severity:a.ERROR});o(u)}catch(t){const s=j(null==t?void 0:t.code);return n({error:t.message||t,code:s,severity:a.ERROR})}finally{return u()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new B}),e=this.formController.values.getValue();return this.refundLoading=!0,new Promise((t=>{let r;s({refundBody:e,onSuccess:t=>{r=t},onError:({error:t,code:s,severity:e})=>{r=t,this.handleError(t,s,e)},final:()=>{this.submitEvent.emit({response:r}),this.submitDisabled=!0,this.refundLoading=!1,t(r.data)}})}))}render(){if(this.paymentLoading)return t(S,null);const s=this.formController.getInitialValues(),e=this.refundPayload.amount;return t(c,null,t("form",null,t("fieldset",null,t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-monetary",{name:"amount",label:"Refund Amount",defaultValue:s.amount,inputHandler:this.inputHandler,errorText:this.errors.amount})),t("div",{class:"col-12"},t("form-control-select",{name:"reason",label:"Reason for refund (optional)",defaultValue:s.reason,inputHandler:this.inputHandler,options:C,errorText:this.errors.reason})),t("div",{class:"col-12"},t("form-control-textarea",{name:"description",label:"Note (optional)",defaultValue:s.description,inputHandler:this.inputHandler,maxLength:250,errorText:this.errors.description})),t("div",{class:"form-group d-flex flex-row-reverse"},t(m,{variant:"primary",type:"submit",onClick:this.refundPayment.bind(this),isLoading:this.paymentLoading||this.refundLoading,hidden:this.hideSubmitButton,disabled:this.submitDisabled},`Refund ${n(+e)}`))))))}};export{I as justifi_refund_payment}
1
+ import{h as t,r as s,c as e}from"./p-DwYM91AU.js";import{c as r,a as i,F as o}from"./p-DiJD6Iqx.js";import{f as n}from"./p-BS7OgSQe.js";import"./p-tGDdRx0W.js";import{C as a,a as u}from"./p-Cjcsf8ku.js";import{R as l,k as h}from"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{B as m}from"./p-Bqlcv3ZV.js";import{S as c}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{P as p}from"./p-C8QOezo8.js";import{m as d}from"./p-Ch9cTPyq.js";import{c as f,J as v}from"./p-C6wS5-M7.js";import{g as j,a as y}from"./p-D2muobcE.js";import{A as b}from"./p-C8yN3uBj.js";import{S as w}from"./p-c7MCfTgE.js";import"./p-BFTU3MAI.js";import"./p-HXpYMWUU.js";import"./p-BYsgavgS.js";import"./p-wtuY7MT2.js";import"./p-DEhd71m_.js";const g=t=>{const s=+t;return i().required("Amount is required").test("max-amount",`Refund amount cannot be more than payment amount: ${n(s)}`,(function(t){return+t<=+s})).test("min-amount","Refund amount must be greater than 0",(function(t){return+t>0}))},C=t=>{if(t)return r({amount:g(t),description:i().optional(),reason:i().optional().oneOf([l.customerRequest,l.duplicate,l.fraudulent],"Select a reason")})},T=[{label:"Select a reason",value:""},{label:"Customer requested a refund",value:"customer_request"},{label:"Customer was double-charged",value:"duplicate"},{label:"Payment was reported as fraud",value:"fraudulent"}],x=b();class B{async postRefund(t,s,e,r){return x.post({endpoint:`payments/${t}/refunds`,headers:{"Sub-Account":s},body:r,authToken:e})}}const S=()=>t("div",{class:"row gap-3"},t("div",{class:"col-12"},t(w,{width:"100%",height:"40px"}))),A=()=>t(c,null,t("div",{class:"row gap-5"},t(S,null),t(S,null),t(S,null))),R=class{constructor(t){s(this,t),this.errorEvent=e(this,"error-event"),this.submitEvent=e(this,"submit-event"),this.refundPayload={},this.displayAmount="",this.errors={},this.paymentLoading=!0,this.refundLoading=!1,this.hideSubmitButton=!1,this.inputHandler=(t,s)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[t]:s}))}}componentWillLoad(){f(),this.analytics=new v(this),this.initializeApi(),this.formController=new o(C())}handleError(t,s,e){this.errorEvent.emit({errorCode:t,message:s,severity:e})}checkAmount(t){return t>0}handleInvalidAmount(){this.submitDisabled=!0,this.handleError(u.INVALID_REFUND_AMOUNT,"Refund amount must be greater than 0",a.ERROR)}initializeFormController(){const t=this.refundPayload.amount,s=t?t.toString():"0";this.formController=new o(C(s)),this.formController.setInitialValues({amount:s}),this.formController.values.subscribe((t=>{this.refundPayload=Object.assign({},t)})),this.formController.errors.subscribe((t=>{this.errors=Object.assign({},t)}))}initializeApi(){this.paymentId&&this.authToken?d({id:this.paymentId,authToken:this.authToken,service:new p})({onSuccess:({payment:t})=>{this.refundPayload=new h({amount:t.amount_refundable})},onError:({error:t,code:s,severity:e})=>{this.handleError(s,t,e)},final:()=>{this.checkAmount(this.refundPayload.amount)?this.initializeFormController():this.handleInvalidAmount(),this.paymentLoading=!1}}):this.handleError(u.MISSING_PROPS,"Payment ID and Auth Token are required",a.ERROR)}async refundPayment(t){if(t&&t.preventDefault(),!await this.formController.validate())return;const s=(({authToken:t,accountId:s,paymentId:e,service:r})=>async({refundBody:i,onSuccess:o,onError:n,final:u})=>{var l;try{const u=await r.postRefund(e,s,t,i);if(u.error)return n({error:y(u.error),code:j(null===(l=u.error)||void 0===l?void 0:l.code),severity:a.ERROR});o(u)}catch(t){const s=j(null==t?void 0:t.code);return n({error:t.message||t,code:s,severity:a.ERROR})}finally{return u()}})({authToken:this.authToken,accountId:this.accountId,paymentId:this.paymentId,service:new B}),e=this.formController.values.getValue();return this.refundLoading=!0,new Promise((t=>{let r;s({refundBody:e,onSuccess:t=>{r=t},onError:({error:t,code:s,severity:e})=>{r=t,this.handleError(t,s,e)},final:()=>{this.submitEvent.emit({response:r}),this.submitDisabled=!0,this.refundLoading=!1,t(r.data)}})}))}render(){if(this.paymentLoading)return t(A,null);const s=this.formController.getInitialValues(),e=this.refundPayload.amount;return t(c,null,t("form",null,t("fieldset",null,t("div",{class:"row gy-3"},t("div",{class:"col-12"},t("form-control-monetary",{name:"amount",label:"Refund Amount",defaultValue:s.amount,inputHandler:this.inputHandler,errorText:this.errors.amount})),t("div",{class:"col-12"},t("form-control-select",{name:"reason",label:"Reason for refund (optional)",defaultValue:s.reason,inputHandler:this.inputHandler,options:T,errorText:this.errors.reason})),t("div",{class:"col-12"},t("form-control-textarea",{name:"description",label:"Note (optional)",defaultValue:s.description,inputHandler:this.inputHandler,maxLength:250,errorText:this.errors.description})),t("div",{class:"form-group d-flex flex-row-reverse"},t(m,{variant:"primary",type:"submit",onClick:this.refundPayment.bind(this),isLoading:this.paymentLoading||this.refundLoading,hidden:this.hideSubmitButton,disabled:this.submitDisabled},`Refund ${n(+e)}`))))))}};export{R as justifi_refund_payment}
@@ -1 +1 @@
1
- import{r as t,c as s,h as r}from"./p-DwYM91AU.js";import{P as i}from"./p-C8QOezo8.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as o,a as e}from"./p-Cjcsf8ku.js";import{P as p}from"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-D2muobcE.js";import{c,J as m}from"./p-CApezhx9.js";import{S as h}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{d}from"./p-BitGlMSc.js";import"./p-C8yN3uBj.js";import"./p-BS7OgSQe.js";import"./p-BYsgavgS.js";import"./p-czPIvHxt.js";import"./p-BydKIJVC.js";import"./p-DOLBAxYf.js";import"./p-wtuY7MT2.js";const u=class{constructor(r){t(this,r),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=d,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){c(),this.analytics=new m(this),this.initializeGetPayments()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetPayments()}initializeGetPayments(){this.accountId&&this.authToken?this.getPayments=(({id:t,authToken:s,service:r})=>async({params:i,onSuccess:e,onError:c,final:m})=>{var h,d;try{const m=await r.fetchPayments(t,s,i);if(m.error)return c({error:n(m.error),code:a(null===(d=m.error)||void 0===d?void 0:d.code),severity:o.ERROR});{const t=Object.assign({},m.page_info);e({payments:(null===(h=m.data)||void 0===h?void 0:h.map((t=>new p(t))))||[],pagingInfo:t})}}catch(t){const s=a(null==t?void 0:t.code);return c({error:t.message||t,code:s,severity:o.ERROR})}finally{return m()}})({id:this.accountId,authToken:this.authToken,service:new i}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:e.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}render(){return r(h,{key:"1e1f5cc087e917c65e7dbabaf21b355dd3261206"},r("payments-list-core",{key:"318b81a8eaacb70cc333efb9159279bc9310dd32",getPayments:this.getPayments,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{u as justifi_payments_list}
1
+ import{r as t,c as s,h as r}from"./p-DwYM91AU.js";import{P as i}from"./p-C8QOezo8.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as o,a as e}from"./p-Cjcsf8ku.js";import{P as p}from"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-D2muobcE.js";import{c,J as m}from"./p-C6wS5-M7.js";import{S as h}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{d}from"./p-BitGlMSc.js";import"./p-C8yN3uBj.js";import"./p-BS7OgSQe.js";import"./p-BYsgavgS.js";import"./p-DEhd71m_.js";import"./p-BydKIJVC.js";import"./p-DOLBAxYf.js";import"./p-wtuY7MT2.js";const u=class{constructor(r){t(this,r),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=d,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){c(),this.analytics=new m(this),this.initializeGetPayments()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetPayments()}initializeGetPayments(){this.accountId&&this.authToken?this.getPayments=(({id:t,authToken:s,service:r})=>async({params:i,onSuccess:e,onError:c,final:m})=>{var h,d;try{const m=await r.fetchPayments(t,s,i);if(m.error)return c({error:n(m.error),code:a(null===(d=m.error)||void 0===d?void 0:d.code),severity:o.ERROR});{const t=Object.assign({},m.page_info);e({payments:(null===(h=m.data)||void 0===h?void 0:h.map((t=>new p(t))))||[],pagingInfo:t})}}catch(t){const s=a(null==t?void 0:t.code);return c({error:t.message||t,code:s,severity:o.ERROR})}finally{return m()}})({id:this.accountId,authToken:this.authToken,service:new i}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:e.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}render(){return r(h,{key:"1e1f5cc087e917c65e7dbabaf21b355dd3261206"},r("payments-list-core",{key:"318b81a8eaacb70cc333efb9159279bc9310dd32",getPayments:this.getPayments,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{u as justifi_payments_list}
@@ -1 +1 @@
1
- import{r,c as s,h as t}from"./p-DwYM91AU.js";import{S as i}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{c as e,J as o}from"./p-CApezhx9.js";import{d as a}from"./p-CFevTCAJ.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as n,a as p}from"./p-Cjcsf8ku.js";import{i as c}from"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as m,a as h}from"./p-D2muobcE.js";import{A as d}from"./p-C8yN3uBj.js";import"./p-czPIvHxt.js";import"./p-wtuY7MT2.js";import"./p-BS7OgSQe.js";import"./p-DOLBAxYf.js";import"./p-BYsgavgS.js";const l=d();class u{async fetchTerminalOrders(r,s,t){return l.get({endpoint:"terminals/orders",params:t,headers:{account:r},authToken:s})}}const f=class{constructor(t){r(this,t),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=a,this.handleErrorEvent=r=>{this.errorMessage=r.detail.message,this.errorEvent.emit(r.detail)}}componentWillLoad(){e(),this.analytics=new o(this),this.initializeGetData()}disconnectedCallback(){var r;null===(r=this.analytics)||void 0===r||r.cleanup()}initializeGetData(){this.accountId&&this.authToken?this.getTerminalOrders=(({id:r,authToken:s,service:t})=>async({params:i,onSuccess:e,onError:o,final:a})=>{var p,d;try{const a=await t.fetchTerminalOrders(r,s,i);if(a.error)return o({error:h(a.error),code:m(null===(d=a.error)||void 0===d?void 0:d.code),severity:n.ERROR});{const r=Object.assign({},a.page_info);e({terminalOrders:(null===(p=a.data)||void 0===p?void 0:p.map((r=>new c(r))))||[],pagingInfo:r})}}catch(r){const s=m(null==r?void 0:r.code);return o({error:r.message||r,code:s,severity:n.ERROR})}finally{return a()}})({id:this.accountId,authToken:this.authToken,service:new u}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:p.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return t(i,{key:"f89cb75d014a5d43c6766f0e0e7a572807c3df9f"},t("terminal-orders-list-core",{key:"c38fd6424ebca672c9577255d81b9e97712f3b9b",getTerminalOrders:this.getTerminalOrders,"onError-event":this.handleErrorEvent,columns:this.columns}))}};export{f as justifi_terminal_orders_list}
1
+ import{r,c as s,h as t}from"./p-DwYM91AU.js";import{S as i}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{c as e,J as o}from"./p-C6wS5-M7.js";import{d as a}from"./p-CFevTCAJ.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as n,a as p}from"./p-Cjcsf8ku.js";import{i as c}from"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as m,a as d}from"./p-D2muobcE.js";import{A as h}from"./p-C8yN3uBj.js";import"./p-DEhd71m_.js";import"./p-wtuY7MT2.js";import"./p-BS7OgSQe.js";import"./p-DOLBAxYf.js";import"./p-BYsgavgS.js";const l=h();class u{async fetchTerminalOrders(r,s,t){return l.get({endpoint:"terminals/orders",params:t,headers:{account:r},authToken:s})}}const f=class{constructor(t){r(this,t),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=a,this.handleErrorEvent=r=>{this.errorMessage=r.detail.message,this.errorEvent.emit(r.detail)}}componentWillLoad(){e(),this.analytics=new o(this),this.initializeGetData()}disconnectedCallback(){var r;null===(r=this.analytics)||void 0===r||r.cleanup()}initializeGetData(){this.accountId&&this.authToken?this.getTerminalOrders=(({id:r,authToken:s,service:t})=>async({params:i,onSuccess:e,onError:o,final:a})=>{var p,h;try{const a=await t.fetchTerminalOrders(r,s,i);if(a.error)return o({error:d(a.error),code:m(null===(h=a.error)||void 0===h?void 0:h.code),severity:n.ERROR});{const r=Object.assign({},a.page_info);e({terminalOrders:(null===(p=a.data)||void 0===p?void 0:p.map((r=>new c(r))))||[],pagingInfo:r})}}catch(r){const s=m(null==r?void 0:r.code);return o({error:r.message||r,code:s,severity:n.ERROR})}finally{return a()}})({id:this.accountId,authToken:this.authToken,service:new u}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:p.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return t(i,{key:"f89cb75d014a5d43c6766f0e0e7a572807c3df9f"},t("terminal-orders-list-core",{key:"c38fd6424ebca672c9577255d81b9e97712f3b9b",getTerminalOrders:this.getTerminalOrders,"onError-event":this.handleErrorEvent,columns:this.columns}))}};export{f as justifi_terminal_orders_list}
@@ -1 +1 @@
1
- import{h as t,r as e,c as a}from"./p-DwYM91AU.js";import{c as s}from"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as i,a as o}from"./p-Cjcsf8ku.js";import{h as r}from"./p-BpaE8q5f.js";import{p as c}from"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{c as n,J as h}from"./p-CApezhx9.js";import{g as p,a as d}from"./p-D2muobcE.js";import{P as l}from"./p-CPtsjcdm.js";import{T as f,l as u,a as m,b,c as y,d as _,e as w,f as T,g as j,h as v,i as g,j as k,k as C}from"./p-BTzt8N0l.js";import{S as D}from"./p-BP2sTIQV.js";import{T as P}from"./p-CZfYo5-1.js";import{a as S}from"./p-BS7OgSQe.js";import{S as I,T as q}from"./p-wtuY7MT2.js";import"./p-BYsgavgS.js";import"./p-czPIvHxt.js";import"./p-C8yN3uBj.js";import"./p-B-0a8Xqm.js";const B={id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of each transaction"},"ID"),account_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the account associated with each transaction"},"Account ID"),payout_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the payout associated with each transaction"},"Payout ID"),financial_transaction_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),amount:()=>t("th",{part:I,scope:"col",title:"The dollar amount of each transaction"},"Amount"),fee:()=>t("th",{part:I,scope:"col",title:"The fee associated with each transaction"},"Fee"),net:()=>t("th",{part:I,scope:"col",title:"The net amount of each transaction"},"Net"),currency:()=>t("th",{part:I,scope:"col",title:"The currency of each transaction"},"Currency"),description:()=>t("th",{part:I,scope:"col",title:"The description of each transaction"},"Description"),source_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),txn_type:()=>t("th",{part:I,scope:"col",title:"The type of each transaction"},"Type"),created_at:()=>t("th",{part:I,scope:"col",title:"The date and time each transaction was made"},"Processed On"),available_on:()=>t("th",{part:I,scope:"col",title:"The date and time each transaction will be available"},"Available On"),updated_at:()=>t("th",{part:I,scope:"col",title:"The date and time each transaction was last updated"},"Updated On")},x={fee:"Fee",payment:"Payment",payout:"Payout",seller_payment_refund:"Seller Payment Refund",dispute_amount_collected:"Dispute Amount Collected",dispute_fee_collected:"Dispute Fee Collected",seller_payment:"Seller Payment",transfer:"Transfer",partner_platform_proceeds_credit:"Partner Platform Proceeds Credit"},E={id:e=>t("td",{part:q(e.id)},e.id),account_id:e=>t("td",{part:q(e.account_id)},e.account_id),payout_id:e=>t("td",{part:q(e.payout_id)},e.payout_id),financial_transaction_id:e=>t("td",{part:q(e.financial_transaction_id)},e.financial_transaction_id),amount:e=>t("td",{part:q(e.amount)},e.formattedPaymentAmount(e.amount)),fee:e=>t("td",{part:q(e.fee)},e.formattedPaymentAmount(e.fee)),net:e=>t("td",{part:q(e.net)},e.formattedPaymentAmount(e.net)),currency:e=>t("td",{part:q(e.currency)},e.currency),description:e=>t("td",{part:q(e.description)},e.description),source_id:e=>t("td",{part:q(e.source_id)},e.source_id),txn_type:e=>t("td",{part:q(e.txn_type)},x[e.txn_type]),created_at:e=>t("td",{part:q(e.created_at)},t("div",{class:"fw-bold"},S(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},S(e.created_at,{showTime:!0}))),available_on:e=>t("td",{part:q(e.available_on)},t("div",{class:"fw-bold"},S(e.available_on,{showDisplayDate:!0})),t("div",{class:"fw-bold"},S(e.available_on,{showTime:!0}))),updated_at:e=>t("td",{part:q(e.updated_at)},t("div",{class:"fw-bold"},S(e.updated_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},S(e.updated_at,{showTime:!0})))},O=class{constructor(t){e(this,t),this.clickEvent=a(this,"click-event"),this.errorEvent=a(this,"error-event"),this.balanceTransactions=[],this.isLoading=!0,this.errorMessage=null,this.paging=c,this.pagingParams={},this.columns="created_at,txn_type,description,amount,fee,net",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:P.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:P.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const a=this.balanceTransactions.find((t=>t.id===e));this.clickEvent.emit({name:P.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,B,E),n(),this.analytics=new h(this),this.initializeApi()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeApi()}handleError(t,e,a){this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:e,severity:a})}initializeApi(){this.payoutId&&this.authToken?(({accountId:t,authToken:e,service:a})=>async({params:s,onSuccess:o,onError:c,final:n})=>{var h;try{const n=await a.fetchPayoutTransactions(t,e,s);n.error?c({error:d(n.error),code:p(null===(h=n.error)||void 0===h?void 0:h.code),severity:i.ERROR}):o({balanceTransactions:n.data.map((t=>new r(t))),pagingInfo:Object.assign({},n.page_info)})}catch(t){const e=p(null==t?void 0:t.code);c({error:d(t),code:e,severity:i.ERROR})}finally{n()}})({accountId:s.accountId,authToken:this.authToken,service:new l})({params:this.requestParams,onSuccess:({balanceTransactions:t,pagingInfo:e})=>{this.balanceTransactions=t,this.paging=e,this.transactionsTable.collectionData=this.balanceTransactions},onError:({error:t,code:e,severity:a})=>{this.errorMessage=t.message,this.handleError(t,e,a)},final:()=>{this.isLoading=!1}}):(this.errorMessage="payout-id and auth-token props are required",this.handleError(o.MISSING_PROPS,this.errorMessage,i.ERROR))}get entityId(){return this.balanceTransactions.map((t=>t.id))}get showEmptyState(){return!this.isLoading&&!this.errorMessage&&this.transactionsTable.rowData.length<1}get showErrorState(){return!this.isLoading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.isLoading}get requestParams(){return Object.assign({payout_id:this.payoutId,limit:"15"},this.pagingParams)}render(){return t(D,{key:"ab6de6bc1bd8b389c3853cc8c9ff0a52ac79e139"},t(u,{key:"3946c0161a51c292e53776df23ef0aa297ab8a24"},t(m,{key:"7f7acd0813a8eb710889d540b6c5b7ae6831e47a"},t(b,{key:"eb0b11273c85116093d119bdbc8984f7c71729f0"},t(y,{key:"5485e54cca61a69a48b4a0eb70ff4cfbf409cfab"},this.transactionsTable.columnData.map((t=>t)))),t(_,{key:"778592bd28c2ed42fcb751f695ef97b75c911c17"},t(w,{key:"2123dc933b4e16f2bc4588a6ec4357d3067a919f",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(T,{key:"e13e4ba98217c4c41cc406d7f6bde34831771952",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(j,{key:"c837011abb597d3811cdc5636a457afab49224f6",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(v,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(g,{key:"a189800b2a36f8880bb7fb2ab60b8b2afd24d760"},t(k,{key:"ae78dbea1986d6c0ee493bf26d8bb01ad294a1e2"},t(C,{key:"2146861e294be47a5c63f3354ff6744ad71b4d70",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"2ab6bfa9a7534c063e603eaf25e4e6f44cbda859",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],payoutId:["propChanged"],authToken:["propChanged"]}}};export{O as justifi_payout_transactions_list}
1
+ import{h as t,r as e,c as a}from"./p-DwYM91AU.js";import{c as s}from"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as i,a as o}from"./p-Cjcsf8ku.js";import{h as r}from"./p-BpaE8q5f.js";import{p as c}from"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{c as n,J as h}from"./p-C6wS5-M7.js";import{g as p,a as d}from"./p-D2muobcE.js";import{P as l}from"./p-CPtsjcdm.js";import{T as f,l as u,a as m,b,c as y,d as _,e as w,f as T,g as j,h as g,i as v,j as k,k as C}from"./p-BTzt8N0l.js";import{S as D}from"./p-BP2sTIQV.js";import{T as S}from"./p-CZfYo5-1.js";import{a as P}from"./p-BS7OgSQe.js";import{S as I,T as q}from"./p-wtuY7MT2.js";import"./p-BYsgavgS.js";import"./p-DEhd71m_.js";import"./p-C8yN3uBj.js";import"./p-B-0a8Xqm.js";const B={id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of each transaction"},"ID"),account_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the account associated with each transaction"},"Account ID"),payout_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the payout associated with each transaction"},"Payout ID"),financial_transaction_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),amount:()=>t("th",{part:I,scope:"col",title:"The dollar amount of each transaction"},"Amount"),fee:()=>t("th",{part:I,scope:"col",title:"The fee associated with each transaction"},"Fee"),net:()=>t("th",{part:I,scope:"col",title:"The net amount of each transaction"},"Net"),currency:()=>t("th",{part:I,scope:"col",title:"The currency of each transaction"},"Currency"),description:()=>t("th",{part:I,scope:"col",title:"The description of each transaction"},"Description"),source_id:()=>t("th",{part:I,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),txn_type:()=>t("th",{part:I,scope:"col",title:"The type of each transaction"},"Type"),created_at:()=>t("th",{part:I,scope:"col",title:"The date and time each transaction was made"},"Processed On"),available_on:()=>t("th",{part:I,scope:"col",title:"The date and time each transaction will be available"},"Available On"),updated_at:()=>t("th",{part:I,scope:"col",title:"The date and time each transaction was last updated"},"Updated On")},E={fee:"Fee",payment:"Payment",payout:"Payout",seller_payment_refund:"Seller Payment Refund",dispute_amount_collected:"Dispute Amount Collected",dispute_fee_collected:"Dispute Fee Collected",seller_payment:"Seller Payment",transfer:"Transfer",partner_platform_proceeds_credit:"Partner Platform Proceeds Credit"},O={id:e=>t("td",{part:q(e.id)},e.id),account_id:e=>t("td",{part:q(e.account_id)},e.account_id),payout_id:e=>t("td",{part:q(e.payout_id)},e.payout_id),financial_transaction_id:e=>t("td",{part:q(e.financial_transaction_id)},e.financial_transaction_id),amount:e=>t("td",{part:q(e.amount)},e.formattedPaymentAmount(e.amount)),fee:e=>t("td",{part:q(e.fee)},e.formattedPaymentAmount(e.fee)),net:e=>t("td",{part:q(e.net)},e.formattedPaymentAmount(e.net)),currency:e=>t("td",{part:q(e.currency)},e.currency),description:e=>t("td",{part:q(e.description)},e.description),source_id:e=>t("td",{part:q(e.source_id)},e.source_id),txn_type:e=>t("td",{part:q(e.txn_type)},E[e.txn_type]),created_at:e=>t("td",{part:q(e.created_at)},t("div",{class:"fw-bold"},P(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},P(e.created_at,{showTime:!0}))),available_on:e=>t("td",{part:q(e.available_on)},t("div",{class:"fw-bold"},P(e.available_on,{showDisplayDate:!0})),t("div",{class:"fw-bold"},P(e.available_on,{showTime:!0}))),updated_at:e=>t("td",{part:q(e.updated_at)},t("div",{class:"fw-bold"},P(e.updated_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},P(e.updated_at,{showTime:!0})))},x=class{constructor(t){e(this,t),this.clickEvent=a(this,"click-event"),this.errorEvent=a(this,"error-event"),this.balanceTransactions=[],this.isLoading=!0,this.errorMessage=null,this.paging=c,this.pagingParams={},this.columns="created_at,txn_type,description,amount,fee,net",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:S.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:S.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const a=this.balanceTransactions.find((t=>t.id===e));this.clickEvent.emit({name:S.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,B,O),n(),this.analytics=new h(this),this.initializeApi()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeApi()}handleError(t,e,a){this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:e,severity:a})}initializeApi(){this.payoutId&&this.authToken?(({accountId:t,authToken:e,service:a})=>async({params:s,onSuccess:o,onError:c,final:n})=>{var h;try{const n=await a.fetchPayoutTransactions(t,e,s);n.error?c({error:d(n.error),code:p(null===(h=n.error)||void 0===h?void 0:h.code),severity:i.ERROR}):o({balanceTransactions:n.data.map((t=>new r(t))),pagingInfo:Object.assign({},n.page_info)})}catch(t){const e=p(null==t?void 0:t.code);c({error:d(t),code:e,severity:i.ERROR})}finally{n()}})({accountId:s.accountId,authToken:this.authToken,service:new l})({params:this.requestParams,onSuccess:({balanceTransactions:t,pagingInfo:e})=>{this.balanceTransactions=t,this.paging=e,this.transactionsTable.collectionData=this.balanceTransactions},onError:({error:t,code:e,severity:a})=>{this.errorMessage=t.message,this.handleError(t,e,a)},final:()=>{this.isLoading=!1}}):(this.errorMessage="payout-id and auth-token props are required",this.handleError(o.MISSING_PROPS,this.errorMessage,i.ERROR))}get entityId(){return this.balanceTransactions.map((t=>t.id))}get showEmptyState(){return!this.isLoading&&!this.errorMessage&&this.transactionsTable.rowData.length<1}get showErrorState(){return!this.isLoading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.isLoading}get requestParams(){return Object.assign({payout_id:this.payoutId,limit:"15"},this.pagingParams)}render(){return t(D,{key:"ab6de6bc1bd8b389c3853cc8c9ff0a52ac79e139"},t(u,{key:"3946c0161a51c292e53776df23ef0aa297ab8a24"},t(m,{key:"7f7acd0813a8eb710889d540b6c5b7ae6831e47a"},t(b,{key:"eb0b11273c85116093d119bdbc8984f7c71729f0"},t(y,{key:"5485e54cca61a69a48b4a0eb70ff4cfbf409cfab"},this.transactionsTable.columnData.map((t=>t)))),t(_,{key:"778592bd28c2ed42fcb751f695ef97b75c911c17"},t(w,{key:"2123dc933b4e16f2bc4588a6ec4357d3067a919f",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(T,{key:"e13e4ba98217c4c41cc406d7f6bde34831771952",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(j,{key:"c837011abb597d3811cdc5636a457afab49224f6",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(g,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(v,{key:"a189800b2a36f8880bb7fb2ab60b8b2afd24d760"},t(k,{key:"ae78dbea1986d6c0ee493bf26d8bb01ad294a1e2"},t(C,{key:"2146861e294be47a5c63f3354ff6744ad71b4d70",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"2ab6bfa9a7534c063e603eaf25e4e6f44cbda859",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],payoutId:["propChanged"],authToken:["propChanged"]}}};export{x as justifi_payout_transactions_list}
@@ -0,0 +1 @@
1
+ import{h as s,r as t,c as i}from"./p-DwYM91AU.js";import{A as e}from"./p-C8yN3uBj.js";import{C as r,a as o}from"./p-Cjcsf8ku.js";import"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as a,a as n}from"./p-D2muobcE.js";import{c,J as l}from"./p-C6wS5-M7.js";import{c as h}from"./p-DU8dqq9U.js";import{p as d,f as p,r as u,j as v}from"./p-BS7OgSQe.js";import{v as m,i as f,a as y,H as j}from"./p-nrZ9yHcl.js";import{D as g,E as _}from"./p-wtuY7MT2.js";import{S as w}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{S as C}from"./p-c7MCfTgE.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-DEhd71m_.js";import"./p-DCIW8z1f.js";import"./p-HXpYMWUU.js";const k=e();class T{async fetchQuote(s,t){return k.post({endpoint:"insurance/quotes",body:t,authToken:s})}async toggleCoverage(s,t,i){return k.post({endpoint:`insurance/quotes/${t}/toggle`,body:i,authToken:s})}}const b=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(C,{width:"35%",height:"30px"})),s("div",{class:"col-12"},s(C,{width:"70%"})),s("div",{class:"col-12"},s(C,{width:"40%"})),s("div",{class:"col-12"},s(C,{width:"40%"})),s("div",{class:"col-12"},s(C,{width:"100%"})),s("div",{class:"col-12"},s(C,{width:"80%"}))),H=class{constructor(s){t(this,s),this.insuranceUpdated=i(this,"insurance-updated"),this.errorEvent=i(this,"error-event"),this.isLoading=!0}async validate(){return m()}processHTMLContent(s){return d(s,[s=>u(s,"style"),s=>v(s,"a","part",g),s=>v(s,"p","part",g)])}componentWillLoad(){c(),this.analytics=new l(this),this.initializeServiceMethods(),this.getQuote&&this.fetchData()}disconnectedCallback(){var s;null===(s=this.analytics)||void 0===s||s.cleanup()}initializeServiceMethods(){const s=this.authToken||h.authToken;if(!s)return void this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:"Missing authToken",severity:r.ERROR});const t={authToken:s,service:new T};this.getQuote=(({authToken:s,service:t})=>async({payload:i,onSuccess:e,onError:o})=>{var c;try{const l=await t.fetchQuote(s,i);if(l.error)return o({error:n(l.error),code:a(null===(c=l.error)||void 0===c?void 0:c.code),severity:r.ERROR});e({quote:l.data})}catch(s){const t=a(null==s?void 0:s.code);return o({error:s.message||s,code:t,severity:r.ERROR})}})(t),this.toggleCoverage=(({authToken:s,service:t})=>async({quoteId:i,payload:e,onSuccess:o,onError:c})=>{var l;try{const h=await t.toggleCoverage(s,i,e);if(h.error)return c({error:n(h.error),code:a(null===(l=h.error)||void 0===l?void 0:l.code),severity:r.ERROR});o({quote:h.data})}catch(s){const t=a(null==s?void 0:s.code);return c({error:s.message||s,code:t,severity:r.ERROR})}})(t)}fetchData(){this.isLoading=!0,this.getQuote({payload:{checkout_id:this.checkoutId||h.checkoutId,policy_type:"season_interruption",primary_identity:{state:this.primaryIdentityState,email:this.primaryIdentityEmailAddress,first_name:this.primaryIdentityFirstName,last_name:this.primaryIdentityLastName,postal_code:this.primaryIdentityPostalCode,country:this.primaryIdentityCountry},policy_attributes:{insurable_amount:this.policyAttributesInsurableAmount,start_date:this.policyAttributesStartDate,end_date:this.policyAttributesEndDate,covered_identity:{first_name:this.coveredIdentityFirstName,last_name:this.coveredIdentityLastName}}},onSuccess:({quote:s})=>{this.quote=s,this.quote.product.description=this.processHTMLContent(this.quote.product.description),this.quote.product.legal_disclaimer=this.processHTMLContent(this.quote.product.legal_disclaimer),f[s.policy_type]=s.accepted,this.isLoading=!1},onError:({error:s,code:t,severity:i})=>{this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}onChangeHandler(s,t){this.accepted=t,y[this.quote.policy_type]=!1,this.toggleCoverage({quoteId:this.quote.id,payload:{accepted:this.accepted},onSuccess:()=>{this.insuranceUpdated.emit(),f[this.quote.policy_type]=this.accepted},onError:({error:s,code:t,severity:i})=>{this.errorEvent.emit({errorCode:t,message:s,severity:i})}})}get error(){var s;return y[null===(s=this.quote)||void 0===s?void 0:s.policy_type]}render(){var t,i,e,r;return h&&!1===h.insuranceEnabled?(console.warn("[justifi-season-interruption-insurance] Insurance is disabled for this checkout (payment_settings.insurance_payments=false)."),null):s(w,null,this.isLoading?s(b,null):s("div",null,s(j,{text:null===(t=this.quote)||void 0===t?void 0:t.product.title,class:"fs-5 fw-bold pb-3"}),s("small",{part:g,innerHTML:null===(i=this.quote)||void 0===i?void 0:i.product.description}),s("form-control-radio",{label:`Accept coverage for ${p(null===(e=this.quote)||void 0===e?void 0:e.total_cents)}`,name:"opt-in",value:"true",checked:"true"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("form-control-radio",{label:"Decline coverage",name:"opt-in",value:"false",checked:"false"===this.accepted,inputHandler:this.onChangeHandler.bind(this),errorText:this.error?" ":void 0}),s("div",{class:"invalid-feedback",style:{display:this.error?"block":"none"},part:_},"Please select an option"),s("small",{part:g,innerHTML:null===(r=this.quote)||void 0===r?void 0:r.product.legal_disclaimer})))}};export{H as justifi_season_interruption_insurance}
@@ -1 +1 @@
1
- import{h as t,r as e,c as a}from"./p-DwYM91AU.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as s,a as i}from"./p-Cjcsf8ku.js";import{g as n}from"./p-BpaE8q5f.js";import{p as r}from"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{c as o,J as c}from"./p-CApezhx9.js";import{g as p,a as h}from"./p-D2muobcE.js";import{P as d}from"./p-C8QOezo8.js";import{T as f,l,a as u,b as m,c as y,d as b,e as _,f as g,g as j,h as T,i as k,j as w,k as v}from"./p-BTzt8N0l.js";import{S as C}from"./p-BP2sTIQV.js";import{T as S}from"./p-CZfYo5-1.js";import{a as D}from"./p-BS7OgSQe.js";import{S as x,T as R}from"./p-wtuY7MT2.js";import"./p-BYsgavgS.js";import"./p-czPIvHxt.js";import"./p-C8yN3uBj.js";import"./p-B-0a8Xqm.js";const B={created_at:()=>t("th",{part:x,scope:"col",title:"The date and time each transaction was made"},"Processed On"),type:()=>t("th",{part:x,scope:"col",title:"The type of each transaction"},"Type"),id:()=>t("th",{part:x,scope:"col",title:"The unique identifier of each transaction"},"ID"),amount:()=>t("th",{part:x,scope:"col",title:"The dollar amount of each transaction",class:"text-end"},"Amount"),balance:()=>t("th",{part:x,scope:"col",title:"The running total amount of this payment that belongs to you",class:"text-end"},"Balance"),currency:()=>t("th",{part:x,scope:"col",title:"The currency of each transaction"},"Currency"),financial_transaction_id:()=>t("th",{part:x,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),payment_id:()=>t("th",{part:x,scope:"col",title:"The unique identifier of the payment associated with the payment balance transaction"},"Payment ID"),payment_balance_txn_type:()=>t("th",{part:x,scope:"col",title:"The type of the payment balance transaction"},"Transaction Type"),source_id:()=>t("th",{part:x,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),source_type:()=>t("th",{part:x,scope:"col",title:"The type of the source object associated with the payment balance transaction"},"Source Type")},F={ach_return:"ACH Return",ach_return_fee:"ACH Return Fee",dispute:"Dispute",dispute_fee:"Dispute Fee",dispute_fee_refund:"Dispute Fee Refund",dispute_refund:"Dispute Refund",payment:"Payment",payment_fee:"Fee",refund:"Refund",fee_refund:"Fee Refund",application_fee_returned:"Application Fee Returned",refund_failure:"Refund Failure",void:"Void"},I={created_at:(e,a)=>t("td",{part:R(a)},t("div",{class:"fw-bold"},D(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},D(e.created_at,{showTime:!0}))),type:(e,a)=>t("td",{part:R(a)},F[e.payment_balance_txn_type]),id:(e,a)=>t("td",{part:R(a)},e.id),amount:(e,a)=>t("td",{part:R(a),class:"text-end"},e.formattedPaymentAmount(e.amount)),balance:(e,a)=>t("td",{part:R(a),class:"text-end"},e.formattedPaymentAmount(e.balance)),currency:(e,a)=>t("td",{part:R(a)},e.currency),financial_transaction_id:(e,a)=>t("td",{part:R(a)},e.financial_transaction_id),payment_id:(e,a)=>t("td",{part:R(a)},e.payment_id),payment_balance_txn_type:(e,a)=>t("td",{part:R(a)},e.payment_balance_txn_type),source_id:(e,a)=>t("td",{part:R(a)},e.source_id),source_type:(e,a)=>t("td",{part:R(a)},e.source_type)},E=class{constructor(t){e(this,t),this.clickEvent=a(this,"click-event"),this.errorEvent=a(this,"error-event"),this.balanceTransactions=[],this.isLoading=!0,this.errorMessage=null,this.paging=r,this.pagingParams={},this.columns="created_at,type,id,amount,balance",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:S.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:S.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const a=this.balanceTransactions.find((t=>t.id===e));this.clickEvent.emit({name:S.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,B,I),o(),this.analytics=new c(this),this.initializeApi()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeApi()}handleError(t,e,a){this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:e,severity:a})}initializeApi(){this.paymentId&&this.authToken?(({id:t,authToken:e,service:a})=>async({params:i,onSuccess:r,onError:o,final:c})=>{var d;try{const c=await a.fetchPaymentTransactions(t,e,i);c.error?o({error:h(c.error),code:p(null===(d=c.error)||void 0===d?void 0:d.code),severity:s.ERROR}):r({balanceTransactions:c.data.map((t=>new n(t))),pagingInfo:Object.assign({},c.page_info)})}catch(t){const e=p(null==t?void 0:t.code);o({error:h(t),code:e,severity:s.ERROR})}finally{c()}})({id:this.paymentId,authToken:this.authToken,service:new d})({params:this.pagingParams,onSuccess:({balanceTransactions:t,pagingInfo:e})=>{this.balanceTransactions=t,this.paging=e,this.transactionsTable.collectionData=this.balanceTransactions},onError:({error:t,code:e,severity:a})=>{this.errorMessage=t.message,this.handleError(t,e,a)},final:()=>{this.isLoading=!1}}):(this.errorMessage="payment-id and auth-token props are required",this.handleError(i.MISSING_PROPS,this.errorMessage,s.ERROR))}get entityId(){return this.balanceTransactions.map((t=>t.id))}get showEmptyState(){return!this.isLoading&&!this.errorMessage&&this.transactionsTable.rowData.length<1}get showErrorState(){return!this.isLoading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.isLoading}render(){return t(C,{key:"ce4fd1549223738580d3a4e9195f535619491f5a"},t(l,{key:"0991e7ca748e75fa42e96be1dd1c9e9d2c876db9"},t(u,{key:"1b5d58cbf6f27fdf2faef658ae6148ee642ad3fe"},t(m,{key:"5eaef864fe0072cd4557a0585a409572f6806969"},t(y,{key:"a9c35dd1c0031da4a82207a4313c9a521729db40"},this.transactionsTable.columnData.map((t=>t)))),t(b,{key:"1ed790fcc17bbb6a93f6eaf18b741fc3b2e80855"},t(_,{key:"64570f5736317dfabc97a7967dfa52dbc0dd384c",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(g,{key:"45d4d52687e203de3c5f45e406862b882c03757c",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(j,{key:"b8c941adc6bad5e40edd33b69231b668f587f16b",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(T,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(k,{key:"a76f922158b408ff6a70c35a47531405c012aaae"},t(w,{key:"4cf90633de51f6e9286481300cbbe0f0183f1bfb"},t(v,{key:"c06c168e8ba7c3115eab18c8366362be16582f86",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"f08aa685537d1ba529f5506d74bdc20d0352dd2b",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],paymentId:["propChanged"],authToken:["propChanged"]}}};export{E as justifi_payment_transactions_list}
1
+ import{h as t,r as e,c as a}from"./p-DwYM91AU.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as s,a as i}from"./p-Cjcsf8ku.js";import{g as n}from"./p-BpaE8q5f.js";import{p as r}from"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{c as o,J as c}from"./p-C6wS5-M7.js";import{g as p,a as h}from"./p-D2muobcE.js";import{P as d}from"./p-C8QOezo8.js";import{T as f,l,a as u,b as m,c as y,d as b,e as _,f as g,g as j,h as T,i as w,j as k,k as v}from"./p-BTzt8N0l.js";import{S as C}from"./p-BP2sTIQV.js";import{T as S}from"./p-CZfYo5-1.js";import{a as D}from"./p-BS7OgSQe.js";import{S as R,T as B}from"./p-wtuY7MT2.js";import"./p-BYsgavgS.js";import"./p-DEhd71m_.js";import"./p-C8yN3uBj.js";import"./p-B-0a8Xqm.js";const F={created_at:()=>t("th",{part:R,scope:"col",title:"The date and time each transaction was made"},"Processed On"),type:()=>t("th",{part:R,scope:"col",title:"The type of each transaction"},"Type"),id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of each transaction"},"ID"),amount:()=>t("th",{part:R,scope:"col",title:"The dollar amount of each transaction",class:"text-end"},"Amount"),balance:()=>t("th",{part:R,scope:"col",title:"The running total amount of this payment that belongs to you",class:"text-end"},"Balance"),currency:()=>t("th",{part:R,scope:"col",title:"The currency of each transaction"},"Currency"),financial_transaction_id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of the financial transaction associated with the payment balance transaction"},"Financial Transaction ID"),payment_id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of the payment associated with the payment balance transaction"},"Payment ID"),payment_balance_txn_type:()=>t("th",{part:R,scope:"col",title:"The type of the payment balance transaction"},"Transaction Type"),source_id:()=>t("th",{part:R,scope:"col",title:"The unique identifier of the source object associated with the payment balance transaction"},"Source ID"),source_type:()=>t("th",{part:R,scope:"col",title:"The type of the source object associated with the payment balance transaction"},"Source Type")},x={ach_return:"ACH Return",ach_return_fee:"ACH Return Fee",dispute:"Dispute",dispute_fee:"Dispute Fee",dispute_fee_refund:"Dispute Fee Refund",dispute_refund:"Dispute Refund",payment:"Payment",payment_fee:"Fee",refund:"Refund",fee_refund:"Fee Refund",application_fee_returned:"Application Fee Returned",refund_failure:"Refund Failure",void:"Void"},E={created_at:(e,a)=>t("td",{part:B(a)},t("div",{class:"fw-bold"},D(e.created_at,{showDisplayDate:!0})),t("div",{class:"fw-bold"},D(e.created_at,{showTime:!0}))),type:(e,a)=>t("td",{part:B(a)},x[e.payment_balance_txn_type]),id:(e,a)=>t("td",{part:B(a)},e.id),amount:(e,a)=>t("td",{part:B(a),class:"text-end"},e.formattedPaymentAmount(e.amount)),balance:(e,a)=>t("td",{part:B(a),class:"text-end"},e.formattedPaymentAmount(e.balance)),currency:(e,a)=>t("td",{part:B(a)},e.currency),financial_transaction_id:(e,a)=>t("td",{part:B(a)},e.financial_transaction_id),payment_id:(e,a)=>t("td",{part:B(a)},e.payment_id),payment_balance_txn_type:(e,a)=>t("td",{part:B(a)},e.payment_balance_txn_type),source_id:(e,a)=>t("td",{part:B(a)},e.source_id),source_type:(e,a)=>t("td",{part:B(a)},e.source_type)},I=class{constructor(t){e(this,t),this.clickEvent=a(this,"click-event"),this.errorEvent=a(this,"error-event"),this.balanceTransactions=[],this.isLoading=!0,this.errorMessage=null,this.paging=r,this.pagingParams={},this.columns="created_at,type,id,amount,balance",this.handleClickPrevious=t=>{this.pagingParams={before_cursor:t},this.clickEvent.emit({name:S.previous})},this.handleClickNext=t=>{this.pagingParams={after_cursor:t},this.clickEvent.emit({name:S.next})},this.rowClickHandler=t=>{const e=t.target.closest("tr").dataset.rowEntityId;if(!e)return;const a=this.balanceTransactions.find((t=>t.id===e));this.clickEvent.emit({name:S.row,data:a})}}componentWillLoad(){this.transactionsTable=new f(this.balanceTransactions,this.columns,F,E),o(),this.analytics=new c(this),this.initializeApi()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeApi()}handleError(t,e,a){this.isLoading=!1,this.errorEvent.emit({errorCode:t,message:e,severity:a})}initializeApi(){this.paymentId&&this.authToken?(({id:t,authToken:e,service:a})=>async({params:i,onSuccess:r,onError:o,final:c})=>{var d;try{const c=await a.fetchPaymentTransactions(t,e,i);c.error?o({error:h(c.error),code:p(null===(d=c.error)||void 0===d?void 0:d.code),severity:s.ERROR}):r({balanceTransactions:c.data.map((t=>new n(t))),pagingInfo:Object.assign({},c.page_info)})}catch(t){const e=p(null==t?void 0:t.code);o({error:h(t),code:e,severity:s.ERROR})}finally{c()}})({id:this.paymentId,authToken:this.authToken,service:new d})({params:this.pagingParams,onSuccess:({balanceTransactions:t,pagingInfo:e})=>{this.balanceTransactions=t,this.paging=e,this.transactionsTable.collectionData=this.balanceTransactions},onError:({error:t,code:e,severity:a})=>{this.errorMessage=t.message,this.handleError(t,e,a)},final:()=>{this.isLoading=!1}}):(this.errorMessage="payment-id and auth-token props are required",this.handleError(i.MISSING_PROPS,this.errorMessage,s.ERROR))}get entityId(){return this.balanceTransactions.map((t=>t.id))}get showEmptyState(){return!this.isLoading&&!this.errorMessage&&this.transactionsTable.rowData.length<1}get showErrorState(){return!this.isLoading&&!!this.errorMessage}get showRowData(){return!this.showEmptyState&&!this.showErrorState&&!this.isLoading}render(){return t(C,{key:"ce4fd1549223738580d3a4e9195f535619491f5a"},t(l,{key:"0991e7ca748e75fa42e96be1dd1c9e9d2c876db9"},t(u,{key:"1b5d58cbf6f27fdf2faef658ae6148ee642ad3fe"},t(m,{key:"5eaef864fe0072cd4557a0585a409572f6806969"},t(y,{key:"a9c35dd1c0031da4a82207a4313c9a521729db40"},this.transactionsTable.columnData.map((t=>t)))),t(b,{key:"1ed790fcc17bbb6a93f6eaf18b741fc3b2e80855"},t(_,{key:"64570f5736317dfabc97a7967dfa52dbc0dd384c",columnSpan:this.transactionsTable.columnKeys.length,isLoading:this.isLoading}),t(g,{key:"45d4d52687e203de3c5f45e406862b882c03757c",isEmpty:this.showEmptyState,columnSpan:this.transactionsTable.columnKeys.length}),t(j,{key:"b8c941adc6bad5e40edd33b69231b668f587f16b",columnSpan:this.transactionsTable.columnKeys.length,errorMessage:this.errorMessage}),this.showRowData&&this.transactionsTable.rowData.map(((e,a)=>t(T,{"data-test-id":"table-row","data-row-entity-id":this.entityId[a],onClick:this.rowClickHandler},e)))),this.paging&&t(w,{key:"a76f922158b408ff6a70c35a47531405c012aaae"},t(k,{key:"4cf90633de51f6e9286481300cbbe0f0183f1bfb"},t(v,{key:"c06c168e8ba7c3115eab18c8366362be16582f86",colSpan:this.transactionsTable.columnData.length},t("pagination-menu",{key:"f08aa685537d1ba529f5506d74bdc20d0352dd2b",paging:Object.assign(Object.assign({},this.paging),{handleClickPrevious:this.handleClickPrevious,handleClickNext:this.handleClickNext})})))))))}static get watchers(){return{pagingParams:["propChanged"],paymentId:["propChanged"],authToken:["propChanged"]}}};export{I as justifi_payment_transactions_list}
@@ -1 +1 @@
1
- import{r as e,c as t,h as s}from"./p-DwYM91AU.js";import{f as i}from"./p-BS7OgSQe.js";import{D as a,am as r}from"./p-wtuY7MT2.js";import{B as d}from"./p-Bqlcv3ZV.js";import{S as c}from"./p-BP2sTIQV.js";import{S as o}from"./p-c7MCfTgE.js";import"./p-CZfYo5-1.js";import{C as n,a as h}from"./p-Cjcsf8ku.js";import{g as p,a as f}from"./p-D2muobcE.js";import{D as l}from"./p-D_IJC4HG.js";import{D as u}from"./p-Bg2SZArf.js";import{c as b,J as y}from"./p-CApezhx9.js";import"./p-HXpYMWUU.js";import"./p-C8yN3uBj.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-BpaE8q5f.js";import"./p-BH0Xfn-F.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-czPIvHxt.js";const v=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.submitDisputeResponse(t,e,i);if(d.error){return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR})}a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}},m=class{constructor(s){e(this,s),this.clickEvent=t(this,"click-event"),this.errorEvent=t(this,"error-event"),this.submitEvent=t(this,"submit-event")}acceptDispute(){v({disputeId:this.dispute.id,authToken:this.authToken,service:new l})({payload:{forfeit:!0},onSuccess:e=>{this.submitEvent.emit({response:e})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}})}initiateRespondToDispute(){this.clickEvent.emit({name:u.respondToDispute})}isDueDatePassed(){var e;if(!(null===(e=this.dispute)||void 0===e?void 0:e.due_date))return!1;const t=new Date(this.dispute.due_date.replace(/-/g,"/").replace(/T.+/,"")),s=new Date;return s.setHours(0,0,0,0),t.setHours(0,0,0,0),t<s}render(){var e,t,n,h,p,f,l,u,b;return s(c,{key:"a494374453528ee6033589ed69dd2a0738ff8aaa"},this.isLoading&&s("div",{key:"436d266650297674d89f1ba2d299bf3ebdf16506",style:{marginBottom:"8px"}},s(o,{key:"952e9df74b83809b3a52d629ed05bc54b02754a5",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(o,{key:"f3dd82b6b941500202404ec1353c2f951f79b642",height:"18px",styles:{marginBottom:"8px"}}),s(o,{key:"608229cd12404e5e6f7014f955c24f9ff856a14f",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&this.isDueDatePassed()&&s("div",{key:"6d18b253eaa245b9f7b817c3baf473d6f6a31845",part:a},s("h1",{key:"7f7e30f8c7a9753970980796790b621a6d373548",class:"h4",part:r},"The due date (",null===(t=this.dispute)||void 0===t?void 0:t.due_date,") for this dispute has passed"),s("p",{key:"1c458aecef8ce286b6c2a46e286c57e1276aff04"},"You can no longer submit evidence to counter this dispute.")),(null===(n=this.dispute)||void 0===n?void 0:n.needsResponse)&&!this.isDueDatePassed()&&s("div",{key:"b3e85abf813bd36da6c952c9ad7c9357504bbc1d",part:a},s("h1",{key:"afcbe8f967170bc4abea0c71749a10e1c09937e0",class:"h4",part:r},"This payment is disputed"),s("p",{key:"30194ebea5f1763286f1a69f8fb2cd8c2c9d2d90"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"991505b018e4ee61b05c9872244163b729ee0cd1",class:"h5"},"Dispute details"),s("div",{key:"b94e62444ce05ac0ef6698a4b67f70088c10a9b4",class:"d-table gap-2"},s("div",{key:"8873c8b0cab9bf5e56add69007e9b281c64dcbf3",class:"d-table-row gap-2"},s("span",{key:"0c9cf9564277ba952c1b36acc7fa8660ec969266",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"0461b3c75b74e03b60dae12d80526b119d1e74d5",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(h=this.dispute)||void 0===h?void 0:h.amount))),s("div",{key:"074f92623a156b5c431719a8c11870c95377dfc1",class:"d-table-row gap-2"},s("span",{key:"04e1498ecb4d64f122c27ef0a83c38d843c72cad",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"fc3c56b35d899c06130b918cf03202cc9f44fa46",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(p=this.dispute)||void 0===p?void 0:p.reason)),s("div",{key:"13eca44a73967f235a18e2f8818a008f14a96ba2",class:"d-table-row gap-2"},s("span",{key:"954a86a2f0b77801a7c69c751a2b398f33bb2fe1",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Due Date"),s("span",{key:"21e305a5cdc269f45439671639e3984e68cb75e0",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(f=this.dispute)||void 0===f?void 0:f.due_date))),s("div",{key:"cad8b592ab80d24b3d4ce187eb534a336bd36581",class:"d-flex gap-2 mt-4 justify-content-end"},s(d,{key:"077df79dae040c41489d1206fffde036aef51954",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(d,{key:"eb26cd7bc9d93c83eefc927c565f321eb3c2bef1",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(l=this.dispute)||void 0===l?void 0:l.underReview)&&s("div",{key:"f74d8e95a2ae74e1b59ac414d0a0d5cc43dd0291"},s("h1",{key:"2404542678c5ad29dd4e3af13edebbace06734d6",class:"h4"},"This payment is disputed and under review"),s("p",{key:"0027bd32af1b0ab4ffdd42fcc0b21cb7ab55835a"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(u=this.dispute)||void 0===u?void 0:u.won)&&s("div",{key:"ff335c7dbe7bda7637d1b27a65150785e81361bc"},s("h1",{key:"36ee4c439d8e1346c115ba6f28e59008ce68d4e1",class:"h4"},"This payment was disputed"),s("p",{key:"5e6e6869d956f6ea84e64378e4bfaebeb71109b0"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(b=this.dispute)||void 0===b?void 0:b.lost)&&s("div",{key:"d67894655a47ac5327540c55fdd97db472d34f9d"},s("h1",{key:"dec3b5da213071a75183eab6e1521c5c986d3876",class:"h4"},"This payment was disputed"),s("p",{key:"806eb5f32bddde1c298eba9517c637a7fb69f598"},"The cardholder disputed this payment and the card issuer has settled it in their favor.")))}},k=class{constructor(s){e(this,s),this.errorEvent=t(this,"error-event"),this.errorMessage=null,this.apiOrigin="https://wc-proxy.justifi.ai",this.handleErrorEvent=e=>{this.errorMessage=e.detail.message,this.errorEvent.emit(e.detail)}}componentWillLoad(){b(),this.analytics=new y(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeDisputeServiceMethods()}initializeDisputeServiceMethods(){this.disputeId&&this.authToken?(this.updateDisputeResponse=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.updateDisputeResponse(t,e,i);if(d.error)return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.createDisputeEvidence(t,e,i);if(d.error)return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.submitDisputeResponse=v({disputeId:this.disputeId,authToken:this.authToken,service:new l})):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:h.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return s(c,{key:"ed6376969ab6a686999b8a31376b3c1cc8c7b566"},s("justifi-dispute-response-core",{key:"d823732d71613e9e98305d4b7d3c22af0344d209","onError-event":this.handleErrorEvent,"dispute-id":this.disputeId,disputeResponse:this.disputeResponse,createDisputeEvidence:this.createDisputeEvidence,updateDisputeResponse:this.updateDisputeResponse,submitDisputeResponse:this.submitDisputeResponse}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}},w=class{constructor(i){e(this,i),this.clickEvent=t(this,"click-event"),this.errorEvent=t(this,"error-event"),this.stepCompleteEvent=t(this,"complete-form-step-event"),this.submitEvent=t(this,"submit-event"),this.disputeResponse={},this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.componentStepMapping=[()=>s("justifi-product-or-service",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-customer-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-cancellation-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-refund-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-duplicate-charge",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-electronic-evidence",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-shipping-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-additional-statement",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors})],this.saveData=async(e,t)=>{if(Object.keys(e).length)return this.isLastStep?this.submitDisputeResponse({payload:e,onSuccess:e=>{this.submitEvent.emit({response:e}),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}}):this.updateDisputeResponse({payload:e,onSuccess:e=>{this.disputeResponse=Object.assign({},e.data),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}});this.stepCompleteEvent.emit({response:null,formStep:t})},this.initializeMakePresignedURLs=async()=>{const e=this.documentList.map((e=>this.getPresignedFileUrl(e)));return await Promise.all(e)},this.initializeFileUploads=async()=>{const e=this.documentList.map((e=>this.uploadDocument(e)));return Promise.all(e)},this.getPresignedFileUrl=async e=>this.createDisputeEvidence({payload:{file_name:e.file_name,file_type:e.file_type,dispute_evidence_type:e.dispute_evidence_type},onSuccess:t=>{e.presignedUrl=t.data.presigned_url},onError:({error:t,code:s,severity:i})=>{const a={[e.dispute_evidence_type]:t};this.documentErrors=Object.assign(Object.assign({},this.documentErrors),a),this.errorEvent.emit({errorCode:s,message:t,severity:i})}}),this.uploadDocument=async e=>{const t=await e.getFileString();if(!e.presignedUrl)throw new Error("Presigned URL is not set");return await fetch(e.presignedUrl,{method:"PUT",body:t})},this.handleSubmit=async(e,t,s)=>{if(this.isLoading=!0,t.length){if(this.documentErrors={},this.documentList=t,await this.initializeMakePresignedURLs(),Object.keys(this.documentErrors).length)throw this.isLoading=!1,new Error("Could not presign all documents");await this.initializeFileUploads()}await this.saveData(e,s),this.isLoading=!1},this.onCancel=()=>{this.clickEvent.emit({name:u.cancelDispute})},this.onBack=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.previousStep}),await this.handleSubmit(e,t,s),this.currentStep--}))},this.onNext=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.nextStep}),await this.handleSubmit(e,t,s),this.currentStep++}))},this.onSubmit=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.submit});const i=Object.assign(Object.assign({},e),{forfeit:!1});await this.handleSubmit(i,t,s)}))}}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}get isLastStep(){return this.currentStep===this.componentStepMapping.length-1}get isFirstStep(){return 0===this.currentStep}render(){return s("div",{key:"b23c5bc27b1f657b9211d3a3482ae5b99982754e",class:"row gy-3"},s("div",{key:"a630f3c475d6b8026a81724c76340dc4f6088b26",class:"col-12"},s("h1",{key:"f4e848277ee8f1ec05ef1b1dfbac0e8872d9d91f",class:"h4",part:r},"Counter dispute")),s("div",{key:"6f7f21778853a3c1ac173ac79713f5427a226a5b",class:"col-12"},this.currentStepComponent),s("div",{key:"7354846a446f5677a12a3113b3f4226060a8b86a",class:"col-12"},s("div",{key:"4fb9dbccff8b004913656c3a130b46a0216dd6bb",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(d,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(d,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(d,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(d,{variant:"primary",onClick:()=>this.onNext(),disabled:this.isLoading,isLoading:this.isLoading},"Next"))))}};export{m as justifi_dispute_notification,k as justifi_dispute_response,w as justifi_dispute_response_core}
1
+ import{r as e,c as t,h as s}from"./p-DwYM91AU.js";import{f as i}from"./p-BS7OgSQe.js";import{D as a,am as r}from"./p-wtuY7MT2.js";import{B as d}from"./p-Bqlcv3ZV.js";import{S as c}from"./p-BP2sTIQV.js";import{S as o}from"./p-c7MCfTgE.js";import"./p-CZfYo5-1.js";import{C as n,a as h}from"./p-Cjcsf8ku.js";import{g as p,a as f}from"./p-D2muobcE.js";import{D as l}from"./p-D_IJC4HG.js";import{D as u}from"./p-Bg2SZArf.js";import{c as b,J as y}from"./p-C6wS5-M7.js";import"./p-HXpYMWUU.js";import"./p-C8yN3uBj.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-BpaE8q5f.js";import"./p-BH0Xfn-F.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-DEhd71m_.js";const v=({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.submitDisputeResponse(t,e,i);if(d.error){return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR})}a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}},m=class{constructor(s){e(this,s),this.clickEvent=t(this,"click-event"),this.errorEvent=t(this,"error-event"),this.submitEvent=t(this,"submit-event")}acceptDispute(){v({disputeId:this.dispute.id,authToken:this.authToken,service:new l})({payload:{forfeit:!0},onSuccess:e=>{this.submitEvent.emit({response:e})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}})}initiateRespondToDispute(){this.clickEvent.emit({name:u.respondToDispute})}isDueDatePassed(){var e;if(!(null===(e=this.dispute)||void 0===e?void 0:e.due_date))return!1;const t=new Date(this.dispute.due_date.replace(/-/g,"/").replace(/T.+/,"")),s=new Date;return s.setHours(0,0,0,0),t.setHours(0,0,0,0),t<s}render(){var e,t,n,h,p,f,l,u,b;return s(c,{key:"a494374453528ee6033589ed69dd2a0738ff8aaa"},this.isLoading&&s("div",{key:"436d266650297674d89f1ba2d299bf3ebdf16506",style:{marginBottom:"8px"}},s(o,{key:"952e9df74b83809b3a52d629ed05bc54b02754a5",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(o,{key:"f3dd82b6b941500202404ec1353c2f951f79b642",height:"18px",styles:{marginBottom:"8px"}}),s(o,{key:"608229cd12404e5e6f7014f955c24f9ff856a14f",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&this.isDueDatePassed()&&s("div",{key:"6d18b253eaa245b9f7b817c3baf473d6f6a31845",part:a},s("h1",{key:"7f7e30f8c7a9753970980796790b621a6d373548",class:"h4",part:r},"The due date (",null===(t=this.dispute)||void 0===t?void 0:t.due_date,") for this dispute has passed"),s("p",{key:"1c458aecef8ce286b6c2a46e286c57e1276aff04"},"You can no longer submit evidence to counter this dispute.")),(null===(n=this.dispute)||void 0===n?void 0:n.needsResponse)&&!this.isDueDatePassed()&&s("div",{key:"b3e85abf813bd36da6c952c9ad7c9357504bbc1d",part:a},s("h1",{key:"afcbe8f967170bc4abea0c71749a10e1c09937e0",class:"h4",part:r},"This payment is disputed"),s("p",{key:"30194ebea5f1763286f1a69f8fb2cd8c2c9d2d90"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"991505b018e4ee61b05c9872244163b729ee0cd1",class:"h5"},"Dispute details"),s("div",{key:"b94e62444ce05ac0ef6698a4b67f70088c10a9b4",class:"d-table gap-2"},s("div",{key:"8873c8b0cab9bf5e56add69007e9b281c64dcbf3",class:"d-table-row gap-2"},s("span",{key:"0c9cf9564277ba952c1b36acc7fa8660ec969266",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"0461b3c75b74e03b60dae12d80526b119d1e74d5",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(h=this.dispute)||void 0===h?void 0:h.amount))),s("div",{key:"074f92623a156b5c431719a8c11870c95377dfc1",class:"d-table-row gap-2"},s("span",{key:"04e1498ecb4d64f122c27ef0a83c38d843c72cad",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"fc3c56b35d899c06130b918cf03202cc9f44fa46",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(p=this.dispute)||void 0===p?void 0:p.reason)),s("div",{key:"13eca44a73967f235a18e2f8818a008f14a96ba2",class:"d-table-row gap-2"},s("span",{key:"954a86a2f0b77801a7c69c751a2b398f33bb2fe1",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Due Date"),s("span",{key:"21e305a5cdc269f45439671639e3984e68cb75e0",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(f=this.dispute)||void 0===f?void 0:f.due_date))),s("div",{key:"cad8b592ab80d24b3d4ce187eb534a336bd36581",class:"d-flex gap-2 mt-4 justify-content-end"},s(d,{key:"077df79dae040c41489d1206fffde036aef51954",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(d,{key:"eb26cd7bc9d93c83eefc927c565f321eb3c2bef1",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(l=this.dispute)||void 0===l?void 0:l.underReview)&&s("div",{key:"f74d8e95a2ae74e1b59ac414d0a0d5cc43dd0291"},s("h1",{key:"2404542678c5ad29dd4e3af13edebbace06734d6",class:"h4"},"This payment is disputed and under review"),s("p",{key:"0027bd32af1b0ab4ffdd42fcc0b21cb7ab55835a"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(u=this.dispute)||void 0===u?void 0:u.won)&&s("div",{key:"ff335c7dbe7bda7637d1b27a65150785e81361bc"},s("h1",{key:"36ee4c439d8e1346c115ba6f28e59008ce68d4e1",class:"h4"},"This payment was disputed"),s("p",{key:"5e6e6869d956f6ea84e64378e4bfaebeb71109b0"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(b=this.dispute)||void 0===b?void 0:b.lost)&&s("div",{key:"d67894655a47ac5327540c55fdd97db472d34f9d"},s("h1",{key:"dec3b5da213071a75183eab6e1521c5c986d3876",class:"h4"},"This payment was disputed"),s("p",{key:"806eb5f32bddde1c298eba9517c637a7fb69f598"},"The cardholder disputed this payment and the card issuer has settled it in their favor.")))}},k=class{constructor(s){e(this,s),this.errorEvent=t(this,"error-event"),this.errorMessage=null,this.apiOrigin="https://wc-proxy.justifi.ai",this.handleErrorEvent=e=>{this.errorMessage=e.detail.message,this.errorEvent.emit(e.detail)}}componentWillLoad(){b(),this.analytics=new y(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){var e;null===(e=this.analytics)||void 0===e||e.cleanup()}propChanged(){this.initializeDisputeServiceMethods()}initializeDisputeServiceMethods(){this.disputeId&&this.authToken?(this.updateDisputeResponse=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.updateDisputeResponse(t,e,i);if(d.error)return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.createDisputeEvidence=(({authToken:e,disputeId:t,service:s})=>async({payload:i,onSuccess:a,onError:r,final:d=()=>{}})=>{var c;try{const d=await s.createDisputeEvidence(t,e,i);if(d.error)return r({error:f(d.error),code:p(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=p(null==e?void 0:e.code);return r({error:e.message||e,code:t,severity:n.ERROR})}finally{return d()}})({disputeId:this.disputeId,authToken:this.authToken,service:new l}),this.submitDisputeResponse=v({disputeId:this.disputeId,authToken:this.authToken,service:new l})):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:h.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return s(c,{key:"ed6376969ab6a686999b8a31376b3c1cc8c7b566"},s("justifi-dispute-response-core",{key:"d823732d71613e9e98305d4b7d3c22af0344d209","onError-event":this.handleErrorEvent,"dispute-id":this.disputeId,disputeResponse:this.disputeResponse,createDisputeEvidence:this.createDisputeEvidence,updateDisputeResponse:this.updateDisputeResponse,submitDisputeResponse:this.submitDisputeResponse}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}},w=class{constructor(i){e(this,i),this.clickEvent=t(this,"click-event"),this.errorEvent=t(this,"error-event"),this.stepCompleteEvent=t(this,"complete-form-step-event"),this.submitEvent=t(this,"submit-event"),this.disputeResponse={},this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.componentStepMapping=[()=>s("justifi-product-or-service",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-customer-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-cancellation-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-refund-policy",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-duplicate-charge",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-electronic-evidence",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-shipping-details",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors}),()=>s("justifi-additional-statement",{ref:e=>this.currentStepComponentRef=e,disputeResponse:this.disputeResponse,documentErrors:this.documentErrors})],this.saveData=async(e,t)=>{if(Object.keys(e).length)return this.isLastStep?this.submitDisputeResponse({payload:e,onSuccess:e=>{this.submitEvent.emit({response:e}),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}}):this.updateDisputeResponse({payload:e,onSuccess:e=>{this.disputeResponse=Object.assign({},e.data),this.stepCompleteEvent.emit({response:e,formStep:t})},onError:({error:e,code:t,severity:s})=>{this.errorEvent.emit({errorCode:t,message:e,severity:s})}});this.stepCompleteEvent.emit({response:null,formStep:t})},this.initializeMakePresignedURLs=async()=>{const e=this.documentList.map((e=>this.getPresignedFileUrl(e)));return await Promise.all(e)},this.initializeFileUploads=async()=>{const e=this.documentList.map((e=>this.uploadDocument(e)));return Promise.all(e)},this.getPresignedFileUrl=async e=>this.createDisputeEvidence({payload:{file_name:e.file_name,file_type:e.file_type,dispute_evidence_type:e.dispute_evidence_type},onSuccess:t=>{e.presignedUrl=t.data.presigned_url},onError:({error:t,code:s,severity:i})=>{const a={[e.dispute_evidence_type]:t};this.documentErrors=Object.assign(Object.assign({},this.documentErrors),a),this.errorEvent.emit({errorCode:s,message:t,severity:i})}}),this.uploadDocument=async e=>{const t=await e.getFileString();if(!e.presignedUrl)throw new Error("Presigned URL is not set");return await fetch(e.presignedUrl,{method:"PUT",body:t})},this.handleSubmit=async(e,t,s)=>{if(this.isLoading=!0,t.length){if(this.documentErrors={},this.documentList=t,await this.initializeMakePresignedURLs(),Object.keys(this.documentErrors).length)throw this.isLoading=!1,new Error("Could not presign all documents");await this.initializeFileUploads()}await this.saveData(e,s),this.isLoading=!1},this.onCancel=()=>{this.clickEvent.emit({name:u.cancelDispute})},this.onBack=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.previousStep}),await this.handleSubmit(e,t,s),this.currentStep--}))},this.onNext=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.nextStep}),await this.handleSubmit(e,t,s),this.currentStep++}))},this.onSubmit=async()=>{await this.currentStepComponentRef.validateAndSubmit((async(e,t,s)=>{this.clickEvent.emit({name:u.submit});const i=Object.assign(Object.assign({},e),{forfeit:!1});await this.handleSubmit(i,t,s)}))}}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}get isLastStep(){return this.currentStep===this.componentStepMapping.length-1}get isFirstStep(){return 0===this.currentStep}render(){return s("div",{key:"b23c5bc27b1f657b9211d3a3482ae5b99982754e",class:"row gy-3"},s("div",{key:"a630f3c475d6b8026a81724c76340dc4f6088b26",class:"col-12"},s("h1",{key:"f4e848277ee8f1ec05ef1b1dfbac0e8872d9d91f",class:"h4",part:r},"Counter dispute")),s("div",{key:"6f7f21778853a3c1ac173ac79713f5427a226a5b",class:"col-12"},this.currentStepComponent),s("div",{key:"7354846a446f5677a12a3113b3f4226060a8b86a",class:"col-12"},s("div",{key:"4fb9dbccff8b004913656c3a130b46a0216dd6bb",class:"d-flex gap-2 mt-4 justify-content-end"},this.isFirstStep?s(d,{variant:"secondary",onClick:()=>this.onCancel(),disabled:this.isLoading,isLoading:this.isLoading},"Cancel"):s(d,{variant:"secondary",onClick:()=>this.onBack(),disabled:this.isLoading,isLoading:this.isLoading},"Back"),this.isLastStep?s(d,{variant:"primary",onClick:()=>this.onSubmit(),disabled:this.isLoading,isLoading:this.isLoading},"Submit Counter Dispute"):s(d,{variant:"primary",onClick:()=>this.onNext(),disabled:this.isLoading,isLoading:this.isLoading},"Next"))))}};export{m as justifi_dispute_notification,k as justifi_dispute_response,w as justifi_dispute_response_core}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i}from"./p-DwYM91AU.js";import{C as r,a as o}from"./p-Cjcsf8ku.js";import{c as e,J as a}from"./p-CApezhx9.js";import{T as n}from"./p-MQxr_LMC.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{e as p}from"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as c,a as h}from"./p-D2muobcE.js";import{m,S as u}from"./p-BojLBYsY.js";import{S as d}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{d as j}from"./p-DkOiS6Zr.js";import"./p-czPIvHxt.js";import"./p-C8yN3uBj.js";import"./p-BS7OgSQe.js";import"./p-BYsgavgS.js";import"./p-DOLBAxYf.js";import"./p-wtuY7MT2.js";const l=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=j,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){e(),this.analytics=new a(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetTerminals(),this.initializeGetSubAccounts()}initializeGetTerminals(){this.accountId&&this.authToken?this.getTerminals=(({id:t,authToken:s,service:i})=>async({params:o,onSuccess:e,onError:a})=>{var n,m;try{const u=await i.fetchTerminals(t,s,o);if(u.error)return a({error:h(u.error),code:c(null===(m=u.error)||void 0===m?void 0:m.code),severity:r.ERROR});{const t=Object.assign({},u.page_info);e({terminals:(null===(n=u.data)||void 0===n?void 0:n.map((t=>new p(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return a({error:t.message||t,code:s,severity:r.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new n}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:this.errorMessage,severity:r.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({accountId:this.accountId,authToken:this.authToken,service:new u}))}render(){return i(d,{key:"34cb952a43c4ecfd904c3449a05895e10e673a95"},i("terminals-list-core",{key:"32d981b366889364c4f27a4351aab41ed7d085b5",getTerminals:this.getTerminals,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{l as justifi_terminals_list}
1
+ import{r as t,c as s,h as i}from"./p-DwYM91AU.js";import{C as r,a as o}from"./p-Cjcsf8ku.js";import{c as e,J as a}from"./p-C6wS5-M7.js";import{T as n}from"./p-MQxr_LMC.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{e as p}from"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as c,a as h}from"./p-D2muobcE.js";import{m,S as u}from"./p-BojLBYsY.js";import{S as d}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{d as j}from"./p-DkOiS6Zr.js";import"./p-DEhd71m_.js";import"./p-C8yN3uBj.js";import"./p-BS7OgSQe.js";import"./p-BYsgavgS.js";import"./p-DOLBAxYf.js";import"./p-wtuY7MT2.js";const l=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=j,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){e(),this.analytics=new a(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetTerminals(),this.initializeGetSubAccounts()}initializeGetTerminals(){this.accountId&&this.authToken?this.getTerminals=(({id:t,authToken:s,service:i})=>async({params:o,onSuccess:e,onError:a})=>{var n,m;try{const u=await i.fetchTerminals(t,s,o);if(u.error)return a({error:h(u.error),code:c(null===(m=u.error)||void 0===m?void 0:m.code),severity:r.ERROR});{const t=Object.assign({},u.page_info);e({terminals:(null===(n=u.data)||void 0===n?void 0:n.map((t=>new p(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return a({error:t.message||t,code:s,severity:r.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new n}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:this.errorMessage,severity:r.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({accountId:this.accountId,authToken:this.authToken,service:new u}))}render(){return i(d,{key:"34cb952a43c4ecfd904c3449a05895e10e673a95"},i("terminals-list-core",{key:"32d981b366889364c4f27a4351aab41ed7d085b5",getTerminals:this.getTerminals,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{l as justifi_terminals_list}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i}from"./p-DwYM91AU.js";import{P as e}from"./p-C8QOezo8.js";import{m as r}from"./p-Ch9cTPyq.js";import{E as o}from"./p-BNqo3kt0.js";import{C as p,a as h}from"./p-Cjcsf8ku.js";import{c as a,J as n}from"./p-CApezhx9.js";import"./p-C8yN3uBj.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-HXpYMWUU.js";import"./p-BpaE8q5f.js";import"./p-BH0Xfn-F.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-D2muobcE.js";import"./p-wtuY7MT2.js";import"./p-czPIvHxt.js";const m=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.recordClickEvent=s(this,"record-click-event"),this.errorMessage=null,this.paymentService=new e,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.handleRecordClickEvent=t=>{this.recordClickEvent.emit({id:t.detail.id,type:t.detail.type})}}componentWillLoad(){a(),this.analytics=new n(this),this.initializeGetPaymentDetails()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetPaymentDetails()}initializeGetPaymentDetails(){this.paymentId&&this.authToken?this.getPaymentDetails=r({id:this.paymentId,authToken:this.authToken,service:new e}):(this.errorMessage="Payment ID and Auth Token are required",this.errorEvent.emit({message:this.errorMessage,errorCode:h.MISSING_PROPS,severity:p.ERROR}))}render(){return this.errorMessage?o(this.errorMessage):i("payment-details-core",{getPaymentDetails:this.getPaymentDetails,"onError-event":this.handleErrorEvent,"onRecord-click-event":this.handleRecordClickEvent,"enable-record-click":"true"})}static get watchers(){return{paymentId:["propChanged"],authToken:["propChanged"]}}};export{m as justifi_payment_details}
1
+ import{r as t,c as s,h as i}from"./p-DwYM91AU.js";import{P as e}from"./p-C8QOezo8.js";import{m as r}from"./p-Ch9cTPyq.js";import{E as o}from"./p-BNqo3kt0.js";import{C as p,a as h}from"./p-Cjcsf8ku.js";import{c as a,J as n}from"./p-C6wS5-M7.js";import"./p-C8yN3uBj.js";import"./p-tGDdRx0W.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-HXpYMWUU.js";import"./p-BpaE8q5f.js";import"./p-BH0Xfn-F.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-D2muobcE.js";import"./p-wtuY7MT2.js";import"./p-DEhd71m_.js";const m=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.recordClickEvent=s(this,"record-click-event"),this.errorMessage=null,this.paymentService=new e,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.handleRecordClickEvent=t=>{this.recordClickEvent.emit({id:t.detail.id,type:t.detail.type})}}componentWillLoad(){a(),this.analytics=new n(this),this.initializeGetPaymentDetails()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetPaymentDetails()}initializeGetPaymentDetails(){this.paymentId&&this.authToken?this.getPaymentDetails=r({id:this.paymentId,authToken:this.authToken,service:new e}):(this.errorMessage="Payment ID and Auth Token are required",this.errorEvent.emit({message:this.errorMessage,errorCode:h.MISSING_PROPS,severity:p.ERROR}))}render(){return this.errorMessage?o(this.errorMessage):i("payment-details-core",{getPaymentDetails:this.getPaymentDetails,"onError-event":this.handleErrorEvent,"onRecord-click-event":this.handleRecordClickEvent,"enable-record-click":"true"})}static get watchers(){return{paymentId:["propChanged"],authToken:["propChanged"]}}};export{m as justifi_payment_details}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i}from"./p-DwYM91AU.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as o,a as r}from"./p-Cjcsf8ku.js";import{C as e}from"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as c,a}from"./p-D2muobcE.js";import{c as p,J as n}from"./p-CApezhx9.js";import{C as h}from"./p-B4ZUYyNh.js";import{m as u,S as m}from"./p-BojLBYsY.js";import{S as d}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{d as j}from"./p-CkN7DFFn.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-czPIvHxt.js";import"./p-C8yN3uBj.js";import"./p-DOLBAxYf.js";import"./p-wtuY7MT2.js";const f=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=j,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){p(),this.analytics=new n(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetCheckouts(),this.initializeGetSubAccounts()}initializeGetCheckouts(){this.accountId&&this.authToken?this.getCheckouts=(({accountId:t,authToken:s,service:i})=>async({params:r,onSuccess:p,onError:n})=>{var h,u;try{const m=await i.fetchCheckouts(t,s,r);if(m.error)return n({error:a(m.error),code:c(null===(u=m.error)||void 0===u?void 0:u.code),severity:o.ERROR});{const t=Object.assign({},m.page_info);p({checkouts:(null===(h=m.data)||void 0===h?void 0:h.map((t=>new e(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return n({error:t.message||t,code:s,severity:o.ERROR})}})({accountId:this.accountId,authToken:this.authToken,service:new h}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=u({accountId:this.accountId,authToken:this.authToken,service:new m}))}render(){return i(d,{key:"f20c74e616c92115985587dc56d6ef62e86fbf02"},i("checkouts-list-core",{key:"e3afd6af4d8db35f4119d93cc550a1827e1d52cb",getCheckouts:this.getCheckouts,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{f as justifi_checkouts_list}
1
+ import{r as t,c as s,h as i}from"./p-DwYM91AU.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as o,a as r}from"./p-Cjcsf8ku.js";import{C as e}from"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as c,a}from"./p-D2muobcE.js";import{c as p,J as n}from"./p-C6wS5-M7.js";import{C as h}from"./p-B4ZUYyNh.js";import{m as u,S as m}from"./p-BojLBYsY.js";import{S as d}from"./p-BP2sTIQV.js";import"./p-CZfYo5-1.js";import{d as j}from"./p-CkN7DFFn.js";import"./p-BYsgavgS.js";import"./p-BS7OgSQe.js";import"./p-DEhd71m_.js";import"./p-C8yN3uBj.js";import"./p-DOLBAxYf.js";import"./p-wtuY7MT2.js";const f=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.errorMessage=null,this.columns=j,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){p(),this.analytics=new n(this),this.initializeGetData()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetCheckouts(),this.initializeGetSubAccounts()}initializeGetCheckouts(){this.accountId&&this.authToken?this.getCheckouts=(({accountId:t,authToken:s,service:i})=>async({params:r,onSuccess:p,onError:n})=>{var h,u;try{const m=await i.fetchCheckouts(t,s,r);if(m.error)return n({error:a(m.error),code:c(null===(u=m.error)||void 0===u?void 0:u.code),severity:o.ERROR});{const t=Object.assign({},m.page_info);p({checkouts:(null===(h=m.data)||void 0===h?void 0:h.map((t=>new e(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return n({error:t.message||t,code:s,severity:o.ERROR})}})({accountId:this.accountId,authToken:this.authToken,service:new h}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:r.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=u({accountId:this.accountId,authToken:this.authToken,service:new m}))}render(){return i(d,{key:"f20c74e616c92115985587dc56d6ef62e86fbf02"},i("checkouts-list-core",{key:"e3afd6af4d8db35f4119d93cc550a1827e1d52cb",getCheckouts:this.getCheckouts,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{f as justifi_checkouts_list}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as i}from"./p-DwYM91AU.js";import{P as o}from"./p-CPtsjcdm.js";import"./p-tGDdRx0W.js";import"./p-HXpYMWUU.js";import{C as r,a as e}from"./p-Cjcsf8ku.js";import{d as a}from"./p-BpaE8q5f.js";import"./p-CLHwhyvu.js";import"./p-B5rtFhtR.js";import"./p-BH0Xfn-F.js";import{g as p,a as h}from"./p-D2muobcE.js";import{E as n}from"./p-BNqo3kt0.js";import{c as m,J as c}from"./p-C6wS5-M7.js";import{m as d}from"./p-DYGIC0QH.js";import"./p-C8yN3uBj.js";import"./p-BS7OgSQe.js";import"./p-BYsgavgS.js";import"./p-wtuY7MT2.js";import"./p-DEhd71m_.js";const u=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event"),this.enableRecordClick=!1,this.errorMessage=null,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)}}componentWillLoad(){m(),this.analytics=new c(this),this.initializeServices()}disconnectedCallback(){var t;null===(t=this.analytics)||void 0===t||t.cleanup()}propChanged(){this.initializeServices()}initializeServices(){this.payoutId&&this.authToken?(this.getPayout=(({id:t,authToken:s,service:i})=>async({onSuccess:o,onError:e})=>{var n;try{const m=await i.fetchPayout(t,s);m.error?e({error:h(m.error),code:p(null===(n=m.error)||void 0===n?void 0:n.code),severity:r.ERROR}):o(new a(m.data))}catch(t){e({error:h(t),code:p(null==t?void 0:t.code),severity:r.ERROR})}})({id:this.payoutId,authToken:this.authToken,service:new o}),this.getPayoutCSV=d({authToken:this.authToken,service:new o})):(this.errorMessage="Failed to load payout details. payoutId or authToken is not provided.",this.errorEvent.emit({message:this.errorMessage,errorCode:e.MISSING_PROPS,severity:r.ERROR}))}render(){return this.errorMessage?n(this.errorMessage):i("payout-details-core",{getPayout:this.getPayout,getPayoutCSV:this.getPayoutCSV,"onError-event":this.handleErrorEvent,enableRecordClick:this.enableRecordClick})}static get watchers(){return{payoutId:["propChanged"],authToken:["propChanged"]}}};export{u as justifi_payout_details}