@justifi/webcomponents 5.4.3 → 5.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/cjs/billing-form_3.cjs.entry.js +1 -1
  2. package/dist/cjs/{check-pkg-version-64d3381a.js → check-pkg-version-e6dcbeb7.js} +1 -1
  3. package/dist/cjs/justifi-business-details.cjs.entry.js +2 -2
  4. package/dist/cjs/justifi-business-form.cjs.entry.js +2 -2
  5. package/dist/cjs/justifi-checkout.cjs.entry.js +2 -2
  6. package/dist/cjs/justifi-checkouts-list.cjs.entry.js +2 -2
  7. package/dist/cjs/justifi-dispute-management.cjs.entry.js +2 -2
  8. package/dist/cjs/justifi-dispute-notification_3.cjs.entry.js +2 -2
  9. package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +2 -2
  10. package/dist/cjs/justifi-order-terminals.cjs.entry.js +4 -5
  11. package/dist/cjs/justifi-payment-details.cjs.entry.js +2 -2
  12. package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +2 -2
  13. package/dist/cjs/justifi-payments-list.cjs.entry.js +2 -2
  14. package/dist/cjs/justifi-payout-details.cjs.entry.js +2 -2
  15. package/dist/cjs/justifi-payouts-list.cjs.entry.js +2 -2
  16. package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +2 -2
  17. package/dist/cjs/justifi-terminal-orders-list.cjs.entry.js +2 -2
  18. package/dist/cjs/justifi-terminals-list.cjs.entry.js +3 -3
  19. package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +2 -2
  20. package/dist/cjs/{package-99f9fc82.js → package-5a9f02b2.js} +1 -1
  21. package/dist/cjs/terminals-list-core.cjs.entry.js +1 -1
  22. package/dist/cjs/{terminals-table-6710a76c.js → terminals-table-594643fd.js} +2 -2
  23. package/dist/collection/components/order-terminals/order-terminals.js +2 -3
  24. package/dist/collection/components/terminals-list/terminals-table.js +2 -2
  25. package/dist/docs.json +1 -1
  26. package/dist/esm/billing-form_3.entry.js +1 -1
  27. package/dist/esm/{check-pkg-version-bbd75fa0.js → check-pkg-version-47fc35a7.js} +1 -1
  28. package/dist/esm/justifi-business-details.entry.js +2 -2
  29. package/dist/esm/justifi-business-form.entry.js +2 -2
  30. package/dist/esm/justifi-checkout.entry.js +2 -2
  31. package/dist/esm/justifi-checkouts-list.entry.js +2 -2
  32. package/dist/esm/justifi-dispute-management.entry.js +2 -2
  33. package/dist/esm/justifi-dispute-notification_3.entry.js +2 -2
  34. package/dist/esm/justifi-gross-payment-chart.entry.js +2 -2
  35. package/dist/esm/justifi-order-terminals.entry.js +4 -5
  36. package/dist/esm/justifi-payment-details.entry.js +2 -2
  37. package/dist/esm/justifi-payment-provisioning.entry.js +2 -2
  38. package/dist/esm/justifi-payments-list.entry.js +2 -2
  39. package/dist/esm/justifi-payout-details.entry.js +2 -2
  40. package/dist/esm/justifi-payouts-list.entry.js +2 -2
  41. package/dist/esm/justifi-season-interruption-insurance.entry.js +2 -2
  42. package/dist/esm/justifi-terminal-orders-list.entry.js +2 -2
  43. package/dist/esm/justifi-terminals-list.entry.js +3 -3
  44. package/dist/esm/justifi-tokenize-payment-method.entry.js +2 -2
  45. package/dist/esm/{package-01997353.js → package-c8466624.js} +1 -1
  46. package/dist/esm/terminals-list-core.entry.js +1 -1
  47. package/dist/esm/{terminals-table-5eb287ca.js → terminals-table-ff24bf27.js} +2 -2
  48. package/dist/module/justifi-order-terminals.js +2 -3
  49. package/dist/module/package.js +1 -1
  50. package/dist/module/terminals-list-core2.js +2 -2
  51. package/dist/types/components/order-terminals/order-terminals.d.ts +0 -1
  52. package/dist/types/components/terminals-list/terminals-table.d.ts +2 -2
  53. package/dist/webcomponents/{p-b979fcb0.entry.js → p-04d6b37e.entry.js} +1 -1
  54. package/dist/webcomponents/p-1361d8eb.entry.js +1 -0
  55. package/dist/webcomponents/p-1cfa5df9.entry.js +1 -0
  56. package/dist/webcomponents/{p-0fc1d3bb.entry.js → p-21def20b.entry.js} +1 -1
  57. package/dist/webcomponents/{p-8d4a0192.entry.js → p-2aad7e3b.entry.js} +1 -1
  58. package/dist/webcomponents/{p-a07e021f.entry.js → p-3075b7e1.entry.js} +1 -1
  59. package/dist/webcomponents/{p-caa29469.entry.js → p-35c296fc.entry.js} +1 -1
  60. package/dist/webcomponents/{p-b082f07a.entry.js → p-407d6d29.entry.js} +1 -1
  61. package/dist/webcomponents/{p-4598482c.entry.js → p-4451de8d.entry.js} +1 -1
  62. package/dist/webcomponents/{p-6a5eab1f.entry.js → p-4f7432c3.entry.js} +1 -1
  63. package/dist/webcomponents/{p-3188f72a.js → p-5a541d35.js} +1 -1
  64. package/dist/webcomponents/p-70be104e.js +1 -0
  65. package/dist/webcomponents/p-7e8732f7.entry.js +1 -0
  66. package/dist/webcomponents/{p-65cb72e4.entry.js → p-829480e7.entry.js} +1 -1
  67. package/dist/webcomponents/{p-7c333590.entry.js → p-94e4f1f1.entry.js} +1 -1
  68. package/dist/webcomponents/{p-1134e1d3.entry.js → p-ad713ab6.entry.js} +1 -1
  69. package/dist/webcomponents/{p-ab3a8004.entry.js → p-b50ca848.entry.js} +1 -1
  70. package/dist/webcomponents/p-b8664571.entry.js +1 -0
  71. package/dist/webcomponents/{p-88a37837.js → p-de03d0f8.js} +1 -1
  72. package/dist/webcomponents/{p-8a6a06e6.entry.js → p-e1ae5e80.entry.js} +1 -1
  73. package/dist/webcomponents/{p-7b793901.entry.js → p-ef1db3da.entry.js} +1 -1
  74. package/dist/webcomponents/{p-1ce63001.entry.js → p-f13b2991.entry.js} +1 -1
  75. package/dist/webcomponents/webcomponents.esm.js +1 -1
  76. package/package.json +1 -1
  77. package/dist/webcomponents/p-07fbeff3.entry.js +0 -1
  78. package/dist/webcomponents/p-1c38ec65.entry.js +0 -1
  79. package/dist/webcomponents/p-953e9dba.js +0 -1
  80. package/dist/webcomponents/p-a6976c9c.entry.js +0 -1
  81. package/dist/webcomponents/p-e817d131.entry.js +0 -1
@@ -1,7 +1,7 @@
1
1
  import { h, r as registerInstance, c as createEvent } from './index-29fcfdf5.js';
2
2
  import { B as heading5, C as heading4, g as buttonPrimary, t as text } from './parts-fd740f54.js';
3
3
  import { S as StyledHost } from './styled-host-32228b45.js';
4
- import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-bbd75fa0.js';
4
+ import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-47fc35a7.js';
5
5
  import { a as ComponentErrorSeverity, C as ComponentErrorCodes } from './ComponentError-c61dce41.js';
6
6
  import { B as BusinessService } from './business.service-999196a4.js';
7
7
  import { B as Business } from './Business-0855931c.js';
@@ -15,7 +15,7 @@ import './Document-1907c0d4.js';
15
15
  import { g as getErrorMessage, a as getErrorCode } from './utils-fd99b806.js';
16
16
  import { T as TerminalService } from './terminal.service-d173566d.js';
17
17
  import { c as formatPhoneNumber } from './utils-ec50661e.js';
18
- import './package-01997353.js';
18
+ import './package-c8466624.js';
19
19
  import './Api-52242eb0.js';
20
20
  import './helpers-96ea3464.js';
21
21
  import './state-options-a356fb11.js';
@@ -120,7 +120,6 @@ const OrderTerminals = class {
120
120
  registerInstance(this, hostRef);
121
121
  this.errorEvent = createEvent(this, "error-event", 7);
122
122
  this.submitted = createEvent(this, "submit-event", 7);
123
- this.addressHeader = this.shipping ? "Shipping Address:" : "Business Address:";
124
123
  this.businessId = undefined;
125
124
  this.authToken = undefined;
126
125
  this.accountId = undefined;
@@ -225,7 +224,7 @@ const OrderTerminals = class {
225
224
  renderBusinessDetails() {
226
225
  var _a, _b, _c, _d, _e, _f, _g, _h;
227
226
  if (!this.loading.business && this.business) {
228
- return (h("div", { class: "d-flex flex-column gap-4 mb-5 pt-5" }, h("div", { class: "row" }, h("div", { class: "col-12" }, h("h2", { part: heading4 }, this.business.legal_name))), h("div", { class: "row" }, h("div", { class: "col-6" }, h("h5", { part: heading5 }, "Representative:"), h("div", null, h("div", null, (_b = (_a = this.business) === null || _a === void 0 ? void 0 : _a.representative) === null || _b === void 0 ? void 0 : _b.name), h("div", null, (_d = (_c = this.business) === null || _c === void 0 ? void 0 : _c.representative) === null || _d === void 0 ? void 0 : _d.title), h("div", null, (_f = (_e = this.business) === null || _e === void 0 ? void 0 : _e.representative) === null || _f === void 0 ? void 0 : _f.email), h("div", null, formatPhoneNumber((_h = (_g = this.business) === null || _g === void 0 ? void 0 : _g.representative) === null || _h === void 0 ? void 0 : _h.phone)))), h("div", { class: "col-6" }, h("h5", { part: heading5 }, this.addressHeader), h("div", null, this.business.legal_address.line1, this.business.legal_address.line2 ? `, ${this.business.legal_address.line2}` : "", h("br", null), this.business.legal_address.city, ", ", this.business.legal_address.state, " ", this.business.legal_address.postal_code)))));
227
+ return (h("div", { class: "d-flex flex-column gap-4 mb-5 pt-5" }, h("div", { class: "row" }, h("div", { class: "col-12" }, h("h2", { part: heading4 }, this.business.legal_name))), h("div", { class: "row" }, h("div", { class: "col-6" }, h("h5", { part: heading5 }, "Representative:"), h("div", null, h("div", null, (_b = (_a = this.business) === null || _a === void 0 ? void 0 : _a.representative) === null || _b === void 0 ? void 0 : _b.name), h("div", null, (_d = (_c = this.business) === null || _c === void 0 ? void 0 : _c.representative) === null || _d === void 0 ? void 0 : _d.title), h("div", null, (_f = (_e = this.business) === null || _e === void 0 ? void 0 : _e.representative) === null || _f === void 0 ? void 0 : _f.email), h("div", null, formatPhoneNumber((_h = (_g = this.business) === null || _g === void 0 ? void 0 : _g.representative) === null || _h === void 0 ? void 0 : _h.phone)))), h("div", { class: "col-6" }, h("h5", { part: heading5 }, this.shipping ? "Shipping Address:" : "Business Address:"), h("div", null, this.business.legal_address.line1, this.business.legal_address.line2 ? `, ${this.business.legal_address.line2}` : "", h("br", null), this.business.legal_address.city, ", ", this.business.legal_address.state, " ", this.business.legal_address.postal_code)))));
229
228
  }
230
229
  }
231
230
  renderTerminals() {
@@ -237,7 +236,7 @@ const OrderTerminals = class {
237
236
  return (h("div", { class: "mt-3" }, h("div", { class: "text-end" }, "Order limit: ", this.orderLimit), h("div", { class: "d-flex justify-content-end mt-3" }, h("button", { class: "btn btn-primary submit-btn", onClick: this.submitOrder.bind(this), disabled: this.order.totalQuantity === 0 || this.submitting, part: buttonPrimary }, this.submitting ? 'Submitting...' : this.submitButtonText))));
238
237
  }
239
238
  render() {
240
- return (h(StyledHost, { key: 'e41920bc976c976932d5abdbb2da088a0e35a9f3' }, h("div", { key: '5237d2dcb456ee143f75b5562cf655ed695ab0e8', part: text }, this.renderLoading(), this.renderBusinessDetails(), this.renderTerminals(), this.renderOrderSection())));
239
+ return (h(StyledHost, { key: 'b5e93abb543719bcf80fb001fef11c45f3438d5f' }, h("div", { key: 'ccb91e878e84af86c7aed41829a8b9cd3deee9ed', part: text }, this.renderLoading(), this.renderBusinessDetails(), this.renderTerminals(), this.renderOrderSection())));
241
240
  }
242
241
  };
243
242
 
@@ -8,12 +8,12 @@ import './SubAccount-7520271c.js';
8
8
  import './Document-1907c0d4.js';
9
9
  import { g as getErrorMessage, a as getErrorCode } from './utils-fd99b806.js';
10
10
  import { E as ErrorState } from './utils-96d9c205.js';
11
- import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-bbd75fa0.js';
11
+ import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-47fc35a7.js';
12
12
  import './Api-52242eb0.js';
13
13
  import './utils-ec50661e.js';
14
14
  import './Dispute-5fd28ec9.js';
15
15
  import './parts-fd740f54.js';
16
- import './package-01997353.js';
16
+ import './package-c8466624.js';
17
17
 
18
18
  const makeGetPaymentDetails = ({ id, authToken, service }) => async ({ onSuccess, onError }) => {
19
19
  var _a;
@@ -1,10 +1,10 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-29fcfdf5.js';
2
- import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-bbd75fa0.js';
2
+ import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-47fc35a7.js';
3
3
  import { C as ComponentErrorCodes, a as ComponentErrorSeverity } from './ComponentError-c61dce41.js';
4
4
  import { m as makeGetBusiness, a as makePostProvisioning } from './payment-provisioning-actions-beadac34.js';
5
5
  import { B as BusinessService } from './business.service-999196a4.js';
6
6
  import { A as Api } from './Api-52242eb0.js';
7
- import './package-01997353.js';
7
+ import './package-c8466624.js';
8
8
  import './utils-fd99b806.js';
9
9
 
10
10
  class ProvisionService {
@@ -7,13 +7,13 @@ import { P as Payment } from './Payment-806af354.js';
7
7
  import './SubAccount-7520271c.js';
8
8
  import './Document-1907c0d4.js';
9
9
  import { g as getErrorMessage, a as getErrorCode } from './utils-fd99b806.js';
10
- import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-bbd75fa0.js';
10
+ import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-47fc35a7.js';
11
11
  import { S as StyledHost } from './styled-host-32228b45.js';
12
12
  import { d as defaultColumnsKeys } from './payments-table-8134f5e1.js';
13
13
  import './Api-52242eb0.js';
14
14
  import './utils-ec50661e.js';
15
15
  import './Dispute-5fd28ec9.js';
16
- import './package-01997353.js';
16
+ import './package-c8466624.js';
17
17
  import './payments-status-74d22728.js';
18
18
  import './badge-1be14e8c.js';
19
19
  import './parts-fd740f54.js';
@@ -8,12 +8,12 @@ import { P as Payout } from './SubAccount-7520271c.js';
8
8
  import './Document-1907c0d4.js';
9
9
  import { g as getErrorMessage, a as getErrorCode } from './utils-fd99b806.js';
10
10
  import { E as ErrorState } from './utils-96d9c205.js';
11
- import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-bbd75fa0.js';
11
+ import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-47fc35a7.js';
12
12
  import './Api-52242eb0.js';
13
13
  import './utils-ec50661e.js';
14
14
  import './Dispute-5fd28ec9.js';
15
15
  import './parts-fd740f54.js';
16
- import './package-01997353.js';
16
+ import './package-c8466624.js';
17
17
 
18
18
  const makeGetPayoutDetails = ({ id, authToken, service }) => async ({ onSuccess, onError }) => {
19
19
  var _a;
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-29fcfdf5.js';
2
2
  import { a as ComponentErrorSeverity, C as ComponentErrorCodes } from './ComponentError-c61dce41.js';
3
- import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-bbd75fa0.js';
3
+ import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-47fc35a7.js';
4
4
  import { m as makeGetPayoutCSV, P as PayoutService } from './get-payout-csv-fa34f40b.js';
5
5
  import './Checkout-18d8bf94.js';
6
6
  import './Pagination-afc8f96d.js';
@@ -11,7 +11,7 @@ import { g as getErrorMessage, a as getErrorCode } from './utils-fd99b806.js';
11
11
  import { m as makeGetSubAccounts, S as SubAccountService } from './get-subaccounts-3c6b9e84.js';
12
12
  import { S as StyledHost } from './styled-host-32228b45.js';
13
13
  import { d as defaultColumnsKeys } from './payouts-table-c1ced46a.js';
14
- import './package-01997353.js';
14
+ import './package-c8466624.js';
15
15
  import './Api-52242eb0.js';
16
16
  import './utils-ec50661e.js';
17
17
  import './Dispute-5fd28ec9.js';
@@ -7,10 +7,10 @@ import './Payment-806af354.js';
7
7
  import './SubAccount-7520271c.js';
8
8
  import './Document-1907c0d4.js';
9
9
  import { g as getErrorMessage, a as getErrorCode } from './utils-fd99b806.js';
10
- import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-bbd75fa0.js';
10
+ import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-47fc35a7.js';
11
11
  import './utils-ec50661e.js';
12
12
  import './Dispute-5fd28ec9.js';
13
- import './package-01997353.js';
13
+ import './package-c8466624.js';
14
14
 
15
15
  class InsuranceService {
16
16
  async fetchQuote(authToken, payload) {
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-29fcfdf5.js';
2
2
  import { S as StyledHost } from './styled-host-32228b45.js';
3
- import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-bbd75fa0.js';
3
+ import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-47fc35a7.js';
4
4
  import { d as defaultColumnsKeys } from './terminal-orders-table-93e84d25.js';
5
5
  import { a as ComponentErrorSeverity, C as ComponentErrorCodes } from './ComponentError-c61dce41.js';
6
6
  import './Checkout-18d8bf94.js';
@@ -10,7 +10,7 @@ import { a as TerminalOrder } from './SubAccount-7520271c.js';
10
10
  import './Document-1907c0d4.js';
11
11
  import { g as getErrorMessage, a as getErrorCode } from './utils-fd99b806.js';
12
12
  import { A as Api } from './Api-52242eb0.js';
13
- import './package-01997353.js';
13
+ import './package-c8466624.js';
14
14
  import './parts-fd740f54.js';
15
15
  import './utils-ec50661e.js';
16
16
  import './badge-1be14e8c.js';
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-29fcfdf5.js';
2
2
  import { a as ComponentErrorSeverity, C as ComponentErrorCodes } from './ComponentError-c61dce41.js';
3
- import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-bbd75fa0.js';
3
+ import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-47fc35a7.js';
4
4
  import { T as TerminalService } from './terminal.service-d173566d.js';
5
5
  import './Checkout-18d8bf94.js';
6
6
  import './Pagination-afc8f96d.js';
@@ -10,8 +10,8 @@ import './Document-1907c0d4.js';
10
10
  import { g as getErrorMessage, a as getErrorCode } from './utils-fd99b806.js';
11
11
  import { m as makeGetSubAccounts, S as SubAccountService } from './get-subaccounts-3c6b9e84.js';
12
12
  import { S as StyledHost } from './styled-host-32228b45.js';
13
- import { d as defaultColumnsKeys } from './terminals-table-5eb287ca.js';
14
- import './package-01997353.js';
13
+ import { d as defaultColumnsKeys } from './terminals-table-ff24bf27.js';
14
+ import './package-c8466624.js';
15
15
  import './Api-52242eb0.js';
16
16
  import './utils-ec50661e.js';
17
17
  import './Dispute-5fd28ec9.js';
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index-29fcfdf5.js';
2
2
  import { B as Button } from './button-fcee4da7.js';
3
3
  import { S as StyledHost } from './styled-host-32228b45.js';
4
- import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-bbd75fa0.js';
4
+ import { c as checkPkgVersion, J as JustifiAnalytics } from './check-pkg-version-47fc35a7.js';
5
5
  import { a as ComponentErrorSeverity, C as ComponentErrorCodes } from './ComponentError-c61dce41.js';
6
6
  import './Checkout-18d8bf94.js';
7
7
  import './Pagination-afc8f96d.js';
@@ -9,7 +9,7 @@ import './Payment-806af354.js';
9
9
  import './SubAccount-7520271c.js';
10
10
  import './Document-1907c0d4.js';
11
11
  import './parts-fd740f54.js';
12
- import './package-01997353.js';
12
+ import './package-c8466624.js';
13
13
  import './Api-52242eb0.js';
14
14
  import './utils-ec50661e.js';
15
15
  import './Dispute-5fd28ec9.js';
@@ -1,5 +1,5 @@
1
1
  const name = "@justifi/webcomponents";
2
- const version = "5.4.3";
2
+ const version = "5.4.4";
3
3
  const description = "JustiFi Web Components";
4
4
  const collection = "dist/collection/collection-manifest.json";
5
5
  const main = "dist/index.cjs.js";
@@ -7,7 +7,7 @@ import './SubAccount-7520271c.js';
7
7
  import './Document-1907c0d4.js';
8
8
  import { V as table, W as tableCell } from './parts-fd740f54.js';
9
9
  import { T as TableClickActions, a as Table, b as TableLoadingState, c as TableEmptyState, d as TableErrorState } from './event-types-1bc52f1f.js';
10
- import { t as terminalTableColumns, a as terminalTableCells } from './terminals-table-5eb287ca.js';
10
+ import { t as terminalTableColumns, a as terminalTableCells } from './terminals-table-ff24bf27.js';
11
11
  import { o as onQueryParamsChange, g as getRequestParams } from './terminals-list-params-state-e4b2ec23.js';
12
12
  import './utils-ec50661e.js';
13
13
  import './Dispute-5fd28ec9.js';
@@ -37,7 +37,7 @@ const terminalTableColumns = {
37
37
  id: () => (h("th", { part: tableHeadCell, scope: "col", title: "The ID of the terminal" }, "ID")),
38
38
  provider: () => (h("th", { part: tableHeadCell, scope: "col", title: "The provider of the terminal" }, "Provider")),
39
39
  provider_serial_number: () => (h("th", { part: tableHeadCell, scope: "col", title: "The serial number of the terminal" }, "Serial Number")),
40
- provider_id: () => (h("th", { part: tableHeadCell, scope: "col", title: "The provider ID of the terminal" }, "Provider ID")),
40
+ device_id: () => (h("th", { part: tableHeadCell, scope: "col", title: "The device/provider ID of the terminal" }, "Device ID")),
41
41
  sub_account_name: () => (h("th", { part: tableHeadCell, scope: "col", title: "The sub account associated with the terminal" }, "Sub Account")),
42
42
  status: () => (h("th", { part: tableHeadCell, scope: "col", title: "The current status of each terminal" }, "Status")),
43
43
  };
@@ -47,7 +47,7 @@ const terminalTableCells = {
47
47
  id: (terminal, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminal.id)),
48
48
  provider: (terminal, index) => (h("td", { part: getAlternateTableCellPart(index) }, capitalFirstLetter(terminal.provider))),
49
49
  provider_serial_number: (terminal, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminal.provider_serial_number)),
50
- provider_id: (terminal, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminal.provider_id)),
50
+ device_id: (terminal, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminal.provider_id)),
51
51
  sub_account_name: (terminal, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminal.sub_account_name)),
52
52
  status: (terminal, index) => (h("td", { part: getAlternateTableCellPart(index) }, MapTerminalStatusToBadge(terminal.status))),
53
53
  };
@@ -121,7 +121,6 @@ const OrderTerminals = /*@__PURE__*/ proxyCustomElement(class OrderTerminals ext
121
121
  this.__attachShadow();
122
122
  this.errorEvent = createEvent(this, "error-event", 7);
123
123
  this.submitted = createEvent(this, "submit-event", 7);
124
- this.addressHeader = this.shipping ? "Shipping Address:" : "Business Address:";
125
124
  this.businessId = undefined;
126
125
  this.authToken = undefined;
127
126
  this.accountId = undefined;
@@ -226,7 +225,7 @@ const OrderTerminals = /*@__PURE__*/ proxyCustomElement(class OrderTerminals ext
226
225
  renderBusinessDetails() {
227
226
  var _a, _b, _c, _d, _e, _f, _g, _h;
228
227
  if (!this.loading.business && this.business) {
229
- return (h("div", { class: "d-flex flex-column gap-4 mb-5 pt-5" }, h("div", { class: "row" }, h("div", { class: "col-12" }, h("h2", { part: heading4 }, this.business.legal_name))), h("div", { class: "row" }, h("div", { class: "col-6" }, h("h5", { part: heading5 }, "Representative:"), h("div", null, h("div", null, (_b = (_a = this.business) === null || _a === void 0 ? void 0 : _a.representative) === null || _b === void 0 ? void 0 : _b.name), h("div", null, (_d = (_c = this.business) === null || _c === void 0 ? void 0 : _c.representative) === null || _d === void 0 ? void 0 : _d.title), h("div", null, (_f = (_e = this.business) === null || _e === void 0 ? void 0 : _e.representative) === null || _f === void 0 ? void 0 : _f.email), h("div", null, formatPhoneNumber((_h = (_g = this.business) === null || _g === void 0 ? void 0 : _g.representative) === null || _h === void 0 ? void 0 : _h.phone)))), h("div", { class: "col-6" }, h("h5", { part: heading5 }, this.addressHeader), h("div", null, this.business.legal_address.line1, this.business.legal_address.line2 ? `, ${this.business.legal_address.line2}` : "", h("br", null), this.business.legal_address.city, ", ", this.business.legal_address.state, " ", this.business.legal_address.postal_code)))));
228
+ return (h("div", { class: "d-flex flex-column gap-4 mb-5 pt-5" }, h("div", { class: "row" }, h("div", { class: "col-12" }, h("h2", { part: heading4 }, this.business.legal_name))), h("div", { class: "row" }, h("div", { class: "col-6" }, h("h5", { part: heading5 }, "Representative:"), h("div", null, h("div", null, (_b = (_a = this.business) === null || _a === void 0 ? void 0 : _a.representative) === null || _b === void 0 ? void 0 : _b.name), h("div", null, (_d = (_c = this.business) === null || _c === void 0 ? void 0 : _c.representative) === null || _d === void 0 ? void 0 : _d.title), h("div", null, (_f = (_e = this.business) === null || _e === void 0 ? void 0 : _e.representative) === null || _f === void 0 ? void 0 : _f.email), h("div", null, formatPhoneNumber((_h = (_g = this.business) === null || _g === void 0 ? void 0 : _g.representative) === null || _h === void 0 ? void 0 : _h.phone)))), h("div", { class: "col-6" }, h("h5", { part: heading5 }, this.shipping ? "Shipping Address:" : "Business Address:"), h("div", null, this.business.legal_address.line1, this.business.legal_address.line2 ? `, ${this.business.legal_address.line2}` : "", h("br", null), this.business.legal_address.city, ", ", this.business.legal_address.state, " ", this.business.legal_address.postal_code)))));
230
229
  }
231
230
  }
232
231
  renderTerminals() {
@@ -238,7 +237,7 @@ const OrderTerminals = /*@__PURE__*/ proxyCustomElement(class OrderTerminals ext
238
237
  return (h("div", { class: "mt-3" }, h("div", { class: "text-end" }, "Order limit: ", this.orderLimit), h("div", { class: "d-flex justify-content-end mt-3" }, h("button", { class: "btn btn-primary submit-btn", onClick: this.submitOrder.bind(this), disabled: this.order.totalQuantity === 0 || this.submitting, part: buttonPrimary }, this.submitting ? 'Submitting...' : this.submitButtonText))));
239
238
  }
240
239
  render() {
241
- return (h(StyledHost, { key: 'e41920bc976c976932d5abdbb2da088a0e35a9f3' }, h("div", { key: '5237d2dcb456ee143f75b5562cf655ed695ab0e8', part: text }, this.renderLoading(), this.renderBusinessDetails(), this.renderTerminals(), this.renderOrderSection())));
240
+ return (h(StyledHost, { key: 'b5e93abb543719bcf80fb001fef11c45f3438d5f' }, h("div", { key: 'ccb91e878e84af86c7aed41829a8b9cd3deee9ed', part: text }, this.renderLoading(), this.renderBusinessDetails(), this.renderTerminals(), this.renderOrderSection())));
242
241
  }
243
242
  }, [1, "justifi-order-terminals", {
244
243
  "businessId": [1, "business-id"],
@@ -1,5 +1,5 @@
1
1
  const name = "@justifi/webcomponents";
2
- const version = "5.4.3";
2
+ const version = "5.4.4";
3
3
  const description = "JustiFi Web Components";
4
4
  const collection = "dist/collection/collection-manifest.json";
5
5
  const main = "dist/index.cjs.js";
@@ -47,7 +47,7 @@ const terminalTableColumns = {
47
47
  id: () => (h("th", { part: tableHeadCell, scope: "col", title: "The ID of the terminal" }, "ID")),
48
48
  provider: () => (h("th", { part: tableHeadCell, scope: "col", title: "The provider of the terminal" }, "Provider")),
49
49
  provider_serial_number: () => (h("th", { part: tableHeadCell, scope: "col", title: "The serial number of the terminal" }, "Serial Number")),
50
- provider_id: () => (h("th", { part: tableHeadCell, scope: "col", title: "The provider ID of the terminal" }, "Provider ID")),
50
+ device_id: () => (h("th", { part: tableHeadCell, scope: "col", title: "The device/provider ID of the terminal" }, "Device ID")),
51
51
  sub_account_name: () => (h("th", { part: tableHeadCell, scope: "col", title: "The sub account associated with the terminal" }, "Sub Account")),
52
52
  status: () => (h("th", { part: tableHeadCell, scope: "col", title: "The current status of each terminal" }, "Status")),
53
53
  };
@@ -57,7 +57,7 @@ const terminalTableCells = {
57
57
  id: (terminal, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminal.id)),
58
58
  provider: (terminal, index) => (h("td", { part: getAlternateTableCellPart(index) }, capitalFirstLetter(terminal.provider))),
59
59
  provider_serial_number: (terminal, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminal.provider_serial_number)),
60
- provider_id: (terminal, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminal.provider_id)),
60
+ device_id: (terminal, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminal.provider_id)),
61
61
  sub_account_name: (terminal, index) => (h("td", { part: getAlternateTableCellPart(index) }, terminal.sub_account_name)),
62
62
  status: (terminal, index) => (h("td", { part: getAlternateTableCellPart(index) }, MapTerminalStatusToBadge(terminal.status))),
63
63
  };
@@ -26,7 +26,6 @@ export declare class OrderTerminals {
26
26
  orderLimit: number;
27
27
  order: TerminalOrder;
28
28
  totalQuantity: number;
29
- addressHeader: string;
30
29
  analytics: JustifiAnalytics;
31
30
  errorEvent: EventEmitter<ComponentErrorEvent>;
32
31
  submitted: EventEmitter<any>;
@@ -6,7 +6,7 @@ export declare const terminalTableColumns: {
6
6
  id: () => any;
7
7
  provider: () => any;
8
8
  provider_serial_number: () => any;
9
- provider_id: () => any;
9
+ device_id: () => any;
10
10
  sub_account_name: () => any;
11
11
  status: () => any;
12
12
  };
@@ -16,7 +16,7 @@ export declare const terminalTableCells: {
16
16
  id: (terminal: Terminal, index: number) => any;
17
17
  provider: (terminal: Terminal, index: number) => any;
18
18
  provider_serial_number: (terminal: Terminal, index: number) => any;
19
- provider_id: (terminal: Terminal, index: number) => any;
19
+ device_id: (terminal: Terminal, index: number) => any;
20
20
  sub_account_name: (terminal: Terminal, index: number) => any;
21
21
  status: (terminal: Terminal, index: number) => any;
22
22
  };
@@ -1 +1 @@
1
- import{r as i,c as r,h as s}from"./p-2783e363.js";import{S as t}from"./p-bfe9748b.js";import{c as e,J as o}from"./p-3188f72a.js";import{d as a}from"./p-9fecad5a.js";import{a as n,C as c}from"./p-9dd8685c.js";import"./p-1366a019.js";import"./p-56f6ce4c.js";import"./p-3f5e6602.js";import{a as p}from"./p-2a9d7f6b.js";import"./p-61f0a2ce.js";import{g as h,a as m}from"./p-87f8c596.js";import{A as d}from"./p-5f6b4bc9.js";import"./p-88a37837.js";import"./p-bf195b35.js";import"./p-f8fccf44.js";import"./p-c8b78136.js";import"./p-abdbcd8e.js";class f{async fetchTerminalOrders(i,r,s,t="https://wc-proxy.justifi.ai"){const e={account:i};return d({authToken:r,apiOrigin:t}).get("terminals/orders",s,null,e)}}const l=class{constructor(s){i(this,s),this.errorEvent=r(this,"error-event",7),this.handleErrorEvent=i=>{this.errorMessage=i.detail.message,this.errorEvent.emit(i.detail)},this.getTerminalOrders=void 0,this.errorMessage=null,this.accountId=void 0,this.authToken=void 0,this.apiOrigin="https://wc-proxy.justifi.ai",this.columns=a}componentWillLoad(){e(),this.analytics=new o(this),this.initializeGetData()}initializeGetData(){this.accountId&&this.authToken?this.getTerminalOrders=(({id:i,authToken:r,service:s,apiOrigin:t})=>async({params:e,onSuccess:o,onError:a,final:c})=>{var d,f;try{const c=await s.fetchTerminalOrders(i,r,e,t);if(c.error)return a({error:h(c.error),code:m(null===(f=c.error)||void 0===f?void 0:f.code),severity:n.ERROR});{const i=Object.assign({},c.page_info);o({terminalOrders:(null===(d=c.data)||void 0===d?void 0:d.map((i=>new p(i))))||[],pagingInfo:i})}}catch(i){const r=m(null==i?void 0:i.code);return a({error:i.message||i,code:r,severity:n.ERROR})}finally{return c()}})({id:this.accountId,authToken:this.authToken,service:new f,apiOrigin:this.apiOrigin}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:c.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return s(t,{key:"beb7ebe2397c43c28b818133294b6c972d2834ac"},s("terminal-orders-list-core",{key:"87db98176b2a462b9446170c348352958d4e3a05",getTerminalOrders:this.getTerminalOrders,"onError-event":this.handleErrorEvent,columns:this.columns}))}};export{l as justifi_terminal_orders_list}
1
+ import{r as i,c as r,h as s}from"./p-2783e363.js";import{S as t}from"./p-bfe9748b.js";import{c as e,J as o}from"./p-5a541d35.js";import{d as a}from"./p-9fecad5a.js";import{a as n,C as c}from"./p-9dd8685c.js";import"./p-1366a019.js";import"./p-56f6ce4c.js";import"./p-3f5e6602.js";import{a as p}from"./p-2a9d7f6b.js";import"./p-61f0a2ce.js";import{g as d,a as h}from"./p-87f8c596.js";import{A as m}from"./p-5f6b4bc9.js";import"./p-de03d0f8.js";import"./p-bf195b35.js";import"./p-f8fccf44.js";import"./p-c8b78136.js";import"./p-abdbcd8e.js";class f{async fetchTerminalOrders(i,r,s,t="https://wc-proxy.justifi.ai"){const e={account:i};return m({authToken:r,apiOrigin:t}).get("terminals/orders",s,null,e)}}const l=class{constructor(s){i(this,s),this.errorEvent=r(this,"error-event",7),this.handleErrorEvent=i=>{this.errorMessage=i.detail.message,this.errorEvent.emit(i.detail)},this.getTerminalOrders=void 0,this.errorMessage=null,this.accountId=void 0,this.authToken=void 0,this.apiOrigin="https://wc-proxy.justifi.ai",this.columns=a}componentWillLoad(){e(),this.analytics=new o(this),this.initializeGetData()}initializeGetData(){this.accountId&&this.authToken?this.getTerminalOrders=(({id:i,authToken:r,service:s,apiOrigin:t})=>async({params:e,onSuccess:o,onError:a,final:c})=>{var m,f;try{const c=await s.fetchTerminalOrders(i,r,e,t);if(c.error)return a({error:d(c.error),code:h(null===(f=c.error)||void 0===f?void 0:f.code),severity:n.ERROR});{const i=Object.assign({},c.page_info);o({terminalOrders:(null===(m=c.data)||void 0===m?void 0:m.map((i=>new p(i))))||[],pagingInfo:i})}}catch(i){const r=h(null==i?void 0:i.code);return a({error:i.message||i,code:r,severity:n.ERROR})}finally{return c()}})({id:this.accountId,authToken:this.authToken,service:new f,apiOrigin:this.apiOrigin}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:c.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR}))}render(){return s(t,{key:"beb7ebe2397c43c28b818133294b6c972d2834ac"},s("terminal-orders-list-core",{key:"87db98176b2a462b9446170c348352958d4e3a05",getTerminalOrders:this.getTerminalOrders,"onError-event":this.handleErrorEvent,columns:this.columns}))}};export{l as justifi_terminal_orders_list}
@@ -0,0 +1 @@
1
+ import{r as i,c as t,h as s}from"./p-2783e363.js";import{a as r,C as e}from"./p-9dd8685c.js";import{c as o,J as a}from"./p-5a541d35.js";import{T as n}from"./p-87a4fb5b.js";import"./p-1366a019.js";import"./p-56f6ce4c.js";import"./p-3f5e6602.js";import{d as c}from"./p-2a9d7f6b.js";import"./p-61f0a2ce.js";import{g as p,a as h}from"./p-87f8c596.js";import{m as d,S as m}from"./p-cbad44b7.js";import{S as f}from"./p-bfe9748b.js";import{d as u}from"./p-70be104e.js";import"./p-de03d0f8.js";import"./p-5f6b4bc9.js";import"./p-f8fccf44.js";import"./p-abdbcd8e.js";import"./p-c8b78136.js";import"./p-bf195b35.js";const b=class{constructor(s){i(this,s),this.errorEvent=t(this,"error-event",7),this.handleErrorEvent=i=>{this.errorMessage=i.detail.message,this.errorEvent.emit(i.detail)},this.getTerminals=void 0,this.getSubAccounts=void 0,this.errorMessage=null,this.accountId=void 0,this.authToken=void 0,this.apiOrigin="https://wc-proxy.justifi.ai",this.columns=u}componentWillLoad(){o(),this.analytics=new a(this),this.initializeGetData()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetTerminals(),this.initializeGetSubAccounts()}initializeGetTerminals(){this.accountId&&this.authToken?this.getTerminals=(({id:i,authToken:t,service:s,apiOrigin:e})=>async({params:o,onSuccess:a,onError:n})=>{var d,m;try{const f=await s.fetchTerminals(i,t,o,e);if(f.error)return n({error:p(f.error),code:h(null===(m=f.error)||void 0===m?void 0:m.code),severity:r.ERROR});{const i=Object.assign({},f.page_info);a({terminals:(null===(d=f.data)||void 0===d?void 0:d.map((i=>new c(i))))||[],pagingInfo:i})}}catch(i){const t=h(null==i?void 0:i.code);return n({error:i.message||i,code:t,severity:r.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new n,apiOrigin:this.apiOrigin}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:e.MISSING_PROPS,message:this.errorMessage,severity:r.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=d({accountId:this.accountId,authToken:this.authToken,service:new m,apiOrigin:this.apiOrigin}))}render(){return s(f,{key:"008b4bd549c228dbf8972e5ce08764c40e0b45a7"},s("terminals-list-core",{key:"e57f76fa1560c97d76068503b48e92a5fa9a02ec",getTerminals:this.getTerminals,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{b as justifi_terminals_list}
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as s}from"./p-2783e363.js";import{a as o,C as e}from"./p-9dd8685c.js";import{C as r}from"./p-1366a019.js";import"./p-56f6ce4c.js";import"./p-3f5e6602.js";import"./p-2a9d7f6b.js";import"./p-61f0a2ce.js";import{g as c,a}from"./p-87f8c596.js";import{c as h,J as n}from"./p-5a541d35.js";import{C as p}from"./p-54556fc6.js";import{m as d,S as m}from"./p-cbad44b7.js";import{S as u}from"./p-bfe9748b.js";import{d as f}from"./p-ca6cdfe6.js";import"./p-f8fccf44.js";import"./p-abdbcd8e.js";import"./p-de03d0f8.js";import"./p-5f6b4bc9.js";import"./p-c8b78136.js";import"./p-bf195b35.js";const b=class{constructor(s){t(this,s),this.errorEvent=i(this,"error-event",7),this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.getCheckouts=void 0,this.getSubAccounts=void 0,this.errorMessage=null,this.accountId=void 0,this.authToken=void 0,this.apiOrigin="https://wc-proxy.justifi.ai",this.columns=f}componentWillLoad(){h(),this.analytics=new n(this),this.initializeGetData()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetCheckouts(),this.initializeGetSubAccounts()}initializeGetCheckouts(){this.accountId&&this.authToken?this.getCheckouts=(({accountId:t,authToken:i,service:s,apiOrigin:e})=>async({params:h,onSuccess:n,onError:p})=>{var d,m;try{const u=await s.fetchCheckouts(t,i,h,e);if(u.error)return p({error:c(u.error),code:a(null===(m=u.error)||void 0===m?void 0:m.code),severity:o.ERROR});{const t=Object.assign({},u.page_info);n({checkouts:(null===(d=u.data)||void 0===d?void 0:d.map((t=>new r(t))))||[],pagingInfo:t})}}catch(t){const i=a(null==t?void 0:t.code);return p({error:t.message||t,code:i,severity:o.ERROR})}})({accountId:this.accountId,authToken:this.authToken,service:new p,apiOrigin:this.apiOrigin}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:e.MISSING_PROPS,message:this.errorMessage,severity:o.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=d({accountId:this.accountId,authToken:this.authToken,service:new m,apiOrigin:this.apiOrigin}))}render(){return s(u,{key:"072e2dc9373eef92119a0b0a01b61615d3bdcec0"},s("checkouts-list-core",{key:"84027904ba2baf57aa22247c553ab585d0d71262",getCheckouts:this.getCheckouts,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{b as justifi_checkouts_list}
@@ -1 +1 @@
1
- import{r as i,c as s,h as t}from"./p-2783e363.js";import{B as e}from"./p-bfc2d88a.js";import{S as a}from"./p-bfe9748b.js";import{c as o,J as d}from"./p-3188f72a.js";import{a as r,C as h}from"./p-9dd8685c.js";import"./p-1366a019.js";import"./p-56f6ce4c.js";import"./p-3f5e6602.js";import"./p-2a9d7f6b.js";import"./p-61f0a2ce.js";import"./p-bf195b35.js";import"./p-88a37837.js";import"./p-5f6b4bc9.js";import"./p-f8fccf44.js";import"./p-abdbcd8e.js";const c=class{constructor(t){i(this,t),this.errorEvent=s(this,"error-event",7),this.submitEvent=s(this,"submit-event",7),this.authToken=void 0,this.accountId=void 0,this.paymentMethodGroupId=void 0,this.submitButtonText=void 0,this.disableCreditCard=void 0,this.disableBankAccount=void 0,this.hideSubmitButton=void 0,this.hideCardBillingForm=void 0,this.iframeOrigin="https://components.justifi.ai",this.isLoading=!1}componentWillLoad(){o(),this.analytics=new d(this)}async tokenizePaymentMethod(i){let s;i&&i.preventDefault(),this.isLoading=!0;try{s=await this.paymentMethodOptionsRef.resolvePaymentMethod({isValid:!0}),s.error&&this.errorEvent.emit({errorCode:s.error.code,message:s.error.message,severity:r.ERROR})}catch(i){this.errorEvent.emit({errorCode:h.TOKENIZE_ERROR,message:i.message,severity:r.ERROR})}finally{return this.submitEvent.emit({response:s}),this.isLoading=!1,s}}async fillBillingForm(i){this.paymentMethodOptionsRef.fillBillingForm(i)}render(){return t(a,{key:"270b2dce491c95fd6a372bf4e59d4829c91290fa"},t("form",{key:"7e68afbac49260a92bb6c9e3bd08125129ab196c"},t("fieldset",{key:"95f911fa066f7fea0b36e4c99cb1c5008b4a886d"},t("div",{key:"aec8576644731d5960a1e041960076c503aa4a17",class:"row gy-3"},t("div",{key:"51436afb0c10e189d079226dd0a8e7b18580fd69",class:"col-12"},t("justifi-payment-method-options",{key:"59777ac37f44bfe9ef98d3b22a6e485f06db303d",ref:i=>this.paymentMethodOptionsRef=i,"show-card":!this.disableCreditCard,"show-ach":!this.disableBankAccount,"show-bnpl":!1,paymentMethodGroupId:this.paymentMethodGroupId,"show-saved-payment-methods":!1,hideCardBillingForm:this.hideCardBillingForm,authToken:this.authToken,"account-id":this.accountId,iframeOrigin:this.iframeOrigin})),t("div",{key:"ef37939fb4d8e0225f98f0c3874a83206307f671",class:"col-12"},t(e,{key:"4b193d76ad540cae97a2423948e18d60f6db0679",variant:"primary",type:"submit",onClick:i=>this.tokenizePaymentMethod(i),isLoading:this.isLoading,"data-testid":"submit-button",hidden:this.hideSubmitButton},this.submitButtonText||"Submit"))))))}};export{c as justifi_tokenize_payment_method}
1
+ import{r as i,c as s,h as t}from"./p-2783e363.js";import{B as e}from"./p-bfc2d88a.js";import{S as a}from"./p-bfe9748b.js";import{c as o,J as d}from"./p-5a541d35.js";import{a as r,C as h}from"./p-9dd8685c.js";import"./p-1366a019.js";import"./p-56f6ce4c.js";import"./p-3f5e6602.js";import"./p-2a9d7f6b.js";import"./p-61f0a2ce.js";import"./p-bf195b35.js";import"./p-de03d0f8.js";import"./p-5f6b4bc9.js";import"./p-f8fccf44.js";import"./p-abdbcd8e.js";const c=class{constructor(t){i(this,t),this.errorEvent=s(this,"error-event",7),this.submitEvent=s(this,"submit-event",7),this.authToken=void 0,this.accountId=void 0,this.paymentMethodGroupId=void 0,this.submitButtonText=void 0,this.disableCreditCard=void 0,this.disableBankAccount=void 0,this.hideSubmitButton=void 0,this.hideCardBillingForm=void 0,this.iframeOrigin="https://components.justifi.ai",this.isLoading=!1}componentWillLoad(){o(),this.analytics=new d(this)}async tokenizePaymentMethod(i){let s;i&&i.preventDefault(),this.isLoading=!0;try{s=await this.paymentMethodOptionsRef.resolvePaymentMethod({isValid:!0}),s.error&&this.errorEvent.emit({errorCode:s.error.code,message:s.error.message,severity:r.ERROR})}catch(i){this.errorEvent.emit({errorCode:h.TOKENIZE_ERROR,message:i.message,severity:r.ERROR})}finally{return this.submitEvent.emit({response:s}),this.isLoading=!1,s}}async fillBillingForm(i){this.paymentMethodOptionsRef.fillBillingForm(i)}render(){return t(a,{key:"270b2dce491c95fd6a372bf4e59d4829c91290fa"},t("form",{key:"7e68afbac49260a92bb6c9e3bd08125129ab196c"},t("fieldset",{key:"95f911fa066f7fea0b36e4c99cb1c5008b4a886d"},t("div",{key:"aec8576644731d5960a1e041960076c503aa4a17",class:"row gy-3"},t("div",{key:"51436afb0c10e189d079226dd0a8e7b18580fd69",class:"col-12"},t("justifi-payment-method-options",{key:"59777ac37f44bfe9ef98d3b22a6e485f06db303d",ref:i=>this.paymentMethodOptionsRef=i,"show-card":!this.disableCreditCard,"show-ach":!this.disableBankAccount,"show-bnpl":!1,paymentMethodGroupId:this.paymentMethodGroupId,"show-saved-payment-methods":!1,hideCardBillingForm:this.hideCardBillingForm,authToken:this.authToken,"account-id":this.accountId,iframeOrigin:this.iframeOrigin})),t("div",{key:"ef37939fb4d8e0225f98f0c3874a83206307f671",class:"col-12"},t(e,{key:"4b193d76ad540cae97a2423948e18d60f6db0679",variant:"primary",type:"submit",onClick:i=>this.tokenizePaymentMethod(i),isLoading:this.isLoading,"data-testid":"submit-button",hidden:this.hideSubmitButton},this.submitButtonText||"Submit"))))))}};export{c as justifi_tokenize_payment_method}
@@ -1 +1 @@
1
- import{r as t,c as s,h as i}from"./p-2783e363.js";import{P as e}from"./p-536fb8e2.js";import{a as r,C as o}from"./p-9dd8685c.js";import"./p-1366a019.js";import"./p-56f6ce4c.js";import{P as a}from"./p-3f5e6602.js";import"./p-2a9d7f6b.js";import"./p-61f0a2ce.js";import{g as p,a as n}from"./p-87f8c596.js";import{E as h}from"./p-12074378.js";import{c,J as m}from"./p-3188f72a.js";import"./p-5f6b4bc9.js";import"./p-f8fccf44.js";import"./p-abdbcd8e.js";import"./p-bf195b35.js";import"./p-88a37837.js";const d=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.paymentService=new e,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.paymentId=void 0,this.authToken=void 0,this.getPaymentDetails=void 0,this.errorMessage=null}componentWillLoad(){c(),this.analytics=new m(this),this.initializeGetPaymentDetails()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeGetPaymentDetails()}initializeGetPaymentDetails(){this.paymentId&&this.authToken?this.getPaymentDetails=(({id:t,authToken:s,service:i})=>async({onSuccess:e,onError:o})=>{var h;try{const c=await i.fetchPayment(t,s);c.error?o({error:p(c.error),code:n(null===(h=c.error)||void 0===h?void 0:h.code),severity:r.ERROR}):e({payment:new a(c.data)})}catch(t){const s=n(null==t?void 0:t.code);o({error:p(t),code:s,severity:r.ERROR})}})({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:o.MISSING_PROPS,severity:r.ERROR}))}render(){return this.errorMessage?h(this.errorMessage):i("payment-details-core",{getPaymentDetails:this.getPaymentDetails,"onError-event":this.handleErrorEvent})}static get watchers(){return{paymentId:["propChanged"],authToken:["propChanged"]}}};export{d as justifi_payment_details}
1
+ import{r as t,c as s,h as i}from"./p-2783e363.js";import{P as e}from"./p-536fb8e2.js";import{a as r,C as o}from"./p-9dd8685c.js";import"./p-1366a019.js";import"./p-56f6ce4c.js";import{P as a}from"./p-3f5e6602.js";import"./p-2a9d7f6b.js";import"./p-61f0a2ce.js";import{g as p,a as n}from"./p-87f8c596.js";import{E as h}from"./p-12074378.js";import{c,J as m}from"./p-5a541d35.js";import"./p-5f6b4bc9.js";import"./p-f8fccf44.js";import"./p-abdbcd8e.js";import"./p-bf195b35.js";import"./p-de03d0f8.js";const d=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.paymentService=new e,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.paymentId=void 0,this.authToken=void 0,this.getPaymentDetails=void 0,this.errorMessage=null}componentWillLoad(){c(),this.analytics=new m(this),this.initializeGetPaymentDetails()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeGetPaymentDetails()}initializeGetPaymentDetails(){this.paymentId&&this.authToken?this.getPaymentDetails=(({id:t,authToken:s,service:i})=>async({onSuccess:e,onError:o})=>{var h;try{const c=await i.fetchPayment(t,s);c.error?o({error:p(c.error),code:n(null===(h=c.error)||void 0===h?void 0:h.code),severity:r.ERROR}):e({payment:new a(c.data)})}catch(t){const s=n(null==t?void 0:t.code);o({error:p(t),code:s,severity:r.ERROR})}})({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:o.MISSING_PROPS,severity:r.ERROR}))}render(){return this.errorMessage?h(this.errorMessage):i("payment-details-core",{getPaymentDetails:this.getPaymentDetails,"onError-event":this.handleErrorEvent})}static get watchers(){return{paymentId:["propChanged"],authToken:["propChanged"]}}};export{d as justifi_payment_details}
@@ -1 +1 @@
1
- import{r as e,c as t,h as s}from"./p-2783e363.js";import{f as i}from"./p-f8fccf44.js";import{t as a,C as r}from"./p-bf195b35.js";import{B as d}from"./p-bfc2d88a.js";import{S as c}from"./p-bfe9748b.js";import{S as o}from"./p-56c7fc8d.js";import{a as n,C as h}from"./p-9dd8685c.js";import{g as p,a as f}from"./p-87f8c596.js";import{D as l}from"./p-f4aeb100.js";import{D as u}from"./p-667ebd79.js";import{c as b,J as y}from"./p-3188f72a.js";import"./p-5f6b4bc9.js";import"./p-1366a019.js";import"./p-56f6ce4c.js";import"./p-3f5e6602.js";import"./p-abdbcd8e.js";import"./p-2a9d7f6b.js";import"./p-61f0a2ce.js";import"./p-88a37837.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:p(d.error),code:f(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR})}a(d)}catch(e){const t=f(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",7),this.errorEvent=t(this,"error-event",7),this.submitEvent=t(this,"submit-event",7),this.dispute=void 0,this.authToken=void 0,this.isLoading=void 0}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})}render(){var e,t,n,h,p,f,l;return s(c,{key:"ad76721d05d9dcdfb643d865aec1a6f0684e1e05"},this.isLoading&&s("div",{key:"a8b8e850e168cba9281a6f6302aef53976027346",style:{marginBottom:"8px"}},s(o,{key:"813563746b9f9b507b49762c9e1a1f006765345b",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(o,{key:"373c0596e6246860a17822eb5ec49f3ef9e37460",height:"18px",styles:{marginBottom:"8px"}}),s(o,{key:"32f8083f0551fbea29de6ddbc847dc62fa0b0c48",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&s("div",{key:"9c032d9b8ea4b176f1fabfff45a2975ac9e6df17",part:a},s("h1",{key:"e1a906047a9c056138bb2bd69dddf2bbc54782c4",class:"h4",part:r},"This payment is disputed"),s("p",{key:"40d9d799d073318ba52a2c559c8119c64e9107aa"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"e2d3bc21f03cd47acc8feec8640410c1c74f9b58",class:"h5"},"Dispute details"),s("div",{key:"3e3c440350a6dc86b42204a43f80fa700c1d06f0",class:"d-table gap-2"},s("div",{key:"67b4dbf945dae00fe6e6144782c6c249cc032968",class:"d-table-row gap-2"},s("span",{key:"6570c2fc92f6a526a6e2afee91fa1017f5ef3c9b",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"269f42e3737b419978fb35e741f34a751f0b0d9b",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(t=this.dispute)||void 0===t?void 0:t.amount))),s("div",{key:"b498ff565dafbea3e3452d386883924bda431a96",class:"d-table-row gap-2"},s("span",{key:"afaecceeac44807453e1a99ffc0d8961022fd98f",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"69b491d454f791d679528b77f9f75fc889add363",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(n=this.dispute)||void 0===n?void 0:n.reason)),s("div",{key:"97515b0bd0dd113e31e6974c7e107af19eed2e73",class:"d-table-row gap-2"},s("span",{key:"e8a46a99bb2596d8aab980230088989c3a9455c4",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Dispute ID"),s("span",{key:"aa5e2e6997bedfdbd31c2fe9ee540a4399e3a25e",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(h=this.dispute)||void 0===h?void 0:h.id))),s("div",{key:"4e35b26867fdde02426bd047932ca854c05421b7",class:"d-flex gap-2 mt-4 justify-content-end"},s(d,{key:"2881172b26ffb36321094ea2f8af7cc622678229",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(d,{key:"e57fca0b48327bb898ec19938498eb1c945bbb4d",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(p=this.dispute)||void 0===p?void 0:p.underReview)&&s("div",{key:"c1f0a2f35d9640efdfd76b13d6969374169b2631"},s("h1",{key:"800d59ebecc9f15890fe7f264a3b44910e322784",class:"h4"},"This payment is disputed and under review"),s("p",{key:"30a7d186c01e33f2a95b0cecb3a4a69b59d158e6"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(f=this.dispute)||void 0===f?void 0:f.won)&&s("div",{key:"5d0fbdcc7a15817e1875d18a5f4d9cf982989ed1"},s("h1",{key:"b2814587c7bd46e28948346f5871456e6cc0589c",class:"h4"},"This payment was disputed"),s("p",{key:"bff6dbf512017e27b1fc6ea2a97b2dc47f4b2a65"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(l=this.dispute)||void 0===l?void 0:l.lost)&&s("div",{key:"548cf8e95c0933ec987862c162487abfd3c043bc"},s("h1",{key:"46f96b5e6785b5a4398918c0e29302403a7194bd",class:"h4"},"This payment was disputed"),s("p",{key:"71c3c1e1754cd0f0f042a6277ba93b2076cd7645"},"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",7),this.handleErrorEvent=e=>{this.errorMessage=e.detail.message,this.errorEvent.emit(e.detail)},this.updateDisputeResponse=void 0,this.submitDisputeResponse=void 0,this.createDisputeEvidence=void 0,this.errorMessage=null,this.authToken=void 0,this.disputeId=void 0,this.disputeResponse=void 0,this.apiOrigin="https://wc-proxy.justifi.ai"}componentWillLoad(){b(),this.analytics=new y(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){this.analytics.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:p(d.error),code:f(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=f(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:p(d.error),code:f(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=f(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:"1a0ac889493d8008e9bd70e4c3aad9ea72d12453"},s("justifi-dispute-response-core",{key:"82e11a3f0d14640beca1ebed72364662db3ffdbd","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"]}}},j=class{constructor(i){e(this,i),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.submitEvent=t(this,"submit-event",7),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)}))},this.updateDisputeResponse=void 0,this.submitDisputeResponse=void 0,this.createDisputeEvidence=void 0,this.disputeResponse={},this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.currentStepComponentRef=void 0}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:"1f44d3fa1d95758e9dc949bc9df9cb8def59aae5",class:"row gy-3"},s("div",{key:"5245e71606a4f69a8978c27bf8d0a985ecf3b835",class:"col-12"},s("h1",{key:"e843ee37344171cb159fe83889ddc244487d49ed",class:"h4",part:r},"Counter dispute")),s("div",{key:"7680b28f96255822f3048dc529bafa71cebf81cc",class:"col-12"},this.currentStepComponent),s("div",{key:"3ce0c6ac049c64a3ed18e42dcc001dd1f62a5aed",class:"col-12"},s("div",{key:"2192e17c236024e2c89ea361ac1a4e2b57c6b50e",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,j as justifi_dispute_response_core}
1
+ import{r as e,c as t,h as s}from"./p-2783e363.js";import{f as i}from"./p-f8fccf44.js";import{t as a,C as r}from"./p-bf195b35.js";import{B as d}from"./p-bfc2d88a.js";import{S as c}from"./p-bfe9748b.js";import{S as o}from"./p-56c7fc8d.js";import{a as n,C as h}from"./p-9dd8685c.js";import{g as p,a as f}from"./p-87f8c596.js";import{D as l}from"./p-f4aeb100.js";import{D as u}from"./p-667ebd79.js";import{c as b,J as y}from"./p-5a541d35.js";import"./p-5f6b4bc9.js";import"./p-1366a019.js";import"./p-56f6ce4c.js";import"./p-3f5e6602.js";import"./p-abdbcd8e.js";import"./p-2a9d7f6b.js";import"./p-61f0a2ce.js";import"./p-de03d0f8.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:p(d.error),code:f(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR})}a(d)}catch(e){const t=f(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",7),this.errorEvent=t(this,"error-event",7),this.submitEvent=t(this,"submit-event",7),this.dispute=void 0,this.authToken=void 0,this.isLoading=void 0}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})}render(){var e,t,n,h,p,f,l;return s(c,{key:"ad76721d05d9dcdfb643d865aec1a6f0684e1e05"},this.isLoading&&s("div",{key:"a8b8e850e168cba9281a6f6302aef53976027346",style:{marginBottom:"8px"}},s(o,{key:"813563746b9f9b507b49762c9e1a1f006765345b",height:"28px",width:"70%",styles:{marginBottom:"16px"}}),s(o,{key:"373c0596e6246860a17822eb5ec49f3ef9e37460",height:"18px",styles:{marginBottom:"8px"}}),s(o,{key:"32f8083f0551fbea29de6ddbc847dc62fa0b0c48",height:"18px",styles:{marginBottom:"8px"}})),(null===(e=this.dispute)||void 0===e?void 0:e.needsResponse)&&s("div",{key:"9c032d9b8ea4b176f1fabfff45a2975ac9e6df17",part:a},s("h1",{key:"e1a906047a9c056138bb2bd69dddf2bbc54782c4",class:"h4",part:r},"This payment is disputed"),s("p",{key:"40d9d799d073318ba52a2c559c8119c64e9107aa"},"The cardholder is disputing this payment. You may accept this dispute, or proceed to provide evidence in a counter dispute."),s("h2",{key:"e2d3bc21f03cd47acc8feec8640410c1c74f9b58",class:"h5"},"Dispute details"),s("div",{key:"3e3c440350a6dc86b42204a43f80fa700c1d06f0",class:"d-table gap-2"},s("div",{key:"67b4dbf945dae00fe6e6144782c6c249cc032968",class:"d-table-row gap-2"},s("span",{key:"6570c2fc92f6a526a6e2afee91fa1017f5ef3c9b",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Amount"),s("span",{key:"269f42e3737b419978fb35e741f34a751f0b0d9b",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},i(null===(t=this.dispute)||void 0===t?void 0:t.amount))),s("div",{key:"b498ff565dafbea3e3452d386883924bda431a96",class:"d-table-row gap-2"},s("span",{key:"afaecceeac44807453e1a99ffc0d8961022fd98f",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Reason"),s("span",{key:"69b491d454f791d679528b77f9f75fc889add363",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(n=this.dispute)||void 0===n?void 0:n.reason)),s("div",{key:"97515b0bd0dd113e31e6974c7e107af19eed2e73",class:"d-table-row gap-2"},s("span",{key:"e8a46a99bb2596d8aab980230088989c3a9455c4",part:"detail-section-item-title",class:"fw-bold d-table-cell pe-4"},"Dispute ID"),s("span",{key:"aa5e2e6997bedfdbd31c2fe9ee540a4399e3a25e",part:"detail-section-item-data",class:"flex-1 d-table-cell text-wrap"},null===(h=this.dispute)||void 0===h?void 0:h.id))),s("div",{key:"4e35b26867fdde02426bd047932ca854c05421b7",class:"d-flex gap-2 mt-4 justify-content-end"},s(d,{key:"2881172b26ffb36321094ea2f8af7cc622678229",variant:"secondary",onClick:()=>this.acceptDispute()},"Accept dispute"),s(d,{key:"e57fca0b48327bb898ec19938498eb1c945bbb4d",variant:"primary",onClick:()=>this.initiateRespondToDispute()},"Counter dispute"))),(null===(p=this.dispute)||void 0===p?void 0:p.underReview)&&s("div",{key:"c1f0a2f35d9640efdfd76b13d6969374169b2631"},s("h1",{key:"800d59ebecc9f15890fe7f264a3b44910e322784",class:"h4"},"This payment is disputed and under review"),s("p",{key:"30a7d186c01e33f2a95b0cecb3a4a69b59d158e6"},"The cardholder is disputing this payment. A counter dispute has been submitted and is under review.")),(null===(f=this.dispute)||void 0===f?void 0:f.won)&&s("div",{key:"5d0fbdcc7a15817e1875d18a5f4d9cf982989ed1"},s("h1",{key:"b2814587c7bd46e28948346f5871456e6cc0589c",class:"h4"},"This payment was disputed"),s("p",{key:"bff6dbf512017e27b1fc6ea2a97b2dc47f4b2a65"},"The cardholder disputed this payment and the card issuer has settled it in your favor.")),(null===(l=this.dispute)||void 0===l?void 0:l.lost)&&s("div",{key:"548cf8e95c0933ec987862c162487abfd3c043bc"},s("h1",{key:"46f96b5e6785b5a4398918c0e29302403a7194bd",class:"h4"},"This payment was disputed"),s("p",{key:"71c3c1e1754cd0f0f042a6277ba93b2076cd7645"},"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",7),this.handleErrorEvent=e=>{this.errorMessage=e.detail.message,this.errorEvent.emit(e.detail)},this.updateDisputeResponse=void 0,this.submitDisputeResponse=void 0,this.createDisputeEvidence=void 0,this.errorMessage=null,this.authToken=void 0,this.disputeId=void 0,this.disputeResponse=void 0,this.apiOrigin="https://wc-proxy.justifi.ai"}componentWillLoad(){b(),this.analytics=new y(this),this.initializeDisputeServiceMethods()}disconnectedCallback(){this.analytics.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:p(d.error),code:f(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=f(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:p(d.error),code:f(null===(c=d.error)||void 0===c?void 0:c.code),severity:n.ERROR});a(d)}catch(e){const t=f(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:"1a0ac889493d8008e9bd70e4c3aad9ea72d12453"},s("justifi-dispute-response-core",{key:"82e11a3f0d14640beca1ebed72364662db3ffdbd","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"]}}},j=class{constructor(i){e(this,i),this.clickEvent=t(this,"click-event",7),this.errorEvent=t(this,"error-event",7),this.stepCompleteEvent=t(this,"complete-form-step-event",7),this.submitEvent=t(this,"submit-event",7),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)}))},this.updateDisputeResponse=void 0,this.submitDisputeResponse=void 0,this.createDisputeEvidence=void 0,this.disputeResponse={},this.isLoading=!1,this.documentList=[],this.documentErrors={},this.currentStep=0,this.currentStepComponentRef=void 0}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:"1f44d3fa1d95758e9dc949bc9df9cb8def59aae5",class:"row gy-3"},s("div",{key:"5245e71606a4f69a8978c27bf8d0a985ecf3b835",class:"col-12"},s("h1",{key:"e843ee37344171cb159fe83889ddc244487d49ed",class:"h4",part:r},"Counter dispute")),s("div",{key:"7680b28f96255822f3048dc529bafa71cebf81cc",class:"col-12"},this.currentStepComponent),s("div",{key:"3ce0c6ac049c64a3ed18e42dcc001dd1f62a5aed",class:"col-12"},s("div",{key:"2192e17c236024e2c89ea361ac1a4e2b57c6b50e",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,j as justifi_dispute_response_core}
@@ -1 +1 @@
1
- import{r as t,c as i,h as s}from"./p-2783e363.js";import{a as e,C as o}from"./p-9dd8685c.js";import{c as a,J as r}from"./p-3188f72a.js";import{m as p,P as n}from"./p-9a9732e1.js";import"./p-1366a019.js";import"./p-56f6ce4c.js";import"./p-3f5e6602.js";import{P as c}from"./p-2a9d7f6b.js";import"./p-61f0a2ce.js";import{g as d,a as h}from"./p-87f8c596.js";import{m as l,S as m}from"./p-cbad44b7.js";import{S as u}from"./p-bfe9748b.js";import{d as b}from"./p-ae7edce5.js";import"./p-88a37837.js";import"./p-5f6b4bc9.js";import"./p-f8fccf44.js";import"./p-abdbcd8e.js";import"./p-927cb6df.js";import"./p-c8b78136.js";import"./p-bf195b35.js";const f=class{constructor(s){t(this,s),this.errorEvent=i(this,"error-event",7),this.handleOnError=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.getPayouts=void 0,this.getPayoutCSV=void 0,this.getSubAccounts=void 0,this.errorMessage=null,this.accountId=void 0,this.authToken=void 0,this.apiOrigin="https://wc-proxy.justifi.ai",this.columns=b}componentWillLoad(){a(),this.analytics=new r(this),this.initializeGetData()}disconnectedCallback(){this.analytics.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 n,apiOrigin:this.apiOrigin};this.getPayouts=(({id:t,authToken:i,service:s,apiOrigin:o})=>async({params:a,onSuccess:r,onError:p})=>{var n,l;try{const m=await s.fetchPayouts(t,i,a,o);if(m.error)return p({error:d(m.error),code:h(null===(l=m.error)||void 0===l?void 0:l.code),severity:e.ERROR});{const t=Object.assign({},m.page_info);r({payouts:(null===(n=m.data)||void 0===n?void 0:n.map((t=>new c(t))))||[],pagingInfo:t})}}catch(t){const i=h(null==t?void 0:t.code);return p({error:t.message||t,code:i,severity:e.ERROR})}})(t),this.getPayoutCSV=p(t)}else this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:this.errorMessage,severity:e.ERROR})}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=l({accountId:this.accountId,authToken:this.authToken,service:new m,apiOrigin:this.apiOrigin}))}render(){return s(u,{key:"434171dee57c7d639a894133b36f7dc727e28381",exportedparts:"\ntable-head,table-head-row,table-head-cell,table-body,table-row,table-row-even,\ntable-row-odd,table-cell,loading-state-cell,loading-state-spinner,error-state,\nempty-state,pagination-bar,page-arrow,page-button,page-button-disabled,page-button-text\n"},s("payouts-list-core",{key:"e4ed849e1c839dcdd3990a1b64d2bd132cda86f8",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{f as justifi_payouts_list}
1
+ import{r as t,c as i,h as s}from"./p-2783e363.js";import{a as e,C as o}from"./p-9dd8685c.js";import{c as a,J as r}from"./p-5a541d35.js";import{m as p,P as n}from"./p-9a9732e1.js";import"./p-1366a019.js";import"./p-56f6ce4c.js";import"./p-3f5e6602.js";import{P as c}from"./p-2a9d7f6b.js";import"./p-61f0a2ce.js";import{g as d,a as h}from"./p-87f8c596.js";import{m as l,S as m}from"./p-cbad44b7.js";import{S as u}from"./p-bfe9748b.js";import{d as b}from"./p-ae7edce5.js";import"./p-de03d0f8.js";import"./p-5f6b4bc9.js";import"./p-f8fccf44.js";import"./p-abdbcd8e.js";import"./p-927cb6df.js";import"./p-c8b78136.js";import"./p-bf195b35.js";const f=class{constructor(s){t(this,s),this.errorEvent=i(this,"error-event",7),this.handleOnError=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.getPayouts=void 0,this.getPayoutCSV=void 0,this.getSubAccounts=void 0,this.errorMessage=null,this.accountId=void 0,this.authToken=void 0,this.apiOrigin="https://wc-proxy.justifi.ai",this.columns=b}componentWillLoad(){a(),this.analytics=new r(this),this.initializeGetData()}disconnectedCallback(){this.analytics.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 n,apiOrigin:this.apiOrigin};this.getPayouts=(({id:t,authToken:i,service:s,apiOrigin:o})=>async({params:a,onSuccess:r,onError:p})=>{var n,l;try{const m=await s.fetchPayouts(t,i,a,o);if(m.error)return p({error:d(m.error),code:h(null===(l=m.error)||void 0===l?void 0:l.code),severity:e.ERROR});{const t=Object.assign({},m.page_info);r({payouts:(null===(n=m.data)||void 0===n?void 0:n.map((t=>new c(t))))||[],pagingInfo:t})}}catch(t){const i=h(null==t?void 0:t.code);return p({error:t.message||t,code:i,severity:e.ERROR})}})(t),this.getPayoutCSV=p(t)}else this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:o.MISSING_PROPS,message:this.errorMessage,severity:e.ERROR})}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=l({accountId:this.accountId,authToken:this.authToken,service:new m,apiOrigin:this.apiOrigin}))}render(){return s(u,{key:"434171dee57c7d639a894133b36f7dc727e28381",exportedparts:"\ntable-head,table-head-row,table-head-cell,table-body,table-row,table-row-even,\ntable-row-odd,table-cell,loading-state-cell,loading-state-spinner,error-state,\nempty-state,pagination-bar,page-arrow,page-button,page-button-disabled,page-button-text\n"},s("payouts-list-core",{key:"e4ed849e1c839dcdd3990a1b64d2bd132cda86f8",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{f as justifi_payouts_list}
@@ -1 +1 @@
1
- import{h as s,r as i,c as t}from"./p-2783e363.js";import{c as o,F as e}from"./p-01033194.js";import{b as r,a}from"./p-537bce77.js";import{a as h,i as n}from"./p-d757fcf5.js";import{A as c}from"./p-5f6b4bc9.js";import"./p-9dd8685c.js";import"./p-1366a019.js";import"./p-56f6ce4c.js";import"./p-3f5e6602.js";import"./p-2a9d7f6b.js";import"./p-61f0a2ce.js";import{B as l,a as p}from"./p-5d1d2fd7.js";import{c as m,J as d}from"./p-3188f72a.js";import{B as f}from"./p-bfc2d88a.js";import{S as b}from"./p-bfe9748b.js";import{H as j}from"./p-ccb9ee53.js";import{S as u}from"./p-56c7fc8d.js";import{B as v}from"./p-73f9be7c.js";import"./p-bf12999f.js";import"./p-6078a370.js";import"./p-c9b78275.js";import"./p-f8fccf44.js";import"./p-abdbcd8e.js";import"./p-1ff8810b.js";import"./p-88a37837.js";import"./p-bf195b35.js";const w=o(Object.assign(Object.assign({},r().fields),{legal_address:h(),additional_questions:a(),representative:n("representative")})),g=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(u,{width:"25%"})),s("div",{class:"col-12"},s(u,{width:"100%"})),s("div",{class:"col-12 d-flex gap-3"},s(u,{width:"50%"}),s(u,{width:"50%"})),s("div",{class:"col-12 d-flex gap-3"},s(u,{width:"65%"}),s(u,{width:"35%"}))),x=()=>s("div",{class:"row gap-5"},s("div",{class:"col-12"},s(u,{width:"40%",height:"40px"})),s(g,null),s(g,null),s(g,null)),y=class{constructor(s){i(this,s),this.submitEvent=t(this,"submit-event",7),this.clickEvent=t(this,"click-event",7),this.instantiateBusiness=s=>{const i=new l(s);this.formController.setInitialValues(Object.assign({},i))},this.sendData=async()=>{this.isSaving=!0;try{const s=this.formController.values.getValue(),i=this.formController.getInitialValues(),t=new l(Object.assign(Object.assign({},i),s)).payload,o=await this.api.patch(this.businessEndpoint,t);this.handleReponse(o)}catch(s){this.errorMessage=p.patchData}finally{this.isSaving=!1}},this.fetchData=async()=>{this.isLoading=!0;try{const s=await this.api.get(this.businessEndpoint);this.instantiateBusiness(s.data)}catch(s){this.errorMessage=p.fetchData}finally{this.isLoading=!1}},this.validateAndSubmit=s=>{s.preventDefault(),this.formController.validateAndSubmit(this.sendData)},this.authToken=void 0,this.businessId=void 0,this.hideErrors=!1,this.formTitle="Business Information",this.removeTitle=!1,this.isLoading=!1,this.isSaving=!1,this.errorMessage=void 0}componentWillLoad(){m(),this.analytics=new d(this),this.authToken||console.error("Warning: Missing auth-token. The form will not be functional without it."),this.businessId||console.error("Warning: Missing business-id. The form requires an existing business-id to function."),this.formController=new e(w),this.api=c({authToken:this.authToken,apiOrigin:"https://wc-proxy.justifi.ai"}),this.fetchData()}disconnectedCallback(){this.analytics.cleanup()}get title(){return this.removeTitle?"":this.formTitle}get disabledState(){return this.isSaving}get businessEndpoint(){return`entities/business/${this.businessId}`}handleReponse(s){s.error&&(this.errorMessage=p.patchData),this.submitEvent.emit({response:s}),this.instantiateBusiness(s.data)}render(){return s(b,null,this.isLoading?s(x,null):s("form",{onSubmit:this.validateAndSubmit},s("div",{class:"row gap-3"},s(j,{text:this.title}),s("form-alert",{text:this.errorMessage,hideAlert:this.hideErrors}),s("div",{class:"col-12 mb-4"},s("justifi-business-core-info",{formController:this.formController})),s("div",{class:"col-12 mb-4"},s("justifi-legal-address-form",{formController:this.formController})),s("div",{class:"col-12 mb-4"},s("justifi-additional-questions",{formController:this.formController})),s("div",{class:"col-12 mb-4"},s("justifi-business-representative",{formController:this.formController})),s("div",{class:"col-12 d-flex flex-row-reverse"},s(f,{type:"submit",disabled:this.disabledState,variant:"primary",onClick:()=>this.clickEvent.emit({name:v.submit}),isLoading:this.isSaving},"Submit")))))}};export{y as justifi_business_form}
1
+ import{h as s,r as i,c as t}from"./p-2783e363.js";import{c as o,F as e}from"./p-01033194.js";import{b as r,a}from"./p-537bce77.js";import{a as h,i as n}from"./p-d757fcf5.js";import{A as c}from"./p-5f6b4bc9.js";import"./p-9dd8685c.js";import"./p-1366a019.js";import"./p-56f6ce4c.js";import"./p-3f5e6602.js";import"./p-2a9d7f6b.js";import"./p-61f0a2ce.js";import{B as l,a as p}from"./p-5d1d2fd7.js";import{c as d,J as m}from"./p-5a541d35.js";import{B as f}from"./p-bfc2d88a.js";import{S as b}from"./p-bfe9748b.js";import{H as j}from"./p-ccb9ee53.js";import{S as u}from"./p-56c7fc8d.js";import{B as v}from"./p-73f9be7c.js";import"./p-bf12999f.js";import"./p-6078a370.js";import"./p-c9b78275.js";import"./p-f8fccf44.js";import"./p-abdbcd8e.js";import"./p-1ff8810b.js";import"./p-de03d0f8.js";import"./p-bf195b35.js";const w=o(Object.assign(Object.assign({},r().fields),{legal_address:h(),additional_questions:a(),representative:n("representative")})),g=()=>s("div",{class:"row gap-3"},s("div",{class:"col-12"},s(u,{width:"25%"})),s("div",{class:"col-12"},s(u,{width:"100%"})),s("div",{class:"col-12 d-flex gap-3"},s(u,{width:"50%"}),s(u,{width:"50%"})),s("div",{class:"col-12 d-flex gap-3"},s(u,{width:"65%"}),s(u,{width:"35%"}))),x=()=>s("div",{class:"row gap-5"},s("div",{class:"col-12"},s(u,{width:"40%",height:"40px"})),s(g,null),s(g,null),s(g,null)),y=class{constructor(s){i(this,s),this.submitEvent=t(this,"submit-event",7),this.clickEvent=t(this,"click-event",7),this.instantiateBusiness=s=>{const i=new l(s);this.formController.setInitialValues(Object.assign({},i))},this.sendData=async()=>{this.isSaving=!0;try{const s=this.formController.values.getValue(),i=this.formController.getInitialValues(),t=new l(Object.assign(Object.assign({},i),s)).payload,o=await this.api.patch(this.businessEndpoint,t);this.handleReponse(o)}catch(s){this.errorMessage=p.patchData}finally{this.isSaving=!1}},this.fetchData=async()=>{this.isLoading=!0;try{const s=await this.api.get(this.businessEndpoint);this.instantiateBusiness(s.data)}catch(s){this.errorMessage=p.fetchData}finally{this.isLoading=!1}},this.validateAndSubmit=s=>{s.preventDefault(),this.formController.validateAndSubmit(this.sendData)},this.authToken=void 0,this.businessId=void 0,this.hideErrors=!1,this.formTitle="Business Information",this.removeTitle=!1,this.isLoading=!1,this.isSaving=!1,this.errorMessage=void 0}componentWillLoad(){d(),this.analytics=new m(this),this.authToken||console.error("Warning: Missing auth-token. The form will not be functional without it."),this.businessId||console.error("Warning: Missing business-id. The form requires an existing business-id to function."),this.formController=new e(w),this.api=c({authToken:this.authToken,apiOrigin:"https://wc-proxy.justifi.ai"}),this.fetchData()}disconnectedCallback(){this.analytics.cleanup()}get title(){return this.removeTitle?"":this.formTitle}get disabledState(){return this.isSaving}get businessEndpoint(){return`entities/business/${this.businessId}`}handleReponse(s){s.error&&(this.errorMessage=p.patchData),this.submitEvent.emit({response:s}),this.instantiateBusiness(s.data)}render(){return s(b,null,this.isLoading?s(x,null):s("form",{onSubmit:this.validateAndSubmit},s("div",{class:"row gap-3"},s(j,{text:this.title}),s("form-alert",{text:this.errorMessage,hideAlert:this.hideErrors}),s("div",{class:"col-12 mb-4"},s("justifi-business-core-info",{formController:this.formController})),s("div",{class:"col-12 mb-4"},s("justifi-legal-address-form",{formController:this.formController})),s("div",{class:"col-12 mb-4"},s("justifi-additional-questions",{formController:this.formController})),s("div",{class:"col-12 mb-4"},s("justifi-business-representative",{formController:this.formController})),s("div",{class:"col-12 d-flex flex-row-reverse"},s(f,{type:"submit",disabled:this.disabledState,variant:"primary",onClick:()=>this.clickEvent.emit({name:v.submit}),isLoading:this.isSaving},"Submit")))))}};export{y as justifi_business_form}
@@ -1 +1 @@
1
- import{r as t,c as i,h as s}from"./p-2783e363.js";import{a as e,C as r}from"./p-9dd8685c.js";import{c as o,J as a}from"./p-3188f72a.js";import{a as p}from"./p-abdbcd8e.js";import{g as n,a as h}from"./p-87f8c596.js";import{D as c}from"./p-f4aeb100.js";import"./p-88a37837.js";import"./p-5f6b4bc9.js";import"./p-1366a019.js";import"./p-f8fccf44.js";import"./p-56f6ce4c.js";import"./p-3f5e6602.js";import"./p-2a9d7f6b.js";import"./p-61f0a2ce.js";const d=class{constructor(s){t(this,s),this.errorEvent=i(this,"error-event",7),this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.disputeId=void 0,this.authToken=void 0,this.apiOrigin="https://wc-proxy.justifi.ai",this.getDispute=void 0,this.errorMessage=null}componentWillLoad(){o(),this.analytics=new a(this),this.initializeGetDispute()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeGetDispute()}initializeGetDispute(){this.disputeId&&this.authToken?this.getDispute=(({id:t,authToken:i,service:s,apiOrigin:r})=>async({onSuccess:o,onError:a})=>{var c;try{const d=await s.fetchDispute(t,i,r);if(d.error)return a({error:n(d.error),code:h(null===(c=d.error)||void 0===c?void 0:c.code),severity:e.ERROR});{const t=Object.assign({},d.page_info);o({dispute:new p(d.data),pagingInfo:t})}}catch(t){const i=h(null==t?void 0:t.code);return a({error:t.message||t,code:i,severity:e.ERROR})}})({id:this.disputeId,authToken:this.authToken,service:new c,apiOrigin:this.apiOrigin}):(this.errorMessage="Dispute ID and Auth Token are required",this.errorEvent.emit({message:this.errorMessage,errorCode:r.MISSING_PROPS,severity:e.ERROR}))}render(){return s("justifi-dispute-management-core",{key:"4bdf1bb2befbd6d963744cac254993ad78e2047f",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
+ import{r as t,c as i,h as s}from"./p-2783e363.js";import{a as e,C as r}from"./p-9dd8685c.js";import{c as o,J as a}from"./p-5a541d35.js";import{a as p}from"./p-abdbcd8e.js";import{g as n,a as h}from"./p-87f8c596.js";import{D as d}from"./p-f4aeb100.js";import"./p-de03d0f8.js";import"./p-5f6b4bc9.js";import"./p-1366a019.js";import"./p-f8fccf44.js";import"./p-56f6ce4c.js";import"./p-3f5e6602.js";import"./p-2a9d7f6b.js";import"./p-61f0a2ce.js";const c=class{constructor(s){t(this,s),this.errorEvent=i(this,"error-event",7),this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.disputeId=void 0,this.authToken=void 0,this.apiOrigin="https://wc-proxy.justifi.ai",this.getDispute=void 0,this.errorMessage=null}componentWillLoad(){o(),this.analytics=new a(this),this.initializeGetDispute()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeGetDispute()}initializeGetDispute(){this.disputeId&&this.authToken?this.getDispute=(({id:t,authToken:i,service:s,apiOrigin:r})=>async({onSuccess:o,onError:a})=>{var d;try{const c=await s.fetchDispute(t,i,r);if(c.error)return a({error:n(c.error),code:h(null===(d=c.error)||void 0===d?void 0:d.code),severity:e.ERROR});{const t=Object.assign({},c.page_info);o({dispute:new p(c.data),pagingInfo:t})}}catch(t){const i=h(null==t?void 0:t.code);return a({error:t.message||t,code:i,severity:e.ERROR})}})({id:this.disputeId,authToken:this.authToken,service:new d,apiOrigin:this.apiOrigin}):(this.errorMessage="Dispute ID and Auth Token are required",this.errorEvent.emit({message:this.errorMessage,errorCode:r.MISSING_PROPS,severity:e.ERROR}))}render(){return s("justifi-dispute-management-core",{key:"4bdf1bb2befbd6d963744cac254993ad78e2047f",getDispute:this.getDispute,disputeId:this.disputeId,authToken:this.authToken,"onError-event":this.handleErrorEvent})}static get watchers(){return{disputeId:["propChanged"],authToken:["propChanged"]}}};export{c as justifi_dispute_management}